repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java
ServicesInner.stopAsync
public Observable<Void> stopAsync(String groupName, String serviceName) { return stopWithServiceResponseAsync(groupName, serviceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); ...
java
public Observable<Void> stopAsync(String groupName, String serviceName) { return stopWithServiceResponseAsync(groupName, serviceName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); ...
[ "public", "Observable", "<", "Void", ">", "stopAsync", "(", "String", "groupName", ",", "String", "serviceName", ")", "{", "return", "stopWithServiceResponseAsync", "(", "groupName", ",", "serviceName", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponse...
Stop service. The services resource is the top-level resource that represents the Data Migration Service. This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped. @param groupName Name of the resource group @param serviceName Name o...
[ "Stop", "service", ".", "The", "services", "resource", "is", "the", "top", "-", "level", "resource", "that", "represents", "the", "Data", "Migration", "Service", ".", "This", "action", "stops", "the", "service", "and", "the", "service", "cannot", "be", "used...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L1218-L1225
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.executeInsert
public List<GroovyRowResult> executeInsert(String sql, String[] keyColumnNames, Object[] params) throws SQLException { return executeInsert(sql, Arrays.asList(params), Arrays.asList(keyColumnNames)); }
java
public List<GroovyRowResult> executeInsert(String sql, String[] keyColumnNames, Object[] params) throws SQLException { return executeInsert(sql, Arrays.asList(params), Arrays.asList(keyColumnNames)); }
[ "public", "List", "<", "GroovyRowResult", ">", "executeInsert", "(", "String", "sql", ",", "String", "[", "]", "keyColumnNames", ",", "Object", "[", "]", "params", ")", "throws", "SQLException", "{", "return", "executeInsert", "(", "sql", ",", "Arrays", ".",...
Executes the given SQL statement (typically an INSERT statement). This variant allows you to receive the values of any auto-generated columns, such as an autoincrement ID field (or fields) when you know the column name(s) of the ID field(s). <p> An array variant of {@link #executeInsert(String, List, List)}. <p> This m...
[ "Executes", "the", "given", "SQL", "statement", "(", "typically", "an", "INSERT", "statement", ")", ".", "This", "variant", "allows", "you", "to", "receive", "the", "values", "of", "any", "auto", "-", "generated", "columns", "such", "as", "an", "autoincremen...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L2809-L2811
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/io/IOUtils.java
IOUtils.encodedInputStreamReader
public static Reader encodedInputStreamReader(InputStream stream, String encoding) throws IOException { // InputStreamReader doesn't allow encoding to be null; if (encoding == null) { return new InputStreamReader(stream); } else { return new InputStreamReader(stream, encoding); } }
java
public static Reader encodedInputStreamReader(InputStream stream, String encoding) throws IOException { // InputStreamReader doesn't allow encoding to be null; if (encoding == null) { return new InputStreamReader(stream); } else { return new InputStreamReader(stream, encoding); } }
[ "public", "static", "Reader", "encodedInputStreamReader", "(", "InputStream", "stream", ",", "String", "encoding", ")", "throws", "IOException", "{", "// InputStreamReader doesn't allow encoding to be null;\r", "if", "(", "encoding", "==", "null", ")", "{", "return", "n...
Create a Reader with an explicit encoding around an InputStream. This static method will treat null as meaning to use the platform default, unlike the Java library methods that disallow a null encoding. @param stream An InputStream @param encoding A charset encoding @return A Reader @throws IOException If any IO probl...
[ "Create", "a", "Reader", "with", "an", "explicit", "encoding", "around", "an", "InputStream", ".", "This", "static", "method", "will", "treat", "null", "as", "meaning", "to", "use", "the", "platform", "default", "unlike", "the", "Java", "library", "methods", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/io/IOUtils.java#L1320-L1327
davidcarboni/restolino
src/main/java/com/github/davidcarboni/restolino/api/Router.java
Router.handleNotFound
private void handleNotFound(HttpServletRequest request, HttpServletResponse response) throws IOException { // Set a default response code: response.setStatus(HttpServletResponse.SC_NOT_FOUND); // Attempt to handle the not-found: Object notFoundResponse = notFound.handle(request, respon...
java
private void handleNotFound(HttpServletRequest request, HttpServletResponse response) throws IOException { // Set a default response code: response.setStatus(HttpServletResponse.SC_NOT_FOUND); // Attempt to handle the not-found: Object notFoundResponse = notFound.handle(request, respon...
[ "private", "void", "handleNotFound", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "// Set a default response code:", "response", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_NOT_FOUND", ")", ";"...
Handles a request where no API endpoint is defined. If {@link #notFound} is set, {@link NotFound#handle(HttpServletRequest, HttpServletResponse)} will be called. Otherwise a simple 404 will be returned. @param request {@link HttpServletRequest} @param response {@link HttpServletResponse} @throws IOException If an err...
[ "Handles", "a", "request", "where", "no", "API", "endpoint", "is", "defined", ".", "If", "{", "@link", "#notFound", "}", "is", "set", "{", "@link", "NotFound#handle", "(", "HttpServletRequest", "HttpServletResponse", ")", "}", "will", "be", "called", ".", "O...
train
https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/api/Router.java#L371-L381
dwdyer/watchmaker
framework/src/java/main/org/uncommons/util/reflection/ReflectionUtils.java
ReflectionUtils.invokeUnchecked
public static <T> T invokeUnchecked(Constructor<T> constructor, Object... arguments) { try { return constructor.newInstance(arguments); } catch (IllegalAccessException ex) { // This cannot happen if the constructor is public. throw new Ille...
java
public static <T> T invokeUnchecked(Constructor<T> constructor, Object... arguments) { try { return constructor.newInstance(arguments); } catch (IllegalAccessException ex) { // This cannot happen if the constructor is public. throw new Ille...
[ "public", "static", "<", "T", ">", "T", "invokeUnchecked", "(", "Constructor", "<", "T", ">", "constructor", ",", "Object", "...", "arguments", ")", "{", "try", "{", "return", "constructor", ".", "newInstance", "(", "arguments", ")", ";", "}", "catch", "...
Invokes the specified constructor without throwing any checked exceptions. This is only valid for constructors that are not declared to throw any checked exceptions. Any unchecked exceptions thrown by the specified constructor will be re-thrown (in their original form, not wrapped in an InvocationTargetException as wo...
[ "Invokes", "the", "specified", "constructor", "without", "throwing", "any", "checked", "exceptions", ".", "This", "is", "only", "valid", "for", "constructors", "that", "are", "not", "declared", "to", "throw", "any", "checked", "exceptions", ".", "Any", "unchecke...
train
https://github.com/dwdyer/watchmaker/blob/33d942350e6bf7d9a17b9262a4f898158530247e/framework/src/java/main/org/uncommons/util/reflection/ReflectionUtils.java#L96-L127
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java
TmdbLists.modifyMovieList
private StatusCode modifyMovieList(String sessionId, String listId, int movieId, MethodSub operation) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.SESSION_ID, sessionId); parameters.add(Param.ID, listId); String jsonBody = new PostTool...
java
private StatusCode modifyMovieList(String sessionId, String listId, int movieId, MethodSub operation) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.SESSION_ID, sessionId); parameters.add(Param.ID, listId); String jsonBody = new PostTool...
[ "private", "StatusCode", "modifyMovieList", "(", "String", "sessionId", ",", "String", "listId", ",", "int", "movieId", ",", "MethodSub", "operation", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", "...
Modify a list This can be used to add or remove an item from the list @param sessionId @param listId @param movieId @param operation @return @throws MovieDbException
[ "Modify", "a", "list" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java#L167-L184
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionWrapper.java
CPOptionWrapper.getName
@Override public String getName(String languageId, boolean useDefault) { return _cpOption.getName(languageId, useDefault); }
java
@Override public String getName(String languageId, boolean useDefault) { return _cpOption.getName(languageId, useDefault); }
[ "@", "Override", "public", "String", "getName", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpOption", ".", "getName", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized name of this cp option in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the requested language @return the local...
[ "Returns", "the", "localized", "name", "of", "this", "cp", "option", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested", "language", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionWrapper.java#L447-L450
micronaut-projects/micronaut-core
http-server-netty/src/main/java/io/micronaut/http/server/netty/websocket/NettyServerWebSocketUpgradeHandler.java
NettyServerWebSocketUpgradeHandler.handleHandshake
protected ChannelFuture handleHandshake(ChannelHandlerContext ctx, NettyHttpRequest req, WebSocketBean<?> webSocketBean, MutableHttpResponse<?> response) { int maxFramePayloadLength = webSocketBean.messageMethod().flatMap(m -> m.getValue(OnMessage.class, "maxPayloadLength", Integer.class)).orElse(65536); ...
java
protected ChannelFuture handleHandshake(ChannelHandlerContext ctx, NettyHttpRequest req, WebSocketBean<?> webSocketBean, MutableHttpResponse<?> response) { int maxFramePayloadLength = webSocketBean.messageMethod().flatMap(m -> m.getValue(OnMessage.class, "maxPayloadLength", Integer.class)).orElse(65536); ...
[ "protected", "ChannelFuture", "handleHandshake", "(", "ChannelHandlerContext", "ctx", ",", "NettyHttpRequest", "req", ",", "WebSocketBean", "<", "?", ">", "webSocketBean", ",", "MutableHttpResponse", "<", "?", ">", "response", ")", "{", "int", "maxFramePayloadLength",...
Do the handshaking for WebSocket request. @param ctx The channel handler context @param req The request @param webSocketBean The web socket bean @param response The response @return The channel future
[ "Do", "the", "handshaking", "for", "WebSocket", "request", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/http-server-netty/src/main/java/io/micronaut/http/server/netty/websocket/NettyServerWebSocketUpgradeHandler.java#L225-L256
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java
GVRPeriodicEngine.runEvery
public PeriodicEvent runEvery(Runnable task, float delay, float period, KeepRunning callback) { validateDelay(delay); validatePeriod(period); return new Event(task, delay, period, callback); }
java
public PeriodicEvent runEvery(Runnable task, float delay, float period, KeepRunning callback) { validateDelay(delay); validatePeriod(period); return new Event(task, delay, period, callback); }
[ "public", "PeriodicEvent", "runEvery", "(", "Runnable", "task", ",", "float", "delay", ",", "float", "period", ",", "KeepRunning", "callback", ")", "{", "validateDelay", "(", "delay", ")", ";", "validatePeriod", "(", "period", ")", ";", "return", "new", "Eve...
Run a task periodically, with a callback. @param task Task to run. @param delay The first execution will happen in {@code delay} seconds. @param period Subsequent executions will happen every {@code period} seconds after the first. @param callback Callback that lets you cancel the task. {@code null} means run indefini...
[ "Run", "a", "task", "periodically", "with", "a", "callback", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java#L186-L191
documents4j/documents4j
documents4j-util-conversion/src/main/java/com/documents4j/job/AbstractConverterBuilder.java
AbstractConverterBuilder.workerPool
@SuppressWarnings("unchecked") public T workerPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) { assertNumericArgument(corePoolSize, true); assertNumericArgument(maximumPoolSize, false); assertSmallerEquals(corePoolSize, maximumPoolSize); assertNumericAr...
java
@SuppressWarnings("unchecked") public T workerPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) { assertNumericArgument(corePoolSize, true); assertNumericArgument(maximumPoolSize, false); assertSmallerEquals(corePoolSize, maximumPoolSize); assertNumericAr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "workerPool", "(", "int", "corePoolSize", ",", "int", "maximumPoolSize", ",", "long", "keepAliveTime", ",", "TimeUnit", "unit", ")", "{", "assertNumericArgument", "(", "corePoolSize", ",", "true", ...
Configures a worker pool for the converter. This worker pool implicitly sets a maximum number of conversions that are concurrently undertaken by the resulting converter. When a converter is requested to concurrently execute more conversions than {@code maximumPoolSize}, it will queue excess conversions until capacities...
[ "Configures", "a", "worker", "pool", "for", "the", "converter", ".", "This", "worker", "pool", "implicitly", "sets", "a", "maximum", "number", "of", "conversions", "that", "are", "concurrently", "undertaken", "by", "the", "resulting", "converter", ".", "When", ...
train
https://github.com/documents4j/documents4j/blob/eebb3ede43ffeb5fbfc85b3134f67a9c379a5594/documents4j-util-conversion/src/main/java/com/documents4j/job/AbstractConverterBuilder.java#L73-L84
apache/reef
lang/java/reef-examples-clr/src/main/java/org/apache/reef/examples/helloCLR/HelloDriver.java
HelloDriver.onNextCLR
void onNextCLR(final AllocatedEvaluator allocatedEvaluator) { try { allocatedEvaluator.setProcess(clrProcessFactory.newEvaluatorProcess()); final Configuration contextConfiguration = ContextConfiguration.CONF .set(ContextConfiguration.IDENTIFIER, "HelloREEFContext") .build(); ...
java
void onNextCLR(final AllocatedEvaluator allocatedEvaluator) { try { allocatedEvaluator.setProcess(clrProcessFactory.newEvaluatorProcess()); final Configuration contextConfiguration = ContextConfiguration.CONF .set(ContextConfiguration.IDENTIFIER, "HelloREEFContext") .build(); ...
[ "void", "onNextCLR", "(", "final", "AllocatedEvaluator", "allocatedEvaluator", ")", "{", "try", "{", "allocatedEvaluator", ".", "setProcess", "(", "clrProcessFactory", ".", "newEvaluatorProcess", "(", ")", ")", ";", "final", "Configuration", "contextConfiguration", "=...
Uses the AllocatedEvaluator to launch a CLR task. @param allocatedEvaluator
[ "Uses", "the", "AllocatedEvaluator", "to", "launch", "a", "CLR", "task", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-examples-clr/src/main/java/org/apache/reef/examples/helloCLR/HelloDriver.java#L116-L131
tbrooks8/Precipice
precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java
GuardRail.acquirePermits
public Rejected acquirePermits(long number, long nanoTime) { for (int i = 0; i < backPressureList.size(); ++i) { BackPressure<Rejected> bp = backPressureList.get(i); Rejected rejected = bp.acquirePermit(number, nanoTime); if (rejected != null) { rejectedCounts...
java
public Rejected acquirePermits(long number, long nanoTime) { for (int i = 0; i < backPressureList.size(); ++i) { BackPressure<Rejected> bp = backPressureList.get(i); Rejected rejected = bp.acquirePermit(number, nanoTime); if (rejected != null) { rejectedCounts...
[ "public", "Rejected", "acquirePermits", "(", "long", "number", ",", "long", "nanoTime", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "backPressureList", ".", "size", "(", ")", ";", "++", "i", ")", "{", "BackPressure", "<", "Rejected", "...
Acquire permits for task execution. If the acquisition is rejected then a reason will be returned. If the acquisition is successful, null will be returned. @param number of permits to acquire @param nanoTime currentInterval nano time @return the rejected reason
[ "Acquire", "permits", "for", "task", "execution", ".", "If", "the", "acquisition", "is", "rejected", "then", "a", "reason", "will", "be", "returned", ".", "If", "the", "acquisition", "is", "successful", "null", "will", "be", "returned", "." ]
train
https://github.com/tbrooks8/Precipice/blob/97fae467fd676b16a96b8d88b02569d8fc1f2681/precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java#L69-L83
voldemort/voldemort
src/java/voldemort/versioning/VectorClockUtils.java
VectorClockUtils.makeClockWithCurrentTime
public static VectorClock makeClockWithCurrentTime(Set<Integer> serverIds) { return makeClock(serverIds, System.currentTimeMillis(), System.currentTimeMillis()); }
java
public static VectorClock makeClockWithCurrentTime(Set<Integer> serverIds) { return makeClock(serverIds, System.currentTimeMillis(), System.currentTimeMillis()); }
[ "public", "static", "VectorClock", "makeClockWithCurrentTime", "(", "Set", "<", "Integer", ">", "serverIds", ")", "{", "return", "makeClock", "(", "serverIds", ",", "System", ".", "currentTimeMillis", "(", ")", ",", "System", ".", "currentTimeMillis", "(", ")", ...
Generates a vector clock with the provided nodes and current time stamp This clock can be used to overwrite the existing value avoiding obsolete version exceptions in most cases, except If the existing Vector Clock was generated in custom way. (i.e. existing vector clock does not use milliseconds) @param serverIds ser...
[ "Generates", "a", "vector", "clock", "with", "the", "provided", "nodes", "and", "current", "time", "stamp", "This", "clock", "can", "be", "used", "to", "overwrite", "the", "existing", "value", "avoiding", "obsolete", "version", "exceptions", "in", "most", "cas...
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/versioning/VectorClockUtils.java#L154-L156
networknt/light-4j
utility/src/main/java/com/networknt/utility/StringUtils.java
StringUtils.removeStart
public static String removeStart(final String str, final String remove) { if (isEmpty(str) || isEmpty(remove)) { return str; } if (str.startsWith(remove)){ return str.substring(remove.length()); } return str; }
java
public static String removeStart(final String str, final String remove) { if (isEmpty(str) || isEmpty(remove)) { return str; } if (str.startsWith(remove)){ return str.substring(remove.length()); } return str; }
[ "public", "static", "String", "removeStart", "(", "final", "String", "str", ",", "final", "String", "remove", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "remove", ")", ")", "{", "return", "str", ";", "}", "if", "(", "str",...
<p>Removes a substring only if it is at the beginning of a source string, otherwise returns the source string.</p> <p>A {@code null} source string will return {@code null}. An empty ("") source string will return the empty string. A {@code null} search string will return the source string.</p> <pre> StringUtils.remov...
[ "<p", ">", "Removes", "a", "substring", "only", "if", "it", "is", "at", "the", "beginning", "of", "a", "source", "string", "otherwise", "returns", "the", "source", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/StringUtils.java#L898-L906
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java
ShareSheetStyle.setMoreOptionStyle
public ShareSheetStyle setMoreOptionStyle(@DrawableRes int drawableIconID, @StringRes int stringLabelID) { moreOptionIcon_ = getDrawable(context_, drawableIconID); moreOptionText_ = context_.getResources().getString(stringLabelID); return this; }
java
public ShareSheetStyle setMoreOptionStyle(@DrawableRes int drawableIconID, @StringRes int stringLabelID) { moreOptionIcon_ = getDrawable(context_, drawableIconID); moreOptionText_ = context_.getResources().getString(stringLabelID); return this; }
[ "public", "ShareSheetStyle", "setMoreOptionStyle", "(", "@", "DrawableRes", "int", "drawableIconID", ",", "@", "StringRes", "int", "stringLabelID", ")", "{", "moreOptionIcon_", "=", "getDrawable", "(", "context_", ",", "drawableIconID", ")", ";", "moreOptionText_", ...
<p> Set the icon and label for the option to expand the application list to see more options. Default label is set to "More" </p> @param drawableIconID Resource ID for the drawable to set as the icon for more option. Default icon is system menu_more icon. @param stringLabelID Resource ID for String label for the more...
[ "<p", ">", "Set", "the", "icon", "and", "label", "for", "the", "option", "to", "expand", "the", "application", "list", "to", "see", "more", "options", ".", "Default", "label", "is", "set", "to", "More", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java#L104-L109
fuinorg/srcgen4j-commons
src/main/java/org/fuin/srcgen4j/commons/Folder.java
Folder.getCanonicalDir
@Nullable public final File getCanonicalDir() { final String dir = getDirectory(); if (dir == null) { return null; } try { return new File(dir).getCanonicalFile(); } catch (final IOException ex) { throw new RuntimeException("Couldn...
java
@Nullable public final File getCanonicalDir() { final String dir = getDirectory(); if (dir == null) { return null; } try { return new File(dir).getCanonicalFile(); } catch (final IOException ex) { throw new RuntimeException("Couldn...
[ "@", "Nullable", "public", "final", "File", "getCanonicalDir", "(", ")", "{", "final", "String", "dir", "=", "getDirectory", "(", ")", ";", "if", "(", "dir", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "return", "new", "File", "("...
Returns the full path from project and folder. @return Directory.
[ "Returns", "the", "full", "path", "from", "project", "and", "folder", "." ]
train
https://github.com/fuinorg/srcgen4j-commons/blob/bce26fd3167ea91fb2f3ad3fc9a1836d3d9fb14b/src/main/java/org/fuin/srcgen4j/commons/Folder.java#L408-L419
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHighlighter.java
WeightedHighlighter.endFragment
private static void endFragment(StringBuilder sb, String text, int offset, int limit) { if (limit == text.length()) { // append all sb.append(text.substring(offset)); return; } int end = offset; for (int i = end; i < limit; i++) { if (Character....
java
private static void endFragment(StringBuilder sb, String text, int offset, int limit) { if (limit == text.length()) { // append all sb.append(text.substring(offset)); return; } int end = offset; for (int i = end; i < limit; i++) { if (Character....
[ "private", "static", "void", "endFragment", "(", "StringBuilder", "sb", ",", "String", "text", ",", "int", "offset", ",", "int", "limit", ")", "{", "if", "(", "limit", "==", "text", ".", "length", "(", ")", ")", "{", "// append all", "sb", ".", "append...
Writes the end of a fragment to the string buffer <code>sb</code>. The last occurrence of a matching term is indicated by the <code>offset</code> into the <code>text</code>. @param sb where to append the start of the fragment. @param text the original text. @param offset the end offset of the last matching term ...
[ "Writes", "the", "end", "of", "a", "fragment", "to", "the", "string", "buffer", "<code", ">", "sb<", "/", "code", ">", ".", "The", "last", "occurrence", "of", "a", "matching", "term", "is", "indicated", "by", "the", "<code", ">", "offset<", "/", "code"...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHighlighter.java#L266-L284
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java
ClassesManager.areEqual
public static boolean areEqual(Field destination,Field source){ return getGenericString(destination).equals(getGenericString(source)); }
java
public static boolean areEqual(Field destination,Field source){ return getGenericString(destination).equals(getGenericString(source)); }
[ "public", "static", "boolean", "areEqual", "(", "Field", "destination", ",", "Field", "source", ")", "{", "return", "getGenericString", "(", "destination", ")", ".", "equals", "(", "getGenericString", "(", "source", ")", ")", ";", "}" ]
Returns true if destination and source have the same structure. @param destination destination field @param source source field @return returns true if destination and source have the same structure
[ "Returns", "true", "if", "destination", "and", "source", "have", "the", "same", "structure", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L359-L361
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/Slice.java
Slice.copySlice
public Slice copySlice(int index, int length) { checkPositionIndexes(index, index + length, this.length); index += offset; byte[] copiedArray = new byte[length]; System.arraycopy(data, index, copiedArray, 0, length); return new Slice(copiedArray); }
java
public Slice copySlice(int index, int length) { checkPositionIndexes(index, index + length, this.length); index += offset; byte[] copiedArray = new byte[length]; System.arraycopy(data, index, copiedArray, 0, length); return new Slice(copiedArray); }
[ "public", "Slice", "copySlice", "(", "int", "index", ",", "int", "length", ")", "{", "checkPositionIndexes", "(", "index", ",", "index", "+", "length", ",", "this", ".", "length", ")", ";", "index", "+=", "offset", ";", "byte", "[", "]", "copiedArray", ...
Returns a copy of this buffer's sub-region. Modifying the content of the returned buffer or this buffer does not affect each other at all.
[ "Returns", "a", "copy", "of", "this", "buffer", "s", "sub", "-", "region", ".", "Modifying", "the", "content", "of", "the", "returned", "buffer", "or", "this", "buffer", "does", "not", "affect", "each", "other", "at", "all", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/Slice.java#L527-L535
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/FailoverGroupsInner.java
FailoverGroupsInner.beginFailover
public FailoverGroupInner beginFailover(String resourceGroupName, String serverName, String failoverGroupName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName).toBlocking().single().body(); }
java
public FailoverGroupInner beginFailover(String resourceGroupName, String serverName, String failoverGroupName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName).toBlocking().single().body(); }
[ "public", "FailoverGroupInner", "beginFailover", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "failoverGroupName", ")", "{", "return", "beginFailoverWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "failoverGrou...
Fails over from the current primary server to this server. @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 containing the failover group. @param failoverGroupName Th...
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", "." ]
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/FailoverGroupsInner.java#L966-L968
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.getJob
public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId); return (response.readEntity(Job.class)); }
java
public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId); return (response.readEntity(Job.class)); }
[ "public", "Job", "getJob", "(", "Object", "projectIdOrPath", ",", "int", "jobId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPat...
Get single job in a project. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the job for @param jobId the job ID to get @return a single job for the specified project ID @throws GitLabAp...
[ "Get", "single", "job", "in", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L175-L178
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel_binding.java
dnspolicylabel_binding.get
public static dnspolicylabel_binding get(nitro_service service, String labelname) throws Exception{ dnspolicylabel_binding obj = new dnspolicylabel_binding(); obj.set_labelname(labelname); dnspolicylabel_binding response = (dnspolicylabel_binding) obj.get_resource(service); return response; }
java
public static dnspolicylabel_binding get(nitro_service service, String labelname) throws Exception{ dnspolicylabel_binding obj = new dnspolicylabel_binding(); obj.set_labelname(labelname); dnspolicylabel_binding response = (dnspolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "dnspolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "dnspolicylabel_binding", "obj", "=", "new", "dnspolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", "(",...
Use this API to fetch dnspolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "dnspolicylabel_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel_binding.java#L114-L119
tdomzal/junit-docker-rule
src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java
DockerRuleBuilder.addLabel
public DockerRuleBuilder addLabel(String name, String value) { labels.put(name, value); return this; }
java
public DockerRuleBuilder addLabel(String name, String value) { labels.put(name, value); return this; }
[ "public", "DockerRuleBuilder", "addLabel", "(", "String", "name", ",", "String", "value", ")", "{", "labels", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add container label (call multiple times to add more than one). @param name Label name. @param value Label value.
[ "Add", "container", "label", "(", "call", "multiple", "times", "to", "add", "more", "than", "one", ")", "." ]
train
https://github.com/tdomzal/junit-docker-rule/blob/5a0ba2fd095d201530d3f9e614bc5e88d0afaeb2/src/main/java/pl/domzal/junit/docker/rule/DockerRuleBuilder.java#L482-L485
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/LocalDirAllocator.java
LocalDirAllocator.getLocalPathForWrite
public Path getLocalPathForWrite(String pathStr, Configuration conf) throws IOException { return getLocalPathForWrite(pathStr, -1, conf); }
java
public Path getLocalPathForWrite(String pathStr, Configuration conf) throws IOException { return getLocalPathForWrite(pathStr, -1, conf); }
[ "public", "Path", "getLocalPathForWrite", "(", "String", "pathStr", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "return", "getLocalPathForWrite", "(", "pathStr", ",", "-", "1", ",", "conf", ")", ";", "}" ]
Get a path from the local FS. This method should be used if the size of the file is not known apriori. We go round-robin over the set of disks (via the configured dirs) and return the first complete path where we could create the parent directory of the passed path. @param pathStr the requested path (this will be creat...
[ "Get", "a", "path", "from", "the", "local", "FS", ".", "This", "method", "should", "be", "used", "if", "the", "size", "of", "the", "file", "is", "not", "known", "apriori", ".", "We", "go", "round", "-", "robin", "over", "the", "set", "of", "disks", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/LocalDirAllocator.java#L107-L110
grails/grails-core
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java
RegexUrlMapping.createRuntimeConstraintEvaluator
private Object createRuntimeConstraintEvaluator(final String name, ConstrainedProperty[] constraints) { if (constraints == null) return null; for (ConstrainedProperty constraint : constraints) { if (constraint.getPropertyName().equals(name)) { return new Closure(this) { ...
java
private Object createRuntimeConstraintEvaluator(final String name, ConstrainedProperty[] constraints) { if (constraints == null) return null; for (ConstrainedProperty constraint : constraints) { if (constraint.getPropertyName().equals(name)) { return new Closure(this) { ...
[ "private", "Object", "createRuntimeConstraintEvaluator", "(", "final", "String", "name", ",", "ConstrainedProperty", "[", "]", "constraints", ")", "{", "if", "(", "constraints", "==", "null", ")", "return", "null", ";", "for", "(", "ConstrainedProperty", "constrai...
This method will look for a constraint for the given name and return a closure that when executed will attempt to evaluate its value from the bound request parameters at runtime. @param name The name of the constrained property @param constraints The array of current ConstrainedProperty instances @return Either...
[ "This", "method", "will", "look", "for", "a", "constraint", "for", "the", "given", "name", "and", "return", "a", "closure", "that", "when", "executed", "will", "attempt", "to", "evaluate", "its", "value", "from", "the", "bound", "request", "parameters", "at"...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/RegexUrlMapping.java#L700-L717
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
BinaryRowProtocol.getInternalDouble
public double getInternalDouble(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return 0; } switch (columnInfo.getColumnType()) { case BIT: return parseBit(); case TINYINT: return getInternalTinyInt(columnInfo); case SMALLINT: case ...
java
public double getInternalDouble(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return 0; } switch (columnInfo.getColumnType()) { case BIT: return parseBit(); case TINYINT: return getInternalTinyInt(columnInfo); case SMALLINT: case ...
[ "public", "double", "getInternalDouble", "(", "ColumnInformation", "columnInfo", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "0", ";", "}", "switch", "(", "columnInfo", ".", "getColumnType", "(", ")", ")", ...
Get double from raw binary format. @param columnInfo column information @return double value @throws SQLException if column is not numeric or is not in Double bounds (unsigned columns).
[ "Get", "double", "from", "raw", "binary", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java#L595-L659
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java
DeploymentHelper.runInNewTransaction
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, @NotNull final TransactionCallback<T> action) { return runInNewTransaction(txManager, transactionName, Isolation.DEFAULT.value(), action); }
java
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, @NotNull final TransactionCallback<T> action) { return runInNewTransaction(txManager, transactionName, Isolation.DEFAULT.value(), action); }
[ "public", "static", "<", "T", ">", "T", "runInNewTransaction", "(", "@", "NotNull", "final", "PlatformTransactionManager", "txManager", ",", "final", "String", "transactionName", ",", "@", "NotNull", "final", "TransactionCallback", "<", "T", ">", "action", ")", ...
Executes the modifying action in new transaction @param txManager transaction manager interface @param transactionName the name of the new transaction @param action the callback to execute in new tranaction @return the result of the action
[ "Executes", "the", "modifying", "action", "in", "new", "transaction" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java#L85-L88
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_freedom_domain_GET
public OvhFreedom serviceName_freedom_domain_GET(String serviceName, String domain) throws IOException { String qPath = "/hosting/web/{serviceName}/freedom/{domain}"; StringBuilder sb = path(qPath, serviceName, domain); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhFreedom.cla...
java
public OvhFreedom serviceName_freedom_domain_GET(String serviceName, String domain) throws IOException { String qPath = "/hosting/web/{serviceName}/freedom/{domain}"; StringBuilder sb = path(qPath, serviceName, domain); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhFreedom.cla...
[ "public", "OvhFreedom", "serviceName_freedom_domain_GET", "(", "String", "serviceName", ",", "String", "domain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/freedom/{domain}\"", ";", "StringBuilder", "sb", "=", "path", "(", "...
Get this object properties REST: GET /hosting/web/{serviceName}/freedom/{domain} @param serviceName [required] The internal name of your hosting @param domain [required] Freedom domain
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L599-L604
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java
HelpUtil.removeViewer
protected static void removeViewer(Page page, boolean close) { IHelpViewer viewer = (IHelpViewer) page.removeAttribute(VIEWER_ATTRIB); if (viewer != null && close) { viewer.close(); } }
java
protected static void removeViewer(Page page, boolean close) { IHelpViewer viewer = (IHelpViewer) page.removeAttribute(VIEWER_ATTRIB); if (viewer != null && close) { viewer.close(); } }
[ "protected", "static", "void", "removeViewer", "(", "Page", "page", ",", "boolean", "close", ")", "{", "IHelpViewer", "viewer", "=", "(", "IHelpViewer", ")", "page", ".", "removeAttribute", "(", "VIEWER_ATTRIB", ")", ";", "if", "(", "viewer", "!=", "null", ...
Remove and optionally close the help viewer associated with the specified page. @param page The page owning the help viewer. @param close If true, close the help viewer after removing it.
[ "Remove", "and", "optionally", "close", "the", "help", "viewer", "associated", "with", "the", "specified", "page", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java#L160-L166
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.getAttachment
public InputStream getAttachment(String docId, String attachmentName) { return getAttachment(docId, attachmentName, null); }
java
public InputStream getAttachment(String docId, String attachmentName) { return getAttachment(docId, attachmentName, null); }
[ "public", "InputStream", "getAttachment", "(", "String", "docId", ",", "String", "attachmentName", ")", "{", "return", "getAttachment", "(", "docId", ",", "attachmentName", ",", "null", ")", ";", "}" ]
Reads an attachment from the database. The stream must be closed after usage, otherwise http connection leaks will occur. @param docId the document id @param attachmentName the attachment name @return the attachment in the form of an {@code InputStream}.
[ "Reads", "an", "attachment", "from", "the", "database", "." ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L1204-L1206
denisneuling/apitrary.jar
apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/unmarshalling/JsonResponseConsumer.java
JsonResponseConsumer.onInt
protected void onInt(Integer val, String fieldName, JsonParser jp) { log.trace(fieldName + " " + val); }
java
protected void onInt(Integer val, String fieldName, JsonParser jp) { log.trace(fieldName + " " + val); }
[ "protected", "void", "onInt", "(", "Integer", "val", ",", "String", "fieldName", ",", "JsonParser", "jp", ")", "{", "log", ".", "trace", "(", "fieldName", "+", "\" \"", "+", "val", ")", ";", "}" ]
<p> onInt. </p> @param val a {@link java.lang.Integer} object. @param fieldName a {@link java.lang.String} object. @param jp a {@link org.codehaus.jackson.JsonParser} object.
[ "<p", ">", "onInt", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/apitrary.jar/blob/b7f639a1e735c60ba2b1b62851926757f5de8628/apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/unmarshalling/JsonResponseConsumer.java#L234-L236
google/closure-compiler
src/com/google/javascript/jscomp/RewritePolyfills.java
RewritePolyfills.removeUnneededPolyfills
private void removeUnneededPolyfills(Node parent, Node runtimeEnd) { Node node = parent.getFirstChild(); while (node != null && node != runtimeEnd) { Node next = node.getNext(); if (NodeUtil.isExprCall(node)) { Node call = node.getFirstChild(); Node name = call.getFirstChild(); ...
java
private void removeUnneededPolyfills(Node parent, Node runtimeEnd) { Node node = parent.getFirstChild(); while (node != null && node != runtimeEnd) { Node next = node.getNext(); if (NodeUtil.isExprCall(node)) { Node call = node.getFirstChild(); Node name = call.getFirstChild(); ...
[ "private", "void", "removeUnneededPolyfills", "(", "Node", "parent", ",", "Node", "runtimeEnd", ")", "{", "Node", "node", "=", "parent", ".", "getFirstChild", "(", ")", ";", "while", "(", "node", "!=", "null", "&&", "node", "!=", "runtimeEnd", ")", "{", ...
that already contains the library) is the same or lower than languageOut.
[ "that", "already", "contains", "the", "library", ")", "is", "the", "same", "or", "lower", "than", "languageOut", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/RewritePolyfills.java#L188-L205
yatechorg/jedis-utils
src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java
LuaScriptBuilder.endScript
public LuaScript endScript(LuaScriptConfig config) { if (!endsWithReturnStatement()) { add(new LuaAstReturnStatement()); } String scriptText = buildScriptText(); return new BasicLuaScript(scriptText, config); }
java
public LuaScript endScript(LuaScriptConfig config) { if (!endsWithReturnStatement()) { add(new LuaAstReturnStatement()); } String scriptText = buildScriptText(); return new BasicLuaScript(scriptText, config); }
[ "public", "LuaScript", "endScript", "(", "LuaScriptConfig", "config", ")", "{", "if", "(", "!", "endsWithReturnStatement", "(", ")", ")", "{", "add", "(", "new", "LuaAstReturnStatement", "(", ")", ")", ";", "}", "String", "scriptText", "=", "buildScriptText", ...
End building the script @param config the configuration for the script to build @return the new {@link LuaScript} instance
[ "End", "building", "the", "script" ]
train
https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/utils/lua/LuaScriptBuilder.java#L78-L84
molgenis/molgenis
molgenis-api-data/src/main/java/org/molgenis/api/data/v2/AttributeFilterToFetchConverter.java
AttributeFilterToFetchConverter.createDefaultEntityFetch
public static Fetch createDefaultEntityFetch(EntityType entityType, String languageCode) { boolean hasRefAttr = false; Fetch fetch = new Fetch(); for (Attribute attr : entityType.getAtomicAttributes()) { Fetch subFetch = createDefaultAttributeFetch(attr, languageCode); if (subFetch != null) { ...
java
public static Fetch createDefaultEntityFetch(EntityType entityType, String languageCode) { boolean hasRefAttr = false; Fetch fetch = new Fetch(); for (Attribute attr : entityType.getAtomicAttributes()) { Fetch subFetch = createDefaultAttributeFetch(attr, languageCode); if (subFetch != null) { ...
[ "public", "static", "Fetch", "createDefaultEntityFetch", "(", "EntityType", "entityType", ",", "String", "languageCode", ")", "{", "boolean", "hasRefAttr", "=", "false", ";", "Fetch", "fetch", "=", "new", "Fetch", "(", ")", ";", "for", "(", "Attribute", "attr"...
Create default entity fetch that fetches all attributes. @return default entity fetch or null
[ "Create", "default", "entity", "fetch", "that", "fetches", "all", "attributes", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-api-data/src/main/java/org/molgenis/api/data/v2/AttributeFilterToFetchConverter.java#L157-L168
b3log/latke
latke-core/src/main/java/org/b3log/latke/repository/Repositories.java
Repositories.getRepositoryDef
public static JSONObject getRepositoryDef(final String repositoryName) { if (StringUtils.isBlank(repositoryName)) { return null; } if (null == repositoriesDescription) { return null; } final JSONArray repositories = repositoriesDescription.optJSONArray("...
java
public static JSONObject getRepositoryDef(final String repositoryName) { if (StringUtils.isBlank(repositoryName)) { return null; } if (null == repositoriesDescription) { return null; } final JSONArray repositories = repositoriesDescription.optJSONArray("...
[ "public", "static", "JSONObject", "getRepositoryDef", "(", "final", "String", "repositoryName", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "repositoryName", ")", ")", "{", "return", "null", ";", "}", "if", "(", "null", "==", "repositoriesDescript...
Gets the repository definition of an repository specified by the given repository name. @param repositoryName the given repository name (maybe with table name prefix) @return repository definition, returns {@code null} if not found
[ "Gets", "the", "repository", "definition", "of", "an", "repository", "specified", "by", "the", "given", "repository", "name", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/repository/Repositories.java#L230-L248
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java
Calendar.validateField
protected final void validateField(int field, int min, int max) { int value = fields[field]; if (value < min || value > max) { throw new IllegalArgumentException(fieldName(field) + '=' + value + ", valid range=" + min + ".." + max); } }
java
protected final void validateField(int field, int min, int max) { int value = fields[field]; if (value < min || value > max) { throw new IllegalArgumentException(fieldName(field) + '=' + value + ", valid range=" + min + ".." + max); } }
[ "protected", "final", "void", "validateField", "(", "int", "field", ",", "int", "min", ",", "int", "max", ")", "{", "int", "value", "=", "fields", "[", "field", "]", ";", "if", "(", "value", "<", "min", "||", "value", ">", "max", ")", "{", "throw",...
Validate a single field of this calendar given its minimum and maximum allowed value. If the field is out of range, throw a descriptive <code>IllegalArgumentException</code>. Subclasses may use this method in their implementation of {@link #validateField(int)}.
[ "Validate", "a", "single", "field", "of", "this", "calendar", "given", "its", "minimum", "and", "maximum", "allowed", "value", ".", "If", "the", "field", "is", "out", "of", "range", "throw", "a", "descriptive", "<code", ">", "IllegalArgumentException<", "/", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5257-L5264
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/ItemListBox.java
ItemListBox.addItem
public void addItem (T item, String label) { addItem(label == null ? toLabel(item) : label); _items.add(item); }
java
public void addItem (T item, String label) { addItem(label == null ? toLabel(item) : label); _items.add(item); }
[ "public", "void", "addItem", "(", "T", "item", ",", "String", "label", ")", "{", "addItem", "(", "label", "==", "null", "?", "toLabel", "(", "item", ")", ":", "label", ")", ";", "_items", ".", "add", "(", "item", ")", ";", "}" ]
Adds the supplied item to this list box at the end of the list, using the supplied label if not null. If no label is given, {@link #toLabel(Object)} is used to calculate it.
[ "Adds", "the", "supplied", "item", "to", "this", "list", "box", "at", "the", "end", "of", "the", "list", "using", "the", "supplied", "label", "if", "not", "null", ".", "If", "no", "label", "is", "given", "{" ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/ItemListBox.java#L122-L126
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetFiltersInner.java
AssetFiltersInner.getAsync
public Observable<AssetFilterInner> getAsync(String resourceGroupName, String accountName, String assetName, String filterName) { return getWithServiceResponseAsync(resourceGroupName, accountName, assetName, filterName).map(new Func1<ServiceResponse<AssetFilterInner>, AssetFilterInner>() { @Override...
java
public Observable<AssetFilterInner> getAsync(String resourceGroupName, String accountName, String assetName, String filterName) { return getWithServiceResponseAsync(resourceGroupName, accountName, assetName, filterName).map(new Func1<ServiceResponse<AssetFilterInner>, AssetFilterInner>() { @Override...
[ "public", "Observable", "<", "AssetFilterInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "assetName", ",", "String", "filterName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",...
Get an Asset Filter. Get the details of an Asset Filter associated with the specified Asset. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param assetName The Asset name. @param filterName The Asset Filter name @throws Illega...
[ "Get", "an", "Asset", "Filter", ".", "Get", "the", "details", "of", "an", "Asset", "Filter", "associated", "with", "the", "specified", "Asset", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetFiltersInner.java#L271-L278
pebble/pebble-android-sdk
PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/PebbleKit.java
PebbleKit.requestDataLogsForApp
public static void requestDataLogsForApp(final Context context, final UUID appUuid) { final Intent requestIntent = new Intent(INTENT_DL_REQUEST_DATA); requestIntent.putExtra(APP_UUID, appUuid); context.sendBroadcast(requestIntent); }
java
public static void requestDataLogsForApp(final Context context, final UUID appUuid) { final Intent requestIntent = new Intent(INTENT_DL_REQUEST_DATA); requestIntent.putExtra(APP_UUID, appUuid); context.sendBroadcast(requestIntent); }
[ "public", "static", "void", "requestDataLogsForApp", "(", "final", "Context", "context", ",", "final", "UUID", "appUuid", ")", "{", "final", "Intent", "requestIntent", "=", "new", "Intent", "(", "INTENT_DL_REQUEST_DATA", ")", ";", "requestIntent", ".", "putExtra",...
A convenience function to emit an intent to pebble.apk to request the data logs for a particular app. If data is available, pebble.apk will advertise the data via 'INTENT_DL_RECEIVE_DATA' intents. To avoid leaking memory, activities registering BroadcastReceivers <em>must</em> unregister them in the Activity's {@link ...
[ "A", "convenience", "function", "to", "emit", "an", "intent", "to", "pebble", ".", "apk", "to", "request", "the", "data", "logs", "for", "a", "particular", "app", ".", "If", "data", "is", "available", "pebble", ".", "apk", "will", "advertise", "the", "da...
train
https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/PebbleKit.java#L891-L895
diffplug/durian
src/com/diffplug/common/base/TreeQuery.java
TreeQuery.copyLeavesIn
public static <T, CopyType> CopyType copyLeavesIn(TreeDef<T> def, T root, BiFunction<T, List<CopyType>, CopyType> nodeMapper) { List<CopyType> childrenMapped = def.childrenOf(root).stream().map(child -> { return copyLeavesIn(def, child, nodeMapper); }).collect(Collectors.toList()); return nodeMapper.apply(root...
java
public static <T, CopyType> CopyType copyLeavesIn(TreeDef<T> def, T root, BiFunction<T, List<CopyType>, CopyType> nodeMapper) { List<CopyType> childrenMapped = def.childrenOf(root).stream().map(child -> { return copyLeavesIn(def, child, nodeMapper); }).collect(Collectors.toList()); return nodeMapper.apply(root...
[ "public", "static", "<", "T", ",", "CopyType", ">", "CopyType", "copyLeavesIn", "(", "TreeDef", "<", "T", ">", "def", ",", "T", "root", ",", "BiFunction", "<", "T", ",", "List", "<", "CopyType", ">", ",", "CopyType", ">", "nodeMapper", ")", "{", "Lis...
Copies the given tree of T to CopyType, starting at the leaf nodes of the tree and moving in to the root node, which allows CopyType to be immutable (but does not require it). @param def defines the structure of the tree @param root root of the tree @param nodeMapper given an unmapped node, and a list of CopyType no...
[ "Copies", "the", "given", "tree", "of", "T", "to", "CopyType", "starting", "at", "the", "leaf", "nodes", "of", "the", "tree", "and", "moving", "in", "to", "the", "root", "node", "which", "allows", "CopyType", "to", "be", "immutable", "(", "but", "does", ...
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/TreeQuery.java#L87-L92
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/hash/MurmurHash3.java
MurmurHash3.getLong
private static long getLong(final byte[] bArr, final int index, final int rem) { long out = 0L; for (int i = rem; i-- > 0;) { //i= 7,6,5,4,3,2,1,0 final byte b = bArr[index + i]; out ^= (b & 0xFFL) << (i * 8); //equivalent to |= } return out; }
java
private static long getLong(final byte[] bArr, final int index, final int rem) { long out = 0L; for (int i = rem; i-- > 0;) { //i= 7,6,5,4,3,2,1,0 final byte b = bArr[index + i]; out ^= (b & 0xFFL) << (i * 8); //equivalent to |= } return out; }
[ "private", "static", "long", "getLong", "(", "final", "byte", "[", "]", "bArr", ",", "final", "int", "index", ",", "final", "int", "rem", ")", "{", "long", "out", "=", "0L", ";", "for", "(", "int", "i", "=", "rem", ";", "i", "--", ">", "0", ";"...
Gets a long from the given byte array starting at the given byte array index and continuing for remainder (rem) bytes. The bytes are extracted in little-endian order. There is no limit checking. @param bArr The given input byte array. @param index Zero-based index from the start of the byte array. @param rem Remainder...
[ "Gets", "a", "long", "from", "the", "given", "byte", "array", "starting", "at", "the", "given", "byte", "array", "index", "and", "continuing", "for", "remainder", "(", "rem", ")", "bytes", ".", "The", "bytes", "are", "extracted", "in", "little", "-", "en...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hash/MurmurHash3.java#L308-L315
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java
CryptoHelper.verifySignatureFor
@Deprecated boolean verifySignatureFor(String algorithm, PublicKey publicKey, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { final Signature s = Signature.getInstance(algorithm); s.initVerify(publicKey); s.update(content...
java
@Deprecated boolean verifySignatureFor(String algorithm, PublicKey publicKey, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { final Signature s = Signature.getInstance(algorithm); s.initVerify(publicKey); s.update(content...
[ "@", "Deprecated", "boolean", "verifySignatureFor", "(", "String", "algorithm", ",", "PublicKey", "publicKey", ",", "byte", "[", "]", "contentBytes", ",", "byte", "[", "]", "signatureBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", ",",...
Verify signature using a public key. @param algorithm algorithm name. @param publicKey algorithm public key. @param contentBytes the content to which the signature applies. @param signatureBytes JWT signature. @return the signature bytes. @throws NoSuchAlgorithmException if the algorithm is not supported. @throws Inva...
[ "Verify", "signature", "using", "a", "public", "key", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java#L179-L185
JoeKerouac/utils
src/main/java/com/joe/utils/common/JMail.java
JMail.sendEmail
public Future<Boolean> sendEmail(EmailBody body, String to, String title, FilePart[] fileParts, JMailCallback callback) { if (StringUtils.isEmpty(to) || (body == null && fileParts == null)) { logger.debug("邮件没有设置接收人或者没有正文"); execCallback(false, body, ...
java
public Future<Boolean> sendEmail(EmailBody body, String to, String title, FilePart[] fileParts, JMailCallback callback) { if (StringUtils.isEmpty(to) || (body == null && fileParts == null)) { logger.debug("邮件没有设置接收人或者没有正文"); execCallback(false, body, ...
[ "public", "Future", "<", "Boolean", ">", "sendEmail", "(", "EmailBody", "body", ",", "String", "to", ",", "String", "title", ",", "FilePart", "[", "]", "fileParts", ",", "JMailCallback", "callback", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", ...
发送带附件的邮件 @param body 邮件正文 @param to 邮件接收人 @param title 邮件标题 @param fileParts 邮件附件 @param callback 回调函数,邮件发送完毕后会执行 @return 如果发送成功则返回<code>true</code>
[ "发送带附件的邮件" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/JMail.java#L152-L162
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/RPC.java
RPC.getProtocolProxy
@SuppressWarnings("unchecked") public static <T extends VersionedProtocol> ProtocolProxy<T> getProtocolProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, ...
java
@SuppressWarnings("unchecked") public static <T extends VersionedProtocol> ProtocolProxy<T> getProtocolProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "VersionedProtocol", ">", "ProtocolProxy", "<", "T", ">", "getProtocolProxy", "(", "Class", "<", "T", ">", "protocol", ",", "long", "clientVersion", ",", "InetSocketAddr...
Construct a client-side proxy that implements the named protocol, talking to a server at the named address. @param protocol protocol @param clientVersion client's version @param addr server address @param ticket security ticket @param conf configuration @param factory socket factory @param rpcTimeout max time for each...
[ "Construct", "a", "client", "-", "side", "proxy", "that", "implements", "the", "named", "protocol", "talking", "to", "a", "server", "at", "the", "named", "address", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/RPC.java#L587-L621
threerings/nenya
core/src/main/java/com/threerings/media/tile/TrimmedObjectTileSet.java
TrimmedObjectTileSet.trimObjectTileSet
public static TrimmedObjectTileSet trimObjectTileSet ( ObjectTileSet source, OutputStream destImage) throws IOException { return trimObjectTileSet(source, destImage, FastImageIO.FILE_SUFFIX); }
java
public static TrimmedObjectTileSet trimObjectTileSet ( ObjectTileSet source, OutputStream destImage) throws IOException { return trimObjectTileSet(source, destImage, FastImageIO.FILE_SUFFIX); }
[ "public", "static", "TrimmedObjectTileSet", "trimObjectTileSet", "(", "ObjectTileSet", "source", ",", "OutputStream", "destImage", ")", "throws", "IOException", "{", "return", "trimObjectTileSet", "(", "source", ",", "destImage", ",", "FastImageIO", ".", "FILE_SUFFIX", ...
Convenience function to trim the tile set to a file using FastImageIO.
[ "Convenience", "function", "to", "trim", "the", "tile", "set", "to", "a", "file", "using", "FastImageIO", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/TrimmedObjectTileSet.java#L174-L179
google/flatbuffers
java/com/google/flatbuffers/Table.java
Table.__vector_in_bytebuffer
protected ByteBuffer __vector_in_bytebuffer(ByteBuffer bb, int vector_offset, int elem_size) { int o = this.__offset(vector_offset); if (o == 0) return null; int vectorstart = __vector(o); bb.rewind(); bb.limit(vectorstart + __vector_len(o) * elem_size); bb.position(vectorstart); return bb; ...
java
protected ByteBuffer __vector_in_bytebuffer(ByteBuffer bb, int vector_offset, int elem_size) { int o = this.__offset(vector_offset); if (o == 0) return null; int vectorstart = __vector(o); bb.rewind(); bb.limit(vectorstart + __vector_len(o) * elem_size); bb.position(vectorstart); return bb; ...
[ "protected", "ByteBuffer", "__vector_in_bytebuffer", "(", "ByteBuffer", "bb", ",", "int", "vector_offset", ",", "int", "elem_size", ")", "{", "int", "o", "=", "this", ".", "__offset", "(", "vector_offset", ")", ";", "if", "(", "o", "==", "0", ")", "return"...
Initialize vector as a ByteBuffer. This is more efficient than using duplicate, since it doesn't copy the data nor allocattes a new {@link ByteBuffer}, creating no garbage to be collected. @param bb The {@link ByteBuffer} for the array @param vector_offset The position of the vector in the byte buffer @param elem_siz...
[ "Initialize", "vector", "as", "a", "ByteBuffer", "." ]
train
https://github.com/google/flatbuffers/blob/6cc30b3272d79c85db7d4871ac0aa69541dc89de/java/com/google/flatbuffers/Table.java#L154-L162
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPublishScheduled.java
CmsPublishScheduled.actionUpdate
public void actionUpdate() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { // prepare the publish scheduled resource performDialogOpe...
java
public void actionUpdate() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { // prepare the publish scheduled resource performDialogOpe...
[ "public", "void", "actionUpdate", "(", ")", "throws", "JspException", "{", "// save initialized instance of this class in request attribute for included sub-elements", "getJsp", "(", ")", ".", "getRequest", "(", ")", ".", "setAttribute", "(", "SESSION_WORKPLACE_CLASS", ",", ...
Performs the resource operation, will be called by the JSP page.<p> @throws JspException if problems including sub-elements occur
[ "Performs", "the", "resource", "operation", "will", "be", "called", "by", "the", "JSP", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPublishScheduled.java#L131-L145
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java
JobState.toJson
public void toJson(JsonWriter jsonWriter, boolean keepConfig) throws IOException { jsonWriter.beginObject(); writeStateSummary(jsonWriter); jsonWriter.name("task states"); jsonWriter.beginArray(); for (TaskState taskState : this.taskStates.values()) { taskState.toJson(jsonWriter, keepCo...
java
public void toJson(JsonWriter jsonWriter, boolean keepConfig) throws IOException { jsonWriter.beginObject(); writeStateSummary(jsonWriter); jsonWriter.name("task states"); jsonWriter.beginArray(); for (TaskState taskState : this.taskStates.values()) { taskState.toJson(jsonWriter, keepCo...
[ "public", "void", "toJson", "(", "JsonWriter", "jsonWriter", ",", "boolean", "keepConfig", ")", "throws", "IOException", "{", "jsonWriter", ".", "beginObject", "(", ")", ";", "writeStateSummary", "(", "jsonWriter", ")", ";", "jsonWriter", ".", "name", "(", "\"...
Convert this {@link JobState} to a json document. @param jsonWriter a {@link com.google.gson.stream.JsonWriter} used to write the json document @param keepConfig whether to keep all configuration properties @throws IOException
[ "Convert", "this", "{", "@link", "JobState", "}", "to", "a", "json", "document", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java#L585-L606
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java
JacksonDBCollection.updateMulti
public WriteResult<T, K> updateMulti(T query, T object) throws MongoException { return update(query, object, false, true); }
java
public WriteResult<T, K> updateMulti(T query, T object) throws MongoException { return update(query, object, false, true); }
[ "public", "WriteResult", "<", "T", ",", "K", ">", "updateMulti", "(", "T", "query", ",", "T", "object", ")", "throws", "MongoException", "{", "return", "update", "(", "query", ",", "object", ",", "false", ",", "true", ")", ";", "}" ]
calls {@link DBCollection#update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean)} with upsert=false and multi=true @param query search query for old object to update @param object object with which to update <tt>query</tt> @return The result @throws MongoException If an error occurred
[ "calls", "{", "@link", "DBCollection#update", "(", "com", ".", "mongodb", ".", "DBObject", "com", ".", "mongodb", ".", "DBObject", "boolean", "boolean", ")", "}", "with", "upsert", "=", "false", "and", "multi", "=", "true" ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java#L507-L509
palatable/lambda
src/main/java/com/jnape/palatable/lambda/optics/lenses/MapLens.java
MapLens.mappingValues
public static <K, V, V2> Lens.Simple<Map<K, V>, Map<K, V2>> mappingValues(Iso<V, V, V2, V2> iso) { return simpleLens(m -> toMap(HashMap::new, map(t -> t.biMapR(view(iso)), map(Tuple2::fromEntry, m.entrySet()))), (s, b) -> view(mappingValues(iso.mirror()), b)); }
java
public static <K, V, V2> Lens.Simple<Map<K, V>, Map<K, V2>> mappingValues(Iso<V, V, V2, V2> iso) { return simpleLens(m -> toMap(HashMap::new, map(t -> t.biMapR(view(iso)), map(Tuple2::fromEntry, m.entrySet()))), (s, b) -> view(mappingValues(iso.mirror()), b)); }
[ "public", "static", "<", "K", ",", "V", ",", "V2", ">", "Lens", ".", "Simple", "<", "Map", "<", "K", ",", "V", ">", ",", "Map", "<", "K", ",", "V2", ">", ">", "mappingValues", "(", "Iso", "<", "V", ",", "V", ",", "V2", ",", "V2", ">", "is...
A lens that focuses on a map while mapping its values with the mapping {@link Iso}. <p> Note that for this lens to be lawful, <code>iso</code> must be lawful. @param iso the mapping {@link Iso} @param <K> the key type @param <V> the unfocused map value type @param <V2> the focused map value type @return a lens that...
[ "A", "lens", "that", "focuses", "on", "a", "map", "while", "mapping", "its", "values", "with", "the", "mapping", "{", "@link", "Iso", "}", ".", "<p", ">", "Note", "that", "for", "this", "lens", "to", "be", "lawful", "<code", ">", "iso<", "/", "code",...
train
https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/optics/lenses/MapLens.java#L191-L194
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java
Logging.debugFinest
public void debugFinest(CharSequence message, Throwable e) { log(Level.FINEST, message, e); }
java
public void debugFinest(CharSequence message, Throwable e) { log(Level.FINEST, message, e); }
[ "public", "void", "debugFinest", "(", "CharSequence", "message", ",", "Throwable", "e", ")", "{", "log", "(", "Level", ".", "FINEST", ",", "message", ",", "e", ")", ";", "}" ]
Log a message at the 'finest' debugging level. You should check isDebugging() before building the message. @param message Informational log message. @param e Exception
[ "Log", "a", "message", "at", "the", "finest", "debugging", "level", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java#L537-L539
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.get
public JsonElement get(String name) throws JsonException { JsonElement result = nameValuePairs.get(name); if (result == null) { throw new JsonException("No value for " + name + ", in: " + this.toString()); } return result; }
java
public JsonElement get(String name) throws JsonException { JsonElement result = nameValuePairs.get(name); if (result == null) { throw new JsonException("No value for " + name + ", in: " + this.toString()); } return result; }
[ "public", "JsonElement", "get", "(", "String", "name", ")", "throws", "JsonException", "{", "JsonElement", "result", "=", "nameValuePairs", ".", "get", "(", "name", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "JsonException", "("...
Returns the value mapped by {@code name}, or throws if no such mapping exists. @throws JsonException if no such mapping exists.
[ "Returns", "the", "value", "mapped", "by", "{", "@code", "name", "}", "or", "throws", "if", "no", "such", "mapping", "exists", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L332-L338
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java
IntegrationResponse.withResponseParameters
public IntegrationResponse withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
java
public IntegrationResponse withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
[ "public", "IntegrationResponse", "withResponseParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseParameters", ")", "{", "setResponseParameters", "(", "responseParameters", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration r...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "response", "parameters", "that", "are", "passed", "to", "the", "method", "response", "from", "the", "backend", ".", "The", "key", "is", "a", "method", "response", "header", "parameter", "name", "an...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java#L382-L385
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java
CommerceOrderItemPersistenceImpl.findAll
@Override public List<CommerceOrderItem> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceOrderItem> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderItem", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce order items. @return the commerce order items
[ "Returns", "all", "the", "commerce", "order", "items", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java#L3667-L3670
square/flow
flow/src/main/java/flow/Flow.java
Flow.replaceHistory
public void replaceHistory(@NonNull final Object key, @NonNull final Direction direction) { setHistory(getHistory().buildUpon().clear().push(key).build(), direction); }
java
public void replaceHistory(@NonNull final Object key, @NonNull final Direction direction) { setHistory(getHistory().buildUpon().clear().push(key).build(), direction); }
[ "public", "void", "replaceHistory", "(", "@", "NonNull", "final", "Object", "key", ",", "@", "NonNull", "final", "Direction", "direction", ")", "{", "setHistory", "(", "getHistory", "(", ")", ".", "buildUpon", "(", ")", ".", "clear", "(", ")", ".", "push...
Replaces the history with the given key and dispatches in the given direction.
[ "Replaces", "the", "history", "with", "the", "given", "key", "and", "dispatches", "in", "the", "given", "direction", "." ]
train
https://github.com/square/flow/blob/1656288d1cb4a92dfbcff8276f4d7f9e3390419b/flow/src/main/java/flow/Flow.java#L208-L210
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/LocationUtil.java
LocationUtil.getHostDiscoveryForLocation
public static HostDiscovery getHostDiscoveryForLocation(URI location, Optional<CuratorFramework> curator, String serviceName, MetricRegistry metricRegistry) { checkArgument(getLocationType(location) == LocationType.EMO_HOST_DISCOVERY, "Location does not use host discovery"); Optional<List<String>> hosts...
java
public static HostDiscovery getHostDiscoveryForLocation(URI location, Optional<CuratorFramework> curator, String serviceName, MetricRegistry metricRegistry) { checkArgument(getLocationType(location) == LocationType.EMO_HOST_DISCOVERY, "Location does not use host discovery"); Optional<List<String>> hosts...
[ "public", "static", "HostDiscovery", "getHostDiscoveryForLocation", "(", "URI", "location", ",", "Optional", "<", "CuratorFramework", ">", "curator", ",", "String", "serviceName", ",", "MetricRegistry", "metricRegistry", ")", "{", "checkArgument", "(", "getLocationType"...
Returns the HostDiscovery for a given location. The curator should come from a previous call to {@link #getCuratorForLocation(java.net.URI)} to the same location.
[ "Returns", "the", "HostDiscovery", "for", "a", "given", "location", ".", "The", "curator", "should", "come", "from", "a", "previous", "call", "to", "{" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/LocationUtil.java#L264-L273
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java
AudioLoader.getStreamingAudio
public static Audio getStreamingAudio(String format, URL url) throws IOException { init(); if (format.equals(OGG)) { return SoundStore.get().getOggStream(url); } if (format.equals(MOD)) { return SoundStore.get().getMOD(url.openStream()); } if (format.equals(XM)) { return SoundStore.get...
java
public static Audio getStreamingAudio(String format, URL url) throws IOException { init(); if (format.equals(OGG)) { return SoundStore.get().getOggStream(url); } if (format.equals(MOD)) { return SoundStore.get().getMOD(url.openStream()); } if (format.equals(XM)) { return SoundStore.get...
[ "public", "static", "Audio", "getStreamingAudio", "(", "String", "format", ",", "URL", "url", ")", "throws", "IOException", "{", "init", "(", ")", ";", "if", "(", "format", ".", "equals", "(", "OGG", ")", ")", "{", "return", "SoundStore", ".", "get", "...
Get audio data in a playable state by setting up a stream that can be piped into OpenAL - i.e. streaming audio @param format The format of the audio to be loaded (something like "XM" or "OGG") @param url The location of the data that should be streamed @return An object representing the audio data @throws IOException ...
[ "Get", "audio", "data", "in", "a", "playable", "state", "by", "setting", "up", "a", "stream", "that", "can", "be", "piped", "into", "OpenAL", "-", "i", ".", "e", ".", "streaming", "audio" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java#L72-L86
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.pauseSession
public PauseSessionResponse pauseSession(PauseSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(...
java
public PauseSessionResponse pauseSession(PauseSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(...
[ "public", "PauseSessionResponse", "pauseSession", "(", "PauseSessionRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSessionId", "(", ")", ",", ...
Pause your live session by live session id. @param request The request object containing all parameters for pausing live session. @return the response
[ "Pause", "your", "live", "session", "by", "live", "session", "id", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L771-L778
bazaarvoice/emodb
common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java
StashReader.getTableMetadata
public StashTableMetadata getTableMetadata(String table) throws StashNotAvailableException, TableNotStashedException { ImmutableList.Builder<StashFileMetadata> filesBuilder = ImmutableList.builder(); Iterator<S3ObjectSummary> objectSummaries = getS3ObjectSummariesForTable(table); wh...
java
public StashTableMetadata getTableMetadata(String table) throws StashNotAvailableException, TableNotStashedException { ImmutableList.Builder<StashFileMetadata> filesBuilder = ImmutableList.builder(); Iterator<S3ObjectSummary> objectSummaries = getS3ObjectSummariesForTable(table); wh...
[ "public", "StashTableMetadata", "getTableMetadata", "(", "String", "table", ")", "throws", "StashNotAvailableException", ",", "TableNotStashedException", "{", "ImmutableList", ".", "Builder", "<", "StashFileMetadata", ">", "filesBuilder", "=", "ImmutableList", ".", "build...
Gets the metadata for a single table in this stash. This is similar to getting the splits for the table except that it exposes lower level information about the underlying S3 files. For clients who will use their own system for reading the files from S3, such as source files for a map-reduce job, this method provides...
[ "Gets", "the", "metadata", "for", "a", "single", "table", "in", "this", "stash", ".", "This", "is", "similar", "to", "getting", "the", "splits", "for", "the", "table", "except", "that", "it", "exposes", "lower", "level", "information", "about", "the", "und...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java#L280-L297
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java
BaseApplet.makeRemoteSession
public RemoteSession makeRemoteSession(RemoteSession parentSessionObject, String strSessionClass) { RemoteTask server = (RemoteTask)this.getRemoteTask(); try { synchronized (server) { // In case this is called from another task if (parentSessionObject == n...
java
public RemoteSession makeRemoteSession(RemoteSession parentSessionObject, String strSessionClass) { RemoteTask server = (RemoteTask)this.getRemoteTask(); try { synchronized (server) { // In case this is called from another task if (parentSessionObject == n...
[ "public", "RemoteSession", "makeRemoteSession", "(", "RemoteSession", "parentSessionObject", ",", "String", "strSessionClass", ")", "{", "RemoteTask", "server", "=", "(", "RemoteTask", ")", "this", ".", "getRemoteTask", "(", ")", ";", "try", "{", "synchronized", "...
Create this session with this class name at the remote server. @param parentSessionObject The (optional) parent session. @param strSessionClass The class name of the remote session to create. @return The new remote session (or null if not found).
[ "Create", "this", "session", "with", "this", "class", "name", "at", "the", "remote", "server", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java#L1166-L1183
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/service/RunService.java
RunService.createPortMapping
public PortMapping createPortMapping(RunImageConfiguration runConfig, Properties properties) { try { return new PortMapping(runConfig.getPorts(), properties); } catch (IllegalArgumentException exp) { throw new IllegalArgumentException("Cannot parse port mapping", exp); } ...
java
public PortMapping createPortMapping(RunImageConfiguration runConfig, Properties properties) { try { return new PortMapping(runConfig.getPorts(), properties); } catch (IllegalArgumentException exp) { throw new IllegalArgumentException("Cannot parse port mapping", exp); } ...
[ "public", "PortMapping", "createPortMapping", "(", "RunImageConfiguration", "runConfig", ",", "Properties", "properties", ")", "{", "try", "{", "return", "new", "PortMapping", "(", "runConfig", ".", "getPorts", "(", ")", ",", "properties", ")", ";", "}", "catch"...
Create port mapping for a specific configuration as it can be used when creating containers @param runConfig the cun configuration @param properties properties to lookup variables @return the portmapping
[ "Create", "port", "mapping", "for", "a", "specific", "configuration", "as", "it", "can", "be", "used", "when", "creating", "containers" ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/service/RunService.java#L250-L256
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/DefaultXPathBinder.java
DefaultXPathBinder.asDate
@Override public CloseableValue<Date> asDate() { final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); return bindSingeValue(Date.class, callerClass); }
java
@Override public CloseableValue<Date> asDate() { final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); return bindSingeValue(Date.class, callerClass); }
[ "@", "Override", "public", "CloseableValue", "<", "Date", ">", "asDate", "(", ")", "{", "final", "Class", "<", "?", ">", "callerClass", "=", "ReflectionHelper", ".", "getDirectCallerClass", "(", ")", ";", "return", "bindSingeValue", "(", "Date", ".", "class"...
Evaluates the XPath as a Date value. This method is just a shortcut for as(Date.class); You probably want to specify ' using ' followed by some formatting pattern consecutive to the XPAth. @return Date value of evaluation result.
[ "Evaluates", "the", "XPath", "as", "a", "Date", "value", ".", "This", "method", "is", "just", "a", "shortcut", "for", "as", "(", "Date", ".", "class", ")", ";", "You", "probably", "want", "to", "specify", "using", "followed", "by", "some", "formatting", ...
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/DefaultXPathBinder.java#L111-L115
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Clicker.java
Clicker.clickOnScreen
public void clickOnScreen(float x, float y, View view) { boolean successfull = false; int retry = 0; SecurityException ex = null; while(!successfull && retry < 20) { long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); MotionEvent event = MotionEvent.obtain(downTime...
java
public void clickOnScreen(float x, float y, View view) { boolean successfull = false; int retry = 0; SecurityException ex = null; while(!successfull && retry < 20) { long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); MotionEvent event = MotionEvent.obtain(downTime...
[ "public", "void", "clickOnScreen", "(", "float", "x", ",", "float", "y", ",", "View", "view", ")", "{", "boolean", "successfull", "=", "false", ";", "int", "retry", "=", "0", ";", "SecurityException", "ex", "=", "null", ";", "while", "(", "!", "success...
Clicks on a given coordinate on the screen. @param x the x coordinate @param y the y coordinate
[ "Clicks", "on", "a", "given", "coordinate", "on", "the", "screen", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Clicker.java#L79-L111
js-lib-com/commons
src/main/java/js/util/Params.java
Params.GTE
public static void GTE(long parameter, long value, String name) throws IllegalArgumentException { if (parameter < value) { throw new IllegalArgumentException(String.format("%s is not greater than or equal %d.", name, value)); } }
java
public static void GTE(long parameter, long value, String name) throws IllegalArgumentException { if (parameter < value) { throw new IllegalArgumentException(String.format("%s is not greater than or equal %d.", name, value)); } }
[ "public", "static", "void", "GTE", "(", "long", "parameter", ",", "long", "value", ",", "String", "name", ")", "throws", "IllegalArgumentException", "{", "if", "(", "parameter", "<", "value", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String",...
Test if numeric parameter is greater than or equal to given threshold value. @param parameter invocation numeric parameter, @param value threshold value, @param name the name of invocation parameter. @throws IllegalArgumentException if <code>parameter</code> is not greater than or equal to threshold value.
[ "Test", "if", "numeric", "parameter", "is", "greater", "than", "or", "equal", "to", "given", "threshold", "value", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Params.java#L387-L391
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Popups.java
Popups.centerOn
public static <T extends PopupPanel> T centerOn (T popup, Widget centerOn) { return centerOn(popup, centerOn.getAbsoluteTop() + centerOn.getOffsetHeight()/2); }
java
public static <T extends PopupPanel> T centerOn (T popup, Widget centerOn) { return centerOn(popup, centerOn.getAbsoluteTop() + centerOn.getOffsetHeight()/2); }
[ "public", "static", "<", "T", "extends", "PopupPanel", ">", "T", "centerOn", "(", "T", "popup", ",", "Widget", "centerOn", ")", "{", "return", "centerOn", "(", "popup", ",", "centerOn", ".", "getAbsoluteTop", "(", ")", "+", "centerOn", ".", "getOffsetHeigh...
Centers the supplied vertically on the supplied trigger widget. The popup's showing state will be preserved.
[ "Centers", "the", "supplied", "vertically", "on", "the", "supplied", "trigger", "widget", ".", "The", "popup", "s", "showing", "state", "will", "be", "preserved", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Popups.java#L229-L232
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.requeuePendingTasksByTaskType
public String requeuePendingTasksByTaskType(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); return postForEntity("tasks/queue/requeue/{taskType}", null, null, String.class, taskType); }
java
public String requeuePendingTasksByTaskType(String taskType) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); return postForEntity("tasks/queue/requeue/{taskType}", null, null, String.class, taskType); }
[ "public", "String", "requeuePendingTasksByTaskType", "(", "String", "taskType", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ";", "return", "postForEntity", "("...
Requeue pending tasks of a specific task type @return returns the number of tasks that have been requeued
[ "Requeue", "pending", "tasks", "of", "a", "specific", "task", "type" ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L373-L376
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/process/EulerSchemeFromProcessModel.java
EulerSchemeFromProcessModel.getProcessValue
@Override public RandomVariable getProcessValue(int timeIndex, int componentIndex) { // Thread safe lazy initialization synchronized(this) { if (discreteProcess == null || discreteProcess.length == 0) { doPrecalculateProcess(); } } if(discreteProcess[timeIndex][componentIndex] == null) { throw ne...
java
@Override public RandomVariable getProcessValue(int timeIndex, int componentIndex) { // Thread safe lazy initialization synchronized(this) { if (discreteProcess == null || discreteProcess.length == 0) { doPrecalculateProcess(); } } if(discreteProcess[timeIndex][componentIndex] == null) { throw ne...
[ "@", "Override", "public", "RandomVariable", "getProcessValue", "(", "int", "timeIndex", ",", "int", "componentIndex", ")", "{", "// Thread safe lazy initialization", "synchronized", "(", "this", ")", "{", "if", "(", "discreteProcess", "==", "null", "||", "discreteP...
This method returns the realization of the process at a certain time index. @param timeIndex Time index at which the process should be observed @return A vector of process realizations (on path)
[ "This", "method", "returns", "the", "realization", "of", "the", "process", "at", "a", "certain", "time", "index", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/process/EulerSchemeFromProcessModel.java#L97-L112
FXMisc/WellBehavedFX
src/main/java/org/fxmisc/wellbehaved/event/Nodes.java
Nodes.setInputMapUnsafe
private static void setInputMapUnsafe(Node node, InputMap<?> im) { getProperties(node).put(P_INPUTMAP, im); }
java
private static void setInputMapUnsafe(Node node, InputMap<?> im) { getProperties(node).put(P_INPUTMAP, im); }
[ "private", "static", "void", "setInputMapUnsafe", "(", "Node", "node", ",", "InputMap", "<", "?", ">", "im", ")", "{", "getProperties", "(", "node", ")", ".", "put", "(", "P_INPUTMAP", ",", "im", ")", ";", "}" ]
Expects a {@link #init(Node)} call with the given node before this one is called
[ "Expects", "a", "{" ]
train
https://github.com/FXMisc/WellBehavedFX/blob/ca889734481f5439655ca8deb6f742964b5654b0/src/main/java/org/fxmisc/wellbehaved/event/Nodes.java#L151-L153
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/WebTarget.java
WebTarget.getUri
public Uri getUri() { if (uri == null) { try { uri = uriBuilder.build(); } catch (Exception e) { throw new IllegalStateException("Could not build the URI.", e); } } return uri; }
java
public Uri getUri() { if (uri == null) { try { uri = uriBuilder.build(); } catch (Exception e) { throw new IllegalStateException("Could not build the URI.", e); } } return uri; }
[ "public", "Uri", "getUri", "(", ")", "{", "if", "(", "uri", "==", "null", ")", "{", "try", "{", "uri", "=", "uriBuilder", ".", "build", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "IllegalStateException", "(", "\"C...
Get the URI identifying the resource. @return the resource URI. @throws IllegalStateException if the URI could not be built from the current state of the resource target.
[ "Get", "the", "URI", "identifying", "the", "resource", "." ]
train
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/WebTarget.java#L112-L121
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java
OmemoService.isStale
static boolean isStale(OmemoDevice userDevice, OmemoDevice subject, Date lastReceipt, int maxAgeHours) { if (userDevice.equals(subject)) { return false; } if (lastReceipt == null) { return false; } long maxAgeMillis = MILLIS_PER_HOUR * maxAgeHours; ...
java
static boolean isStale(OmemoDevice userDevice, OmemoDevice subject, Date lastReceipt, int maxAgeHours) { if (userDevice.equals(subject)) { return false; } if (lastReceipt == null) { return false; } long maxAgeMillis = MILLIS_PER_HOUR * maxAgeHours; ...
[ "static", "boolean", "isStale", "(", "OmemoDevice", "userDevice", ",", "OmemoDevice", "subject", ",", "Date", "lastReceipt", ",", "int", "maxAgeHours", ")", "{", "if", "(", "userDevice", ".", "equals", "(", "subject", ")", ")", "{", "return", "false", ";", ...
Determine, whether another one of *our* devices is stale or not. @param userDevice our omemoDevice @param subject another one of our devices @param lastReceipt date of last received message from that device @param maxAgeHours threshold @return staleness
[ "Determine", "whether", "another", "one", "of", "*", "our", "*", "devices", "is", "stale", "or", "not", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java#L993-L1006
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Setup.java
Setup.getConfigClass
@SuppressWarnings("unchecked") public final <T> Class<T> getConfigClass(ClassLoader classLoader) { if (clazz == null) { final FeaturableConfig config = FeaturableConfig.imports(this); try { clazz = classLoader.loadClass(config.getClassN...
java
@SuppressWarnings("unchecked") public final <T> Class<T> getConfigClass(ClassLoader classLoader) { if (clazz == null) { final FeaturableConfig config = FeaturableConfig.imports(this); try { clazz = classLoader.loadClass(config.getClassN...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "<", "T", ">", "Class", "<", "T", ">", "getConfigClass", "(", "ClassLoader", "classLoader", ")", "{", "if", "(", "clazz", "==", "null", ")", "{", "final", "FeaturableConfig", "config", ...
Get the class mapped to the setup. Lazy call (load class only first time, and keep its reference after). @param <T> The element type. @param classLoader The class loader used. @return The class mapped to the setup. @throws LionEngineException If the class was not found by the class loader.
[ "Get", "the", "class", "mapped", "to", "the", "setup", ".", "Lazy", "call", "(", "load", "class", "only", "first", "time", "and", "keep", "its", "reference", "after", ")", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Setup.java#L96-L112
landawn/AbacusUtil
src/com/landawn/abacus/util/stream/Stream.java
Stream.parallelZip
public static <A, B, C, R> Stream<R> parallelZip(final Stream<A> a, final Stream<B> b, final Stream<C> c, final A valueForNoneA, final B valueForNoneB, final C valueForNoneC, final TriFunction<? super A, ? super B, ? super C, R> zipFunction) { return parallelZip(a, b, c, valueForNoneA, valueForNon...
java
public static <A, B, C, R> Stream<R> parallelZip(final Stream<A> a, final Stream<B> b, final Stream<C> c, final A valueForNoneA, final B valueForNoneB, final C valueForNoneC, final TriFunction<? super A, ? super B, ? super C, R> zipFunction) { return parallelZip(a, b, c, valueForNoneA, valueForNon...
[ "public", "static", "<", "A", ",", "B", ",", "C", ",", "R", ">", "Stream", "<", "R", ">", "parallelZip", "(", "final", "Stream", "<", "A", ">", "a", ",", "final", "Stream", "<", "B", ">", "b", ",", "final", "Stream", "<", "C", ">", "c", ",", ...
Put the stream in try-catch to stop the back-end reading thread if error happens <br /> <code> try (Stream<Integer> stream = Stream.parallelZip(a, b, zipFunction)) { stream.forEach(N::println); } </code> @param a @param b @param c @param valueForNoneA @param valueForNoneB @param valueForNoneC @param zipFunction @retur...
[ "Put", "the", "stream", "in", "try", "-", "catch", "to", "stop", "the", "back", "-", "end", "reading", "thread", "if", "error", "happens", "<br", "/", ">", "<code", ">", "try", "(", "Stream<Integer", ">", "stream", "=", "Stream", ".", "parallelZip", "(...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/stream/Stream.java#L8491-L8494
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/dependency/Vulnerability.java
Vulnerability.addReference
public void addReference(String referenceSource, String referenceName, String referenceUrl) { final Reference ref = new Reference(); ref.setSource(referenceSource); ref.setName(referenceName); ref.setUrl(referenceUrl); this.references.add(ref); }
java
public void addReference(String referenceSource, String referenceName, String referenceUrl) { final Reference ref = new Reference(); ref.setSource(referenceSource); ref.setName(referenceName); ref.setUrl(referenceUrl); this.references.add(ref); }
[ "public", "void", "addReference", "(", "String", "referenceSource", ",", "String", "referenceName", ",", "String", "referenceUrl", ")", "{", "final", "Reference", "ref", "=", "new", "Reference", "(", ")", ";", "ref", ".", "setSource", "(", "referenceSource", "...
Adds a reference. @param referenceSource the source of the reference @param referenceName the referenceName of the reference @param referenceUrl the url of the reference
[ "Adds", "a", "reference", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/dependency/Vulnerability.java#L215-L221
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/MethodUtils.java
MethodUtils.invokeMethod
public static Object invokeMethod(Object object, String methodName, Object[] args, Class<?>[] paramTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (args == null) { args = EMPTY_OBJECT_ARRAY; } if (paramTypes == null) { ...
java
public static Object invokeMethod(Object object, String methodName, Object[] args, Class<?>[] paramTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (args == null) { args = EMPTY_OBJECT_ARRAY; } if (paramTypes == null) { ...
[ "public", "static", "Object", "invokeMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Object", "[", "]", "args", ",", "Class", "<", "?", ">", "[", "]", "paramTypes", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ","...
<p>Invoke a named method whose parameter type matches the object type.</p> <p>The behaviour of this method is less deterministic than {@link #invokeExactMethod(Object object,String methodName,Object[] args,Class[] paramTypes)}. It loops through all methods with names that match and then executes the first it finds wit...
[ "<p", ">", "Invoke", "a", "named", "method", "whose", "parameter", "type", "matches", "the", "object", "type", ".", "<", "/", "p", ">" ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/MethodUtils.java#L257-L270
molgenis/molgenis
molgenis-api-data/src/main/java/org/molgenis/api/data/v1/RestController.java
RestController.retrieveEntity
@GetMapping(value = "/{entityTypeId}/{id}", produces = APPLICATION_JSON_VALUE) public Map<String, Object> retrieveEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("id") String untypedId, @RequestParam(value = "attributes", required = false) String[] attributes, @Request...
java
@GetMapping(value = "/{entityTypeId}/{id}", produces = APPLICATION_JSON_VALUE) public Map<String, Object> retrieveEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("id") String untypedId, @RequestParam(value = "attributes", required = false) String[] attributes, @Request...
[ "@", "GetMapping", "(", "value", "=", "\"/{entityTypeId}/{id}\"", ",", "produces", "=", "APPLICATION_JSON_VALUE", ")", "public", "Map", "<", "String", ",", "Object", ">", "retrieveEntity", "(", "@", "PathVariable", "(", "\"entityTypeId\"", ")", "String", "entityTy...
Get's an entity by it's id <p>Examples: <p>/api/v1/person/99 Retrieves a person with id 99
[ "Get", "s", "an", "entity", "by", "it", "s", "id" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-api-data/src/main/java/org/molgenis/api/data/v1/RestController.java#L256-L273
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.listNextAsync
public ServiceFuture<List<CloudJob>> listNextAsync(final String nextPageLink, final JobListNextOptions jobListNextOptions, final ServiceFuture<List<CloudJob>> serviceFuture, final ListOperationCallback<CloudJob> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listNextSinglePageA...
java
public ServiceFuture<List<CloudJob>> listNextAsync(final String nextPageLink, final JobListNextOptions jobListNextOptions, final ServiceFuture<List<CloudJob>> serviceFuture, final ListOperationCallback<CloudJob> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listNextSinglePageA...
[ "public", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "listNextAsync", "(", "final", "String", "nextPageLink", ",", "final", "JobListNextOptions", "jobListNextOptions", ",", "final", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "serviceFut...
Lists all of the jobs in the specified account. @param nextPageLink The NextLink from the previous successful call to List operation. @param jobListNextOptions Additional parameters for the operation @param serviceFuture the ServiceFuture object tracking the Retrofit calls @param serviceCallback the async ServiceCallb...
[ "Lists", "all", "of", "the", "jobs", "in", "the", "specified", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L3447-L3457
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java
VisualizeImageData.grayMagnitude
public static void grayMagnitude(GrayS32 input , int maxAbsValue , Bitmap output , byte[] storage) { shapeShape(input, output); if( storage == null ) storage = declareStorage(output,null); if( maxAbsValue < 0 ) maxAbsValue = ImageStatistics.maxAbs(input); int indexDst = 0; for( int y = 0; y < input....
java
public static void grayMagnitude(GrayS32 input , int maxAbsValue , Bitmap output , byte[] storage) { shapeShape(input, output); if( storage == null ) storage = declareStorage(output,null); if( maxAbsValue < 0 ) maxAbsValue = ImageStatistics.maxAbs(input); int indexDst = 0; for( int y = 0; y < input....
[ "public", "static", "void", "grayMagnitude", "(", "GrayS32", "input", ",", "int", "maxAbsValue", ",", "Bitmap", "output", ",", "byte", "[", "]", "storage", ")", "{", "shapeShape", "(", "input", ",", "output", ")", ";", "if", "(", "storage", "==", "null",...
Renders the image using its gray magnitude @param input (Input) Image image @param maxAbsValue (Input) Largest absolute value of a pixel in the image @param output (Output) Bitmap ARGB_8888 image. @param storage Optional working buffer for Bitmap image.
[ "Renders", "the", "image", "using", "its", "gray", "magnitude" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L176-L199
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java
SpecNodeWithRelationships.addRelationshipToTarget
public void addRelationshipToTarget(final SpecTopic topic, final RelationshipType type) { final TargetRelationship relationship = new TargetRelationship(this, topic, type); topicTargetRelationships.add(relationship); relationships.add(relationship); }
java
public void addRelationshipToTarget(final SpecTopic topic, final RelationshipType type) { final TargetRelationship relationship = new TargetRelationship(this, topic, type); topicTargetRelationships.add(relationship); relationships.add(relationship); }
[ "public", "void", "addRelationshipToTarget", "(", "final", "SpecTopic", "topic", ",", "final", "RelationshipType", "type", ")", "{", "final", "TargetRelationship", "relationship", "=", "new", "TargetRelationship", "(", "this", ",", "topic", ",", "type", ")", ";", ...
Add a relationship to the topic. @param topic The topic that is to be related to. @param type The type of the relationship.
[ "Add", "a", "relationship", "to", "the", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L82-L86
cogroo/cogroo4
cogroo-eval/GramEval/src/main/java/cogroo/uima/XmiWriterCasConsumer.java
XmiWriterCasConsumer.writeXmi
private void writeXmi(CAS aCas, File name, String modelFileName) throws IOException, SAXException { FileOutputStream out = null; try { // write XMI out = new FileOutputStream(name); XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem()); XMLSerializer xmlSer = new XMLSe...
java
private void writeXmi(CAS aCas, File name, String modelFileName) throws IOException, SAXException { FileOutputStream out = null; try { // write XMI out = new FileOutputStream(name); XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem()); XMLSerializer xmlSer = new XMLSe...
[ "private", "void", "writeXmi", "(", "CAS", "aCas", ",", "File", "name", ",", "String", "modelFileName", ")", "throws", "IOException", ",", "SAXException", "{", "FileOutputStream", "out", "=", "null", ";", "try", "{", "// write XMI", "out", "=", "new", "FileO...
Serialize a CAS to a file in XMI format @param aCas CAS to serialize @param name output file @throws SAXException @throws Exception @throws ResourceProcessException
[ "Serialize", "a", "CAS", "to", "a", "file", "in", "XMI", "format" ]
train
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/GramEval/src/main/java/cogroo/uima/XmiWriterCasConsumer.java#L147-L162
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java
ImageClient.deprecateImage
@BetaApi public final Operation deprecateImage(String image, DeprecationStatus deprecationStatusResource) { DeprecateImageHttpRequest request = DeprecateImageHttpRequest.newBuilder() .setImage(image) .setDeprecationStatusResource(deprecationStatusResource) .build(); ...
java
@BetaApi public final Operation deprecateImage(String image, DeprecationStatus deprecationStatusResource) { DeprecateImageHttpRequest request = DeprecateImageHttpRequest.newBuilder() .setImage(image) .setDeprecationStatusResource(deprecationStatusResource) .build(); ...
[ "@", "BetaApi", "public", "final", "Operation", "deprecateImage", "(", "String", "image", ",", "DeprecationStatus", "deprecationStatusResource", ")", "{", "DeprecateImageHttpRequest", "request", "=", "DeprecateImageHttpRequest", ".", "newBuilder", "(", ")", ".", "setIma...
Sets the deprecation status of an image. <p>If an empty request body is given, clears the deprecation status instead. <p>Sample code: <pre><code> try (ImageClient imageClient = ImageClient.create()) { ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]"); DeprecationStatus deprecationStatu...
[ "Sets", "the", "deprecation", "status", "of", "an", "image", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java#L302-L311
BlueBrain/bluima
utils/pdf_glyph_mapping/src/main/java/org/xmlcml/pdf2svg/GlyphCorrector.java
GlyphCorrector.codePointConversion
public int codePointConversion(String fontName, int codePoint) { NonStandardFontFamily nonStandardFontFamily = get(fontName); if (nonStandardFontFamily == null) return codePoint; CodePointSet codePointSet = nonStandardFontFamily.getCodePointSet(); if (codePointSet == null) ...
java
public int codePointConversion(String fontName, int codePoint) { NonStandardFontFamily nonStandardFontFamily = get(fontName); if (nonStandardFontFamily == null) return codePoint; CodePointSet codePointSet = nonStandardFontFamily.getCodePointSet(); if (codePointSet == null) ...
[ "public", "int", "codePointConversion", "(", "String", "fontName", ",", "int", "codePoint", ")", "{", "NonStandardFontFamily", "nonStandardFontFamily", "=", "get", "(", "fontName", ")", ";", "if", "(", "nonStandardFontFamily", "==", "null", ")", "return", "codePoi...
Takes in argument a codepoint. If for the given police the codepoint doesn't correspond to what the font actually displays, the conversion is made. Otherwise, the old codepoint is return. @param fontName name of the font of the character in the pdf @param oldCodePoint unicode point in the original pdf @return
[ "Takes", "in", "argument", "a", "codepoint", ".", "If", "for", "the", "given", "police", "the", "codepoint", "doesn", "t", "correspond", "to", "what", "the", "font", "actually", "displays", "the", "conversion", "is", "made", ".", "Otherwise", "the", "old", ...
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/utils/pdf_glyph_mapping/src/main/java/org/xmlcml/pdf2svg/GlyphCorrector.java#L75-L96
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_allowedNetwork_networkAccessId_PUT
public void serviceName_allowedNetwork_networkAccessId_PUT(String serviceName, Long networkAccessId, OvhAllowedNetwork body) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/allowedNetwork/{networkAccessId}"; StringBuilder sb = path(qPath, serviceName, networkAccessId); exec(qPath, "PUT", sb.toS...
java
public void serviceName_allowedNetwork_networkAccessId_PUT(String serviceName, Long networkAccessId, OvhAllowedNetwork body) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/allowedNetwork/{networkAccessId}"; StringBuilder sb = path(qPath, serviceName, networkAccessId); exec(qPath, "PUT", sb.toS...
[ "public", "void", "serviceName_allowedNetwork_networkAccessId_PUT", "(", "String", "serviceName", ",", "Long", "networkAccessId", ",", "OvhAllowedNetwork", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/allowedNetwork/{networ...
Alter this object properties REST: PUT /dedicatedCloud/{serviceName}/allowedNetwork/{networkAccessId} @param body [required] New object properties @param serviceName [required] Domain of the service @param networkAccessId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L322-L326
jnidzwetzki/bitfinex-v2-wss-api-java
src/main/java/com/github/jnidzwetzki/bitfinex/v2/symbol/BitfinexSymbols.java
BitfinexSymbols.orderBook
public static BitfinexOrderBookSymbol orderBook(final String currency, final String profitCurrency, final BitfinexOrderBookSymbol.Precision precision, final BitfinexOrderBookSymbol.Frequency frequency, final int pricePoints) { final String currencyNonNull = Objects.requireNonNull(currency).to...
java
public static BitfinexOrderBookSymbol orderBook(final String currency, final String profitCurrency, final BitfinexOrderBookSymbol.Precision precision, final BitfinexOrderBookSymbol.Frequency frequency, final int pricePoints) { final String currencyNonNull = Objects.requireNonNull(currency).to...
[ "public", "static", "BitfinexOrderBookSymbol", "orderBook", "(", "final", "String", "currency", ",", "final", "String", "profitCurrency", ",", "final", "BitfinexOrderBookSymbol", ".", "Precision", "precision", ",", "final", "BitfinexOrderBookSymbol", ".", "Frequency", "...
Returns symbol for candlestick channel @param currency of order book @param profitCurrency of order book @param precision of order book @param frequency of order book @param pricePoints in initial snapshot @return symbol
[ "Returns", "symbol", "for", "candlestick", "channel" ]
train
https://github.com/jnidzwetzki/bitfinex-v2-wss-api-java/blob/2e6adf1eb6f8cd4c8722f1619f78ab2cc3c600ee/src/main/java/com/github/jnidzwetzki/bitfinex/v2/symbol/BitfinexSymbols.java#L155-L163
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.doUnpackEntry
private static boolean doUnpackEntry(ZipFile zf, String name, File file) throws IOException { if (log.isTraceEnabled()) { log.trace("Extracting '" + zf.getName() + "' entry '" + name + "' into '" + file + "'."); } ZipEntry ze = zf.getEntry(name); if (ze == null) { return false; // entry not...
java
private static boolean doUnpackEntry(ZipFile zf, String name, File file) throws IOException { if (log.isTraceEnabled()) { log.trace("Extracting '" + zf.getName() + "' entry '" + name + "' into '" + file + "'."); } ZipEntry ze = zf.getEntry(name); if (ze == null) { return false; // entry not...
[ "private", "static", "boolean", "doUnpackEntry", "(", "ZipFile", "zf", ",", "String", "name", ",", "File", "file", ")", "throws", "IOException", "{", "if", "(", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "log", ".", "trace", "(", "\"Extracting '\"",...
Unpacks a single file from a ZIP archive to a file. @param zf ZIP file. @param name entry name. @param file target file to be created or overwritten. @return <code>true</code> if the entry was found and unpacked, <code>false</code> if the entry was not found.
[ "Unpacks", "a", "single", "file", "from", "a", "ZIP", "archive", "to", "a", "file", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L389-L417
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java
VariantMetadataManager.removeFile
public void removeFile(VariantFileMetadata file, String studyId) { // Sanity check if (file == null) { logger.error("Variant file metadata is null."); return; } removeFile(file.getId(), studyId); }
java
public void removeFile(VariantFileMetadata file, String studyId) { // Sanity check if (file == null) { logger.error("Variant file metadata is null."); return; } removeFile(file.getId(), studyId); }
[ "public", "void", "removeFile", "(", "VariantFileMetadata", "file", ",", "String", "studyId", ")", "{", "// Sanity check", "if", "(", "file", "==", "null", ")", "{", "logger", ".", "error", "(", "\"Variant file metadata is null.\"", ")", ";", "return", ";", "}...
Remove a variant file metadata of a given variant study metadata (from study ID). @param file File @param studyId Study ID
[ "Remove", "a", "variant", "file", "metadata", "of", "a", "given", "variant", "study", "metadata", "(", "from", "study", "ID", ")", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L283-L290
menacher/java-game-server
jetclient/src/main/java/org/menacheri/jetclient/util/NettyUtils.java
NettyUtils.readString
public static String readString(ChannelBuffer buffer, Charset charset) { String readString = null; if (null != buffer && buffer.readableBytes() > 2) { int length = buffer.readUnsignedShort(); readString = readString(buffer, length, charset); } return readString; }
java
public static String readString(ChannelBuffer buffer, Charset charset) { String readString = null; if (null != buffer && buffer.readableBytes() > 2) { int length = buffer.readUnsignedShort(); readString = readString(buffer, length, charset); } return readString; }
[ "public", "static", "String", "readString", "(", "ChannelBuffer", "buffer", ",", "Charset", "charset", ")", "{", "String", "readString", "=", "null", ";", "if", "(", "null", "!=", "buffer", "&&", "buffer", ".", "readableBytes", "(", ")", ">", "2", ")", "...
This method will first read an unsigned short to find the length of the string and then read the actual string based on the length. This method will also reset the reader index to end of the string @param buffer The Netty buffer containing at least one unsigned short followed by a string of similar length. @param char...
[ "This", "method", "will", "first", "read", "an", "unsigned", "short", "to", "find", "the", "length", "of", "the", "string", "and", "then", "read", "the", "actual", "string", "based", "on", "the", "length", ".", "This", "method", "will", "also", "reset", ...
train
https://github.com/menacher/java-game-server/blob/668ca49e8bd1dac43add62378cf6c22a93125d48/jetclient/src/main/java/org/menacheri/jetclient/util/NettyUtils.java#L130-L139
casmi/casmi
src/main/java/casmi/graphics/Graphics.java
Graphics.setDirectionalLight
public void setDirectionalLight(int i, Color color, boolean enableColor, float x, float y, float z) { float directionalColor[] = { (float)color.getRed(), (float)color.getGreen(), (float)color.getBlue(), (float)color.getAlpha() }; float pos[] = { x, y, z, ...
java
public void setDirectionalLight(int i, Color color, boolean enableColor, float x, float y, float z) { float directionalColor[] = { (float)color.getRed(), (float)color.getGreen(), (float)color.getBlue(), (float)color.getAlpha() }; float pos[] = { x, y, z, ...
[ "public", "void", "setDirectionalLight", "(", "int", "i", ",", "Color", "color", ",", "boolean", "enableColor", ",", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "float", "directionalColor", "[", "]", "=", "{", "(", "float", ")", "colo...
Sets the color value and the position of the No.i directionalLight
[ "Sets", "the", "color", "value", "and", "the", "position", "of", "the", "No", ".", "i", "directionalLight" ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/Graphics.java#L510-L523
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesKey
public static void escapePropertiesKey(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapePropertiesKey(text, offset, len, writer, PropertiesKeyEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
java
public static void escapePropertiesKey(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapePropertiesKey(text, offset, len, writer, PropertiesKeyEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
[ "public", "static", "void", "escapePropertiesKey", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapePropertiesKey", "(", "text", ","...
<p> Perform a Java Properties Key level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The Java Properties Key basic escape set: <ul> <li>The <em>Single Escape Characters</em>: <tt>&#92;t</tt> (<t...
[ "<p", ">", "Perform", "a", "Java", "Properties", "Key", "level", "2", "(", "basic", "set", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L1290-L1293
jnidzwetzki/bitfinex-v2-wss-api-java
src/main/java/com/github/jnidzwetzki/bitfinex/v2/BitfinexApiCallbackListeners.java
BitfinexApiCallbackListeners.onExecutedTradeEvent
public Closeable onExecutedTradeEvent(final BiConsumer<BitfinexExecutedTradeSymbol, Collection<BitfinexExecutedTrade>> listener) { executedTradesConsumers.offer(listener); return () -> executedTradesConsumers.remove(listener); }
java
public Closeable onExecutedTradeEvent(final BiConsumer<BitfinexExecutedTradeSymbol, Collection<BitfinexExecutedTrade>> listener) { executedTradesConsumers.offer(listener); return () -> executedTradesConsumers.remove(listener); }
[ "public", "Closeable", "onExecutedTradeEvent", "(", "final", "BiConsumer", "<", "BitfinexExecutedTradeSymbol", ",", "Collection", "<", "BitfinexExecutedTrade", ">", ">", "listener", ")", "{", "executedTradesConsumers", ".", "offer", "(", "listener", ")", ";", "return"...
registers listener for general trades executed within scope of exchange instrument (ie. tBTCUSD) @param listener of event @return hook of this listener
[ "registers", "listener", "for", "general", "trades", "executed", "within", "scope", "of", "exchange", "instrument", "(", "ie", ".", "tBTCUSD", ")" ]
train
https://github.com/jnidzwetzki/bitfinex-v2-wss-api-java/blob/2e6adf1eb6f8cd4c8722f1619f78ab2cc3c600ee/src/main/java/com/github/jnidzwetzki/bitfinex/v2/BitfinexApiCallbackListeners.java#L158-L161
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java
IOUtils.copy
public static void copy(Reader reader, Writer writer, boolean closeStreams) throws IOException { char[] buf = new char[BUFFER_SIZE]; int num = 0; try { while ((num = reader.read(buf, 0, buf.length)) != -1) { writer.write(buf, 0, num); } } finally { if (closeStreams) { close(reader); close(...
java
public static void copy(Reader reader, Writer writer, boolean closeStreams) throws IOException { char[] buf = new char[BUFFER_SIZE]; int num = 0; try { while ((num = reader.read(buf, 0, buf.length)) != -1) { writer.write(buf, 0, num); } } finally { if (closeStreams) { close(reader); close(...
[ "public", "static", "void", "copy", "(", "Reader", "reader", ",", "Writer", "writer", ",", "boolean", "closeStreams", ")", "throws", "IOException", "{", "char", "[", "]", "buf", "=", "new", "char", "[", "BUFFER_SIZE", "]", ";", "int", "num", "=", "0", ...
Writes all the contents of a Reader to a Writer. @param reader the reader to read from @param writer the writer to write to @param closeStreams the flag indicating if the stream must be close at the end, even if an exception occurs @throws java.io.IOException if an IOExcption occurs
[ "Writes", "all", "the", "contents", "of", "a", "Reader", "to", "a", "Writer", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/IOUtils.java#L59-L73
trellis-ldp-archive/trellis-io-jena
src/main/java/org/trellisldp/io/impl/HtmlData.java
HtmlData.getCss
public List<String> getCss() { return stream(properties.getOrDefault("css", "").split(",")) .map(String::trim).filter(x -> x.length() > 0).collect(toList()); }
java
public List<String> getCss() { return stream(properties.getOrDefault("css", "").split(",")) .map(String::trim).filter(x -> x.length() > 0).collect(toList()); }
[ "public", "List", "<", "String", ">", "getCss", "(", ")", "{", "return", "stream", "(", "properties", ".", "getOrDefault", "(", "\"css\"", ",", "\"\"", ")", ".", "split", "(", "\",\"", ")", ")", ".", "map", "(", "String", "::", "trim", ")", ".", "f...
Get any CSS document URLs @return a list of any CSS documents
[ "Get", "any", "CSS", "document", "URLs" ]
train
https://github.com/trellis-ldp-archive/trellis-io-jena/blob/3a06f8f8e7b6fc83fb659cb61217810f813967e8/src/main/java/org/trellisldp/io/impl/HtmlData.java#L80-L83
EdwardRaff/JSAT
JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java
WolfeNWLineSearch.setC1
public void setC1(double c1) { if(c1 <= 0) throw new IllegalArgumentException("c1 must be greater than 0, not " + c1); else if(c1 >= c2) throw new IllegalArgumentException("c1 must be less than c2"); this.c1 = c1; }
java
public void setC1(double c1) { if(c1 <= 0) throw new IllegalArgumentException("c1 must be greater than 0, not " + c1); else if(c1 >= c2) throw new IllegalArgumentException("c1 must be less than c2"); this.c1 = c1; }
[ "public", "void", "setC1", "(", "double", "c1", ")", "{", "if", "(", "c1", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"c1 must be greater than 0, not \"", "+", "c1", ")", ";", "else", "if", "(", "c1", ">=", "c2", ")", "throw", "ne...
Sets the constant used for the <i>sufficient decrease condition</i> f(x+&alpha; p) &le; f(x) + c<sub>1</sub> &alpha; p<sup>T</sup>&nabla;f(x) <br> <br> This value must always be less than {@link #setC2(double) } @param c1 the <i>sufficient decrease condition</i>
[ "Sets", "the", "constant", "used", "for", "the", "<i", ">", "sufficient", "decrease", "condition<", "/", "i", ">", "f", "(", "x", "+", "&alpha", ";", "p", ")", "&le", ";", "f", "(", "x", ")", "+", "c<sub", ">", "1<", "/", "sub", ">", "&alpha", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java#L66-L73
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java
KMLGeometry.toKMLPoint
public static void toKMLPoint(Point point, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<Point>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); sb.append("<coordinates>"); Coordinate coord = point.getCoordinate(); sb.a...
java
public static void toKMLPoint(Point point, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<Point>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); sb.append("<coordinates>"); Coordinate coord = point.getCoordinate(); sb.a...
[ "public", "static", "void", "toKMLPoint", "(", "Point", "point", ",", "ExtrudeMode", "extrude", ",", "int", "altitudeModeEnum", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"<Point>\"", ")", ";", "appendExtrude", "(", "extrude", ",", "sb...
A geographic location defined by longitude, latitude, and (optional) altitude. Syntax : <Point id="ID"> <!-- specific to Point --> <extrude>0</extrude> <!-- boolean --> <altitudeMode>clampToGround</altitudeMode> <!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute --> <!-- or, substitute gx:altitud...
[ "A", "geographic", "location", "defined", "by", "longitude", "latitude", "and", "(", "optional", ")", "altitude", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java#L98-L109
alkacon/opencms-core
src/org/opencms/ui/apps/git/CmsGitCheckin.java
CmsGitCheckin.zipRfsFolder
public static void zipRfsFolder(final File root, final OutputStream zipOutput) throws Exception { final ZipOutputStream zip = new ZipOutputStream(zipOutput); try { CmsFileUtil.walkFileSystem(root, new Closure() { @SuppressWarnings("resource") public void exe...
java
public static void zipRfsFolder(final File root, final OutputStream zipOutput) throws Exception { final ZipOutputStream zip = new ZipOutputStream(zipOutput); try { CmsFileUtil.walkFileSystem(root, new Closure() { @SuppressWarnings("resource") public void exe...
[ "public", "static", "void", "zipRfsFolder", "(", "final", "File", "root", ",", "final", "OutputStream", "zipOutput", ")", "throws", "Exception", "{", "final", "ZipOutputStream", "zip", "=", "new", "ZipOutputStream", "(", "zipOutput", ")", ";", "try", "{", "Cms...
Creates ZIP file data from the files / subfolders of the given root folder, and sends it to the given stream.<p> The stream passed as an argument is closed after the data is written. @param root the folder to zip @param zipOutput the output stream which the zip file data should be written to @throws Exception if som...
[ "Creates", "ZIP", "file", "data", "from", "the", "files", "/", "subfolders", "of", "the", "given", "root", "folder", "and", "sends", "it", "to", "the", "given", "stream", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L175-L212
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/impl/LogReader.java
LogReader.reportCorruption
private void reportCorruption(long bytes, String reason) { if (monitor != null) { monitor.corruption(bytes, reason); } }
java
private void reportCorruption(long bytes, String reason) { if (monitor != null) { monitor.corruption(bytes, reason); } }
[ "private", "void", "reportCorruption", "(", "long", "bytes", ",", "String", "reason", ")", "{", "if", "(", "monitor", "!=", "null", ")", "{", "monitor", ".", "corruption", "(", "bytes", ",", "reason", ")", ";", "}", "}" ]
Reports corruption to the monitor. The buffer must be updated to remove the dropped bytes prior to invocation.
[ "Reports", "corruption", "to", "the", "monitor", ".", "The", "buffer", "must", "be", "updated", "to", "remove", "the", "dropped", "bytes", "prior", "to", "invocation", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/impl/LogReader.java#L337-L342
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java
ReflectionUtils.getValue
public static <T> T getValue(Object target, Field field, Class<T> type) { try { boolean currentAccessible = field.isAccessible(); field.setAccessible(true); Object value = field.get(target); field.setAccessible(currentAccessible); return type.cast(value); } catch (NullPointerEx...
java
public static <T> T getValue(Object target, Field field, Class<T> type) { try { boolean currentAccessible = field.isAccessible(); field.setAccessible(true); Object value = field.get(target); field.setAccessible(currentAccessible); return type.cast(value); } catch (NullPointerEx...
[ "public", "static", "<", "T", ">", "T", "getValue", "(", "Object", "target", ",", "Field", "field", ",", "Class", "<", "T", ">", "type", ")", "{", "try", "{", "boolean", "currentAccessible", "=", "field", ".", "isAccessible", "(", ")", ";", "field", ...
Gets the value of the field on the given object cast to the desired class type. If the "target" object is null, then this method assumes the field is a static (class) member field; otherwise the field is considered an instance (object) member field. This method is not null-safe! @param <T> the desired return type in...
[ "Gets", "the", "value", "of", "the", "field", "on", "the", "given", "object", "cast", "to", "the", "desired", "class", "type", ".", "If", "the", "target", "object", "is", "null", "then", "this", "method", "assumes", "the", "field", "is", "a", "static", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java#L151-L166
apache/spark
common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java
TransportClient.sendRpc
public long sendRpc(ByteBuffer message, RpcResponseCallback callback) { if (logger.isTraceEnabled()) { logger.trace("Sending RPC to {}", getRemoteAddress(channel)); } long requestId = requestId(); handler.addRpcRequest(requestId, callback); RpcChannelListener listener = new RpcChannelListene...
java
public long sendRpc(ByteBuffer message, RpcResponseCallback callback) { if (logger.isTraceEnabled()) { logger.trace("Sending RPC to {}", getRemoteAddress(channel)); } long requestId = requestId(); handler.addRpcRequest(requestId, callback); RpcChannelListener listener = new RpcChannelListene...
[ "public", "long", "sendRpc", "(", "ByteBuffer", "message", ",", "RpcResponseCallback", "callback", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"Sending RPC to {}\"", ",", "getRemoteAddress", "(", "ch...
Sends an opaque message to the RpcHandler on the server-side. The callback will be invoked with the server's response or upon any failure. @param message The message to send. @param callback Callback to handle the RPC's reply. @return The RPC's id.
[ "Sends", "an", "opaque", "message", "to", "the", "RpcHandler", "on", "the", "server", "-", "side", ".", "The", "callback", "will", "be", "invoked", "with", "the", "server", "s", "response", "or", "upon", "any", "failure", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java#L187-L200
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibResourceFolder.java
ClientlibResourceFolder.getChildren
public List<ClientlibElement> getChildren() { List<ClientlibElement> children = new ArrayList<>(); for (Resource child : resource.getChildren()) { if (isFile(child)) children.add(new ClientlibFile(null, type, child, getAdditionalProperties())); else children.add(new ClientlibReso...
java
public List<ClientlibElement> getChildren() { List<ClientlibElement> children = new ArrayList<>(); for (Resource child : resource.getChildren()) { if (isFile(child)) children.add(new ClientlibFile(null, type, child, getAdditionalProperties())); else children.add(new ClientlibReso...
[ "public", "List", "<", "ClientlibElement", ">", "getChildren", "(", ")", "{", "List", "<", "ClientlibElement", ">", "children", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Resource", "child", ":", "resource", ".", "getChildren", "(", ")", ...
Returns all children - either {@link ClientlibResourceFolder} as well, or {@link ClientlibFile} .
[ "Returns", "all", "children", "-", "either", "{" ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibResourceFolder.java#L104-L111
bechte/junit-hierarchicalcontextrunner
src/main/java/de/bechte/junit/runners/context/statements/StatementExecutor.java
StatementExecutor.whenInitializationErrorIsRaised
protected void whenInitializationErrorIsRaised(final EachTestNotifier notifier, final InitializationError e) { notifier.addFailure(new MultipleFailureException(e.getCauses())); }
java
protected void whenInitializationErrorIsRaised(final EachTestNotifier notifier, final InitializationError e) { notifier.addFailure(new MultipleFailureException(e.getCauses())); }
[ "protected", "void", "whenInitializationErrorIsRaised", "(", "final", "EachTestNotifier", "notifier", ",", "final", "InitializationError", "e", ")", "{", "notifier", ".", "addFailure", "(", "new", "MultipleFailureException", "(", "e", ".", "getCauses", "(", ")", ")"...
Clients may override this method to add additional behavior when a {@link InitializationError} is raised. The call of this method is guaranteed. @param notifier the notifier @param e the error
[ "Clients", "may", "override", "this", "method", "to", "add", "additional", "behavior", "when", "a", "{", "@link", "InitializationError", "}", "is", "raised", ".", "The", "call", "of", "this", "method", "is", "guaranteed", "." ]
train
https://github.com/bechte/junit-hierarchicalcontextrunner/blob/c11bb846613a3db730ec2dd812e16cd2aaefc924/src/main/java/de/bechte/junit/runners/context/statements/StatementExecutor.java#L56-L58
lucee/Lucee
core/src/main/java/lucee/commons/io/FileUtil.java
FileUtil.toFile
public static File toFile(String parent, String path) { return new File(parent.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR), path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
java
public static File toFile(String parent, String path) { return new File(parent.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR), path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
[ "public", "static", "File", "toFile", "(", "String", "parent", ",", "String", "path", ")", "{", "return", "new", "File", "(", "parent", ".", "replace", "(", "FILE_ANTI_SEPERATOR", ",", "FILE_SEPERATOR", ")", ",", "path", ".", "replace", "(", "FILE_ANTI_SEPER...
create a File from parent file and string @param parent @param path @return new File Object
[ "create", "a", "File", "from", "parent", "file", "and", "string" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/FileUtil.java#L89-L91