repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
box/box-java-sdk
src/main/java/com/box/sdk/BoxAPIConnection.java
BoxAPIConnection.getAuthorizationURL
public static URL getAuthorizationURL(String clientID, URI redirectUri, String state, List<String> scopes) { """ Return the authorization URL which is used to perform the authorization_code based OAuth2 flow. @param clientID the client ID to use with the connection. @param redirectUri the URL to which Box redire...
java
public static URL getAuthorizationURL(String clientID, URI redirectUri, String state, List<String> scopes) { URLTemplate template = new URLTemplate(AUTHORIZATION_URL); QueryStringBuilder queryBuilder = new QueryStringBuilder().appendParam("client_id", clientID) .appendParam("response_typ...
[ "public", "static", "URL", "getAuthorizationURL", "(", "String", "clientID", ",", "URI", "redirectUri", ",", "String", "state", ",", "List", "<", "String", ">", "scopes", ")", "{", "URLTemplate", "template", "=", "new", "URLTemplate", "(", "AUTHORIZATION_URL", ...
Return the authorization URL which is used to perform the authorization_code based OAuth2 flow. @param clientID the client ID to use with the connection. @param redirectUri the URL to which Box redirects the browser when authentication completes. @param state the text string that you choose. Box sends the same string t...
[ "Return", "the", "authorization", "URL", "which", "is", "used", "to", "perform", "the", "authorization_code", "based", "OAuth2", "flow", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxAPIConnection.java#L162-L184
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/mult/VectorVectorMult_ZDRM.java
VectorVectorMult_ZDRM.outerProd
public static void outerProd(ZMatrixRMaj x, ZMatrixRMaj y, ZMatrixRMaj A ) { """ <p> Sets A &isin; &real; <sup>m &times; n</sup> equal to an outer product multiplication of the two vectors. This is also known as a rank-1 operation.<br> <br> A = x * y<sup>T</sup> where x &isin; &real; <sup>m</sup> and y &isin...
java
public static void outerProd(ZMatrixRMaj x, ZMatrixRMaj y, ZMatrixRMaj A ) { int m = A.numRows; int n = A.numCols; int index = 0; for( int i = 0; i < m; i++ ) { double realX = x.data[i*2]; double imagX = x.data[i*2+1]; int indexY = 0; for...
[ "public", "static", "void", "outerProd", "(", "ZMatrixRMaj", "x", ",", "ZMatrixRMaj", "y", ",", "ZMatrixRMaj", "A", ")", "{", "int", "m", "=", "A", ".", "numRows", ";", "int", "n", "=", "A", ".", "numCols", ";", "int", "index", "=", "0", ";", "for"...
<p> Sets A &isin; &real; <sup>m &times; n</sup> equal to an outer product multiplication of the two vectors. This is also known as a rank-1 operation.<br> <br> A = x * y<sup>T</sup> where x &isin; &real; <sup>m</sup> and y &isin; &real; <sup>n</sup> are vectors. </p> <p> Which is equivalent to: A<sub>ij</sub> = x<sub>...
[ "<p", ">", "Sets", "A", "&isin", ";", "&real", ";", "<sup", ">", "m", "&times", ";", "n<", "/", "sup", ">", "equal", "to", "an", "outer", "product", "multiplication", "of", "the", "two", "vectors", ".", "This", "is", "also", "known", "as", "a", "ra...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/mult/VectorVectorMult_ZDRM.java#L129-L147
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java
ElementPlugin.registerListener
public void registerListener(IPluginEventListener listener) { """ Registers a listener for the IPluginEventListener callback event. If the listener has already been registered, the request is ignored. @param listener Listener to be registered. """ if (pluginEventListeners2 == null) { pl...
java
public void registerListener(IPluginEventListener listener) { if (pluginEventListeners2 == null) { pluginEventListeners2 = new ArrayList<>(); } if (!pluginEventListeners2.contains(listener)) { pluginEventListeners2.add(listener); listener.onPluginEvent(new Pl...
[ "public", "void", "registerListener", "(", "IPluginEventListener", "listener", ")", "{", "if", "(", "pluginEventListeners2", "==", "null", ")", "{", "pluginEventListeners2", "=", "new", "ArrayList", "<>", "(", ")", ";", "}", "if", "(", "!", "pluginEventListeners...
Registers a listener for the IPluginEventListener callback event. If the listener has already been registered, the request is ignored. @param listener Listener to be registered.
[ "Registers", "a", "listener", "for", "the", "IPluginEventListener", "callback", "event", ".", "If", "the", "listener", "has", "already", "been", "registered", "the", "request", "is", "ignored", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java#L663-L672
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/commons/IOUtils.java
IOUtils.readTextLines
public static void readTextLines(InputStream openRawResource, OnReadLineListener listener) { """ Read text lines. @param openRawResource the open raw resource @param listener the listener """ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(openRawResource)); String line; tr...
java
public static void readTextLines(InputStream openRawResource, OnReadLineListener listener) { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(openRawResource)); String line; try { while ((line = bufferedReader.readLine()) != null) { listener.onTextLine(line); } } catch (I...
[ "public", "static", "void", "readTextLines", "(", "InputStream", "openRawResource", ",", "OnReadLineListener", "listener", ")", "{", "BufferedReader", "bufferedReader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "openRawResource", ")", ")", ";...
Read text lines. @param openRawResource the open raw resource @param listener the listener
[ "Read", "text", "lines", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/commons/IOUtils.java#L148-L170
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessage.java
BaseMessage.putString
public void putString(String strKey, String strValue) { """ Convert this external data format to the raw object and put it in the map. Typically overidden to return correctly converted data. """ if (this.getMessageFieldDesc(strKey) != null) this.getMessageFieldDesc(strKey).putString(strVal...
java
public void putString(String strKey, String strValue) { if (this.getMessageFieldDesc(strKey) != null) this.getMessageFieldDesc(strKey).putString(strValue); else this.putNative(strKey, strValue); }
[ "public", "void", "putString", "(", "String", "strKey", ",", "String", "strValue", ")", "{", "if", "(", "this", ".", "getMessageFieldDesc", "(", "strKey", ")", "!=", "null", ")", "this", ".", "getMessageFieldDesc", "(", "strKey", ")", ".", "putString", "("...
Convert this external data format to the raw object and put it in the map. Typically overidden to return correctly converted data.
[ "Convert", "this", "external", "data", "format", "to", "the", "raw", "object", "and", "put", "it", "in", "the", "map", ".", "Typically", "overidden", "to", "return", "correctly", "converted", "data", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessage.java#L216-L222
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createPoint
public Point createPoint(Coordinate coordinate) { """ Create a new {@link Point}, given a coordinate. @param coordinate The {@link Coordinate} object that positions the point. @return Returns a {@link Point} object. """ if (coordinate == null) { return new Point(srid, precision); } return new Poi...
java
public Point createPoint(Coordinate coordinate) { if (coordinate == null) { return new Point(srid, precision); } return new Point(srid, precision, coordinate.getX(), coordinate.getY()); }
[ "public", "Point", "createPoint", "(", "Coordinate", "coordinate", ")", "{", "if", "(", "coordinate", "==", "null", ")", "{", "return", "new", "Point", "(", "srid", ",", "precision", ")", ";", "}", "return", "new", "Point", "(", "srid", ",", "precision",...
Create a new {@link Point}, given a coordinate. @param coordinate The {@link Coordinate} object that positions the point. @return Returns a {@link Point} object.
[ "Create", "a", "new", "{", "@link", "Point", "}", "given", "a", "coordinate", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L76-L81
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/VariableSafeAbsRef.java
VariableSafeAbsRef.execute
public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { """ Dereference the variable, and return the reference value. Note that lazy evaluation will occur. If a variable within scope is not found, a warning will be sent to the error listener, and ...
java
public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument...
[ "public", "XObject", "execute", "(", "XPathContext", "xctxt", ",", "boolean", "destructiveOK", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "XNodeSet", "xns", "=", "(", "XNodeSet", ")", "super", ".", "execute", "(", ...
Dereference the variable, and return the reference value. Note that lazy evaluation will occur. If a variable within scope is not found, a warning will be sent to the error listener, and an empty nodeset will be returned. @param xctxt The runtime execution context. @return The evaluated variable, or an empty nodes...
[ "Dereference", "the", "variable", "and", "return", "the", "reference", "value", ".", "Note", "that", "lazy", "evaluation", "will", "occur", ".", "If", "a", "variable", "within", "scope", "is", "not", "found", "a", "warning", "will", "be", "sent", "to", "th...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/VariableSafeAbsRef.java#L58-L71
apache/fluo
modules/mapreduce/src/main/java/org/apache/fluo/mapreduce/FluoOutputFormat.java
FluoOutputFormat.configure
public static void configure(Job conf, SimpleConfiguration props) { """ Call this method to initialize the Fluo connection props @param conf Job configuration @param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props programmatically """ try { ByteArrayOutputStream baos...
java
public static void configure(Job conf, SimpleConfiguration props) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); props.save(baos); conf.getConfiguration().set(PROPS_CONF_KEY, new String(baos.toByteArray(), StandardCharsets.UTF_8)); } catch (Exception e) { ...
[ "public", "static", "void", "configure", "(", "Job", "conf", ",", "SimpleConfiguration", "props", ")", "{", "try", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "props", ".", "save", "(", "baos", ")", ";", "conf", ...
Call this method to initialize the Fluo connection props @param conf Job configuration @param props Use {@link org.apache.fluo.api.config.FluoConfiguration} to set props programmatically
[ "Call", "this", "method", "to", "initialize", "the", "Fluo", "connection", "props" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/mapreduce/src/main/java/org/apache/fluo/mapreduce/FluoOutputFormat.java#L118-L130
calimero-project/calimero-core
src/tuwien/auto/calimero/knxnetip/ConnectionBase.java
ConnectionBase.getServiceRequest
protected ServiceRequest getServiceRequest(final KNXnetIPHeader h, final byte[] data, final int offset) throws KNXFormatException { """ Extracts the service request out of the supplied packet data. @param h packet KNXnet/IP header @param data contains the data following the KNXnet/IP header @param offset of...
java
protected ServiceRequest getServiceRequest(final KNXnetIPHeader h, final byte[] data, final int offset) throws KNXFormatException { try { return PacketHelper.getServiceRequest(h, data, offset); } catch (final KNXFormatException e) { // check if at least the connection header of the service request // ...
[ "protected", "ServiceRequest", "getServiceRequest", "(", "final", "KNXnetIPHeader", "h", ",", "final", "byte", "[", "]", "data", ",", "final", "int", "offset", ")", "throws", "KNXFormatException", "{", "try", "{", "return", "PacketHelper", ".", "getServiceRequest"...
Extracts the service request out of the supplied packet data. @param h packet KNXnet/IP header @param data contains the data following the KNXnet/IP header @param offset offset into <code>data</code> to message structure past KNXnet/IP header @return the service request @throws KNXFormatException on failure to extract...
[ "Extracts", "the", "service", "request", "out", "of", "the", "supplied", "packet", "data", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/ConnectionBase.java#L505-L520
google/closure-compiler
src/com/google/javascript/jscomp/DiagnosticType.java
DiagnosticType.disabled
public static DiagnosticType disabled(String name, String descriptionFormat) { """ Create a DiagnosticType at level CheckLevel.OFF @param name An identifier @param descriptionFormat A format string @return A new DiagnosticType """ return make(name, CheckLevel.OFF, descriptionFormat); }
java
public static DiagnosticType disabled(String name, String descriptionFormat) { return make(name, CheckLevel.OFF, descriptionFormat); }
[ "public", "static", "DiagnosticType", "disabled", "(", "String", "name", ",", "String", "descriptionFormat", ")", "{", "return", "make", "(", "name", ",", "CheckLevel", ".", "OFF", ",", "descriptionFormat", ")", ";", "}" ]
Create a DiagnosticType at level CheckLevel.OFF @param name An identifier @param descriptionFormat A format string @return A new DiagnosticType
[ "Create", "a", "DiagnosticType", "at", "level", "CheckLevel", ".", "OFF" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DiagnosticType.java#L71-L74
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/property/VdmBuildPathPropertyPage.java
VdmBuildPathPropertyPage.createPushButton
public static Button createPushButton(Composite parent, String label, Image image) { """ Creates and returns a new push button with the given label and/or image. @param parent parent control @param label button label or <code>null</code> @param image image of <code>null</code> @return a new push button...
java
public static Button createPushButton(Composite parent, String label, Image image) { Button button = new Button(parent, SWT.PUSH); button.setFont(parent.getFont()); if (image != null) { button.setImage(image); } if (label != null) { button.setText(label); } GridData gd = new GridData(); bu...
[ "public", "static", "Button", "createPushButton", "(", "Composite", "parent", ",", "String", "label", ",", "Image", "image", ")", "{", "Button", "button", "=", "new", "Button", "(", "parent", ",", "SWT", ".", "PUSH", ")", ";", "button", ".", "setFont", "...
Creates and returns a new push button with the given label and/or image. @param parent parent control @param label button label or <code>null</code> @param image image of <code>null</code> @return a new push button
[ "Creates", "and", "returns", "a", "new", "push", "button", "with", "the", "given", "label", "and", "/", "or", "image", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/property/VdmBuildPathPropertyPage.java#L284-L301
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/processor/ExecutionStats.java
ExecutionStats.addEmailStats
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) { """ Add statistics about sent emails. @param recipients The list of recipients. @param storageUsed If a remote storage was used. """ this.storageUsed = storageUsed; for (InternetAddress recipient: rec...
java
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) { this.storageUsed = storageUsed; for (InternetAddress recipient: recipients) { emailDests.add(recipient.getAddress()); } }
[ "public", "void", "addEmailStats", "(", "final", "InternetAddress", "[", "]", "recipients", ",", "final", "boolean", "storageUsed", ")", "{", "this", ".", "storageUsed", "=", "storageUsed", ";", "for", "(", "InternetAddress", "recipient", ":", "recipients", ")",...
Add statistics about sent emails. @param recipients The list of recipients. @param storageUsed If a remote storage was used.
[ "Add", "statistics", "about", "sent", "emails", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/ExecutionStats.java#L50-L55
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/ModClusterContainer.java
ModClusterContainer.enableContext
public synchronized boolean enableContext(final String contextPath, final String jvmRoute, final List<String> aliases) { """ Register a web context. If the web context already exists, just enable it. @param contextPath the context path @param jvmRoute the jvmRoute @param aliases the virtual host aliase...
java
public synchronized boolean enableContext(final String contextPath, final String jvmRoute, final List<String> aliases) { final Node node = nodes.get(jvmRoute); if (node != null) { Context context = node.getContext(contextPath, aliases); if (context == null) { cont...
[ "public", "synchronized", "boolean", "enableContext", "(", "final", "String", "contextPath", ",", "final", "String", "jvmRoute", ",", "final", "List", "<", "String", ">", "aliases", ")", "{", "final", "Node", "node", "=", "nodes", ".", "get", "(", "jvmRoute"...
Register a web context. If the web context already exists, just enable it. @param contextPath the context path @param jvmRoute the jvmRoute @param aliases the virtual host aliases
[ "Register", "a", "web", "context", ".", "If", "the", "web", "context", "already", "exists", "just", "enable", "it", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/ModClusterContainer.java#L317-L338
auth0/auth0-java
src/main/java/com/auth0/client/auth/AuthAPI.java
AuthAPI.exchangeCode
public AuthRequest exchangeCode(String code, String redirectUri) { """ Creates a request to exchange the code obtained in the /authorize call using the 'Authorization Code' grant. <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); tr...
java
public AuthRequest exchangeCode(String code, String redirectUri) { Asserts.assertNotNull(code, "code"); Asserts.assertNotNull(redirectUri, "redirect uri"); String url = baseUrl .newBuilder() .addPathSegment(PATH_OAUTH) .addPathSegment(PATH_TOKEN) ...
[ "public", "AuthRequest", "exchangeCode", "(", "String", "code", ",", "String", "redirectUri", ")", "{", "Asserts", ".", "assertNotNull", "(", "code", ",", "\"code\"", ")", ";", "Asserts", ".", "assertNotNull", "(", "redirectUri", ",", "\"redirect uri\"", ")", ...
Creates a request to exchange the code obtained in the /authorize call using the 'Authorization Code' grant. <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); try { TokenHolder result = auth.exchangeCode("SnWoFLMzApDskr", "https://me.auth0.c...
[ "Creates", "a", "request", "to", "exchange", "the", "code", "obtained", "in", "the", "/", "authorize", "call", "using", "the", "Authorization", "Code", "grant", ".", "<pre", ">", "{", "@code", "AuthAPI", "auth", "=", "new", "AuthAPI", "(", "me", ".", "au...
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/auth/AuthAPI.java#L508-L525
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java
DataModelSerializer.serializeAsString
public static String serializeAsString(Object o) throws IOException { """ Convert a POJO into Serialized JSON form. @param o the POJO to serialize @return a String containing the JSON data. @throws IOException when there are problems creating the Json. """ try { JsonStructure builtJson...
java
public static String serializeAsString(Object o) throws IOException { try { JsonStructure builtJsonObject = findFieldsToSerialize(o).mainObject; return builtJsonObject.toString(); } catch (IllegalStateException ise) { // the reflective attempt to build the object fail...
[ "public", "static", "String", "serializeAsString", "(", "Object", "o", ")", "throws", "IOException", "{", "try", "{", "JsonStructure", "builtJsonObject", "=", "findFieldsToSerialize", "(", "o", ")", ".", "mainObject", ";", "return", "builtJsonObject", ".", "toStri...
Convert a POJO into Serialized JSON form. @param o the POJO to serialize @return a String containing the JSON data. @throws IOException when there are problems creating the Json.
[ "Convert", "a", "POJO", "into", "Serialized", "JSON", "form", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L308-L318
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.get
public T get(String json) throws IOException, JsonFormatException { """ Attempts to parse the given data as an object. @param json JSON-formatted data @return An object instance @throws IOException @throws JsonFormatException The given data is malformed, or its type is unexpected """ JsonPullParser par...
java
public T get(String json) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(json); return get(parser, null); }
[ "public", "T", "get", "(", "String", "json", ")", "throws", "IOException", ",", "JsonFormatException", "{", "JsonPullParser", "parser", "=", "JsonPullParser", ".", "newParser", "(", "json", ")", ";", "return", "get", "(", "parser", ",", "null", ")", ";", "...
Attempts to parse the given data as an object. @param json JSON-formatted data @return An object instance @throws IOException @throws JsonFormatException The given data is malformed, or its type is unexpected
[ "Attempts", "to", "parse", "the", "given", "data", "as", "an", "object", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L157-L160
wuman/JReadability
src/main/java/com/wuman/jreadability/Readability.java
Readability.getInnerText
private static String getInnerText(Element e, boolean normalizeSpaces) { """ Get the inner text of a node - cross browser compatibly. This also strips out any excess whitespace to be found. @param e @param normalizeSpaces @return """ String textContent = e.text().trim(); if (normalizeSpa...
java
private static String getInnerText(Element e, boolean normalizeSpaces) { String textContent = e.text().trim(); if (normalizeSpaces) { textContent = textContent.replaceAll(Patterns.REGEX_NORMALIZE, ""); } return textContent; }
[ "private", "static", "String", "getInnerText", "(", "Element", "e", ",", "boolean", "normalizeSpaces", ")", "{", "String", "textContent", "=", "e", ".", "text", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "normalizeSpaces", ")", "{", "textContent", ...
Get the inner text of a node - cross browser compatibly. This also strips out any excess whitespace to be found. @param e @param normalizeSpaces @return
[ "Get", "the", "inner", "text", "of", "a", "node", "-", "cross", "browser", "compatibly", ".", "This", "also", "strips", "out", "any", "excess", "whitespace", "to", "be", "found", "." ]
train
https://github.com/wuman/JReadability/blob/16c18c42402bd13c6e024c2fd3a86dd28ba53e74/src/main/java/com/wuman/jreadability/Readability.java#L494-L502
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java
OrmLiteDefaultContentProvider.onQueryCompleted
protected void onQueryCompleted(Cursor result, Uri uri, MatcherPattern target, QueryParameters parameter) { """ This method is called after the onQuery processing has been handled. If you're a need, you can override this method. @param result This is the return value of onQuery method. @param uri This is the ...
java
protected void onQueryCompleted(Cursor result, Uri uri, MatcherPattern target, QueryParameters parameter) { result.setNotificationUri(this.getContext().getContentResolver(), uri); }
[ "protected", "void", "onQueryCompleted", "(", "Cursor", "result", ",", "Uri", "uri", ",", "MatcherPattern", "target", ",", "QueryParameters", "parameter", ")", "{", "result", ".", "setNotificationUri", "(", "this", ".", "getContext", "(", ")", ".", "getContentRe...
This method is called after the onQuery processing has been handled. If you're a need, you can override this method. @param result This is the return value of onQuery method. @param uri This is the Uri of target. @param target This is identical to the argument of onQuery method. It is MatcherPattern objects that match ...
[ "This", "method", "is", "called", "after", "the", "onQuery", "processing", "has", "been", "handled", ".", "If", "you", "re", "a", "need", "you", "can", "override", "this", "method", "." ]
train
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java#L191-L193
samskivert/pythagoras
src/main/java/pythagoras/d/Transforms.java
Transforms.multiply
public static <T extends Transform> T multiply (AffineTransform a, AffineTransform b, T into) { """ Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code into} may refer to the same instance as {@code a} or {@code b}. @return {@code into} for chaining. """ return m...
java
public static <T extends Transform> T multiply (AffineTransform a, AffineTransform b, T into) { return multiply(a.m00, a.m01, a.m10, a.m11, a.tx, a.ty, b.m00, b.m01, b.m10, b.m11, b.tx, b.ty, into); }
[ "public", "static", "<", "T", "extends", "Transform", ">", "T", "multiply", "(", "AffineTransform", "a", ",", "AffineTransform", "b", ",", "T", "into", ")", "{", "return", "multiply", "(", "a", ".", "m00", ",", "a", ".", "m01", ",", "a", ".", "m10", ...
Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code into} may refer to the same instance as {@code a} or {@code b}. @return {@code into} for chaining.
[ "Multiplies", "the", "supplied", "two", "affine", "transforms", "storing", "the", "result", "in", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Transforms.java#L34-L37
apache/incubator-heron
examples/src/java/org/apache/heron/examples/streamlet/utils/StreamletUtils.java
StreamletUtils.getParallelism
public static int getParallelism(String[] args, int defaultParallelism) { """ Fetches the topology's parallelism from the second-command-line argument or defers to a supplied default. """ return (args.length > 1) ? Integer.parseInt(args[1]) : defaultParallelism; }
java
public static int getParallelism(String[] args, int defaultParallelism) { return (args.length > 1) ? Integer.parseInt(args[1]) : defaultParallelism; }
[ "public", "static", "int", "getParallelism", "(", "String", "[", "]", "args", ",", "int", "defaultParallelism", ")", "{", "return", "(", "args", ".", "length", ">", "1", ")", "?", "Integer", ".", "parseInt", "(", "args", "[", "1", "]", ")", ":", "def...
Fetches the topology's parallelism from the second-command-line argument or defers to a supplied default.
[ "Fetches", "the", "topology", "s", "parallelism", "from", "the", "second", "-", "command", "-", "line", "argument", "or", "defers", "to", "a", "supplied", "default", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/examples/src/java/org/apache/heron/examples/streamlet/utils/StreamletUtils.java#L65-L67
ggrandes/packer
src/main/java/org/javastack/packer/Packer.java
Packer.useHMAC
public Packer useHMAC(final String hMacAlg, final String passphrase) throws NoSuchAlgorithmException, InvalidKeyException { """ Sets the usage of Hash-MAC for authentication (default no) @param hMacAlg HMAC algorithm (HmacSHA1, HmacSHA256,...) @param passphrase shared secret @return @throws NoSuchAlgo...
java
public Packer useHMAC(final String hMacAlg, final String passphrase) throws NoSuchAlgorithmException, InvalidKeyException { hMac = Mac.getInstance(hMacAlg); // "HmacSHA256" hMac.init(new SecretKeySpec(passphrase.getBytes(charsetUTF8), hMacAlg)); return this; }
[ "public", "Packer", "useHMAC", "(", "final", "String", "hMacAlg", ",", "final", "String", "passphrase", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", "{", "hMac", "=", "Mac", ".", "getInstance", "(", "hMacAlg", ")", ";", "// \"HmacSHA256\"...
Sets the usage of Hash-MAC for authentication (default no) @param hMacAlg HMAC algorithm (HmacSHA1, HmacSHA256,...) @param passphrase shared secret @return @throws NoSuchAlgorithmException @throws InvalidKeyException @see {@link javax.crypto.Mac#getInstance(String)} @see <a href="http://docs.oracle.com/javase/6/docs...
[ "Sets", "the", "usage", "of", "Hash", "-", "MAC", "for", "authentication", "(", "default", "no", ")" ]
train
https://github.com/ggrandes/packer/blob/0b37b286a3d0555050eb2e65419dd74f8d8d3e78/src/main/java/org/javastack/packer/Packer.java#L300-L305
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/comp/JStatusbar.java
JStatusbar.showStatus
public void showStatus(String strMessage, ImageIcon icon, int iWarningLevel) { """ Display the status text. @param strMessage The message to display. """ if (strMessage == null) strMessage = Constants.BLANK; if (m_textArea != null) m_textArea.setText(strMessage); ...
java
public void showStatus(String strMessage, ImageIcon icon, int iWarningLevel) { if (strMessage == null) strMessage = Constants.BLANK; if (m_textArea != null) m_textArea.setText(strMessage); if (iWarningLevel == Constants.WARNING) { m_textArea.setFor...
[ "public", "void", "showStatus", "(", "String", "strMessage", ",", "ImageIcon", "icon", ",", "int", "iWarningLevel", ")", "{", "if", "(", "strMessage", "==", "null", ")", "strMessage", "=", "Constants", ".", "BLANK", ";", "if", "(", "m_textArea", "!=", "nul...
Display the status text. @param strMessage The message to display.
[ "Display", "the", "status", "text", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/comp/JStatusbar.java#L69-L96
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java
OAuth20DefaultTokenGenerator.addTicketToRegistry
protected void addTicketToRegistry(final Ticket ticket, final TicketGrantingTicket ticketGrantingTicket) { """ Add ticket to registry. @param ticket the ticket @param ticketGrantingTicket the ticket granting ticket """ LOGGER.debug("Adding ticket [{}] to registry", ticket); th...
java
protected void addTicketToRegistry(final Ticket ticket, final TicketGrantingTicket ticketGrantingTicket) { LOGGER.debug("Adding ticket [{}] to registry", ticket); this.ticketRegistry.addTicket(ticket); if (ticketGrantingTicket != null) { LOGGER.debug("Updating parent ticket-granting ...
[ "protected", "void", "addTicketToRegistry", "(", "final", "Ticket", "ticket", ",", "final", "TicketGrantingTicket", "ticketGrantingTicket", ")", "{", "LOGGER", ".", "debug", "(", "\"Adding ticket [{}] to registry\"", ",", "ticket", ")", ";", "this", ".", "ticketRegist...
Add ticket to registry. @param ticket the ticket @param ticketGrantingTicket the ticket granting ticket
[ "Add", "ticket", "to", "registry", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java#L241-L248
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getOptionalField
public static Field getOptionalField(Class<?> clazz, String fieldName) { """ Get class field or null if not found. Try to get named class field and returns null if not found; this method does not throw any exception. @param clazz Java class to return field from, @param fieldName field name. @return class ref...
java
public static Field getOptionalField(Class<?> clazz, String fieldName) { try { Field field = clazz.getDeclaredField(fieldName); field.setAccessible(true); return field; } catch(NoSuchFieldException expectable) {} catch(SecurityException e) { throw new BugError(e); ...
[ "public", "static", "Field", "getOptionalField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "{", "try", "{", "Field", "field", "=", "clazz", ".", "getDeclaredField", "(", "fieldName", ")", ";", "field", ".", "setAccessible", "("...
Get class field or null if not found. Try to get named class field and returns null if not found; this method does not throw any exception. @param clazz Java class to return field from, @param fieldName field name. @return class reflective field or null.
[ "Get", "class", "field", "or", "null", "if", "not", "found", ".", "Try", "to", "get", "named", "class", "field", "and", "returns", "null", "if", "not", "found", ";", "this", "method", "does", "not", "throw", "any", "exception", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L630-L642
Chorus-bdd/Chorus
interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerImpl.java
ProcessManagerImpl.startProcess
public synchronized void startProcess(String configName, String processName, Properties processProperties) throws Exception { """ Starts a record Java process using properties defined in a properties file alongside the feature file @throws Exception """ ProcessManagerConfig runtimeConfig = getProce...
java
public synchronized void startProcess(String configName, String processName, Properties processProperties) throws Exception { ProcessManagerConfig runtimeConfig = getProcessManagerConfig(configName, processProperties); if ( runtimeConfig.isEnabled()) { //could be disabled in some profiles ...
[ "public", "synchronized", "void", "startProcess", "(", "String", "configName", ",", "String", "processName", ",", "Properties", "processProperties", ")", "throws", "Exception", "{", "ProcessManagerConfig", "runtimeConfig", "=", "getProcessManagerConfig", "(", "configName"...
Starts a record Java process using properties defined in a properties file alongside the feature file @throws Exception
[ "Starts", "a", "record", "Java", "process", "using", "properties", "defined", "in", "a", "properties", "file", "alongside", "the", "feature", "file" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerImpl.java#L88-L97
code4everything/util
src/main/java/com/zhazhapan/util/decryption/SimpleDecrypt.java
SimpleDecrypt.ascii
public static String ascii(String code, String key) { """ sscii解密 @param code {@link String} @param key {@link String} @return {@link String} """ return ascii(code, CryptUtils.stringToKey(key)); }
java
public static String ascii(String code, String key) { return ascii(code, CryptUtils.stringToKey(key)); }
[ "public", "static", "String", "ascii", "(", "String", "code", ",", "String", "key", ")", "{", "return", "ascii", "(", "code", ",", "CryptUtils", ".", "stringToKey", "(", "key", ")", ")", ";", "}" ]
sscii解密 @param code {@link String} @param key {@link String} @return {@link String}
[ "sscii解密" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/decryption/SimpleDecrypt.java#L52-L54
taimos/dvalin
jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java
JaxRsAnnotationScanner.hasAnnotation
public static boolean hasAnnotation(Method method, Class<? extends Annotation> annotation) { """ Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses @param method the method to scan @param annotation the annotation to search for @return <i...
java
public static boolean hasAnnotation(Method method, Class<? extends Annotation> annotation) { return !searchForAnnotation(method, annotation).isEmpty(); }
[ "public", "static", "boolean", "hasAnnotation", "(", "Method", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "return", "!", "searchForAnnotation", "(", "method", ",", "annotation", ")", ".", "isEmpty", "(", ")", ";",...
Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses @param method the method to scan @param annotation the annotation to search for @return <i>true</i> if the given annotation is present on method or type level annotations in the type hierarchy
[ "Checks", "if", "there", "is", "an", "annotation", "of", "the", "given", "type", "on", "this", "method", "or", "on", "type", "level", "for", "all", "interfaces", "and", "superclasses" ]
train
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java#L48-L50
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java
LocationUrl.getDirectShipLocationUrl
public static MozuUrl getDirectShipLocationUrl(Boolean includeAttributeDefinition, String responseFields) { """ Get Resource Url for GetDirectShipLocation @param includeAttributeDefinition @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a ...
java
public static MozuUrl getDirectShipLocationUrl(Boolean includeAttributeDefinition, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/DS/location?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}"); formatter.form...
[ "public", "static", "MozuUrl", "getDirectShipLocationUrl", "(", "Boolean", "includeAttributeDefinition", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/storefront/locationUsageTypes/DS/location?includeAttr...
Get Resource Url for GetDirectShipLocation @param includeAttributeDefinition @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may ca...
[ "Get", "Resource", "Url", "for", "GetDirectShipLocation" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java#L62-L68
fuinorg/objects4j
src/main/java/org/fuin/objects4j/ui/AnnotationAnalyzer.java
AnnotationAnalyzer.createFieldInfo
public final FieldTextInfo createFieldInfo(@NotNull final Field field, @NotNull final Locale locale, @NotNull final Class<? extends Annotation> annotationClasz) { """ Returns the text information for a given field of a class. @param field Field to inspect. @param locale Locale to use. @param an...
java
public final FieldTextInfo createFieldInfo(@NotNull final Field field, @NotNull final Locale locale, @NotNull final Class<? extends Annotation> annotationClasz) { Contract.requireArgNotNull("field", field); Contract.requireArgNotNull("locale", locale); Contract.requireArgNotNul...
[ "public", "final", "FieldTextInfo", "createFieldInfo", "(", "@", "NotNull", "final", "Field", "field", ",", "@", "NotNull", "final", "Locale", "locale", ",", "@", "NotNull", "final", "Class", "<", "?", "extends", "Annotation", ">", "annotationClasz", ")", "{",...
Returns the text information for a given field of a class. @param field Field to inspect. @param locale Locale to use. @param annotationClasz Type of annotation to find. @return Label information - May be <code>null</code> in case the annotation was not found.
[ "Returns", "the", "text", "information", "for", "a", "given", "field", "of", "a", "class", "." ]
train
https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/ui/AnnotationAnalyzer.java#L152-L172
google/closure-compiler
src/com/google/javascript/jscomp/LinkedFlowScope.java
LinkedFlowScope.equalSlots
private static boolean equalSlots(StaticTypedSlot slotA, StaticTypedSlot slotB) { """ Determines whether two slots are meaningfully different for the purposes of data flow analysis. """ return slotA == slotB || !slotA.getType().differsFrom(slotB.getType()); }
java
private static boolean equalSlots(StaticTypedSlot slotA, StaticTypedSlot slotB) { return slotA == slotB || !slotA.getType().differsFrom(slotB.getType()); }
[ "private", "static", "boolean", "equalSlots", "(", "StaticTypedSlot", "slotA", ",", "StaticTypedSlot", "slotB", ")", "{", "return", "slotA", "==", "slotB", "||", "!", "slotA", ".", "getType", "(", ")", ".", "differsFrom", "(", "slotB", ".", "getType", "(", ...
Determines whether two slots are meaningfully different for the purposes of data flow analysis.
[ "Determines", "whether", "two", "slots", "are", "meaningfully", "different", "for", "the", "purposes", "of", "data", "flow", "analysis", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/LinkedFlowScope.java#L302-L304
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/document/json/JsonObject.java
JsonObject.putAndEncrypt
public JsonObject putAndEncrypt(final String name, final Object value, String providerName) { """ Stores the {@link Object} value as encrypted identified by the field name. Note that the value is checked and a {@link IllegalArgumentException} is thrown if not supported. Note: Use of the Field Level Encryptio...
java
public JsonObject putAndEncrypt(final String name, final Object value, String providerName) { addValueEncryptionInfo(name, providerName, true); if (this == value) { throw new IllegalArgumentException("Cannot put self"); } else if (value == JsonValue.NULL) { putNull(name);...
[ "public", "JsonObject", "putAndEncrypt", "(", "final", "String", "name", ",", "final", "Object", "value", ",", "String", "providerName", ")", "{", "addValueEncryptionInfo", "(", "name", ",", "providerName", ",", "true", ")", ";", "if", "(", "this", "==", "va...
Stores the {@link Object} value as encrypted identified by the field name. Note that the value is checked and a {@link IllegalArgumentException} is thrown if not supported. Note: Use of the Field Level Encryption functionality provided in the com.couchbase.client.encryption namespace provided by Couchbase is subject ...
[ "Stores", "the", "{", "@link", "Object", "}", "value", "as", "encrypted", "identified", "by", "the", "field", "name", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L231-L243
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/ReflectUtils.java
ReflectUtils.getPropertyGetterMethod
public static Method getPropertyGetterMethod(Class clazz, String property) { """ 得到get/is方法 @param clazz 类 @param property 属性 @return Method 方法对象 """ String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1); Method method; try { meth...
java
public static Method getPropertyGetterMethod(Class clazz, String property) { String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1); Method method; try { method = clazz.getMethod(methodName); } catch (NoSuchMethodException e) { ...
[ "public", "static", "Method", "getPropertyGetterMethod", "(", "Class", "clazz", ",", "String", "property", ")", "{", "String", "methodName", "=", "\"get\"", "+", "property", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", ")", "+", "pro...
得到get/is方法 @param clazz 类 @param property 属性 @return Method 方法对象
[ "得到get", "/", "is方法" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/ReflectUtils.java#L142-L156
thiagokimo/Alexei
library/src/main/java/com/kimo/lib/alexei/CalculusBuilder.java
CalculusBuilder.showMe
public void showMe(Answer<T> callback) { """ Executes the calculation. Must be called after a {@link com.kimo.lib.alexei.Calculus} is set. @param callback to use when the calculation finish. The callback will be called in UI thread. """ CalculusTask<T> task = new CalculusTask(image,calculus,callback...
java
public void showMe(Answer<T> callback) { CalculusTask<T> task = new CalculusTask(image,calculus,callback); if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if(executor == null) { executor = AsyncTask.THREAD_POOL_EXECUTOR; } task.executeO...
[ "public", "void", "showMe", "(", "Answer", "<", "T", ">", "callback", ")", "{", "CalculusTask", "<", "T", ">", "task", "=", "new", "CalculusTask", "(", "image", ",", "calculus", ",", "callback", ")", ";", "if", "(", "Build", ".", "VERSION", ".", "SDK...
Executes the calculation. Must be called after a {@link com.kimo.lib.alexei.Calculus} is set. @param callback to use when the calculation finish. The callback will be called in UI thread.
[ "Executes", "the", "calculation", ".", "Must", "be", "called", "after", "a", "{", "@link", "com", ".", "kimo", ".", "lib", ".", "alexei", ".", "Calculus", "}", "is", "set", "." ]
train
https://github.com/thiagokimo/Alexei/blob/dc4e7e8b4651fe8d0679f75fe67f8a3361efc42c/library/src/main/java/com/kimo/lib/alexei/CalculusBuilder.java#L37-L51
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java
ManagedBackupShortTermRetentionPoliciesInner.beginCreateOrUpdate
public ManagedBackupShortTermRetentionPolicyInner beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { """ Updates a managed database's short term retention policy. @param resourceGroupName The name of the resource group that contains the resour...
java
public ManagedBackupShortTermRetentionPolicyInner beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, retentionDays).toBlocking().single()....
[ "public", "ManagedBackupShortTermRetentionPolicyInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "Integer", "retentionDays", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsyn...
Updates a managed database's short term retention policy. @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 managedInstanceName The name of the managed instance. @param databaseName The name of the dat...
[ "Updates", "a", "managed", "database", "s", "short", "term", "retention", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java#L451-L453
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/ocr/OcrClient.java
OcrClient.idcardRecognition
public IdcardRecognitionResponse idcardRecognition(String image, String side) { """ Gets the idcard recognition properties of specific image resource. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param image The image data which needs to be base64 @param side The...
java
public IdcardRecognitionResponse idcardRecognition(String image, String side) { IdcardRecognitionRequest request = new IdcardRecognitionRequest().withImage(image).withSide(side); return idcardRecognition(request); }
[ "public", "IdcardRecognitionResponse", "idcardRecognition", "(", "String", "image", ",", "String", "side", ")", "{", "IdcardRecognitionRequest", "request", "=", "new", "IdcardRecognitionRequest", "(", ")", ".", "withImage", "(", "image", ")", ".", "withSide", "(", ...
Gets the idcard recognition properties of specific image resource. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param image The image data which needs to be base64 @param side The side of idcard image. (front/back) @return The idcard recognition properties of the image reso...
[ "Gets", "the", "idcard", "recognition", "properties", "of", "specific", "image", "resource", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/ocr/OcrClient.java#L123-L126
hankcs/HanLP
src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java
AbstractLexicalAnalyzer.acceptCustomWord
protected boolean acceptCustomWord(int begin, int end, CoreDictionary.Attribute value) { """ 分词时查询到一个用户词典中的词语,此处控制是否接受它 @param begin 起始位置 @param end 终止位置 @param value 词性 @return true 表示接受 @deprecated 自1.6.7起废弃,强制模式下为最长匹配,否则按分词结果合并 """ return config.forceCustomDictionary || (end - begin >= 4 &&...
java
protected boolean acceptCustomWord(int begin, int end, CoreDictionary.Attribute value) { return config.forceCustomDictionary || (end - begin >= 4 && !value.hasNatureStartsWith("nr") && !value.hasNatureStartsWith("ns") && !value.hasNatureStartsWith("nt")); }
[ "protected", "boolean", "acceptCustomWord", "(", "int", "begin", ",", "int", "end", ",", "CoreDictionary", ".", "Attribute", "value", ")", "{", "return", "config", ".", "forceCustomDictionary", "||", "(", "end", "-", "begin", ">=", "4", "&&", "!", "value", ...
分词时查询到一个用户词典中的词语,此处控制是否接受它 @param begin 起始位置 @param end 终止位置 @param value 词性 @return true 表示接受 @deprecated 自1.6.7起废弃,强制模式下为最长匹配,否则按分词结果合并
[ "分词时查询到一个用户词典中的词语,此处控制是否接受它" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java#L325-L328
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/typeahead/AbstractAjaxExecutorTypeaheadFinder.java
AbstractAjaxExecutorTypeaheadFinder.createFinder
@Nonnull @OverrideOnDemand protected Finder createFinder (@Nonnull final String sOriginalQuery, @Nonnull final LECTYPE aLEC) { """ Create a new {@link Finder} object. @param sOriginalQuery The original query string. Never <code>null</code>. @param aLEC The layout execution context. Never <code>null</code...
java
@Nonnull @OverrideOnDemand protected Finder createFinder (@Nonnull final String sOriginalQuery, @Nonnull final LECTYPE aLEC) { return new Finder (aLEC.getDisplayLocale ()).initialize (sOriginalQuery); }
[ "@", "Nonnull", "@", "OverrideOnDemand", "protected", "Finder", "createFinder", "(", "@", "Nonnull", "final", "String", "sOriginalQuery", ",", "@", "Nonnull", "final", "LECTYPE", "aLEC", ")", "{", "return", "new", "Finder", "(", "aLEC", ".", "getDisplayLocale", ...
Create a new {@link Finder} object. @param sOriginalQuery The original query string. Never <code>null</code>. @param aLEC The layout execution context. Never <code>null</code>. @return The non-<code>null</code> {@link Finder} object.
[ "Create", "a", "new", "{", "@link", "Finder", "}", "object", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/typeahead/AbstractAjaxExecutorTypeaheadFinder.java#L228-L233
alkacon/opencms-core
src/org/opencms/security/CmsPersistentLoginAuthorizationHandler.java
CmsPersistentLoginAuthorizationHandler.initCmsObjectFromToken
public CmsObject initCmsObjectFromToken(HttpServletRequest request, I_PrivilegedLoginAction loginAction) { """ Tries to initialize the CmsObject from a login token given as a cookie in the request.<p> @param request the request @param loginAction the privileged login action @return the initialized CmsObject...
java
public CmsObject initCmsObjectFromToken(HttpServletRequest request, I_PrivilegedLoginAction loginAction) { CmsObject cms = null; CmsPersistentLoginTokenHandler tokenHandler = new CmsPersistentLoginTokenHandler(); try { CmsUser user = tokenHandler.validateToken(CmsRequestUtil.getCook...
[ "public", "CmsObject", "initCmsObjectFromToken", "(", "HttpServletRequest", "request", ",", "I_PrivilegedLoginAction", "loginAction", ")", "{", "CmsObject", "cms", "=", "null", ";", "CmsPersistentLoginTokenHandler", "tokenHandler", "=", "new", "CmsPersistentLoginTokenHandler"...
Tries to initialize the CmsObject from a login token given as a cookie in the request.<p> @param request the request @param loginAction the privileged login action @return the initialized CmsObject, or null if the user couldn't be authenticated using the login token cookie
[ "Tries", "to", "initialize", "the", "CmsObject", "from", "a", "login", "token", "given", "as", "a", "cookie", "in", "the", "request", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsPersistentLoginAuthorizationHandler.java#L79-L110
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.createCertificate
public CertificateOperation createCertificate(String vaultBaseUrl, String certificateName) { """ Creates a new certificate. If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. @param vaultBaseUrl The vault name, for example https://myva...
java
public CertificateOperation createCertificate(String vaultBaseUrl, String certificateName) { return createCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).toBlocking().single().body(); }
[ "public", "CertificateOperation", "createCertificate", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "createCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "toBlocking", "(", ")", ".", "...
Creates a new certificate. If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @throws IllegalArgumentException...
[ "Creates", "a", "new", "certificate", ".", "If", "this", "is", "the", "first", "version", "the", "certificate", "resource", "is", "created", ".", "This", "operation", "requires", "the", "certificates", "/", "create", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6488-L6490
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java
SibRaConnection.createBifurcatedConsumerSession
@Override public BifurcatedConsumerSession createBifurcatedConsumerSession( final long id) throws SISessionDroppedException, SIConnectionDroppedException, SISessionUnavailableException, SIConnectionUnavailab...
java
@Override public BifurcatedConsumerSession createBifurcatedConsumerSession( final long id) throws SISessionDroppedException, SIConnectionDroppedException, SISessionUnavailableException, SIConnectionUnavailab...
[ "@", "Override", "public", "BifurcatedConsumerSession", "createBifurcatedConsumerSession", "(", "final", "long", "id", ")", "throws", "SISessionDroppedException", ",", "SIConnectionDroppedException", ",", "SISessionUnavailableException", ",", "SIConnectionUnavailableException", "...
This method is used to create a BifurcatedConsumerSession object, which is an additional session representing an existing consumer. Checks that the connection is valid and then delegates. @param id the identifier of the consumer @throws SIIncorrectCallException if the delegation fails @throws SIErrorException if the d...
[ "This", "method", "is", "used", "to", "create", "a", "BifurcatedConsumerSession", "object", "which", "is", "an", "additional", "session", "representing", "an", "existing", "consumer", ".", "Checks", "that", "the", "connection", "is", "valid", "and", "then", "del...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java#L1733-L1748
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getObject
public static JsonObject getObject(JsonObject object, String field) { """ Returns a field in a Json object as an object. Throws IllegalArgumentException if the field value is null. @param object the Json object @param field the field in the Json object to return @return the Json field value as a Json object ...
java
public static JsonObject getObject(JsonObject object, String field) { final JsonValue value = object.get(field); throwExceptionIfNull(value, field); return value.asObject(); }
[ "public", "static", "JsonObject", "getObject", "(", "JsonObject", "object", ",", "String", "field", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "throwExceptionIfNull", "(", "value", ",", "field", ")", ";", "r...
Returns a field in a Json object as an object. Throws IllegalArgumentException if the field value is null. @param object the Json object @param field the field in the Json object to return @return the Json field value as a Json object
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "an", "object", ".", "Throws", "IllegalArgumentException", "if", "the", "field", "value", "is", "null", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L261-L265
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_tcp_frontend_GET
public ArrayList<Long> serviceName_tcp_frontend_GET(String serviceName, Long defaultFarmId, String port, String zone) throws IOException { """ TCP frontends for this iplb REST: GET /ipLoadbalancing/{serviceName}/tcp/frontend @param defaultFarmId [required] Filter the value of defaultFarmId property (=) @param...
java
public ArrayList<Long> serviceName_tcp_frontend_GET(String serviceName, Long defaultFarmId, String port, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/frontend"; StringBuilder sb = path(qPath, serviceName); query(sb, "defaultFarmId", defaultFarmId); query(sb, "port", port)...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_tcp_frontend_GET", "(", "String", "serviceName", ",", "Long", "defaultFarmId", ",", "String", "port", ",", "String", "zone", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{service...
TCP frontends for this iplb REST: GET /ipLoadbalancing/{serviceName}/tcp/frontend @param defaultFarmId [required] Filter the value of defaultFarmId property (=) @param port [required] Filter the value of port property (like) @param zone [required] Filter the value of zone property (=) @param serviceName [required] The...
[ "TCP", "frontends", "for", "this", "iplb" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1475-L1483
mabe02/lanterna
src/main/java/com/googlecode/lanterna/gui2/AbstractInteractableComponent.java
AbstractInteractableComponent.onLeaveFocus
@Override public final void onLeaveFocus(FocusChangeDirection direction, Interactable nextInFocus) { """ {@inheritDoc} <p> This method is final in {@code AbstractInteractableComponent}, please override {@code afterLeaveFocus} instead """ inFocus = false; afterLeaveFocus(direction, nextInF...
java
@Override public final void onLeaveFocus(FocusChangeDirection direction, Interactable nextInFocus) { inFocus = false; afterLeaveFocus(direction, nextInFocus); }
[ "@", "Override", "public", "final", "void", "onLeaveFocus", "(", "FocusChangeDirection", "direction", ",", "Interactable", "nextInFocus", ")", "{", "inFocus", "=", "false", ";", "afterLeaveFocus", "(", "direction", ",", "nextInFocus", ")", ";", "}" ]
{@inheritDoc} <p> This method is final in {@code AbstractInteractableComponent}, please override {@code afterLeaveFocus} instead
[ "{" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/gui2/AbstractInteractableComponent.java#L86-L90
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_task_account_id_GET
public OvhTaskPop domain_task_account_id_GET(String domain, Long id) throws IOException { """ Get this object properties REST: GET /email/domain/{domain}/task/account/{id} @param domain [required] Name of your domain name @param id [required] Id of task """ String qPath = "/email/domain/{domain}/task/ac...
java
public OvhTaskPop domain_task_account_id_GET(String domain, Long id) throws IOException { String qPath = "/email/domain/{domain}/task/account/{id}"; StringBuilder sb = path(qPath, domain, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhTaskPop.class); }
[ "public", "OvhTaskPop", "domain_task_account_id_GET", "(", "String", "domain", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/task/account/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "...
Get this object properties REST: GET /email/domain/{domain}/task/account/{id} @param domain [required] Name of your domain name @param id [required] Id of task
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1172-L1177
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.objIntConsumer
public static <T> ObjIntConsumer<T> objIntConsumer(CheckedObjIntConsumer<T> consumer) { """ Wrap a {@link CheckedObjIntConsumer} in a {@link ObjIntConsumer}. """ return objIntConsumer(consumer, THROWABLE_TO_RUNTIME_EXCEPTION); }
java
public static <T> ObjIntConsumer<T> objIntConsumer(CheckedObjIntConsumer<T> consumer) { return objIntConsumer(consumer, THROWABLE_TO_RUNTIME_EXCEPTION); }
[ "public", "static", "<", "T", ">", "ObjIntConsumer", "<", "T", ">", "objIntConsumer", "(", "CheckedObjIntConsumer", "<", "T", ">", "consumer", ")", "{", "return", "objIntConsumer", "(", "consumer", ",", "THROWABLE_TO_RUNTIME_EXCEPTION", ")", ";", "}" ]
Wrap a {@link CheckedObjIntConsumer} in a {@link ObjIntConsumer}.
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L246-L248
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationparameter.java
aaapreauthenticationparameter.get
public static aaapreauthenticationparameter get(nitro_service service, options option) throws Exception { """ Use this API to fetch all the aaapreauthenticationparameter resources that are configured on netscaler. """ aaapreauthenticationparameter obj = new aaapreauthenticationparameter(); aaapreauthentic...
java
public static aaapreauthenticationparameter get(nitro_service service, options option) throws Exception{ aaapreauthenticationparameter obj = new aaapreauthenticationparameter(); aaapreauthenticationparameter[] response = (aaapreauthenticationparameter[])obj.get_resources(service,option); return response[0]; }
[ "public", "static", "aaapreauthenticationparameter", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "aaapreauthenticationparameter", "obj", "=", "new", "aaapreauthenticationparameter", "(", ")", ";", "aaapreauthenticatio...
Use this API to fetch all the aaapreauthenticationparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "aaapreauthenticationparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationparameter.java#L194-L198
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/util/Mappings.java
Mappings.addMapping
private static void addMapping(Map<String, String> map, String key, String value, String kind) { """ Adds a class, method or package-prefix property to its map, reporting an error if that mapping was previously specified. """ String oldValue = map.put(key, value); if (oldValue != null && !oldValue.eq...
java
private static void addMapping(Map<String, String> map, String key, String value, String kind) { String oldValue = map.put(key, value); if (oldValue != null && !oldValue.equals(value)) { ErrorUtil.error(kind + " redefined; was \"" + oldValue + ", now " + value); } }
[ "private", "static", "void", "addMapping", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "String", "key", ",", "String", "value", ",", "String", "kind", ")", "{", "String", "oldValue", "=", "map", ".", "put", "(", "key", ",", "value", ")...
Adds a class, method or package-prefix property to its map, reporting an error if that mapping was previously specified.
[ "Adds", "a", "class", "method", "or", "package", "-", "prefix", "property", "to", "its", "map", "reporting", "an", "error", "if", "that", "mapping", "was", "previously", "specified", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/Mappings.java#L121-L126
yanzhenjie/AndPermission
support/src/main/java/com/yanzhenjie/permission/AndPermission.java
AndPermission.hasPermissions
public static boolean hasPermissions(Context context, String[]... permissions) { """ Judgment already has the target permission. @param context {@link Context}. @param permissions one or more permission groups. @return true, other wise is false. """ for (String[] permission : permissions) { ...
java
public static boolean hasPermissions(Context context, String[]... permissions) { for (String[] permission : permissions) { boolean hasPermission = PERMISSION_CHECKER.hasPermission(context, permission); if (!hasPermission) return false; } return true; }
[ "public", "static", "boolean", "hasPermissions", "(", "Context", "context", ",", "String", "[", "]", "...", "permissions", ")", "{", "for", "(", "String", "[", "]", "permission", ":", "permissions", ")", "{", "boolean", "hasPermission", "=", "PERMISSION_CHECKE...
Judgment already has the target permission. @param context {@link Context}. @param permissions one or more permission groups. @return true, other wise is false.
[ "Judgment", "already", "has", "the", "target", "permission", "." ]
train
https://github.com/yanzhenjie/AndPermission/blob/bbfaaecdb8ecf0f2aa270d80c0b88d022dddda7c/support/src/main/java/com/yanzhenjie/permission/AndPermission.java#L267-L273
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/HostProcess.java
HostProcess.pluginSkipped
public void pluginSkipped(int pluginId, String reason) { """ Skips the plugin with the given ID with the given {@code reason}. <p> Ideally the {@code reason} should be internationalised as it is shown in the GUI. @param pluginId the ID of the plugin that will be skipped. @param reason the reason why the plug...
java
public void pluginSkipped(int pluginId, String reason) { Plugin plugin = pluginFactory.getPlugin(pluginId); if (plugin == null) { return; } pluginSkipped(plugin, reason); }
[ "public", "void", "pluginSkipped", "(", "int", "pluginId", ",", "String", "reason", ")", "{", "Plugin", "plugin", "=", "pluginFactory", ".", "getPlugin", "(", "pluginId", ")", ";", "if", "(", "plugin", "==", "null", ")", "{", "return", ";", "}", "pluginS...
Skips the plugin with the given ID with the given {@code reason}. <p> Ideally the {@code reason} should be internationalised as it is shown in the GUI. @param pluginId the ID of the plugin that will be skipped. @param reason the reason why the plugin was skipped, might be {@code null}. @since 2.7.0 @see #pluginSkipped...
[ "Skips", "the", "plugin", "with", "the", "given", "ID", "with", "the", "given", "{", "@code", "reason", "}", ".", "<p", ">", "Ideally", "the", "{", "@code", "reason", "}", "should", "be", "internationalised", "as", "it", "is", "shown", "in", "the", "GU...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/HostProcess.java#L863-L870
Ordinastie/MalisisCore
src/main/java/net/malisis/core/block/component/DirectionalComponent.java
DirectionalComponent.getStateFromMeta
@Override public IBlockState getStateFromMeta(Block block, IBlockState state, int meta) { """ Gets the {@link IBlockState} from <code>meta</code>. @param block the block @param meta the meta @return the state from meta """ EnumFacing facing = null; if (getProperty() == HORIZONTAL) facing = EnumFac...
java
@Override public IBlockState getStateFromMeta(Block block, IBlockState state, int meta) { EnumFacing facing = null; if (getProperty() == HORIZONTAL) facing = EnumFacing.getHorizontal(meta & 3); else facing = EnumFacing.getFront(meta & 7); return state.withProperty(getProperty(), facing); }
[ "@", "Override", "public", "IBlockState", "getStateFromMeta", "(", "Block", "block", ",", "IBlockState", "state", ",", "int", "meta", ")", "{", "EnumFacing", "facing", "=", "null", ";", "if", "(", "getProperty", "(", ")", "==", "HORIZONTAL", ")", "facing", ...
Gets the {@link IBlockState} from <code>meta</code>. @param block the block @param meta the meta @return the state from meta
[ "Gets", "the", "{", "@link", "IBlockState", "}", "from", "<code", ">", "meta<", "/", "code", ">", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/block/component/DirectionalComponent.java#L156-L165
alkacon/opencms-core
src/org/opencms/main/CmsSessionManager.java
CmsSessionManager.switchUserFromSession
public String switchUserFromSession(CmsObject cms, HttpServletRequest req, CmsUser user, CmsSessionInfo sessionInfo) throws CmsException { """ Switches the current user to the given user. The session info is rebuild as if the given user performs a login at the workplace. @param cms the current CmsObject @...
java
public String switchUserFromSession(CmsObject cms, HttpServletRequest req, CmsUser user, CmsSessionInfo sessionInfo) throws CmsException { // only user with root administrator role are allowed to switch the user OpenCms.getRoleManager().checkRole(cms, CmsRole.ADMINISTRATOR.forOrgUnit(user.getOuFqn(...
[ "public", "String", "switchUserFromSession", "(", "CmsObject", "cms", ",", "HttpServletRequest", "req", ",", "CmsUser", "user", ",", "CmsSessionInfo", "sessionInfo", ")", "throws", "CmsException", "{", "// only user with root administrator role are allowed to switch the user", ...
Switches the current user to the given user. The session info is rebuild as if the given user performs a login at the workplace. @param cms the current CmsObject @param req the current request @param user the user to switch to @param sessionInfo to switch to a currently logged in user using the same session state @re...
[ "Switches", "the", "current", "user", "to", "the", "given", "user", ".", "The", "session", "info", "is", "rebuild", "as", "if", "the", "given", "user", "performs", "a", "login", "at", "the", "workplace", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsSessionManager.java#L469-L535
Talend/tesb-rt-se
sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java
MonitoringWebService.throwFault
private static void throwFault(String code, String message, Throwable t) throws PutEventsFault { """ Throw fault. @param code the fault code @param message the message @param t the throwable type @throws PutEventsFault """ if (LOG.isLoggable(Level.SEVERE)) { LOG.log(Level.SEVERE, "Thr...
java
private static void throwFault(String code, String message, Throwable t) throws PutEventsFault { if (LOG.isLoggable(Level.SEVERE)) { LOG.log(Level.SEVERE, "Throw Fault " + code + " " + message, t); } FaultType faultType = new FaultType(); faultType.setFaultCode(code); ...
[ "private", "static", "void", "throwFault", "(", "String", "code", ",", "String", "message", ",", "Throwable", "t", ")", "throws", "PutEventsFault", "{", "if", "(", "LOG", ".", "isLoggable", "(", "Level", ".", "SEVERE", ")", ")", "{", "LOG", ".", "log", ...
Throw fault. @param code the fault code @param message the message @param t the throwable type @throws PutEventsFault
[ "Throw", "fault", "." ]
train
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringWebService.java#L91-L108
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/factory/ComponentFactory.java
ComponentFactory.newWebMarkupContainer
public static <T> WebMarkupContainer newWebMarkupContainer(final String id, final IModel<T> model) { """ Factory method for create a new {@link WebMarkupContainer}. @param <T> the generic type of the model @param id the id @param model the model @return the new {@link WebMarkupContainer}. """ fina...
java
public static <T> WebMarkupContainer newWebMarkupContainer(final String id, final IModel<T> model) { final WebMarkupContainer webMarkupContainer = new WebMarkupContainer(id, model); webMarkupContainer.setOutputMarkupId(true); return webMarkupContainer; }
[ "public", "static", "<", "T", ">", "WebMarkupContainer", "newWebMarkupContainer", "(", "final", "String", "id", ",", "final", "IModel", "<", "T", ">", "model", ")", "{", "final", "WebMarkupContainer", "webMarkupContainer", "=", "new", "WebMarkupContainer", "(", ...
Factory method for create a new {@link WebMarkupContainer}. @param <T> the generic type of the model @param id the id @param model the model @return the new {@link WebMarkupContainer}.
[ "Factory", "method", "for", "create", "a", "new", "{", "@link", "WebMarkupContainer", "}", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/factory/ComponentFactory.java#L712-L718
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/hpack/H2Headers.java
H2Headers.decodeHeader
public static H2HeaderField decodeHeader(WsByteBuffer buffer, H2HeaderTable table) throws CompressionException { """ Decode header bytes without validating against connection settings @param WsByteBuffer @param H2HeaderTable @return H2HeaderField @throws CompressionException """ return decodeHead...
java
public static H2HeaderField decodeHeader(WsByteBuffer buffer, H2HeaderTable table) throws CompressionException { return decodeHeader(buffer, table, true, false, null); }
[ "public", "static", "H2HeaderField", "decodeHeader", "(", "WsByteBuffer", "buffer", ",", "H2HeaderTable", "table", ")", "throws", "CompressionException", "{", "return", "decodeHeader", "(", "buffer", ",", "table", ",", "true", ",", "false", ",", "null", ")", ";"...
Decode header bytes without validating against connection settings @param WsByteBuffer @param H2HeaderTable @return H2HeaderField @throws CompressionException
[ "Decode", "header", "bytes", "without", "validating", "against", "connection", "settings" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/hpack/H2Headers.java#L43-L45
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_user_userId_right_rightId_GET
public OvhRight serviceName_user_userId_right_rightId_GET(String serviceName, Long userId, Long rightId) throws IOException { """ Get this object properties REST: GET /dedicatedCloud/{serviceName}/user/{userId}/right/{rightId} @param serviceName [required] Domain of the service @param userId [required] @para...
java
public OvhRight serviceName_user_userId_right_rightId_GET(String serviceName, Long userId, Long rightId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}"; StringBuilder sb = path(qPath, serviceName, userId, rightId); String resp = exec(qPath, "GET", sb.toString(), ...
[ "public", "OvhRight", "serviceName_user_userId_right_rightId_GET", "(", "String", "serviceName", ",", "Long", "userId", ",", "Long", "rightId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/user/{userId}/right/{rightId}\"", ";", ...
Get this object properties REST: GET /dedicatedCloud/{serviceName}/user/{userId}/right/{rightId} @param serviceName [required] Domain of the service @param userId [required] @param rightId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L730-L735
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java
AbstractXmlReader.readStartTag
protected XMLEvent readStartTag(XMLEventReader reader, QName tagName) throws XMLStreamException, JournalException { """ Read the next event and complain if it is not the Start Tag that we expected. """ XMLEvent event = reader.nextTag(); if (!isStartTagEvent(event, tagName)) { ...
java
protected XMLEvent readStartTag(XMLEventReader reader, QName tagName) throws XMLStreamException, JournalException { XMLEvent event = reader.nextTag(); if (!isStartTagEvent(event, tagName)) { throw getNotStartTagException(tagName, event); } return event; }
[ "protected", "XMLEvent", "readStartTag", "(", "XMLEventReader", "reader", ",", "QName", "tagName", ")", "throws", "XMLStreamException", ",", "JournalException", "{", "XMLEvent", "event", "=", "reader", ".", "nextTag", "(", ")", ";", "if", "(", "!", "isStartTagEv...
Read the next event and complain if it is not the Start Tag that we expected.
[ "Read", "the", "next", "event", "and", "complain", "if", "it", "is", "not", "the", "Start", "Tag", "that", "we", "expected", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/xmlhelpers/AbstractXmlReader.java#L44-L51
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.addClasses
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { """ Add classes to the map file. @param writer XML stream writer @param jarFile jar file @param mapClassMethods true if we want to pro...
java
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader loader = new URLClassLoade...
[ "private", "void", "addClasses", "(", "XMLStreamWriter", "writer", ",", "File", "jarFile", ",", "boolean", "mapClassMethods", ")", "throws", "IOException", ",", "ClassNotFoundException", ",", "XMLStreamException", ",", "IntrospectionException", "{", "ClassLoader", "curr...
Add classes to the map file. @param writer XML stream writer @param jarFile jar file @param mapClassMethods true if we want to produce .Net style class method names @throws IOException @throws ClassNotFoundException @throws XMLStreamException @throws IntrospectionException
[ "Add", "classes", "to", "the", "map", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L145-L165
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java
TypesafeConfigUtils.getLong
public static Long getLong(Config config, String path) { """ Get a configuration as Long. Return {@code null} if missing or wrong type. @param config @param path @return """ try { Object obj = config.getAnyRef(path); return obj instanceof Number ? ((Number) obj).longValue()...
java
public static Long getLong(Config config, String path) { try { Object obj = config.getAnyRef(path); return obj instanceof Number ? ((Number) obj).longValue() : null; } catch (ConfigException.Missing | ConfigException.WrongType e) { if (e instanceof ConfigException.Wro...
[ "public", "static", "Long", "getLong", "(", "Config", "config", ",", "String", "path", ")", "{", "try", "{", "Object", "obj", "=", "config", ".", "getAnyRef", "(", "path", ")", ";", "return", "obj", "instanceof", "Number", "?", "(", "(", "Number", ")",...
Get a configuration as Long. Return {@code null} if missing or wrong type. @param config @param path @return
[ "Get", "a", "configuration", "as", "Long", ".", "Return", "{", "@code", "null", "}", "if", "missing", "or", "wrong", "type", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java#L364-L374
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/VerticalText.java
VerticalText.createLine
protected PdfLine createLine(float width) { """ Creates a line from the chunk array. @param width the width of the line @return the line or null if no more chunks """ if (chunks.isEmpty()) return null; splittedChunkText = null; currentStandbyChunk = null; PdfLine l...
java
protected PdfLine createLine(float width) { if (chunks.isEmpty()) return null; splittedChunkText = null; currentStandbyChunk = null; PdfLine line = new PdfLine(0, width, alignment, 0); String total; for (currentChunkMarker = 0; currentChunkMarker < chunks.size...
[ "protected", "PdfLine", "createLine", "(", "float", "width", ")", "{", "if", "(", "chunks", ".", "isEmpty", "(", ")", ")", "return", "null", ";", "splittedChunkText", "=", "null", ";", "currentStandbyChunk", "=", "null", ";", "PdfLine", "line", "=", "new",...
Creates a line from the chunk array. @param width the width of the line @return the line or null if no more chunks
[ "Creates", "a", "line", "from", "the", "chunk", "array", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/VerticalText.java#L168-L186
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/image/ScaleFilter.java
ScaleFilter.doFilter
protected RenderedImage doFilter(BufferedImage pImage, ServletRequest pRequest, ImageServletResponse pResponse) { """ Reads the image from the requested URL, scales it, and returns it in the Servlet stream. See above for details on parameters. """ // Get quality setting // SMOOTH | FAST | ...
java
protected RenderedImage doFilter(BufferedImage pImage, ServletRequest pRequest, ImageServletResponse pResponse) { // Get quality setting // SMOOTH | FAST | REPLICATE | DEFAULT | AREA_AVERAGING // See Image (mHints) int quality = getQuality(pRequest.getParameter(PARAM_SCALE_QUALITY)...
[ "protected", "RenderedImage", "doFilter", "(", "BufferedImage", "pImage", ",", "ServletRequest", "pRequest", ",", "ImageServletResponse", "pResponse", ")", "{", "// Get quality setting\r", "// SMOOTH | FAST | REPLICATE | DEFAULT | AREA_AVERAGING\r", "// See Image (mHints)\r", "int"...
Reads the image from the requested URL, scales it, and returns it in the Servlet stream. See above for details on parameters.
[ "Reads", "the", "image", "from", "the", "requested", "URL", "scales", "it", "and", "returns", "it", "in", "the", "Servlet", "stream", ".", "See", "above", "for", "details", "on", "parameters", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/image/ScaleFilter.java#L134-L164
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.forceRebootAsync
public Observable<RedisForceRebootResponseInner> forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters) { """ Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. @param resourceGroupName The name of ...
java
public Observable<RedisForceRebootResponseInner> forceRebootAsync(String resourceGroupName, String name, RedisRebootParameters parameters) { return forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1<ServiceResponse<RedisForceRebootResponseInner>, RedisForceRebootResponseInner...
[ "public", "Observable", "<", "RedisForceRebootResponseInner", ">", "forceRebootAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "RedisRebootParameters", "parameters", ")", "{", "return", "forceRebootWithServiceResponseAsync", "(", "resourceGroupName", ...
Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param parameters Specifies which Redis node(s) to reboot. @throws IllegalArgumentException...
[ "Reboot", "specified", "Redis", "node", "(", "s", ")", ".", "This", "operation", "requires", "write", "permission", "to", "the", "cache", "resource", ".", "There", "can", "be", "potential", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L1271-L1278
wisdom-framework/wisdom
framework/default-error-handler/src/main/java/org/wisdom/error/DefaultPageErrorHandler.java
DefaultPageErrorHandler.renderInternalError
private Result renderInternalError(Context context, Route route, Throwable e) { """ Generates the error page. @param context the context. @param route the route @param e the thrown error @return the HTTP result serving the error page """ Throwable localException; // If the templa...
java
private Result renderInternalError(Context context, Route route, Throwable e) { Throwable localException; // If the template is not there, just wrap the exception within a JSON Object. if (internalerror == null) { return internalServerError(e); } // Manage ITE ...
[ "private", "Result", "renderInternalError", "(", "Context", "context", ",", "Route", "route", ",", "Throwable", "e", ")", "{", "Throwable", "localException", ";", "// If the template is not there, just wrap the exception within a JSON Object.", "if", "(", "internalerror", "...
Generates the error page. @param context the context. @param route the route @param e the thrown error @return the HTTP result serving the error page
[ "Generates", "the", "error", "page", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/default-error-handler/src/main/java/org/wisdom/error/DefaultPageErrorHandler.java#L153-L201
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/builder/FindBugsBuilder.java
FindBugsBuilder.doBuild
private void doBuild(final Map<?, ?> args, final IProgressMonitor monitor, int kind) throws CoreException { """ Performs the build process. This method gets all files in the current project and has a <code>FindBugsVisitor</code> run on them. @param args A <code>Map</code> containing additional build parameter...
java
private void doBuild(final Map<?, ?> args, final IProgressMonitor monitor, int kind) throws CoreException { boolean incremental = (kind == IncrementalProjectBuilder.INCREMENTAL_BUILD || kind == IncrementalProjectBuilder.AUTO_BUILD); IProject project = getProject(); IResource reso...
[ "private", "void", "doBuild", "(", "final", "Map", "<", "?", ",", "?", ">", "args", ",", "final", "IProgressMonitor", "monitor", ",", "int", "kind", ")", "throws", "CoreException", "{", "boolean", "incremental", "=", "(", "kind", "==", "IncrementalProjectBui...
Performs the build process. This method gets all files in the current project and has a <code>FindBugsVisitor</code> run on them. @param args A <code>Map</code> containing additional build parameters. @param monitor The <code>IProgressMonitor</code> displaying the build progress. @param kind kind the kind of build bei...
[ "Performs", "the", "build", "process", ".", "This", "method", "gets", "all", "files", "in", "the", "current", "project", "and", "has", "a", "<code", ">", "FindBugsVisitor<", "/", "code", ">", "run", "on", "them", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/builder/FindBugsBuilder.java#L130-L157
msgpack/msgpack-java
msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java
MessageBuffer.putInt
public void putInt(int index, int v) { """ Write a big-endian integer value to the memory @param index @param v """ // Reversing the endian v = Integer.reverseBytes(v); unsafe.putInt(base, address + index, v); }
java
public void putInt(int index, int v) { // Reversing the endian v = Integer.reverseBytes(v); unsafe.putInt(base, address + index, v); }
[ "public", "void", "putInt", "(", "int", "index", ",", "int", "v", ")", "{", "// Reversing the endian", "v", "=", "Integer", ".", "reverseBytes", "(", "v", ")", ";", "unsafe", ".", "putInt", "(", "base", ",", "address", "+", "index", ",", "v", ")", ";...
Write a big-endian integer value to the memory @param index @param v
[ "Write", "a", "big", "-", "endian", "integer", "value", "to", "the", "memory" ]
train
https://github.com/msgpack/msgpack-java/blob/16e370e348215a72a14c210b42d448d513aee015/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java#L503-L508
stephanenicolas/toothpick
toothpick-runtime/src/main/java/toothpick/ScopeImpl.java
ScopeImpl.getBoundProvider
private <T> InternalProviderImpl<? extends T> getBoundProvider(Class<T> clazz, String bindingName) { """ Obtains the provider of the class {@code clazz} and name {@code bindingName}, if any. The returned provider will be bound to the scope. It can be {@code null} if there is no such provider. Ancestors are not t...
java
private <T> InternalProviderImpl<? extends T> getBoundProvider(Class<T> clazz, String bindingName) { return getInternalProvider(clazz, bindingName, true); }
[ "private", "<", "T", ">", "InternalProviderImpl", "<", "?", "extends", "T", ">", "getBoundProvider", "(", "Class", "<", "T", ">", "clazz", ",", "String", "bindingName", ")", "{", "return", "getInternalProvider", "(", "clazz", ",", "bindingName", ",", "true",...
Obtains the provider of the class {@code clazz} and name {@code bindingName}, if any. The returned provider will be bound to the scope. It can be {@code null} if there is no such provider. Ancestors are not taken into account. @param clazz the class for which to obtain the bound provider. @param bindingName the name, ...
[ "Obtains", "the", "provider", "of", "the", "class", "{", "@code", "clazz", "}", "and", "name", "{", "@code", "bindingName", "}", "if", "any", ".", "The", "returned", "provider", "will", "be", "bound", "to", "the", "scope", ".", "It", "can", "be", "{", ...
train
https://github.com/stephanenicolas/toothpick/blob/54476ca9a5fa48809c15a46e43e38db9ed7e1a75/toothpick-runtime/src/main/java/toothpick/ScopeImpl.java#L362-L364
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericGenbankHeaderFormat.java
GenericGenbankHeaderFormat._write_single_line
private String _write_single_line(String tag, String text) { """ Used in the the 'header' of each GenBank record. @param tag @param text """ assert tag.length() < HEADER_WIDTH; return StringManipulationHelper.padRight(tag, HEADER_WIDTH) + text.replace('\n', ' ') + lineSep; }
java
private String _write_single_line(String tag, String text) { assert tag.length() < HEADER_WIDTH; return StringManipulationHelper.padRight(tag, HEADER_WIDTH) + text.replace('\n', ' ') + lineSep; }
[ "private", "String", "_write_single_line", "(", "String", "tag", ",", "String", "text", ")", "{", "assert", "tag", ".", "length", "(", ")", "<", "HEADER_WIDTH", ";", "return", "StringManipulationHelper", ".", "padRight", "(", "tag", ",", "HEADER_WIDTH", ")", ...
Used in the the 'header' of each GenBank record. @param tag @param text
[ "Used", "in", "the", "the", "header", "of", "each", "GenBank", "record", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericGenbankHeaderFormat.java#L55-L59
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/PropertyMap.java
PropertyMap.getInteger
public Integer getInteger(String key, Integer def) { """ Returns the default value if the given key isn't in this PropertyMap or it isn't a valid integer. @param key Key of property to read @param def Default value """ String value = getString(key); if (value == null) { return ...
java
public Integer getInteger(String key, Integer def) { String value = getString(key); if (value == null) { return def; } else { try { return Integer.valueOf(value); } catch (NumberFormatException e) { } ...
[ "public", "Integer", "getInteger", "(", "String", "key", ",", "Integer", "def", ")", "{", "String", "value", "=", "getString", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "def", ";", "}", "else", "{", "try", "{", "re...
Returns the default value if the given key isn't in this PropertyMap or it isn't a valid integer. @param key Key of property to read @param def Default value
[ "Returns", "the", "default", "value", "if", "the", "given", "key", "isn", "t", "in", "this", "PropertyMap", "or", "it", "isn", "t", "a", "valid", "integer", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/PropertyMap.java#L312-L325
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/cache/JMapperCache.java
JMapperCache.getMapper
public static <D,S> IJMapper<D, S> getMapper(final Class<D> destination,final Class<S> source,final String xml) { """ Returns an instance of JMapper from cache if exists, in alternative a new instance. <br>Taking as input the path to the xml file or the content. @param destination the Destination Class @param...
java
public static <D,S> IJMapper<D, S> getMapper(final Class<D> destination,final Class<S> source,final String xml) { return getMapper(destination,source,null,xml); }
[ "public", "static", "<", "D", ",", "S", ">", "IJMapper", "<", "D", ",", "S", ">", "getMapper", "(", "final", "Class", "<", "D", ">", "destination", ",", "final", "Class", "<", "S", ">", "source", ",", "final", "String", "xml", ")", "{", "return", ...
Returns an instance of JMapper from cache if exists, in alternative a new instance. <br>Taking as input the path to the xml file or the content. @param destination the Destination Class @param source the Source Class @param xml xml configuration as content or path format @param <D> Destination class @param <S> Source ...
[ "Returns", "an", "instance", "of", "JMapper", "from", "cache", "if", "exists", "in", "alternative", "a", "new", "instance", ".", "<br", ">", "Taking", "as", "input", "the", "path", "to", "the", "xml", "file", "or", "the", "content", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/cache/JMapperCache.java#L118-L120
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/VirtualWANsInner.java
VirtualWANsInner.createOrUpdateAsync
public Observable<VirtualWANInner> createOrUpdateAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { """ Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. @param resourceGroupName The resource group name of the VirtualWan. @param virtual...
java
public Observable<VirtualWANInner> createOrUpdateAsync(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).map(new Func1<ServiceResponse<VirtualWANInner>, VirtualWANInner>() { ...
[ "public", "Observable", "<", "VirtualWANInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualWANName", ",", "VirtualWANInner", "wANParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ...
Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWANName The name of the VirtualWAN being created or updated. @param wANParameters Parameters supplied to create or update VirtualWAN. @throws Illegal...
[ "Creates", "a", "VirtualWAN", "resource", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "VirtualWAN", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/VirtualWANsInner.java#L238-L245
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java
ElemTemplateElement.callChildVisitors
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes) { """ Call the children visitors. @param visitor The visitor whose appropriate method will be called. """ for (ElemTemplateElement node = m_firstChild; node != null; node = node.m_nextSibling) { node.call...
java
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes) { for (ElemTemplateElement node = m_firstChild; node != null; node = node.m_nextSibling) { node.callVisitors(visitor); } }
[ "protected", "void", "callChildVisitors", "(", "XSLTVisitor", "visitor", ",", "boolean", "callAttributes", ")", "{", "for", "(", "ElemTemplateElement", "node", "=", "m_firstChild", ";", "node", "!=", "null", ";", "node", "=", "node", ".", "m_nextSibling", ")", ...
Call the children visitors. @param visitor The visitor whose appropriate method will be called.
[ "Call", "the", "children", "visitors", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L1633-L1641
Domo42/saga-lib
saga-lib-guice/src/main/java/com/codebullets/sagalib/guice/SagaLibModule.java
SagaLibModule.bindIfNotNull
private <T> void bindIfNotNull(final Class<T> interfaceType, @Nullable final Class<? extends T> implementationType, final Scope scope) { """ Perform binding to interface only if implementation type is not null. """ if (implementationType != null) { bind(interfaceType).to(implementationType)...
java
private <T> void bindIfNotNull(final Class<T> interfaceType, @Nullable final Class<? extends T> implementationType, final Scope scope) { if (implementationType != null) { bind(interfaceType).to(implementationType).in(scope); } }
[ "private", "<", "T", ">", "void", "bindIfNotNull", "(", "final", "Class", "<", "T", ">", "interfaceType", ",", "@", "Nullable", "final", "Class", "<", "?", "extends", "T", ">", "implementationType", ",", "final", "Scope", "scope", ")", "{", "if", "(", ...
Perform binding to interface only if implementation type is not null.
[ "Perform", "binding", "to", "interface", "only", "if", "implementation", "type", "is", "not", "null", "." ]
train
https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib-guice/src/main/java/com/codebullets/sagalib/guice/SagaLibModule.java#L164-L168
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/utilities/SQLUtilityImpl.java
SQLUtilityImpl.i_getLongString
@Override protected String i_getLongString(ResultSet rs, int pos) throws SQLException { """ Get a long string, which could be a TEXT or CLOB type. (CLOBs require special handling -- this method normalizes the reading of them) """ String s = rs.getString(pos); if (s != null) { /...
java
@Override protected String i_getLongString(ResultSet rs, int pos) throws SQLException { String s = rs.getString(pos); if (s != null) { // It's a String-based datatype, so just return it. return s; } else { // It may be a CLOB. If so, return the contents as...
[ "@", "Override", "protected", "String", "i_getLongString", "(", "ResultSet", "rs", ",", "int", "pos", ")", "throws", "SQLException", "{", "String", "s", "=", "rs", ".", "getString", "(", "pos", ")", ";", "if", "(", "s", "!=", "null", ")", "{", "// It's...
Get a long string, which could be a TEXT or CLOB type. (CLOBs require special handling -- this method normalizes the reading of them)
[ "Get", "a", "long", "string", "which", "could", "be", "a", "TEXT", "or", "CLOB", "type", ".", "(", "CLOBs", "require", "special", "handling", "--", "this", "method", "normalizes", "the", "reading", "of", "them", ")" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/SQLUtilityImpl.java#L413-L429
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/FileSystemUtilities.java
FileSystemUtilities.createDirectory
public static void createDirectory(final File aDirectory, final boolean cleanBeforeCreate) throws MojoExecutionException { """ Convenience method to successfully create a directory - or throw an exception if failing to create it. @param aDirectory The directory to create. @param cleanBeforeC...
java
public static void createDirectory(final File aDirectory, final boolean cleanBeforeCreate) throws MojoExecutionException { // Check sanity Validate.notNull(aDirectory, "aDirectory"); validateFileOrDirectoryName(aDirectory); // Clean an existing directory? if (cleanB...
[ "public", "static", "void", "createDirectory", "(", "final", "File", "aDirectory", ",", "final", "boolean", "cleanBeforeCreate", ")", "throws", "MojoExecutionException", "{", "// Check sanity", "Validate", ".", "notNull", "(", "aDirectory", ",", "\"aDirectory\"", ")",...
Convenience method to successfully create a directory - or throw an exception if failing to create it. @param aDirectory The directory to create. @param cleanBeforeCreate if {@code true}, the directory and all its content will be deleted before being re-created. This will ensure that the created directory is re...
[ "Convenience", "method", "to", "successfully", "create", "a", "directory", "-", "or", "throw", "an", "exception", "if", "failing", "to", "create", "it", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/FileSystemUtilities.java#L495-L519
Harium/keel
src/main/java/com/harium/keel/catalano/math/ComplexNumber.java
ComplexNumber.Multiply
public static ComplexNumber Multiply(ComplexNumber z1, ComplexNumber z2) { """ Multiply two complex numbers. @param z1 Complex Number. @param z2 Complex Number. @return Returns new ComplexNumber instance containing the multiply of specified complex numbers. """ double z1R = z1.real, z1I = z1.imag...
java
public static ComplexNumber Multiply(ComplexNumber z1, ComplexNumber z2) { double z1R = z1.real, z1I = z1.imaginary; double z2R = z2.real, z2I = z2.imaginary; return new ComplexNumber(z1R * z2R - z1I * z2I, z1R * z2I + z1I * z2R); }
[ "public", "static", "ComplexNumber", "Multiply", "(", "ComplexNumber", "z1", ",", "ComplexNumber", "z2", ")", "{", "double", "z1R", "=", "z1", ".", "real", ",", "z1I", "=", "z1", ".", "imaginary", ";", "double", "z2R", "=", "z2", ".", "real", ",", "z2I...
Multiply two complex numbers. @param z1 Complex Number. @param z2 Complex Number. @return Returns new ComplexNumber instance containing the multiply of specified complex numbers.
[ "Multiply", "two", "complex", "numbers", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/ComplexNumber.java#L313-L318
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/user/User.java
User.addRoleForGroup
public void addRoleForGroup(String groupName, String roleName) { """ This is only used when UserVO is a member of UserGroupVO. Only that group is populated as a substructure to store roles. @param groupId @param roleName """ if (workgroups==null) { workgroups = new Workgroup[1]; ...
java
public void addRoleForGroup(String groupName, String roleName) { if (workgroups==null) { workgroups = new Workgroup[1]; workgroups[0] = new Workgroup(null, groupName, null); } List<String> roles = workgroups[0].getRoles(); if (roles==null) { roles = ne...
[ "public", "void", "addRoleForGroup", "(", "String", "groupName", ",", "String", "roleName", ")", "{", "if", "(", "workgroups", "==", "null", ")", "{", "workgroups", "=", "new", "Workgroup", "[", "1", "]", ";", "workgroups", "[", "0", "]", "=", "new", "...
This is only used when UserVO is a member of UserGroupVO. Only that group is populated as a substructure to store roles. @param groupId @param roleName
[ "This", "is", "only", "used", "when", "UserVO", "is", "a", "member", "of", "UserGroupVO", ".", "Only", "that", "group", "is", "populated", "as", "a", "substructure", "to", "store", "roles", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/user/User.java#L289-L300
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.isNumeric
private static final boolean isNumeric(char formatChar, int count) { """ Return true if the given format character, occuring count times, represents a numeric field. """ return NUMERIC_FORMAT_CHARS.indexOf(formatChar) >= 0 || (count <= 2 && NUMERIC_FORMAT_CHARS2.indexOf(formatChar) >= ...
java
private static final boolean isNumeric(char formatChar, int count) { return NUMERIC_FORMAT_CHARS.indexOf(formatChar) >= 0 || (count <= 2 && NUMERIC_FORMAT_CHARS2.indexOf(formatChar) >= 0); }
[ "private", "static", "final", "boolean", "isNumeric", "(", "char", "formatChar", ",", "int", "count", ")", "{", "return", "NUMERIC_FORMAT_CHARS", ".", "indexOf", "(", "formatChar", ")", ">=", "0", "||", "(", "count", "<=", "2", "&&", "NUMERIC_FORMAT_CHARS2", ...
Return true if the given format character, occuring count times, represents a numeric field.
[ "Return", "true", "if", "the", "given", "format", "character", "occuring", "count", "times", "represents", "a", "numeric", "field", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2309-L2312
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.removeByG_E
@Override public void removeByG_E(long groupId, boolean enabled) { """ Removes all the commerce notification templates where groupId = &#63; and enabled = &#63; from the database. @param groupId the group ID @param enabled the enabled """ for (CommerceNotificationTemplate commerceNotificationTemplate : ...
java
@Override public void removeByG_E(long groupId, boolean enabled) { for (CommerceNotificationTemplate commerceNotificationTemplate : findByG_E( groupId, enabled, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceNotificationTemplate); } }
[ "@", "Override", "public", "void", "removeByG_E", "(", "long", "groupId", ",", "boolean", "enabled", ")", "{", "for", "(", "CommerceNotificationTemplate", "commerceNotificationTemplate", ":", "findByG_E", "(", "groupId", ",", "enabled", ",", "QueryUtil", ".", "ALL...
Removes all the commerce notification templates where groupId = &#63; and enabled = &#63; from the database. @param groupId the group ID @param enabled the enabled
[ "Removes", "all", "the", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L3227-L3233
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Message.java
Message.create
public static Message create(final String to, final String from, final String text) throws Exception { """ Convenience factory method to send a message, given the to number, the from number and the text @param to the from number @param from the to number @param text the text @return the message @throws IOExce...
java
public static Message create(final String to, final String from, final String text) throws Exception { final Map<String, Object> params = new HashMap<String, Object>(); params.put("to", to); params.put("from", from); params.put("text", text); return create(params); }
[ "public", "static", "Message", "create", "(", "final", "String", "to", ",", "final", "String", "from", ",", "final", "String", "text", ")", "throws", "Exception", "{", "final", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", "HashMap", "<...
Convenience factory method to send a message, given the to number, the from number and the text @param to the from number @param from the to number @param text the text @return the message @throws IOException unexpected error
[ "Convenience", "factory", "method", "to", "send", "a", "message", "given", "the", "to", "number", "the", "from", "number", "and", "the", "text" ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Message.java#L101-L109
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableConfig.java
PathfindableConfig.importPathData
public static PathData importPathData(Xml node) { """ Create a path data from its node. @param node The pathfinding node (must not be <code>null</code>). @return The path data instance. @throws LionEngineException If error when reading path data. """ Check.notNull(node); final String c...
java
public static PathData importPathData(Xml node) { Check.notNull(node); final String category = node.readString(ATT_CATEGORY); final double cost = node.readDouble(0.0, ATT_COST); final boolean blocking = node.readBoolean(ATT_BLOCK); final Collection<MovementTile> movem...
[ "public", "static", "PathData", "importPathData", "(", "Xml", "node", ")", "{", "Check", ".", "notNull", "(", "node", ")", ";", "final", "String", "category", "=", "node", ".", "readString", "(", "ATT_CATEGORY", ")", ";", "final", "double", "cost", "=", ...
Create a path data from its node. @param node The pathfinding node (must not be <code>null</code>). @return The path data instance. @throws LionEngineException If error when reading path data.
[ "Create", "a", "path", "data", "from", "its", "node", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableConfig.java#L109-L119
OpenLiberty/open-liberty
dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/BlockingList.java
BlockingList.put
public void put(K key, E element) { """ Add the element associated with the given key into the list at the established position for that key. @param key the key to use to add the element, which must match one of the keys provided to the constructor @param element the element to add @throws IllegalArgumentExce...
java
public void put(K key, E element) { final String methodName = "put(): "; stateLock.writeLock().lock(); try { Integer index = actualIndices.remove(key); if (index == null) throw new IllegalArgumentException("unknown key: " + key); elements[index...
[ "public", "void", "put", "(", "K", "key", ",", "E", "element", ")", "{", "final", "String", "methodName", "=", "\"put(): \"", ";", "stateLock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "try", "{", "Integer", "index", "=", "actualIndices"...
Add the element associated with the given key into the list at the established position for that key. @param key the key to use to add the element, which must match one of the keys provided to the constructor @param element the element to add @throws IllegalArgumentException if the key does not match one of the keys p...
[ "Add", "the", "element", "associated", "with", "the", "given", "key", "into", "the", "list", "at", "the", "established", "position", "for", "that", "key", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/util/BlockingList.java#L426-L442
alkacon/opencms-core
src-setup/org/opencms/setup/ui/CmsSetupErrorDialog.java
CmsSetupErrorDialog.showErrorDialog
public static void showErrorDialog(String message, Throwable t, Runnable onClose) { """ Shows the error dialog.<p> @param message the error message @param t the error to be displayed @param onClose executed on close """ Window window = prepareWindow(DialogWidth.wide); window.setCaption("E...
java
public static void showErrorDialog(String message, Throwable t, Runnable onClose) { Window window = prepareWindow(DialogWidth.wide); window.setCaption("Error"); window.setContent( new CmsSetupErrorDialog(message, message + "\n\n" + ExceptionUtils.getStackTrace(t), onClose, window));...
[ "public", "static", "void", "showErrorDialog", "(", "String", "message", ",", "Throwable", "t", ",", "Runnable", "onClose", ")", "{", "Window", "window", "=", "prepareWindow", "(", "DialogWidth", ".", "wide", ")", ";", "window", ".", "setCaption", "(", "\"Er...
Shows the error dialog.<p> @param message the error message @param t the error to be displayed @param onClose executed on close
[ "Shows", "the", "error", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/ui/CmsSetupErrorDialog.java#L181-L188
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.copyRange
protected IOException copyRange(Reader reader, PrintWriter writer) { """ Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception).<p> @param reader the reader to read from @param writer the writ...
java
protected IOException copyRange(Reader reader, PrintWriter writer) { // Copy the input stream to the output stream IOException exception = null; char[] buffer = new char[m_input]; int len = buffer.length; while (true) { try { len = reader.read(buffer)...
[ "protected", "IOException", "copyRange", "(", "Reader", "reader", ",", "PrintWriter", "writer", ")", "{", "// Copy the input stream to the output stream", "IOException", "exception", "=", "null", ";", "char", "[", "]", "buffer", "=", "new", "char", "[", "m_input", ...
Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception).<p> @param reader the reader to read from @param writer the writer to write to @return the exception which occurred during processing
[ "Copy", "the", "contents", "of", "the", "specified", "input", "stream", "to", "the", "specified", "output", "stream", "and", "ensure", "that", "both", "streams", "are", "closed", "before", "returning", "(", "even", "in", "the", "face", "of", "an", "exception...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L892-L912
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromCollection
public <OUT> DataStreamSource<OUT> fromCollection(Iterator<OUT> data, Class<OUT> type) { """ Creates a data stream from the given iterator. <p>Because the iterator will remain unmodified until the actual execution happens, the type of data returned by the iterator must be given explicitly in the form of the ty...
java
public <OUT> DataStreamSource<OUT> fromCollection(Iterator<OUT> data, Class<OUT> type) { return fromCollection(data, TypeExtractor.getForClass(type)); }
[ "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromCollection", "(", "Iterator", "<", "OUT", ">", "data", ",", "Class", "<", "OUT", ">", "type", ")", "{", "return", "fromCollection", "(", "data", ",", "TypeExtractor", ".", "getForClass", ...
Creates a data stream from the given iterator. <p>Because the iterator will remain unmodified until the actual execution happens, the type of data returned by the iterator must be given explicitly in the form of the type class (this is due to the fact that the Java compiler erases the generic type information). <p>No...
[ "Creates", "a", "data", "stream", "from", "the", "given", "iterator", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L840-L842
james-hu/jabb-core
src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java
AbstractHibernateDao.setupQuery
private void setupQuery(Query query, Object[] paramValues, Type[] paramTypes, Integer offset, Integer limit) { """ Setup a query with parameters and other configurations. @param query @param paramValues @param paramTypes @param offset @param limit """ if (paramValues != null && paramTypes != null){ ...
java
private void setupQuery(Query query, Object[] paramValues, Type[] paramTypes, Integer offset, Integer limit){ if (paramValues != null && paramTypes != null){ query.setParameters(paramValues, paramTypes); } if (offset != null){ query.setFirstResult(offset); } if (limit != null)...
[ "private", "void", "setupQuery", "(", "Query", "query", ",", "Object", "[", "]", "paramValues", ",", "Type", "[", "]", "paramTypes", ",", "Integer", "offset", ",", "Integer", "limit", ")", "{", "if", "(", "paramValues", "!=", "null", "&&", "paramTypes", ...
Setup a query with parameters and other configurations. @param query @param paramValues @param paramTypes @param offset @param limit
[ "Setup", "a", "query", "with", "parameters", "and", "other", "configurations", "." ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java#L377-L387
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/MapKeyToken.java
MapKeyToken.write
public void write(Object object, Object value) { """ Update a the value represented by this token on the given <code>object</code> with the new value. @param object the object @param value the new value of this property on the object """ if(object instanceof Map) mapUpdate((Map)object, _...
java
public void write(Object object, Object value) { if(object instanceof Map) mapUpdate((Map)object, _identifier, value); else beanUpdate(object, _identifier, value); }
[ "public", "void", "write", "(", "Object", "object", ",", "Object", "value", ")", "{", "if", "(", "object", "instanceof", "Map", ")", "mapUpdate", "(", "(", "Map", ")", "object", ",", "_identifier", ",", "value", ")", ";", "else", "beanUpdate", "(", "ob...
Update a the value represented by this token on the given <code>object</code> with the new value. @param object the object @param value the new value of this property on the object
[ "Update", "a", "the", "value", "represented", "by", "this", "token", "on", "the", "given", "<code", ">", "object<", "/", "code", ">", "with", "the", "new", "value", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/MapKeyToken.java#L105-L109
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Single.java
Single.ambWith
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Single<T> ambWith(SingleSource<? extends T> other) { """ Signals the event of this or the other SingleSource whichever signals first. <p> <img width="640" height="463" src="https://raw.github.com/wi...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Single<T> ambWith(SingleSource<? extends T> other) { ObjectHelper.requireNonNull(other, "other is null"); return ambArray(this, other); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "Single", "<", "T", ">", "ambWith", "(", "SingleSource", "<", "?", "extends", "T", ">", "other",...
Signals the event of this or the other SingleSource whichever signals first. <p> <img width="640" height="463" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.ambWith.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code ambWith} does not operate by default on a particular {@link Schedule...
[ "Signals", "the", "event", "of", "this", "or", "the", "other", "SingleSource", "whichever", "signals", "first", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "463", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Single.java#L1944-L1950
alkacon/opencms-core
src/org/opencms/loader/CmsTemplateContextManager.java
CmsTemplateContextManager.getTemplateContextProvider
public I_CmsTemplateContextProvider getTemplateContextProvider(CmsObject cms, String path) throws CmsException { """ Gets the template context provider for a given path.<p> @param cms the current CMS context @param path the path for which the template context provider should be determined @return the templa...
java
public I_CmsTemplateContextProvider getTemplateContextProvider(CmsObject cms, String path) throws CmsException { CmsResource resource = cms.readResource(path); I_CmsResourceLoader loader = OpenCms.getResourceManager().getLoader(resource); if (loader instanceof A_CmsXmlDocumentLoader) { ...
[ "public", "I_CmsTemplateContextProvider", "getTemplateContextProvider", "(", "CmsObject", "cms", ",", "String", "path", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "cms", ".", "readResource", "(", "path", ")", ";", "I_CmsResourceLoader", "loade...
Gets the template context provider for a given path.<p> @param cms the current CMS context @param path the path for which the template context provider should be determined @return the template context provider for the given path @throws CmsException if something goes wrong
[ "Gets", "the", "template", "context", "provider", "for", "a", "given", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsTemplateContextManager.java#L262-L280
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java
PatchOperationTarget.createLocal
public static final PatchOperationTarget createLocal(final File jbossHome, List<File> moduleRoots, List<File> bundlesRoots) throws IOException { """ Create a local target. @param jbossHome the jboss home @param moduleRoots the module roots @param bundlesRoots the bundle roots @return the loca...
java
public static final PatchOperationTarget createLocal(final File jbossHome, List<File> moduleRoots, List<File> bundlesRoots) throws IOException { final PatchTool tool = PatchTool.Factory.createLocalTool(jbossHome, moduleRoots, bundlesRoots); return new LocalPatchOperationTarget(tool); }
[ "public", "static", "final", "PatchOperationTarget", "createLocal", "(", "final", "File", "jbossHome", ",", "List", "<", "File", ">", "moduleRoots", ",", "List", "<", "File", ">", "bundlesRoots", ")", "throws", "IOException", "{", "final", "PatchTool", "tool", ...
Create a local target. @param jbossHome the jboss home @param moduleRoots the module roots @param bundlesRoots the bundle roots @return the local target @throws IOException
[ "Create", "a", "local", "target", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java#L76-L79
weld/core
modules/web/src/main/java/org/jboss/weld/module/web/util/servlet/ServletUtils.java
ServletUtils.getContextActivationFilter
public static HttpContextActivationFilter getContextActivationFilter(BeanManagerImpl manager, ServletContext context) { """ Returns the right {@link HttpContextActivationFilter}. If one is set through the SPI it has precedence. Otherwise, if a mapping is set using web.xml, a new {@link RegexHttpContextActivationF...
java
public static HttpContextActivationFilter getContextActivationFilter(BeanManagerImpl manager, ServletContext context) { HttpContextActivationFilter filter = manager.getServices().get(HttpContextActivationFilter.class); final String pattern = context.getInitParameter(InitParameters.CONTEXT_MAPPING); ...
[ "public", "static", "HttpContextActivationFilter", "getContextActivationFilter", "(", "BeanManagerImpl", "manager", ",", "ServletContext", "context", ")", "{", "HttpContextActivationFilter", "filter", "=", "manager", ".", "getServices", "(", ")", ".", "get", "(", "HttpC...
Returns the right {@link HttpContextActivationFilter}. If one is set through the SPI it has precedence. Otherwise, if a mapping is set using web.xml, a new {@link RegexHttpContextActivationFilter} is constructed and returned. By default, {@link AcceptingHttpContextActivationFilter} is used. @param manager @param conte...
[ "Returns", "the", "right", "{", "@link", "HttpContextActivationFilter", "}", ".", "If", "one", "is", "set", "through", "the", "SPI", "it", "has", "precedence", ".", "Otherwise", "if", "a", "mapping", "is", "set", "using", "web", ".", "xml", "a", "new", "...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/modules/web/src/main/java/org/jboss/weld/module/web/util/servlet/ServletUtils.java#L31-L43
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java
UnconditionalValueDerefAnalysis.checkNonNullParams
private void checkNonNullParams(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact) throws DataflowAnalysisException { """ If this is a method call instruction, check to see if any of the parameters are @NonNull, and treat them as dereferences. @param location the Locati...
java
private void checkNonNullParams(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact) throws DataflowAnalysisException { ConstantPoolGen constantPool = methodGen.getConstantPool(); Set<ValueNumber> nonNullParams = checkNonNullParams(location, vnaFrame, constantPool, ...
[ "private", "void", "checkNonNullParams", "(", "Location", "location", ",", "ValueNumberFrame", "vnaFrame", ",", "UnconditionalValueDerefSet", "fact", ")", "throws", "DataflowAnalysisException", "{", "ConstantPoolGen", "constantPool", "=", "methodGen", ".", "getConstantPool"...
If this is a method call instruction, check to see if any of the parameters are @NonNull, and treat them as dereferences. @param location the Location of the instruction @param vnaFrame the ValueNumberFrame at the Location of the instruction @param fact the dataflow value to modify @throws DataflowAnalysisException
[ "If", "this", "is", "a", "method", "call", "instruction", "check", "to", "see", "if", "any", "of", "the", "parameters", "are", "@NonNull", "and", "treat", "them", "as", "dereferences", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java#L511-L519
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/vod/VodClient.java
VodClient.updateMediaResource
public UpdateMediaResourceResponse updateMediaResource(UpdateMediaResourceRequest request) { """ Update the title and description for the specific media resource managed by VOD service. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param request The request wrapper...
java
public UpdateMediaResourceResponse updateMediaResource(UpdateMediaResourceRequest request) { InternalRequest internalRequest = createRequest(HttpMethodName.PUT, request, PATH_MEDIA, request.getMediaId()); internalRequest.addParameter(PARA_ATTRIBUTES, null); return invokeHttpClie...
[ "public", "UpdateMediaResourceResponse", "updateMediaResource", "(", "UpdateMediaResourceRequest", "request", ")", "{", "InternalRequest", "internalRequest", "=", "createRequest", "(", "HttpMethodName", ".", "PUT", ",", "request", ",", "PATH_MEDIA", ",", "request", ".", ...
Update the title and description for the specific media resource managed by VOD service. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param request The request wrapper object containing all options. @return empty response will be returned
[ "Update", "the", "title", "and", "description", "for", "the", "specific", "media", "resource", "managed", "by", "VOD", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vod/VodClient.java#L649-L655
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECKey.java
ECKey.doSign
public ECDSASignature doSign(byte[] input) { """ Signs the given hash and returns the R and S components as BigIntegers and put them in ECDSASignature @param input to sign @return ECDSASignature signature that contains the R and S components """ if (input.length != 32) { throw new Ill...
java
public ECDSASignature doSign(byte[] input) { if (input.length != 32) { throw new IllegalArgumentException("Expected 32 byte input to ECDSA signature, not " + input.length); } // No decryption of private key required. if (privKey == null) throw new MissingPrivateKe...
[ "public", "ECDSASignature", "doSign", "(", "byte", "[", "]", "input", ")", "{", "if", "(", "input", ".", "length", "!=", "32", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Expected 32 byte input to ECDSA signature, not \"", "+", "input", ".", "l...
Signs the given hash and returns the R and S components as BigIntegers and put them in ECDSASignature @param input to sign @return ECDSASignature signature that contains the R and S components
[ "Signs", "the", "given", "hash", "and", "returns", "the", "R", "and", "S", "components", "as", "BigIntegers", "and", "put", "them", "in", "ECDSASignature" ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECKey.java#L759-L783
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/ascii/rest/HttpCommand.java
HttpCommand.setResponse
public void setResponse(Map<String, Object> headers) { """ HTTP/1.0 200 OK Content-Length: 0 Custom-Header1: val1 Custom-Header2: val2 @param headers """ int size = RES_200.length; byte[] len = stringToBytes(String.valueOf(0)); size += CONTENT_LENGTH.length; size += len.le...
java
public void setResponse(Map<String, Object> headers) { int size = RES_200.length; byte[] len = stringToBytes(String.valueOf(0)); size += CONTENT_LENGTH.length; size += len.length; size += TextCommandConstants.RETURN.length; if (headers != null) { for (Map.Entr...
[ "public", "void", "setResponse", "(", "Map", "<", "String", ",", "Object", ">", "headers", ")", "{", "int", "size", "=", "RES_200", ".", "length", ";", "byte", "[", "]", "len", "=", "stringToBytes", "(", "String", ".", "valueOf", "(", "0", ")", ")", ...
HTTP/1.0 200 OK Content-Length: 0 Custom-Header1: val1 Custom-Header2: val2 @param headers
[ "HTTP", "/", "1", ".", "0", "200", "OK", "Content", "-", "Length", ":", "0", "Custom", "-", "Header1", ":", "val1", "Custom", "-", "Header2", ":", "val2" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/ascii/rest/HttpCommand.java#L111-L139
cloudfoundry/cf-java-client
cloudfoundry-util/src/main/java/org/cloudfoundry/util/DateUtils.java
DateUtils.parseFromIso8601
public static Date parseFromIso8601(String s) { """ Parses a string in {@code ISO8601} format to a {@link Date} object @param s the string to parse @return the parsed {@link Date} """ synchronized (MONITOR) { try { return ISO8601.parse(s); } catch (ParseExcep...
java
public static Date parseFromIso8601(String s) { synchronized (MONITOR) { try { return ISO8601.parse(s); } catch (ParseException e) { throw new IllegalArgumentException("Unable to parse date", e); } } }
[ "public", "static", "Date", "parseFromIso8601", "(", "String", "s", ")", "{", "synchronized", "(", "MONITOR", ")", "{", "try", "{", "return", "ISO8601", ".", "parse", "(", "s", ")", ";", "}", "catch", "(", "ParseException", "e", ")", "{", "throw", "new...
Parses a string in {@code ISO8601} format to a {@link Date} object @param s the string to parse @return the parsed {@link Date}
[ "Parses", "a", "string", "in", "{", "@code", "ISO8601", "}", "format", "to", "a", "{", "@link", "Date", "}", "object" ]
train
https://github.com/cloudfoundry/cf-java-client/blob/caa1cb889cfe8717614c071703d833a1540784df/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DateUtils.java#L55-L63
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BinaryTransform.java
BinaryTransform.getString
protected String getString(byte[] data, int offset, int length) { """ Returns a string value from the byte array. @param data The source data. @param offset The byte offset. @param length The string length. @return A string """ return new String(data, offset, length, CS_WIN1252); }
java
protected String getString(byte[] data, int offset, int length) { return new String(data, offset, length, CS_WIN1252); }
[ "protected", "String", "getString", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "new", "String", "(", "data", ",", "offset", ",", "length", ",", "CS_WIN1252", ")", ";", "}" ]
Returns a string value from the byte array. @param data The source data. @param offset The byte offset. @param length The string length. @return A string
[ "Returns", "a", "string", "value", "from", "the", "byte", "array", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BinaryTransform.java#L139-L141
RestComm/jss7
mtp/mtp-impl/src/main/java/org/restcomm/protocols/ss7/mtp/util/MTPUtility.java
MTPUtility.copyBackRouteHeader
public static void copyBackRouteHeader(byte[] source, byte[] dest) { """ Extract routing information from source[], it expects that source is properly encoded routing label atleast(5bytes long, same as dest). It copies data to <b>dest</b> and swamp <i>DPC</i> with <i>OPC</i>. @param source @param dest """...
java
public static void copyBackRouteHeader(byte[] source, byte[] dest) { int thisPointCode = getFromSif_DPC(source, 1); int remotePointCode = getFromSif_OPC(source, 1); int sls = getFromSif_SLS(source, 1); int si = getFromSif_SI(source); int ssi = getFromSif_SSI(source); writ...
[ "public", "static", "void", "copyBackRouteHeader", "(", "byte", "[", "]", "source", ",", "byte", "[", "]", "dest", ")", "{", "int", "thisPointCode", "=", "getFromSif_DPC", "(", "source", ",", "1", ")", ";", "int", "remotePointCode", "=", "getFromSif_OPC", ...
Extract routing information from source[], it expects that source is properly encoded routing label atleast(5bytes long, same as dest). It copies data to <b>dest</b> and swamp <i>DPC</i> with <i>OPC</i>. @param source @param dest
[ "Extract", "routing", "information", "from", "source", "[]", "it", "expects", "that", "source", "is", "properly", "encoded", "routing", "label", "atleast", "(", "5bytes", "long", "same", "as", "dest", ")", ".", "It", "copies", "data", "to", "<b", ">", "des...
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/mtp/mtp-impl/src/main/java/org/restcomm/protocols/ss7/mtp/util/MTPUtility.java#L40-L47
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.vps_serviceName_upgrade_duration_POST
public OvhOrder vps_serviceName_upgrade_duration_POST(String serviceName, String duration, String model) throws IOException { """ Create order REST: POST /order/vps/{serviceName}/upgrade/{duration} @param model [required] Model @param serviceName [required] The internal name of your VPS offer @param duration...
java
public OvhOrder vps_serviceName_upgrade_duration_POST(String serviceName, String duration, String model) throws IOException { String qPath = "/order/vps/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, ...
[ "public", "OvhOrder", "vps_serviceName_upgrade_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "String", "model", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/vps/{serviceName}/upgrade/{duration}\"", ";", "StringBuilder"...
Create order REST: POST /order/vps/{serviceName}/upgrade/{duration} @param model [required] Model @param serviceName [required] The internal name of your VPS offer @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3485-L3492
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.domain_zone_new_POST
public OvhOrder domain_zone_new_POST(Boolean minimized, String zoneName) throws IOException { """ Create order REST: POST /order/domain/zone/new @param minimized [required] Create only mandatory records @param zoneName [required] Name of the zone to create """ String qPath = "/order/domain/zone/new"; ...
java
public OvhOrder domain_zone_new_POST(Boolean minimized, String zoneName) throws IOException { String qPath = "/order/domain/zone/new"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "minimized", minimized); addBody(o, "zoneName", zoneName); String resp =...
[ "public", "OvhOrder", "domain_zone_new_POST", "(", "Boolean", "minimized", ",", "String", "zoneName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/domain/zone/new\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "HashMap...
Create order REST: POST /order/domain/zone/new @param minimized [required] Create only mandatory records @param zoneName [required] Name of the zone to create
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6021-L6029
datacleaner/AnalyzerBeans
components/data-structures/src/main/java/org/eobjects/analyzer/beans/datastructures/SelectFromMapTransformer.java
SelectFromMapTransformer.find
public static Object find(Map<String, ?> map, String key) { """ Searches a map for a given key. The key can be a regular map key, or a simple expression of the form: <ul> <li>foo.bar (will lookup 'foo', and then 'bar' in a potential nested map) </li> <li>foo.bar[0].baz (will lookup 'foo', then 'bar' in a po...
java
public static Object find(Map<String, ?> map, String key) { return CollectionUtils.find(map, key); }
[ "public", "static", "Object", "find", "(", "Map", "<", "String", ",", "?", ">", "map", ",", "String", "key", ")", "{", "return", "CollectionUtils", ".", "find", "(", "map", ",", "key", ")", ";", "}" ]
Searches a map for a given key. The key can be a regular map key, or a simple expression of the form: <ul> <li>foo.bar (will lookup 'foo', and then 'bar' in a potential nested map) </li> <li>foo.bar[0].baz (will lookup 'foo', then 'bar' in a potential nested map, then pick the first element in case it is a list/array ...
[ "Searches", "a", "map", "for", "a", "given", "key", ".", "The", "key", "can", "be", "a", "regular", "map", "key", "or", "a", "simple", "expression", "of", "the", "form", ":" ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/data-structures/src/main/java/org/eobjects/analyzer/beans/datastructures/SelectFromMapTransformer.java#L132-L134
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/nt/OrganizationDictionary.java
OrganizationDictionary.parsePattern
public static void parsePattern(List<NT> ntList, List<Vertex> vertexList, final WordNet wordNetOptimum, final WordNet wordNetAll) { """ 模式匹配 @param ntList 确定的标注序列 @param vertexList 原始的未加角色标注的序列 @param wordNetOptimum 待优化的图 @param wordNetAll """ // ListIterator<Vertex> listIterator = ver...
java
public static void parsePattern(List<NT> ntList, List<Vertex> vertexList, final WordNet wordNetOptimum, final WordNet wordNetAll) { // ListIterator<Vertex> listIterator = vertexList.listIterator(); StringBuilder sbPattern = new StringBuilder(ntList.size()); for (NT nt : ntList) { ...
[ "public", "static", "void", "parsePattern", "(", "List", "<", "NT", ">", "ntList", ",", "List", "<", "Vertex", ">", "vertexList", ",", "final", "WordNet", "wordNetOptimum", ",", "final", "WordNet", "wordNetAll", ")", "{", "// ListIterator<Vertex> listIterat...
模式匹配 @param ntList 确定的标注序列 @param vertexList 原始的未加角色标注的序列 @param wordNetOptimum 待优化的图 @param wordNetAll
[ "模式匹配" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/nt/OrganizationDictionary.java#L3745-L3782