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
UrielCh/ovh-java-sdk
ovh-java-sdk-paastimeseries/src/main/java/net/minidev/ovh/api/ApiOvhPaastimeseries.java
ApiOvhPaastimeseries.serviceName_setup_POST
public OvhProject serviceName_setup_POST(String serviceName, String description, String displayName, String raTokenId, String raTokenKey, String regionId) throws IOException { """ Setup a project REST: POST /paas/timeseries/{serviceName}/setup @param serviceName [required] Service Name @param displayName [req...
java
public OvhProject serviceName_setup_POST(String serviceName, String description, String displayName, String raTokenId, String raTokenKey, String regionId) throws IOException { String qPath = "/paas/timeseries/{serviceName}/setup"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap...
[ "public", "OvhProject", "serviceName_setup_POST", "(", "String", "serviceName", ",", "String", "description", ",", "String", "displayName", ",", "String", "raTokenId", ",", "String", "raTokenKey", ",", "String", "regionId", ")", "throws", "IOException", "{", "String...
Setup a project REST: POST /paas/timeseries/{serviceName}/setup @param serviceName [required] Service Name @param displayName [required] Project name @param description [required] Project description @param regionId [required] Region to use @param raTokenId [required] Your runabove app token id @param raTokenKey [requ...
[ "Setup", "a", "project" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-paastimeseries/src/main/java/net/minidev/ovh/api/ApiOvhPaastimeseries.java#L128-L139
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toDateSimple
public static DateTime toDateSimple(String str, TimeZone timeZone) throws PageException { """ converts a Object to a DateTime Object, returns null if invalid string @param str String to Convert @param timeZone @return coverted Date Time Object @throws PageException """ DateTime dt = toDateSimple(str, CO...
java
public static DateTime toDateSimple(String str, TimeZone timeZone) throws PageException { DateTime dt = toDateSimple(str, CONVERTING_TYPE_OFFSET, true, timeZone, null); if (dt == null) throw new ExpressionException("can't cast [" + str + "] to date value"); return dt; }
[ "public", "static", "DateTime", "toDateSimple", "(", "String", "str", ",", "TimeZone", "timeZone", ")", "throws", "PageException", "{", "DateTime", "dt", "=", "toDateSimple", "(", "str", ",", "CONVERTING_TYPE_OFFSET", ",", "true", ",", "timeZone", ",", "null", ...
converts a Object to a DateTime Object, returns null if invalid string @param str String to Convert @param timeZone @return coverted Date Time Object @throws PageException
[ "converts", "a", "Object", "to", "a", "DateTime", "Object", "returns", "null", "if", "invalid", "string" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L423-L427
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.addHierarchicalEntityChildWithServiceResponseAsync
public Observable<ServiceResponse<UUID>> addHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, AddHierarchicalEntityChildOptionalParameter addHierarchicalEntityChildOptionalParameter) { """ Creates a single child in an existing hierarchical entity model. @param appId T...
java
public Observable<ServiceResponse<UUID>> addHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, AddHierarchicalEntityChildOptionalParameter addHierarchicalEntityChildOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentExceptio...
[ "public", "Observable", "<", "ServiceResponse", "<", "UUID", ">", ">", "addHierarchicalEntityChildWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "AddHierarchicalEntityChildOptionalParameter", "addHierarchicalEntityC...
Creates a single child in an existing hierarchical entity model. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param addHierarchicalEntityChildOptionalParameter the object representing the optional parameters to be set before calling this API ...
[ "Creates", "a", "single", "child", "in", "an", "existing", "hierarchical", "entity", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L6693-L6709
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/matchspace/utils/TraceImpl.java
TraceImpl.internalBytes
private void internalBytes(Object source, Class sourceClass, byte[] data, int start, int count) { """ Internal implementation of byte data trace. @param source @param sourceClass @param data @param start @param count """ StringBuffer stringBuffer = new StringBuffer(); stringBuffer.appen...
java
private void internalBytes(Object source, Class sourceClass, byte[] data, int start, int count) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(sourceClass.getName()); stringBuffer.append(" ["); if (source != null) { stringBuffer.append(sou...
[ "private", "void", "internalBytes", "(", "Object", "source", ",", "Class", "sourceClass", ",", "byte", "[", "]", "data", ",", "int", "start", ",", "int", "count", ")", "{", "StringBuffer", "stringBuffer", "=", "new", "StringBuffer", "(", ")", ";", "stringB...
Internal implementation of byte data trace. @param source @param sourceClass @param data @param start @param count
[ "Internal", "implementation", "of", "byte", "data", "trace", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/matchspace/utils/TraceImpl.java#L198-L244
upwork/java-upwork
src/com/Upwork/api/Routers/Reports/Time.java
Time.getByTeamFull
public JSONObject getByTeamFull(String company, String team, HashMap<String, String> params) throws JSONException { """ Generate Time Reports for a Specific Team (with financial info) @param company Company ID @param team Team ID @param params Parameters @throws JSONException If error occurred @return...
java
public JSONObject getByTeamFull(String company, String team, HashMap<String, String> params) throws JSONException { return _getByType(company, team, null, params, false); }
[ "public", "JSONObject", "getByTeamFull", "(", "String", "company", ",", "String", "team", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "_getByType", "(", "company", ",", "team", ",", "null", ",",...
Generate Time Reports for a Specific Team (with financial info) @param company Company ID @param team Team ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Generate", "Time", "Reports", "for", "a", "Specific", "Team", "(", "with", "financial", "info", ")" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Time.java#L80-L82
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
AnnotationTypeRequiredMemberBuilder.buildSignature
public void buildSignature(XMLNode node, Content annotationDocTree) { """ Build the signature. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added """ annotationDocTree.addContent( ...
java
public void buildSignature(XMLNode node, Content annotationDocTree) { annotationDocTree.addContent( writer.getSignature((MemberDoc) members.get(currentMemberIndex))); }
[ "public", "void", "buildSignature", "(", "XMLNode", "node", ",", "Content", "annotationDocTree", ")", "{", "annotationDocTree", ".", "addContent", "(", "writer", ".", "getSignature", "(", "(", "MemberDoc", ")", "members", ".", "get", "(", "currentMemberIndex", "...
Build the signature. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added
[ "Build", "the", "signature", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java#L191-L194
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlWriter.java
HtmlWriter.getWinTitleScript
protected HtmlTree getWinTitleScript() { """ Returns an HtmlTree for the SCRIPT tag. @return an HtmlTree for the SCRIPT tag """ HtmlTree scriptTree = HtmlTree.SCRIPT(); if(winTitle != null && winTitle.length() > 0) { String scriptCode = "<!--\n" + " try {\n...
java
protected HtmlTree getWinTitleScript(){ HtmlTree scriptTree = HtmlTree.SCRIPT(); if(winTitle != null && winTitle.length() > 0) { String scriptCode = "<!--\n" + " try {\n" + " if (location.href.indexOf('is-external=true') == -1) {\n" + ...
[ "protected", "HtmlTree", "getWinTitleScript", "(", ")", "{", "HtmlTree", "scriptTree", "=", "HtmlTree", ".", "SCRIPT", "(", ")", ";", "if", "(", "winTitle", "!=", "null", "&&", "winTitle", ".", "length", "(", ")", ">", "0", ")", "{", "String", "scriptCod...
Returns an HtmlTree for the SCRIPT tag. @return an HtmlTree for the SCRIPT tag
[ "Returns", "an", "HtmlTree", "for", "the", "SCRIPT", "tag", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlWriter.java#L176-L192
resource4j/resource4j
core/src/main/java/com/github/resource4j/objects/providers/MappingResourceObjectProvider.java
MappingResourceObjectProvider.setMappings
public void setMappings(Map<String,ResourceObjectProvider> mappings) { """ Specify list of pattern to resource object provider mappings. Note, that if the actual object name matches two or more patterns, first one in the map will be used. You may use {@link LinkedHashMap} to specify exact order. @param mappings...
java
public void setMappings(Map<String,ResourceObjectProvider> mappings) { this.mappings = new ArrayList<>(mappings.size()); for (Map.Entry<String, ResourceObjectProvider> entry : mappings.entrySet()) { this.mappings.add(new Mapping(compile(entry.getKey()), entry.getValue())); } }
[ "public", "void", "setMappings", "(", "Map", "<", "String", ",", "ResourceObjectProvider", ">", "mappings", ")", "{", "this", ".", "mappings", "=", "new", "ArrayList", "<>", "(", "mappings", ".", "size", "(", ")", ")", ";", "for", "(", "Map", ".", "Ent...
Specify list of pattern to resource object provider mappings. Note, that if the actual object name matches two or more patterns, first one in the map will be used. You may use {@link LinkedHashMap} to specify exact order. @param mappings a set of pattern-factory pairs stored in {@link Map}
[ "Specify", "list", "of", "pattern", "to", "resource", "object", "provider", "mappings", ".", "Note", "that", "if", "the", "actual", "object", "name", "matches", "two", "or", "more", "patterns", "first", "one", "in", "the", "map", "will", "be", "used", ".",...
train
https://github.com/resource4j/resource4j/blob/6100443b9a78edc8a5867e1e075f7ee12e6698ca/core/src/main/java/com/github/resource4j/objects/providers/MappingResourceObjectProvider.java#L37-L42
wcm-io/wcm-io-tooling
netbeans/sightly/src/main/java/io/wcm/tooling/netbeans/sightly/completion/BasicCompletionItem.java
BasicCompletionItem.substituteText
protected void substituteText(JTextComponent component, String toAdd) { """ Substitutes the text inside the component. @param component @param toAdd optional text which is appended to the completion text """ String text = completionText; if (toAdd != null) { text += toAdd; } try { ...
java
protected void substituteText(JTextComponent component, String toAdd) { String text = completionText; if (toAdd != null) { text += toAdd; } try { StyledDocument doc = (StyledDocument)component.getDocument(); //Here we remove the characters starting at the start offset //and endin...
[ "protected", "void", "substituteText", "(", "JTextComponent", "component", ",", "String", "toAdd", ")", "{", "String", "text", "=", "completionText", ";", "if", "(", "toAdd", "!=", "null", ")", "{", "text", "+=", "toAdd", ";", "}", "try", "{", "StyledDocum...
Substitutes the text inside the component. @param component @param toAdd optional text which is appended to the completion text
[ "Substitutes", "the", "text", "inside", "the", "component", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/netbeans/sightly/src/main/java/io/wcm/tooling/netbeans/sightly/completion/BasicCompletionItem.java#L88-L104
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/system/exec/Exec.java
Exec.startBasic
public BasicProcessTracker startBasic() throws IOException { """ Launches the process, returning a handle to it for IO ops, etc<br /> <strong>the caller must read the output streams: otherwise the buffers may fill up and the remote program will be suspended indefinitely</strong> @return @throws IOExceptio...
java
public BasicProcessTracker startBasic() throws IOException { final Process p = getProcessBuilder().start(); return new BasicProcessTracker(cmd, p, builder.redirectErrorStream()); }
[ "public", "BasicProcessTracker", "startBasic", "(", ")", "throws", "IOException", "{", "final", "Process", "p", "=", "getProcessBuilder", "(", ")", ".", "start", "(", ")", ";", "return", "new", "BasicProcessTracker", "(", "cmd", ",", "p", ",", "builder", "."...
Launches the process, returning a handle to it for IO ops, etc<br /> <strong>the caller must read the output streams: otherwise the buffers may fill up and the remote program will be suspended indefinitely</strong> @return @throws IOException
[ "Launches", "the", "process", "returning", "a", "handle", "to", "it", "for", "IO", "ops", "etc<br", "/", ">", "<strong", ">", "the", "caller", "must", "read", "the", "output", "streams", ":", "otherwise", "the", "buffers", "may", "fill", "up", "and", "th...
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/system/exec/Exec.java#L130-L135
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/storage/project/ProjectInitializer.java
ProjectInitializer.initializeInternalProject
public static void initializeInternalProject(CommandExecutor executor) { """ Creates an internal project and repositories such as a token storage. """ final long creationTimeMillis = System.currentTimeMillis(); try { executor.execute(createProject(creationTimeMillis, Author.SYSTEM, ...
java
public static void initializeInternalProject(CommandExecutor executor) { final long creationTimeMillis = System.currentTimeMillis(); try { executor.execute(createProject(creationTimeMillis, Author.SYSTEM, INTERNAL_PROJ)) .get(); } catch (Throwable cause) { ...
[ "public", "static", "void", "initializeInternalProject", "(", "CommandExecutor", "executor", ")", "{", "final", "long", "creationTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "executor", ".", "execute", "(", "createProject", "(",...
Creates an internal project and repositories such as a token storage.
[ "Creates", "an", "internal", "project", "and", "repositories", "such", "as", "a", "token", "storage", "." ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/storage/project/ProjectInitializer.java#L38-L62
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/marvin/image/MarvinImage.java
MarvinImage.drawRect
public void drawRect(int x, int y, int w, int h, Color c) { """ Draws a rectangle in the image. It�s useful for debugging purposes. @param x rect�s start position in x-axis @param y rect�s start positioj in y-axis @param w rect�s width @param h rect�s height @param c rect�s color """ int color =...
java
public void drawRect(int x, int y, int w, int h, Color c) { int color = c.getRGB(); for (int i = x; i < x + w; i++) { setIntColor(i, y, color); setIntColor(i, y + (h - 1), color); } for (int i = y; i < y + h; i++) { setIntColor(x, i, color); ...
[ "public", "void", "drawRect", "(", "int", "x", ",", "int", "y", ",", "int", "w", ",", "int", "h", ",", "Color", "c", ")", "{", "int", "color", "=", "c", ".", "getRGB", "(", ")", ";", "for", "(", "int", "i", "=", "x", ";", "i", "<", "x", "...
Draws a rectangle in the image. It�s useful for debugging purposes. @param x rect�s start position in x-axis @param y rect�s start positioj in y-axis @param w rect�s width @param h rect�s height @param c rect�s color
[ "Draws", "a", "rectangle", "in", "the", "image", ".", "It�s", "useful", "for", "debugging", "purposes", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/marvin/image/MarvinImage.java#L685-L696
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPUnitInjectionBinding.java
JPAPUnitInjectionBinding.newPersistenceUnit
private static PersistenceUnit newPersistenceUnit(final String fJndiName, final String fUnitName) { """ This transient PersistencUnit annotation class has no default value. i.e. null is a valid value for some fields. """ return new PersistenceUnit() { @Override public S...
java
private static PersistenceUnit newPersistenceUnit(final String fJndiName, final String fUnitName) { return new PersistenceUnit() { @Override public String name() { return fJndiName; } @Override public Class<? ex...
[ "private", "static", "PersistenceUnit", "newPersistenceUnit", "(", "final", "String", "fJndiName", ",", "final", "String", "fUnitName", ")", "{", "return", "new", "PersistenceUnit", "(", ")", "{", "@", "Override", "public", "String", "name", "(", ")", "{", "re...
This transient PersistencUnit annotation class has no default value. i.e. null is a valid value for some fields.
[ "This", "transient", "PersistencUnit", "annotation", "class", "has", "no", "default", "value", ".", "i", ".", "e", ".", "null", "is", "a", "valid", "value", "for", "some", "fields", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPUnitInjectionBinding.java#L231-L260
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java
DataNode.createDataNode
public static DataNode createDataNode(String args[], Configuration conf) throws IOException { """ Instantiate & Start a single datanode daemon and wait for it to finish. If this thread is specifically interrupted, it will stop waiting. """ DataNode dn = instantiateDataNode(args, conf); if (dn != ...
java
public static DataNode createDataNode(String args[], Configuration conf) throws IOException { DataNode dn = instantiateDataNode(args, conf); if (dn != null) { dn.runDatanodeDaemon(); } return dn; }
[ "public", "static", "DataNode", "createDataNode", "(", "String", "args", "[", "]", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "DataNode", "dn", "=", "instantiateDataNode", "(", "args", ",", "conf", ")", ";", "if", "(", "dn", "!=", "nu...
Instantiate & Start a single datanode daemon and wait for it to finish. If this thread is specifically interrupted, it will stop waiting.
[ "Instantiate", "&", "Start", "a", "single", "datanode", "daemon", "and", "wait", "for", "it", "to", "finish", ".", "If", "this", "thread", "is", "specifically", "interrupted", "it", "will", "stop", "waiting", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L2398-L2405
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java
ISO9660Directory.sortedIterator
public Iterator<ISO9660Directory> sortedIterator() { """ Returns a directory iterator to traverse the directory hierarchy according to the needs of ISO 9660 (sort order of Path Tables and Directory Records) @return Iterator """ if (sortedIterator == null) { sortedIterator = new ISO9660D...
java
public Iterator<ISO9660Directory> sortedIterator() { if (sortedIterator == null) { sortedIterator = new ISO9660DirectoryIterator(this, true); } sortedIterator.reset(); return sortedIterator; }
[ "public", "Iterator", "<", "ISO9660Directory", ">", "sortedIterator", "(", ")", "{", "if", "(", "sortedIterator", "==", "null", ")", "{", "sortedIterator", "=", "new", "ISO9660DirectoryIterator", "(", "this", ",", "true", ")", ";", "}", "sortedIterator", ".", ...
Returns a directory iterator to traverse the directory hierarchy according to the needs of ISO 9660 (sort order of Path Tables and Directory Records) @return Iterator
[ "Returns", "a", "directory", "iterator", "to", "traverse", "the", "directory", "hierarchy", "according", "to", "the", "needs", "of", "ISO", "9660", "(", "sort", "order", "of", "Path", "Tables", "and", "Directory", "Records", ")" ]
train
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java#L519-L525
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/ConstantNaryTreeNode.java
ConstantNaryTreeNode.setChildAt
@Override public boolean setChildAt(int index, N newChild) throws IndexOutOfBoundsException { """ Set the child at the given index in this node. @param index is the index of the new child between <code>0</code> and <code>getChildCount()</code> (inclusive). @param newChild is the child to insert. """ fi...
java
@Override public boolean setChildAt(int index, N newChild) throws IndexOutOfBoundsException { final N oldChild = (index < this.children.length) ? this.children[index] : null; if (oldChild == newChild) { return false; } if (oldChild != null) { oldChild.setParentNodeReference(null, true); --this.notNul...
[ "@", "Override", "public", "boolean", "setChildAt", "(", "int", "index", ",", "N", "newChild", ")", "throws", "IndexOutOfBoundsException", "{", "final", "N", "oldChild", "=", "(", "index", "<", "this", ".", "children", ".", "length", ")", "?", "this", ".",...
Set the child at the given index in this node. @param index is the index of the new child between <code>0</code> and <code>getChildCount()</code> (inclusive). @param newChild is the child to insert.
[ "Set", "the", "child", "at", "the", "given", "index", "in", "this", "node", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/ConstantNaryTreeNode.java#L219-L249
krotscheck/jersey2-toolkit
jersey2-configuration/src/main/java/net/krotscheck/jersey2/configuration/Jersey2ToolkitConfig.java
Jersey2ToolkitConfig.buildToolkitConfig
private Configuration buildToolkitConfig() { """ Builds the configuration object for our toolkit config. @return A Configuration object. """ // The toolkit configuration file. try { File configFile = ResourceUtil .getFileForResource("jersey2-toolkit.propertie...
java
private Configuration buildToolkitConfig() { // The toolkit configuration file. try { File configFile = ResourceUtil .getFileForResource("jersey2-toolkit.properties"); return new PropertiesConfiguration(configFile); } catch (ConfigurationException ce)...
[ "private", "Configuration", "buildToolkitConfig", "(", ")", "{", "// The toolkit configuration file.", "try", "{", "File", "configFile", "=", "ResourceUtil", ".", "getFileForResource", "(", "\"jersey2-toolkit.properties\"", ")", ";", "return", "new", "PropertiesConfiguratio...
Builds the configuration object for our toolkit config. @return A Configuration object.
[ "Builds", "the", "configuration", "object", "for", "our", "toolkit", "config", "." ]
train
https://github.com/krotscheck/jersey2-toolkit/blob/11d757bd222dc82ada462caf6730ba4ff85dae04/jersey2-configuration/src/main/java/net/krotscheck/jersey2/configuration/Jersey2ToolkitConfig.java#L81-L95
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/UnitVectorProperty.java
UnitVectorProperty.set
public void set(double x, double y) { """ Change the coordinates of the vector. @param x x coordinate of the vector. @param y y coordinate of the vector. """ assert Vector2D.isUnitVector(x, y) : AssertMessages.normalizedParameters(0, 1); if ((x != getX() || y != getY()) && !isBound()) { final Vector...
java
public void set(double x, double y) { assert Vector2D.isUnitVector(x, y) : AssertMessages.normalizedParameters(0, 1); if ((x != getX() || y != getY()) && !isBound()) { final Vector2dfx v = super.get(); v.set(x, y); fireValueChangedEvent(); } }
[ "public", "void", "set", "(", "double", "x", ",", "double", "y", ")", "{", "assert", "Vector2D", ".", "isUnitVector", "(", "x", ",", "y", ")", ":", "AssertMessages", ".", "normalizedParameters", "(", "0", ",", "1", ")", ";", "if", "(", "(", "x", "!...
Change the coordinates of the vector. @param x x coordinate of the vector. @param y y coordinate of the vector.
[ "Change", "the", "coordinates", "of", "the", "vector", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/UnitVectorProperty.java#L123-L130
alkacon/opencms-core
src/org/opencms/xml/CmsXmlEntityResolver.java
CmsXmlEntityResolver.getCacheKey
private String getCacheKey(String systemId, boolean online) { """ Returns a cache key for the given system id (filename) based on the status of the given project flag.<p> @param systemId the system id (filename) to get the cache key for @param online indicates if this key is generated for the online project ...
java
private String getCacheKey(String systemId, boolean online) { if (online) { return "online_".concat(systemId); } return "offline_".concat(systemId); }
[ "private", "String", "getCacheKey", "(", "String", "systemId", ",", "boolean", "online", ")", "{", "if", "(", "online", ")", "{", "return", "\"online_\"", ".", "concat", "(", "systemId", ")", ";", "}", "return", "\"offline_\"", ".", "concat", "(", "systemI...
Returns a cache key for the given system id (filename) based on the status of the given project flag.<p> @param systemId the system id (filename) to get the cache key for @param online indicates if this key is generated for the online project @return the cache key for the system id
[ "Returns", "a", "cache", "key", "for", "the", "given", "system", "id", "(", "filename", ")", "based", "on", "the", "status", "of", "the", "given", "project", "flag", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlEntityResolver.java#L509-L515
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java
Util.sortDataDir
public static List<File> sortDataDir(File[] files, String prefix, boolean ascending) { """ Sort the list of files. Recency as determined by the version component of the file name. @param files array of files @param prefix files not matching this prefix are assumed to have a version = -1) @param ascending tr...
java
public static List<File> sortDataDir(File[] files, String prefix, boolean ascending) { if(files==null) return new ArrayList<File>(0); List<File> filelist = Arrays.asList(files); Collections.sort(filelist, new DataDirFileComparator(prefix, ascending)); return filelist; ...
[ "public", "static", "List", "<", "File", ">", "sortDataDir", "(", "File", "[", "]", "files", ",", "String", "prefix", ",", "boolean", "ascending", ")", "{", "if", "(", "files", "==", "null", ")", "return", "new", "ArrayList", "<", "File", ">", "(", "...
Sort the list of files. Recency as determined by the version component of the file name. @param files array of files @param prefix files not matching this prefix are assumed to have a version = -1) @param ascending true sorted in ascending order, false results in descending order @return sorted input files
[ "Sort", "the", "list", "of", "files", ".", "Recency", "as", "determined", "by", "the", "version", "component", "of", "the", "file", "name", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java#L317-L324
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_gaxpy.java
Dcs_gaxpy.cs_gaxpy
public static boolean cs_gaxpy(Dcs A, double[] x, double[] y) { """ Sparse matrix times dense column vector, y = A*x+y. @param A column-compressed matrix @param x size n, vector x @param y size m, vector y @return true if successful, false on error """ int p, j, n, Ap[], Ai[]; double...
java
public static boolean cs_gaxpy(Dcs A, double[] x, double[] y) { int p, j, n, Ap[], Ai[]; double Ax[]; if (!Dcs_util.CS_CSC(A) || x == null || y == null) return (false); /* check inputs */ n = A.n; Ap = A.p; Ai = A.i; Ax = A.x; for (j =...
[ "public", "static", "boolean", "cs_gaxpy", "(", "Dcs", "A", ",", "double", "[", "]", "x", ",", "double", "[", "]", "y", ")", "{", "int", "p", ",", "j", ",", "n", ",", "Ap", "[", "]", ",", "Ai", "[", "]", ";", "double", "Ax", "[", "]", ";", ...
Sparse matrix times dense column vector, y = A*x+y. @param A column-compressed matrix @param x size n, vector x @param y size m, vector y @return true if successful, false on error
[ "Sparse", "matrix", "times", "dense", "column", "vector", "y", "=", "A", "*", "x", "+", "y", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_gaxpy.java#L48-L63
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/util/cli/CommandLine.java
CommandLine.buildOption
public OptionBuilder buildOption( String name, String... options ) { """ <p>buildOption.</p> @param name a {@link java.lang.String} object. @param options a {@link java.lang.String} object. @return a {@link com.greenpepper.util.cli.OptionBuilder} object. """ OptionBuilder option = OptionBuilder.cr...
java
public OptionBuilder buildOption( String name, String... options ) { OptionBuilder option = OptionBuilder.create( name ); parser.build( option, options ); return option; }
[ "public", "OptionBuilder", "buildOption", "(", "String", "name", ",", "String", "...", "options", ")", "{", "OptionBuilder", "option", "=", "OptionBuilder", ".", "create", "(", "name", ")", ";", "parser", ".", "build", "(", "option", ",", "options", ")", "...
<p>buildOption.</p> @param name a {@link java.lang.String} object. @param options a {@link java.lang.String} object. @return a {@link com.greenpepper.util.cli.OptionBuilder} object.
[ "<p", ">", "buildOption", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/cli/CommandLine.java#L116-L121
esigate/esigate
esigate-core/src/main/java/org/esigate/http/OutgoingRequestContext.java
OutgoingRequestContext.setAttribute
public void setAttribute(String id, Object obj, boolean save) { """ Set attribute and save previous attribute value @param id attribute name @param obj value @param save save previous attribute value to restore later """ if (save) { String historyAttribute = id + "history"; ...
java
public void setAttribute(String id, Object obj, boolean save) { if (save) { String historyAttribute = id + "history"; Queue<Object> history = (Queue<Object>) getAttribute(historyAttribute); if (history == null) { history = new LinkedList<>(); s...
[ "public", "void", "setAttribute", "(", "String", "id", ",", "Object", "obj", ",", "boolean", "save", ")", "{", "if", "(", "save", ")", "{", "String", "historyAttribute", "=", "id", "+", "\"history\"", ";", "Queue", "<", "Object", ">", "history", "=", "...
Set attribute and save previous attribute value @param id attribute name @param obj value @param save save previous attribute value to restore later
[ "Set", "attribute", "and", "save", "previous", "attribute", "value" ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/http/OutgoingRequestContext.java#L92-L105
Atmosphere/atmosphere-samples
samples/meteor-chat/src/main/java/org/atmosphere/samples/chat/MeteorChat.java
MeteorChat.doPost
@Override public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { """ Re-use the {@link Meteor} created on the first GET for broadcasting message. @param req An {@link HttpServletRequest} @param res An {@link HttpServletResponse} """ String body = req.getReader(...
java
@Override public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { String body = req.getReader().readLine().trim(); // Simple JSON -- Use Jackson for more complex structure // Message looks like { "author" : "foo", "message" : "bar" } String author = b...
[ "@", "Override", "public", "void", "doPost", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "IOException", "{", "String", "body", "=", "req", ".", "getReader", "(", ")", ".", "readLine", "(", ")", ".", "trim", "(", ")",...
Re-use the {@link Meteor} created on the first GET for broadcasting message. @param req An {@link HttpServletRequest} @param res An {@link HttpServletResponse}
[ "Re", "-", "use", "the", "{", "@link", "Meteor", "}", "created", "on", "the", "first", "GET", "for", "broadcasting", "message", "." ]
train
https://github.com/Atmosphere/atmosphere-samples/blob/2b33c0c7a73b3f9b4597cb52ce5602834b80af99/samples/meteor-chat/src/main/java/org/atmosphere/samples/chat/MeteorChat.java#L63-L71
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/DateUtil.java
DateUtil.roundToHour
public static long roundToHour(final long pTime, final TimeZone pTimeZone) { """ Rounds the given time down to the closest hour, using the given timezone. @param pTime time @param pTimeZone the timezone to use when rounding @return the time rounded to the closest hour. """ int offset = pTimeZone....
java
public static long roundToHour(final long pTime, final TimeZone pTimeZone) { int offset = pTimeZone.getOffset(pTime); return ((pTime / HOUR) * HOUR) - offset; }
[ "public", "static", "long", "roundToHour", "(", "final", "long", "pTime", ",", "final", "TimeZone", "pTimeZone", ")", "{", "int", "offset", "=", "pTimeZone", ".", "getOffset", "(", "pTime", ")", ";", "return", "(", "(", "pTime", "/", "HOUR", ")", "*", ...
Rounds the given time down to the closest hour, using the given timezone. @param pTime time @param pTimeZone the timezone to use when rounding @return the time rounded to the closest hour.
[ "Rounds", "the", "given", "time", "down", "to", "the", "closest", "hour", "using", "the", "given", "timezone", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/DateUtil.java#L178-L181
bwkimmel/java-util
src/main/java/ca/eandb/util/auth/FixedCallbackHandler.java
FixedCallbackHandler.forNameAndPassword
public static CallbackHandler forNameAndPassword(String name, String password) { """ Creates a <code>CallbackHandler</code> that provides the specified user name and password. @param name The user name. @param password The password. @return The new <code>CallbackHandler</code>. """ return FixedCallback...
java
public static CallbackHandler forNameAndPassword(String name, String password) { return FixedCallbackHandler.forNameAndPassword(name, password.toCharArray()); }
[ "public", "static", "CallbackHandler", "forNameAndPassword", "(", "String", "name", ",", "String", "password", ")", "{", "return", "FixedCallbackHandler", ".", "forNameAndPassword", "(", "name", ",", "password", ".", "toCharArray", "(", ")", ")", ";", "}" ]
Creates a <code>CallbackHandler</code> that provides the specified user name and password. @param name The user name. @param password The password. @return The new <code>CallbackHandler</code>.
[ "Creates", "a", "<code", ">", "CallbackHandler<", "/", "code", ">", "that", "provides", "the", "specified", "user", "name", "and", "password", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/auth/FixedCallbackHandler.java#L90-L92
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResult.java
UpdateIntegrationResult.withRequestTemplates
public UpdateIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) { """ <p> Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the tem...
java
public UpdateIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) { setRequestTemplates(requestTemplates); return this; }
[ "public", "UpdateIntegrationResult", "withRequestTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestTemplates", ")", "{", "setRequestTemplates", "(", "requestTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. </p> @param requestTemplates Represents a map of Velocity templates that are a...
[ "<p", ">", "Represents", "a", "map", "of", "Velocity", "templates", "that", "are", "applied", "on", "the", "request", "payload", "based", "on", "the", "value", "of", "the", "Content", "-", "Type", "header", "sent", "by", "the", "client", ".", "The", "con...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResult.java#L1219-L1222
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShippingMethodPersistenceImpl.java
CommerceShippingMethodPersistenceImpl.findByGroupId
@Override public List<CommerceShippingMethod> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the commerce shipping methods where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code>...
java
@Override public List<CommerceShippingMethod> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceShippingMethod", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", ...
Returns a range of all the commerce shipping methods where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in t...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "shipping", "methods", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShippingMethodPersistenceImpl.java#L142-L146
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
BeanUtil.copyProperties
public static void copyProperties(Object source, Object target, boolean ignoreCase) { """ 复制Bean对象属性<br> @param source 源Bean对象 @param target 目标Bean对象 @param ignoreCase 是否忽略大小写 """ BeanCopier.create(source, target, CopyOptions.create().setIgnoreCase(ignoreCase)).copy(); }
java
public static void copyProperties(Object source, Object target, boolean ignoreCase) { BeanCopier.create(source, target, CopyOptions.create().setIgnoreCase(ignoreCase)).copy(); }
[ "public", "static", "void", "copyProperties", "(", "Object", "source", ",", "Object", "target", ",", "boolean", "ignoreCase", ")", "{", "BeanCopier", ".", "create", "(", "source", ",", "target", ",", "CopyOptions", ".", "create", "(", ")", ".", "setIgnoreCas...
复制Bean对象属性<br> @param source 源Bean对象 @param target 目标Bean对象 @param ignoreCase 是否忽略大小写
[ "复制Bean对象属性<br", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L605-L607
google/closure-compiler
src/com/google/javascript/jscomp/MinimizedCondition.java
MinimizedCondition.unoptimized
static MinimizedCondition unoptimized(Node n) { """ Return a MeasuredNode of the given condition node, without minimizing the result. <p> Since a MinimizedCondition necessarily must contain two trees, this method sets the negative side to a invalid node with an unreasonably high length so that it will never ...
java
static MinimizedCondition unoptimized(Node n) { checkNotNull(n.getParent()); MeasuredNode pos = new MeasuredNode(n, null, 0, false); MeasuredNode neg = new MeasuredNode(null, null, Integer.MAX_VALUE, true); return new MinimizedCondition(pos, neg); }
[ "static", "MinimizedCondition", "unoptimized", "(", "Node", "n", ")", "{", "checkNotNull", "(", "n", ".", "getParent", "(", ")", ")", ";", "MeasuredNode", "pos", "=", "new", "MeasuredNode", "(", "n", ",", "null", ",", "0", ",", "false", ")", ";", "Meas...
Return a MeasuredNode of the given condition node, without minimizing the result. <p> Since a MinimizedCondition necessarily must contain two trees, this method sets the negative side to a invalid node with an unreasonably high length so that it will never be chosen by {@link #getMinimized}. @param n the conditional e...
[ "Return", "a", "MeasuredNode", "of", "the", "given", "condition", "node", "without", "minimizing", "the", "result", ".", "<p", ">", "Since", "a", "MinimizedCondition", "necessarily", "must", "contain", "two", "trees", "this", "method", "sets", "the", "negative",...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/MinimizedCondition.java#L120-L125
wcm-io/wcm-io-caconfig
editor/bundle/src/main/java/io/wcm/caconfig/editor/impl/ConfigurationEditorFilterService.java
ConfigurationEditorFilterService.allowAdd
public boolean allowAdd(@NotNull Resource contextResource, @NotNull String configName) { """ Allow to add configurations with this name in the configuration editor. @param contextResource Content resource @param configName Configuration name @return if true, the configuration is offered in the "add configuratio...
java
public boolean allowAdd(@NotNull Resource contextResource, @NotNull String configName) { return serviceResolver.resolveAll(ConfigurationEditorFilter.class, contextResource).getServices() .filter(filter -> !filter.allowAdd(configName)) .count() == 0; }
[ "public", "boolean", "allowAdd", "(", "@", "NotNull", "Resource", "contextResource", ",", "@", "NotNull", "String", "configName", ")", "{", "return", "serviceResolver", ".", "resolveAll", "(", "ConfigurationEditorFilter", ".", "class", ",", "contextResource", ")", ...
Allow to add configurations with this name in the configuration editor. @param contextResource Content resource @param configName Configuration name @return if true, the configuration is offered in the "add configuration" dialog
[ "Allow", "to", "add", "configurations", "with", "this", "name", "in", "the", "configuration", "editor", "." ]
train
https://github.com/wcm-io/wcm-io-caconfig/blob/48592eadb0b62a09eec555cedfae7e00b213f6ed/editor/bundle/src/main/java/io/wcm/caconfig/editor/impl/ConfigurationEditorFilterService.java#L45-L49
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java
DwgUtil.getBitDouble
public static Vector getBitDouble(int[] data, int offset) throws Exception { """ Read a double value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is ...
java
public static Vector getBitDouble(int[] data, int offset) throws Exception { Vector v = new Vector(); int type = ((Integer)getBits(data, 2, offset)).intValue(); int read = 2; double val = 0.0; if (type==0x00) { byte[] bytes = (byte[])getBits(data, 64, (offset+2)); ByteBuffer bb = ByteBuffer.wrap(bytes);...
[ "public", "static", "Vector", "getBitDouble", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "Vector", "v", "=", "new", "Vector", "(", ")", ";", "int", "type", "=", "(", "(", "Integer", ")", "getBits", "(", "data...
Read a double value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines. @return Vector This vec...
[ "Read", "a", "double", "value", "from", "a", "group", "of", "unsigned", "bytes" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java#L250-L271
micronaut-projects/micronaut-core
inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java
ModelUtils.concreteConstructorFor
@Nullable public ExecutableElement concreteConstructorFor(TypeElement classElement, AnnotationUtils annotationUtils) { """ The constructor inject for the given class element. @param classElement The class element @param annotationUtils The annotation utilities @return The constructor """ List<...
java
@Nullable public ExecutableElement concreteConstructorFor(TypeElement classElement, AnnotationUtils annotationUtils) { List<ExecutableElement> constructors = findNonPrivateConstructors(classElement); if (constructors.isEmpty()) { return null; } if (constructors.size() == ...
[ "@", "Nullable", "public", "ExecutableElement", "concreteConstructorFor", "(", "TypeElement", "classElement", ",", "AnnotationUtils", "annotationUtils", ")", "{", "List", "<", "ExecutableElement", ">", "constructors", "=", "findNonPrivateConstructors", "(", "classElement", ...
The constructor inject for the given class element. @param classElement The class element @param annotationUtils The annotation utilities @return The constructor
[ "The", "constructor", "inject", "for", "the", "given", "class", "element", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L214-L235
Alluxio/alluxio
examples/src/main/java/alluxio/examples/BasicCheckpoint.java
BasicCheckpoint.main
public static void main(String[] args) throws IOException { """ Example program for using checkpoints. Usage: {@code java -cp <ALLUXIO-VERSION> alluxio.examples.BasicCheckpoint <FileFolder> <Files>} @param args the folder for the files and the files to use """ if (args.length != 2) { System.out.p...
java
public static void main(String[] args) throws IOException { if (args.length != 2) { System.out.println("java -cp " + RuntimeConstants.ALLUXIO_JAR + " alluxio.examples.BasicCheckpoint <FileFolder> <Files>"); System.exit(-1); } FileSystemContext fsContext = FileSystemContext.crea...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "if", "(", "args", ".", "length", "!=", "2", ")", "{", "System", ".", "out", ".", "println", "(", "\"java -cp \"", "+", "RuntimeConstants", ".", "AL...
Example program for using checkpoints. Usage: {@code java -cp <ALLUXIO-VERSION> alluxio.examples.BasicCheckpoint <FileFolder> <Files>} @param args the folder for the files and the files to use
[ "Example", "program", "for", "using", "checkpoints", ".", "Usage", ":", "{", "@code", "java", "-", "cp", "<ALLUXIO", "-", "VERSION", ">", "alluxio", ".", "examples", ".", "BasicCheckpoint", "<FileFolder", ">", "<Files", ">", "}" ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/examples/src/main/java/alluxio/examples/BasicCheckpoint.java#L104-L115
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/nfs/NfsResponseBase.java
NfsResponseBase.makeNfsGetAttributes
protected static NfsGetAttributes makeNfsGetAttributes(Xdr xdr, boolean force) { """ Create the object if it is there, or skip the existence check if <code>force</code> is <code>true</code>. Convenience method for use in subclasses. @param xdr @param force do not check whether it is there @return the creat...
java
protected static NfsGetAttributes makeNfsGetAttributes(Xdr xdr, boolean force) { NfsGetAttributes attributes = null; if (force || xdr.getBoolean()) { attributes = new NfsGetAttributes(); attributes.unmarshalling(xdr); } return attributes; }
[ "protected", "static", "NfsGetAttributes", "makeNfsGetAttributes", "(", "Xdr", "xdr", ",", "boolean", "force", ")", "{", "NfsGetAttributes", "attributes", "=", "null", ";", "if", "(", "force", "||", "xdr", ".", "getBoolean", "(", ")", ")", "{", "attributes", ...
Create the object if it is there, or skip the existence check if <code>force</code> is <code>true</code>. Convenience method for use in subclasses. @param xdr @param force do not check whether it is there @return the created object
[ "Create", "the", "object", "if", "it", "is", "there", "or", "skip", "the", "existence", "check", "if", "<code", ">", "force<", "/", "code", ">", "is", "<code", ">", "true<", "/", "code", ">", ".", "Convenience", "method", "for", "use", "in", "subclasse...
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/nfs/NfsResponseBase.java#L190-L197
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/ClassFilter.java
ClassFilter.checkPackage
private boolean checkPackage(String className, String packageName) { """ Checks if given class name is listed by package. If it's listed, then performance optimization is used and classname is added directly to {@code classes} collection. @param className Class name to be checked. @param packageName Package...
java
private boolean checkPackage(String className, String packageName) { if (packages.contains(packageName)) { cacheClassname(className); return true; } return false; }
[ "private", "boolean", "checkPackage", "(", "String", "className", ",", "String", "packageName", ")", "{", "if", "(", "packages", ".", "contains", "(", "packageName", ")", ")", "{", "cacheClassname", "(", "className", ")", ";", "return", "true", ";", "}", "...
Checks if given class name is listed by package. If it's listed, then performance optimization is used and classname is added directly to {@code classes} collection. @param className Class name to be checked. @param packageName Package name of the checked class. @return {@code true} iff class is listed by-package
[ "Checks", "if", "given", "class", "name", "is", "listed", "by", "package", ".", "If", "it", "s", "listed", "then", "performance", "optimization", "is", "used", "and", "classname", "is", "added", "directly", "to", "{", "@code", "classes", "}", "collection", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/ClassFilter.java#L153-L159
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/FactorGraph.java
FactorGraph.addFactor
public void addFactor(Factor factor) { """ Adds a factor to this factor graph, if not already present, additionally adding any variables in its VarSet which have not already been added. @param var The factor to add. @return The node for this factor. """ int id = factor.getId(); boolean alr...
java
public void addFactor(Factor factor) { int id = factor.getId(); boolean alreadyAdded = (0 <= id && id < factors.size()); if (alreadyAdded) { if (factors.get(id) != factor) { throw new IllegalStateException("Factor id already set, but factor not yet added."); ...
[ "public", "void", "addFactor", "(", "Factor", "factor", ")", "{", "int", "id", "=", "factor", ".", "getId", "(", ")", ";", "boolean", "alreadyAdded", "=", "(", "0", "<=", "id", "&&", "id", "<", "factors", ".", "size", "(", ")", ")", ";", "if", "(...
Adds a factor to this factor graph, if not already present, additionally adding any variables in its VarSet which have not already been added. @param var The factor to add. @return The node for this factor.
[ "Adds", "a", "factor", "to", "this", "factor", "graph", "if", "not", "already", "present", "additionally", "adding", "any", "variables", "in", "its", "VarSet", "which", "have", "not", "already", "been", "added", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/FactorGraph.java#L88-L116
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/Jus.java
Jus.newRequestQueue
public static RequestQueue newRequestQueue(File cacheLocation, HttpStack stack) { """ Creates a default instance of the worker pool and calls {@link RequestQueue#start()} on it. @param cacheLocation A {@link File} to use for creating the cache dir. @param stack An {@link HttpStack} to use for the netwo...
java
public static RequestQueue newRequestQueue(File cacheLocation, HttpStack stack) { File cacheDir = null; if (cacheLocation != null) { cacheDir = new File(cacheLocation, DEFAULT_CACHE_DIR); } String userAgent = "jus/0"; if (stack == null) { stack = new Hu...
[ "public", "static", "RequestQueue", "newRequestQueue", "(", "File", "cacheLocation", ",", "HttpStack", "stack", ")", "{", "File", "cacheDir", "=", "null", ";", "if", "(", "cacheLocation", "!=", "null", ")", "{", "cacheDir", "=", "new", "File", "(", "cacheLoc...
Creates a default instance of the worker pool and calls {@link RequestQueue#start()} on it. @param cacheLocation A {@link File} to use for creating the cache dir. @param stack An {@link HttpStack} to use for the network, or null for default. @return A started {@link RequestQueue} instance.
[ "Creates", "a", "default", "instance", "of", "the", "worker", "pool", "and", "calls", "{", "@link", "RequestQueue#start", "()", "}", "on", "it", "." ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/Jus.java#L41-L69
icode/ameba
src/main/java/ameba/db/ebean/migration/ModelMigration.java
ModelMigration.writeMigration
protected boolean writeMigration(Migration dbMigration, String version) { """ <p>writeMigration.</p> @param dbMigration a {@link io.ebeaninternal.dbmigration.migration.Migration} object. @param version a {@link java.lang.String} object. @return a boolean. """ if (migrationModel.isMigrationTabl...
java
protected boolean writeMigration(Migration dbMigration, String version) { if (migrationModel.isMigrationTableExist()) { scriptInfo = server.find(ScriptInfo.class, version); if (scriptInfo != null) { return false; } } scriptInfo = new ScriptInfo...
[ "protected", "boolean", "writeMigration", "(", "Migration", "dbMigration", ",", "String", "version", ")", "{", "if", "(", "migrationModel", ".", "isMigrationTableExist", "(", ")", ")", "{", "scriptInfo", "=", "server", ".", "find", "(", "ScriptInfo", ".", "cla...
<p>writeMigration.</p> @param dbMigration a {@link io.ebeaninternal.dbmigration.migration.Migration} object. @param version a {@link java.lang.String} object. @return a boolean.
[ "<p", ">", "writeMigration", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/migration/ModelMigration.java#L138-L158
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryRegistrationService.java
DirectoryRegistrationService.setUserPermission
public void setUserPermission(String userName, List<Permission> permissions) { """ Set the user permission. @param userName the user name. @param permissions the user permission. """ getServiceDirectoryClient().setACL(new ACL(AuthScheme.DIRECTORY, userName, PermissionUtil.permissionList2Id(permis...
java
public void setUserPermission(String userName, List<Permission> permissions){ getServiceDirectoryClient().setACL(new ACL(AuthScheme.DIRECTORY, userName, PermissionUtil.permissionList2Id(permissions))); }
[ "public", "void", "setUserPermission", "(", "String", "userName", ",", "List", "<", "Permission", ">", "permissions", ")", "{", "getServiceDirectoryClient", "(", ")", ".", "setACL", "(", "new", "ACL", "(", "AuthScheme", ".", "DIRECTORY", ",", "userName", ",", ...
Set the user permission. @param userName the user name. @param permissions the user permission.
[ "Set", "the", "user", "permission", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryRegistrationService.java#L241-L243
Scalified/fab
fab/src/main/java/com/scalified/fab/ActionButton.java
ActionButton.initActionButtonAttrs
private void initActionButtonAttrs(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { """ Initializes the <b>Action Button</b> attributes, declared within XML resource <p> Makes calls to different initialization methods for parameters initialization. For those parameters, which are not de...
java
private void initActionButtonAttrs(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { TypedArray attributes = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ActionButton, defStyleAttr, defStyleRes); try { initType(attributes); initSize(attributes); initButtonColor(a...
[ "private", "void", "initActionButtonAttrs", "(", "Context", "context", ",", "AttributeSet", "attrs", ",", "int", "defStyleAttr", ",", "int", "defStyleRes", ")", "{", "TypedArray", "attributes", "=", "context", ".", "getTheme", "(", ")", ".", "obtainStyledAttribute...
Initializes the <b>Action Button</b> attributes, declared within XML resource <p> Makes calls to different initialization methods for parameters initialization. For those parameters, which are not declared in the XML resource, the default value will be used @param context context the view is running in @param attrs at...
[ "Initializes", "the", "<b", ">", "Action", "Button<", "/", "b", ">", "attributes", "declared", "within", "XML", "resource", "<p", ">", "Makes", "calls", "to", "different", "initialization", "methods", "for", "parameters", "initialization", ".", "For", "those", ...
train
https://github.com/Scalified/fab/blob/0fc001e2f21223871d05d28b192a32ea70726884/fab/src/main/java/com/scalified/fab/ActionButton.java#L286-L313
Alluxio/alluxio
core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java
NetworkAddressUtils.getRpcPortSocketAddress
public static InetSocketAddress getRpcPortSocketAddress(WorkerNetAddress netAddress) { """ Extracts rpcPort InetSocketAddress from Alluxio representation of network address. @param netAddress the input network address representation @return InetSocketAddress """ String host = netAddress.getHost(); ...
java
public static InetSocketAddress getRpcPortSocketAddress(WorkerNetAddress netAddress) { String host = netAddress.getHost(); int port = netAddress.getRpcPort(); return new InetSocketAddress(host, port); }
[ "public", "static", "InetSocketAddress", "getRpcPortSocketAddress", "(", "WorkerNetAddress", "netAddress", ")", "{", "String", "host", "=", "netAddress", ".", "getHost", "(", ")", ";", "int", "port", "=", "netAddress", ".", "getRpcPort", "(", ")", ";", "return",...
Extracts rpcPort InetSocketAddress from Alluxio representation of network address. @param netAddress the input network address representation @return InetSocketAddress
[ "Extracts", "rpcPort", "InetSocketAddress", "from", "Alluxio", "representation", "of", "network", "address", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java#L611-L615
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createWayNodeTable
public static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName) throws SQLException { """ Create a table to store the list of nodes for each way. @param connection @param wayNodeTableName @return @throws SQLException """ try (Statement stmt = connection.createSt...
java
public static PreparedStatement createWayNodeTable(Connection connection, String wayNodeTableName) throws SQLException{ try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayNodeTableName); sb.append("(ID_WAY...
[ "public", "static", "PreparedStatement", "createWayNodeTable", "(", "Connection", "connection", ",", "String", "wayNodeTableName", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", "...
Create a table to store the list of nodes for each way. @param connection @param wayNodeTableName @return @throws SQLException
[ "Create", "a", "table", "to", "store", "the", "list", "of", "nodes", "for", "each", "way", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L205-L213
landawn/AbacusUtil
src/com/landawn/abacus/util/Multimap.java
Multimap.replaceAll
public boolean replaceAll(final K key, final Collection<?> oldValues, final E newValue) { """ Replaces all of the specified <code>oldValue</code> with the specified <code>newValue</code>. <code>False</code> is returned if no <code>oldValue</code> is found. @param key @param oldValues @param newValue @return...
java
public boolean replaceAll(final K key, final Collection<?> oldValues, final E newValue) { final V val = valueMap.get(key); if (val == null) { return false; } if (val.removeAll(oldValues)) { val.add(newValue); return true; } ...
[ "public", "boolean", "replaceAll", "(", "final", "K", "key", ",", "final", "Collection", "<", "?", ">", "oldValues", ",", "final", "E", "newValue", ")", "{", "final", "V", "val", "=", "valueMap", ".", "get", "(", "key", ")", ";", "if", "(", "val", ...
Replaces all of the specified <code>oldValue</code> with the specified <code>newValue</code>. <code>False</code> is returned if no <code>oldValue</code> is found. @param key @param oldValues @param newValue @return <code>true</code> if this Multimap is modified by this operation, otherwise <code>false</code>.
[ "Replaces", "all", "of", "the", "specified", "<code", ">", "oldValue<", "/", "code", ">", "with", "the", "specified", "<code", ">", "newValue<", "/", "code", ">", ".", "<code", ">", "False<", "/", "code", ">", "is", "returned", "if", "no", "<code", ">"...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Multimap.java#L822-L835
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java
ThreadContextClassLoaderBuilder.addPath
public ThreadContextClassLoaderBuilder addPath(final String path) { """ Converts the supplied path to an URL and adds it to this ThreadContextClassLoaderBuilder. @param path A path to convert to an URL and add. @return This ThreadContextClassLoaderBuilder, for builder pattern chaining. @see #addURL(java.net.U...
java
public ThreadContextClassLoaderBuilder addPath(final String path) { // Check sanity Validate.notEmpty(path, "path"); // Convert to an URL, and delegate. final URL anUrl; try { anUrl = new File(path).toURI().toURL(); } catch (MalformedURLException e) { ...
[ "public", "ThreadContextClassLoaderBuilder", "addPath", "(", "final", "String", "path", ")", "{", "// Check sanity", "Validate", ".", "notEmpty", "(", "path", ",", "\"path\"", ")", ";", "// Convert to an URL, and delegate.", "final", "URL", "anUrl", ";", "try", "{",...
Converts the supplied path to an URL and adds it to this ThreadContextClassLoaderBuilder. @param path A path to convert to an URL and add. @return This ThreadContextClassLoaderBuilder, for builder pattern chaining. @see #addURL(java.net.URL)
[ "Converts", "the", "supplied", "path", "to", "an", "URL", "and", "adds", "it", "to", "this", "ThreadContextClassLoaderBuilder", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/classloading/ThreadContextClassLoaderBuilder.java#L157-L172
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/SetCoverage.java
SetCoverage.evaluate
public double evaluate(List<? extends Solution<?>> set1, List<? extends Solution<?>> set2) { """ Calculates the set coverage of set1 over set2 @param set1 @param set2 @return The value of the set coverage """ double result ; int sum = 0 ; if (set2.size()==0) { if (set1.size()==0) { ...
java
public double evaluate(List<? extends Solution<?>> set1, List<? extends Solution<?>> set2) { double result ; int sum = 0 ; if (set2.size()==0) { if (set1.size()==0) { result = 0.0 ; } else { result = 1.0 ; } } else { for (Solution<?> solution : set2) { if...
[ "public", "double", "evaluate", "(", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "set1", ",", "List", "<", "?", "extends", "Solution", "<", "?", ">", ">", "set2", ")", "{", "double", "result", ";", "int", "sum", "=", "0", ";", "i...
Calculates the set coverage of set1 over set2 @param set1 @param set2 @return The value of the set coverage
[ "Calculates", "the", "set", "coverage", "of", "set1", "over", "set2" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/SetCoverage.java#L52-L71
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.getPeeringStats
public ExpressRouteCircuitStatsInner getPeeringStats(String resourceGroupName, String circuitName, String peeringName) { """ Gets all stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @par...
java
public ExpressRouteCircuitStatsInner getPeeringStats(String resourceGroupName, String circuitName, String peeringName) { return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().body(); }
[ "public", "ExpressRouteCircuitStatsInner", "getPeeringStats", "(", "String", "resourceGroupName", ",", "String", "circuitName", ",", "String", "peeringName", ")", "{", "return", "getPeeringStatsWithServiceResponseAsync", "(", "resourceGroupName", ",", "circuitName", ",", "p...
Gets all stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @param peeringName The name of the peering. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExcepti...
[ "Gets", "all", "stats", "from", "an", "express", "route", "circuit", "in", "a", "resource", "group", "." ]
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/ExpressRouteCircuitsInner.java#L1501-L1503
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createLinearRing
public LinearRing createLinearRing(Bbox bbox) { """ Create a new {@link LinearRing} from a {@link Bbox}. @param bbox Bounding box to convert into a {@link LinearRing}. @return Returns a {@link LinearRing} object. """ Coordinate tl = new Coordinate(bbox.getX(), bbox.getY()); Coordinate tr = new Coordin...
java
public LinearRing createLinearRing(Bbox bbox) { Coordinate tl = new Coordinate(bbox.getX(), bbox.getY()); Coordinate tr = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY()); Coordinate br = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY() + bbox.getHeight()); Coordinate bl = new Coordinate(bbox...
[ "public", "LinearRing", "createLinearRing", "(", "Bbox", "bbox", ")", "{", "Coordinate", "tl", "=", "new", "Coordinate", "(", "bbox", ".", "getX", "(", ")", ",", "bbox", ".", "getY", "(", ")", ")", ";", "Coordinate", "tr", "=", "new", "Coordinate", "("...
Create a new {@link LinearRing} from a {@link Bbox}. @param bbox Bounding box to convert into a {@link LinearRing}. @return Returns a {@link LinearRing} object.
[ "Create", "a", "new", "{", "@link", "LinearRing", "}", "from", "a", "{", "@link", "Bbox", "}", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L158-L164
oboehm/jfachwert
src/main/java/de/jfachwert/post/Postfach.java
Postfach.validate
public static void validate(BigInteger nummer, Ort ort) { """ Validiert das uebergebene Postfach auf moegliche Fehler. @param nummer Postfach-Nummer (muss positiv sein) @param ort Ort mit PLZ """ if (nummer.compareTo(BigInteger.ONE) < 0) { throw new InvalidValueException(nummer...
java
public static void validate(BigInteger nummer, Ort ort) { if (nummer.compareTo(BigInteger.ONE) < 0) { throw new InvalidValueException(nummer, "number"); } validate(ort); }
[ "public", "static", "void", "validate", "(", "BigInteger", "nummer", ",", "Ort", "ort", ")", "{", "if", "(", "nummer", ".", "compareTo", "(", "BigInteger", ".", "ONE", ")", "<", "0", ")", "{", "throw", "new", "InvalidValueException", "(", "nummer", ",", ...
Validiert das uebergebene Postfach auf moegliche Fehler. @param nummer Postfach-Nummer (muss positiv sein) @param ort Ort mit PLZ
[ "Validiert", "das", "uebergebene", "Postfach", "auf", "moegliche", "Fehler", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/post/Postfach.java#L230-L235
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/BeanUtils.java
BeanUtils.getProperty
public static <T> T getProperty(Object obj, String propName) { """ 获取对象指定字段的值 @param obj 指定对象 @param propName 要获取的字段的名称 @param <T> 字段的类型 @return 该字段的值,获取失败时抛出异常 """ return getFieldValue(obj, propName); }
java
public static <T> T getProperty(Object obj, String propName) { return getFieldValue(obj, propName); }
[ "public", "static", "<", "T", ">", "T", "getProperty", "(", "Object", "obj", ",", "String", "propName", ")", "{", "return", "getFieldValue", "(", "obj", ",", "propName", ")", ";", "}" ]
获取对象指定字段的值 @param obj 指定对象 @param propName 要获取的字段的名称 @param <T> 字段的类型 @return 该字段的值,获取失败时抛出异常
[ "获取对象指定字段的值" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/BeanUtils.java#L127-L129
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/OracleHelper.java
OracleHelper.setReadOnly
@Override public void setReadOnly(WSRdbManagedConnectionImpl managedConn, boolean readOnly, boolean externalCall) throws SQLException { """ <p>This method is used to do special handling for readOnly when method setReadOnly is called. If readOnly is true, an SQLException is thrown. If readOnly is false, w...
java
@Override public void setReadOnly(WSRdbManagedConnectionImpl managedConn, boolean readOnly, boolean externalCall) throws SQLException { if (tc.isDebugEnabled()) Tr.debug(this, tc, "setReadOnly", managedConn, readOnly, externalCall); if (externalCall) { if (rea...
[ "@", "Override", "public", "void", "setReadOnly", "(", "WSRdbManagedConnectionImpl", "managedConn", ",", "boolean", "readOnly", ",", "boolean", "externalCall", ")", "throws", "SQLException", "{", "if", "(", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", ...
<p>This method is used to do special handling for readOnly when method setReadOnly is called. If readOnly is true, an SQLException is thrown. If readOnly is false, we ignore it and log an informational message.</p> @param managedConn WSRdbManagedConnectionImpl object @param readOnly The readOnly value going to be set ...
[ "<p", ">", "This", "method", "is", "used", "to", "do", "special", "handling", "for", "readOnly", "when", "method", "setReadOnly", "is", "called", ".", "If", "readOnly", "is", "true", "an", "SQLException", "is", "thrown", ".", "If", "readOnly", "is", "false...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/OracleHelper.java#L697-L718
knowm/XChange
xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java
LakeBTCAdapters.adaptAccountInfo
public static AccountInfo adaptAccountInfo(LakeBTCAccount lakeBTCAccount) { """ Adapts a LakeBTCAccount to an AccountInfo @param lakeBTCAccount @return Wallet """ // Adapt to XChange DTOs LakeBTCProfile profile = lakeBTCAccount.getProfile(); LakeBTCBalance balance = lakeBTCAccount.getBalance()...
java
public static AccountInfo adaptAccountInfo(LakeBTCAccount lakeBTCAccount) { // Adapt to XChange DTOs LakeBTCProfile profile = lakeBTCAccount.getProfile(); LakeBTCBalance balance = lakeBTCAccount.getBalance(); Balance usdBalance = new Balance(Currency.USD, balance.getUSD()); Balance cnyWBalance = ne...
[ "public", "static", "AccountInfo", "adaptAccountInfo", "(", "LakeBTCAccount", "lakeBTCAccount", ")", "{", "// Adapt to XChange DTOs", "LakeBTCProfile", "profile", "=", "lakeBTCAccount", ".", "getProfile", "(", ")", ";", "LakeBTCBalance", "balance", "=", "lakeBTCAccount", ...
Adapts a LakeBTCAccount to an AccountInfo @param lakeBTCAccount @return Wallet
[ "Adapts", "a", "LakeBTCAccount", "to", "an", "AccountInfo" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-lakebtc/src/main/java/org/knowm/xchange/lakebtc/LakeBTCAdapters.java#L159-L169
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java
FieldBuilder.buildFieldComments
public void buildFieldComments(XMLNode node, Content fieldDocTree) { """ Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param fieldDocTree the content tree to which the documentation will...
java
public void buildFieldComments(XMLNode node, Content fieldDocTree) { if (!configuration.nocomment) { writer.addComments(currentElement, fieldDocTree); } }
[ "public", "void", "buildFieldComments", "(", "XMLNode", "node", ",", "Content", "fieldDocTree", ")", "{", "if", "(", "!", "configuration", ".", "nocomment", ")", "{", "writer", ".", "addComments", "(", "currentElement", ",", "fieldDocTree", ")", ";", "}", "}...
Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param fieldDocTree the content tree to which the documentation will be added
[ "Build", "the", "comments", "for", "the", "field", ".", "Do", "nothing", "if", "{", "@link", "Configuration#nocomment", "}", "is", "set", "to", "true", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java#L184-L188
lucmoreau/ProvToolbox
prov-interop/src/main/java/org/openprovenance/prov/interop/InteropFramework.java
InteropFramework.readDocumentFromFile
public Document readDocumentFromFile(String filename, ProvFormat format) { """ Reads a document from a file, using the format to decide which parser to read the file with. @param filename the file to read a document from @param format the format of the file @return a Document """ try { ...
java
public Document readDocumentFromFile(String filename, ProvFormat format) { try { switch (format) { case DOT: case JPEG: case PNG: case SVG: throw new UnsupportedOperationException(); // we don't load PROV ...
[ "public", "Document", "readDocumentFromFile", "(", "String", "filename", ",", "ProvFormat", "format", ")", "{", "try", "{", "switch", "(", "format", ")", "{", "case", "DOT", ":", "case", "JPEG", ":", "case", "PNG", ":", "case", "SVG", ":", "throw", "new"...
Reads a document from a file, using the format to decide which parser to read the file with. @param filename the file to read a document from @param format the format of the file @return a Document
[ "Reads", "a", "document", "from", "a", "file", "using", "the", "format", "to", "decide", "which", "parser", "to", "read", "the", "file", "with", "." ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-interop/src/main/java/org/openprovenance/prov/interop/InteropFramework.java#L701-L758
janvanbesien/java-ipv6
src/main/java/com/googlecode/ipv6/IPv6AddressPool.java
IPv6AddressPool.deAllocate
public IPv6AddressPool deAllocate(final IPv6Network toDeAllocate) { """ Give a network back to the pool (de-allocate). @param toDeAllocate network to de-allocate """ if (!contains(toDeAllocate)) { throw new IllegalArgumentException( "Network to de-allocate[" +...
java
public IPv6AddressPool deAllocate(final IPv6Network toDeAllocate) { if (!contains(toDeAllocate)) { throw new IllegalArgumentException( "Network to de-allocate[" + toDeAllocate + "] is not contained in this allocatable range [" + this + "]"); } // find...
[ "public", "IPv6AddressPool", "deAllocate", "(", "final", "IPv6Network", "toDeAllocate", ")", "{", "if", "(", "!", "contains", "(", "toDeAllocate", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Network to de-allocate[\"", "+", "toDeAllocate", "+"...
Give a network back to the pool (de-allocate). @param toDeAllocate network to de-allocate
[ "Give", "a", "network", "back", "to", "the", "pool", "(", "de", "-", "allocate", ")", "." ]
train
https://github.com/janvanbesien/java-ipv6/blob/9af15b4a6c0074f9fa23dfa030027c631b9c2f78/src/main/java/com/googlecode/ipv6/IPv6AddressPool.java#L230-L274
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.elementImpl
protected Element elementImpl(String name, String namespaceURI) { """ Add a named and namespaced XML element to the document as a child of this builder's node. @param name the name of the XML element. @param namespaceURI a namespace URI @return @throws IllegalStateException if you attempt to add a chil...
java
protected Element elementImpl(String name, String namespaceURI) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); if (namespaceURI == null) { return getDocument().createElement(name); } else { return getDocument().createElementNS(namespaceURI, name); ...
[ "protected", "Element", "elementImpl", "(", "String", "name", ",", "String", "namespaceURI", ")", "{", "assertElementContainsNoOrWhitespaceOnlyTextNodes", "(", "this", ".", "xmlNode", ")", ";", "if", "(", "namespaceURI", "==", "null", ")", "{", "return", "getDocum...
Add a named and namespaced XML element to the document as a child of this builder's node. @param name the name of the XML element. @param namespaceURI a namespace URI @return @throws IllegalStateException if you attempt to add a child element to an XML node that already contains a text node value.
[ "Add", "a", "named", "and", "namespaced", "XML", "element", "to", "the", "document", "as", "a", "child", "of", "this", "builder", "s", "node", "." ]
train
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L542-L549
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java
ExpressionUtils.predicateTemplate
public static PredicateTemplate predicateTemplate(String template, List<?> args) { """ Create a new Template expression @param template template @param args template parameters @return template expression """ return predicateTemplate(TemplateFactory.DEFAULT.create(template), args); }
java
public static PredicateTemplate predicateTemplate(String template, List<?> args) { return predicateTemplate(TemplateFactory.DEFAULT.create(template), args); }
[ "public", "static", "PredicateTemplate", "predicateTemplate", "(", "String", "template", ",", "List", "<", "?", ">", "args", ")", "{", "return", "predicateTemplate", "(", "TemplateFactory", ".", "DEFAULT", ".", "create", "(", "template", ")", ",", "args", ")",...
Create a new Template expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java#L165-L167
apache/flink
flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSource.java
HBaseTableSource.addColumn
public void addColumn(String family, String qualifier, Class<?> clazz) { """ Adds a column defined by family, qualifier, and type to the table schema. @param family the family name @param qualifier the qualifier name @param clazz the data type of the qualifier """ this.hBaseSchema.addColumn(famil...
java
public void addColumn(String family, String qualifier, Class<?> clazz) { this.hBaseSchema.addColumn(family, qualifier, clazz); }
[ "public", "void", "addColumn", "(", "String", "family", ",", "String", "qualifier", ",", "Class", "<", "?", ">", "clazz", ")", "{", "this", ".", "hBaseSchema", ".", "addColumn", "(", "family", ",", "qualifier", ",", "clazz", ")", ";", "}" ]
Adds a column defined by family, qualifier, and type to the table schema. @param family the family name @param qualifier the qualifier name @param clazz the data type of the qualifier
[ "Adds", "a", "column", "defined", "by", "family", "qualifier", "and", "type", "to", "the", "table", "schema", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hbase/src/main/java/org/apache/flink/addons/hbase/HBaseTableSource.java#L92-L94
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java
BpmnParseUtil.parseCamundaInputParameters
public static void parseCamundaInputParameters(Element inputOutputElement, IoMapping ioMapping) { """ Parses all input parameters of an input output element and adds them to the {@link IoMapping}. @param inputOutputElement the input output element to process @param ioMapping the input output mapping to add in...
java
public static void parseCamundaInputParameters(Element inputOutputElement, IoMapping ioMapping) { List<Element> inputParameters = inputOutputElement.elementsNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "inputParameter"); for (Element inputParameterElement : inputParameters) { parseInputParameterElement(inputP...
[ "public", "static", "void", "parseCamundaInputParameters", "(", "Element", "inputOutputElement", ",", "IoMapping", "ioMapping", ")", "{", "List", "<", "Element", ">", "inputParameters", "=", "inputOutputElement", ".", "elementsNS", "(", "BpmnParse", ".", "CAMUNDA_BPMN...
Parses all input parameters of an input output element and adds them to the {@link IoMapping}. @param inputOutputElement the input output element to process @param ioMapping the input output mapping to add input parameters to @throws BpmnParseException if a input parameter element is malformed
[ "Parses", "all", "input", "parameters", "of", "an", "input", "output", "element", "and", "adds", "them", "to", "the", "{", "@link", "IoMapping", "}", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParseUtil.java#L88-L93
opendigitaleducation/web-utils
src/main/java/org/vertx/java/core/http/RouteMatcher.java
RouteMatcher.allWithRegEx
public RouteMatcher allWithRegEx(String regex, Handler<HttpServerRequest> handler) { """ Specify a handler that will be called for all HTTP methods @param regex A regular expression @param handler The handler to call """ addRegEx(regex, handler, getBindings); addRegEx(regex, handler, putBindings); addR...
java
public RouteMatcher allWithRegEx(String regex, Handler<HttpServerRequest> handler) { addRegEx(regex, handler, getBindings); addRegEx(regex, handler, putBindings); addRegEx(regex, handler, postBindings); addRegEx(regex, handler, deleteBindings); addRegEx(regex, handler, optionsBindings); addRegEx(regex, hand...
[ "public", "RouteMatcher", "allWithRegEx", "(", "String", "regex", ",", "Handler", "<", "HttpServerRequest", ">", "handler", ")", "{", "addRegEx", "(", "regex", ",", "handler", ",", "getBindings", ")", ";", "addRegEx", "(", "regex", ",", "handler", ",", "putB...
Specify a handler that will be called for all HTTP methods @param regex A regular expression @param handler The handler to call
[ "Specify", "a", "handler", "that", "will", "be", "called", "for", "all", "HTTP", "methods" ]
train
https://github.com/opendigitaleducation/web-utils/blob/5c12f7e8781a9a0fbbe7b8d9fb741627aa97a1e3/src/main/java/org/vertx/java/core/http/RouteMatcher.java#L299-L310
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/DatabaseHelper.java
DatabaseHelper.psSetBytes
public void psSetBytes(PreparedStatement pstmtImpl, int i, byte[] x) throws SQLException { """ Allow for special handling of Oracle prepared statement setBytes This method just does the normal setBytes call, Oracle helper overrides it """ pstmtImpl.setBytes(i, x); }
java
public void psSetBytes(PreparedStatement pstmtImpl, int i, byte[] x) throws SQLException { pstmtImpl.setBytes(i, x); }
[ "public", "void", "psSetBytes", "(", "PreparedStatement", "pstmtImpl", ",", "int", "i", ",", "byte", "[", "]", "x", ")", "throws", "SQLException", "{", "pstmtImpl", ".", "setBytes", "(", "i", ",", "x", ")", ";", "}" ]
Allow for special handling of Oracle prepared statement setBytes This method just does the normal setBytes call, Oracle helper overrides it
[ "Allow", "for", "special", "handling", "of", "Oracle", "prepared", "statement", "setBytes", "This", "method", "just", "does", "the", "normal", "setBytes", "call", "Oracle", "helper", "overrides", "it" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/DatabaseHelper.java#L615-L617
structr/structr
structr-core/src/main/java/org/structr/common/ValidationHelper.java
ValidationHelper.isValidStringMatchingRegex
public static boolean isValidStringMatchingRegex(final String value, final String expression) { """ Checks whether the value of the given property key of the given node if not null and matches the given regular expression. @param node @param key @param expression @param errorBuffer @return true if string m...
java
public static boolean isValidStringMatchingRegex(final String value, final String expression) { Pattern pattern = patterns.get(expression); if (pattern == null) { pattern = Pattern.compile(expression); patterns.put(expression, pattern); } return (value != null && pattern.matcher(value).matches()); }
[ "public", "static", "boolean", "isValidStringMatchingRegex", "(", "final", "String", "value", ",", "final", "String", "expression", ")", "{", "Pattern", "pattern", "=", "patterns", ".", "get", "(", "expression", ")", ";", "if", "(", "pattern", "==", "null", ...
Checks whether the value of the given property key of the given node if not null and matches the given regular expression. @param node @param key @param expression @param errorBuffer @return true if string matches expression
[ "Checks", "whether", "the", "value", "of", "the", "given", "property", "key", "of", "the", "given", "node", "if", "not", "null", "and", "matches", "the", "given", "regular", "expression", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/common/ValidationHelper.java#L188-L199
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/impl/config/CustomPropertyConstructor.java
CustomPropertyConstructor.addPropertyAlias
protected final void addPropertyAlias(String alias, Class<?> type, String name) { """ Adds an alias for a Javabean property name on a particular type. The values of YAML keys with the alias name will be mapped to the Javabean property. @param alias the bean property alias @param type the bean property type ...
java
protected final void addPropertyAlias(String alias, Class<?> type, String name) { Map<String, Property> typeMap = properties.get(type); if (typeMap == null) { typeMap = new HashMap<String, Property>(); properties.put(type, typeMap); } try { typeMap.p...
[ "protected", "final", "void", "addPropertyAlias", "(", "String", "alias", ",", "Class", "<", "?", ">", "type", ",", "String", "name", ")", "{", "Map", "<", "String", ",", "Property", ">", "typeMap", "=", "properties", ".", "get", "(", "type", ")", ";",...
Adds an alias for a Javabean property name on a particular type. The values of YAML keys with the alias name will be mapped to the Javabean property. @param alias the bean property alias @param type the bean property type @param name the bean property name
[ "Adds", "an", "alias", "for", "a", "Javabean", "property", "name", "on", "a", "particular", "type", ".", "The", "values", "of", "YAML", "keys", "with", "the", "alias", "name", "will", "be", "mapped", "to", "the", "Javabean", "property", "." ]
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/impl/config/CustomPropertyConstructor.java#L50-L63
kaazing/gateway
transport/spi/src/main/java/org/kaazing/gateway/transport/LoggingUtils.java
LoggingUtils.getHostPort
private static String getHostPort(SocketAddress address) { """ Method attempting to retrieve host port identifier @param address @return """ if (address instanceof ResourceAddress) { ResourceAddress lowest = getLowestTransportLayer((ResourceAddress)address); return format(HOST...
java
private static String getHostPort(SocketAddress address) { if (address instanceof ResourceAddress) { ResourceAddress lowest = getLowestTransportLayer((ResourceAddress)address); return format(HOST_PORT_FORMAT, lowest.getResource().getHost(), lowest.getResource().getPort()); } ...
[ "private", "static", "String", "getHostPort", "(", "SocketAddress", "address", ")", "{", "if", "(", "address", "instanceof", "ResourceAddress", ")", "{", "ResourceAddress", "lowest", "=", "getLowestTransportLayer", "(", "(", "ResourceAddress", ")", "address", ")", ...
Method attempting to retrieve host port identifier @param address @return
[ "Method", "attempting", "to", "retrieve", "host", "port", "identifier" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/spi/src/main/java/org/kaazing/gateway/transport/LoggingUtils.java#L195-L207
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/URIName.java
URIName.nameConstraint
public static URIName nameConstraint(DerValue value) throws IOException { """ Create the URIName object with the specified name constraint. URI name constraints syntax is different than SubjectAltNames, etc. See 4.2.1.11 of RFC 3280. @param value the URI name constraint @throws IOException if name is not a p...
java
public static URIName nameConstraint(DerValue value) throws IOException { URI uri; String name = value.getIA5String(); try { uri = new URI(name); } catch (URISyntaxException use) { throw new IOException("invalid URI name constraint:" + name, use); } ...
[ "public", "static", "URIName", "nameConstraint", "(", "DerValue", "value", ")", "throws", "IOException", "{", "URI", "uri", ";", "String", "name", "=", "value", ".", "getIA5String", "(", ")", ";", "try", "{", "uri", "=", "new", "URI", "(", "name", ")", ...
Create the URIName object with the specified name constraint. URI name constraints syntax is different than SubjectAltNames, etc. See 4.2.1.11 of RFC 3280. @param value the URI name constraint @throws IOException if name is not a proper URI name constraint
[ "Create", "the", "URIName", "object", "with", "the", "specified", "name", "constraint", ".", "URI", "name", "constraints", "syntax", "is", "different", "than", "SubjectAltNames", "etc", ".", "See", "4", ".", "2", ".", "1", ".", "11", "of", "RFC", "3280", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/URIName.java#L156-L181
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java
TmdbPeople.getPersonPopular
public ResultList<PersonFind> getPersonPopular(Integer page) throws MovieDbException { """ Get the list of popular people on The Movie Database. This list refreshes every day. @param page @return @throws MovieDbException """ TmdbParameters parameters = new TmdbParameters(); parameters.a...
java
public ResultList<PersonFind> getPersonPopular(Integer page) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.PAGE, page); URL url = new ApiUrl(apiKey, MethodBase.PERSON).subMethod(MethodSub.POPULAR).buildUrl(parameters); WrapperGenericLis...
[ "public", "ResultList", "<", "PersonFind", ">", "getPersonPopular", "(", "Integer", "page", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "PAGE", ...
Get the list of popular people on The Movie Database. This list refreshes every day. @param page @return @throws MovieDbException
[ "Get", "the", "list", "of", "popular", "people", "on", "The", "Movie", "Database", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java#L287-L294
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java
DefaultMappableValidator.processDataProvider
private void processDataProvider(final DataProvider<RI> dataProvider) { """ Process the specified data provider by finding all the mapped rules, and so on. @param dataProvider Data provider to be processed. """ // Get rules matching the data provider final List<Rule<RI, RO>> mappedRules = da...
java
private void processDataProvider(final DataProvider<RI> dataProvider) { // Get rules matching the data provider final List<Rule<RI, RO>> mappedRules = dataProvidersToRules.get(dataProvider); if ((mappedRules == null) || mappedRules.isEmpty()) { LOGGER.warn("No matching rule in mappab...
[ "private", "void", "processDataProvider", "(", "final", "DataProvider", "<", "RI", ">", "dataProvider", ")", "{", "// Get rules matching the data provider", "final", "List", "<", "Rule", "<", "RI", ",", "RO", ">", ">", "mappedRules", "=", "dataProvidersToRules", "...
Process the specified data provider by finding all the mapped rules, and so on. @param dataProvider Data provider to be processed.
[ "Process", "the", "specified", "data", "provider", "by", "finding", "all", "the", "mapped", "rules", "and", "so", "on", "." ]
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java#L86-L100
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobsInner.java
JobsInner.getByResourceGroup
public JobInner getByResourceGroup(String resourceGroupName, String jobName) { """ Gets information about the specified Batch AI job. @param resourceGroupName Name of the resource group to which the resource belongs. @param jobName The name of the job within the specified resource group. Job names can only con...
java
public JobInner getByResourceGroup(String resourceGroupName, String jobName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); }
[ "public", "JobInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "jobName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "jobName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ...
Gets information about the specified Batch AI job. @param resourceGroupName Name of the resource group to which the resource belongs. @param jobName The name of the job within the specified resource group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The n...
[ "Gets", "information", "about", "the", "specified", "Batch", "AI", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobsInner.java#L471-L473
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java
ClassicLayoutManager.layoutGroupSubreports
protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) { """ If there is a SubReport on a Group, we do the layout here @param columnsGroup @param jgroup """ log.debug("Starting subreport layout..."); JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFoote...
java
protected void layoutGroupSubreports(DJGroup columnsGroup, JRDesignGroup jgroup) { log.debug("Starting subreport layout..."); JRDesignBand footerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroupFooterSection()).getBandsList().get(0); JRDesignBand headerBand = (JRDesignBand) ((JRDesignSection)jgroup.getGroup...
[ "protected", "void", "layoutGroupSubreports", "(", "DJGroup", "columnsGroup", ",", "JRDesignGroup", "jgroup", ")", "{", "log", ".", "debug", "(", "\"Starting subreport layout...\"", ")", ";", "JRDesignBand", "footerBand", "=", "(", "JRDesignBand", ")", "(", "(", "...
If there is a SubReport on a Group, we do the layout here @param columnsGroup @param jgroup
[ "If", "there", "is", "a", "SubReport", "on", "a", "Group", "we", "do", "the", "layout", "here" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/ClassicLayoutManager.java#L734-L742
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.loadService
public static <S> S loadService(Class<S> serviceInterface, ClassLoader classLoader) { """ Load service of requested interface using given class loader. Throws exception if service implementation not found on run-time. @param serviceInterface service interface, @param classLoader class loader. @param <S> serv...
java
public static <S> S loadService(Class<S> serviceInterface, ClassLoader classLoader) { Iterator<S> services = ServiceLoader.load(serviceInterface, classLoader).iterator(); if(services.hasNext()) { return services.next(); } // although not official, Android does not support ServiceLoader ...
[ "public", "static", "<", "S", ">", "S", "loadService", "(", "Class", "<", "S", ">", "serviceInterface", ",", "ClassLoader", "classLoader", ")", "{", "Iterator", "<", "S", ">", "services", "=", "ServiceLoader", ".", "load", "(", "serviceInterface", ",", "cl...
Load service of requested interface using given class loader. Throws exception if service implementation not found on run-time. @param serviceInterface service interface, @param classLoader class loader. @param <S> service type. @return service instance. @throws NoProviderException if service provider not found on run...
[ "Load", "service", "of", "requested", "interface", "using", "given", "class", "loader", ".", "Throws", "exception", "if", "service", "implementation", "not", "found", "on", "run", "-", "time", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L219-L238
dlew/joda-time-android
library/src/main/java/net/danlew/android/joda/DateUtils.java
DateUtils.formatDateTime
public static String formatDateTime(Context context, ReadablePartial time, int flags) { """ Formats a date or a time according to the local conventions. Since ReadablePartials don't support all fields, we fill in any blanks needed for formatting by using the epoch (1970-01-01T00:00:00Z). See {@link android....
java
public static String formatDateTime(Context context, ReadablePartial time, int flags) { return android.text.format.DateUtils.formatDateTime(context, toMillis(time), flags | FORMAT_UTC); }
[ "public", "static", "String", "formatDateTime", "(", "Context", "context", ",", "ReadablePartial", "time", ",", "int", "flags", ")", "{", "return", "android", ".", "text", ".", "format", ".", "DateUtils", ".", "formatDateTime", "(", "context", ",", "toMillis",...
Formats a date or a time according to the local conventions. Since ReadablePartials don't support all fields, we fill in any blanks needed for formatting by using the epoch (1970-01-01T00:00:00Z). See {@link android.text.format.DateUtils#formatDateTime} for full docs. @param context the context is required only if t...
[ "Formats", "a", "date", "or", "a", "time", "according", "to", "the", "local", "conventions", "." ]
train
https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L79-L81
hltcoe/annotated-nyt
src/main/java/com/nytlabs/corpus/NYTCorpusDocument.java
NYTCorpusDocument.ljust
private String ljust(String s, Integer length) { """ Left justify a string by forcing it to be the specified length. This is done by concatonating space characters to the end of the string until the string is of the specified length. If, however, the string is initially longer than the specified length then the...
java
private String ljust(String s, Integer length) { if (s.length() >= length) { return s; } length -= s.length(); StringBuffer sb = new StringBuffer(); for (Integer i = 0; i < length; i++) { sb.append(" "); } return s + sb.toString(); }
[ "private", "String", "ljust", "(", "String", "s", ",", "Integer", "length", ")", "{", "if", "(", "s", ".", "length", "(", ")", ">=", "length", ")", "{", "return", "s", ";", "}", "length", "-=", "s", ".", "length", "(", ")", ";", "StringBuffer", "...
Left justify a string by forcing it to be the specified length. This is done by concatonating space characters to the end of the string until the string is of the specified length. If, however, the string is initially longer than the specified length then the original string is returned. @param s A string. @param leng...
[ "Left", "justify", "a", "string", "by", "forcing", "it", "to", "be", "the", "specified", "length", ".", "This", "is", "done", "by", "concatonating", "space", "characters", "to", "the", "end", "of", "the", "string", "until", "the", "string", "is", "of", "...
train
https://github.com/hltcoe/annotated-nyt/blob/0a4daa97705591cefea9de61614770ae2665a48e/src/main/java/com/nytlabs/corpus/NYTCorpusDocument.java#L990-L1000
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/axis/HelixAxisAligner.java
HelixAxisAligner.calcPrincipalRotationVector
private void calcPrincipalRotationVector() { """ Returns a vector along the principal rotation axis for the alignment of structures along the z-axis @return principal rotation vector """ // AxisAngle4d axisAngle = helixLayers.getByLowestAngle().getAxisAngle(); AxisAngle4d axisAngle = helixLayers.getByLarg...
java
private void calcPrincipalRotationVector() { // AxisAngle4d axisAngle = helixLayers.getByLowestAngle().getAxisAngle(); AxisAngle4d axisAngle = helixLayers.getByLargestContacts().getAxisAngle(); principalRotationVector = new Vector3d(axisAngle.x, axisAngle.y, axisAngle.z); }
[ "private", "void", "calcPrincipalRotationVector", "(", ")", "{", "//\t\tAxisAngle4d axisAngle = helixLayers.getByLowestAngle().getAxisAngle();", "AxisAngle4d", "axisAngle", "=", "helixLayers", ".", "getByLargestContacts", "(", ")", ".", "getAxisAngle", "(", ")", ";", "princip...
Returns a vector along the principal rotation axis for the alignment of structures along the z-axis @return principal rotation vector
[ "Returns", "a", "vector", "along", "the", "principal", "rotation", "axis", "for", "the", "alignment", "of", "structures", "along", "the", "z", "-", "axis" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/axis/HelixAxisAligner.java#L601-L605
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java
GeneratedDOAuth2UserDaoImpl.queryByCreatedDate
public Iterable<DOAuth2User> queryByCreatedDate(java.util.Date createdDate) { """ query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of DOAuth2Users for the specified createdDate """ return queryByField(null, DOAuth2UserMapper.Field.CREATEDDATE.getFieldNa...
java
public Iterable<DOAuth2User> queryByCreatedDate(java.util.Date createdDate) { return queryByField(null, DOAuth2UserMapper.Field.CREATEDDATE.getFieldName(), createdDate); }
[ "public", "Iterable", "<", "DOAuth2User", ">", "queryByCreatedDate", "(", "java", ".", "util", ".", "Date", "createdDate", ")", "{", "return", "queryByField", "(", "null", ",", "DOAuth2UserMapper", ".", "Field", ".", "CREATEDDATE", ".", "getFieldName", "(", ")...
query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of DOAuth2Users for the specified createdDate
[ "query", "-", "by", "method", "for", "field", "createdDate" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java#L79-L81
jeffreyning/nh-micro
nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java
MicroServiceTemplateSupport.updateInfoByIdService
public Integer updateInfoByIdService(String id,Map requestParamMap,String tableName,String cusCondition,String cusSetStr) throws Exception { """ ���id������ݼ�¼ @param id �������� @param requestParamMap �ύ���� @param tableName ����� @param cusCondition ���������ַ� @param cusSetStr ����set�ַ� @param modelName ...
java
public Integer updateInfoByIdService(String id,Map requestParamMap,String tableName,String cusCondition,String cusSetStr) throws Exception{ return updateInfoServiceInner(id,requestParamMap,tableName,cusCondition,cusSetStr,null); }
[ "public", "Integer", "updateInfoByIdService", "(", "String", "id", ",", "Map", "requestParamMap", ",", "String", "tableName", ",", "String", "cusCondition", ",", "String", "cusSetStr", ")", "throws", "Exception", "{", "return", "updateInfoServiceInner", "(", "id", ...
���id������ݼ�¼ @param id �������� @param requestParamMap �ύ���� @param tableName ����� @param cusCondition ���������ַ� @param cusSetStr ����set�ַ� @param modelName ģ����� @return @throws Exception
[ "���id������ݼ�¼" ]
train
https://github.com/jeffreyning/nh-micro/blob/f1cb420a092f8ba94317519ede739974decb5617/nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java#L1688-L1690
josesamuel/remoter
remoter/src/main/java/remoter/compiler/builder/BindingManager.java
BindingManager.getFieldBuilder
FieldBuilder getFieldBuilder(Element element) { """ Returns the {@link FieldBuilder} that adds fields to the class spec """ FieldBuilder fieldBuilder = new FieldBuilder(messager, element); fieldBuilder.setBindingManager(this); return fieldBuilder; }
java
FieldBuilder getFieldBuilder(Element element) { FieldBuilder fieldBuilder = new FieldBuilder(messager, element); fieldBuilder.setBindingManager(this); return fieldBuilder; }
[ "FieldBuilder", "getFieldBuilder", "(", "Element", "element", ")", "{", "FieldBuilder", "fieldBuilder", "=", "new", "FieldBuilder", "(", "messager", ",", "element", ")", ";", "fieldBuilder", ".", "setBindingManager", "(", "this", ")", ";", "return", "fieldBuilder"...
Returns the {@link FieldBuilder} that adds fields to the class spec
[ "Returns", "the", "{" ]
train
https://github.com/josesamuel/remoter/blob/007401868c319740d40134ebc07c3406988f9a86/remoter/src/main/java/remoter/compiler/builder/BindingManager.java#L121-L125
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/AbstractTreeMap.java
AbstractTreeMap.headMap
public SortedMap headMap(Object endKey) { """ Answers a SortedMap of the specified portion of this TreeMap which contains keys less than the end key. The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other. @param endKey the end key @return a submap where the keys are ...
java
public SortedMap headMap(Object endKey) { // Check for errors if (comparator == null) ((Comparable) endKey).compareTo(endKey); else comparator.compare(endKey, endKey); return makeSubMap(null, endKey); }
[ "public", "SortedMap", "headMap", "(", "Object", "endKey", ")", "{", "// Check for errors", "if", "(", "comparator", "==", "null", ")", "(", "(", "Comparable", ")", "endKey", ")", ".", "compareTo", "(", "endKey", ")", ";", "else", "comparator", ".", "compa...
Answers a SortedMap of the specified portion of this TreeMap which contains keys less than the end key. The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other. @param endKey the end key @return a submap where the keys are less than <code>endKey</code> @exception ClassCastExcept...
[ "Answers", "a", "SortedMap", "of", "the", "specified", "portion", "of", "this", "TreeMap", "which", "contains", "keys", "less", "than", "the", "end", "key", ".", "The", "returned", "SortedMap", "is", "backed", "by", "this", "TreeMap", "so", "changes", "to", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/AbstractTreeMap.java#L844-L851
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/EncodedGradientsAccumulator.java
EncodedGradientsAccumulator.getOptimalBufferSize
public static long getOptimalBufferSize(long paramsLength, int numWorkers, int queueSize) { """ This method returns optimal bufferSize for a given model We know, that updates are guaranteed to have MAX size of params / 16. So, here we go. I.e. for model with 100m params, that's 400m of floats (or 800m of doubl...
java
public static long getOptimalBufferSize(long paramsLength, int numWorkers, int queueSize) { // we add 64kb just for future proof volatility val bufferSize = ((paramsLength / 16) + 65536) * numWorkers * queueSize * 4; return bufferSize; }
[ "public", "static", "long", "getOptimalBufferSize", "(", "long", "paramsLength", ",", "int", "numWorkers", ",", "int", "queueSize", ")", "{", "// we add 64kb just for future proof volatility", "val", "bufferSize", "=", "(", "(", "paramsLength", "/", "16", ")", "+", ...
This method returns optimal bufferSize for a given model We know, that updates are guaranteed to have MAX size of params / 16. So, here we go. I.e. for model with 100m params, that's 400m of floats (or 800m of doubles) The worst case for us is bitmap encoding, that takes 2 bits to encode each gradient value so, for f...
[ "This", "method", "returns", "optimal", "bufferSize", "for", "a", "given", "model" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/EncodedGradientsAccumulator.java#L170-L174
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setInstructions
public void setInstructions(String instructions) { """ Sets instructions that explain how to fill out the form and what the form is about. @param instructions instructions that explain how to fill out the form. """ // Split the instructions into multiple instructions for each existent newline ...
java
public void setInstructions(String instructions) { // Split the instructions into multiple instructions for each existent newline ArrayList<String> instructionsList = new ArrayList<>(); StringTokenizer st = new StringTokenizer(instructions, "\n"); while (st.hasMoreTokens()) { ...
[ "public", "void", "setInstructions", "(", "String", "instructions", ")", "{", "// Split the instructions into multiple instructions for each existent newline", "ArrayList", "<", "String", ">", "instructionsList", "=", "new", "ArrayList", "<>", "(", ")", ";", "StringTokenize...
Sets instructions that explain how to fill out the form and what the form is about. @param instructions instructions that explain how to fill out the form.
[ "Sets", "instructions", "that", "explain", "how", "to", "fill", "out", "the", "form", "and", "what", "the", "form", "is", "about", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L414-L424
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/randomizers/range/ShortRangeRandomizer.java
ShortRangeRandomizer.aNewShortRangeRandomizer
public static ShortRangeRandomizer aNewShortRangeRandomizer(final Short min, final Short max, final long seed) { """ Create a new {@link ShortRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link ShortRangeRandomizer}. """ return new ShortRang...
java
public static ShortRangeRandomizer aNewShortRangeRandomizer(final Short min, final Short max, final long seed) { return new ShortRangeRandomizer(min, max, seed); }
[ "public", "static", "ShortRangeRandomizer", "aNewShortRangeRandomizer", "(", "final", "Short", "min", ",", "final", "Short", "max", ",", "final", "long", "seed", ")", "{", "return", "new", "ShortRangeRandomizer", "(", "min", ",", "max", ",", "seed", ")", ";", ...
Create a new {@link ShortRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link ShortRangeRandomizer}.
[ "Create", "a", "new", "{", "@link", "ShortRangeRandomizer", "}", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/randomizers/range/ShortRangeRandomizer.java#L73-L75
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/internal/util/FileUtil.java
FileUtil.isEmpty
public static boolean isEmpty(final File file, final Charset charset) throws IOException { """ Checks if the given file is empty. @param file the file that could be empty @return {@code true} when the file is accessible and empty otherwise {@code false} @throws IOException if an I/O error occurs """ b...
java
public static boolean isEmpty(final File file, final Charset charset) throws IOException { boolean empty = false; BufferedReader reader = null; boolean threw = true; try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); final String line = reader.readLine(); empt...
[ "public", "static", "boolean", "isEmpty", "(", "final", "File", "file", ",", "final", "Charset", "charset", ")", "throws", "IOException", "{", "boolean", "empty", "=", "false", ";", "BufferedReader", "reader", "=", "null", ";", "boolean", "threw", "=", "true...
Checks if the given file is empty. @param file the file that could be empty @return {@code true} when the file is accessible and empty otherwise {@code false} @throws IOException if an I/O error occurs
[ "Checks", "if", "the", "given", "file", "is", "empty", "." ]
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/internal/util/FileUtil.java#L41-L54
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/PlayerStatsService.java
PlayerStatsService.getTeamEndOfGameStats
public EndOfGameStats getTeamEndOfGameStats(TeamId teamId, long gameId) { """ Retrieve post-game stats for a team @param teamId The id of the team @param gameId The if of the game @return Post-game stats """ return client.sendRpcAndWait(SERVICE, "getTeamEndOfGameStats", teamId, gameId); }
java
public EndOfGameStats getTeamEndOfGameStats(TeamId teamId, long gameId) { return client.sendRpcAndWait(SERVICE, "getTeamEndOfGameStats", teamId, gameId); }
[ "public", "EndOfGameStats", "getTeamEndOfGameStats", "(", "TeamId", "teamId", ",", "long", "gameId", ")", "{", "return", "client", ".", "sendRpcAndWait", "(", "SERVICE", ",", "\"getTeamEndOfGameStats\"", ",", "teamId", ",", "gameId", ")", ";", "}" ]
Retrieve post-game stats for a team @param teamId The id of the team @param gameId The if of the game @return Post-game stats
[ "Retrieve", "post", "-", "game", "stats", "for", "a", "team" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/PlayerStatsService.java#L102-L104
buschmais/jqa-java-plugin
src/main/java/com/buschmais/jqassistant/plugin/java/api/scanner/SignatureHelper.java
SignatureHelper.getMethodSignature
public static String getMethodSignature(String name, String rawSignature) { """ Return a method signature. @param name The method name. @param rawSignature The signature containing parameter, return and exception values. @return The method signature. """ StringBuilder signature = new StringBuil...
java
public static String getMethodSignature(String name, String rawSignature) { StringBuilder signature = new StringBuilder(); String returnType = org.objectweb.asm.Type.getReturnType(rawSignature).getClassName(); if (returnType != null) { signature.append(returnType); signat...
[ "public", "static", "String", "getMethodSignature", "(", "String", "name", ",", "String", "rawSignature", ")", "{", "StringBuilder", "signature", "=", "new", "StringBuilder", "(", ")", ";", "String", "returnType", "=", "org", ".", "objectweb", ".", "asm", ".",...
Return a method signature. @param name The method name. @param rawSignature The signature containing parameter, return and exception values. @return The method signature.
[ "Return", "a", "method", "signature", "." ]
train
https://github.com/buschmais/jqa-java-plugin/blob/4c050943e9c28cf1c4a08aa962d5b5bf03c4fe54/src/main/java/com/buschmais/jqassistant/plugin/java/api/scanner/SignatureHelper.java#L65-L83
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JndiContext.java
JndiContext.getParentCl
private static ClassLoader getParentCl() { """ A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used bootstrap CL instead. @return the base CL to use. """ try { Method m = ClassLoader.class.getMethod...
java
private static ClassLoader getParentCl() { try { Method m = ClassLoader.class.getMethod("getPlatformClassLoader"); return (ClassLoader) m.invoke(null); } catch (NoSuchMethodException e) { // Java < 9, just use the bootstrap CL. ...
[ "private", "static", "ClassLoader", "getParentCl", "(", ")", "{", "try", "{", "Method", "m", "=", "ClassLoader", ".", "class", ".", "getMethod", "(", "\"getPlatformClassLoader\"", ")", ";", "return", "(", "ClassLoader", ")", "m", ".", "invoke", "(", "null", ...
A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used bootstrap CL instead. @return the base CL to use.
[ "A", "helper", "-", "in", "Java", "9", "the", "extension", "CL", "was", "renamed", "to", "platform", "CL", "and", "hosts", "all", "the", "JDK", "classes", ".", "Before", "9", "it", "was", "useless", "and", "we", "used", "bootstrap", "CL", "instead", "....
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JndiContext.java#L413-L429
line/armeria
thrift/src/main/java/com/linecorp/armeria/common/thrift/text/TTextProtocol.java
TTextProtocol.writeNameOrValue
private <T> void writeNameOrValue(TypedParser<T> helper, T val) throws TException { """ Write out the given value, either as a JSON name (meaning it's escaped by quotes), or a value. The TypedParser knows how to handle the writing. """ getCurrentContext().write(); try { ...
java
private <T> void writeNameOrValue(TypedParser<T> helper, T val) throws TException { getCurrentContext().write(); try { if (getCurrentContext().isMapKey()) { getCurrentWriter().writeFieldName(val.toString()); } else { helper.writeValue(g...
[ "private", "<", "T", ">", "void", "writeNameOrValue", "(", "TypedParser", "<", "T", ">", "helper", ",", "T", "val", ")", "throws", "TException", "{", "getCurrentContext", "(", ")", ".", "write", "(", ")", ";", "try", "{", "if", "(", "getCurrentContext", ...
Write out the given value, either as a JSON name (meaning it's escaped by quotes), or a value. The TypedParser knows how to handle the writing.
[ "Write", "out", "the", "given", "value", "either", "as", "a", "JSON", "name", "(", "meaning", "it", "s", "escaped", "by", "quotes", ")", "or", "a", "value", ".", "The", "TypedParser", "knows", "how", "to", "handle", "the", "writing", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/thrift/src/main/java/com/linecorp/armeria/common/thrift/text/TTextProtocol.java#L367-L379
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readFolder
protected CmsFolder readFolder(CmsDbContext dbc, String resourcename, CmsResourceFilter filter) throws CmsException { """ Reads a folder from the VFS, using the specified resource filter.<p> @param dbc the current database context @param resourcename the name of the folder to read (full path) @param filte...
java
protected CmsFolder readFolder(CmsDbContext dbc, String resourcename, CmsResourceFilter filter) throws CmsException { CmsResource resource = readResource(dbc, resourcename, filter); return m_driverManager.convertResourceToFolder(resource); }
[ "protected", "CmsFolder", "readFolder", "(", "CmsDbContext", "dbc", ",", "String", "resourcename", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "readResource", "(", "dbc", ",", "resourcename", ",", "filter",...
Reads a folder from the VFS, using the specified resource filter.<p> @param dbc the current database context @param resourcename the name of the folder to read (full path) @param filter the resource filter to use while reading @return the folder that was read @throws CmsException if something goes wrong
[ "Reads", "a", "folder", "from", "the", "VFS", "using", "the", "specified", "resource", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L7427-L7432
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.assignType
public void assignType(XAttribute attribute, String type) { """ Assigns any attribute its cost type, as defined by this extension's type attribute. @param attribute Attribute to assign cost type to. @param type The cost type to be assigned. """ if (type != null && type.trim().length() > 0) { XAtt...
java
public void assignType(XAttribute attribute, String type) { if (type != null && type.trim().length() > 0) { XAttributeLiteral attr = (XAttributeLiteral) ATTR_TYPE.clone(); attr.setValue(type); attribute.getAttributes().put(KEY_TYPE, attr); } }
[ "public", "void", "assignType", "(", "XAttribute", "attribute", ",", "String", "type", ")", "{", "if", "(", "type", "!=", "null", "&&", "type", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "XAttributeLiteral", "attr", "=", "(",...
Assigns any attribute its cost type, as defined by this extension's type attribute. @param attribute Attribute to assign cost type to. @param type The cost type to be assigned.
[ "Assigns", "any", "attribute", "its", "cost", "type", "as", "defined", "by", "this", "extension", "s", "type", "attribute", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L948-L954
w3c/epubcheck
src/main/java/com/adobe/epubcheck/util/Messages.java
Messages.getInstance
public static Messages getInstance(Locale locale, Class<?> cls) { """ Get a Messages instance that has been localized for the given locale, or the default locale if locale is null. Note that passing an unknown locale returns the default messages. @param locale The locale to use for localization of the messag...
java
public static Messages getInstance(Locale locale, Class<?> cls) { Messages instance = null; locale = (locale == null) ? Locale.getDefault() : locale; String bundleKey = (cls==null)? BUNDLE_NAME : getBundleName(cls); String localeKey = locale.getLanguage(); if (messageTable.contains(bundleK...
[ "public", "static", "Messages", "getInstance", "(", "Locale", "locale", ",", "Class", "<", "?", ">", "cls", ")", "{", "Messages", "instance", "=", "null", ";", "locale", "=", "(", "locale", "==", "null", ")", "?", "Locale", ".", "getDefault", "(", ")",...
Get a Messages instance that has been localized for the given locale, or the default locale if locale is null. Note that passing an unknown locale returns the default messages. @param locale The locale to use for localization of the messages. @return The localized messages or default.
[ "Get", "a", "Messages", "instance", "that", "has", "been", "localized", "for", "the", "given", "locale", "or", "the", "default", "locale", "if", "locale", "is", "null", ".", "Note", "that", "passing", "an", "unknown", "locale", "returns", "the", "default", ...
train
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/com/adobe/epubcheck/util/Messages.java#L83-L107
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java
LicenseClient.insertLicense
@BetaApi public final Operation insertLicense(String project, License licenseResource) { """ Create a License resource in the specified project. <p>Sample code: <pre><code> try (LicenseClient licenseClient = LicenseClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); License licenseReso...
java
@BetaApi public final Operation insertLicense(String project, License licenseResource) { InsertLicenseHttpRequest request = InsertLicenseHttpRequest.newBuilder() .setProject(project) .setLicenseResource(licenseResource) .build(); return insertLicense(request); }
[ "@", "BetaApi", "public", "final", "Operation", "insertLicense", "(", "String", "project", ",", "License", "licenseResource", ")", "{", "InsertLicenseHttpRequest", "request", "=", "InsertLicenseHttpRequest", ".", "newBuilder", "(", ")", ".", "setProject", "(", "proj...
Create a License resource in the specified project. <p>Sample code: <pre><code> try (LicenseClient licenseClient = LicenseClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); License licenseResource = License.newBuilder().build(); Operation response = licenseClient.insertLicense(project.toString(), l...
[ "Create", "a", "License", "resource", "in", "the", "specified", "project", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java#L495-L504
aerospike/aerospike-helper
java/src/main/java/com/aerospike/helper/Utils.java
Utils.infoAll
public static String infoAll(AerospikeClient client, String cmd) { """ Sends an "Info" command to all nodes in the cluster @param client AerospikeClient instance @param cmd Info command to be sent to the cluster @return A string containing the results from all nodes in the cluster """ Node[] nodes = cli...
java
public static String infoAll(AerospikeClient client, String cmd) { Node[] nodes = client.getNodes(); StringBuilder results = new StringBuilder(); for (Node node : nodes) { results.append(Info.request(node.getHost().name, node.getHost().port, cmd)).append("\n"); } return results.toString(); }
[ "public", "static", "String", "infoAll", "(", "AerospikeClient", "client", ",", "String", "cmd", ")", "{", "Node", "[", "]", "nodes", "=", "client", ".", "getNodes", "(", ")", ";", "StringBuilder", "results", "=", "new", "StringBuilder", "(", ")", ";", "...
Sends an "Info" command to all nodes in the cluster @param client AerospikeClient instance @param cmd Info command to be sent to the cluster @return A string containing the results from all nodes in the cluster
[ "Sends", "an", "Info", "command", "to", "all", "nodes", "in", "the", "cluster" ]
train
https://github.com/aerospike/aerospike-helper/blob/eeb4a1464bc8d9c6716c014d250c8166b5caa82d/java/src/main/java/com/aerospike/helper/Utils.java#L60-L67
mbrade/prefixedproperties
pp-core/src/main/java/net/sf/prefixedproperties/PrefixedProperties.java
PrefixedProperties.getProperty
@Override public String getProperty(final String value, final String def) { """ Gets the property. @param value the value @param def the def @return the property """ final String result = getProperty(value); return result == null ? def : result; }
java
@Override public String getProperty(final String value, final String def) { final String result = getProperty(value); return result == null ? def : result; }
[ "@", "Override", "public", "String", "getProperty", "(", "final", "String", "value", ",", "final", "String", "def", ")", "{", "final", "String", "result", "=", "getProperty", "(", "value", ")", ";", "return", "result", "==", "null", "?", "def", ":", "res...
Gets the property. @param value the value @param def the def @return the property
[ "Gets", "the", "property", "." ]
train
https://github.com/mbrade/prefixedproperties/blob/ac430409ea37e244158002b3cf1504417835a0b2/pp-core/src/main/java/net/sf/prefixedproperties/PrefixedProperties.java#L1351-L1355
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/authorization/authorizer/ProfileAuthorizer.java
ProfileAuthorizer.isAllAuthorized
public boolean isAllAuthorized(final WebContext context, final List<U> profiles) { """ If all profiles are authorized. @param context the web context @param profiles the user profiles @return whether all profiles are authorized """ for (final U profile : profiles) { if (!isProfileAutho...
java
public boolean isAllAuthorized(final WebContext context, final List<U> profiles) { for (final U profile : profiles) { if (!isProfileAuthorized(context, profile)) { return handleError(context); } } return true; }
[ "public", "boolean", "isAllAuthorized", "(", "final", "WebContext", "context", ",", "final", "List", "<", "U", ">", "profiles", ")", "{", "for", "(", "final", "U", "profile", ":", "profiles", ")", "{", "if", "(", "!", "isProfileAuthorized", "(", "context",...
If all profiles are authorized. @param context the web context @param profiles the user profiles @return whether all profiles are authorized
[ "If", "all", "profiles", "are", "authorized", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/authorization/authorizer/ProfileAuthorizer.java#L23-L30
VoltDB/voltdb
src/frontend/org/voltdb/exceptions/SQLException.java
SQLException.getSQLState
public String getSQLState() { """ Retrieve the SQLState code for the error that generated this exception. @return Five character SQLState code. """ String state = null; try { state = new String(m_sqlState, "UTF-8"); } catch (UnsupportedEncodingException e) { thr...
java
public String getSQLState() { String state = null; try { state = new String(m_sqlState, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } return state; }
[ "public", "String", "getSQLState", "(", ")", "{", "String", "state", "=", "null", ";", "try", "{", "state", "=", "new", "String", "(", "m_sqlState", ",", "\"UTF-8\"", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e", ")", "{", "throw", "n...
Retrieve the SQLState code for the error that generated this exception. @return Five character SQLState code.
[ "Retrieve", "the", "SQLState", "code", "for", "the", "error", "that", "generated", "this", "exception", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exceptions/SQLException.java#L66-L75
google/closure-compiler
src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java
ProcessClosureProvidesAndRequires.collectProvidedNames
Map<String, ProvidedName> collectProvidedNames(Node externs, Node root) { """ Collects all goog.provides in the given namespace and warns on invalid code """ if (this.providedNames.isEmpty()) { // goog is special-cased because it is provided in Closure's base library. providedNames.put(GOOG, ne...
java
Map<String, ProvidedName> collectProvidedNames(Node externs, Node root) { if (this.providedNames.isEmpty()) { // goog is special-cased because it is provided in Closure's base library. providedNames.put(GOOG, new ProvidedName(GOOG, null, null, false /* implicit */, false)); NodeTraversal.traverseR...
[ "Map", "<", "String", ",", "ProvidedName", ">", "collectProvidedNames", "(", "Node", "externs", ",", "Node", "root", ")", "{", "if", "(", "this", ".", "providedNames", ".", "isEmpty", "(", ")", ")", "{", "// goog is special-cased because it is provided in Closure'...
Collects all goog.provides in the given namespace and warns on invalid code
[ "Collects", "all", "goog", ".", "provides", "in", "the", "given", "namespace", "and", "warns", "on", "invalid", "code" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java#L97-L104
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.createProjectiveToMetric
public static DMatrixRMaj createProjectiveToMetric( DMatrixRMaj K , double v1 , double v2 , double v3 , double lambda, @Nullable DMatrixRMaj H ) { """ Given the calibration matrix for the first view, plane at infinity, and lambda (scaling factor) compute the rectifying ho...
java
public static DMatrixRMaj createProjectiveToMetric( DMatrixRMaj K , double v1 , double v2 , double v3 , double lambda, @Nullable DMatrixRMaj H ) { if( H == null ) H = new DMatrixRMaj(4,4); else H.reshape(4,4); CommonOps_DDRM.insert(K,H,0,0); H.set(0,3,0); H.se...
[ "public", "static", "DMatrixRMaj", "createProjectiveToMetric", "(", "DMatrixRMaj", "K", ",", "double", "v1", ",", "double", "v2", ",", "double", "v3", ",", "double", "lambda", ",", "@", "Nullable", "DMatrixRMaj", "H", ")", "{", "if", "(", "H", "==", "null"...
Given the calibration matrix for the first view, plane at infinity, and lambda (scaling factor) compute the rectifying homography for changing a projective camera matrix into a metric one. <p>H = [K 0;v' &lambda]</p> @param K 3x3 calibration matrix for view 1 @param v1 plane at infinity @param v2 plane at infinity @p...
[ "Given", "the", "calibration", "matrix", "for", "the", "first", "view", "plane", "at", "infinity", "and", "lambda", "(", "scaling", "factor", ")", "compute", "the", "rectifying", "homography", "for", "changing", "a", "projective", "camera", "matrix", "into", "...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1577-L1597
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.processIncomingMessage
public BaseMessage processIncomingMessage(BaseMessage messageReplyIn, BaseMessage messageOut) { """ Here is an incoming message. Figure out what it is and process it. Note: the caller should have logged this message since I have no way to serialize the raw data. @param messageReplyIn - The incoming message @pa...
java
public BaseMessage processIncomingMessage(BaseMessage messageReplyIn, BaseMessage messageOut) { messageReplyIn = this.convertExternalReplyToInternal(messageReplyIn, messageOut); String strMessageInfoType = this.getMessageInfoType(messageReplyIn); String strDefaultProcessorClass = MessageInf...
[ "public", "BaseMessage", "processIncomingMessage", "(", "BaseMessage", "messageReplyIn", ",", "BaseMessage", "messageOut", ")", "{", "messageReplyIn", "=", "this", ".", "convertExternalReplyToInternal", "(", "messageReplyIn", ",", "messageOut", ")", ";", "String", "strM...
Here is an incoming message. Figure out what it is and process it. Note: the caller should have logged this message since I have no way to serialize the raw data. @param messageReplyIn - The incoming message @param messageOut - The (optional) outgoing message that this is a reply to (null if unknown). @return The optio...
[ "Here", "is", "an", "incoming", "message", ".", "Figure", "out", "what", "it", "is", "and", "process", "it", ".", "Note", ":", "the", "caller", "should", "have", "logged", "this", "message", "since", "I", "have", "no", "way", "to", "serialize", "the", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L244-L275
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newInitializationException
public static InitializationException newInitializationException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link InitializationException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param ...
java
public static InitializationException newInitializationException(Throwable cause, String message, Object... args) { return new InitializationException(format(message, args), cause); }
[ "public", "static", "InitializationException", "newInitializationException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "InitializationException", "(", "format", "(", "message", ",", "args", ")", "...
Constructs and initializes a new {@link InitializationException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link InitializationException} was thrown. @param message {@link String} ...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "InitializationException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L453-L455
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/upload/firmware/OADProfile.java
OADProfile.programWithFirmware
public OADApproval programWithFirmware(final FirmwareBundle bundle, OADListener listener) { """ Program the Bean's CC2540 with new firmware. @param bundle The {@link com.punchthrough.bean.sdk.upload.FirmwareBundle} to be sent @param listener Listener object to alert client of events/state of the Fi...
java
public OADApproval programWithFirmware(final FirmwareBundle bundle, OADListener listener) { if (!mGattClient.isConnected()) { listener.error(BeanError.NOT_CONNECTED); } Log.i(TAG, "Starting firmware update procedure"); // Save state for this firmware procedure this...
[ "public", "OADApproval", "programWithFirmware", "(", "final", "FirmwareBundle", "bundle", ",", "OADListener", "listener", ")", "{", "if", "(", "!", "mGattClient", ".", "isConnected", "(", ")", ")", "{", "listener", ".", "error", "(", "BeanError", ".", "NOT_CON...
Program the Bean's CC2540 with new firmware. @param bundle The {@link com.punchthrough.bean.sdk.upload.FirmwareBundle} to be sent @param listener Listener object to alert client of events/state of the Firmware update process
[ "Program", "the", "Bean", "s", "CC2540", "with", "new", "firmware", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/upload/firmware/OADProfile.java#L508-L524
pierre/serialization
thrift/src/main/java/com/ning/metrics/serialization/event/ThriftToThriftEnvelopeEvent.java
ThriftToThriftEnvelopeEvent.extractEvent
public static <T extends Serializable> ThriftEnvelopeEvent extractEvent(final String eventName, final DateTime eventDateTime, final T thriftObject) { """ Given a generic thrift object (class generated by the thrift compiler), create a ThriftEnvelopeEvent. @param eventName Thrift schema name @param eventDat...
java
public static <T extends Serializable> ThriftEnvelopeEvent extractEvent(final String eventName, final DateTime eventDateTime, final T thriftObject) { final List<ThriftField> thriftFieldList = new ArrayList<ThriftField>(); final Field[] fields = thriftObject.getClass().getFields(); for (int ...
[ "public", "static", "<", "T", "extends", "Serializable", ">", "ThriftEnvelopeEvent", "extractEvent", "(", "final", "String", "eventName", ",", "final", "DateTime", "eventDateTime", ",", "final", "T", "thriftObject", ")", "{", "final", "List", "<", "ThriftField", ...
Given a generic thrift object (class generated by the thrift compiler), create a ThriftEnvelopeEvent. @param eventName Thrift schema name @param eventDateTime the event timestamp @param thriftObject Thrift instance @param <T> any Thrift class generated by the thrift compiler @return ThriftEnvelopeEvent ...
[ "Given", "a", "generic", "thrift", "object", "(", "class", "generated", "by", "the", "thrift", "compiler", ")", "create", "a", "ThriftEnvelopeEvent", "." ]
train
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/thrift/src/main/java/com/ning/metrics/serialization/event/ThriftToThriftEnvelopeEvent.java#L55-L76
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.generateVpnProfileAsync
public Observable<String> generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { """ Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. @param resource...
java
public Observable<String> generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1<ServiceResponse<String>, String>() { ...
[ "public", "Observable", "<", "String", ">", "generateVpnProfileAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "VpnClientParameters", "parameters", ")", "{", "return", "generateVpnProfileWithServiceResponseAsync", "(", "resourceGro...
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @param parameters Parameters supplied t...
[ "Generates", "VPN", "profile", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", ".", "Used", "for", "IKEV2", "and", "radius", "based", "authentication", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1659-L1666