repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
maddingo/sojo
src/main/java/net/sf/sojo/util/Util.java
Util.clearDateFormats
public static void clearDateFormats(Map<String, DateFormat> copy) { synchronized(dateFormats) { if (copy != null) { copy.putAll(dateFormats); } dateFormats.clear(); } }
java
public static void clearDateFormats(Map<String, DateFormat> copy) { synchronized(dateFormats) { if (copy != null) { copy.putAll(dateFormats); } dateFormats.clear(); } }
[ "public", "static", "void", "clearDateFormats", "(", "Map", "<", "String", ",", "DateFormat", ">", "copy", ")", "{", "synchronized", "(", "dateFormats", ")", "{", "if", "(", "copy", "!=", "null", ")", "{", "copy", ".", "putAll", "(", "dateFormats", ")", ...
Removes all registered {@link DateFormat DateFormats}. @param copy if not null, the old values are copied to this map @return an unmodifiable version of the original registrations.
[ "Removes", "all", "registered", "{", "@link", "DateFormat", "DateFormats", "}", "." ]
train
https://github.com/maddingo/sojo/blob/99e9e0a146b502deb7f507fe0623227402ed675b/src/main/java/net/sf/sojo/util/Util.java#L95-L102
selendroid/selendroid
selendroid-server/src/main/java/io/selendroid/server/util/Intents.java
Intents.createStartActivityIntent
public static Intent createStartActivityIntent(Context context, String mainActivityName) { Intent intent = new Intent(); intent.setClassName(context, mainActivityName); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SI...
java
public static Intent createStartActivityIntent(Context context, String mainActivityName) { Intent intent = new Intent(); intent.setClassName(context, mainActivityName); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SI...
[ "public", "static", "Intent", "createStartActivityIntent", "(", "Context", "context", ",", "String", "mainActivityName", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", ")", ";", "intent", ".", "setClassName", "(", "context", ",", "mainActivityName", ")...
Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
[ "Create", "an", "intent", "to", "start", "an", "activity", "for", "both", "ServerInstrumentation", "and", "LightweightInstrumentation" ]
train
https://github.com/selendroid/selendroid/blob/a32c1a96c973b80c14a588b1075f084201f7fe94/selendroid-server/src/main/java/io/selendroid/server/util/Intents.java#L14-L22
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/render/R.java
R.renderChild
public static void renderChild(FacesContext fc, UIComponent child) throws IOException { if (!child.isRendered()) { return; } child.encodeBegin(fc); if (child.getRendersChildren()) { child.encodeChildren(fc); } else { renderChildren(fc, child); } child.encodeEnd(fc); }
java
public static void renderChild(FacesContext fc, UIComponent child) throws IOException { if (!child.isRendered()) { return; } child.encodeBegin(fc); if (child.getRendersChildren()) { child.encodeChildren(fc); } else { renderChildren(fc, child); } child.encodeEnd(fc); }
[ "public", "static", "void", "renderChild", "(", "FacesContext", "fc", ",", "UIComponent", "child", ")", "throws", "IOException", "{", "if", "(", "!", "child", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "child", ".", "encodeBegin", "(", "f...
Renders the Child of a Component @param fc @param child @throws IOException
[ "Renders", "the", "Child", "of", "a", "Component" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/render/R.java#L346-L359
apereo/cas
core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java
BaseSingleLogoutServiceMessageHandler.sendMessageToEndpoint
protected boolean sendMessageToEndpoint(final LogoutHttpMessage msg, final SingleLogoutRequest request, final SingleLogoutMessage logoutMessage) { return this.httpClient.sendMessageToEndPoint(msg); }
java
protected boolean sendMessageToEndpoint(final LogoutHttpMessage msg, final SingleLogoutRequest request, final SingleLogoutMessage logoutMessage) { return this.httpClient.sendMessageToEndPoint(msg); }
[ "protected", "boolean", "sendMessageToEndpoint", "(", "final", "LogoutHttpMessage", "msg", ",", "final", "SingleLogoutRequest", "request", ",", "final", "SingleLogoutMessage", "logoutMessage", ")", "{", "return", "this", ".", "httpClient", ".", "sendMessageToEndPoint", ...
Send message to endpoint. @param msg the msg @param request the request @param logoutMessage the logout message @return the boolean
[ "Send", "message", "to", "endpoint", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java#L193-L195
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeMojoModel.java
SharedTreeMojoModel.scoreTreeRange
public final void scoreTreeRange(double[] row, int fromIndex, int toIndex, double[] preds) { final int clOffset = _nclasses == 1 ? 0 : 1; for (int classIndex = 0; classIndex < _ntrees_per_group; classIndex++) { int k = clOffset + classIndex; int itree = treeIndex(fromIndex, class...
java
public final void scoreTreeRange(double[] row, int fromIndex, int toIndex, double[] preds) { final int clOffset = _nclasses == 1 ? 0 : 1; for (int classIndex = 0; classIndex < _ntrees_per_group; classIndex++) { int k = clOffset + classIndex; int itree = treeIndex(fromIndex, class...
[ "public", "final", "void", "scoreTreeRange", "(", "double", "[", "]", "row", ",", "int", "fromIndex", ",", "int", "toIndex", ",", "double", "[", "]", "preds", ")", "{", "final", "int", "clOffset", "=", "_nclasses", "==", "1", "?", "0", ":", "1", ";",...
Generates (partial, per-class) predictions using only trees from a given range. @param row input row @param fromIndex low endpoint (inclusive) of the tree range @param toIndex high endpoint (exclusive) of the tree range @param preds array of partial predictions. To get final predictions pass the result to {@link Shared...
[ "Generates", "(", "partial", "per", "-", "class", ")", "predictions", "using", "only", "trees", "from", "a", "given", "range", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeMojoModel.java#L698-L710
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java
ST_Graph.makeEnvelopes
private static void makeEnvelopes(Statement st, double tolerance, boolean isH2, int srid) throws SQLException { st.execute("DROP TABLE IF EXISTS"+ PTS_TABLE + ";"); if (tolerance > 0) { LOGGER.info("Calculating envelopes around coordinates..."); if (isH2) { ...
java
private static void makeEnvelopes(Statement st, double tolerance, boolean isH2, int srid) throws SQLException { st.execute("DROP TABLE IF EXISTS"+ PTS_TABLE + ";"); if (tolerance > 0) { LOGGER.info("Calculating envelopes around coordinates..."); if (isH2) { ...
[ "private", "static", "void", "makeEnvelopes", "(", "Statement", "st", ",", "double", "tolerance", ",", "boolean", "isH2", ",", "int", "srid", ")", "throws", "SQLException", "{", "st", ".", "execute", "(", "\"DROP TABLE IF EXISTS\"", "+", "PTS_TABLE", "+", "\";...
Make a big table of all points in the coords table with an envelope around each point. We will use this table to remove duplicate points.
[ "Make", "a", "big", "table", "of", "all", "points", "in", "the", "coords", "table", "with", "an", "envelope", "around", "each", "point", ".", "We", "will", "use", "this", "table", "to", "remove", "duplicate", "points", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topology/ST_Graph.java#L390-L446
canoo/dolphin-platform
platform/dolphin-platform-remoting-common/src/main/java/com/canoo/dp/impl/remoting/legacy/core/ModelStoreConfig.java
ModelStoreConfig.ensurePowerOfTwo
private void ensurePowerOfTwo(String parameter, int number) { if (Integer.bitCount(number) > 1) { LOG.warn("Parameter {} should be power of two but was {}", parameter, number); } }
java
private void ensurePowerOfTwo(String parameter, int number) { if (Integer.bitCount(number) > 1) { LOG.warn("Parameter {} should be power of two but was {}", parameter, number); } }
[ "private", "void", "ensurePowerOfTwo", "(", "String", "parameter", ",", "int", "number", ")", "{", "if", "(", "Integer", ".", "bitCount", "(", "number", ")", ">", "1", ")", "{", "LOG", ".", "warn", "(", "\"Parameter {} should be power of two but was {}\"", ","...
all the capacities will be used to initialize HashMaps so they should be powers of two
[ "all", "the", "capacities", "will", "be", "used", "to", "initialize", "HashMaps", "so", "they", "should", "be", "powers", "of", "two" ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-common/src/main/java/com/canoo/dp/impl/remoting/legacy/core/ModelStoreConfig.java#L87-L91
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <T1, T2, T3, T4, T5, T6, T7, T8> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Observable<Void>> toAsync(Action8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8> action) { return toAsync(action, Schedulers.computation()); }
java
public static <T1, T2, T3, T4, T5, T6, T7, T8> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Observable<Void>> toAsync(Action8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8> action) { return toAsync(action, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ">", "Func8", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "Observable", "<", "Voi...
Convert a synchronous action call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.an.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type ...
[ "Convert", "a", "synchronous", "action", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki", ...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L590-L592
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.objLongConsumer
public static <T> ObjLongConsumer<T> objLongConsumer(CheckedObjLongConsumer<T> consumer, Consumer<Throwable> handler) { return (t, u) -> { try { consumer.accept(t, u); } catch (Throwable e) { handler.accept(e); throw new Illega...
java
public static <T> ObjLongConsumer<T> objLongConsumer(CheckedObjLongConsumer<T> consumer, Consumer<Throwable> handler) { return (t, u) -> { try { consumer.accept(t, u); } catch (Throwable e) { handler.accept(e); throw new Illega...
[ "public", "static", "<", "T", ">", "ObjLongConsumer", "<", "T", ">", "objLongConsumer", "(", "CheckedObjLongConsumer", "<", "T", ">", "consumer", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "(", "t", ",", "u", ")", "->", "{", ...
Wrap a {@link CheckedObjLongConsumer} in a {@link ObjLongConsumer} with a custom handler for checked exceptions.
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L276-L287
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.translationRotateMul
public Matrix4x3f translationRotateMul(float tx, float ty, float tz, float qx, float qy, float qz, float qw, Matrix4x3fc mat) { float w2 = qw * qw; float x2 = qx * qx; float y2 = qy * qy; float z2 = qz * qz; float zw = qz * qw; float xy = qx * qy; float xz = qx * ...
java
public Matrix4x3f translationRotateMul(float tx, float ty, float tz, float qx, float qy, float qz, float qw, Matrix4x3fc mat) { float w2 = qw * qw; float x2 = qx * qx; float y2 = qy * qy; float z2 = qz * qz; float zw = qz * qw; float xy = qx * qy; float xz = qx * ...
[ "public", "Matrix4x3f", "translationRotateMul", "(", "float", "tx", ",", "float", "ty", ",", "float", "tz", ",", "float", "qx", ",", "float", "qy", ",", "float", "qz", ",", "float", "qw", ",", "Matrix4x3fc", "mat", ")", "{", "float", "w2", "=", "qw", ...
Set <code>this</code> matrix to <code>T * R * M</code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code>, <code>R</code> is a rotation - and possibly scaling - transformation specified by the quaternion <code>(qx, qy, qz, qw)</code> and <code>M</code> is the given matrix <code>mat</code> <p>...
[ "Set", "<code", ">", "this<", "/", "code", ">", "matrix", "to", "<code", ">", "T", "*", "R", "*", "M<", "/", "code", ">", "where", "<code", ">", "T<", "/", "code", ">", "is", "a", "translation", "by", "the", "given", "<code", ">", "(", "tx", "t...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L2997-L3031
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseGridScreen.java
XBaseGridScreen.printControlEndForm
public void printControlEndForm(PrintWriter out, int iPrintOptions) { BasePanel scrDetail = ((BaseGridScreen)this.getScreenField()).getReportDetail(); this.printHeadingFootingControls(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN); if (scrDetail != null) { scrDetail....
java
public void printControlEndForm(PrintWriter out, int iPrintOptions) { BasePanel scrDetail = ((BaseGridScreen)this.getScreenField()).getReportDetail(); this.printHeadingFootingControls(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN); if (scrDetail != null) { scrDetail....
[ "public", "void", "printControlEndForm", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "BasePanel", "scrDetail", "=", "(", "(", "BaseGridScreen", ")", "this", ".", "getScreenField", "(", ")", ")", ".", "getReportDetail", "(", ")", ";", "t...
Display the start form in input format. @param out The out stream. @param iPrintOptions The view specific attributes.
[ "Display", "the", "start", "form", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseGridScreen.java#L117-L139
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java
DatastreamReferencedContent.getContentStream
@Override public InputStream getContentStream(Context context) throws StreamIOException { try { ContentManagerParams params = new ContentManagerParams(DSLocation); if (context != null ) { params.setContext(context); } MIMETypedStream stream = g...
java
@Override public InputStream getContentStream(Context context) throws StreamIOException { try { ContentManagerParams params = new ContentManagerParams(DSLocation); if (context != null ) { params.setContext(context); } MIMETypedStream stream = g...
[ "@", "Override", "public", "InputStream", "getContentStream", "(", "Context", "context", ")", "throws", "StreamIOException", "{", "try", "{", "ContentManagerParams", "params", "=", "new", "ContentManagerParams", "(", "DSLocation", ")", ";", "if", "(", "context", "...
Gets an InputStream to the content of this externally-referenced datastream. <p>The DSLocation of this datastream must be non-null before invoking this method. <p>If successful, the DSMIME type is automatically set based on the web server's response header. If the web server doesn't send a valid Content-type: header,...
[ "Gets", "an", "InputStream", "to", "the", "content", "of", "this", "externally", "-", "referenced", "datastream", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DatastreamReferencedContent.java#L84-L98
eyp/serfj
src/main/java/net/sf/serfj/RestServlet.java
RestServlet.service
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Eliminamos de la URI el contexto String url = request.getRequestURI().substring(request.getContextPath().length()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("url => {}", url)...
java
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Eliminamos de la URI el contexto String url = request.getRequestURI().substring(request.getContextPath().length()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("url => {}", url)...
[ "@", "Override", "protected", "void", "service", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "// Eliminamos de la URI el contexto", "String", "url", "=", "request", ".", "getRe...
Parses the request to get information about what controller is trying to call, then invoke the action from that controller (if any), and finally gives an answer.<br> <br> Basically it only dispatchs the request to a controller.
[ "Parses", "the", "request", "to", "get", "information", "about", "what", "controller", "is", "trying", "to", "call", "then", "invoke", "the", "action", "from", "that", "controller", "(", "if", "any", ")", "and", "finally", "gives", "an", "answer", ".", "<b...
train
https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/RestServlet.java#L88-L116
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitAttribute
@Override public R visitAttribute(AttributeTree node, P p) { return defaultAction(node, p); }
java
@Override public R visitAttribute(AttributeTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitAttribute", "(", "AttributeTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L105-L108
btrplace/scheduler
api/src/main/java/org/btrplace/model/view/network/Network.java
Network.generateDot
public void generateDot(Model mo, String out, boolean fromLeftToRight) throws IOException { try (BufferedWriter dot = new BufferedWriter(new FileWriter(out))) { dot.append("digraph G {\n"); if (fromLeftToRight) { dot.append("rankdir=LR;\n"); } dra...
java
public void generateDot(Model mo, String out, boolean fromLeftToRight) throws IOException { try (BufferedWriter dot = new BufferedWriter(new FileWriter(out))) { dot.append("digraph G {\n"); if (fromLeftToRight) { dot.append("rankdir=LR;\n"); } dra...
[ "public", "void", "generateDot", "(", "Model", "mo", ",", "String", "out", ",", "boolean", "fromLeftToRight", ")", "throws", "IOException", "{", "try", "(", "BufferedWriter", "dot", "=", "new", "BufferedWriter", "(", "new", "FileWriter", "(", "out", ")", ")"...
Generate a dot file (diagram) of the current network infrastructure, included all connected elements and links. @param mo the model to use, it may contains naming services for switches or nodes that will replace the generic names mainly based on the id number. @param out the output dot fil...
[ "Generate", "a", "dot", "file", "(", "diagram", ")", "of", "the", "current", "network", "infrastructure", "included", "all", "connected", "elements", "and", "links", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/view/network/Network.java#L313-L325
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/miner/DirectedRelationMiner.java
DirectedRelationMiner.writeResult
@Override public void writeResult(Map<BioPAXElement, List<Match>> matches, OutputStream out) throws IOException { writeResultAsSIF(matches, out, true, getSourceLabel(), getTargetLabel()); }
java
@Override public void writeResult(Map<BioPAXElement, List<Match>> matches, OutputStream out) throws IOException { writeResultAsSIF(matches, out, true, getSourceLabel(), getTargetLabel()); }
[ "@", "Override", "public", "void", "writeResult", "(", "Map", "<", "BioPAXElement", ",", "List", "<", "Match", ">", ">", "matches", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "writeResultAsSIF", "(", "matches", ",", "out", ",", "true", ...
Writes the result as "A B", where A and B are gene symbols, and whitespace is tab. @param matches pattern search result @param out output stream
[ "Writes", "the", "result", "as", "A", "B", "where", "A", "and", "B", "are", "gene", "symbols", "and", "whitespace", "is", "tab", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/DirectedRelationMiner.java#L63-L68
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.contains
@Trivial private static boolean contains(String[] fileList, String fileName) { if (fileList != null) { for (String name : fileList) { if (name.equals(fileName)) { return true; } } } return false; }
java
@Trivial private static boolean contains(String[] fileList, String fileName) { if (fileList != null) { for (String name : fileList) { if (name.equals(fileName)) { return true; } } } return false; }
[ "@", "Trivial", "private", "static", "boolean", "contains", "(", "String", "[", "]", "fileList", ",", "String", "fileName", ")", "{", "if", "(", "fileList", "!=", "null", ")", "{", "for", "(", "String", "name", ":", "fileList", ")", "{", "if", "(", "...
Tell if a file name is present in an array of file names. Test file names using case sensitive {@link String#equals(Object)}. The parameter file names collection is expected to be obtained from a call to {@link File#list()}, which can return null. @param fileNames The file names to test against. The array may be null...
[ "Tell", "if", "a", "file", "name", "is", "present", "in", "an", "array", "of", "file", "names", ".", "Test", "file", "names", "using", "case", "sensitive", "{", "@link", "String#equals", "(", "Object", ")", "}", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1442-L1453
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java
JDBC4CallableStatement.setBigDecimal
@Override public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
java
@Override public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setBigDecimal", "(", "String", "parameterName", ",", "BigDecimal", "x", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.math.BigDecimal value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "math", ".", "BigDecimal", "value", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java#L591-L596
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/DatatypeConverter.java
DatatypeConverter.printDurationTimeUnits
public static final BigInteger printDurationTimeUnits(Duration duration, boolean estimated) { // SF-329: null default required to keep Powerproject happy when importing MSPDI files TimeUnit units = duration == null ? PARENT_FILE.get().getProjectProperties().getDefaultDurationUnits() : duration.getUnits()...
java
public static final BigInteger printDurationTimeUnits(Duration duration, boolean estimated) { // SF-329: null default required to keep Powerproject happy when importing MSPDI files TimeUnit units = duration == null ? PARENT_FILE.get().getProjectProperties().getDefaultDurationUnits() : duration.getUnits()...
[ "public", "static", "final", "BigInteger", "printDurationTimeUnits", "(", "Duration", "duration", ",", "boolean", "estimated", ")", "{", "// SF-329: null default required to keep Powerproject happy when importing MSPDI files", "TimeUnit", "units", "=", "duration", "==", "null",...
Print duration time units. @param duration Duration value @param estimated is this an estimated duration @return time units value
[ "Print", "duration", "time", "units", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/DatatypeConverter.java#L994-L999
apache/incubator-gobblin
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaUtils.java
KafkaUtils.containsPartitionAvgRecordMillis
public static boolean containsPartitionAvgRecordMillis(State state, KafkaPartition partition) { return state.contains( getPartitionPropName(partition.getTopicName(), partition.getId()) + "." + KafkaSource.AVG_RECORD_MILLIS); }
java
public static boolean containsPartitionAvgRecordMillis(State state, KafkaPartition partition) { return state.contains( getPartitionPropName(partition.getTopicName(), partition.getId()) + "." + KafkaSource.AVG_RECORD_MILLIS); }
[ "public", "static", "boolean", "containsPartitionAvgRecordMillis", "(", "State", "state", ",", "KafkaPartition", "partition", ")", "{", "return", "state", ".", "contains", "(", "getPartitionPropName", "(", "partition", ".", "getTopicName", "(", ")", ",", "partition"...
Determines whether the given {@link State} contains "[topicname].[partitionid].avg.record.millis".
[ "Determines", "whether", "the", "given", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaUtils.java#L137-L140
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java
CassandraDefs.slicePredicateStartEndCol
static SlicePredicate slicePredicateStartEndCol(byte[] startColName, byte[] endColName, int count) { if(startColName == null) startColName = EMPTY_BYTES; if(endColName == null) endColName = EMPTY_BYTES; SliceRange sliceRange = new SliceRange(ByteBuffer.wrap(startColName), ByteBuf...
java
static SlicePredicate slicePredicateStartEndCol(byte[] startColName, byte[] endColName, int count) { if(startColName == null) startColName = EMPTY_BYTES; if(endColName == null) endColName = EMPTY_BYTES; SliceRange sliceRange = new SliceRange(ByteBuffer.wrap(startColName), ByteBuf...
[ "static", "SlicePredicate", "slicePredicateStartEndCol", "(", "byte", "[", "]", "startColName", ",", "byte", "[", "]", "endColName", ",", "int", "count", ")", "{", "if", "(", "startColName", "==", "null", ")", "startColName", "=", "EMPTY_BYTES", ";", "if", "...
Create a SlicePredicate that starts at the given column name, selecting up to {@link #MAX_COLS_BATCH_SIZE} columns. @param startColName Starting column name as a byte[]. @param endColName Ending column name as a byte[] @return SlicePredicate that starts at the given starting column name, ends at the g...
[ "Create", "a", "SlicePredicate", "that", "starts", "at", "the", "given", "column", "name", "selecting", "up", "to", "{", "@link", "#MAX_COLS_BATCH_SIZE", "}", "columns", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java#L173-L181
Scalified/fab
fab/src/main/java/com/scalified/fab/ActionButton.java
ActionButton.drawElevation
@TargetApi(Build.VERSION_CODES.LOLLIPOP) protected void drawElevation() { float halfSize = getSize() / 2; final int left = (int) (calculateCenterX() - halfSize); final int top = (int) (calculateCenterY() - halfSize); final int right = (int) (calculateCenterX() + halfSize); final int bottom = (int) (calculate...
java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) protected void drawElevation() { float halfSize = getSize() / 2; final int left = (int) (calculateCenterX() - halfSize); final int top = (int) (calculateCenterY() - halfSize); final int right = (int) (calculateCenterX() + halfSize); final int bottom = (int) (calculate...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "protected", "void", "drawElevation", "(", ")", "{", "float", "halfSize", "=", "getSize", "(", ")", "/", "2", ";", "final", "int", "left", "=", "(", "int", ")", "(", "calculate...
Draws the elevation around the main circle <p> Stroke corrective is used due to ambiguity in drawing stroke in combination with elevation enabled (for API 21 and higher only. In such case there is no possibility to determine the accurate <b>Action Button</b> size, so width and height must be corrected <p> This logic ma...
[ "Draws", "the", "elevation", "around", "the", "main", "circle", "<p", ">", "Stroke", "corrective", "is", "used", "due", "to", "ambiguity", "in", "drawing", "stroke", "in", "combination", "with", "elevation", "enabled", "(", "for", "API", "21", "and", "higher...
train
https://github.com/Scalified/fab/blob/0fc001e2f21223871d05d28b192a32ea70726884/fab/src/main/java/com/scalified/fab/ActionButton.java#L1545-L1560
stevespringett/Alpine
alpine/src/main/java/alpine/tasks/AlpineTaskScheduler.java
AlpineTaskScheduler.scheduleEvent
protected void scheduleEvent(final Event event, final long delay, final long period) { final Timer timer = new Timer(); timer.schedule(new ScheduleEvent().event(event), delay, period); timers.add(timer); }
java
protected void scheduleEvent(final Event event, final long delay, final long period) { final Timer timer = new Timer(); timer.schedule(new ScheduleEvent().event(event), delay, period); timers.add(timer); }
[ "protected", "void", "scheduleEvent", "(", "final", "Event", "event", ",", "final", "long", "delay", ",", "final", "long", "period", ")", "{", "final", "Timer", "timer", "=", "new", "Timer", "(", ")", ";", "timer", ".", "schedule", "(", "new", "ScheduleE...
Schedules a repeating Event. @param event the Event to schedule @param delay delay in milliseconds before task is to be executed. @param period time in milliseconds between successive task executions.
[ "Schedules", "a", "repeating", "Event", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/tasks/AlpineTaskScheduler.java#L46-L50
apache/incubator-heron
heron/metricscachemgr/src/java/org/apache/heron/metricscachemgr/metricscache/CacheCore.java
CacheCore.getExceptions
public ExceptionResponse getExceptions( ExceptionRequest request) { synchronized (CacheCore.class) { List<ExceptionDatum> response = new ArrayList<>(); Map<String, Set<String>> componentNameInstanceId = request.getComponentNameInstanceId(); // candidate component names Set<String> co...
java
public ExceptionResponse getExceptions( ExceptionRequest request) { synchronized (CacheCore.class) { List<ExceptionDatum> response = new ArrayList<>(); Map<String, Set<String>> componentNameInstanceId = request.getComponentNameInstanceId(); // candidate component names Set<String> co...
[ "public", "ExceptionResponse", "getExceptions", "(", "ExceptionRequest", "request", ")", "{", "synchronized", "(", "CacheCore", ".", "class", ")", "{", "List", "<", "ExceptionDatum", ">", "response", "=", "new", "ArrayList", "<>", "(", ")", ";", "Map", "<", ...
for internal process use @param request <p> idxComponentInstance == null: query all components idxComponentInstance == []: query none component idxComponentInstance == [c1-&gt;null, ..]: query all instances of c1, .. idxComponentInstance == [c1-&gt;[], ..]: query none instance of c1, .. idxComponentInstance == [c1-&gt...
[ "for", "internal", "process", "use" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/metricscachemgr/src/java/org/apache/heron/metricscachemgr/metricscache/CacheCore.java#L459-L494
Impetus/Kundera
src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/PropertyReader.java
PropertyReader.getProperties
private static Map<String, String> getProperties(String fileName) { if (kunderaBlockchainProps == null || kunderaBlockchainProps.isEmpty()) { Configuration config = null; try { config = new PropertiesConfiguration(fileName); } ...
java
private static Map<String, String> getProperties(String fileName) { if (kunderaBlockchainProps == null || kunderaBlockchainProps.isEmpty()) { Configuration config = null; try { config = new PropertiesConfiguration(fileName); } ...
[ "private", "static", "Map", "<", "String", ",", "String", ">", "getProperties", "(", "String", "fileName", ")", "{", "if", "(", "kunderaBlockchainProps", "==", "null", "||", "kunderaBlockchainProps", ".", "isEmpty", "(", ")", ")", "{", "Configuration", "config...
Gets the properties. @param fileName the file name @return the properties
[ "Gets", "the", "properties", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/PropertyReader.java#L61-L80
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/geom/Vector2f.java
Vector2f.projectOntoUnit
public void projectOntoUnit(Vector2f b, Vector2f result) { float dp = b.dot(this); result.x = dp * b.getX(); result.y = dp * b.getY(); }
java
public void projectOntoUnit(Vector2f b, Vector2f result) { float dp = b.dot(this); result.x = dp * b.getX(); result.y = dp * b.getY(); }
[ "public", "void", "projectOntoUnit", "(", "Vector2f", "b", ",", "Vector2f", "result", ")", "{", "float", "dp", "=", "b", ".", "dot", "(", "this", ")", ";", "result", ".", "x", "=", "dp", "*", "b", ".", "getX", "(", ")", ";", "result", ".", "y", ...
Project this vector onto another @param b The vector to project onto @param result The projected vector
[ "Project", "this", "vector", "onto", "another" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/geom/Vector2f.java#L329-L335
Wikidata/Wikidata-Toolkit
wdtk-examples/src/main/java/org/wikidata/wdtk/examples/EntityStatisticsProcessor.java
EntityStatisticsProcessor.countKey
private void countKey(Map<String, Integer> map, String key, int count) { if (map.containsKey(key)) { map.put(key, map.get(key) + count); } else { map.put(key, count); } }
java
private void countKey(Map<String, Integer> map, String key, int count) { if (map.containsKey(key)) { map.put(key, map.get(key) + count); } else { map.put(key, count); } }
[ "private", "void", "countKey", "(", "Map", "<", "String", ",", "Integer", ">", "map", ",", "String", "key", ",", "int", "count", ")", "{", "if", "(", "map", ".", "containsKey", "(", "key", ")", ")", "{", "map", ".", "put", "(", "key", ",", "map",...
Helper method that stores in a hash map how often a certain key occurs. If the key has not been encountered yet, a new entry is created for it in the map. Otherwise the existing value for the key is incremented. @param map the map where the counts are stored @param key the key to be counted @param count value by which...
[ "Helper", "method", "that", "stores", "in", "a", "hash", "map", "how", "often", "a", "certain", "key", "occurs", ".", "If", "the", "key", "has", "not", "been", "encountered", "yet", "a", "new", "entry", "is", "created", "for", "it", "in", "the", "map",...
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-examples/src/main/java/org/wikidata/wdtk/examples/EntityStatisticsProcessor.java#L441-L447
joachimvda/jtransfo
core/src/main/java/org/jtransfo/internal/TaggedConverter.java
TaggedConverter.addConverters
public void addConverters(Converter converter, String... tags) { for (String tag : tags) { if (tag.startsWith("!")) { notConverters.put(tag.substring(1), converter); } else { converters.put(tag, converter); } } }
java
public void addConverters(Converter converter, String... tags) { for (String tag : tags) { if (tag.startsWith("!")) { notConverters.put(tag.substring(1), converter); } else { converters.put(tag, converter); } } }
[ "public", "void", "addConverters", "(", "Converter", "converter", ",", "String", "...", "tags", ")", "{", "for", "(", "String", "tag", ":", "tags", ")", "{", "if", "(", "tag", ".", "startsWith", "(", "\"!\"", ")", ")", "{", "notConverters", ".", "put",...
Add the converter which should be used for a specific tag. @param tags tags for which the converter applies @param converter converter for the tag
[ "Add", "the", "converter", "which", "should", "be", "used", "for", "a", "specific", "tag", "." ]
train
https://github.com/joachimvda/jtransfo/blob/eb1c72b64b09d6f3b6212bd3f1579cac5c983ea8/core/src/main/java/org/jtransfo/internal/TaggedConverter.java#L34-L42
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsUtils.java
CommsUtils.getRuntimeProperty
public static String getRuntimeProperty(String property, String defaultValue) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRuntimeProperty", new Object[] {property, defaultValue}); String runtimeProp = RuntimeInfo.getPr...
java
public static String getRuntimeProperty(String property, String defaultValue) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getRuntimeProperty", new Object[] {property, defaultValue}); String runtimeProp = RuntimeInfo.getPr...
[ "public", "static", "String", "getRuntimeProperty", "(", "String", "property", ",", "String", "defaultValue", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", ...
This method will get a runtime property from the sib.properties file. @param property The property key used to look up in the file. @param defaultValue The default value if the property is not in the file. @return Returns the property value.
[ "This", "method", "will", "get", "a", "runtime", "property", "from", "the", "sib", ".", "properties", "file", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsUtils.java#L59-L68
OpenLiberty/open-liberty
dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/UserData.java
UserData.addAttributeShort
private final void addAttributeShort(String key, String value) { this._toString = null; // reset toString variable ArrayList<String> array = this._attributes.get(key); if (array != null) { if (array.size() > 0) { if (key.equals("u")) { return; ...
java
private final void addAttributeShort(String key, String value) { this._toString = null; // reset toString variable ArrayList<String> array = this._attributes.get(key); if (array != null) { if (array.size() > 0) { if (key.equals("u")) { return; ...
[ "private", "final", "void", "addAttributeShort", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "_toString", "=", "null", ";", "// reset toString variable", "ArrayList", "<", "String", ">", "array", "=", "this", ".", "_attributes", ".", ...
Add the attribute name/value pair to a String[] list of values for the specified key. Once an attribute is set, it cannot only be appended to but not overwritten. This method does not return any values. @param key The name of a attribute @param value The value of the attribute
[ "Add", "the", "attribute", "name", "/", "value", "pair", "to", "a", "String", "[]", "list", "of", "values", "for", "the", "specified", "key", ".", "Once", "an", "attribute", "is", "set", "it", "cannot", "only", "be", "appended", "to", "but", "not", "ov...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/UserData.java#L124-L139
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.checkItemStatus
public boolean checkItemStatus(String listId, Integer mediaId) throws MovieDbException { return tmdbList.checkItemStatus(listId, mediaId); }
java
public boolean checkItemStatus(String listId, Integer mediaId) throws MovieDbException { return tmdbList.checkItemStatus(listId, mediaId); }
[ "public", "boolean", "checkItemStatus", "(", "String", "listId", ",", "Integer", "mediaId", ")", "throws", "MovieDbException", "{", "return", "tmdbList", ".", "checkItemStatus", "(", "listId", ",", "mediaId", ")", ";", "}" ]
Check to see if an item is already on a list. @param listId listId @param mediaId mediaId @return true if the item is on the list @throws MovieDbException exception
[ "Check", "to", "see", "if", "an", "item", "is", "already", "on", "a", "list", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L800-L802
square/phrase
src/main/java/com/squareup/phrase/Phrase.java
Phrase.fromPlural
public static Phrase fromPlural(Resources r, @PluralsRes int patternResourceId, int quantity) { return from(r.getQuantityText(patternResourceId, quantity)); }
java
public static Phrase fromPlural(Resources r, @PluralsRes int patternResourceId, int quantity) { return from(r.getQuantityText(patternResourceId, quantity)); }
[ "public", "static", "Phrase", "fromPlural", "(", "Resources", "r", ",", "@", "PluralsRes", "int", "patternResourceId", ",", "int", "quantity", ")", "{", "return", "from", "(", "r", ".", "getQuantityText", "(", "patternResourceId", ",", "quantity", ")", ")", ...
Entry point into this API. @throws IllegalArgumentException if pattern contains any syntax errors.
[ "Entry", "point", "into", "this", "API", "." ]
train
https://github.com/square/phrase/blob/d91f18e80790832db11b811c462f8e5cd492d97e/src/main/java/com/squareup/phrase/Phrase.java#L132-L134
elki-project/elki
addons/tutorial/src/main/java/tutorial/clustering/SameSizeKMeansAlgorithm.java
SameSizeKMeansAlgorithm.updateDistances
protected void updateDistances(Relation<V> relation, double[][] means, final WritableDataStore<Meta> metas, NumberVectorDistanceFunction<? super V> df) { for(DBIDIter id = relation.iterDBIDs(); id.valid(); id.advance()) { Meta c = metas.get(id); V fv = relation.get(id); // Update distances to mean...
java
protected void updateDistances(Relation<V> relation, double[][] means, final WritableDataStore<Meta> metas, NumberVectorDistanceFunction<? super V> df) { for(DBIDIter id = relation.iterDBIDs(); id.valid(); id.advance()) { Meta c = metas.get(id); V fv = relation.get(id); // Update distances to mean...
[ "protected", "void", "updateDistances", "(", "Relation", "<", "V", ">", "relation", ",", "double", "[", "]", "[", "]", "means", ",", "final", "WritableDataStore", "<", "Meta", ">", "metas", ",", "NumberVectorDistanceFunction", "<", "?", "super", "V", ">", ...
Compute the distances of each object to all means. Update {@link Meta#secondary} to point to the best cluster number except the current cluster assignment @param relation Data relation @param means Means @param metas Metadata storage @param df Distance function
[ "Compute", "the", "distances", "of", "each", "object", "to", "all", "means", ".", "Update", "{", "@link", "Meta#secondary", "}", "to", "point", "to", "the", "best", "cluster", "number", "except", "the", "current", "cluster", "assignment" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/tutorial/src/main/java/tutorial/clustering/SameSizeKMeansAlgorithm.java#L232-L248
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.mapValues
public static Map mapValues(Mapper mapper, Map map, boolean includeNull) { HashMap h = new HashMap(); for (Object e : map.keySet()) { Map.Entry entry = (Map.Entry) e; Object v = entry.getValue(); Object o = mapper.map(v); if (includeNull || o != null) { ...
java
public static Map mapValues(Mapper mapper, Map map, boolean includeNull) { HashMap h = new HashMap(); for (Object e : map.keySet()) { Map.Entry entry = (Map.Entry) e; Object v = entry.getValue(); Object o = mapper.map(v); if (includeNull || o != null) { ...
[ "public", "static", "Map", "mapValues", "(", "Mapper", "mapper", ",", "Map", "map", ",", "boolean", "includeNull", ")", "{", "HashMap", "h", "=", "new", "HashMap", "(", ")", ";", "for", "(", "Object", "e", ":", "map", ".", "keySet", "(", ")", ")", ...
Create a new Map by mapping all values from the original map and maintaining the original key. @param mapper a Mapper to map the values @param map an Map @param includeNull true to include null @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "mapping", "all", "values", "from", "the", "original", "map", "and", "maintaining", "the", "original", "key", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L427-L438
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/fingerprint/FingerprinterTool.java
FingerprinterTool.makeBitFingerprint
public static IBitFingerprint makeBitFingerprint(final Map<String,Integer> features, int len, int bits) { final BitSetFingerprint fingerprint = new BitSetFingerprint(len); final Random rand = new Random(); for (String feature : features.keySet()) { int hash = feature.hashCode(); ...
java
public static IBitFingerprint makeBitFingerprint(final Map<String,Integer> features, int len, int bits) { final BitSetFingerprint fingerprint = new BitSetFingerprint(len); final Random rand = new Random(); for (String feature : features.keySet()) { int hash = feature.hashCode(); ...
[ "public", "static", "IBitFingerprint", "makeBitFingerprint", "(", "final", "Map", "<", "String", ",", "Integer", ">", "features", ",", "int", "len", ",", "int", "bits", ")", "{", "final", "BitSetFingerprint", "fingerprint", "=", "new", "BitSetFingerprint", "(", ...
Convert a mapping of features and their counts to a binary fingerprint. Each feature can set 1-n hashes, the amount is modified by the {@code bits} operand. @param features features to include @param len fingerprint length @param bits number of bits to set for each pattern @return the continuous fingerprint
[ "Convert", "a", "mapping", "of", "features", "and", "their", "counts", "to", "a", "binary", "fingerprint", ".", "Each", "feature", "can", "set", "1", "-", "n", "hashes", "the", "amount", "is", "modified", "by", "the", "{", "@code", "bits", "}", "operand"...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/fingerprint/FingerprinterTool.java#L157-L169
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/Validate.java
Validate.isFalse
public static void isFalse(final boolean expression, final String message, final Object... values) { INSTANCE.isFalse(expression, message, values); }
java
public static void isFalse(final boolean expression, final String message, final Object... values) { INSTANCE.isFalse(expression, message, values); }
[ "public", "static", "void", "isFalse", "(", "final", "boolean", "expression", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "INSTANCE", ".", "isFalse", "(", "expression", ",", "message", ",", "values", ")", ";", "}" ...
<p>Validate that the argument condition is {@code false}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.</p> @param expression the boole...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "false", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/Validate.java#L624-L626
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/archaius/cache/ConfigCache.java
ConfigCache.getProperty
private TypeContainer getProperty(String propName) { TypeContainer container = cache.get(propName); if (container == null) { container = new TypeContainer(propName, config, version); TypeContainer existing = cache.putIfAbsent(propName, container); if (existing != null...
java
private TypeContainer getProperty(String propName) { TypeContainer container = cache.get(propName); if (container == null) { container = new TypeContainer(propName, config, version); TypeContainer existing = cache.putIfAbsent(propName, container); if (existing != null...
[ "private", "TypeContainer", "getProperty", "(", "String", "propName", ")", "{", "TypeContainer", "container", "=", "cache", ".", "get", "(", "propName", ")", ";", "if", "(", "container", "==", "null", ")", "{", "container", "=", "new", "TypeContainer", "(", ...
Gets the cached property container or make a new one, cache it and return it @param propName @return the property's container
[ "Gets", "the", "cached", "property", "container", "or", "make", "a", "new", "one", "cache", "it", "and", "return", "it" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/archaius/cache/ConfigCache.java#L63-L74
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseSparseNDArrayCOO.java
BaseSparseNDArrayCOO.createIndiceBuffer
protected static DataBuffer createIndiceBuffer(long[][] indices, long[] shape){ checkNotNull(indices); checkNotNull(shape); if(indices.length == 0){ return Nd4j.getDataBufferFactory().createLong(shape.length); } if (indices.length == shape.length) { retur...
java
protected static DataBuffer createIndiceBuffer(long[][] indices, long[] shape){ checkNotNull(indices); checkNotNull(shape); if(indices.length == 0){ return Nd4j.getDataBufferFactory().createLong(shape.length); } if (indices.length == shape.length) { retur...
[ "protected", "static", "DataBuffer", "createIndiceBuffer", "(", "long", "[", "]", "[", "]", "indices", ",", "long", "[", "]", "shape", ")", "{", "checkNotNull", "(", "indices", ")", ";", "checkNotNull", "(", "shape", ")", ";", "if", "(", "indices", ".", ...
Create a DataBuffer for indices of given arrays of indices. @param indices @param shape @return
[ "Create", "a", "DataBuffer", "for", "indices", "of", "given", "arrays", "of", "indices", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseSparseNDArrayCOO.java#L202-L214
dyu/protostuff-1.0.x
protostuff-yaml/src/main/java/com/dyuproject/protostuff/YamlIOUtil.java
YamlIOUtil.writeListTo
public static <T> int writeListTo(OutputStream out, List<T> messages, Schema<T> schema, LinkedBuffer buffer) throws IOException { if(buffer.start != buffer.offset) throw new IllegalArgumentException("Buffer previously used and had not been reset."); final Yaml...
java
public static <T> int writeListTo(OutputStream out, List<T> messages, Schema<T> schema, LinkedBuffer buffer) throws IOException { if(buffer.start != buffer.offset) throw new IllegalArgumentException("Buffer previously used and had not been reset."); final Yaml...
[ "public", "static", "<", "T", ">", "int", "writeListTo", "(", "OutputStream", "out", ",", "List", "<", "T", ">", "messages", ",", "Schema", "<", "T", ">", "schema", ",", "LinkedBuffer", "buffer", ")", "throws", "IOException", "{", "if", "(", "buffer", ...
Serializes the {@code messages} into an {@link OutputStream} using the given schema with the supplied buffer. @return the total bytes written to the output.
[ "Serializes", "the", "{", "@code", "messages", "}", "into", "an", "{", "@link", "OutputStream", "}", "using", "the", "given", "schema", "with", "the", "supplied", "buffer", "." ]
train
https://github.com/dyu/protostuff-1.0.x/blob/d7c964ec20da3fe44699d86ee95c2677ddffde96/protostuff-yaml/src/main/java/com/dyuproject/protostuff/YamlIOUtil.java#L181-L207
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/Precision.java
Precision.equalsIncludingNaN
public static boolean equalsIncludingNaN(double x, double y, double eps) { return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); }
java
public static boolean equalsIncludingNaN(double x, double y, double eps) { return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); }
[ "public", "static", "boolean", "equalsIncludingNaN", "(", "double", "x", ",", "double", "y", ",", "double", "eps", ")", "{", "return", "equalsIncludingNaN", "(", "x", ",", "y", ")", "||", "(", "FastMath", ".", "abs", "(", "y", "-", "x", ")", "<=", "e...
Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive). @param x first value @param y second value @param eps the amount of absolute error to allow. @return {@code true} if the values are equal or within range of each other, or both are NaN. @since 2.2
[ "Returns", "true", "if", "both", "arguments", "are", "NaN", "or", "are", "equal", "or", "within", "the", "range", "of", "allowed", "error", "(", "inclusive", ")", "." ]
train
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/Precision.java#L325-L327
alkacon/opencms-core
src/org/opencms/lock/CmsLockManager.java
CmsLockManager.removeDeletedResource
public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException { try { m_driverManager.getVfsDriver(dbc).readResource(dbc, dbc.currentProject().getUuid(), resourceName, false); throw new CmsLockException( Messages.get().container( ...
java
public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException { try { m_driverManager.getVfsDriver(dbc).readResource(dbc, dbc.currentProject().getUuid(), resourceName, false); throw new CmsLockException( Messages.get().container( ...
[ "public", "void", "removeDeletedResource", "(", "CmsDbContext", "dbc", ",", "String", "resourceName", ")", "throws", "CmsException", "{", "try", "{", "m_driverManager", ".", "getVfsDriver", "(", "dbc", ")", ".", "readResource", "(", "dbc", ",", "dbc", ".", "cu...
Removes a resource after it has been deleted by the driver manager.<p> @param dbc the current database context @param resourceName the root path of the deleted resource @throws CmsException if something goes wrong
[ "Removes", "a", "resource", "after", "it", "has", "been", "deleted", "by", "the", "driver", "manager", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockManager.java#L498-L511
windup/windup
rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java
JmsDestinationService.createUnique
public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
java
public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
[ "public", "JmsDestinationModel", "createUnique", "(", "Set", "<", "ProjectModel", ">", "applications", ",", "String", "jndiName", ",", "JmsDestinationType", "destinationType", ")", "{", "JmsDestinationModel", "model", "=", "createUnique", "(", "applications", ",", "jn...
Creates a new instance with the given name, or converts an existing instance at this location if one already exists
[ "Creates", "a", "new", "instance", "with", "the", "given", "name", "or", "converts", "an", "existing", "instance", "at", "this", "location", "if", "one", "already", "exists" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java#L45-L51
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.downloadSingleArtifactsFile
public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException { String path = artifactPath.toString().replace("\\", "/"); Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrP...
java
public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException { String path = artifactPath.toString().replace("\\", "/"); Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrP...
[ "public", "InputStream", "downloadSingleArtifactsFile", "(", "Object", "projectIdOrPath", ",", "Integer", "jobId", ",", "Path", "artifactPath", ")", "throws", "GitLabApiException", "{", "String", "path", "=", "artifactPath", ".", "toString", "(", ")", ".", "replace"...
Download a single artifact file from within the job's artifacts archive. Only a single file is going to be extracted from the archive and streamed to a client. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts/*artifact_path</code></pre> @param projectIdOrPath id, path of the project, or a Project...
[ "Download", "a", "single", "artifact", "file", "from", "within", "the", "job", "s", "artifacts", "archive", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L407-L412
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
ContentServiceV1.listCommits
@Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$") public CompletableFuture<?> listCommits(@Param("revision") String revision, @Param("path") @Default("/**") String path, @Param("t...
java
@Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$") public CompletableFuture<?> listCommits(@Param("revision") String revision, @Param("path") @Default("/**") String path, @Param("t...
[ "@", "Get", "(", "\"regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$\"", ")", "public", "CompletableFuture", "<", "?", ">", "listCommits", "(", "@", "Param", "(", "\"revision\"", ")", "String", "revision", ",", "@", "Param", "(", ...
GET /projects/{projectName}/repos/{repoName}/commits/{revision}? path={path}&amp;to={to}&amp;maxCommits={maxCommits} <p>Returns a commit or the list of commits in the path. If the user specify the {@code revision} only, this will return the corresponding commit. If the user does not specify the {@code revision} or spe...
[ "GET", "/", "projects", "/", "{", "projectName", "}", "/", "repos", "/", "{", "repoName", "}", "/", "commits", "/", "{", "revision", "}", "?", "path", "=", "{", "path", "}", "&amp", ";", "to", "=", "{", "to", "}", "&amp", ";", "maxCommits", "=", ...
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java#L293-L324
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/SQLParserFactory.java
SQLParserFactory.newInstance
public static SQLParser newInstance(final DatabaseType databaseType, final String sql) { for (ShardingParseEngine each : NewInstanceServiceLoader.newServiceInstances(ShardingParseEngine.class)) { if (DatabaseType.valueOf(each.getDatabaseType()) == databaseType) { return each.createSQ...
java
public static SQLParser newInstance(final DatabaseType databaseType, final String sql) { for (ShardingParseEngine each : NewInstanceServiceLoader.newServiceInstances(ShardingParseEngine.class)) { if (DatabaseType.valueOf(each.getDatabaseType()) == databaseType) { return each.createSQ...
[ "public", "static", "SQLParser", "newInstance", "(", "final", "DatabaseType", "databaseType", ",", "final", "String", "sql", ")", "{", "for", "(", "ShardingParseEngine", "each", ":", "NewInstanceServiceLoader", ".", "newServiceInstances", "(", "ShardingParseEngine", "...
New instance of SQL parser. @param databaseType database type @param sql SQL @return SQL parser
[ "New", "instance", "of", "SQL", "parser", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/SQLParserFactory.java#L47-L54
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/groups/GroupsInterface.java
GroupsInterface.joinRequest
public void joinRequest(String groupId, String message, boolean acceptRules) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_JOIN_REQUEST); parameters.put("group_id", groupId); parameters.put("message", message)...
java
public void joinRequest(String groupId, String message, boolean acceptRules) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_JOIN_REQUEST); parameters.put("group_id", groupId); parameters.put("message", message)...
[ "public", "void", "joinRequest", "(", "String", "groupId", ",", "String", "message", ",", "boolean", "acceptRules", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Obj...
Request to join a group. Note: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to acceptRules) prior to making the join request. @param groupId - groupId parameter @param message - (required) message to group administrator @...
[ "Request", "to", "join", "a", "group", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/groups/GroupsInterface.java#L289-L300
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/util/ClassHelper.java
ClassHelper.getInterfacesAsStream
public static Stream<Class<?>> getInterfacesAsStream(Class<?> clazz) { return getSuperclassesAsStream(clazz, true) .flatMap(superClass -> Stream.concat( superClass.isInterface() ? Stream.of(superClass) : Stream.empty(), Arrays.stream(superClass.get...
java
public static Stream<Class<?>> getInterfacesAsStream(Class<?> clazz) { return getSuperclassesAsStream(clazz, true) .flatMap(superClass -> Stream.concat( superClass.isInterface() ? Stream.of(superClass) : Stream.empty(), Arrays.stream(superClass.get...
[ "public", "static", "Stream", "<", "Class", "<", "?", ">", ">", "getInterfacesAsStream", "(", "Class", "<", "?", ">", "clazz", ")", "{", "return", "getSuperclassesAsStream", "(", "clazz", ",", "true", ")", ".", "flatMap", "(", "superClass", "->", "Stream",...
Get a stream of all interfaces of the given class including extended interfaces and interfaces of all superclasses. If the given class is an interface, it will be included in the result, otherwise not. @param clazz The class to get the interfaces for. @return The stream of interfaces of the given class.
[ "Get", "a", "stream", "of", "all", "interfaces", "of", "the", "given", "class", "including", "extended", "interfaces", "and", "interfaces", "of", "all", "superclasses", ".", "If", "the", "given", "class", "is", "an", "interface", "it", "will", "be", "include...
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/ClassHelper.java#L37-L43
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasActivationUtils.java
KerasActivationUtils.getIActivationFromConfig
public static IActivation getIActivationFromConfig(Map<String, Object> layerConfig, KerasLayerConfiguration conf) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException { return getActivationFromConfig(layerConfig, conf).getActivationFunction(); }
java
public static IActivation getIActivationFromConfig(Map<String, Object> layerConfig, KerasLayerConfiguration conf) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException { return getActivationFromConfig(layerConfig, conf).getActivationFunction(); }
[ "public", "static", "IActivation", "getIActivationFromConfig", "(", "Map", "<", "String", ",", "Object", ">", "layerConfig", ",", "KerasLayerConfiguration", "conf", ")", "throws", "InvalidKerasConfigurationException", ",", "UnsupportedKerasConfigurationException", "{", "ret...
Get activation function from Keras layer configuration. @param layerConfig dictionary containing Keras layer configuration @return DL4J activation function @throws InvalidKerasConfigurationException Invalid Keras config @throws UnsupportedKerasConfigurationException Unsupported Keras config
[ "Get", "activation", "function", "from", "Keras", "layer", "configuration", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasActivationUtils.java#L95-L98
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.resetVpnClientSharedKey
public void resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); }
java
public void resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); }
[ "public", "void", "resetVpnClientSharedKey", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "resetVpnClientSharedKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName", ")", ".", "toBlocking", "(", "...
Resets the VPN client shared key of the virtual network gateway in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExce...
[ "Resets", "the", "VPN", "client", "shared", "key", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java#L1471-L1473
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/code/Symtab.java
Symtab.enterConstant
private VarSymbol enterConstant(String name, Type type) { VarSymbol c = new VarSymbol( PUBLIC | STATIC | FINAL, names.fromString(name), type, predefClass); c.setData(type.constValue()); predefClass.members().enter(c); return c; }
java
private VarSymbol enterConstant(String name, Type type) { VarSymbol c = new VarSymbol( PUBLIC | STATIC | FINAL, names.fromString(name), type, predefClass); c.setData(type.constValue()); predefClass.members().enter(c); return c; }
[ "private", "VarSymbol", "enterConstant", "(", "String", "name", ",", "Type", "type", ")", "{", "VarSymbol", "c", "=", "new", "VarSymbol", "(", "PUBLIC", "|", "STATIC", "|", "FINAL", ",", "names", ".", "fromString", "(", "name", ")", ",", "type", ",", "...
Enter a constant into symbol table. @param name The constant's name. @param type The constant's type.
[ "Enter", "a", "constant", "into", "symbol", "table", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Symtab.java#L233-L242
weld/core
environments/common/src/main/java/org/jboss/weld/environment/util/BeanArchives.java
BeanArchives.extractBeanArchiveId
public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRe...
java
public static String extractBeanArchiveId(String beanArchiveRef, String base, String separator) { beanArchiveRef = beanArchiveRef.replace('\\', '/'); StringBuilder id = new StringBuilder(); id.append(base); id.append(BeanArchives.BEAN_ARCHIVE_ID_BASE_DELIMITER); if (beanArchiveRe...
[ "public", "static", "String", "extractBeanArchiveId", "(", "String", "beanArchiveRef", ",", "String", "base", ",", "String", "separator", ")", "{", "beanArchiveRef", "=", "beanArchiveRef", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "StringBuilder"...
Takes the {@link #getBeanArchiveRef()} value and extracts the bean archive id. <ol> <li>First, the windows file separators found in beanArchiveRef are converted to slashes</li> <li>{@code base} value is appended</li> <li>{@link BeanArchives#BEAN_ARCHIVE_ID_BASE_DELIMITER} is appended</li> <li>If the {@code beanArchiveR...
[ "Takes", "the", "{", "@link", "#getBeanArchiveRef", "()", "}", "value", "and", "extracts", "the", "bean", "archive", "id", ".", "<ol", ">", "<li", ">", "First", "the", "windows", "file", "separators", "found", "in", "beanArchiveRef", "are", "converted", "to"...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/environments/common/src/main/java/org/jboss/weld/environment/util/BeanArchives.java#L103-L114
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java
MediaDescriptorField.createVideoFormat
private RTPFormat createVideoFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to frame ...
java
private RTPFormat createVideoFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to frame ...
[ "private", "RTPFormat", "createVideoFormat", "(", "int", "payload", ",", "Text", "description", ")", "{", "Iterator", "<", "Text", ">", "it", "=", "description", ".", "split", "(", "'", "'", ")", ".", "iterator", "(", ")", ";", "//encoding name", "Text", ...
Creates or updates video format using payload number and text format description. @param payload the payload number of the format. @param description text description of the format @return format object
[ "Creates", "or", "updates", "video", "format", "using", "payload", "number", "and", "text", "format", "description", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/sdp/MediaDescriptorField.java#L463-L487
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java
HelpFormatter.printWrapped
private void printWrapped(int nextLineTabStop, String text) { StringBuilder sb = new StringBuilder(text.length()); renderWrappedTextBlock(sb, nextLineTabStop, text); console.writeLine(sb.toString()); }
java
private void printWrapped(int nextLineTabStop, String text) { StringBuilder sb = new StringBuilder(text.length()); renderWrappedTextBlock(sb, nextLineTabStop, text); console.writeLine(sb.toString()); }
[ "private", "void", "printWrapped", "(", "int", "nextLineTabStop", ",", "String", "text", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "text", ".", "length", "(", ")", ")", ";", "renderWrappedTextBlock", "(", "sb", ",", "nextLineTabStop", ...
Print the specified text to the specified PrintWriter. @param nextLineTabStop the position on the next line for the first tab @param text the text to be written to the PrintWriter
[ "Print", "the", "specified", "text", "to", "the", "specified", "PrintWriter", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java#L381-L385
Alluxio/alluxio
core/common/src/main/java/alluxio/cli/CommandUtils.java
CommandUtils.checkNumOfArgsNoLessThan
public static void checkNumOfArgsNoLessThan(Command cmd, CommandLine cl, int n) throws InvalidArgumentException { if (cl.getArgs().length < n) { throw new InvalidArgumentException(ExceptionMessage.INVALID_ARGS_NUM_INSUFFICIENT .getMessage(cmd.getCommandName(), n, cl.getArgs().length)); } ...
java
public static void checkNumOfArgsNoLessThan(Command cmd, CommandLine cl, int n) throws InvalidArgumentException { if (cl.getArgs().length < n) { throw new InvalidArgumentException(ExceptionMessage.INVALID_ARGS_NUM_INSUFFICIENT .getMessage(cmd.getCommandName(), n, cl.getArgs().length)); } ...
[ "public", "static", "void", "checkNumOfArgsNoLessThan", "(", "Command", "cmd", ",", "CommandLine", "cl", ",", "int", "n", ")", "throws", "InvalidArgumentException", "{", "if", "(", "cl", ".", "getArgs", "(", ")", ".", "length", "<", "n", ")", "{", "throw",...
Checks the number of non-option arguments is no less than n for command. @param cmd command instance @param cl parsed commandline arguments @param n an integer @throws InvalidArgumentException if the number is smaller than n
[ "Checks", "the", "number", "of", "non", "-", "option", "arguments", "is", "no", "less", "than", "n", "for", "command", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/cli/CommandUtils.java#L84-L90
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java
InstanceFailoverGroupsInner.beginFailover
public InstanceFailoverGroupInner beginFailover(String resourceGroupName, String locationName, String failoverGroupName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).toBlocking().single().body(); }
java
public InstanceFailoverGroupInner beginFailover(String resourceGroupName, String locationName, String failoverGroupName) { return beginFailoverWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).toBlocking().single().body(); }
[ "public", "InstanceFailoverGroupInner", "beginFailover", "(", "String", "resourceGroupName", ",", "String", "locationName", ",", "String", "failoverGroupName", ")", "{", "return", "beginFailoverWithServiceResponseAsync", "(", "resourceGroupName", ",", "locationName", ",", "...
Fails over from the current primary managed instance to this managed instance. @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 locationName The name of the region where the resource is located. @para...
[ "Fails", "over", "from", "the", "current", "primary", "managed", "instance", "to", "this", "managed", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L770-L772
windup/windup
config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java
AbstractIterationOperation.resolveVariable
protected WindupVertexFrame resolveVariable(GraphRewrite event, String variableName) { Variables variables = Variables.instance(event); Iterator<String> tokenizer = new VariableNameIterator(variableName); WindupVertexFrame payload; String initialName = tokenizer.next(); try ...
java
protected WindupVertexFrame resolveVariable(GraphRewrite event, String variableName) { Variables variables = Variables.instance(event); Iterator<String> tokenizer = new VariableNameIterator(variableName); WindupVertexFrame payload; String initialName = tokenizer.next(); try ...
[ "protected", "WindupVertexFrame", "resolveVariable", "(", "GraphRewrite", "event", ",", "String", "variableName", ")", "{", "Variables", "variables", "=", "Variables", ".", "instance", "(", "event", ")", ";", "Iterator", "<", "String", ">", "tokenizer", "=", "ne...
Resolves variable/property name expressions of the form ` <code>#{initialModelVar.customProperty.anotherProp}</code>`, where the `initialModelVar` has a {@link Property} method of the form `<code>@Property public X getCustomProperty()</code>` and `X` has a {@link Property} method of the form `<code>@Property public X g...
[ "Resolves", "variable", "/", "property", "name", "expressions", "of", "the", "form", "<code", ">", "#", "{", "initialModelVar", ".", "customProperty", ".", "anotherProp", "}", "<", "/", "code", ">", "where", "the", "initialModelVar", "has", "a", "{" ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java#L91-L122
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.newClientContext
@Deprecated public static SslContext newClientContext(SslProvider provider, File certChainFile) throws SSLException { return newClientContext(provider, certChainFile, null); }
java
@Deprecated public static SslContext newClientContext(SslProvider provider, File certChainFile) throws SSLException { return newClientContext(provider, certChainFile, null); }
[ "@", "Deprecated", "public", "static", "SslContext", "newClientContext", "(", "SslProvider", "provider", ",", "File", "certChainFile", ")", "throws", "SSLException", "{", "return", "newClientContext", "(", "provider", ",", "certChainFile", ",", "null", ")", ";", "...
Creates a new client-side {@link SslContext}. @param provider the {@link SslContext} implementation to use. {@code null} to use the current default one. @param certChainFile an X.509 certificate chain file in PEM format. {@code null} to use the system default @return a new client-side {@link SslContext} @deprecated R...
[ "Creates", "a", "new", "client", "-", "side", "{", "@link", "SslContext", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L586-L589
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newUsed
public Used newUsed(QualifiedName id, QualifiedName activity, QualifiedName entity) { Used res = newUsed(id); res.setActivity(activity); res.setEntity(entity); return res; }
java
public Used newUsed(QualifiedName id, QualifiedName activity, QualifiedName entity) { Used res = newUsed(id); res.setActivity(activity); res.setEntity(entity); return res; }
[ "public", "Used", "newUsed", "(", "QualifiedName", "id", ",", "QualifiedName", "activity", ",", "QualifiedName", "entity", ")", "{", "Used", "res", "=", "newUsed", "(", "id", ")", ";", "res", ".", "setActivity", "(", "activity", ")", ";", "res", ".", "se...
A factory method to create an instance of a usage {@link Used} @param id an optional identifier for a usage @param activity the identifier of the <a href="http://www.w3.org/TR/prov-dm/#usage.activity">activity</a> that used an entity @param entity an optional identifier for the <a href="http://www.w3.org/TR/prov-dm/#u...
[ "A", "factory", "method", "to", "create", "an", "instance", "of", "a", "usage", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L977-L982
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseJITOnlyReads
private void parseJITOnlyReads(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_JIT_ONLY_READS); if (null != value) { this.bJITOnlyReads = convertBoolean(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { T...
java
private void parseJITOnlyReads(Map<Object, Object> props) { Object value = props.get(HttpConfigConstants.PROPNAME_JIT_ONLY_READS); if (null != value) { this.bJITOnlyReads = convertBoolean(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { T...
[ "private", "void", "parseJITOnlyReads", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_JIT_ONLY_READS", ")", ";", "if", "(", "null", "!=", "value", "...
Parse the configuration on whether to perform JIT allocate only reads or leave it to the default behavior. @param props
[ "Parse", "the", "configuration", "on", "whether", "to", "perform", "JIT", "allocate", "only", "reads", "or", "leave", "it", "to", "the", "default", "behavior", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1029-L1037
authlete/authlete-java-common
src/main/java/com/authlete/common/util/Utils.java
Utils.stringifyScopeNames
public static String stringifyScopeNames(Scope[] scopes) { if (scopes == null) { return null; } String[] array = new String[scopes.length]; for (int i = 0; i < scopes.length; ++i) { array[i] = (scopes[i] == null) ? null : scopes[i]...
java
public static String stringifyScopeNames(Scope[] scopes) { if (scopes == null) { return null; } String[] array = new String[scopes.length]; for (int i = 0; i < scopes.length; ++i) { array[i] = (scopes[i] == null) ? null : scopes[i]...
[ "public", "static", "String", "stringifyScopeNames", "(", "Scope", "[", "]", "scopes", ")", "{", "if", "(", "scopes", "==", "null", ")", "{", "return", "null", ";", "}", "String", "[", "]", "array", "=", "new", "String", "[", "scopes", ".", "length", ...
Generate a list of scope names. @param scopes An array of {@link Scope}. If {@code null} is given, {@code null} is returned. @return A string containing scope names using white spaces as the delimiter. @since 2.5
[ "Generate", "a", "list", "of", "scope", "names", "." ]
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/Utils.java#L257-L272
mangstadt/biweekly
src/main/java/biweekly/io/ICalTimeZone.java
ICalTimeZone.calculateSortedObservances
private List<Observance> calculateSortedObservances() { List<DaylightSavingsTime> daylights = component.getDaylightSavingsTime(); List<StandardTime> standards = component.getStandardTimes(); int numObservances = standards.size() + daylights.size(); List<Observance> sortedObservances = new ArrayList<Observance>...
java
private List<Observance> calculateSortedObservances() { List<DaylightSavingsTime> daylights = component.getDaylightSavingsTime(); List<StandardTime> standards = component.getStandardTimes(); int numObservances = standards.size() + daylights.size(); List<Observance> sortedObservances = new ArrayList<Observance>...
[ "private", "List", "<", "Observance", ">", "calculateSortedObservances", "(", ")", "{", "List", "<", "DaylightSavingsTime", ">", "daylights", "=", "component", ".", "getDaylightSavingsTime", "(", ")", ";", "List", "<", "StandardTime", ">", "standards", "=", "com...
Builds a list of all the observances in the VTIMEZONE component, sorted by DTSTART. @return the sorted observances
[ "Builds", "a", "list", "of", "all", "the", "observances", "in", "the", "VTIMEZONE", "component", "sorted", "by", "DTSTART", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/ICalTimeZone.java#L106-L135
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/VertexLabel.java
VertexLabel.ensureEdgeLabelExist
public EdgeLabel ensureEdgeLabelExist(final String edgeLabelName, final VertexLabel inVertexLabel) { return this.getSchema().ensureEdgeLabelExist(edgeLabelName, this, inVertexLabel, Collections.emptyMap()); }
java
public EdgeLabel ensureEdgeLabelExist(final String edgeLabelName, final VertexLabel inVertexLabel) { return this.getSchema().ensureEdgeLabelExist(edgeLabelName, this, inVertexLabel, Collections.emptyMap()); }
[ "public", "EdgeLabel", "ensureEdgeLabelExist", "(", "final", "String", "edgeLabelName", ",", "final", "VertexLabel", "inVertexLabel", ")", "{", "return", "this", ".", "getSchema", "(", ")", ".", "ensureEdgeLabelExist", "(", "edgeLabelName", ",", "this", ",", "inVe...
Ensures that the {@link EdgeLabel} exists. It will be created if it does not exists. "this" is the out {@link VertexLabel} and inVertexLabel is the inVertexLabel This method is equivalent to {@link Schema#ensureEdgeLabelExist(String, VertexLabel, VertexLabel, Map)} @param edgeLabelName The EdgeLabel's label's name. @p...
[ "Ensures", "that", "the", "{", "@link", "EdgeLabel", "}", "exists", ".", "It", "will", "be", "created", "if", "it", "does", "not", "exists", ".", "this", "is", "the", "out", "{", "@link", "VertexLabel", "}", "and", "inVertexLabel", "is", "the", "inVertex...
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/VertexLabel.java#L285-L287
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java
ModulePackageIndexFrameWriter.getPackage
protected Content getPackage(PackageElement pkg, ModuleElement mdle) { Content packageLinkContent; Content pkgLabel; if (!pkg.isUnnamed()) { pkgLabel = getPackageLabel(utils.getPackageName(pkg)); packageLinkContent = getHyperLink(pathString(pkg, DocPa...
java
protected Content getPackage(PackageElement pkg, ModuleElement mdle) { Content packageLinkContent; Content pkgLabel; if (!pkg.isUnnamed()) { pkgLabel = getPackageLabel(utils.getPackageName(pkg)); packageLinkContent = getHyperLink(pathString(pkg, DocPa...
[ "protected", "Content", "getPackage", "(", "PackageElement", "pkg", ",", "ModuleElement", "mdle", ")", "{", "Content", "packageLinkContent", ";", "Content", "pkgLabel", ";", "if", "(", "!", "pkg", ".", "isUnnamed", "(", ")", ")", "{", "pkgLabel", "=", "getPa...
Returns each package name as a separate link. @param pkg PackageElement @param mdle the module being documented @return content for the package link
[ "Returns", "each", "package", "name", "as", "a", "separate", "link", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java#L141-L156
rpau/javalang-compiler
src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java
SymbolType.typeVariableOf
private static SymbolType typeVariableOf(String typeVariable, final String name, final int arrayCount, final List<SymbolType> upperBounds, final List<SymbolType> lowerBounds) { return new SymbolType(name, arrayCount, upperBounds, lowerBounds, typeVariable); }
java
private static SymbolType typeVariableOf(String typeVariable, final String name, final int arrayCount, final List<SymbolType> upperBounds, final List<SymbolType> lowerBounds) { return new SymbolType(name, arrayCount, upperBounds, lowerBounds, typeVariable); }
[ "private", "static", "SymbolType", "typeVariableOf", "(", "String", "typeVariable", ",", "final", "String", "name", ",", "final", "int", "arrayCount", ",", "final", "List", "<", "SymbolType", ">", "upperBounds", ",", "final", "List", "<", "SymbolType", ">", "l...
Builds a symbol for a type variable. @param typeVariable the name of the variable @param name type name of the variable @param arrayCount the array dimensions @param upperBounds the upper bounds of the variable @param lowerBounds the lower bounds of the variable @return a SymbolType that represents a variable (for gene...
[ "Builds", "a", "symbol", "for", "a", "type", "variable", "." ]
train
https://github.com/rpau/javalang-compiler/blob/d7da81359161feef2bc7ff186c4e1b73c6a5a8ef/src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java#L817-L820
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.updateExpandedParent
@UiThread private void updateExpandedParent(@NonNull ExpandableWrapper<P, C> parentWrapper, int flatParentPosition, boolean expansionTriggeredByListItemClick) { if (parentWrapper.isExpanded()) { return; } parentWrapper.setExpanded(true); mExpansionStateMap.put(parentWrap...
java
@UiThread private void updateExpandedParent(@NonNull ExpandableWrapper<P, C> parentWrapper, int flatParentPosition, boolean expansionTriggeredByListItemClick) { if (parentWrapper.isExpanded()) { return; } parentWrapper.setExpanded(true); mExpansionStateMap.put(parentWrap...
[ "@", "UiThread", "private", "void", "updateExpandedParent", "(", "@", "NonNull", "ExpandableWrapper", "<", "P", ",", "C", ">", "parentWrapper", ",", "int", "flatParentPosition", ",", "boolean", "expansionTriggeredByListItemClick", ")", "{", "if", "(", "parentWrapper...
Expands a specified parent. Calls through to the ExpandCollapseListener and adds children of the specified parent to the flat list of items. @param parentWrapper The ExpandableWrapper of the parent to expand @param flatParentPosition The index of the parent to expand @param expansionTriggeredByListItemClick true if ex...
[ "Expands", "a", "specified", "parent", ".", "Calls", "through", "to", "the", "ExpandCollapseListener", "and", "adds", "children", "of", "the", "specified", "parent", "to", "the", "flat", "list", "of", "items", "." ]
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L694-L716
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.findByGroupId
@Override public List<CommercePriceList> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
java
@Override public List<CommercePriceList> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommercePriceList", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce price lists where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the se...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "price", "lists", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L1541-L1545
bugsnag/bugsnag-java
bugsnag/src/main/java/com/bugsnag/Report.java
Report.setUser
public Report setUser(String id, String email, String name) { diagnostics.user.put("id", id); diagnostics.user.put("email", email); diagnostics.user.put("name", name); return this; }
java
public Report setUser(String id, String email, String name) { diagnostics.user.put("id", id); diagnostics.user.put("email", email); diagnostics.user.put("name", name); return this; }
[ "public", "Report", "setUser", "(", "String", "id", ",", "String", "email", ",", "String", "name", ")", "{", "diagnostics", ".", "user", ".", "put", "(", "\"id\"", ",", "id", ")", ";", "diagnostics", ".", "user", ".", "put", "(", "\"email\"", ",", "e...
Helper method to set all the user attributes. @param id the identifier of the user. @param email the email of the user. @param name the name of the user. @return the modified report.
[ "Helper", "method", "to", "set", "all", "the", "user", "attributes", "." ]
train
https://github.com/bugsnag/bugsnag-java/blob/11817d63949bcf2b2b6b765a1d37305cdec356f2/bugsnag/src/main/java/com/bugsnag/Report.java#L297-L302
jblas-project/jblas
src/main/java/org/jblas/Eigen.java
Eigen.symmetricGeneralizedEigenvalues
public static DoubleMatrix symmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, int il, int iu) { A.assertSquare(); B.assertSquare(); A.assertSameSize(B); if (iu < il) { throw new IllegalArgumentException("Index exception: make sure iu >= il"); } if (il < 0) { throw new Il...
java
public static DoubleMatrix symmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, int il, int iu) { A.assertSquare(); B.assertSquare(); A.assertSameSize(B); if (iu < il) { throw new IllegalArgumentException("Index exception: make sure iu >= il"); } if (il < 0) { throw new Il...
[ "public", "static", "DoubleMatrix", "symmetricGeneralizedEigenvalues", "(", "DoubleMatrix", "A", ",", "DoubleMatrix", "B", ",", "int", "il", ",", "int", "iu", ")", "{", "A", ".", "assertSquare", "(", ")", ";", "B", ".", "assertSquare", "(", ")", ";", "A", ...
Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of indices for the desired eigenvalues. @param A symmetric...
[ "Computes", "selected", "eigenvalues", "of", "the", "real", "generalized", "symmetric", "-", "definite", "eigenproblem", "of", "the", "form", "A", "x", "=", "L", "B", "x", "or", "equivalently", "(", "A", "-", "L", "B", ")", "x", "=", "0", ".", "Here", ...
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/Eigen.java#L208-L227
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java
ParticleIO.loadConfiguredSystem
public static ParticleSystem loadConfiguredSystem(String ref, Color mask) throws IOException { return loadConfiguredSystem(ResourceLoader.getResourceAsStream(ref), null, null, mask); }
java
public static ParticleSystem loadConfiguredSystem(String ref, Color mask) throws IOException { return loadConfiguredSystem(ResourceLoader.getResourceAsStream(ref), null, null, mask); }
[ "public", "static", "ParticleSystem", "loadConfiguredSystem", "(", "String", "ref", ",", "Color", "mask", ")", "throws", "IOException", "{", "return", "loadConfiguredSystem", "(", "ResourceLoader", ".", "getResourceAsStream", "(", "ref", ")", ",", "null", ",", "nu...
Load a set of configured emitters into a single system @param ref The reference to the XML file (file or classpath) @param mask @return A configured particle system @throws IOException Indicates a failure to find, read or parse the XML file
[ "Load", "a", "set", "of", "configured", "emitters", "into", "a", "single", "system" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleIO.java#L50-L54
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/util/Cron.java
Cron.shouldRun
public static boolean shouldRun(String entry, Date atTime) { entry = entry.trim().toUpperCase(); if (ANNUALLY.equals(entry) || (YEARLY.equals(entry))) { entry = "0 0 1 1 *"; } else if (MONTHLY.equals(entry)) { entry = "0 0 1 * *"; } else if (WEEKLY.equals(entry)) { entry = "0 0 * * 0"; } else if (DAI...
java
public static boolean shouldRun(String entry, Date atTime) { entry = entry.trim().toUpperCase(); if (ANNUALLY.equals(entry) || (YEARLY.equals(entry))) { entry = "0 0 1 1 *"; } else if (MONTHLY.equals(entry)) { entry = "0 0 1 * *"; } else if (WEEKLY.equals(entry)) { entry = "0 0 * * 0"; } else if (DAI...
[ "public", "static", "boolean", "shouldRun", "(", "String", "entry", ",", "Date", "atTime", ")", "{", "entry", "=", "entry", ".", "trim", "(", ")", ".", "toUpperCase", "(", ")", ";", "if", "(", "ANNUALLY", ".", "equals", "(", "entry", ")", "||", "(", ...
Determines if the given CRON entry is runnable at this current moment in time. This mimics the original implementation of the CRON table. <p>This implementation supports only the following types of entries:</p> <ol> <li>Standard Entries having form: &lt;minutes&gt; &lt;hours&gt; &lt;days&gt; &lt;months&gt; &lt;days o...
[ "Determines", "if", "the", "given", "CRON", "entry", "is", "runnable", "at", "this", "current", "moment", "in", "time", ".", "This", "mimics", "the", "original", "implementation", "of", "the", "CRON", "table", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/util/Cron.java#L99-L113
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java
XPathUtils.evaluateAsNodeList
public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) { NodeList result = (NodeList) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODESET); if (result == null) { throw new CitrusRuntimeException("No result for XPath e...
java
public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) { NodeList result = (NodeList) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODESET); if (result == null) { throw new CitrusRuntimeException("No result for XPath e...
[ "public", "static", "NodeList", "evaluateAsNodeList", "(", "Node", "node", ",", "String", "xPathExpression", ",", "NamespaceContext", "nsContext", ")", "{", "NodeList", "result", "=", "(", "NodeList", ")", "evaluateExpression", "(", "node", ",", "xPathExpression", ...
Evaluate XPath expression with result type NodeList. @param node @param xPathExpression @param nsContext @return
[ "Evaluate", "XPath", "expression", "with", "result", "type", "NodeList", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L198-L206
jayantk/jklol
src/com/jayantkrish/jklol/tensor/DenseTensorBuilder.java
DenseTensorBuilder.simpleIncrement
private void simpleIncrement(TensorBase other, double multiplier) { Preconditions.checkArgument(Arrays.equals(other.getDimensionNumbers(), getDimensionNumbers())); if (other instanceof DenseTensorBase) { double[] otherTensorValues = ((DenseTensorBase) other).values; Preconditions.checkArgument(other...
java
private void simpleIncrement(TensorBase other, double multiplier) { Preconditions.checkArgument(Arrays.equals(other.getDimensionNumbers(), getDimensionNumbers())); if (other instanceof DenseTensorBase) { double[] otherTensorValues = ((DenseTensorBase) other).values; Preconditions.checkArgument(other...
[ "private", "void", "simpleIncrement", "(", "TensorBase", "other", ",", "double", "multiplier", ")", "{", "Preconditions", ".", "checkArgument", "(", "Arrays", ".", "equals", "(", "other", ".", "getDimensionNumbers", "(", ")", ",", "getDimensionNumbers", "(", ")"...
Increment algorithm for the case where both tensors have the same set of dimensions. @param other @param multiplier
[ "Increment", "algorithm", "for", "the", "case", "where", "both", "tensors", "have", "the", "same", "set", "of", "dimensions", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/DenseTensorBuilder.java#L197-L214
jhy/jsoup
src/main/java/org/jsoup/safety/Whitelist.java
Whitelist.removeProtocols
public Whitelist removeProtocols(String tag, String attribute, String... removeProtocols) { Validate.notEmpty(tag); Validate.notEmpty(attribute); Validate.notNull(removeProtocols); TagName tagName = TagName.valueOf(tag); AttributeKey attr = AttributeKey.valueOf(attribute); ...
java
public Whitelist removeProtocols(String tag, String attribute, String... removeProtocols) { Validate.notEmpty(tag); Validate.notEmpty(attribute); Validate.notNull(removeProtocols); TagName tagName = TagName.valueOf(tag); AttributeKey attr = AttributeKey.valueOf(attribute); ...
[ "public", "Whitelist", "removeProtocols", "(", "String", "tag", ",", "String", "attribute", ",", "String", "...", "removeProtocols", ")", "{", "Validate", ".", "notEmpty", "(", "tag", ")", ";", "Validate", ".", "notEmpty", "(", "attribute", ")", ";", "Valida...
Remove allowed URL protocols for an element's URL attribute. If you remove all protocols for an attribute, that attribute will allow any protocol. <p> E.g.: <code>removeProtocols("a", "href", "ftp")</code> </p> @param tag Tag the URL protocol is for @param attribute Attribute name @param removeProtocols List of invali...
[ "Remove", "allowed", "URL", "protocols", "for", "an", "element", "s", "URL", "attribute", ".", "If", "you", "remove", "all", "protocols", "for", "an", "attribute", "that", "attribute", "will", "allow", "any", "protocol", ".", "<p", ">", "E", ".", "g", "....
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/safety/Whitelist.java#L452-L478
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/FormDataParser.java
FormDataParser.getObject
private static JsonObject getObject(JSONArray array, int index) throws IOException { // We can't just jam an entry into the array without // checking that earlier indexes exist. Also we need // to account for 0 versus 1 based indexing. // Index changed to 0 based i...
java
private static JsonObject getObject(JSONArray array, int index) throws IOException { // We can't just jam an entry into the array without // checking that earlier indexes exist. Also we need // to account for 0 versus 1 based indexing. // Index changed to 0 based i...
[ "private", "static", "JsonObject", "getObject", "(", "JSONArray", "array", ",", "int", "index", ")", "throws", "IOException", "{", "// We can't just jam an entry into the array without", "// checking that earlier indexes exist. Also we need", "// to account for 0 versus 1 based ind...
Get a child JSON Object from an incoming JSON array. If the child does not exist it will be created, along with any smaller index values. The index is expected to be 1 based (like form data). It is only valid for form arrays to hold JSON Objects. @param array The incoming array we are to look inside @param index The ...
[ "Get", "a", "child", "JSON", "Object", "from", "an", "incoming", "JSON", "array", ".", "If", "the", "child", "does", "not", "exist", "it", "will", "be", "created", "along", "with", "any", "smaller", "index", "values", ".", "The", "index", "is", "expected...
train
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/FormDataParser.java#L231-L260
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.readBytes
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { boolean release = true; ByteBuf dst = alloc.buffer(length); try { buffer.readBytes(dst); release = false; return dst; } finally { if (release) { ...
java
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { boolean release = true; ByteBuf dst = alloc.buffer(length); try { buffer.readBytes(dst); release = false; return dst; } finally { if (release) { ...
[ "public", "static", "ByteBuf", "readBytes", "(", "ByteBufAllocator", "alloc", ",", "ByteBuf", "buffer", ",", "int", "length", ")", "{", "boolean", "release", "=", "true", ";", "ByteBuf", "dst", "=", "alloc", ".", "buffer", "(", "length", ")", ";", "try", ...
Read the given amount of bytes into a new {@link ByteBuf} that is allocated from the {@link ByteBufAllocator}.
[ "Read", "the", "given", "amount", "of", "bytes", "into", "a", "new", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L442-L454
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.extractWords
public static List<WordInfo> extractWords(BufferedReader reader, int size) throws IOException { return extractWords(reader, size, false); }
java
public static List<WordInfo> extractWords(BufferedReader reader, int size) throws IOException { return extractWords(reader, size, false); }
[ "public", "static", "List", "<", "WordInfo", ">", "extractWords", "(", "BufferedReader", "reader", ",", "int", "size", ")", "throws", "IOException", "{", "return", "extractWords", "(", "reader", ",", "size", ",", "false", ")", ";", "}" ]
提取词语 @param reader 从reader获取文本 @param size 需要提取词语的数量 @return 一个词语列表
[ "提取词语" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L744-L747
influxdata/influxdb-java
src/main/java/org/influxdb/impl/Preconditions.java
Preconditions.checkDuration
public static void checkDuration(final String duration, final String name) throws IllegalArgumentException { if (!duration.matches("(\\d+[wdmhs])+|inf")) { throw new IllegalArgumentException("Invalid InfluxDB duration: " + duration + " for " + name); } }
java
public static void checkDuration(final String duration, final String name) throws IllegalArgumentException { if (!duration.matches("(\\d+[wdmhs])+|inf")) { throw new IllegalArgumentException("Invalid InfluxDB duration: " + duration + " for " + name); } }
[ "public", "static", "void", "checkDuration", "(", "final", "String", "duration", ",", "final", "String", "name", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "duration", ".", "matches", "(", "\"(\\\\d+[wdmhs])+|inf\"", ")", ")", "{", "throw", ...
Enforces that the duration is a valid influxDB duration. @param duration the duration to test @param name variable name for reporting @throws IllegalArgumentException if the given duration is not valid.
[ "Enforces", "that", "the", "duration", "is", "a", "valid", "influxDB", "duration", "." ]
train
https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/Preconditions.java#L56-L61
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForFragment
public boolean waitForFragment(String tag, int id, int timeout){ long endTime = SystemClock.uptimeMillis() + timeout; while (SystemClock.uptimeMillis() <= endTime) { if(getSupportFragment(tag, id) != null) return true; if(getFragment(tag, id) != null) return true; } return false; }
java
public boolean waitForFragment(String tag, int id, int timeout){ long endTime = SystemClock.uptimeMillis() + timeout; while (SystemClock.uptimeMillis() <= endTime) { if(getSupportFragment(tag, id) != null) return true; if(getFragment(tag, id) != null) return true; } return false; }
[ "public", "boolean", "waitForFragment", "(", "String", "tag", ",", "int", "id", ",", "int", "timeout", ")", "{", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "timeout", ";", "while", "(", "SystemClock", ".", "uptimeMillis", "(...
Waits for a Fragment with a given tag or id to appear. @param tag the name of the tag or null if no tag @param id the id of the tag @param timeout the amount of time in milliseconds to wait @return true if fragment appears and false if it does not appear before the timeout
[ "Waits", "for", "a", "Fragment", "with", "a", "given", "tag", "or", "id", "to", "appear", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L682-L693
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java
NameUtil.getHomeBeanClassName
public static String getHomeBeanClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String packageName = null; String homeInterfaceName = getHomeInterfaceName(enterpriseBean); // LIDB2281.24.2 made several changes to code below, to accommodate case // where ne...
java
public static String getHomeBeanClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String packageName = null; String homeInterfaceName = getHomeInterfaceName(enterpriseBean); // LIDB2281.24.2 made several changes to code below, to accommodate case // where ne...
[ "public", "static", "String", "getHomeBeanClassName", "(", "EnterpriseBean", "enterpriseBean", ",", "boolean", "isPost11DD", ")", "// d114199", "{", "String", "packageName", "=", "null", ";", "String", "homeInterfaceName", "=", "getHomeInterfaceName", "(", "enterpriseBe...
Return the name of the deployed home bean class. Assumption here is the package name of the local and remote interfaces are the same. This method uses the last package name found in either the remote or local interface, if one or the other exist. If neither is found, null is returned. @param enterpriseBean WCCM object...
[ "Return", "the", "name", "of", "the", "deployed", "home", "bean", "class", ".", "Assumption", "here", "is", "the", "package", "name", "of", "the", "local", "and", "remote", "interfaces", "are", "the", "same", ".", "This", "method", "uses", "the", "last", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java#L367-L399
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.read07BySax
public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { try { return new Excel07SaxReader(rowHandler).read(in, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); ...
java
public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { try { return new Excel07SaxReader(rowHandler).read(in, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); ...
[ "public", "static", "Excel07SaxReader", "read07BySax", "(", "InputStream", "in", ",", "int", "sheetIndex", ",", "RowHandler", "rowHandler", ")", "{", "try", "{", "return", "new", "Excel07SaxReader", "(", "rowHandler", ")", ".", "read", "(", "in", ",", "sheetIn...
Sax方式读取Excel07 @param in 输入流 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0
[ "Sax方式读取Excel07" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L89-L95
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/util/HexHelper.java
HexHelper.fromHex
public static final byte[] fromHex(final String value) { if (value.length() == 0) return new byte[0]; else if (value.indexOf(':') != -1) return fromHex(':', value); else if (value.length() % 2 != 0) throw new IllegalArgumentException("Invalid hex specified: uneven number of digits passed for byte[] conv...
java
public static final byte[] fromHex(final String value) { if (value.length() == 0) return new byte[0]; else if (value.indexOf(':') != -1) return fromHex(':', value); else if (value.length() % 2 != 0) throw new IllegalArgumentException("Invalid hex specified: uneven number of digits passed for byte[] conv...
[ "public", "static", "final", "byte", "[", "]", "fromHex", "(", "final", "String", "value", ")", "{", "if", "(", "value", ".", "length", "(", ")", "==", "0", ")", "return", "new", "byte", "[", "0", "]", ";", "else", "if", "(", "value", ".", "index...
Decodes a hexidecimal string into a series of bytes @param value @return
[ "Decodes", "a", "hexidecimal", "string", "into", "a", "series", "of", "bytes" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/util/HexHelper.java#L24-L44
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/FastAggregation.java
FastAggregation.priorityqueue_xor
public static RoaringBitmap priorityqueue_xor(RoaringBitmap... bitmaps) { // TODO: This code could be faster, see priorityqueue_or if (bitmaps.length == 0) { return new RoaringBitmap(); } PriorityQueue<RoaringBitmap> pq = new PriorityQueue<>(bitmaps.length, new Comparator<RoaringBitmap>()...
java
public static RoaringBitmap priorityqueue_xor(RoaringBitmap... bitmaps) { // TODO: This code could be faster, see priorityqueue_or if (bitmaps.length == 0) { return new RoaringBitmap(); } PriorityQueue<RoaringBitmap> pq = new PriorityQueue<>(bitmaps.length, new Comparator<RoaringBitmap>()...
[ "public", "static", "RoaringBitmap", "priorityqueue_xor", "(", "RoaringBitmap", "...", "bitmaps", ")", "{", "// TODO: This code could be faster, see priorityqueue_or", "if", "(", "bitmaps", ".", "length", "==", "0", ")", "{", "return", "new", "RoaringBitmap", "(", ")"...
Uses a priority queue to compute the xor aggregate. This function runs in linearithmic (O(n log n)) time with respect to the number of bitmaps. @param bitmaps input bitmaps @return aggregated bitmap @see #horizontal_xor(RoaringBitmap...)
[ "Uses", "a", "priority", "queue", "to", "compute", "the", "xor", "aggregate", "." ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/FastAggregation.java#L494-L514
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/curvatures/OmsCurvaturesBivariate.java
OmsCurvaturesBivariate.calculateCurvatures
public static void calculateCurvatures( RandomIter elevationIter, final double[] planTangProf, int ncols, int nrows, int col, int row, double xRes, double yRes, double disXX, double disYY, int windowSize ) { GridNode node = new GridNode(elevationIter, ncols, nrows, xRes, yRes, col, row); do...
java
public static void calculateCurvatures( RandomIter elevationIter, final double[] planTangProf, int ncols, int nrows, int col, int row, double xRes, double yRes, double disXX, double disYY, int windowSize ) { GridNode node = new GridNode(elevationIter, ncols, nrows, xRes, yRes, col, row); do...
[ "public", "static", "void", "calculateCurvatures", "(", "RandomIter", "elevationIter", ",", "final", "double", "[", "]", "planTangProf", ",", "int", "ncols", ",", "int", "nrows", ",", "int", "col", ",", "int", "row", ",", "double", "xRes", ",", "double", "...
Calculate curvatures for a single cell. @param elevationIter the elevation map. @param planTangProf the array into which to insert the resulting [plan, tang, prof] curvatures. @param col the column to process. @param row the row to process. @param ncols the columns of the raster. @param nrows the rows of the raster. @...
[ "Calculate", "curvatures", "for", "a", "single", "cell", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/curvatures/OmsCurvaturesBivariate.java#L175-L211
pushtorefresh/storio
storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java
Checks.checkNotEmpty
public static void checkNotEmpty(@Nullable String value, @NonNull String message) { if (value == null) { throw new NullPointerException(message); } else if (value.length() == 0) { throw new IllegalStateException(message); } }
java
public static void checkNotEmpty(@Nullable String value, @NonNull String message) { if (value == null) { throw new NullPointerException(message); } else if (value.length() == 0) { throw new IllegalStateException(message); } }
[ "public", "static", "void", "checkNotEmpty", "(", "@", "Nullable", "String", "value", ",", "@", "NonNull", "String", "message", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "message", ")", ";", "}", "...
Checks that passed string is not null and not empty, throws {@link NullPointerException} or {@link IllegalStateException} with passed message if string is null or empty. @param value a string to check @param message exception message if object is null
[ "Checks", "that", "passed", "string", "is", "not", "null", "and", "not", "empty", "throws", "{", "@link", "NullPointerException", "}", "or", "{", "@link", "IllegalStateException", "}", "with", "passed", "message", "if", "string", "is", "null", "or", "empty", ...
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java#L38-L44
reapzor/FiloFirmata
src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java
Firmata.addMessageListener
public void addMessageListener(DigitalChannel channel, MessageListener<? extends Message> messageListener) { addListener(channel.getIdentifier(), messageListener.getMessageType(), messageListener); }
java
public void addMessageListener(DigitalChannel channel, MessageListener<? extends Message> messageListener) { addListener(channel.getIdentifier(), messageListener.getMessageType(), messageListener); }
[ "public", "void", "addMessageListener", "(", "DigitalChannel", "channel", ",", "MessageListener", "<", "?", "extends", "Message", ">", "messageListener", ")", "{", "addListener", "(", "channel", ".", "getIdentifier", "(", ")", ",", "messageListener", ".", "getMess...
Add a messageListener to the Firmata object which will fire whenever a matching message is received over the SerialPort that corresponds to the given DigitalChannel. @param channel DigitalChannel to listen on @param messageListener MessageListener object to handle a received Message event over the SerialPort.
[ "Add", "a", "messageListener", "to", "the", "Firmata", "object", "which", "will", "fire", "whenever", "a", "matching", "message", "is", "received", "over", "the", "SerialPort", "that", "corresponds", "to", "the", "given", "DigitalChannel", "." ]
train
https://github.com/reapzor/FiloFirmata/blob/39c26c1a577b8fff8690245e105cb62e02284f16/src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java#L185-L187
Red5/red5-server-common
src/main/java/org/red5/server/stream/ClientBroadcastStream.java
ClientBroadcastStream.onOOBControlMessage
public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg) { String target = oobCtrlMsg.getTarget(); if ("ClientBroadcastStream".equals(target)) { String serviceName = oobCtrlMsg.getServiceName(); if ("chunkSize".equals(serviceName)) {...
java
public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg) { String target = oobCtrlMsg.getTarget(); if ("ClientBroadcastStream".equals(target)) { String serviceName = oobCtrlMsg.getServiceName(); if ("chunkSize".equals(serviceName)) {...
[ "public", "void", "onOOBControlMessage", "(", "IMessageComponent", "source", ",", "IPipe", "pipe", ",", "OOBControlMessage", "oobCtrlMsg", ")", "{", "String", "target", "=", "oobCtrlMsg", ".", "getTarget", "(", ")", ";", "if", "(", "\"ClientBroadcastStream\"", "."...
Out-of-band control message handler @param source OOB message source @param pipe Pipe that used to send OOB message @param oobCtrlMsg Out-of-band control message
[ "Out", "-", "of", "-", "band", "control", "message", "handler" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/ClientBroadcastStream.java#L583-L596
feroult/yawp
yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java
ResourceFinder.mapAllStrings
public Map<String, String> mapAllStrings(String uri) throws IOException { Map<String, String> strings = new HashMap<>(); Map<String, URL> resourcesMap = getResourcesMap(uri); for (Iterator iterator = resourcesMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.En...
java
public Map<String, String> mapAllStrings(String uri) throws IOException { Map<String, String> strings = new HashMap<>(); Map<String, URL> resourcesMap = getResourcesMap(uri); for (Iterator iterator = resourcesMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.En...
[ "public", "Map", "<", "String", ",", "String", ">", "mapAllStrings", "(", "String", "uri", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "String", ">", "strings", "=", "new", "HashMap", "<>", "(", ")", ";", "Map", "<", "String", ",", ...
Reads the contents of all non-directory URLs immediately under the specified location and returns them in a map keyed by the file name. <p/> Any URLs that cannot be read will cause an exception to be thrown. <p/> Example classpath: <p/> META-INF/serializables/one META-INF/serializables/two META-INF/serializables/three ...
[ "Reads", "the", "contents", "of", "all", "non", "-", "directory", "URLs", "immediately", "under", "the", "specified", "location", "and", "returns", "them", "in", "a", "map", "keyed", "by", "the", "file", "name", ".", "<p", "/", ">", "Any", "URLs", "that"...
train
https://github.com/feroult/yawp/blob/b90deb905edd3fdb3009a5525e310cd17ead7f3d/yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java#L235-L246
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
FetchActiveFlowDao.fetchUnfinishedFlows
Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { try { return this.dbOperator.query(FetchActiveExecutableFlows.FETCH_UNFINISHED_EXECUTABLE_FLOWS, new FetchActiveExecutableFlows()); } catch (final SQLException e) { throw n...
java
Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { try { return this.dbOperator.query(FetchActiveExecutableFlows.FETCH_UNFINISHED_EXECUTABLE_FLOWS, new FetchActiveExecutableFlows()); } catch (final SQLException e) { throw n...
[ "Map", "<", "Integer", ",", "Pair", "<", "ExecutionReference", ",", "ExecutableFlow", ">", ">", "fetchUnfinishedFlows", "(", ")", "throws", "ExecutorManagerException", "{", "try", "{", "return", "this", ".", "dbOperator", ".", "query", "(", "FetchActiveExecutableF...
Fetch flows that are not in finished status, including both dispatched and non-dispatched flows. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
[ "Fetch", "flows", "that", "are", "not", "in", "finished", "status", "including", "both", "dispatched", "and", "non", "-", "dispatched", "flows", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java#L113-L121
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.createForRevisions
public <T> String createForRevisions(Class<T> clazz, SubscriptionCreationOptions options, String database) { options = ObjectUtils.firstNonNull(options, new SubscriptionCreationOptions()); return create(ensureCriteria(options, clazz, true), database); }
java
public <T> String createForRevisions(Class<T> clazz, SubscriptionCreationOptions options, String database) { options = ObjectUtils.firstNonNull(options, new SubscriptionCreationOptions()); return create(ensureCriteria(options, clazz, true), database); }
[ "public", "<", "T", ">", "String", "createForRevisions", "(", "Class", "<", "T", ">", "clazz", ",", "SubscriptionCreationOptions", "options", ",", "String", "database", ")", "{", "options", "=", "ObjectUtils", ".", "firstNonNull", "(", "options", ",", "new", ...
Creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type. @param options Subscription options @param clazz Document class @param <T> Document class @param database Target database @return created subscription
[ "Creates", "a", "data", "subscription", "in", "a", "database", ".", "The", "subscription", "will", "expose", "all", "documents", "that", "match", "the", "specified", "subscription", "options", "for", "a", "given", "type", "." ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L120-L123
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java
HCHead.addJSAt
@Nonnull public final HCHead addJSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aJS) { ValueEnforcer.notNull (aJS, "JS"); if (!HCJSNodeDetector.isJSNode (aJS)) throw new IllegalArgumentException (aJS + " is not a valid JS node!"); m_aJS.add (nIndex, aJS); return this; }
java
@Nonnull public final HCHead addJSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aJS) { ValueEnforcer.notNull (aJS, "JS"); if (!HCJSNodeDetector.isJSNode (aJS)) throw new IllegalArgumentException (aJS + " is not a valid JS node!"); m_aJS.add (nIndex, aJS); return this; }
[ "@", "Nonnull", "public", "final", "HCHead", "addJSAt", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "IHCNode", "aJS", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aJS", ",", "\"JS\"", ")", ";", "if", "(", "!", "...
Append some JavaScript code at the specified index @param nIndex The index where the JS should be added (counting only JS elements) @param aJS The JS to be added. May not be <code>null</code>. @return this
[ "Append", "some", "JavaScript", "code", "at", "the", "specified", "index" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java#L281-L289
jetty-project/jetty-npn
npn-boot/src/main/java/sun/security/ssl/ServerHandshaker.java
ServerHandshaker.clientKeyExchange
private SecretKey clientKeyExchange(KerberosClientKeyExchange mesg) throws IOException { if (debug != null && Debug.isOn("handshake")) { mesg.print(System.out); } // Record the principals involved in exchange session.setPeerPrincipal(mesg.getPeerPrincipal()); ...
java
private SecretKey clientKeyExchange(KerberosClientKeyExchange mesg) throws IOException { if (debug != null && Debug.isOn("handshake")) { mesg.print(System.out); } // Record the principals involved in exchange session.setPeerPrincipal(mesg.getPeerPrincipal()); ...
[ "private", "SecretKey", "clientKeyExchange", "(", "KerberosClientKeyExchange", "mesg", ")", "throws", "IOException", "{", "if", "(", "debug", "!=", "null", "&&", "Debug", ".", "isOn", "(", "\"handshake\"", ")", ")", "{", "mesg", ".", "print", "(", "System", ...
/* For Kerberos ciphers, the premaster secret is encrypted using the session key. See RFC 2712.
[ "/", "*", "For", "Kerberos", "ciphers", "the", "premaster", "secret", "is", "encrypted", "using", "the", "session", "key", ".", "See", "RFC", "2712", "." ]
train
https://github.com/jetty-project/jetty-npn/blob/a26a7a5eabeeb57a63c6ee08fcf9b8cec1fa6c0d/npn-boot/src/main/java/sun/security/ssl/ServerHandshaker.java#L1394-L1407
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.vacateZone
public static Cluster vacateZone(Cluster currentCluster, int dropZoneId) { Cluster returnCluster = Cluster.cloneCluster(currentCluster); // Go over each node in the zone being dropped for(Integer nodeId: currentCluster.getNodeIdsInZone(dropZoneId)) { // For each node grab all the par...
java
public static Cluster vacateZone(Cluster currentCluster, int dropZoneId) { Cluster returnCluster = Cluster.cloneCluster(currentCluster); // Go over each node in the zone being dropped for(Integer nodeId: currentCluster.getNodeIdsInZone(dropZoneId)) { // For each node grab all the par...
[ "public", "static", "Cluster", "vacateZone", "(", "Cluster", "currentCluster", ",", "int", "dropZoneId", ")", "{", "Cluster", "returnCluster", "=", "Cluster", ".", "cloneCluster", "(", "currentCluster", ")", ";", "// Go over each node in the zone being dropped", "for", ...
Given the current cluster and a zone id that needs to be dropped, this method will remove all partitions from the zone that is being dropped and move it to the existing zones. The partitions are moved intelligently so as not to avoid any data movement in the existing zones. This is achieved by moving the partitions to...
[ "Given", "the", "current", "cluster", "and", "a", "zone", "id", "that", "needs", "to", "be", "dropped", "this", "method", "will", "remove", "all", "partitions", "from", "the", "zone", "that", "is", "being", "dropped", "and", "move", "it", "to", "the", "e...
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L295-L325
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/GuestWindowsRegistryManager.java
GuestWindowsRegistryManager.deleteRegistryKeyInGuest
public void deleteRegistryKeyInGuest(VirtualMachine vm, GuestAuthentication auth, GuestRegKeyNameSpec keyName, boolean recursive) throws GuestComponentsOutOfDate, GuestOperationsFault, GuestOperationsUnavailable, GuestPermissionDenied, GuestRegistryKeyHasSubkeys, GuestRegistryKeyInvalid, InvalidGuestLogin, Inva...
java
public void deleteRegistryKeyInGuest(VirtualMachine vm, GuestAuthentication auth, GuestRegKeyNameSpec keyName, boolean recursive) throws GuestComponentsOutOfDate, GuestOperationsFault, GuestOperationsUnavailable, GuestPermissionDenied, GuestRegistryKeyHasSubkeys, GuestRegistryKeyInvalid, InvalidGuestLogin, Inva...
[ "public", "void", "deleteRegistryKeyInGuest", "(", "VirtualMachine", "vm", ",", "GuestAuthentication", "auth", ",", "GuestRegKeyNameSpec", "keyName", ",", "boolean", "recursive", ")", "throws", "GuestComponentsOutOfDate", ",", "GuestOperationsFault", ",", "GuestOperationsUn...
Delete a registry key. @param vm Virtual machine to perform the operation on. @param auth The guest authentication data. @param keyName The path to the registry key to be deleted. @param recursive If true, the key is deleted along with any subkeys (if present). Otherwise, it shall only delete the key if ...
[ "Delete", "a", "registry", "key", "." ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/GuestWindowsRegistryManager.java#L92-L96
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/UsersInner.java
UsersInner.updateAsync
public Observable<UserInner> updateAsync(String resourceGroupName, String labAccountName, String labName, String userName, UserFragment user) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, userName, user).map(new Func1<ServiceResponse<UserInner>, UserInner>() { @...
java
public Observable<UserInner> updateAsync(String resourceGroupName, String labAccountName, String labName, String userName, UserFragment user) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, userName, user).map(new Func1<ServiceResponse<UserInner>, UserInner>() { @...
[ "public", "Observable", "<", "UserInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "String", "userName", ",", "UserFragment", "user", ")", "{", "return", "updateWithServiceResponseAsync", ...
Modify properties of users. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param userName The name of the user. @param user The User registered to a lab @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Modify", "properties", "of", "users", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/UsersInner.java#L908-L915
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java
WebConfigParamUtils.getIntegerInitParameter
public static int getIntegerInitParameter(ExternalContext context, String name, int defaultValue) { if (name == null) { throw new NullPointerException(); } String param = getStringInitParameter(context, name); if (param == null) { return defau...
java
public static int getIntegerInitParameter(ExternalContext context, String name, int defaultValue) { if (name == null) { throw new NullPointerException(); } String param = getStringInitParameter(context, name); if (param == null) { return defau...
[ "public", "static", "int", "getIntegerInitParameter", "(", "ExternalContext", "context", ",", "String", "name", ",", "int", "defaultValue", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "Stri...
Gets the int init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param name the init parameter's name @param deprecatedName the init parameter's deprecated name. @param defaultValue the default value ...
[ "Gets", "the", "int", "init", "parameter", "value", "from", "the", "specified", "context", ".", "If", "the", "parameter", "was", "not", "specified", "the", "default", "value", "is", "used", "instead", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java#L457-L473
HtmlUnit/htmlunit-cssparser
src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java
AbstractCSSParser.doubleValue
protected double doubleValue(final char op, final String s) { final double result = Double.parseDouble(s); if (op == '-') { return -1 * result; } return result; }
java
protected double doubleValue(final char op, final String s) { final double result = Double.parseDouble(s); if (op == '-') { return -1 * result; } return result; }
[ "protected", "double", "doubleValue", "(", "final", "char", "op", ",", "final", "String", "s", ")", "{", "final", "double", "result", "=", "Double", ".", "parseDouble", "(", "s", ")", ";", "if", "(", "op", "==", "'", "'", ")", "{", "return", "-", "...
Parses the sting into an double. @param op the sign char @param s the string to parse @return the double value
[ "Parses", "the", "sting", "into", "an", "double", "." ]
train
https://github.com/HtmlUnit/htmlunit-cssparser/blob/384e4170737169b5b4c87c5766495d9b8a6d3866/src/main/java/com/gargoylesoftware/css/parser/AbstractCSSParser.java#L767-L773
bit3/jsass
example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java
JsassServlet.resolveImport
private Collection<Import> resolveImport(Path path) throws IOException, URISyntaxException { URL resource = resolveResource(path); if (null == resource) { return null; } // calculate a webapp absolute URI final URI uri = new URI( Paths.get("/").resolve( Paths.get(getServletContext().getResource("/...
java
private Collection<Import> resolveImport(Path path) throws IOException, URISyntaxException { URL resource = resolveResource(path); if (null == resource) { return null; } // calculate a webapp absolute URI final URI uri = new URI( Paths.get("/").resolve( Paths.get(getServletContext().getResource("/...
[ "private", "Collection", "<", "Import", ">", "resolveImport", "(", "Path", "path", ")", "throws", "IOException", ",", "URISyntaxException", "{", "URL", "resource", "=", "resolveResource", "(", "path", ")", ";", "if", "(", "null", "==", "resource", ")", "{", ...
Try to determine the import object for a given path. @param path The path to resolve. @return The import object or {@code null} if the file was not found.
[ "Try", "to", "determine", "the", "import", "object", "for", "a", "given", "path", "." ]
train
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/example/webapp/src/main/java/io/bit3/jsass/example/webapp/JsassServlet.java#L139-L156
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.catalog_formatted_privateCloudReseller_GET
public net.minidev.ovh.api.order.catalog.pcc.OvhCatalog catalog_formatted_privateCloudReseller_GET(OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException { String qPath = "/order/catalog/formatted/privateCloudReseller"; StringBuilder sb = path(qPath); query(sb, "ovhSubsidiary", ovhSubsidiary); String resp = exe...
java
public net.minidev.ovh.api.order.catalog.pcc.OvhCatalog catalog_formatted_privateCloudReseller_GET(OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException { String qPath = "/order/catalog/formatted/privateCloudReseller"; StringBuilder sb = path(qPath); query(sb, "ovhSubsidiary", ovhSubsidiary); String resp = exe...
[ "public", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "order", ".", "catalog", ".", "pcc", ".", "OvhCatalog", "catalog_formatted_privateCloudReseller_GET", "(", "OvhOvhSubsidiaryEnum", "ovhSubsidiary", ")", "throws", "IOException", "{", "String", "qPath", ...
Retrieve information of Private Cloud Reseller catalog REST: GET /order/catalog/formatted/privateCloudReseller @param ovhSubsidiary [required] Subsidiary of the country you want to consult catalog
[ "Retrieve", "information", "of", "Private", "Cloud", "Reseller", "catalog" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L7205-L7211
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobStore.java
BlobStore.createBlob
public void createBlob(String key, byte [] data, SettableBlobMeta meta) throws KeyAlreadyExistsException, IOException { AtomicOutputStream out = null; try { out = createBlob(key, meta); out.write(data); out.close(); out = null; } finally { ...
java
public void createBlob(String key, byte [] data, SettableBlobMeta meta) throws KeyAlreadyExistsException, IOException { AtomicOutputStream out = null; try { out = createBlob(key, meta); out.write(data); out.close(); out = null; } finally { ...
[ "public", "void", "createBlob", "(", "String", "key", ",", "byte", "[", "]", "data", ",", "SettableBlobMeta", "meta", ")", "throws", "KeyAlreadyExistsException", ",", "IOException", "{", "AtomicOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", ...
Wrapper called to create the blob which contains the byte data @param key Key for the blob. @param data Byte data that needs to be uploaded. @param meta Metadata which contains the acls information @throws KeyAlreadyExistsException @throws IOException
[ "Wrapper", "called", "to", "create", "the", "blob", "which", "contains", "the", "byte", "data" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobStore.java#L165-L177
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/subnetwork/PrepareRoutingSubnetworks.java
PrepareRoutingSubnetworks.removeEdges
int removeEdges(final PrepEdgeFilter bothFilter, List<IntArrayList> components, int min) { // remove edges determined from nodes but only if less than minimum size EdgeExplorer explorer = ghStorage.createEdgeExplorer(bothFilter); int removedEdges = 0; for (IntArrayList component : compon...
java
int removeEdges(final PrepEdgeFilter bothFilter, List<IntArrayList> components, int min) { // remove edges determined from nodes but only if less than minimum size EdgeExplorer explorer = ghStorage.createEdgeExplorer(bothFilter); int removedEdges = 0; for (IntArrayList component : compon...
[ "int", "removeEdges", "(", "final", "PrepEdgeFilter", "bothFilter", ",", "List", "<", "IntArrayList", ">", "components", ",", "int", "min", ")", "{", "// remove edges determined from nodes but only if less than minimum size", "EdgeExplorer", "explorer", "=", "ghStorage", ...
This method removes the access to edges available from the nodes contained in the components. But only if a components' size is smaller then the specified min value. @return number of removed edges
[ "This", "method", "removes", "the", "access", "to", "edges", "available", "from", "the", "nodes", "contained", "in", "the", "components", ".", "But", "only", "if", "a", "components", "size", "is", "smaller", "then", "the", "specified", "min", "value", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/subnetwork/PrepareRoutingSubnetworks.java#L216-L224