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
apache/groovy
src/main/groovy/groovy/lang/GroovyClassLoader.java
GroovyClassLoader.parseClass
public Class parseClass(String text) throws CompilationFailedException { """ Parses the given text into a Java class capable of being run @param text the text of the script/class to parse @return the main class defined in the given script """ return parseClass(text, "script" + System.currentTimeMil...
java
public Class parseClass(String text) throws CompilationFailedException { return parseClass(text, "script" + System.currentTimeMillis() + Math.abs(text.hashCode()) + ".groovy"); }
[ "public", "Class", "parseClass", "(", "String", "text", ")", "throws", "CompilationFailedException", "{", "return", "parseClass", "(", "text", ",", "\"script\"", "+", "System", ".", "currentTimeMillis", "(", ")", "+", "Math", ".", "abs", "(", "text", ".", "h...
Parses the given text into a Java class capable of being run @param text the text of the script/class to parse @return the main class defined in the given script
[ "Parses", "the", "given", "text", "into", "a", "Java", "class", "capable", "of", "being", "run" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/GroovyClassLoader.java#L260-L263
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java
MapKeyLoader.sendKeysInBatches
private void sendKeysInBatches(MapStoreContext mapStoreContext, boolean replaceExistingValues) throws Exception { """ Loads keys from the map loader and sends them to the partition owners in batches for value loading. This method will return after all keys have been dispatched to the partition owners for value l...
java
private void sendKeysInBatches(MapStoreContext mapStoreContext, boolean replaceExistingValues) throws Exception { if (logger.isFinestEnabled()) { logger.finest("sendKeysInBatches invoked " + getStateMessage()); } int clusterSize = partitionService.getMemberPartitionsMap().size(); ...
[ "private", "void", "sendKeysInBatches", "(", "MapStoreContext", "mapStoreContext", ",", "boolean", "replaceExistingValues", ")", "throws", "Exception", "{", "if", "(", "logger", ".", "isFinestEnabled", "(", ")", ")", "{", "logger", ".", "finest", "(", "\"sendKeysI...
Loads keys from the map loader and sends them to the partition owners in batches for value loading. This method will return after all keys have been dispatched to the partition owners for value loading and all partitions have been notified that the key loading has completed. The values will still be loaded asynchronous...
[ "Loads", "keys", "from", "the", "map", "loader", "and", "sends", "them", "to", "the", "partition", "owners", "in", "batches", "for", "value", "loading", ".", "This", "method", "will", "return", "after", "all", "keys", "have", "been", "dispatched", "to", "t...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java#L413-L457
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java
GraphPath.removeFrom
public boolean removeFrom(ST obj, PT pt) { """ Remove the path's elements after the specified one which is starting at the specified point. The specified element will be removed. <p>This function removes after the <i>first occurence</i> of the given object. @param obj is the segment to remove @param pt ...
java
public boolean removeFrom(ST obj, PT pt) { return removeAfter(indexOf(obj, pt), true); }
[ "public", "boolean", "removeFrom", "(", "ST", "obj", ",", "PT", "pt", ")", "{", "return", "removeAfter", "(", "indexOf", "(", "obj", ",", "pt", ")", ",", "true", ")", ";", "}" ]
Remove the path's elements after the specified one which is starting at the specified point. The specified element will be removed. <p>This function removes after the <i>first occurence</i> of the given object. @param obj is the segment to remove @param pt is the point on which the segment was connected as its first ...
[ "Remove", "the", "path", "s", "elements", "after", "the", "specified", "one", "which", "is", "starting", "at", "the", "specified", "point", ".", "The", "specified", "element", "will", "be", "removed", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java#L871-L873
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableDictionary.java
MutableDictionary.setValue
@NonNull @Override public MutableDictionary setValue(@NonNull String key, Object value) { """ Set an object value by key. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. The List and Map must contain only the above types. An Date object will be converted to an ...
java
@NonNull @Override public MutableDictionary setValue(@NonNull String key, Object value) { if (key == null) { throw new IllegalArgumentException("key cannot be null."); } synchronized (lock) { final MValue oldValue = internalDict.get(key); value = Fleece.toCBLObject(value...
[ "@", "NonNull", "@", "Override", "public", "MutableDictionary", "setValue", "(", "@", "NonNull", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"key cannot be null...
Set an object value by key. Allowed value types are List, Date, Map, Number, null, String, Array, Blob, and Dictionary. The List and Map must contain only the above types. An Date object will be converted to an ISO-8601 format string. @param key the key. @param value the object value. @return The self object.
[ "Set", "an", "object", "value", "by", "key", ".", "Allowed", "value", "types", "are", "List", "Date", "Map", "Number", "null", "String", "Array", "Blob", "and", "Dictionary", ".", "The", "List", "and", "Map", "must", "contain", "only", "the", "above", "t...
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDictionary.java#L97-L108
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java
XDSRepositoryAuditor.auditRetrieveDocumentEvent
public void auditRetrieveDocumentEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerIpAddress, String userName, String repositoryRetrieveUri, String documentUniqueId) { """ Audits an ITI-17 Retrieve Document event for XDS.a Document Repository actors. @param eventOutcome The event...
java
public void auditRetrieveDocumentEvent( RFC3881EventOutcomeCodes eventOutcome, String consumerIpAddress, String userName, String repositoryRetrieveUri, String documentUniqueId) { if (!isAuditorEnabled()) { return; } ExportEvent exportEvent = new ExportEvent(true, eventOutcome, new IHETran...
[ "public", "void", "auditRetrieveDocumentEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "consumerIpAddress", ",", "String", "userName", ",", "String", "repositoryRetrieveUri", ",", "String", "documentUniqueId", ")", "{", "if", "(", "!", "isAudito...
Audits an ITI-17 Retrieve Document event for XDS.a Document Repository actors. @param eventOutcome The event outcome indicator @param consumerIpAddress The IP address of the document consumer that initiated the transaction @param repositoryRetrieveUri The URI that was used to retrieve the document @param documentUniqu...
[ "Audits", "an", "ITI", "-", "17", "Retrieve", "Document", "event", "for", "XDS", ".", "a", "Document", "Repository", "actors", "." ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSRepositoryAuditor.java#L196-L215
grpc/grpc-java
grpclb/src/main/java/io/grpc/grpclb/GrpclbState.java
GrpclbState.flattenEquivalentAddressGroup
private static EquivalentAddressGroup flattenEquivalentAddressGroup( List<EquivalentAddressGroup> groupList, Attributes attrs) { """ Flattens list of EquivalentAddressGroup objects into one EquivalentAddressGroup object. """ List<SocketAddress> addrs = new ArrayList<>(); for (EquivalentAddressGro...
java
private static EquivalentAddressGroup flattenEquivalentAddressGroup( List<EquivalentAddressGroup> groupList, Attributes attrs) { List<SocketAddress> addrs = new ArrayList<>(); for (EquivalentAddressGroup group : groupList) { addrs.addAll(group.getAddresses()); } return new EquivalentAddressG...
[ "private", "static", "EquivalentAddressGroup", "flattenEquivalentAddressGroup", "(", "List", "<", "EquivalentAddressGroup", ">", "groupList", ",", "Attributes", "attrs", ")", "{", "List", "<", "SocketAddress", ">", "addrs", "=", "new", "ArrayList", "<>", "(", ")", ...
Flattens list of EquivalentAddressGroup objects into one EquivalentAddressGroup object.
[ "Flattens", "list", "of", "EquivalentAddressGroup", "objects", "into", "one", "EquivalentAddressGroup", "object", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/grpclb/src/main/java/io/grpc/grpclb/GrpclbState.java#L791-L798
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTree.java
WTree.handleShuffleState
private void handleShuffleState(final Request request) { """ Handle the tree items that have been shuffled by the client. @param request the request being processed """ String json = request.getParameter(SHUFFLE_REQUEST_KEY); if (Util.empty(json)) { return; } // New TreeItemIdNode newTree; ...
java
private void handleShuffleState(final Request request) { String json = request.getParameter(SHUFFLE_REQUEST_KEY); if (Util.empty(json)) { return; } // New TreeItemIdNode newTree; try { newTree = TreeItemUtil.convertJsonToTree(json); } catch (Exception e) { LOG.warn("Could not parse JSON for shu...
[ "private", "void", "handleShuffleState", "(", "final", "Request", "request", ")", "{", "String", "json", "=", "request", ".", "getParameter", "(", "SHUFFLE_REQUEST_KEY", ")", ";", "if", "(", "Util", ".", "empty", "(", "json", ")", ")", "{", "return", ";", ...
Handle the tree items that have been shuffled by the client. @param request the request being processed
[ "Handle", "the", "tree", "items", "that", "have", "been", "shuffled", "by", "the", "client", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTree.java#L952-L988
strator-dev/greenpepper
greenpepper/extensions/src/main/java/com/greenpepper/runner/repository/AtlassianRepository.java
AtlassianRepository.listDocumentsInHierarchy
@SuppressWarnings("unchecked") public List<Object> listDocumentsInHierarchy() throws Exception { """ <p>listDocumentsInHierarchy.</p> @return a {@link java.util.List} object. @throws java.lang.Exception if any. """ Vector<?> args = CollectionUtil.toVector( username , password, CollectionUtil.toVector...
java
@SuppressWarnings("unchecked") public List<Object> listDocumentsInHierarchy() throws Exception { Vector<?> args = CollectionUtil.toVector( username , password, CollectionUtil.toVector(getRepositoryName())); XmlRpcClient xmlrpc = getXmlRpcClient(); return (Vector<Object>)xmlrpc.execute( new XmlRpc...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "Object", ">", "listDocumentsInHierarchy", "(", ")", "throws", "Exception", "{", "Vector", "<", "?", ">", "args", "=", "CollectionUtil", ".", "toVector", "(", "username", ",", "password...
<p>listDocumentsInHierarchy.</p> @return a {@link java.util.List} object. @throws java.lang.Exception if any.
[ "<p", ">", "listDocumentsInHierarchy", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/extensions/src/main/java/com/greenpepper/runner/repository/AtlassianRepository.java#L199-L205
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java
HttpResponseMessageImpl.isBodyExpected
@Override public boolean isBodyExpected() { """ Query whether a body is expected to be present with this message. Note that this is only an expectation and not a definitive answer. This will check the necessary headers, status codes, etc, to see if any indicate a body should be present. Without actually rea...
java
@Override public boolean isBodyExpected() { if (VersionValues.V10.equals(getVersionValue())) { // if 1.0 then check the isBodyAllowed because the scenario of 1.0 // servers dumping bodies and closing the socket without any body // indicator throws this logic off ...
[ "@", "Override", "public", "boolean", "isBodyExpected", "(", ")", "{", "if", "(", "VersionValues", ".", "V10", ".", "equals", "(", "getVersionValue", "(", ")", ")", ")", "{", "// if 1.0 then check the isBodyAllowed because the scenario of 1.0", "// servers dumping bodie...
Query whether a body is expected to be present with this message. Note that this is only an expectation and not a definitive answer. This will check the necessary headers, status codes, etc, to see if any indicate a body should be present. Without actually reading for a body, this cannot be sure however. @return boole...
[ "Query", "whether", "a", "body", "is", "expected", "to", "be", "present", "with", "this", "message", ".", "Note", "that", "this", "is", "only", "an", "expectation", "and", "not", "a", "definitive", "answer", ".", "This", "will", "check", "the", "necessary"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java#L213-L242
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/Envelope2D.java
Envelope2D.mergeNE
public void mergeNE(double x, double y) { """ Merges a point with this envelope without checking if the envelope is empty. Use with care. @param x The x coord of the point @param y the y coord in the point """ if (xmin > x) xmin = x; else if (xmax < x) xmax = x; if (ymin > y) ymin = y; els...
java
public void mergeNE(double x, double y) { if (xmin > x) xmin = x; else if (xmax < x) xmax = x; if (ymin > y) ymin = y; else if (ymax < y) ymax = y; }
[ "public", "void", "mergeNE", "(", "double", "x", ",", "double", "y", ")", "{", "if", "(", "xmin", ">", "x", ")", "xmin", "=", "x", ";", "else", "if", "(", "xmax", "<", "x", ")", "xmax", "=", "x", ";", "if", "(", "ymin", ">", "y", ")", "ymin...
Merges a point with this envelope without checking if the envelope is empty. Use with care. @param x The x coord of the point @param y the y coord in the point
[ "Merges", "a", "point", "with", "this", "envelope", "without", "checking", "if", "the", "envelope", "is", "empty", ".", "Use", "with", "care", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Envelope2D.java#L205-L215
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.copyFile
public static Path copyFile(Path src, Path dest, StandardCopyOption... options) throws IORuntimeException { """ 通过JDK7+的 {@link Files#copy(Path, Path, CopyOption...)} 方法拷贝文件 @param src 源文件路径 @param dest 目标文件或目录,如果为目录使用与源文件相同的文件名 @param options {@link StandardCopyOption} @return Path @throws IORuntimeExcepti...
java
public static Path copyFile(Path src, Path dest, StandardCopyOption... options) throws IORuntimeException { Assert.notNull(src, "Source File is null !"); Assert.notNull(dest, "Destination File or directiory is null !"); Path destPath = dest.toFile().isDirectory() ? dest.resolve(src.getFileName()) : dest; ...
[ "public", "static", "Path", "copyFile", "(", "Path", "src", ",", "Path", "dest", ",", "StandardCopyOption", "...", "options", ")", "throws", "IORuntimeException", "{", "Assert", ".", "notNull", "(", "src", ",", "\"Source File is null !\"", ")", ";", "Assert", ...
通过JDK7+的 {@link Files#copy(Path, Path, CopyOption...)} 方法拷贝文件 @param src 源文件路径 @param dest 目标文件或目录,如果为目录使用与源文件相同的文件名 @param options {@link StandardCopyOption} @return Path @throws IORuntimeException IO异常
[ "通过JDK7", "+", "的", "{", "@link", "Files#copy", "(", "Path", "Path", "CopyOption", "...", ")", "}", "方法拷贝文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L961-L971
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/client/util/UrlUtils.java
UrlUtils.toNoApiUri
public static URI toNoApiUri(final URI uri, final String context, final String path) { """ Create a URI from the supplied parameters. @param uri the server URI @param context the server context if any @param path the specific API path @return new full URI instance """ final String p = path.matches(...
java
public static URI toNoApiUri(final URI uri, final String context, final String path) { final String p = path.matches("(?i)https?://.*") ? path : join(context, path); return uri.resolve("/").resolve(p); }
[ "public", "static", "URI", "toNoApiUri", "(", "final", "URI", "uri", ",", "final", "String", "context", ",", "final", "String", "path", ")", "{", "final", "String", "p", "=", "path", ".", "matches", "(", "\"(?i)https?://.*\"", ")", "?", "path", ":", "joi...
Create a URI from the supplied parameters. @param uri the server URI @param context the server context if any @param path the specific API path @return new full URI instance
[ "Create", "a", "URI", "from", "the", "supplied", "parameters", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/client/util/UrlUtils.java#L149-L152
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/GameContainer.java
GameContainer.enableSharedContext
public static void enableSharedContext() throws SlickException { """ Enable shared OpenGL context. After calling this all containers created will shared a single parent context @throws SlickException Indicates a failure to create the shared drawable """ try { SHARED_DRAWABLE = new Pbuffer(64, 64, ne...
java
public static void enableSharedContext() throws SlickException { try { SHARED_DRAWABLE = new Pbuffer(64, 64, new PixelFormat(8, 0, 0), null); } catch (LWJGLException e) { throw new SlickException("Unable to create the pbuffer used for shard context, buffers not supported", e); } }
[ "public", "static", "void", "enableSharedContext", "(", ")", "throws", "SlickException", "{", "try", "{", "SHARED_DRAWABLE", "=", "new", "Pbuffer", "(", "64", ",", "64", ",", "new", "PixelFormat", "(", "8", ",", "0", ",", "0", ")", ",", "null", ")", ";...
Enable shared OpenGL context. After calling this all containers created will shared a single parent context @throws SlickException Indicates a failure to create the shared drawable
[ "Enable", "shared", "OpenGL", "context", ".", "After", "calling", "this", "all", "containers", "created", "will", "shared", "a", "single", "parent", "context" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/GameContainer.java#L207-L213
Jasig/uPortal
uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java
PortletAdministrationHelper.createPortletDefinitionForm
public PortletDefinitionForm createPortletDefinitionForm(IPerson person, String portletId) { """ Construct a new PortletDefinitionForm for the given IPortletDefinition id. If a PortletDefinition matching this ID already exists, the form will be pre-populated with the PortletDefinition's current configuration. If...
java
public PortletDefinitionForm createPortletDefinitionForm(IPerson person, String portletId) { IPortletDefinition def = portletDefinitionRegistry.getPortletDefinition(portletId); // create the new form final PortletDefinitionForm form; if (def != null) { // if this is a pre-e...
[ "public", "PortletDefinitionForm", "createPortletDefinitionForm", "(", "IPerson", "person", ",", "String", "portletId", ")", "{", "IPortletDefinition", "def", "=", "portletDefinitionRegistry", ".", "getPortletDefinition", "(", "portletId", ")", ";", "// create the new form"...
Construct a new PortletDefinitionForm for the given IPortletDefinition id. If a PortletDefinition matching this ID already exists, the form will be pre-populated with the PortletDefinition's current configuration. If the PortletDefinition does not yet exist, a new default form will be created. @param person user that ...
[ "Construct", "a", "new", "PortletDefinitionForm", "for", "the", "given", "IPortletDefinition", "id", ".", "If", "a", "PortletDefinition", "matching", "this", "ID", "already", "exists", "the", "form", "will", "be", "pre", "-", "populated", "with", "the", "Portlet...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletAdministrationHelper.java#L179-L216
h2oai/h2o-2
src/main/java/hex/singlenoderf/VariableImportance.java
VariableImportance.collectVotes
public static TreeVotes[] collectVotes(int trees, int nclasses, Frame f, int ncols, float rate, int variable, SpeeDRFModel model, Vec resp) { """ VariableImportance(int trees, int nclasses, int ncols, float rate, int variable, SpeeDRFModel model) """ return new VariableImportance(trees, nclasses, ncols, ra...
java
public static TreeVotes[] collectVotes(int trees, int nclasses, Frame f, int ncols, float rate, int variable, SpeeDRFModel model, Vec resp) { return new VariableImportance(trees, nclasses, ncols, rate, variable, model, f, resp).doAll(f).resultVotes(); }
[ "public", "static", "TreeVotes", "[", "]", "collectVotes", "(", "int", "trees", ",", "int", "nclasses", ",", "Frame", "f", ",", "int", "ncols", ",", "float", "rate", ",", "int", "variable", ",", "SpeeDRFModel", "model", ",", "Vec", "resp", ")", "{", "r...
VariableImportance(int trees, int nclasses, int ncols, float rate, int variable, SpeeDRFModel model)
[ "VariableImportance", "(", "int", "trees", "int", "nclasses", "int", "ncols", "float", "rate", "int", "variable", "SpeeDRFModel", "model", ")" ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/hex/singlenoderf/VariableImportance.java#L246-L248
h2oai/h2o-3
h2o-algos/src/main/java/hex/ensemble/StackedEnsembleModel.java
StackedEnsembleModel.predictScoreImpl
@Override protected Frame predictScoreImpl(Frame fr, Frame adaptFrm, String destination_key, Job j, boolean computeMetrics, CFuncRef customMetricFunc) { """ For StackedEnsemble we call score on all the base_models and then combine the results with the metalearner to create the final predictions frame. @see M...
java
@Override protected Frame predictScoreImpl(Frame fr, Frame adaptFrm, String destination_key, Job j, boolean computeMetrics, CFuncRef customMetricFunc) { Frame levelOneFrame = new Frame(Key.<Frame>make("preds_levelone_" + this._key.toString() + fr._key)); // TODO: don't score models that have 0 coefficients /...
[ "@", "Override", "protected", "Frame", "predictScoreImpl", "(", "Frame", "fr", ",", "Frame", "adaptFrm", ",", "String", "destination_key", ",", "Job", "j", ",", "boolean", "computeMetrics", ",", "CFuncRef", "customMetricFunc", ")", "{", "Frame", "levelOneFrame", ...
For StackedEnsemble we call score on all the base_models and then combine the results with the metalearner to create the final predictions frame. @see Model#predictScoreImpl(Frame, Frame, String, Job, boolean, CFuncRef) @param adaptFrm Already adapted frame @param computeMetrics @return A Frame containing the predicti...
[ "For", "StackedEnsemble", "we", "call", "score", "on", "all", "the", "base_models", "and", "then", "combine", "the", "results", "with", "the", "metalearner", "to", "create", "the", "final", "predictions", "frame", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/ensemble/StackedEnsembleModel.java#L120-L168
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/internal/RandomAccessListIterate.java
RandomAccessListIterate.forEachWithIndex
public static <T> void forEachWithIndex(List<T> list, ObjectIntProcedure<? super T> objectIntProcedure) { """ Iterates over a collection passing each element and the current relative int index to the specified instance of ObjectIntProcedure. """ int size = list.size(); for (int i = 0; i < size...
java
public static <T> void forEachWithIndex(List<T> list, ObjectIntProcedure<? super T> objectIntProcedure) { int size = list.size(); for (int i = 0; i < size; i++) { objectIntProcedure.value(list.get(i), i); } }
[ "public", "static", "<", "T", ">", "void", "forEachWithIndex", "(", "List", "<", "T", ">", "list", ",", "ObjectIntProcedure", "<", "?", "super", "T", ">", "objectIntProcedure", ")", "{", "int", "size", "=", "list", ".", "size", "(", ")", ";", "for", ...
Iterates over a collection passing each element and the current relative int index to the specified instance of ObjectIntProcedure.
[ "Iterates", "over", "a", "collection", "passing", "each", "element", "and", "the", "current", "relative", "int", "index", "to", "the", "specified", "instance", "of", "ObjectIntProcedure", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/internal/RandomAccessListIterate.java#L717-L724
aws/aws-sdk-java
aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/CreateDevEndpointRequest.java
CreateDevEndpointRequest.withTags
public CreateDevEndpointRequest withTags(java.util.Map<String, String> tags) { """ <p> The tags to use with this DevEndpoint. You may use tags to limit access to the DevEndpoint. For more information about tags in AWS Glue, see <a href="http://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html">AWS Tags in AWS...
java
public CreateDevEndpointRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateDevEndpointRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags to use with this DevEndpoint. You may use tags to limit access to the DevEndpoint. For more information about tags in AWS Glue, see <a href="http://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html">AWS Tags in AWS Glue</a> in the developer guide. </p> @param tags The tags to use with this DevEndpoint....
[ "<p", ">", "The", "tags", "to", "use", "with", "this", "DevEndpoint", ".", "You", "may", "use", "tags", "to", "limit", "access", "to", "the", "DevEndpoint", ".", "For", "more", "information", "about", "tags", "in", "AWS", "Glue", "see", "<a", "href", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/CreateDevEndpointRequest.java#L731-L734
fflewddur/hola
src/main/java/net/straylightlabs/hola/utils/Utils.java
Utils.printBuffer
public static void printBuffer(byte[] buffer, String msg) { """ Print a formatted version of @buffer in hex @param buffer the byte buffer to display """ StringBuilder sb = new StringBuilder(); for (int i = 0; i < buffer.length; i++) { if (i % 20 == 0) { sb.append("...
java
public static void printBuffer(byte[] buffer, String msg) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < buffer.length; i++) { if (i % 20 == 0) { sb.append("\n\t"); } sb.append(String.format("%02x", buffer[i])); } logge...
[ "public", "static", "void", "printBuffer", "(", "byte", "[", "]", "buffer", ",", "String", "msg", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "buffer", ".", "length", ...
Print a formatted version of @buffer in hex @param buffer the byte buffer to display
[ "Print", "a", "formatted", "version", "of" ]
train
https://github.com/fflewddur/hola/blob/08d9b9f3b807fd447181a5c1122f117a950db848/src/main/java/net/straylightlabs/hola/utils/Utils.java#L86-L97
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseStartEvents
public void parseStartEvents(Element parentElement, ScopeImpl scope) { """ Parses the start events of a certain level in the process (process, subprocess or another scope). @param parentElement The 'parent' element that contains the start events (process, subprocess). @param scope The {@link ScopeImpl} to ...
java
public void parseStartEvents(Element parentElement, ScopeImpl scope) { List<Element> startEventElements = parentElement.elements("startEvent"); List<ActivityImpl> startEventActivities = new ArrayList<ActivityImpl>(); for (Element startEventElement : startEventElements) { ActivityImpl startEventActivi...
[ "public", "void", "parseStartEvents", "(", "Element", "parentElement", ",", "ScopeImpl", "scope", ")", "{", "List", "<", "Element", ">", "startEventElements", "=", "parentElement", ".", "elements", "(", "\"startEvent\"", ")", ";", "List", "<", "ActivityImpl", ">...
Parses the start events of a certain level in the process (process, subprocess or another scope). @param parentElement The 'parent' element that contains the start events (process, subprocess). @param scope The {@link ScopeImpl} to which the start events must be added.
[ "Parses", "the", "start", "events", "of", "a", "certain", "level", "in", "the", "process", "(", "process", "subprocess", "or", "another", "scope", ")", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L846-L875
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/menu/ColumnMenuExample.java
ColumnMenuExample.buildColumnMenu
private WMenu buildColumnMenu(final WText selectedMenuText) { """ Builds up a column menu for inclusion in the example. @param selectedMenuText the WText to display the selected menu. @return a column menu for the example. """ WMenu menu = new WMenu(WMenu.MenuType.COLUMN); menu.setSelectMode(SelectMode...
java
private WMenu buildColumnMenu(final WText selectedMenuText) { WMenu menu = new WMenu(WMenu.MenuType.COLUMN); menu.setSelectMode(SelectMode.SINGLE); menu.setRows(8); StringTreeNode root = getOrgHierarchyTree(); mapColumnHierarchy(menu, root, selectedMenuText); // Demonstrate different menu modes getSubMe...
[ "private", "WMenu", "buildColumnMenu", "(", "final", "WText", "selectedMenuText", ")", "{", "WMenu", "menu", "=", "new", "WMenu", "(", "WMenu", ".", "MenuType", ".", "COLUMN", ")", ";", "menu", ".", "setSelectMode", "(", "SelectMode", ".", "SINGLE", ")", "...
Builds up a column menu for inclusion in the example. @param selectedMenuText the WText to display the selected menu. @return a column menu for the example.
[ "Builds", "up", "a", "column", "menu", "for", "inclusion", "in", "the", "example", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/menu/ColumnMenuExample.java#L53-L77
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagProperty.java
CmsJspTagProperty.propertyTagAction
public static String propertyTagAction( String property, String action, String defaultValue, boolean escape, ServletRequest req, Locale locale) throws CmsException { """ Internal action method.<p> @param property the property to look up @param action the sear...
java
public static String propertyTagAction( String property, String action, String defaultValue, boolean escape, ServletRequest req, Locale locale) throws CmsException { CmsFlexController controller = CmsFlexController.getController(req); String value = n...
[ "public", "static", "String", "propertyTagAction", "(", "String", "property", ",", "String", "action", ",", "String", "defaultValue", ",", "boolean", "escape", ",", "ServletRequest", "req", ",", "Locale", "locale", ")", "throws", "CmsException", "{", "CmsFlexContr...
Internal action method.<p> @param property the property to look up @param action the search action @param defaultValue the default value @param escape if the result html should be escaped or not @param req the current request @param locale the locale for which the property should be read @return the value of the prop...
[ "Internal", "action", "method", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagProperty.java#L328-L355
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.getMethod
public static Method getMethod(Class<?> type, Class<?>... parameterTypes) { """ Convenience method to get a method from a class type without having to catch the checked exceptions otherwise required. These exceptions are wrapped as runtime exceptions. <p> The method will first try to look for a declared method...
java
public static Method getMethod(Class<?> type, Class<?>... parameterTypes) { return WhiteboxImpl.getMethod(type, parameterTypes); }
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "type", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "return", "WhiteboxImpl", ".", "getMethod", "(", "type", ",", "parameterTypes", ")", ";", "}" ]
Convenience method to get a method from a class type without having to catch the checked exceptions otherwise required. These exceptions are wrapped as runtime exceptions. <p> The method will first try to look for a declared method in the same class. If the method is not declared in this class it will look for the meth...
[ "Convenience", "method", "to", "get", "a", "method", "from", "a", "class", "type", "without", "having", "to", "catch", "the", "checked", "exceptions", "otherwise", "required", ".", "These", "exceptions", "are", "wrapped", "as", "runtime", "exceptions", ".", "<...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L120-L122
OpenLiberty/open-liberty
dev/com.ibm.ws.opentracing.1.2/src/com/ibm/ws/opentracing/OpentracingService.java
OpentracingService.processFilters
private static void processFilters(List<SpanFilter> filters, String pattern, String childNames, Class<? extends SpanFilter> impl) { """ Check the configuration for filters of a particular type. @param filters The resulting list of filters. @param map Configuration properties. @param configAdmin Se...
java
private static void processFilters(List<SpanFilter> filters, String pattern, String childNames, Class<? extends SpanFilter> impl) { final String methodName = "processFilters"; try { SpanFilterType type = SpanFilterType.INCOMING; boolean ignoreCase = false; boolean r...
[ "private", "static", "void", "processFilters", "(", "List", "<", "SpanFilter", ">", "filters", ",", "String", "pattern", ",", "String", "childNames", ",", "Class", "<", "?", "extends", "SpanFilter", ">", "impl", ")", "{", "final", "String", "methodName", "="...
Check the configuration for filters of a particular type. @param filters The resulting list of filters. @param map Configuration properties. @param configAdmin Service to get child configurations. @param childNames The name of the configuration element to check for. @param impl The filter class to ...
[ "Check", "the", "configuration", "for", "filters", "of", "a", "particular", "type", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.opentracing.1.2/src/com/ibm/ws/opentracing/OpentracingService.java#L127-L149
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/managers/MessageRenderer.java
MessageRenderer.validateSTG
protected void validateSTG() { """ Validates the local STGroup @throws IllegalArgumentException if the local STGroup was null or not valid """ if(this.stg==null){ throw new IllegalArgumentException("stg is null"); } STGroupValidator stgv = new STGroupValidator(this.stg, MessageRenderer.STG_CHUN...
java
protected void validateSTG(){ if(this.stg==null){ throw new IllegalArgumentException("stg is null"); } STGroupValidator stgv = new STGroupValidator(this.stg, MessageRenderer.STG_CHUNKS); if(stgv.getValidationErrors().hasErrors()){ throw new IllegalArgumentException(stgv.getValidationErrors().rende...
[ "protected", "void", "validateSTG", "(", ")", "{", "if", "(", "this", ".", "stg", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"stg is null\"", ")", ";", "}", "STGroupValidator", "stgv", "=", "new", "STGroupValidator", "(", "thi...
Validates the local STGroup @throws IllegalArgumentException if the local STGroup was null or not valid
[ "Validates", "the", "local", "STGroup" ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageRenderer.java#L111-L120
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/external/msnumpress/MSNumpress.java
MSNumpress.decodePic
public static int decodePic( byte[] data, int dataSize, double[] result ) { """ Decodes data encoded by encodePic <p> result vector guaranteed to be shorter of equal to |data| * 2 <p> Note that this method may throw a ArrayIndexOutOfBoundsException if it deems the input data to be corr...
java
public static int decodePic( byte[] data, int dataSize, double[] result ) { int ri = 0; long count; IntDecoder dec = new IntDecoder(data, 0); while (dec.pos < dataSize) { if (dec.pos == (dataSize - 1) && dec.half) { if ((data[dec.pos] & 0xf) != 0x8) { ...
[ "public", "static", "int", "decodePic", "(", "byte", "[", "]", "data", ",", "int", "dataSize", ",", "double", "[", "]", "result", ")", "{", "int", "ri", "=", "0", ";", "long", "count", ";", "IntDecoder", "dec", "=", "new", "IntDecoder", "(", "data", ...
Decodes data encoded by encodePic <p> result vector guaranteed to be shorter of equal to |data| * 2 <p> Note that this method may throw a ArrayIndexOutOfBoundsException if it deems the input data to be corrupt, i.e. that the last encoded int does not use the last byte in the data. In addition the last encoded int need ...
[ "Decodes", "data", "encoded", "by", "encodePic", "<p", ">", "result", "vector", "guaranteed", "to", "be", "shorter", "of", "equal", "to", "|data|", "*", "2", "<p", ">", "Note", "that", "this", "method", "may", "throw", "a", "ArrayIndexOutOfBoundsException", ...
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/external/msnumpress/MSNumpress.java#L413-L433
tvesalainen/util
util/src/main/java/org/vesalainen/math/BezierCurve.java
BezierCurve.operator
public ParameterizedOperator operator(double... controlPoints) { """ Creates Bezier function for fixed control points. Note that it is not same if you pass an array or separate parameters. Array is not copied, so if you modify it it will make change. If you want to have function with immutable control points, u...
java
public ParameterizedOperator operator(double... controlPoints) { if (controlPoints.length != 2*length) { throw new IllegalArgumentException("control-points length not "+length); } return operator(controlPoints, 0); }
[ "public", "ParameterizedOperator", "operator", "(", "double", "...", "controlPoints", ")", "{", "if", "(", "controlPoints", ".", "length", "!=", "2", "*", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"control-points length not \"", "+", "...
Creates Bezier function for fixed control points. Note that it is not same if you pass an array or separate parameters. Array is not copied, so if you modify it it will make change. If you want to have function with immutable control points, use separate parameters or copy the array. @param controlPoints @return
[ "Creates", "Bezier", "function", "for", "fixed", "control", "points", ".", "Note", "that", "it", "is", "not", "same", "if", "you", "pass", "an", "array", "or", "separate", "parameters", ".", "Array", "is", "not", "copied", "so", "if", "you", "modify", "i...
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/BezierCurve.java#L88-L95
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java
JMElasticsearchIndex.sendDataAsync
public ActionFuture<IndexResponse> sendDataAsync( Map<String, ?> source, String index, String type, String id) { """ Send data async action future. @param source the source @param index the index @param type the type @param id the id @return the action future """ return indexQ...
java
public ActionFuture<IndexResponse> sendDataAsync( Map<String, ?> source, String index, String type, String id) { return indexQueryAsync(buildIndexRequest(source, index, type, id)); }
[ "public", "ActionFuture", "<", "IndexResponse", ">", "sendDataAsync", "(", "Map", "<", "String", ",", "?", ">", "source", ",", "String", "index", ",", "String", "type", ",", "String", "id", ")", "{", "return", "indexQueryAsync", "(", "buildIndexRequest", "("...
Send data async action future. @param source the source @param index the index @param type the type @param id the id @return the action future
[ "Send", "data", "async", "action", "future", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L291-L294
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/discrete/Combinatorics.java
Combinatorics.combinationsStream
public static <T> Stream<Set<T>> combinationsStream(Set<T> elements, int subsetSize) { """ Returns all the possible combinations of the set in a stream. Heavily Modified code: http://codereview.stackexchange.com/questions/26854/recursive-method-to-return-a-set-of-all-combinations @param elements @param sub...
java
public static <T> Stream<Set<T>> combinationsStream(Set<T> elements, int subsetSize) { if (subsetSize == 0) { return Stream.of(new HashSet<>()); } else if (subsetSize <= elements.size()) { Set<T> remainingElements = elements; Iterator<T> it = remainingElement...
[ "public", "static", "<", "T", ">", "Stream", "<", "Set", "<", "T", ">", ">", "combinationsStream", "(", "Set", "<", "T", ">", "elements", ",", "int", "subsetSize", ")", "{", "if", "(", "subsetSize", "==", "0", ")", "{", "return", "Stream", ".", "of...
Returns all the possible combinations of the set in a stream. Heavily Modified code: http://codereview.stackexchange.com/questions/26854/recursive-method-to-return-a-set-of-all-combinations @param elements @param subsetSize @param <T> @return
[ "Returns", "all", "the", "possible", "combinations", "of", "the", "set", "in", "a", "stream", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/discrete/Combinatorics.java#L84-L107
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/traceinfo/ejbcontainer/TEEJBInvocationInfo.java
TEEJBInvocationInfo.tracePreInvokeEnds
public static void tracePreInvokeEnds(EJSDeployedSupport s, EJSWrapperBase wrapper) { """ This is called by the EJB container server code to write a EJB method call preinvoke ends record to the trace log, if enabled. """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { ...
java
public static void tracePreInvokeEnds(EJSDeployedSupport s, EJSWrapperBase wrapper) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { StringBuffer sbuf = new StringBuffer(); sbuf .append(MthdPreInvokeExit_Type_Str).append(DataDe...
[ "public", "static", "void", "tracePreInvokeEnds", "(", "EJSDeployedSupport", "s", ",", "EJSWrapperBase", "wrapper", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "StringBuffer"...
This is called by the EJB container server code to write a EJB method call preinvoke ends record to the trace log, if enabled.
[ "This", "is", "called", "by", "the", "EJB", "container", "server", "code", "to", "write", "a", "EJB", "method", "call", "preinvoke", "ends", "record", "to", "the", "trace", "log", "if", "enabled", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/traceinfo/ejbcontainer/TEEJBInvocationInfo.java#L51-L65
alkacon/opencms-core
src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java
CmsNewResourceTypeDialog.setModule
protected void setModule(String moduleName, CmsBasicDialog dialog) { """ Sets the module name.<p> @param moduleName to be set @param dialog dialog """ Window window = CmsVaadinUtils.getWindow(dialog); window.setContent(this); m_module = OpenCms.getModuleManager().getModule(moduleNa...
java
protected void setModule(String moduleName, CmsBasicDialog dialog) { Window window = CmsVaadinUtils.getWindow(dialog); window.setContent(this); m_module = OpenCms.getModuleManager().getModule(moduleName).clone(); CmsResourceInfo resInfo = new CmsResourceInfo( m_module.getNam...
[ "protected", "void", "setModule", "(", "String", "moduleName", ",", "CmsBasicDialog", "dialog", ")", "{", "Window", "window", "=", "CmsVaadinUtils", ".", "getWindow", "(", "dialog", ")", ";", "window", ".", "setContent", "(", "this", ")", ";", "m_module", "=...
Sets the module name.<p> @param moduleName to be set @param dialog dialog
[ "Sets", "the", "module", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java#L424-L435
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.addUserToGroup
public void addUserToGroup(String username, String groupname) throws CmsException { """ Adds a user to a group.<p> @param username the name of the user that is to be added to the group @param groupname the name of the group @throws CmsException if something goes wrong """ m_securityManager.addU...
java
public void addUserToGroup(String username, String groupname) throws CmsException { m_securityManager.addUserToGroup(m_context, username, groupname, false); }
[ "public", "void", "addUserToGroup", "(", "String", "username", ",", "String", "groupname", ")", "throws", "CmsException", "{", "m_securityManager", ".", "addUserToGroup", "(", "m_context", ",", "username", ",", "groupname", ",", "false", ")", ";", "}" ]
Adds a user to a group.<p> @param username the name of the user that is to be added to the group @param groupname the name of the group @throws CmsException if something goes wrong
[ "Adds", "a", "user", "to", "a", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L174-L177
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.addArgument
public void addArgument(Setter setter, Argument a) { """ Programmatically defines an argument (instead of reading it from annotations as normal). @param setter the setter for the type @param a the Argument @throws NullPointerException if {@code setter} or {@code a} is {@code null}. """ checkNonNul...
java
public void addArgument(Setter setter, Argument a) { checkNonNull(setter, "Setter"); checkNonNull(a, "Argument"); OptionHandler h = createOptionHandler(new OptionDef(a,setter.isMultiValued()),setter); int index = a.index(); // make sure the argument will fit in the list w...
[ "public", "void", "addArgument", "(", "Setter", "setter", ",", "Argument", "a", ")", "{", "checkNonNull", "(", "setter", ",", "\"Setter\"", ")", ";", "checkNonNull", "(", "a", ",", "\"Argument\"", ")", ";", "OptionHandler", "h", "=", "createOptionHandler", "...
Programmatically defines an argument (instead of reading it from annotations as normal). @param setter the setter for the type @param a the Argument @throws NullPointerException if {@code setter} or {@code a} is {@code null}.
[ "Programmatically", "defines", "an", "argument", "(", "instead", "of", "reading", "it", "from", "annotations", "as", "normal", ")", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L114-L128
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRaySphere
public static boolean intersectRaySphere(Rayd ray, Spheref sphere, Vector2d result) { """ Test whether the given ray intersects the given sphere, and store the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> for both points (near and far) of intersections into the given <code>...
java
public static boolean intersectRaySphere(Rayd ray, Spheref sphere, Vector2d result) { return intersectRaySphere(ray.oX, ray.oY, ray.oZ, ray.dX, ray.dY, ray.dZ, sphere.x, sphere.y, sphere.z, sphere.r*sphere.r, result); }
[ "public", "static", "boolean", "intersectRaySphere", "(", "Rayd", "ray", ",", "Spheref", "sphere", ",", "Vector2d", "result", ")", "{", "return", "intersectRaySphere", "(", "ray", ".", "oX", ",", "ray", ".", "oY", ",", "ray", ".", "oZ", ",", "ray", ".", ...
Test whether the given ray intersects the given sphere, and store the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> for both points (near and far) of intersections into the given <code>result</code> vector. <p> This method returns <code>true</code> for a ray whose origin lies insid...
[ "Test", "whether", "the", "given", "ray", "intersects", "the", "given", "sphere", "and", "store", "the", "values", "of", "the", "parameter", "<i", ">", "t<", "/", "i", ">", "in", "the", "ray", "equation", "<i", ">", "p", "(", "t", ")", "=", "origin",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L2134-L2136
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newIllegalTypeException
public static IllegalTypeException newIllegalTypeException(String message, Object... args) { """ Constructs and initializes a new {@link IllegalTypeException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IllegalTy...
java
public static IllegalTypeException newIllegalTypeException(String message, Object... args) { return newIllegalTypeException(null, message, args); }
[ "public", "static", "IllegalTypeException", "newIllegalTypeException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newIllegalTypeException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link IllegalTypeException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IllegalTypeException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IllegalTypeException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L383-L385
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/WatchManager.java
WatchManager.dumpWatches
public synchronized void dumpWatches(PrintWriter pwriter, boolean byPath) { """ String representation of watches. Warning, may be large! @param byPath iff true output watches by paths, otw output watches by connection @return string representation of watches """ if (byPath) { for (Entry<...
java
public synchronized void dumpWatches(PrintWriter pwriter, boolean byPath) { if (byPath) { for (Entry<String, HashSet<Watcher>> e : watchTable.entrySet()) { pwriter.println(e.getKey()); for (Watcher w : e.getValue()) { pwriter.print("\t0x"); ...
[ "public", "synchronized", "void", "dumpWatches", "(", "PrintWriter", "pwriter", ",", "boolean", "byPath", ")", "{", "if", "(", "byPath", ")", "{", "for", "(", "Entry", "<", "String", ",", "HashSet", "<", "Watcher", ">", ">", "e", ":", "watchTable", ".", ...
String representation of watches. Warning, may be large! @param byPath iff true output watches by paths, otw output watches by connection @return string representation of watches
[ "String", "representation", "of", "watches", ".", "Warning", "may", "be", "large!" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/WatchManager.java#L148-L168
ag-gipp/MathMLTools
mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/distances/Distances.java
Distances.computeAbsoluteDistance
public static double computeAbsoluteDistance(Map<String, Double> h1, Map<String, Double> h2) { """ compares two histograms and returns the accumulated number of differences (absolute) @param h1 @param h2 @return """ double distance = 0; final Set<String> keySet = new HashSet(); ke...
java
public static double computeAbsoluteDistance(Map<String, Double> h1, Map<String, Double> h2) { double distance = 0; final Set<String> keySet = new HashSet(); keySet.addAll(h1.keySet()); keySet.addAll(h2.keySet()); for (String key : keySet) { double v1 = 0.0; ...
[ "public", "static", "double", "computeAbsoluteDistance", "(", "Map", "<", "String", ",", "Double", ">", "h1", ",", "Map", "<", "String", ",", "Double", ">", "h2", ")", "{", "double", "distance", "=", "0", ";", "final", "Set", "<", "String", ">", "keySe...
compares two histograms and returns the accumulated number of differences (absolute) @param h1 @param h2 @return
[ "compares", "two", "histograms", "and", "returns", "the", "accumulated", "number", "of", "differences", "(", "absolute", ")" ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/distances/Distances.java#L68-L89
ow2-chameleon/fuchsia
core/src/main/java/org/ow2/chameleon/fuchsia/core/FuchsiaUtils.java
FuchsiaUtils.getExportedPackage
private static BundleCapability getExportedPackage(BundleContext context, String packageName) { """ Return the BundleCapability of a bundle exporting the package packageName. @param context The BundleContext @param packageName The package name @return the BundleCapability of a bundle exporting the package...
java
private static BundleCapability getExportedPackage(BundleContext context, String packageName) { List<BundleCapability> packages = new ArrayList<BundleCapability>(); for (Bundle bundle : context.getBundles()) { BundleRevision bundleRevision = bundle.adapt(BundleRevision.class); fo...
[ "private", "static", "BundleCapability", "getExportedPackage", "(", "BundleContext", "context", ",", "String", "packageName", ")", "{", "List", "<", "BundleCapability", ">", "packages", "=", "new", "ArrayList", "<", "BundleCapability", ">", "(", ")", ";", "for", ...
Return the BundleCapability of a bundle exporting the package packageName. @param context The BundleContext @param packageName The package name @return the BundleCapability of a bundle exporting the package packageName
[ "Return", "the", "BundleCapability", "of", "a", "bundle", "exporting", "the", "package", "packageName", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/core/src/main/java/org/ow2/chameleon/fuchsia/core/FuchsiaUtils.java#L83-L106
grpc/grpc-java
api/src/main/java/io/grpc/Metadata.java
Metadata.put
public <T> void put(Key<T> key, T value) { """ Adds the {@code key, value} pair. If {@code key} already has values, {@code value} is added to the end. Duplicate values for the same key are permitted. @throws NullPointerException if key or value is null """ Preconditions.checkNotNull(key, "key"); Pr...
java
public <T> void put(Key<T> key, T value) { Preconditions.checkNotNull(key, "key"); Preconditions.checkNotNull(value, "value"); maybeExpand(); name(size, key.asciiName()); value(size, key.toBytes(value)); size++; }
[ "public", "<", "T", ">", "void", "put", "(", "Key", "<", "T", ">", "key", ",", "T", "value", ")", "{", "Preconditions", ".", "checkNotNull", "(", "key", ",", "\"key\"", ")", ";", "Preconditions", ".", "checkNotNull", "(", "value", ",", "\"value\"", "...
Adds the {@code key, value} pair. If {@code key} already has values, {@code value} is added to the end. Duplicate values for the same key are permitted. @throws NullPointerException if key or value is null
[ "Adds", "the", "{", "@code", "key", "value", "}", "pair", ".", "If", "{", "@code", "key", "}", "already", "has", "values", "{", "@code", "value", "}", "is", "added", "to", "the", "end", ".", "Duplicate", "values", "for", "the", "same", "key", "are", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/Metadata.java#L286-L293
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createHTTPResponse
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent) { """ This function creates and returns the HTTP response object. @param statusCode The HTTP response status code @param responseContent The response content as string @return The HTTP response object """ //cre...
java
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent) { //create HTTP response HTTPResponse httpResponse=new HTTPResponse(); httpResponse.setStatusCode(statusCode); httpResponse.setContent(responseContent); return httpResponse; }
[ "protected", "HTTPResponse", "createHTTPResponse", "(", "int", "statusCode", ",", "String", "responseContent", ")", "{", "//create HTTP response", "HTTPResponse", "httpResponse", "=", "new", "HTTPResponse", "(", ")", ";", "httpResponse", ".", "setStatusCode", "(", "st...
This function creates and returns the HTTP response object. @param statusCode The HTTP response status code @param responseContent The response content as string @return The HTTP response object
[ "This", "function", "creates", "and", "returns", "the", "HTTP", "response", "object", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L109-L117
BioPAX/Paxtools
gsea-converter/src/main/java/org/biopax/paxtools/io/gsea/GSEAConverter.java
GSEAConverter.writeToGSEA
public void writeToGSEA(final Model model, OutputStream out) throws IOException { """ Converts model to GSEA (GMT) and writes to out. See class declaration for more information. @param model Model @param out output stream to write the result to @throws IOException when there's an output stream error """ ...
java
public void writeToGSEA(final Model model, OutputStream out) throws IOException { Collection<GMTEntry> entries = convert(model); if (entries.size() > 0) { Writer writer = new OutputStreamWriter(out); for (GMTEntry entry : entries) { if ((minNumOfGenesPerEntry <= 1 && !entry.identifiers().isEmpty()) ...
[ "public", "void", "writeToGSEA", "(", "final", "Model", "model", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "Collection", "<", "GMTEntry", ">", "entries", "=", "convert", "(", "model", ")", ";", "if", "(", "entries", ".", "size", "(", ...
Converts model to GSEA (GMT) and writes to out. See class declaration for more information. @param model Model @param out output stream to write the result to @throws IOException when there's an output stream error
[ "Converts", "model", "to", "GSEA", "(", "GMT", ")", "and", "writes", "to", "out", ".", "See", "class", "declaration", "for", "more", "information", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/gsea-converter/src/main/java/org/biopax/paxtools/io/gsea/GSEAConverter.java#L171-L186
tminglei/form-binder-java
src/main/java/com/github/tminglei/bind/Processors.java
Processors.changePrefix
public static PreProcessor changePrefix(String from, String to) { """ change data key prefix from one to other @param from from prefix @param to to prefix @return new created pre-processor """ return mkPreProcessorWithMeta((prefix, data, options) -> { logger.debug("changing prefix at '{}...
java
public static PreProcessor changePrefix(String from, String to) { return mkPreProcessorWithMeta((prefix, data, options) -> { logger.debug("changing prefix at '{}' from '{}' to '{}'", prefix, from, to); return data.entrySet().stream() .map(e -> { ...
[ "public", "static", "PreProcessor", "changePrefix", "(", "String", "from", ",", "String", "to", ")", "{", "return", "mkPreProcessorWithMeta", "(", "(", "prefix", ",", "data", ",", "options", ")", "->", "{", "logger", ".", "debug", "(", "\"changing prefix at '{...
change data key prefix from one to other @param from from prefix @param to to prefix @return new created pre-processor
[ "change", "data", "key", "prefix", "from", "one", "to", "other" ]
train
https://github.com/tminglei/form-binder-java/blob/4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab/src/main/java/com/github/tminglei/bind/Processors.java#L177-L202
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java
AbstractJsonProvider.setProperty
@SuppressWarnings("unchecked") public void setProperty(Object obj, Object key, Object value) { """ Sets a value in an object @param obj an object @param key a String key @param value the value to set """ if (isMap(obj)) ((Map) obj).put(key.toString(), value); else { ...
java
@SuppressWarnings("unchecked") public void setProperty(Object obj, Object key, Object value) { if (isMap(obj)) ((Map) obj).put(key.toString(), value); else { throw new JsonPathException("setProperty operation cannot be used with " + obj!=null?obj.getClass().getName():"null");...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setProperty", "(", "Object", "obj", ",", "Object", "key", ",", "Object", "value", ")", "{", "if", "(", "isMap", "(", "obj", ")", ")", "(", "(", "Map", ")", "obj", ")", ".", "put",...
Sets a value in an object @param obj an object @param key a String key @param value the value to set
[ "Sets", "a", "value", "in", "an", "object" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java#L88-L95
dmfs/http-client-interfaces
src/org/dmfs/httpclientinterfaces/HttpStatus.java
HttpStatus.statusLine
public String statusLine(int httpVersionMajor, int httpVersionMinor) { """ Returns a status line in the form: <pre> HTTP/VersionMajor.VersionMinor SP Status-Code SP Reason-Phrase </pre> @param httpVersionMajor The major version number, usually <code>1</code> @param httpVersionMinor The minor version num...
java
public String statusLine(int httpVersionMajor, int httpVersionMinor) { return String.format("HTTP/%s.%s %d %s", httpVersionMajor, httpVersionMinor, statusCode, reasonPhrase); }
[ "public", "String", "statusLine", "(", "int", "httpVersionMajor", ",", "int", "httpVersionMinor", ")", "{", "return", "String", ".", "format", "(", "\"HTTP/%s.%s %d %s\"", ",", "httpVersionMajor", ",", "httpVersionMinor", ",", "statusCode", ",", "reasonPhrase", ")",...
Returns a status line in the form: <pre> HTTP/VersionMajor.VersionMinor SP Status-Code SP Reason-Phrase </pre> @param httpVersionMajor The major version number, usually <code>1</code> @param httpVersionMinor The minor version number, usually <code>1</code> @return
[ "Returns", "a", "status", "line", "in", "the", "form", ":" ]
train
https://github.com/dmfs/http-client-interfaces/blob/10896c71270ccaf32ac4ed5d706dfa0001fd3862/src/org/dmfs/httpclientinterfaces/HttpStatus.java#L459-L462
stevespringett/Alpine
example/src/main/java/com/example/resources/v1/LoginResource.java
LoginResource.validateCredentials
@POST @Produces(MediaType.TEXT_PLAIN) @ApiOperation( value = "Assert login credentials", notes = "Upon a successful login, a JWT will be returned in the response. This functionality requires authentication to be enabled.", response = String.class ) @ApiResponses(value...
java
@POST @Produces(MediaType.TEXT_PLAIN) @ApiOperation( value = "Assert login credentials", notes = "Upon a successful login, a JWT will be returned in the response. This functionality requires authentication to be enabled.", response = String.class ) @ApiResponses(value...
[ "@", "POST", "@", "Produces", "(", "MediaType", ".", "TEXT_PLAIN", ")", "@", "ApiOperation", "(", "value", "=", "\"Assert login credentials\"", ",", "notes", "=", "\"Upon a successful login, a JWT will be returned in the response. This functionality requires authentication to be ...
Processes login requests. @param username the asserted username @param password the asserted password @return a Response
[ "Processes", "login", "requests", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/example/src/main/java/com/example/resources/v1/LoginResource.java#L56-L87
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/lazy/LazyTreeReader.java
LazyTreeReader.seek
protected void seek(int rowIndexEntry, boolean backwards) throws IOException { """ Adjust all streams to the beginning of the row index entry specified, backwards means that a previous value is being read and forces the index entry to be restarted, otherwise, has no effect if we're already in the current index e...
java
protected void seek(int rowIndexEntry, boolean backwards) throws IOException { if (backwards || rowIndexEntry != computeRowIndexEntry(previousRow)) { // initialize the previousPositionProvider previousRowIndexEntry = rowIndexEntry; // if the present stream exists and we are seeking backwards or to...
[ "protected", "void", "seek", "(", "int", "rowIndexEntry", ",", "boolean", "backwards", ")", "throws", "IOException", "{", "if", "(", "backwards", "||", "rowIndexEntry", "!=", "computeRowIndexEntry", "(", "previousRow", ")", ")", "{", "// initialize the previousPosit...
Adjust all streams to the beginning of the row index entry specified, backwards means that a previous value is being read and forces the index entry to be restarted, otherwise, has no effect if we're already in the current index entry @param rowIndexEntry @param backwards @throws IOException
[ "Adjust", "all", "streams", "to", "the", "beginning", "of", "the", "row", "index", "entry", "specified", "backwards", "means", "that", "a", "previous", "value", "is", "being", "read", "and", "forces", "the", "index", "entry", "to", "be", "restarted", "otherw...
train
https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/lazy/LazyTreeReader.java#L300-L315
craterdog/java-security-framework
java-secure-messaging-api/src/main/java/craterdog/security/MessageCryptex.java
MessageCryptex.encryptStream
public final void encryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException { """ This method encrypts a byte stream using a shared key. @param sharedKey The shared key used for the encryption. @param input The byte stream to be encrypted. @param output The encrypted output...
java
public final void encryptStream(SecretKey sharedKey, InputStream input, OutputStream output) throws IOException { logger.entry(); CipherOutputStream cipherOutput = null; byte[] buffer = new byte[2048]; try { logger.debug("Creating a special output stream to do the work.....
[ "public", "final", "void", "encryptStream", "(", "SecretKey", "sharedKey", ",", "InputStream", "input", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "logger", ".", "entry", "(", ")", ";", "CipherOutputStream", "cipherOutput", "=", "null", ";...
This method encrypts a byte stream using a shared key. @param sharedKey The shared key used for the encryption. @param input The byte stream to be encrypted. @param output The encrypted output stream. @throws java.io.IOException Unable to encrypt the stream.
[ "This", "method", "encrypts", "a", "byte", "stream", "using", "a", "shared", "key", "." ]
train
https://github.com/craterdog/java-security-framework/blob/a5634c19812d473b608bc11060f5cbb4b4b0b5da/java-secure-messaging-api/src/main/java/craterdog/security/MessageCryptex.java#L196-L218
akberc/ceylon-maven-plugin
src/main/java/com/dgwave/car/maven/CeylonSdkCheck.java
CeylonSdkCheck.findSdkHome
File findSdkHome(final String path) { """ Find Ceylon SDK home in a folder, in the form of 'ceylon-1.x.x'. @param path Folder path to search in @return File folder whose name is alphabetically highest, or null if not found. """ File dotCeylon = new File(path); // or some other directory ...
java
File findSdkHome(final String path) { File dotCeylon = new File(path); // or some other directory File[] homes = null; if (!dotCeylon.exists()) { return null; } else { homes = dotCeylon.listFiles(new FilenameFilter() { @O...
[ "File", "findSdkHome", "(", "final", "String", "path", ")", "{", "File", "dotCeylon", "=", "new", "File", "(", "path", ")", ";", "// or some other directory\r", "File", "[", "]", "homes", "=", "null", ";", "if", "(", "!", "dotCeylon", ".", "exists", "(",...
Find Ceylon SDK home in a folder, in the form of 'ceylon-1.x.x'. @param path Folder path to search in @return File folder whose name is alphabetically highest, or null if not found.
[ "Find", "Ceylon", "SDK", "home", "in", "a", "folder", "in", "the", "form", "of", "ceylon", "-", "1", ".", "x", ".", "x", "." ]
train
https://github.com/akberc/ceylon-maven-plugin/blob/b7f6c4a2b24f2fa237350c9e715f4193e83415ef/src/main/java/com/dgwave/car/maven/CeylonSdkCheck.java#L93-L124
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newIllegalStateException
public static IllegalStateException newIllegalStateException(String message, Object... args) { """ Constructs and initializes a new {@link IllegalStateException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link Illega...
java
public static IllegalStateException newIllegalStateException(String message, Object... args) { return newIllegalStateException(null, message, args); }
[ "public", "static", "IllegalStateException", "newIllegalStateException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newIllegalStateException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link IllegalStateException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IllegalStateException exception}. @param args {@link Object[] arguments} used to replace format placeholders in t...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IllegalStateException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L76-L78
dyu/protostuff-1.0.x
protostuff-me/src/main/java/com/dyuproject/protostuff/me/ProtostuffIOUtil.java
ProtostuffIOUtil.mergeDelimitedFrom
public static int mergeDelimitedFrom(InputStream in, Object message, Schema schema) throws IOException { """ Merges the {@code message} (delimited) from the {@link InputStream} using the given {@code schema}. @return the size of the message """ return IOUtil.mergeDelimitedFrom(in, message, s...
java
public static int mergeDelimitedFrom(InputStream in, Object message, Schema schema) throws IOException { return IOUtil.mergeDelimitedFrom(in, message, schema, true); }
[ "public", "static", "int", "mergeDelimitedFrom", "(", "InputStream", "in", ",", "Object", "message", ",", "Schema", "schema", ")", "throws", "IOException", "{", "return", "IOUtil", ".", "mergeDelimitedFrom", "(", "in", ",", "message", ",", "schema", ",", "true...
Merges the {@code message} (delimited) from the {@link InputStream} using the given {@code schema}. @return the size of the message
[ "Merges", "the", "{", "@code", "message", "}", "(", "delimited", ")", "from", "the", "{", "@link", "InputStream", "}", "using", "the", "given", "{", "@code", "schema", "}", "." ]
train
https://github.com/dyu/protostuff-1.0.x/blob/d7c964ec20da3fe44699d86ee95c2677ddffde96/protostuff-me/src/main/java/com/dyuproject/protostuff/me/ProtostuffIOUtil.java#L134-L138
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java
Utils.performCopy
public static void performCopy(String filename, SarlConfiguration configuration) { """ Copy the given file. @param filename the file to copy. @param configuration the configuration. """ if (filename.isEmpty()) { return; } try { final DocFile fromfile = DocFile.createFileForInput(configuration,...
java
public static void performCopy(String filename, SarlConfiguration configuration) { if (filename.isEmpty()) { return; } try { final DocFile fromfile = DocFile.createFileForInput(configuration, filename); final DocPath path = DocPath.create(fromfile.getName()); final DocFile toFile = DocFile.createFile...
[ "public", "static", "void", "performCopy", "(", "String", "filename", ",", "SarlConfiguration", "configuration", ")", "{", "if", "(", "filename", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "try", "{", "final", "DocFile", "fromfile", "=", "DocF...
Copy the given file. @param filename the file to copy. @param configuration the configuration.
[ "Copy", "the", "given", "file", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L403-L425
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/DiagnosticSource.java
DiagnosticSource.getColumnNumber
public int getColumnNumber(int pos, boolean expandTabs) { """ Return the one-based column number associated with a given pos for the current source file. Zero is returned if no column exists for the given position. """ try { if (findLine(pos)) { int column = 0; ...
java
public int getColumnNumber(int pos, boolean expandTabs) { try { if (findLine(pos)) { int column = 0; for (int bp = lineStart; bp < pos; bp++) { if (bp >= bufLen) { return 0; } if (buf[...
[ "public", "int", "getColumnNumber", "(", "int", "pos", ",", "boolean", "expandTabs", ")", "{", "try", "{", "if", "(", "findLine", "(", "pos", ")", ")", "{", "int", "column", "=", "0", ";", "for", "(", "int", "bp", "=", "lineStart", ";", "bp", "<", ...
Return the one-based column number associated with a given pos for the current source file. Zero is returned if no column exists for the given position.
[ "Return", "the", "one", "-", "based", "column", "number", "associated", "with", "a", "given", "pos", "for", "the", "current", "source", "file", ".", "Zero", "is", "returned", "if", "no", "column", "exists", "for", "the", "given", "position", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/DiagnosticSource.java#L90-L110
mozilla/rhino
src/org/mozilla/javascript/SecurityController.java
SecurityController.callWithDomain
public Object callWithDomain(Object securityDomain, Context cx, final Callable callable, Scriptable scope, final Scriptable thisObj, final Object[] args) { """ Call {@link Callable#call(Context cx, Scriptable scope, Scriptable thisObj, Object[] ar...
java
public Object callWithDomain(Object securityDomain, Context cx, final Callable callable, Scriptable scope, final Scriptable thisObj, final Object[] args) { return execWithDomain(cx, scope, new Script() { @Override ...
[ "public", "Object", "callWithDomain", "(", "Object", "securityDomain", ",", "Context", "cx", ",", "final", "Callable", "callable", ",", "Scriptable", "scope", ",", "final", "Scriptable", "thisObj", ",", "final", "Object", "[", "]", "args", ")", "{", "return", ...
Call {@link Callable#call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)} of <i>callable</i> under restricted security domain where an action is allowed only if it is allowed according to the Java stack on the moment of the <i>execWithDomain</i> call and <i>securityDomain</i>. Any call to {@link #getD...
[ "Call", "{" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/SecurityController.java#L152-L165
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java
LoadBalancerFrontendIPConfigurationsInner.getAsync
public Observable<FrontendIPConfigurationInner> getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { """ Gets load balancer frontend IP configuration. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @p...
java
public Observable<FrontendIPConfigurationInner> getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName).map(new Func1<ServiceResponse<FrontendIPConfigurationInner>, Fron...
[ "public", "Observable", "<", "FrontendIPConfigurationInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "String", "frontendIPConfigurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",...
Gets load balancer frontend IP configuration. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param frontendIPConfigurationName The name of the frontend IP configuration. @throws IllegalArgumentException thrown if parameters fail the validation @return t...
[ "Gets", "load", "balancer", "frontend", "IP", "configuration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/LoadBalancerFrontendIPConfigurationsInner.java#L233-L240
TheHortonMachine/hortonmachine
apps/src/main/java/org/hortonmachine/nww/utils/selection/ScreenSelector.java
ScreenSelector.limitPointToWorldWindow
protected Point limitPointToWorldWindow( Point point ) { """ Limits the specified point's x and y coordinates to the World Window's viewport, and returns a new point with the limited coordinates. For example, if the World Window's viewport rectangle is x=0, y=0, width=100, height=100 and the point's coordinates...
java
protected Point limitPointToWorldWindow( Point point ) { Rectangle viewport = this.getWwd().getView().getViewport(); int x = point.x; if (x < viewport.x) x = viewport.x; if (x > viewport.x + viewport.width) x = viewport.x + viewport.width; int y = point....
[ "protected", "Point", "limitPointToWorldWindow", "(", "Point", "point", ")", "{", "Rectangle", "viewport", "=", "this", ".", "getWwd", "(", ")", ".", "getView", "(", ")", ".", "getViewport", "(", ")", ";", "int", "x", "=", "point", ".", "x", ";", "if",...
Limits the specified point's x and y coordinates to the World Window's viewport, and returns a new point with the limited coordinates. For example, if the World Window's viewport rectangle is x=0, y=0, width=100, height=100 and the point's coordinates are x=50, y=200 this returns a new point with coordinates x=50, y=10...
[ "Limits", "the", "specified", "point", "s", "x", "and", "y", "coordinates", "to", "the", "World", "Window", "s", "viewport", "and", "returns", "a", "new", "point", "with", "the", "limited", "coordinates", ".", "For", "example", "if", "the", "World", "Windo...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/apps/src/main/java/org/hortonmachine/nww/utils/selection/ScreenSelector.java#L591-L607
paypal/SeLion
server/src/main/java/com/paypal/selion/grid/FileDownloader.java
FileDownloader.checkForDownloads
static void checkForDownloads(List<String> artifactNames, boolean checkTimeStamp, boolean cleanup) { """ Check download.json and download files based on artifact names @param artifactNames the artifact names to download @param checkTimeStamp whether to check the last modified time stamp of the downlaod.json ...
java
static void checkForDownloads(List<String> artifactNames, boolean checkTimeStamp, boolean cleanup) { LOGGER.entering(); if (checkTimeStamp && (lastModifiedTime == DOWNLOAD_FILE.lastModified())) { return; } lastModifiedTime = DOWNLOAD_FILE.lastModified(); if (cleanup...
[ "static", "void", "checkForDownloads", "(", "List", "<", "String", ">", "artifactNames", ",", "boolean", "checkTimeStamp", ",", "boolean", "cleanup", ")", "{", "LOGGER", ".", "entering", "(", ")", ";", "if", "(", "checkTimeStamp", "&&", "(", "lastModifiedTime"...
Check download.json and download files based on artifact names @param artifactNames the artifact names to download @param checkTimeStamp whether to check the last modified time stamp of the downlaod.json file. Returns immediately on subsequent calls if <code>true</code> and last modified is unchanged. @param cleanup w...
[ "Check", "download", ".", "json", "and", "download", "files", "based", "on", "artifact", "names" ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/FileDownloader.java#L111-L134
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.deleteGroup
public void deleteGroup(CmsRequestContext context, CmsUUID groupId, CmsUUID replacementId) throws CmsException, CmsRoleViolationException, CmsSecurityException { """ Deletes a group, where all permissions, users and children of the group are transfered to a replacement group.<p> @param context the current ...
java
public void deleteGroup(CmsRequestContext context, CmsUUID groupId, CmsUUID replacementId) throws CmsException, CmsRoleViolationException, CmsSecurityException { CmsGroup group = readGroup(context, groupId); if (group.isRole()) { throw new CmsSecurityException(Messages.get().container(M...
[ "public", "void", "deleteGroup", "(", "CmsRequestContext", "context", ",", "CmsUUID", "groupId", ",", "CmsUUID", "replacementId", ")", "throws", "CmsException", ",", "CmsRoleViolationException", ",", "CmsSecurityException", "{", "CmsGroup", "group", "=", "readGroup", ...
Deletes a group, where all permissions, users and children of the group are transfered to a replacement group.<p> @param context the current request context @param groupId the id of the group to be deleted @param replacementId the id of the group to be transfered, can be <code>null</code> @throws CmsException if oper...
[ "Deletes", "a", "group", "where", "all", "permissions", "users", "and", "children", "of", "the", "group", "are", "transfered", "to", "a", "replacement", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L1304-L1326
facebookarchive/hadoop-20
src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java
UTF8ByteArrayUtils.readLine
@Deprecated public static int readLine(LineReader lineReader, Text out) throws IOException { """ Read a utf8 encoded line from a data input stream. @param lineReader LineReader to read the line from. @param out Text to read into @return number of bytes read @deprecated use {@link StreamKeyValUtil#readLin...
java
@Deprecated public static int readLine(LineReader lineReader, Text out) throws IOException { return StreamKeyValUtil.readLine(lineReader, out); }
[ "@", "Deprecated", "public", "static", "int", "readLine", "(", "LineReader", "lineReader", ",", "Text", "out", ")", "throws", "IOException", "{", "return", "StreamKeyValUtil", ".", "readLine", "(", "lineReader", ",", "out", ")", ";", "}" ]
Read a utf8 encoded line from a data input stream. @param lineReader LineReader to read the line from. @param out Text to read into @return number of bytes read @deprecated use {@link StreamKeyValUtil#readLine(LineReader, Text)} @throws IOException
[ "Read", "a", "utf8", "encoded", "line", "from", "a", "data", "input", "stream", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/streaming/src/java/org/apache/hadoop/streaming/UTF8ByteArrayUtils.java#L210-L214
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/MessageServices.java
MessageServices.sendInternalMessage
public boolean sendInternalMessage(String worker, final String messageId, String eventName, final String eventMessage, boolean checkAvailableThreads) throws JMSException { """ <p> Uses the injected mdwMessageProducer to send the message or defaults back to InternalEventDriver </p> @param worker @p...
java
public boolean sendInternalMessage(String worker, final String messageId, String eventName, final String eventMessage, boolean checkAvailableThreads) throws JMSException { // Spring Injection if (mdwMessageProducer != null) { mdwMessageProducer.sendMessage(eventMessage, messageId...
[ "public", "boolean", "sendInternalMessage", "(", "String", "worker", ",", "final", "String", "messageId", ",", "String", "eventName", ",", "final", "String", "eventMessage", ",", "boolean", "checkAvailableThreads", ")", "throws", "JMSException", "{", "// Spring Inject...
<p> Uses the injected mdwMessageProducer to send the message or defaults back to InternalEventDriver </p> @param worker @param messageId @param eventName @param eventMessage @param checkAvailableThreads @throws JMSException
[ "<p", ">", "Uses", "the", "injected", "mdwMessageProducer", "to", "send", "the", "message", "or", "defaults", "back", "to", "InternalEventDriver", "<", "/", "p", ">" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/MessageServices.java#L78-L101
Appendium/objectlabkit
datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java
CalendarKitCalculatorsFactory.getDateCalculator
public CalendarDateCalculator getDateCalculator(final String name, final String holidayHandlerType) { """ Create a new DateCalculator for a given name and type of handling. @param name calendar name (holidays set interested in). If there is set of holidays with that name, it will return a DateCalculator with ...
java
public CalendarDateCalculator getDateCalculator(final String name, final String holidayHandlerType) { final CalendarDateCalculator cal = new CalendarDateCalculator(); cal.setName(name); setHolidays(name, cal); if (holidayHandlerType != null) { cal.setHolidayHandler(getHo...
[ "public", "CalendarDateCalculator", "getDateCalculator", "(", "final", "String", "name", ",", "final", "String", "holidayHandlerType", ")", "{", "final", "CalendarDateCalculator", "cal", "=", "new", "CalendarDateCalculator", "(", ")", ";", "cal", ".", "setName", "("...
Create a new DateCalculator for a given name and type of handling. @param name calendar name (holidays set interested in). If there is set of holidays with that name, it will return a DateCalculator with an empty holiday set (will work on Weekend only). @param holidayHandlerType typically one of the value of HolidayHa...
[ "Create", "a", "new", "DateCalculator", "for", "a", "given", "name", "and", "type", "of", "handling", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-jdk/src/main/java/net/objectlab/kit/datecalc/jdk/CalendarKitCalculatorsFactory.java#L132-L140
jbossws/jbossws-cxf
modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
JBossWSInvoker.performInvocation
@Override protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray) throws Exception { """ This overrides org.apache.cxf.jaxws.AbstractInvoker in order for using the JBossWS integration logic to invoke the JBoss AS target bean. """ Endpo...
java
@Override protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray) throws Exception { Endpoint ep = exchange.get(Endpoint.class); final InvocationHandler invHandler = ep.getInvocationHandler(); final Invocation inv = createInvocati...
[ "@", "Override", "protected", "Object", "performInvocation", "(", "Exchange", "exchange", ",", "final", "Object", "serviceObject", ",", "Method", "m", ",", "Object", "[", "]", "paramArray", ")", "throws", "Exception", "{", "Endpoint", "ep", "=", "exchange", "....
This overrides org.apache.cxf.jaxws.AbstractInvoker in order for using the JBossWS integration logic to invoke the JBoss AS target bean.
[ "This", "overrides", "org", ".", "apache", ".", "cxf", ".", "jaxws", ".", "AbstractInvoker", "in", "order", "for", "using", "the", "JBossWS", "integration", "logic", "to", "invoke", "the", "JBoss", "AS", "target", "bean", "." ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java#L153-L178
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.getFirewallRule
public FirewallRuleInner getFirewallRule(String resourceGroupName, String accountName, String firewallRuleName) { """ Gets the specified Data Lake Store firewall rule. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param accountName The name of the Dat...
java
public FirewallRuleInner getFirewallRule(String resourceGroupName, String accountName, String firewallRuleName) { return getFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).toBlocking().single().body(); }
[ "public", "FirewallRuleInner", "getFirewallRule", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "firewallRuleName", ")", "{", "return", "getFirewallRuleWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "firewall...
Gets the specified Data Lake Store firewall rule. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param accountName The name of the Data Lake Store account from which to get the firewall rule. @param firewallRuleName The name of the firewall rule to retrieve. @...
[ "Gets", "the", "specified", "Data", "Lake", "Store", "firewall", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java#L243-L245
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByChecker.java
GuardedByChecker.buildMessage
private String buildMessage(GuardedByExpression guard, HeldLockSet locks) { """ Construct a diagnostic message, e.g.: <ul> <li>This access should be guarded by 'this', which is not currently held <li>This access should be guarded by 'this'; instead found 'mu' <li>This access should be guarded by 'this'; inst...
java
private String buildMessage(GuardedByExpression guard, HeldLockSet locks) { int heldLocks = locks.allLocks().size(); StringBuilder message = new StringBuilder(); Select enclosing = findOuterInstance(guard); if (enclosing != null && !enclosingInstance(guard)) { if (guard == enclosing) { mes...
[ "private", "String", "buildMessage", "(", "GuardedByExpression", "guard", ",", "HeldLockSet", "locks", ")", "{", "int", "heldLocks", "=", "locks", ".", "allLocks", "(", ")", ".", "size", "(", ")", ";", "StringBuilder", "message", "=", "new", "StringBuilder", ...
Construct a diagnostic message, e.g.: <ul> <li>This access should be guarded by 'this', which is not currently held <li>This access should be guarded by 'this'; instead found 'mu' <li>This access should be guarded by 'this'; instead found: 'mu1', 'mu2' </ul>
[ "Construct", "a", "diagnostic", "message", "e", ".", "g", ".", ":" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByChecker.java#L128-L164
google/closure-templates
java/src/com/google/template/soy/data/SanitizedContents.java
SanitizedContents.unsanitizedText
@Deprecated public static UnsanitizedString unsanitizedText(String text, @Nullable Dir dir) { """ Creates a SanitizedContent object of kind TEXT of a given direction (null if unknown). <p>This is useful when stubbing out a function that needs to create a SanitizedContent object. @deprecated Call {@link #un...
java
@Deprecated public static UnsanitizedString unsanitizedText(String text, @Nullable Dir dir) { return UnsanitizedString.create(text); }
[ "@", "Deprecated", "public", "static", "UnsanitizedString", "unsanitizedText", "(", "String", "text", ",", "@", "Nullable", "Dir", "dir", ")", "{", "return", "UnsanitizedString", ".", "create", "(", "text", ")", ";", "}" ]
Creates a SanitizedContent object of kind TEXT of a given direction (null if unknown). <p>This is useful when stubbing out a function that needs to create a SanitizedContent object. @deprecated Call {@link #unsanitizedText(String)} instead
[ "Creates", "a", "SanitizedContent", "object", "of", "kind", "TEXT", "of", "a", "given", "direction", "(", "null", "if", "unknown", ")", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/data/SanitizedContents.java#L84-L87
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/ArchUtils.java
ArchUtils.addProcessors
private static void addProcessors(final Processor processor, final String... keys) throws IllegalStateException { """ Adds the given {@link Processor} with the given keys to the map. @param keys The keys. @param processor The {@link Processor} to add. @throws IllegalStateException If the key already exists. ...
java
private static void addProcessors(final Processor processor, final String... keys) throws IllegalStateException { for (final String key : keys) { addProcessor(key, processor); } }
[ "private", "static", "void", "addProcessors", "(", "final", "Processor", "processor", ",", "final", "String", "...", "keys", ")", "throws", "IllegalStateException", "{", "for", "(", "final", "String", "key", ":", "keys", ")", "{", "addProcessor", "(", "key", ...
Adds the given {@link Processor} with the given keys to the map. @param keys The keys. @param processor The {@link Processor} to add. @throws IllegalStateException If the key already exists.
[ "Adds", "the", "given", "{", "@link", "Processor", "}", "with", "the", "given", "keys", "to", "the", "map", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/ArchUtils.java#L107-L111
VoltDB/voltdb
src/frontend/org/voltdb/utils/CatalogUtil.java
CatalogUtil.loadAndUpgradeCatalogFromJar
public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(byte[] catalogBytes, boolean isXDCR) throws IOException { """ Load a catalog from the jar bytes. @param catalogBytes @param isXDCR @return Pair containing updated InMemoryJarFile and upgraded version (or null if it wasn't upgrade...
java
public static Pair<InMemoryJarfile, String> loadAndUpgradeCatalogFromJar(byte[] catalogBytes, boolean isXDCR) throws IOException { // Throws IOException on load failure. InMemoryJarfile jarfile = loadInMemoryJarFile(catalogBytes); return loadAndUpgradeCatalogFromJar(jarfile, isXDCR)...
[ "public", "static", "Pair", "<", "InMemoryJarfile", ",", "String", ">", "loadAndUpgradeCatalogFromJar", "(", "byte", "[", "]", "catalogBytes", ",", "boolean", "isXDCR", ")", "throws", "IOException", "{", "// Throws IOException on load failure.", "InMemoryJarfile", "jarf...
Load a catalog from the jar bytes. @param catalogBytes @param isXDCR @return Pair containing updated InMemoryJarFile and upgraded version (or null if it wasn't upgraded) @throws IOException If the catalog cannot be loaded because it's incompatible, or if there is no version information in the catalog.
[ "Load", "a", "catalog", "from", "the", "jar", "bytes", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L254-L261
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/boosting/Bagging.java
Bagging.sampleWithReplacement
static public void sampleWithReplacement(int[] sampleCounts, int samples, Random rand) { """ Performs the sampling based on the number of data points, storing the counts in an array to be constructed from XXXX @param sampleCounts an array to keep count of how many times each data point was sampled. The array wi...
java
static public void sampleWithReplacement(int[] sampleCounts, int samples, Random rand) { Arrays.fill(sampleCounts, 0); for(int i = 0; i < samples; i++) sampleCounts[rand.nextInt(sampleCounts.length)]++; }
[ "static", "public", "void", "sampleWithReplacement", "(", "int", "[", "]", "sampleCounts", ",", "int", "samples", ",", "Random", "rand", ")", "{", "Arrays", ".", "fill", "(", "sampleCounts", ",", "0", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Performs the sampling based on the number of data points, storing the counts in an array to be constructed from XXXX @param sampleCounts an array to keep count of how many times each data point was sampled. The array will be filled with zeros before sampling starts @param samples the number of samples to take from the ...
[ "Performs", "the", "sampling", "based", "on", "the", "number", "of", "data", "points", "storing", "the", "counts", "in", "an", "array", "to", "be", "constructed", "from", "XXXX" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/boosting/Bagging.java#L369-L374
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java
CommonOps_DDF2.fill
public static void fill( DMatrix2 a , double v ) { """ <p> Sets every element in the vector to the specified value.<br> <br> a<sub>i</sub> = value <p> @param a A vector whose elements are about to be set. Modified. @param v The value each element will have. """ a.a1 = v; a.a2 = v; ...
java
public static void fill( DMatrix2 a , double v ) { a.a1 = v; a.a2 = v; }
[ "public", "static", "void", "fill", "(", "DMatrix2", "a", ",", "double", "v", ")", "{", "a", ".", "a1", "=", "v", ";", "a", ".", "a2", "=", "v", ";", "}" ]
<p> Sets every element in the vector to the specified value.<br> <br> a<sub>i</sub> = value <p> @param a A vector whose elements are about to be set. Modified. @param v The value each element will have.
[ "<p", ">", "Sets", "every", "element", "in", "the", "vector", "to", "the", "specified", "value", ".", "<br", ">", "<br", ">", "a<sub", ">", "i<", "/", "sub", ">", "=", "value", "<p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java#L1145-L1148
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java
CacheProxyUtil.validateConfiguredTypes
public static <K> void validateConfiguredTypes(CacheConfig cacheConfig, K key) throws ClassCastException { """ Validates that the configured key matches the provided key. @param cacheConfig Cache configuration. @param key the key to be validated with its type. @param <K> the type of key. @thr...
java
public static <K> void validateConfiguredTypes(CacheConfig cacheConfig, K key) throws ClassCastException { Class keyType = cacheConfig.getKeyType(); validateConfiguredKeyType(keyType, key); }
[ "public", "static", "<", "K", ">", "void", "validateConfiguredTypes", "(", "CacheConfig", "cacheConfig", ",", "K", "key", ")", "throws", "ClassCastException", "{", "Class", "keyType", "=", "cacheConfig", ".", "getKeyType", "(", ")", ";", "validateConfiguredKeyType...
Validates that the configured key matches the provided key. @param cacheConfig Cache configuration. @param key the key to be validated with its type. @param <K> the type of key. @throws ClassCastException if the provided key does not match with configured type.
[ "Validates", "that", "the", "configured", "key", "matches", "the", "provided", "key", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L164-L167
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractTreeNode.java
AbstractTreeNode.setParentNodeReference
boolean setParentNodeReference(N newParent, boolean fireEvent) { """ Set the reference to the parent node. @param newParent is the new parent. @param fireEvent indicates if the event must be fired or not. @return <code>true</code> if an event must be fired due to the action of this function, otherwise <code>...
java
boolean setParentNodeReference(N newParent, boolean fireEvent) { final N oldParent = getParentNode(); if (newParent == oldParent) { return false; } this.parent = (newParent == null) ? null : new WeakReference<>(newParent); if (!fireEvent) { return true; } firePropertyParentChanged(oldParent, newPare...
[ "boolean", "setParentNodeReference", "(", "N", "newParent", ",", "boolean", "fireEvent", ")", "{", "final", "N", "oldParent", "=", "getParentNode", "(", ")", ";", "if", "(", "newParent", "==", "oldParent", ")", "{", "return", "false", ";", "}", "this", "."...
Set the reference to the parent node. @param newParent is the new parent. @param fireEvent indicates if the event must be fired or not. @return <code>true</code> if an event must be fired due to the action of this function, otherwise <code>false</code>. @since 4.0
[ "Set", "the", "reference", "to", "the", "parent", "node", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractTreeNode.java#L127-L141
infinispan/infinispan
core/src/main/java/org/infinispan/util/concurrent/CompletableFutures.java
CompletableFutures.await
public static <T> T await(CompletableFuture<T> future) throws ExecutionException, InterruptedException { """ Wait for a long time until the {@link CompletableFuture} is completed. @param future the {@link CompletableFuture}. @param <T> the return type. @return the result value. @throws ExecutionException ...
java
public static <T> T await(CompletableFuture<T> future) throws ExecutionException, InterruptedException { try { return Objects.requireNonNull(future, "Completable Future must be non-null.").get(BIG_DELAY_NANOS, TimeUnit.NANOSECONDS); } catch (java.util.concurrent.TimeoutException e) { throw...
[ "public", "static", "<", "T", ">", "T", "await", "(", "CompletableFuture", "<", "T", ">", "future", ")", "throws", "ExecutionException", ",", "InterruptedException", "{", "try", "{", "return", "Objects", ".", "requireNonNull", "(", "future", ",", "\"Completabl...
Wait for a long time until the {@link CompletableFuture} is completed. @param future the {@link CompletableFuture}. @param <T> the return type. @return the result value. @throws ExecutionException if the {@link CompletableFuture} completed exceptionally. @throws InterruptedException if the current thread was inte...
[ "Wait", "for", "a", "long", "time", "until", "the", "{", "@link", "CompletableFuture", "}", "is", "completed", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/concurrent/CompletableFutures.java#L108-L114
aeshell/aesh
aesh/src/main/java/org/aesh/parser/ParsedLineIterator.java
ParsedLineIterator.pollParsedWord
public ParsedWord pollParsedWord() { """ Polls the next ParsedWord from the stack. @return next ParsedWord """ if(hasNextWord()) { //set correct next char if(parsedLine.words().size() > (word+1)) character = parsedLine.words().get(word+1).lineIndex(); ...
java
public ParsedWord pollParsedWord() { if(hasNextWord()) { //set correct next char if(parsedLine.words().size() > (word+1)) character = parsedLine.words().get(word+1).lineIndex(); else character = -1; return parsedLine.words().get(wor...
[ "public", "ParsedWord", "pollParsedWord", "(", ")", "{", "if", "(", "hasNextWord", "(", ")", ")", "{", "//set correct next char", "if", "(", "parsedLine", ".", "words", "(", ")", ".", "size", "(", ")", ">", "(", "word", "+", "1", ")", ")", "character",...
Polls the next ParsedWord from the stack. @return next ParsedWord
[ "Polls", "the", "next", "ParsedWord", "from", "the", "stack", "." ]
train
https://github.com/aeshell/aesh/blob/fd7d38d333c5dbf116a9778523a4d1df61f027a3/aesh/src/main/java/org/aesh/parser/ParsedLineIterator.java#L63-L74
spotify/apollo
apollo-api-impl/src/main/java/com/spotify/apollo/dispatch/EndpointInvocationHandler.java
EndpointInvocationHandler.handle
void handle(OngoingRequest ongoingRequest, RequestContext requestContext, Endpoint endpoint) { """ Fires off the request processing asynchronously - that is, this method is likely to return before the request processing finishes. """ try { endpoint.invoke(requestContext) .whenComplete((mes...
java
void handle(OngoingRequest ongoingRequest, RequestContext requestContext, Endpoint endpoint) { try { endpoint.invoke(requestContext) .whenComplete((message, throwable) -> { try { if (message != null) { ongoingRequest.reply(message); } else if (...
[ "void", "handle", "(", "OngoingRequest", "ongoingRequest", ",", "RequestContext", "requestContext", ",", "Endpoint", "endpoint", ")", "{", "try", "{", "endpoint", ".", "invoke", "(", "requestContext", ")", ".", "whenComplete", "(", "(", "message", ",", "throwabl...
Fires off the request processing asynchronously - that is, this method is likely to return before the request processing finishes.
[ "Fires", "off", "the", "request", "processing", "asynchronously", "-", "that", "is", "this", "method", "is", "likely", "to", "return", "before", "the", "request", "processing", "finishes", "." ]
train
https://github.com/spotify/apollo/blob/3aba09840538a2aff9cdac5be42cc114dd276c70/apollo-api-impl/src/main/java/com/spotify/apollo/dispatch/EndpointInvocationHandler.java#L54-L83
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/log/DULogEntry.java
DULogEntry.addDataUsage
public boolean addDataUsage(DataAttribute attribute, DataUsage usage) throws ParameterException, LockingException { """ Adds the given attribute to the list of attributes @param attribute The attribute to add. @param usage The data usage @throws ParameterException if the given attribute or usage is <code>nul...
java
public boolean addDataUsage(DataAttribute attribute, DataUsage usage) throws ParameterException, LockingException { Validate.notNull(attribute); if (isFieldLocked(EntryField.DATA)) { if (!dataUsage.containsKey(attribute)) { throw n...
[ "public", "boolean", "addDataUsage", "(", "DataAttribute", "attribute", ",", "DataUsage", "usage", ")", "throws", "ParameterException", ",", "LockingException", "{", "Validate", ".", "notNull", "(", "attribute", ")", ";", "if", "(", "isFieldLocked", "(", "EntryFie...
Adds the given attribute to the list of attributes @param attribute The attribute to add. @param usage The data usage @throws ParameterException if the given attribute or usage is <code>null</code>. @throws LockingException if the field INPUT_DATA is locked <br> and the attribute is not already contained in {@link #da...
[ "Adds", "the", "given", "attribute", "to", "the", "list", "of", "attributes" ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/log/DULogEntry.java#L154-L171
eyp/serfj
src/main/java/net/sf/serfj/UrlInspector.java
UrlInspector.getStandardAction
private String getStandardAction(String id, HttpMethod requestMethod) { """ Deduces the action invoked when there isn't action in the URL. The action is deduced by the HTTP_METHOD used. If method is GET, it also has in count the ID, because it depends on it to know if action is 'show' or 'index'.<br/> <br/> G...
java
private String getStandardAction(String id, HttpMethod requestMethod) { String action = null; if (requestMethod == HttpMethod.GET) { if (id == null) { action = INDEX_ACTION; } else { action = SHOW_ACTION; } } else if (requestMethod == HttpMethod.POST) { action = CREATE_ACTION; } else if (req...
[ "private", "String", "getStandardAction", "(", "String", "id", ",", "HttpMethod", "requestMethod", ")", "{", "String", "action", "=", "null", ";", "if", "(", "requestMethod", "==", "HttpMethod", ".", "GET", ")", "{", "if", "(", "id", "==", "null", ")", "...
Deduces the action invoked when there isn't action in the URL. The action is deduced by the HTTP_METHOD used. If method is GET, it also has in count the ID, because it depends on it to know if action is 'show' or 'index'.<br/> <br/> GET: with ID => show, without ID => index.<br/> POST: create.<br/> DELETE: delete.<br/>...
[ "Deduces", "the", "action", "invoked", "when", "there", "isn", "t", "action", "in", "the", "URL", ".", "The", "action", "is", "deduced", "by", "the", "HTTP_METHOD", "used", ".", "If", "method", "is", "GET", "it", "also", "has", "in", "count", "the", "I...
train
https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/UrlInspector.java#L166-L182
lucee/Lucee
core/src/main/java/lucee/runtime/osgi/OSGiUtil.java
OSGiUtil.installBundle
public static Bundle installBundle(BundleContext context, Resource bundle, boolean checkExistence) throws IOException, BundleException { """ only installs a bundle, if the bundle does not already exist, if the bundle exists the existing bundle is unloaded first. @param factory @param context @param bundle @...
java
public static Bundle installBundle(BundleContext context, Resource bundle, boolean checkExistence) throws IOException, BundleException { if (checkExistence) { BundleFile bf = new BundleFile(bundle); if (!bf.isBundle()) throw new BundleException(bundle + " is not a valid bundle!"); Bundle existing = loa...
[ "public", "static", "Bundle", "installBundle", "(", "BundleContext", "context", ",", "Resource", "bundle", ",", "boolean", "checkExistence", ")", "throws", "IOException", ",", "BundleException", "{", "if", "(", "checkExistence", ")", "{", "BundleFile", "bf", "=", ...
only installs a bundle, if the bundle does not already exist, if the bundle exists the existing bundle is unloaded first. @param factory @param context @param bundle @return @throws IOException @throws BundleException
[ "only", "installs", "a", "bundle", "if", "the", "bundle", "does", "not", "already", "exist", "if", "the", "bundle", "exists", "the", "existing", "bundle", "is", "unloaded", "first", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java#L103-L113
craftercms/commons
utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java
PGPUtils.getPublicKey
public static PGPPublicKey getPublicKey(InputStream content) throws Exception { """ Extracts the PGP public key from an encoded stream. @param content stream to extract the key @return key object @throws IOException if there is an error reading the stream @throws PGPException if the public key cannot be extrac...
java
public static PGPPublicKey getPublicKey(InputStream content) throws Exception { InputStream in = PGPUtil.getDecoderStream(content); PGPPublicKeyRingCollection keyRingCollection = new PGPPublicKeyRingCollection(in, new BcKeyFingerprintCalculator()); PGPPublicKey key = null; Iterator<PGPPu...
[ "public", "static", "PGPPublicKey", "getPublicKey", "(", "InputStream", "content", ")", "throws", "Exception", "{", "InputStream", "in", "=", "PGPUtil", ".", "getDecoderStream", "(", "content", ")", ";", "PGPPublicKeyRingCollection", "keyRingCollection", "=", "new", ...
Extracts the PGP public key from an encoded stream. @param content stream to extract the key @return key object @throws IOException if there is an error reading the stream @throws PGPException if the public key cannot be extracted
[ "Extracts", "the", "PGP", "public", "key", "from", "an", "encoded", "stream", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java#L134-L150
networknt/light-4j
utility/src/main/java/com/networknt/utility/StringUtils.java
StringUtils.countMatches
public static int countMatches(final CharSequence str, final CharSequence sub) { """ <p>Counts how many times the substring appears in the larger string.</p> <p>A {@code null} or empty ("") String input returns {@code 0}.</p> <pre> StringUtils.countMatches(null, *) = 0 StringUtils.countMatches("", *)...
java
public static int countMatches(final CharSequence str, final CharSequence sub) { if (isEmpty(str) || isEmpty(sub)) { return 0; } int count = 0; int idx = 0; while ((idx = CharSequenceUtils.indexOf(str, sub, idx)) != INDEX_NOT_FOUND) { count++; ...
[ "public", "static", "int", "countMatches", "(", "final", "CharSequence", "str", ",", "final", "CharSequence", "sub", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "sub", ")", ")", "{", "return", "0", ";", "}", "int", "count", ...
<p>Counts how many times the substring appears in the larger string.</p> <p>A {@code null} or empty ("") String input returns {@code 0}.</p> <pre> StringUtils.countMatches(null, *) = 0 StringUtils.countMatches("", *) = 0 StringUtils.countMatches("abba", null) = 0 StringUtils.countMatches("abba", "") ...
[ "<p", ">", "Counts", "how", "many", "times", "the", "substring", "appears", "in", "the", "larger", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/StringUtils.java#L605-L616
twitter/cloudhopper-commons
ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java
SslContextFactory.newSslEngine
public SSLEngine newSslEngine(String host,int port) { """ Get an SSLEngine from this context. Use this method to hint instead of the no-op for an internal session reuse strategy. Also, some cipher suites require remote hostname information. {@link SSLContext#createSSLEngine(String,int)} @param host The non-aut...
java
public SSLEngine newSslEngine(String host,int port) { SSLEngine sslEngine = sslConfig.isSessionCachingEnabled() ?sslContext.createSSLEngine(host, port) :sslContext.createSSLEngine(); customize(sslEngine); return sslEngine; }
[ "public", "SSLEngine", "newSslEngine", "(", "String", "host", ",", "int", "port", ")", "{", "SSLEngine", "sslEngine", "=", "sslConfig", ".", "isSessionCachingEnabled", "(", ")", "?", "sslContext", ".", "createSSLEngine", "(", "host", ",", "port", ")", ":", "...
Get an SSLEngine from this context. Use this method to hint instead of the no-op for an internal session reuse strategy. Also, some cipher suites require remote hostname information. {@link SSLContext#createSSLEngine(String,int)} @param host The non-authoritative name of the host @param port The non-authoritative port
[ "Get", "an", "SSLEngine", "from", "this", "context", ".", "Use", "this", "method", "to", "hint", "instead", "of", "the", "no", "-", "op", "for", "an", "internal", "session", "reuse", "strategy", ".", "Also", "some", "cipher", "suites", "require", "remote",...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java#L515-L522
Jasig/uPortal
uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java
AbstractDynamicSkinService.generateSkinCssFile
@Override public void generateSkinCssFile(DynamicSkinInstanceData data) { """ Creates the skin css file in a thread-safe manner that allows multiple different skin files to be created simultaneously to handle large tenant situations where all the custom CSS files were cleared away after a uPortal deploy. ...
java
@Override public void generateSkinCssFile(DynamicSkinInstanceData data) { final String cssInstanceKey = getCssInstanceKey(data); synchronized (cssInstanceKey) { if (instanceKeysForExistingCss.contains(cssInstanceKey)) { /* * Two or more threads needing th...
[ "@", "Override", "public", "void", "generateSkinCssFile", "(", "DynamicSkinInstanceData", "data", ")", "{", "final", "String", "cssInstanceKey", "=", "getCssInstanceKey", "(", "data", ")", ";", "synchronized", "(", "cssInstanceKey", ")", "{", "if", "(", "instanceK...
Creates the skin css file in a thread-safe manner that allows multiple different skin files to be created simultaneously to handle large tenant situations where all the custom CSS files were cleared away after a uPortal deploy. <p>Since the less compilation phase is fairly slow (several seconds) and intensive, this me...
[ "Creates", "the", "skin", "css", "file", "in", "a", "thread", "-", "safe", "manner", "that", "allows", "multiple", "different", "skin", "files", "to", "be", "created", "simultaneously", "to", "handle", "large", "tenant", "situations", "where", "all", "the", ...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/dynamicskin/storage/AbstractDynamicSkinService.java#L165-L206
playn/playn
core/src/playn/core/json/JsonObject.java
JsonObject.getArray
public Json.Array getArray(String key) { """ Returns the {@link JsonArray} at the given key, or null if it does not exist or is the wrong type. """ return getArray(key, (Json.Array) null); }
java
public Json.Array getArray(String key) { return getArray(key, (Json.Array) null); }
[ "public", "Json", ".", "Array", "getArray", "(", "String", "key", ")", "{", "return", "getArray", "(", "key", ",", "(", "Json", ".", "Array", ")", "null", ")", ";", "}" ]
Returns the {@link JsonArray} at the given key, or null if it does not exist or is the wrong type.
[ "Returns", "the", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonObject.java#L50-L52
line/armeria
core/src/main/java/com/linecorp/armeria/common/metric/MeterIdPrefix.java
MeterIdPrefix.appendWithTags
public MeterIdPrefix appendWithTags(String suffix, String... tags) { """ Returns a newly-created instance whose name is concatenated by the specified {@code suffix} and {@code tags}. """ return new MeterIdPrefix(name(suffix), sortedImmutableTags(tags)); }
java
public MeterIdPrefix appendWithTags(String suffix, String... tags) { return new MeterIdPrefix(name(suffix), sortedImmutableTags(tags)); }
[ "public", "MeterIdPrefix", "appendWithTags", "(", "String", "suffix", ",", "String", "...", "tags", ")", "{", "return", "new", "MeterIdPrefix", "(", "name", "(", "suffix", ")", ",", "sortedImmutableTags", "(", "tags", ")", ")", ";", "}" ]
Returns a newly-created instance whose name is concatenated by the specified {@code suffix} and {@code tags}.
[ "Returns", "a", "newly", "-", "created", "instance", "whose", "name", "is", "concatenated", "by", "the", "specified", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/metric/MeterIdPrefix.java#L175-L177
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java
MongoDBClient.saveGridFSFile
private void saveGridFSFile(GridFSInputFile gfsInputFile, EntityMetadata m) { """ Save GRID FS file. @param gfsInputFile the gfs input file @param m the m """ try { DBCollection coll = mongoDb.getCollection(m.getTableName() + MongoDBUtils.FILES); createUniqueIndexG...
java
private void saveGridFSFile(GridFSInputFile gfsInputFile, EntityMetadata m) { try { DBCollection coll = mongoDb.getCollection(m.getTableName() + MongoDBUtils.FILES); createUniqueIndexGFS(coll, ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName()); gfsInputF...
[ "private", "void", "saveGridFSFile", "(", "GridFSInputFile", "gfsInputFile", ",", "EntityMetadata", "m", ")", "{", "try", "{", "DBCollection", "coll", "=", "mongoDb", ".", "getCollection", "(", "m", ".", "getTableName", "(", ")", "+", "MongoDBUtils", ".", "FIL...
Save GRID FS file. @param gfsInputFile the gfs input file @param m the m
[ "Save", "GRID", "FS", "file", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java#L1121-L1150
aws/aws-sdk-java
aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/CreateBranchRequest.java
CreateBranchRequest.withEnvironmentVariables
public CreateBranchRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) { """ <p> Environment Variables for the branch. </p> @param environmentVariables Environment Variables for the branch. @return Returns a reference to this object so that method calls can be chained togeth...
java
public CreateBranchRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) { setEnvironmentVariables(environmentVariables); return this; }
[ "public", "CreateBranchRequest", "withEnvironmentVariables", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "environmentVariables", ")", "{", "setEnvironmentVariables", "(", "environmentVariables", ")", ";", "return", "this", ";", "}" ]
<p> Environment Variables for the branch. </p> @param environmentVariables Environment Variables for the branch. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Environment", "Variables", "for", "the", "branch", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/CreateBranchRequest.java#L468-L471
rubenlagus/TelegramBots
telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/InputFile.java
InputFile.setMedia
public InputFile setMedia(File mediaFile, String fileName) { """ Use this setter to send new file. @param mediaFile File to send @param fileName Name of the file @return This object """ this.newMediaFile = mediaFile; this.mediaName = fileName; this.attachName = "attach://" + fileName...
java
public InputFile setMedia(File mediaFile, String fileName) { this.newMediaFile = mediaFile; this.mediaName = fileName; this.attachName = "attach://" + fileName; this.isNew = true; return this; }
[ "public", "InputFile", "setMedia", "(", "File", "mediaFile", ",", "String", "fileName", ")", "{", "this", ".", "newMediaFile", "=", "mediaFile", ";", "this", ".", "mediaName", "=", "fileName", ";", "this", ".", "attachName", "=", "\"attach://\"", "+", "fileN...
Use this setter to send new file. @param mediaFile File to send @param fileName Name of the file @return This object
[ "Use", "this", "setter", "to", "send", "new", "file", "." ]
train
https://github.com/rubenlagus/TelegramBots/blob/d62354915d7664597a40fd9858f16bce67ef1478/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/InputFile.java#L70-L76
alkacon/opencms-core
src/org/opencms/db/generic/CmsSubscriptionDriver.java
CmsSubscriptionDriver.addVisit
protected void addVisit(CmsDbContext dbc, String poolName, CmsVisitEntry visit) throws CmsDbSqlException { """ Adds an entry to the table of visits.<p> @param dbc the database context to use @param poolName the name of the database pool to use @param visit the visit bean @throws CmsDbSqlException if the da...
java
protected void addVisit(CmsDbContext dbc, String poolName, CmsVisitEntry visit) throws CmsDbSqlException { Connection conn = null; PreparedStatement stmt = null; try { if (CmsStringUtil.isNotEmpty(poolName)) { conn = m_sqlManager.getConnection(poolName); ...
[ "protected", "void", "addVisit", "(", "CmsDbContext", "dbc", ",", "String", "poolName", ",", "CmsVisitEntry", "visit", ")", "throws", "CmsDbSqlException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "try", "{", "...
Adds an entry to the table of visits.<p> @param dbc the database context to use @param poolName the name of the database pool to use @param visit the visit bean @throws CmsDbSqlException if the database operation fails
[ "Adds", "an", "entry", "to", "the", "table", "of", "visits", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSubscriptionDriver.java#L892-L930
konvergeio/cofoja
src/main/java/com/google/java/contract/core/apt/FactoryUtils.java
FactoryUtils.getClassNameForType
@Requires( { """ Creates a {@link ClassName} from a {@link TypeMirror}. The created ClassName bears generic parameters, if any. """ "type != null", "type.getKind() == javax.lang.model.type.TypeKind.DECLARED" }) @Ensures("result == null || result.getDeclaredName().equals(type.toString())") ClassN...
java
@Requires({ "type != null", "type.getKind() == javax.lang.model.type.TypeKind.DECLARED" }) @Ensures("result == null || result.getDeclaredName().equals(type.toString())") ClassName getClassNameForType(TypeMirror type) { DeclaredType tmp = (DeclaredType) type; TypeElement element = (TypeElement) tmp...
[ "@", "Requires", "(", "{", "\"type != null\"", ",", "\"type.getKind() == javax.lang.model.type.TypeKind.DECLARED\"", "}", ")", "@", "Ensures", "(", "\"result == null || result.getDeclaredName().equals(type.toString())\"", ")", "ClassName", "getClassNameForType", "(", "TypeMirror", ...
Creates a {@link ClassName} from a {@link TypeMirror}. The created ClassName bears generic parameters, if any.
[ "Creates", "a", "{" ]
train
https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/core/apt/FactoryUtils.java#L80-L91
icode/ameba
src/main/java/ameba/websocket/WebSocketAddon.java
WebSocketAddon._getAnnotation
protected static <A> A _getAnnotation(Class<A> annotationClass, Class endpointClass) { """ <p>_getAnnotation.</p> @param annotationClass a {@link java.lang.Class} object. @param endpointClass a {@link java.lang.Class} object. @param <A> a A object. @return a A object. """ return ann...
java
protected static <A> A _getAnnotation(Class<A> annotationClass, Class endpointClass) { return annotationClass.cast(endpointClass.getAnnotation(annotationClass)); }
[ "protected", "static", "<", "A", ">", "A", "_getAnnotation", "(", "Class", "<", "A", ">", "annotationClass", ",", "Class", "endpointClass", ")", "{", "return", "annotationClass", ".", "cast", "(", "endpointClass", ".", "getAnnotation", "(", "annotationClass", ...
<p>_getAnnotation.</p> @param annotationClass a {@link java.lang.Class} object. @param endpointClass a {@link java.lang.Class} object. @param <A> a A object. @return a A object.
[ "<p", ">", "_getAnnotation", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/websocket/WebSocketAddon.java#L60-L62
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.executeAddColumnFamily
private void executeAddColumnFamily(Tree statement) { """ Add a column family @param statement - a token tree representing current statement """ if (!CliMain.isConnected() || !hasKeySpace()) return; // first value is the column family name, after that it is all key=value C...
java
private void executeAddColumnFamily(Tree statement) { if (!CliMain.isConnected() || !hasKeySpace()) return; // first value is the column family name, after that it is all key=value CfDef cfDef = new CfDef(keySpace, CliUtils.unescapeSQLString(statement.getChild(0).getText())); ...
[ "private", "void", "executeAddColumnFamily", "(", "Tree", "statement", ")", "{", "if", "(", "!", "CliMain", ".", "isConnected", "(", ")", "||", "!", "hasKeySpace", "(", ")", ")", "return", ";", "// first value is the column family name, after that it is all key=value"...
Add a column family @param statement - a token tree representing current statement
[ "Add", "a", "column", "family" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L1105-L1127
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/support/ApplicationLauncher.java
ApplicationLauncher.loadRootApplicationContext
private ApplicationContext loadRootApplicationContext(String[] configLocations, MessageSource messageSource) { """ Returns an {@code ApplicationContext}, loaded from the bean definition files at the classpath-relative locations specified by {@code configLocations}. <p> If a splash screen has been created, th...
java
private ApplicationContext loadRootApplicationContext(String[] configLocations, MessageSource messageSource) { final ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(configLocations, false); if (splashScreen instanceof MonitoringSplashScreen) { ...
[ "private", "ApplicationContext", "loadRootApplicationContext", "(", "String", "[", "]", "configLocations", ",", "MessageSource", "messageSource", ")", "{", "final", "ClassPathXmlApplicationContext", "applicationContext", "=", "new", "ClassPathXmlApplicationContext", "(", "con...
Returns an {@code ApplicationContext}, loaded from the bean definition files at the classpath-relative locations specified by {@code configLocations}. <p> If a splash screen has been created, the application context will be loaded with a bean post processor that will notify the splash screen's progress monitor as each...
[ "Returns", "an", "{", "@code", "ApplicationContext", "}", "loaded", "from", "the", "bean", "definition", "files", "at", "the", "classpath", "-", "relative", "locations", "specified", "by", "{", "@code", "configLocations", "}", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/support/ApplicationLauncher.java#L250-L263
mytechia/mytechia_commons
mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java
PrototypeContainer.getClone
public <T> T getClone( String key, Class<T> c ) { """ Obtains a key associated clone of the prototype for the specified class and key NOTE: IPrototype pattern @param c class of the clone to be obtained """ IPrototype prototype = prototypes.get(new PrototypeKey(key, c)); if (prototype !...
java
public <T> T getClone( String key, Class<T> c ) { IPrototype prototype = prototypes.get(new PrototypeKey(key, c)); if (prototype != null) { return (T) prototype.clone(); } else return null; }
[ "public", "<", "T", ">", "T", "getClone", "(", "String", "key", ",", "Class", "<", "T", ">", "c", ")", "{", "IPrototype", "prototype", "=", "prototypes", ".", "get", "(", "new", "PrototypeKey", "(", "key", ",", "c", ")", ")", ";", "if", "(", "pro...
Obtains a key associated clone of the prototype for the specified class and key NOTE: IPrototype pattern @param c class of the clone to be obtained
[ "Obtains", "a", "key", "associated", "clone", "of", "the", "prototype", "for", "the", "specified", "class", "and", "key" ]
train
https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java#L89-L100
GoogleCloudPlatform/bigdata-interop
util/src/main/java/com/google/cloud/hadoop/util/HttpTransportFactory.java
HttpTransportFactory.createHttpTransport
public static HttpTransport createHttpTransport( HttpTransportType type, @Nullable String proxyAddress, @Nullable String proxyUsername, @Nullable String proxyPassword) throws IOException { """ Create an {@link HttpTransport} based on an type class and an optional HTTP proxy. @param...
java
public static HttpTransport createHttpTransport( HttpTransportType type, @Nullable String proxyAddress, @Nullable String proxyUsername, @Nullable String proxyPassword) throws IOException { logger.atFine().log( "createHttpTransport(%s, %s, %s, %s)", type, proxyAddress, t...
[ "public", "static", "HttpTransport", "createHttpTransport", "(", "HttpTransportType", "type", ",", "@", "Nullable", "String", "proxyAddress", ",", "@", "Nullable", "String", "proxyUsername", ",", "@", "Nullable", "String", "proxyPassword", ")", "throws", "IOException"...
Create an {@link HttpTransport} based on an type class and an optional HTTP proxy. @param type The type of HttpTransport to use. @param proxyAddress The HTTP proxy to use with the transport. Of the form hostname:port. If empty no proxy will be used. @param proxyUsername The HTTP proxy username to use with the transpor...
[ "Create", "an", "{", "@link", "HttpTransport", "}", "based", "on", "an", "type", "class", "and", "an", "optional", "HTTP", "proxy", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/HttpTransportFactory.java#L85-L122
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/Model.java
Model.deleteByIds
public boolean deleteByIds(Object... idValues) { """ Delete model by composite id values. @param idValues the composite id values of the model @return true if delete succeed otherwise false """ Table table = _getTable(); if (idValues == null || idValues.length != table.getPrimaryKey().length) throw...
java
public boolean deleteByIds(Object... idValues) { Table table = _getTable(); if (idValues == null || idValues.length != table.getPrimaryKey().length) throw new IllegalArgumentException("Primary key nubmer must equals id value number and can not be null"); return deleteById(table, idValues); }
[ "public", "boolean", "deleteByIds", "(", "Object", "...", "idValues", ")", "{", "Table", "table", "=", "_getTable", "(", ")", ";", "if", "(", "idValues", "==", "null", "||", "idValues", ".", "length", "!=", "table", ".", "getPrimaryKey", "(", ")", ".", ...
Delete model by composite id values. @param idValues the composite id values of the model @return true if delete succeed otherwise false
[ "Delete", "model", "by", "composite", "id", "values", "." ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/Model.java#L606-L612
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsToolbarClipboardView.java
CmsToolbarClipboardView.createDeletedItem
public CmsListItem createDeletedItem(final CmsClientSitemapEntry entry) { """ Creates a new deleted list item.<p> @param entry the sitemap entry @return the new created (still orphan) list item """ CmsListInfoBean infoBean = new CmsListInfoBean(); infoBean.setTitle(entry.getTitle()); ...
java
public CmsListItem createDeletedItem(final CmsClientSitemapEntry entry) { CmsListInfoBean infoBean = new CmsListInfoBean(); infoBean.setTitle(entry.getTitle()); infoBean.setSubTitle(entry.getSitePath()); infoBean.setResourceType( CmsStringUtil.isNotEmptyOrWhitespaceOnly(entr...
[ "public", "CmsListItem", "createDeletedItem", "(", "final", "CmsClientSitemapEntry", "entry", ")", "{", "CmsListInfoBean", "infoBean", "=", "new", "CmsListInfoBean", "(", ")", ";", "infoBean", ".", "setTitle", "(", "entry", ".", "getTitle", "(", ")", ")", ";", ...
Creates a new deleted list item.<p> @param entry the sitemap entry @return the new created (still orphan) list item
[ "Creates", "a", "new", "deleted", "list", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsToolbarClipboardView.java#L177-L209
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/spring/DependencyCheckPostProcessor.java
DependencyCheckPostProcessor.checkVersion
String checkVersion(String pluginName, String dependency, String requestedVersion, String availableVersion) { """ Check the version to assure it is allowed. @param pluginName plugin name which needs the dependency @param dependency dependency which needs to be verified @param requestedVersion requested/minimu...
java
String checkVersion(String pluginName, String dependency, String requestedVersion, String availableVersion) { if (null == availableVersion) { return "Dependency " + dependency + " not found for " + pluginName + ", version " + requestedVersion + " or higher needed.\n"; } if (requestedVersion.startsWith(EXP...
[ "String", "checkVersion", "(", "String", "pluginName", ",", "String", "dependency", ",", "String", "requestedVersion", ",", "String", "availableVersion", ")", "{", "if", "(", "null", "==", "availableVersion", ")", "{", "return", "\"Dependency \"", "+", "dependency...
Check the version to assure it is allowed. @param pluginName plugin name which needs the dependency @param dependency dependency which needs to be verified @param requestedVersion requested/minimum version @param availableVersion available version @return version check problem or empty string when all is fine
[ "Check", "the", "version", "to", "assure", "it", "is", "allowed", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/spring/DependencyCheckPostProcessor.java#L128-L148
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java
ParserDDL.processAlterTableAddUniqueConstraint
void processAlterTableAddUniqueConstraint(Table table, HsqlName name, boolean assumeUnique) { """ A VoltDB extension to support indexed expressions and the assume unique attribute """ boolean isAutogeneratedName = false; if (name == null) { name = database.nameManager.newAutoName("C...
java
void processAlterTableAddUniqueConstraint(Table table, HsqlName name, boolean assumeUnique) { boolean isAutogeneratedName = false; if (name == null) { name = database.nameManager.newAutoName("CT", table.getSchemaName(), table.getName(), SchemaObject.CO...
[ "void", "processAlterTableAddUniqueConstraint", "(", "Table", "table", ",", "HsqlName", "name", ",", "boolean", "assumeUnique", ")", "{", "boolean", "isAutogeneratedName", "=", "false", ";", "if", "(", "name", "==", "null", ")", "{", "name", "=", "database", "...
A VoltDB extension to support indexed expressions and the assume unique attribute
[ "A", "VoltDB", "extension", "to", "support", "indexed", "expressions", "and", "the", "assume", "unique", "attribute" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java#L3915-L3954
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newEqualityException
public static EqualityException newEqualityException(String message, Object... args) { """ Constructs and initializes a new {@link EqualityException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link EqualityException ...
java
public static EqualityException newEqualityException(String message, Object... args) { return newEqualityException(null, message, args); }
[ "public", "static", "EqualityException", "newEqualityException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newEqualityException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link EqualityException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link EqualityException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@lin...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "EqualityException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L327-L329
JOML-CI/JOML
src/org/joml/Vector3d.java
Vector3d.rotateAxis
public Vector3d rotateAxis(double angle, double aX, double aY, double aZ, Vector3d dest) { """ /* (non-Javadoc) @see org.joml.Vector3dc#rotateAxis(double, double, double, double, org.joml.Vector3d) """ double hangle = angle * 0.5; double sinAngle = Math.sin(hangle); double qx = aX * si...
java
public Vector3d rotateAxis(double angle, double aX, double aY, double aZ, Vector3d dest) { double hangle = angle * 0.5; double sinAngle = Math.sin(hangle); double qx = aX * sinAngle, qy = aY * sinAngle, qz = aZ * sinAngle; double qw = Math.cosFromSin(sinAngle, hangle); double w2 ...
[ "public", "Vector3d", "rotateAxis", "(", "double", "angle", ",", "double", "aX", ",", "double", "aY", ",", "double", "aZ", ",", "Vector3d", "dest", ")", "{", "double", "hangle", "=", "angle", "*", "0.5", ";", "double", "sinAngle", "=", "Math", ".", "si...
/* (non-Javadoc) @see org.joml.Vector3dc#rotateAxis(double, double, double, double, org.joml.Vector3d)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3d.java#L1524-L1538
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/rename/RenameFileExtensions.java
RenameFileExtensions.changeAllFilenameSuffix
public static List<File> changeAllFilenameSuffix(final File file, final String oldSuffix, final String newSuffix) throws IOException, FileDoesNotExistException, FileIsADirectoryException { """ Changes all the Filenames with the new Suffix recursively. @param file The file where to change the Filename with ...
java
public static List<File> changeAllFilenameSuffix(final File file, final String oldSuffix, final String newSuffix) throws IOException, FileDoesNotExistException, FileIsADirectoryException { return changeAllFilenameSuffix(file, oldSuffix, newSuffix, false); }
[ "public", "static", "List", "<", "File", ">", "changeAllFilenameSuffix", "(", "final", "File", "file", ",", "final", "String", "oldSuffix", ",", "final", "String", "newSuffix", ")", "throws", "IOException", ",", "FileDoesNotExistException", ",", "FileIsADirectoryExc...
Changes all the Filenames with the new Suffix recursively. @param file The file where to change the Filename with the new Suffix. @param oldSuffix All files that have the old suffix will be renamed with the new Suffix. @param newSuffix The new suffix. @return the list of files @throws IOException Signals that an I/O e...
[ "Changes", "all", "the", "Filenames", "with", "the", "new", "Suffix", "recursively", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/rename/RenameFileExtensions.java#L117-L122
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/log/LogTable.java
LogTable.logTrx
public void logTrx(FieldList record, String strTrxType) { """ Log this transaction. @param strTrxType The transaction type. """ BaseBuffer buffer = this.getBuffer(); buffer.clearBuffer(); buffer.addHeader(strTrxType); buffer.addHeader(record.getTableNames(false)); buffe...
java
public void logTrx(FieldList record, String strTrxType) { BaseBuffer buffer = this.getBuffer(); buffer.clearBuffer(); buffer.addHeader(strTrxType); buffer.addHeader(record.getTableNames(false)); buffer.addHeader(record.getCounterField().toString()); if (ProxyConstants...
[ "public", "void", "logTrx", "(", "FieldList", "record", ",", "String", "strTrxType", ")", "{", "BaseBuffer", "buffer", "=", "this", ".", "getBuffer", "(", ")", ";", "buffer", ".", "clearBuffer", "(", ")", ";", "buffer", ".", "addHeader", "(", "strTrxType",...
Log this transaction. @param strTrxType The transaction type.
[ "Log", "this", "transaction", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/log/LogTable.java#L90-L101