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
neo4j/neo4j-java-driver
driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java
DriverFactory.createDriver
protected InternalDriver createDriver( SecurityPlan securityPlan, SessionFactory sessionFactory, MetricsProvider metricsProvider, Config config ) { """ Creates new {@link Driver}. <p> <b>This method is protected only for testing</b> """ return new InternalDriver( securityPlan, sessionFactory, metrics...
java
protected InternalDriver createDriver( SecurityPlan securityPlan, SessionFactory sessionFactory, MetricsProvider metricsProvider, Config config ) { return new InternalDriver( securityPlan, sessionFactory, metricsProvider, config.logging() ); }
[ "protected", "InternalDriver", "createDriver", "(", "SecurityPlan", "securityPlan", ",", "SessionFactory", "sessionFactory", ",", "MetricsProvider", "metricsProvider", ",", "Config", "config", ")", "{", "return", "new", "InternalDriver", "(", "securityPlan", ",", "sessi...
Creates new {@link Driver}. <p> <b>This method is protected only for testing</b>
[ "Creates", "new", "{" ]
train
https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/DriverFactory.java#L193-L196
JodaOrg/joda-convert
src/main/java/org/joda/convert/StringConvert.java
StringConvert.findFromStringConstructorByType
private <T> Constructor<T> findFromStringConstructorByType(Class<T> cls) { """ Finds the conversion method. @param <T> the type of the converter @param cls the class to find a method for, not null @return the method to call, null means use {@code toString} """ try { return cls.getD...
java
private <T> Constructor<T> findFromStringConstructorByType(Class<T> cls) { try { return cls.getDeclaredConstructor(String.class); } catch (NoSuchMethodException ex) { try { return cls.getDeclaredConstructor(CharSequence.class); } catch (NoSuchMet...
[ "private", "<", "T", ">", "Constructor", "<", "T", ">", "findFromStringConstructorByType", "(", "Class", "<", "T", ">", "cls", ")", "{", "try", "{", "return", "cls", ".", "getDeclaredConstructor", "(", "String", ".", "class", ")", ";", "}", "catch", "(",...
Finds the conversion method. @param <T> the type of the converter @param cls the class to find a method for, not null @return the method to call, null means use {@code toString}
[ "Finds", "the", "conversion", "method", "." ]
train
https://github.com/JodaOrg/joda-convert/blob/266bd825f4550590d5dafdf4225c548559e0633b/src/main/java/org/joda/convert/StringConvert.java#L840-L850
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java
AbstractCasWebflowConfigurer.createStateModelBinding
public void createStateModelBinding(final TransitionableState state, final String modelName, final Class modelType) { """ Create state model binding. @param state the state @param modelName the model name @param modelType the model type """ state.getAttributes().put("model", createExpression(m...
java
public void createStateModelBinding(final TransitionableState state, final String modelName, final Class modelType) { state.getAttributes().put("model", createExpression(modelName, modelType)); }
[ "public", "void", "createStateModelBinding", "(", "final", "TransitionableState", "state", ",", "final", "String", "modelName", ",", "final", "Class", "modelType", ")", "{", "state", ".", "getAttributes", "(", ")", ".", "put", "(", "\"model\"", ",", "createExpre...
Create state model binding. @param state the state @param modelName the model name @param modelType the model type
[ "Create", "state", "model", "binding", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L620-L622
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationHierarchyEventListener.java
FoundationHierarchyEventListener.addAppenderEvent
public void addAppenderEvent(final Category cat, final Appender appender) { """ In this method perform the actual override in runtime. @see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender) """ updateDefaultLayout(appender); if (appender...
java
public void addAppenderEvent(final Category cat, final Appender appender) { updateDefaultLayout(appender); if (appender instanceof FoundationFileRollingAppender) { final FoundationFileRollingAppender timeSizeRollingAppender = (FoundationFileRollingAppender) appender; // update the appender with default val...
[ "public", "void", "addAppenderEvent", "(", "final", "Category", "cat", ",", "final", "Appender", "appender", ")", "{", "updateDefaultLayout", "(", "appender", ")", ";", "if", "(", "appender", "instanceof", "FoundationFileRollingAppender", ")", "{", "final", "Found...
In this method perform the actual override in runtime. @see org.apache.log4j.spi.HierarchyEventListener#addAppenderEvent(org.apache.log4j.Category, org.apache.log4j.Appender)
[ "In", "this", "method", "perform", "the", "actual", "override", "in", "runtime", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationHierarchyEventListener.java#L55-L116
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/functions/PythonCoGroup.java
PythonCoGroup.coGroup
@Override public final void coGroup(Iterable<IN1> first, Iterable<IN2> second, Collector<OUT> out) throws Exception { """ Calls the external python function. @param first @param second @param out collector @throws IOException """ streamer.streamBufferWithGroups(first.iterator(), second.iterator(), out...
java
@Override public final void coGroup(Iterable<IN1> first, Iterable<IN2> second, Collector<OUT> out) throws Exception { streamer.streamBufferWithGroups(first.iterator(), second.iterator(), out); }
[ "@", "Override", "public", "final", "void", "coGroup", "(", "Iterable", "<", "IN1", ">", "first", ",", "Iterable", "<", "IN2", ">", "second", ",", "Collector", "<", "OUT", ">", "out", ")", "throws", "Exception", "{", "streamer", ".", "streamBufferWithGroup...
Calls the external python function. @param first @param second @param out collector @throws IOException
[ "Calls", "the", "external", "python", "function", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/functions/PythonCoGroup.java#L65-L68
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYLineChartBuilder.java
DJXYLineChartBuilder.addSerie
public DJXYLineChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) { """ Adds the specified serie column to the dataset with custom label. @param column the serie column """ getDataset().addSerie(column, labelExpression); return this; }
java
public DJXYLineChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) { getDataset().addSerie(column, labelExpression); return this; }
[ "public", "DJXYLineChartBuilder", "addSerie", "(", "AbstractColumn", "column", ",", "StringExpression", "labelExpression", ")", "{", "getDataset", "(", ")", ".", "addSerie", "(", "column", ",", "labelExpression", ")", ";", "return", "this", ";", "}" ]
Adds the specified serie column to the dataset with custom label. @param column the serie column
[ "Adds", "the", "specified", "serie", "column", "to", "the", "dataset", "with", "custom", "label", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYLineChartBuilder.java#L384-L387
beihaifeiwu/dolphin
dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/merge/expression/NormalAnnotationExprMerger.java
NormalAnnotationExprMerger.doIsEquals
@Override public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) { """ 1. check the name 2. check the member including key and value if their size is not the same and the less one is all matched in the more one return true """ boolean equals = true; if (!first.getName(...
java
@Override public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) { boolean equals = true; if (!first.getName().equals(second.getName())) equals = false; if (equals == true) { if (first.getPairs() == null) return second.getPairs() == null; if (!isSmallerHasEqual...
[ "@", "Override", "public", "boolean", "doIsEquals", "(", "NormalAnnotationExpr", "first", ",", "NormalAnnotationExpr", "second", ")", "{", "boolean", "equals", "=", "true", ";", "if", "(", "!", "first", ".", "getName", "(", ")", ".", "equals", "(", "second",...
1. check the name 2. check the member including key and value if their size is not the same and the less one is all matched in the more one return true
[ "1", ".", "check", "the", "name", "2", ".", "check", "the", "member", "including", "key", "and", "value", "if", "their", "size", "is", "not", "the", "same", "and", "the", "less", "one", "is", "all", "matched", "in", "the", "more", "one", "return", "t...
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/merge/expression/NormalAnnotationExprMerger.java#L29-L45
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitUnknownInlineTag
@Override public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ return scan(node.getContent(), p); }
java
@Override public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) { return scan(node.getContent(), p); }
[ "@", "Override", "public", "R", "visitUnknownInlineTag", "(", "UnknownInlineTagTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getContent", "(", ")", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L485-L488
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueAuthHandler.java
KeyValueAuthHandler.handleListMechsResponse
private void handleListMechsResponse(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { """ Handles an incoming SASL list mechanisms response and dispatches the next SASL AUTH step. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if ...
java
private void handleListMechsResponse(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { String remote = ctx.channel().remoteAddress().toString(); String[] supportedMechanisms = msg.content().toString(CharsetUtil.UTF_8).split(" "); if (supportedMechanisms.length == 0) {...
[ "private", "void", "handleListMechsResponse", "(", "ChannelHandlerContext", "ctx", ",", "FullBinaryMemcacheResponse", "msg", ")", "throws", "Exception", "{", "String", "remote", "=", "ctx", ".", "channel", "(", ")", ".", "remoteAddress", "(", ")", ".", "toString",...
Handles an incoming SASL list mechanisms response and dispatches the next SASL AUTH step. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if something goes wrong during negotiation.
[ "Handles", "an", "incoming", "SASL", "list", "mechanisms", "response", "and", "dispatches", "the", "next", "SASL", "AUTH", "step", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueAuthHandler.java#L191-L227
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/OutboundConnectionTracker.java
OutboundConnectionTracker.purgeFromInvalidateImpl
public void purgeFromInvalidateImpl(OutboundConnection connection, boolean notifyPeer) { """ Purges a conneciton from the tracker. This is invoked when an error is detected on a connection and we do not want any further conversations to attempt to use it. @param connection The connection to purge @param notif...
java
public void purgeFromInvalidateImpl(OutboundConnection connection, boolean notifyPeer) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "purgeFromInvalidateImpl", new Object[] { connection, "" + notifyPeer }); connection.getConnectionData().getConn...
[ "public", "void", "purgeFromInvalidateImpl", "(", "OutboundConnection", "connection", ",", "boolean", "notifyPeer", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entr...
Purges a conneciton from the tracker. This is invoked when an error is detected on a connection and we do not want any further conversations to attempt to use it. @param connection The connection to purge @param notifyPeer Should we send notification to the connections peer that the purge is taking place?
[ "Purges", "a", "conneciton", "from", "the", "tracker", ".", "This", "is", "invoked", "when", "an", "error", "is", "detected", "on", "a", "connection", "and", "we", "do", "not", "want", "any", "further", "conversations", "to", "attempt", "to", "use", "it", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/OutboundConnectionTracker.java#L784-L791
Azure/azure-sdk-for-java
recoveryservices.backup/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/ProtectionContainersInner.java
ProtectionContainersInner.registerAsync
public Observable<ProtectionContainerResourceInner> registerAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters) { """ Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation ...
java
public Observable<ProtectionContainerResourceInner> registerAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters) { return registerWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, containerName, parameters).map(n...
[ "public", "Observable", "<", "ProtectionContainerResourceInner", ">", "registerAsync", "(", "String", "vaultName", ",", "String", "resourceGroupName", ",", "String", "fabricName", ",", "String", "containerName", ",", "ProtectionContainerResourceInner", "parameters", ")", ...
Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation status, use location header to call get latest status of the operation. @param vaultName The name of the recovery services vault. @param resourceGroupName The name of the resource group where the recovery se...
[ "Registers", "the", "container", "with", "Recovery", "Services", "vault", ".", "This", "is", "an", "asynchronous", "operation", ".", "To", "track", "the", "operation", "status", "use", "location", "header", "to", "call", "get", "latest", "status", "of", "the",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/ProtectionContainersInner.java#L228-L235
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java
ExamplesImpl.addAsync
public Observable<LabelExampleResponse> addAsync(UUID appId, String versionId, ExampleLabelObject exampleLabelObject) { """ Adds a labeled example to the application. @param appId The application ID. @param versionId The version ID. @param exampleLabelObject An example label with the expected intent and entit...
java
public Observable<LabelExampleResponse> addAsync(UUID appId, String versionId, ExampleLabelObject exampleLabelObject) { return addWithServiceResponseAsync(appId, versionId, exampleLabelObject).map(new Func1<ServiceResponse<LabelExampleResponse>, LabelExampleResponse>() { @Override public...
[ "public", "Observable", "<", "LabelExampleResponse", ">", "addAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ExampleLabelObject", "exampleLabelObject", ")", "{", "return", "addWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "exampleLab...
Adds a labeled example to the application. @param appId The application ID. @param versionId The version ID. @param exampleLabelObject An example label with the expected intent and entities. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LabelExampleResponse obj...
[ "Adds", "a", "labeled", "example", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java#L124-L131
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.replaceArg
public Signature replaceArg(String oldName, String newName, Class<?> newType) { """ Replace the named argument with a new name and type. @param oldName the old name of the argument @param newName the new name of the argument; can be the same as old @param newType the new type of the argument; can be the same ...
java
public Signature replaceArg(String oldName, String newName, Class<?> newType) { int offset = argOffset(oldName); String[] newArgNames = argNames; if (!oldName.equals(newName)) { newArgNames = Arrays.copyOf(argNames, argNames.length); newArgNames[offset] = newName; ...
[ "public", "Signature", "replaceArg", "(", "String", "oldName", ",", "String", "newName", ",", "Class", "<", "?", ">", "newType", ")", "{", "int", "offset", "=", "argOffset", "(", "oldName", ")", ";", "String", "[", "]", "newArgNames", "=", "argNames", ";...
Replace the named argument with a new name and type. @param oldName the old name of the argument @param newName the new name of the argument; can be the same as old @param newType the new type of the argument; can be the same as old @return a new signature with the modified argument
[ "Replace", "the", "named", "argument", "with", "a", "new", "name", "and", "type", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L397-L412
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java
ModelUtils.findAnnotationMirror
public static Optional<AnnotationMirror> findAnnotationMirror( Element element, Class<? extends Annotation> annotationClass) { """ Returns an {@link AnnotationMirror} for the annotation of type {@code annotationClass} on {@code element}, or {@link Optional#empty()} if no such annotation exists. """ ...
java
public static Optional<AnnotationMirror> findAnnotationMirror( Element element, Class<? extends Annotation> annotationClass) { return findAnnotationMirror(element, Shading.unshadedName(annotationClass.getName())); }
[ "public", "static", "Optional", "<", "AnnotationMirror", ">", "findAnnotationMirror", "(", "Element", "element", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClass", ")", "{", "return", "findAnnotationMirror", "(", "element", ",", "Shading", "....
Returns an {@link AnnotationMirror} for the annotation of type {@code annotationClass} on {@code element}, or {@link Optional#empty()} if no such annotation exists.
[ "Returns", "an", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java#L58-L61
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/registration/ColumnsGroupVariablesRegistrationManager.java
ColumnsGroupVariablesRegistrationManager.registerValueFormatter
protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) { """ Registers the parameter for the value formatter for the given variable and puts it's implementation in the parameters map. @param djVariable @param variableName """ if ( djVariable.getValueFormatter() == null){ ...
java
protected void registerValueFormatter(DJGroupVariable djVariable, String variableName) { if ( djVariable.getValueFormatter() == null){ return; } JRDesignParameter dparam = new JRDesignParameter(); dparam.setName(variableName + "_vf"); //value formater suffix dparam.setValueClassName(DJValueFormatter.cla...
[ "protected", "void", "registerValueFormatter", "(", "DJGroupVariable", "djVariable", ",", "String", "variableName", ")", "{", "if", "(", "djVariable", ".", "getValueFormatter", "(", ")", "==", "null", ")", "{", "return", ";", "}", "JRDesignParameter", "dparam", ...
Registers the parameter for the value formatter for the given variable and puts it's implementation in the parameters map. @param djVariable @param variableName
[ "Registers", "the", "parameter", "for", "the", "value", "formatter", "for", "the", "given", "variable", "and", "puts", "it", "s", "implementation", "in", "the", "parameters", "map", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/registration/ColumnsGroupVariablesRegistrationManager.java#L114-L130
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigWebUtil.java
ConfigWebUtil.getExistingResource
public static Resource getExistingResource(ServletContext sc, String strDir, String defaultDir, Resource configDir, short type, Config config) { """ get only a existing file, dont create it @param sc @param strDir @param defaultDir @param configDir @param type @param config @return existing file """ ...
java
public static Resource getExistingResource(ServletContext sc, String strDir, String defaultDir, Resource configDir, short type, Config config) { // ARP strDir = replacePlaceholder(strDir, config); if (strDir != null && strDir.trim().length() > 0) { Resource res = sc == null ? null : _getExistingFile(config.get...
[ "public", "static", "Resource", "getExistingResource", "(", "ServletContext", "sc", ",", "String", "strDir", ",", "String", "defaultDir", ",", "Resource", "configDir", ",", "short", "type", ",", "Config", "config", ")", "{", "// ARP", "strDir", "=", "replacePlac...
get only a existing file, dont create it @param sc @param strDir @param defaultDir @param configDir @param type @param config @return existing file
[ "get", "only", "a", "existing", "file", "dont", "create", "it" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigWebUtil.java#L361-L375
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/predefined/RequestOrientedStats.java
RequestOrientedStats.getAverageRequestDuration
public double getAverageRequestDuration(String intervalName, TimeUnit unit) { """ Returns the average request duration for the given interval and converted to the given timeunit. @param intervalName name of the interval. @param unit timeunit. @return """ return unit.transformNanos(totalTime.getValueAsLong...
java
public double getAverageRequestDuration(String intervalName, TimeUnit unit) { return unit.transformNanos(totalTime.getValueAsLong(intervalName)) / totalRequests.getValueAsDouble(intervalName); }
[ "public", "double", "getAverageRequestDuration", "(", "String", "intervalName", ",", "TimeUnit", "unit", ")", "{", "return", "unit", ".", "transformNanos", "(", "totalTime", ".", "getValueAsLong", "(", "intervalName", ")", ")", "/", "totalRequests", ".", "getValue...
Returns the average request duration for the given interval and converted to the given timeunit. @param intervalName name of the interval. @param unit timeunit. @return
[ "Returns", "the", "average", "request", "duration", "for", "the", "given", "interval", "and", "converted", "to", "the", "given", "timeunit", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/RequestOrientedStats.java#L240-L242
cdapio/tigon
tigon-yarn/src/main/java/co/cask/tigon/conf/Configuration.java
Configuration.getBoolean
public boolean getBoolean(String name, boolean defaultValue) { """ Get the value of the <code>name</code> property as a <code>boolean</code>. If no such property is specified, or if the specified value is not a valid <code>boolean</code>, then <code>defaultValue</code> is returned. @param name property name. ...
java
public boolean getBoolean(String name, boolean defaultValue) { String valueString = getTrimmed(name); if (null == valueString || "".equals(valueString)) { return defaultValue; } valueString = valueString.toLowerCase(); if ("true".equals(valueString)) { return true; } else if ("fals...
[ "public", "boolean", "getBoolean", "(", "String", "name", ",", "boolean", "defaultValue", ")", "{", "String", "valueString", "=", "getTrimmed", "(", "name", ")", ";", "if", "(", "null", "==", "valueString", "||", "\"\"", ".", "equals", "(", "valueString", ...
Get the value of the <code>name</code> property as a <code>boolean</code>. If no such property is specified, or if the specified value is not a valid <code>boolean</code>, then <code>defaultValue</code> is returned. @param name property name. @param defaultValue default value. @return property value as a <code>boolean...
[ "Get", "the", "value", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", "as", "a", "<code", ">", "boolean<", "/", "code", ">", ".", "If", "no", "such", "property", "is", "specified", "or", "if", "the", "specified", "value", "is", "no...
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-yarn/src/main/java/co/cask/tigon/conf/Configuration.java#L857-L872
craftercms/commons
utilities/src/main/java/org/craftercms/commons/i10n/I10nUtils.java
I10nUtils.getLocalizedMessage
public static String getLocalizedMessage(ResourceBundle bundle, String key, Object... args) { """ Returns a formatted, localized message according to the specified resource bundle and key. @param bundle the resource bundle where the message format should be @param key the key of the message format @param a...
java
public static String getLocalizedMessage(ResourceBundle bundle, String key, Object... args) { String pattern; try { pattern = bundle.getString(key); } catch (MissingResourceException e) { pattern = key; } if (ArrayUtils.isNotEmpty(args)) { ret...
[ "public", "static", "String", "getLocalizedMessage", "(", "ResourceBundle", "bundle", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "String", "pattern", ";", "try", "{", "pattern", "=", "bundle", ".", "getString", "(", "key", ")", ";", "}",...
Returns a formatted, localized message according to the specified resource bundle and key. @param bundle the resource bundle where the message format should be @param key the key of the message format @param args the args of the message format @return the formatted, localized message
[ "Returns", "a", "formatted", "localized", "message", "according", "to", "the", "specified", "resource", "bundle", "and", "key", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/i10n/I10nUtils.java#L58-L71
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/dao/Results.java
Results.addStats
public void addStats(long updateCount, long insertId, boolean moreResultAvailable) { """ Add execution statistics. @param updateCount number of updated rows @param insertId primary key @param moreResultAvailable is there additional packet """ if (cmdInformation == null) { if (...
java
public void addStats(long updateCount, long insertId, boolean moreResultAvailable) { if (cmdInformation == null) { if (batch) { cmdInformation = new CmdInformationBatch(expectedSize, autoIncrement); } else if (moreResultAvailable) { cmdInformation = new CmdInformationMultiple(expectedSiz...
[ "public", "void", "addStats", "(", "long", "updateCount", ",", "long", "insertId", ",", "boolean", "moreResultAvailable", ")", "{", "if", "(", "cmdInformation", "==", "null", ")", "{", "if", "(", "batch", ")", "{", "cmdInformation", "=", "new", "CmdInformati...
Add execution statistics. @param updateCount number of updated rows @param insertId primary key @param moreResultAvailable is there additional packet
[ "Add", "execution", "statistics", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/dao/Results.java#L174-L186
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/ConcurrentMapWrapper.java
ConcurrentMapWrapper.putIfAbsent
@Override public V putIfAbsent(K key, final V value) { """ We cannot use {@link Cache#putIfAbsent(Object, Object)} since the map returns the value. """ return cache.invoke(key, new EntryProcessor<K, V, V>() { @Override public V process(MutableCacheEntry<K, V> e) { if (!e.exists()) { ...
java
@Override public V putIfAbsent(K key, final V value) { return cache.invoke(key, new EntryProcessor<K, V, V>() { @Override public V process(MutableCacheEntry<K, V> e) { if (!e.exists()) { e.setValue(value); return null; } return e.getValue(); } }); ...
[ "@", "Override", "public", "V", "putIfAbsent", "(", "K", "key", ",", "final", "V", "value", ")", "{", "return", "cache", ".", "invoke", "(", "key", ",", "new", "EntryProcessor", "<", "K", ",", "V", ",", "V", ">", "(", ")", "{", "@", "Override", "...
We cannot use {@link Cache#putIfAbsent(Object, Object)} since the map returns the value.
[ "We", "cannot", "use", "{" ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/ConcurrentMapWrapper.java#L59-L71
apache/reef
lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java
FileSet.addNamesTo
ConfigurationModule addNamesTo(final ConfigurationModule input, final OptionalParameter<String> field) { """ Adds the file names of this FileSet to the given field of the given ConfigurationModule. @param input the ConfigurationModule to fill out @param field the field to add the files in this set to. @return...
java
ConfigurationModule addNamesTo(final ConfigurationModule input, final OptionalParameter<String> field) { ConfigurationModule result = input; for (final String fileName : this.fileNames()) { result = result.set(field, fileName); } return result; }
[ "ConfigurationModule", "addNamesTo", "(", "final", "ConfigurationModule", "input", ",", "final", "OptionalParameter", "<", "String", ">", "field", ")", "{", "ConfigurationModule", "result", "=", "input", ";", "for", "(", "final", "String", "fileName", ":", "this",...
Adds the file names of this FileSet to the given field of the given ConfigurationModule. @param input the ConfigurationModule to fill out @param field the field to add the files in this set to. @return the filled out ConfigurationModule
[ "Adds", "the", "file", "names", "of", "this", "FileSet", "to", "the", "given", "field", "of", "the", "given", "ConfigurationModule", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-local/src/main/java/org/apache/reef/runtime/local/client/FileSet.java#L106-L112
authorjapps/zerocode
core/src/main/java/org/jsmart/zerocode/core/httpclient/BasicHttpClient.java
BasicHttpClient.createFileUploadRequestBuilder
public RequestBuilder createFileUploadRequestBuilder(String httpUrl, String methodName, String reqBodyAsString) throws IOException { """ This is the http request builder for file uploads, using Apache Http Client. In case you want to build or prepare the requests differently, you can override this method. Note...
java
public RequestBuilder createFileUploadRequestBuilder(String httpUrl, String methodName, String reqBodyAsString) throws IOException { Map<String, Object> fileFieldNameValueMap = getFileFieldNameValue(reqBodyAsString); List<String> fileFieldsList = (List<String>) fileFieldNameValueMap.get(FILES_FIELD); ...
[ "public", "RequestBuilder", "createFileUploadRequestBuilder", "(", "String", "httpUrl", ",", "String", "methodName", ",", "String", "reqBodyAsString", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "Object", ">", "fileFieldNameValueMap", "=", "getFileFi...
This is the http request builder for file uploads, using Apache Http Client. In case you want to build or prepare the requests differently, you can override this method. Note- With file uploads you can send more headers too from the testcase to the server, except "Content-Type" because this is reserved for "multipart/...
[ "This", "is", "the", "http", "request", "builder", "for", "file", "uploads", "using", "Apache", "Http", "Client", ".", "In", "case", "you", "want", "to", "build", "or", "prepare", "the", "requests", "differently", "you", "can", "override", "this", "method", ...
train
https://github.com/authorjapps/zerocode/blob/d66a3e8778d2eb5e4f0006bfcccfc0922ceb7cef/core/src/main/java/org/jsmart/zerocode/core/httpclient/BasicHttpClient.java#L340-L361
medallia/Word2VecJava
src/main/java/com/medallia/word2vec/util/IO.java
IO.copyAndCloseOutput
public static int copyAndCloseOutput(Reader input, Writer output) throws IOException { """ Copy input to output and close the output stream before returning """ try { return copy(input, output); } finally { output.close(); } }
java
public static int copyAndCloseOutput(Reader input, Writer output) throws IOException { try { return copy(input, output); } finally { output.close(); } }
[ "public", "static", "int", "copyAndCloseOutput", "(", "Reader", "input", ",", "Writer", "output", ")", "throws", "IOException", "{", "try", "{", "return", "copy", "(", "input", ",", "output", ")", ";", "}", "finally", "{", "output", ".", "close", "(", ")...
Copy input to output and close the output stream before returning
[ "Copy", "input", "to", "output", "and", "close", "the", "output", "stream", "before", "returning" ]
train
https://github.com/medallia/Word2VecJava/blob/eb31fbb99ac6bbab82d7f807b3e2240edca50eb7/src/main/java/com/medallia/word2vec/util/IO.java#L96-L103
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
XMLConfigAdmin.updateJavaCFX
public void updateJavaCFX(String name, ClassDefinition cd) throws PageException { """ insert or update a Java CFX Tag @param name @param strClass @throws PageException """ checkWriteAccess(); boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_CFX_SETTING); if (!hasAccess) throw n...
java
public void updateJavaCFX(String name, ClassDefinition cd) throws PageException { checkWriteAccess(); boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_CFX_SETTING); if (!hasAccess) throw new SecurityException("no access to change cfx settings"); if (name == null || name.length() == 0) thro...
[ "public", "void", "updateJavaCFX", "(", "String", "name", ",", "ClassDefinition", "cd", ")", "throws", "PageException", "{", "checkWriteAccess", "(", ")", ";", "boolean", "hasAccess", "=", "ConfigWebUtil", ".", "hasAccess", "(", "config", ",", "SecurityManager", ...
insert or update a Java CFX Tag @param name @param strClass @throws PageException
[ "insert", "or", "update", "a", "Java", "CFX", "Tag" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L1134-L1167
Erudika/para
para-core/src/main/java/com/erudika/para/utils/Utils.java
Utils.roundHalfUp
public static double roundHalfUp(double d, int scale) { """ Round up a double using the "half up" method. @param d a double @param scale the scale @return a double """ return BigDecimal.valueOf(d).setScale(scale, RoundingMode.HALF_UP).doubleValue(); }
java
public static double roundHalfUp(double d, int scale) { return BigDecimal.valueOf(d).setScale(scale, RoundingMode.HALF_UP).doubleValue(); }
[ "public", "static", "double", "roundHalfUp", "(", "double", "d", ",", "int", "scale", ")", "{", "return", "BigDecimal", ".", "valueOf", "(", "d", ")", ".", "setScale", "(", "scale", ",", "RoundingMode", ".", "HALF_UP", ")", ".", "doubleValue", "(", ")", ...
Round up a double using the "half up" method. @param d a double @param scale the scale @return a double
[ "Round", "up", "a", "double", "using", "the", "half", "up", "method", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/Utils.java#L550-L552
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/cal/JCalendarDualField.java
JCalendarDualField.init
public void init(Convert converter, boolean bAddCalendarButton, boolean bAddTimeButton) { """ Creates new JCalendarDualField. @param The field this component is tied to. """ m_converter = converter; this.setBorder(null); this.setOpaque(false); this.setLayout(new BoxLay...
java
public void init(Convert converter, boolean bAddCalendarButton, boolean bAddTimeButton) { m_converter = converter; this.setBorder(null); this.setOpaque(false); this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); String strDefault = null; int iColumns = 15;...
[ "public", "void", "init", "(", "Convert", "converter", ",", "boolean", "bAddCalendarButton", ",", "boolean", "bAddTimeButton", ")", "{", "m_converter", "=", "converter", ";", "this", ".", "setBorder", "(", "null", ")", ";", "this", ".", "setOpaque", "(", "fa...
Creates new JCalendarDualField. @param The field this component is tied to.
[ "Creates", "new", "JCalendarDualField", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/cal/JCalendarDualField.java#L97-L131
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java
LayerImpl.getLastModified
protected long getLastModified(IAggregator aggregator, ModuleList modules) { """ Returns the newest last modified time of the files in the list @param aggregator @param modules The list of ModuleFile objects @return The newest last modified time of all the files in the list """ long result = 0L; fo...
java
protected long getLastModified(IAggregator aggregator, ModuleList modules) { long result = 0L; for (ModuleList.ModuleListEntry entry : modules) { IResource resource = entry.getModule().getResource(aggregator); long lastMod = resource.lastModified(); result = Math.max(result, lastMod); } return r...
[ "protected", "long", "getLastModified", "(", "IAggregator", "aggregator", ",", "ModuleList", "modules", ")", "{", "long", "result", "=", "0L", ";", "for", "(", "ModuleList", ".", "ModuleListEntry", "entry", ":", "modules", ")", "{", "IResource", "resource", "=...
Returns the newest last modified time of the files in the list @param aggregator @param modules The list of ModuleFile objects @return The newest last modified time of all the files in the list
[ "Returns", "the", "newest", "last", "modified", "time", "of", "the", "files", "in", "the", "list" ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/layer/LayerImpl.java#L1031-L1039
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.decompileFunction
public final String decompileFunction(Function fun, int indent) { """ Decompile a JavaScript Function. <p> Decompiles a previously compiled JavaScript function object to canonical source. <p> Returns function body of '[native code]' if no decompilation information is available. @param fun the JavaScript f...
java
public final String decompileFunction(Function fun, int indent) { if (fun instanceof BaseFunction) return ((BaseFunction)fun).decompile(indent, 0); return "function " + fun.getClassName() + "() {\n\t[native code]\n}\n"; }
[ "public", "final", "String", "decompileFunction", "(", "Function", "fun", ",", "int", "indent", ")", "{", "if", "(", "fun", "instanceof", "BaseFunction", ")", "return", "(", "(", "BaseFunction", ")", "fun", ")", ".", "decompile", "(", "indent", ",", "0", ...
Decompile a JavaScript Function. <p> Decompiles a previously compiled JavaScript function object to canonical source. <p> Returns function body of '[native code]' if no decompilation information is available. @param fun the JavaScript function to decompile @param indent the number of spaces to indent the result @retur...
[ "Decompile", "a", "JavaScript", "Function", ".", "<p", ">", "Decompiles", "a", "previously", "compiled", "JavaScript", "function", "object", "to", "canonical", "source", ".", "<p", ">", "Returns", "function", "body", "of", "[", "native", "code", "]", "if", "...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L1599-L1605
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.setFieldQuiet
public MethodHandle setFieldQuiet(MethodHandles.Lookup lookup, String name) { """ Apply the chain of transforms and bind them to an object field assignment specified using the end signature plus the given class and name. The end signature must take the target class or a subclass and the field's type as its argum...
java
public MethodHandle setFieldQuiet(MethodHandles.Lookup lookup, String name) { try { return setField(lookup, name); } catch (IllegalAccessException | NoSuchFieldException e) { throw new InvalidTransformException(e); } }
[ "public", "MethodHandle", "setFieldQuiet", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "String", "name", ")", "{", "try", "{", "return", "setField", "(", "lookup", ",", "name", ")", ";", "}", "catch", "(", "IllegalAccessException", "|", "NoSuchFieldExc...
Apply the chain of transforms and bind them to an object field assignment specified using the end signature plus the given class and name. The end signature must take the target class or a subclass and the field's type as its arguments, and its return type must be compatible with void. If the final handle's type does ...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "an", "object", "field", "assignment", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", "and", "name", ".", "The", "end", "signature", "must", "take", ...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1495-L1501
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java
FileUtilsV2_2.openOutputStream
public static FileOutputStream openOutputStream(File file, boolean append) throws IOException { """ Opens a {@link FileOutputStream} for the specified file, checking and creating the parent directory if it does not exist. <p> At the end of the method either the stream will be successfully opened, or an excepti...
java
public static FileOutputStream openOutputStream(File file, boolean append) throws IOException { if (file.exists()) { if (file.isDirectory()) { throw new IOException("File '" + file + "' exists but is a directory"); } if (file.canWrite() == false) { throw new IOException("File '" + ...
[ "public", "static", "FileOutputStream", "openOutputStream", "(", "File", "file", ",", "boolean", "append", ")", "throws", "IOException", "{", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{",...
Opens a {@link FileOutputStream} for the specified file, checking and creating the parent directory if it does not exist. <p> At the end of the method either the stream will be successfully opened, or an exception will have been thrown. <p> The parent directory will be created if it does not exist. The file will be cre...
[ "Opens", "a", "{", "@link", "FileOutputStream", "}", "for", "the", "specified", "file", "checking", "and", "creating", "the", "parent", "directory", "if", "it", "does", "not", "exist", ".", "<p", ">", "At", "the", "end", "of", "the", "method", "either", ...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java#L195-L212
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/RegionMap.java
RegionMap.toSubRegion
public RegionMap toSubRegion( double n, double s, double w, double e ) { """ Creates a new {@link RegionMap} cropped on the new bounds and snapped on the original grid. <p><b>The supplied bounds are contained in the resulting region.</b></p> @param n the new north. @param s the new south. @param w the new ...
java
public RegionMap toSubRegion( double n, double s, double w, double e ) { double originalXres = getXres(); double originalYres = getYres(); double originalWest = getWest(); double originalSouth = getSouth(); double envWest = w; double deltaX = (envWest - originalWest) % o...
[ "public", "RegionMap", "toSubRegion", "(", "double", "n", ",", "double", "s", ",", "double", "w", ",", "double", "e", ")", "{", "double", "originalXres", "=", "getXres", "(", ")", ";", "double", "originalYres", "=", "getYres", "(", ")", ";", "double", ...
Creates a new {@link RegionMap} cropped on the new bounds and snapped on the original grid. <p><b>The supplied bounds are contained in the resulting region.</b></p> @param n the new north. @param s the new south. @param w the new west. @param e the new east. @return the new {@link RegionMap}.
[ "Creates", "a", "new", "{", "@link", "RegionMap", "}", "cropped", "on", "the", "new", "bounds", "and", "snapped", "on", "the", "original", "grid", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/RegionMap.java#L214-L248
EdwardRaff/JSAT
JSAT/src/jsat/utils/IntSortedSet.java
IntSortedSet.batch_insert
private void batch_insert(Collection<Integer> set, boolean parallel) { """ more efficient insertion of many items by placing them all into the backing store, and then doing one large sort. @param set @param parallel """ for(int i : set) store[size++] = i; if(parallel) ...
java
private void batch_insert(Collection<Integer> set, boolean parallel) { for(int i : set) store[size++] = i; if(parallel) Arrays.parallelSort(store, 0, size); else Arrays.sort(store, 0, size); }
[ "private", "void", "batch_insert", "(", "Collection", "<", "Integer", ">", "set", ",", "boolean", "parallel", ")", "{", "for", "(", "int", "i", ":", "set", ")", "store", "[", "size", "++", "]", "=", "i", ";", "if", "(", "parallel", ")", "Arrays", "...
more efficient insertion of many items by placing them all into the backing store, and then doing one large sort. @param set @param parallel
[ "more", "efficient", "insertion", "of", "many", "items", "by", "placing", "them", "all", "into", "the", "backing", "store", "and", "then", "doing", "one", "large", "sort", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/utils/IntSortedSet.java#L71-L79
joniles/mpxj
src/main/java/net/sf/mpxj/ResourceAssignment.java
ResourceAssignment.setBaselineBudgetCost
public void setBaselineBudgetCost(int baselineNumber, Number value) { """ Set a baseline value. @param baselineNumber baseline index (1-10) @param value baseline value """ set(selectField(AssignmentFieldLists.BASELINE_BUDGET_COSTS, baselineNumber), value); }
java
public void setBaselineBudgetCost(int baselineNumber, Number value) { set(selectField(AssignmentFieldLists.BASELINE_BUDGET_COSTS, baselineNumber), value); }
[ "public", "void", "setBaselineBudgetCost", "(", "int", "baselineNumber", ",", "Number", "value", ")", "{", "set", "(", "selectField", "(", "AssignmentFieldLists", ".", "BASELINE_BUDGET_COSTS", ",", "baselineNumber", ")", ",", "value", ")", ";", "}" ]
Set a baseline value. @param baselineNumber baseline index (1-10) @param value baseline value
[ "Set", "a", "baseline", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1474-L1477
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.initFields
protected void initFields(Element parent, CmsXmlContentDefinition contentDef) throws CmsXmlException { """ Processes all field declarations in the schema.<p> @param parent the parent element @param contentDef the content definition @throws CmsXmlException if something goes wrong """ for (Elemen...
java
protected void initFields(Element parent, CmsXmlContentDefinition contentDef) throws CmsXmlException { for (Element fieldElem : parent.elements(N_SETTING)) { initField(fieldElem, contentDef); } }
[ "protected", "void", "initFields", "(", "Element", "parent", ",", "CmsXmlContentDefinition", "contentDef", ")", "throws", "CmsXmlException", "{", "for", "(", "Element", "fieldElem", ":", "parent", ".", "elements", "(", "N_SETTING", ")", ")", "{", "initField", "(...
Processes all field declarations in the schema.<p> @param parent the parent element @param contentDef the content definition @throws CmsXmlException if something goes wrong
[ "Processes", "all", "field", "declarations", "in", "the", "schema", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L2612-L2617
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DoublesByteArrayImpl.java
DoublesByteArrayImpl.convertToByteArray
private static byte[] convertToByteArray(final DoublesSketch sketch, final int flags, final boolean ordered, final boolean compact) { """ Returns a byte array, including preamble, min, max and data extracted from the sketch. @param sketch the given DoublesSketch @param ...
java
private static byte[] convertToByteArray(final DoublesSketch sketch, final int flags, final boolean ordered, final boolean compact) { final int preLongs = 2; final int extra = 2; // extra space for min and max values final int prePlusExtraBytes = (preLongs + extra)...
[ "private", "static", "byte", "[", "]", "convertToByteArray", "(", "final", "DoublesSketch", "sketch", ",", "final", "int", "flags", ",", "final", "boolean", "ordered", ",", "final", "boolean", "compact", ")", "{", "final", "int", "preLongs", "=", "2", ";", ...
Returns a byte array, including preamble, min, max and data extracted from the sketch. @param sketch the given DoublesSketch @param flags the Flags field @param ordered true if the desired form of the resulting array has the base buffer sorted. @param compact true if the desired form of the resulting array is in compac...
[ "Returns", "a", "byte", "array", "including", "preamble", "min", "max", "and", "data", "extracted", "from", "the", "sketch", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DoublesByteArrayImpl.java#L64-L114
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java
AmazonDynamoDBClient.deleteTable
public DeleteTableResult deleteTable(DeleteTableRequest deleteTableRequest) throws AmazonServiceException, AmazonClientException { """ <p> Deletes a table and all of its items. </p> <p> If the table is in the <code>ACTIVE</code> state, you can delete it. If a table is in <code>CREATING</code> or <...
java
public DeleteTableResult deleteTable(DeleteTableRequest deleteTableRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(deleteTableRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); ...
[ "public", "DeleteTableResult", "deleteTable", "(", "DeleteTableRequest", "deleteTableRequest", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", "{", "ExecutionContext", "executionContext", "=", "createExecutionContext", "(", "deleteTableRequest", ")", ";",...
<p> Deletes a table and all of its items. </p> <p> If the table is in the <code>ACTIVE</code> state, you can delete it. If a table is in <code>CREATING</code> or <code>UPDATING</code> states then Amazon DynamoDB returns a <code>ResourceInUseException</code> . If the specified table does not exist, Amazon DynamoDB retur...
[ "<p", ">", "Deletes", "a", "table", "and", "all", "of", "its", "items", ".", "<", "/", "p", ">", "<p", ">", "If", "the", "table", "is", "in", "the", "<code", ">", "ACTIVE<", "/", "code", ">", "state", "you", "can", "delete", "it", ".", "If", "a...
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java#L766-L778
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java
TopicsInner.regenerateKey
public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicName, String keyName) { """ Regenerate key for a topic. Regenerate a shared access key for a topic. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Name of the topic ...
java
public TopicSharedAccessKeysInner regenerateKey(String resourceGroupName, String topicName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName).toBlocking().single().body(); }
[ "public", "TopicSharedAccessKeysInner", "regenerateKey", "(", "String", "resourceGroupName", ",", "String", "topicName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "topicName", ",", "keyName", ")",...
Regenerate key for a topic. Regenerate a shared access key for a topic. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Name of the topic @param keyName Key name to regenerate key1 or key2 @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Regenerate", "key", "for", "a", "topic", ".", "Regenerate", "a", "shared", "access", "key", "for", "a", "topic", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java#L1167-L1169
Erudika/para
para-server/src/main/java/com/erudika/para/utils/GZipResponseUtil.java
GZipResponseUtil.shouldGzippedBodyBeZero
public static boolean shouldGzippedBodyBeZero(byte[] compressedBytes, HttpServletRequest request) { """ Checks whether a gzipped body is actually empty and should just be zero. When the compressedBytes is {@link #EMPTY_GZIPPED_CONTENT_SIZE} it should be zero. @param compressedBytes the gzipped response body @pa...
java
public static boolean shouldGzippedBodyBeZero(byte[] compressedBytes, HttpServletRequest request) { //Check for 0 length body if (compressedBytes.length == EMPTY_GZIPPED_CONTENT_SIZE) { if (log.isTraceEnabled()) { log.trace("{} resulted in an empty response.", request.getRequestURL()); } return true; ...
[ "public", "static", "boolean", "shouldGzippedBodyBeZero", "(", "byte", "[", "]", "compressedBytes", ",", "HttpServletRequest", "request", ")", "{", "//Check for 0 length body", "if", "(", "compressedBytes", ".", "length", "==", "EMPTY_GZIPPED_CONTENT_SIZE", ")", "{", ...
Checks whether a gzipped body is actually empty and should just be zero. When the compressedBytes is {@link #EMPTY_GZIPPED_CONTENT_SIZE} it should be zero. @param compressedBytes the gzipped response body @param request the client HTTP request @return true if the response should be 0, even if it is isn't.
[ "Checks", "whether", "a", "gzipped", "body", "is", "actually", "empty", "and", "should", "just", "be", "zero", ".", "When", "the", "compressedBytes", "is", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/utils/GZipResponseUtil.java#L56-L67
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/SignatureVerifier.java
SignatureVerifier.downloadCert
private String downloadCert(URI certUrl) { """ Downloads the certificate from the provided URL. Asserts that the endpoint is an SNS endpoint and that the certificate is vended over HTTPs. @param certUrl URL to download certificate from. @return String contents of certificate. @throws SdkClientException If ce...
java
private String downloadCert(URI certUrl) { try { signingCertUrlVerifier.verifyCertUrl(certUrl); HttpResponse response = client.execute(new HttpGet(certUrl)); if (ApacheUtils.isRequestSuccessful(response)) { try { return IOUtils.toString(res...
[ "private", "String", "downloadCert", "(", "URI", "certUrl", ")", "{", "try", "{", "signingCertUrlVerifier", ".", "verifyCertUrl", "(", "certUrl", ")", ";", "HttpResponse", "response", "=", "client", ".", "execute", "(", "new", "HttpGet", "(", "certUrl", ")", ...
Downloads the certificate from the provided URL. Asserts that the endpoint is an SNS endpoint and that the certificate is vended over HTTPs. @param certUrl URL to download certificate from. @return String contents of certificate. @throws SdkClientException If certificate cannot be downloaded or URL is invalid.
[ "Downloads", "the", "certificate", "from", "the", "provided", "URL", ".", "Asserts", "that", "the", "endpoint", "is", "an", "SNS", "endpoint", "and", "that", "the", "certificate", "is", "vended", "over", "HTTPs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/SignatureVerifier.java#L156-L172
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/servlet/ClientlibServlet.java
ClientlibServlet.makePath
public static String makePath(String path, Clientlib.Type type, boolean minified, String hash) { """ Creates an path that is rendered by this servlet containing the given parameters. """ StringBuilder builder = new StringBuilder(path); if (minified) builder.append(".min"); if (!path.end...
java
public static String makePath(String path, Clientlib.Type type, boolean minified, String hash) { StringBuilder builder = new StringBuilder(path); if (minified) builder.append(".min"); if (!path.endsWith("." + type.name()) && type != Clientlib.Type.img && type != Clientlib.Type.link) { ...
[ "public", "static", "String", "makePath", "(", "String", "path", ",", "Clientlib", ".", "Type", "type", ",", "boolean", "minified", ",", "String", "hash", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "path", ")", ";", "if", "(", ...
Creates an path that is rendered by this servlet containing the given parameters.
[ "Creates", "an", "path", "that", "is", "rendered", "by", "this", "servlet", "containing", "the", "given", "parameters", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/servlet/ClientlibServlet.java#L64-L71
tango-controls/JTango
client/src/main/java/fr/soleil/tango/clientapi/InsertExtractUtils.java
InsertExtractUtils.extractRead
public static Object extractRead(final DeviceAttribute da, final AttrDataFormat format) throws DevFailed { """ Extract read values to an object for SCALAR, SPECTRUM and IMAGE @param da @return single value for SCALAR, array of primitives for SPECTRUM, 2D array of primitives for IMAGE @throws DevFailed """...
java
public static Object extractRead(final DeviceAttribute da, final AttrDataFormat format) throws DevFailed { if (da == null) { throw DevFailedUtils.newDevFailed(ERROR_MSG_DA); } return InsertExtractFactory.getAttributeExtractor(da.getType()).extractRead(da, format); }
[ "public", "static", "Object", "extractRead", "(", "final", "DeviceAttribute", "da", ",", "final", "AttrDataFormat", "format", ")", "throws", "DevFailed", "{", "if", "(", "da", "==", "null", ")", "{", "throw", "DevFailedUtils", ".", "newDevFailed", "(", "ERROR_...
Extract read values to an object for SCALAR, SPECTRUM and IMAGE @param da @return single value for SCALAR, array of primitives for SPECTRUM, 2D array of primitives for IMAGE @throws DevFailed
[ "Extract", "read", "values", "to", "an", "object", "for", "SCALAR", "SPECTRUM", "and", "IMAGE" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/InsertExtractUtils.java#L44-L49
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/RedisCommandFactory.java
RedisCommandFactory.getCommands
public <T extends Commands> T getCommands(Class<T> commandInterface) { """ Returns a Redis Commands interface instance for the given interface. @param commandInterface must not be {@literal null}. @param <T> command interface type. @return the implemented Redis Commands interface. """ LettuceAsse...
java
public <T extends Commands> T getCommands(Class<T> commandInterface) { LettuceAssert.notNull(commandInterface, "Redis Command Interface must not be null"); RedisCommandsMetadata metadata = new DefaultRedisCommandsMetadata(commandInterface); InvocationProxyFactory factory = new InvocationProxy...
[ "public", "<", "T", "extends", "Commands", ">", "T", "getCommands", "(", "Class", "<", "T", ">", "commandInterface", ")", "{", "LettuceAssert", ".", "notNull", "(", "commandInterface", ",", "\"Redis Command Interface must not be null\"", ")", ";", "RedisCommandsMeta...
Returns a Redis Commands interface instance for the given interface. @param commandInterface must not be {@literal null}. @param <T> command interface type. @return the implemented Redis Commands interface.
[ "Returns", "a", "Redis", "Commands", "interface", "instance", "for", "the", "given", "interface", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/RedisCommandFactory.java#L179-L195
JetBrains/xodus
vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java
VirtualFileSystem.touchFile
public void touchFile(@NotNull final Transaction txn, @NotNull final File file) { """ Touches the specified {@linkplain File}, i.e. sets its {@linkplain File#getLastModified() last modified time} to current time. @param txn {@linkplain Transaction} instance @param file {@linkplain File} instance @see #readF...
java
public void touchFile(@NotNull final Transaction txn, @NotNull final File file) { new LastModifiedTrigger(txn, file, pathnames).run(); }
[ "public", "void", "touchFile", "(", "@", "NotNull", "final", "Transaction", "txn", ",", "@", "NotNull", "final", "File", "file", ")", "{", "new", "LastModifiedTrigger", "(", "txn", ",", "file", ",", "pathnames", ")", ".", "run", "(", ")", ";", "}" ]
Touches the specified {@linkplain File}, i.e. sets its {@linkplain File#getLastModified() last modified time} to current time. @param txn {@linkplain Transaction} instance @param file {@linkplain File} instance @see #readFile(Transaction, File) @see #readFile(Transaction, long) @see #readFile(Transaction, File, long)...
[ "Touches", "the", "specified", "{", "@linkplain", "File", "}", "i", ".", "e", ".", "sets", "its", "{", "@linkplain", "File#getLastModified", "()", "last", "modified", "time", "}", "to", "current", "time", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java#L475-L477
lucee/Lucee
core/src/main/java/lucee/runtime/config/ConfigImpl.java
ConfigImpl.setScheduler
protected void setScheduler(CFMLEngine engine, Resource scheduleDirectory) throws PageException { """ sets the Schedule Directory @param scheduleDirectory sets the schedule Directory @param logger @throws PageException """ if (scheduleDirectory == null) { if (this.scheduler == null) this.scheduler =...
java
protected void setScheduler(CFMLEngine engine, Resource scheduleDirectory) throws PageException { if (scheduleDirectory == null) { if (this.scheduler == null) this.scheduler = new SchedulerImpl(engine, "<?xml version=\"1.0\"?>\n<schedule></schedule>", this); return; } if (!isDirectory(scheduleDirectory)) ...
[ "protected", "void", "setScheduler", "(", "CFMLEngine", "engine", ",", "Resource", "scheduleDirectory", ")", "throws", "PageException", "{", "if", "(", "scheduleDirectory", "==", "null", ")", "{", "if", "(", "this", ".", "scheduler", "==", "null", ")", "this",...
sets the Schedule Directory @param scheduleDirectory sets the schedule Directory @param logger @throws PageException
[ "sets", "the", "Schedule", "Directory" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/ConfigImpl.java#L1654-L1667
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkProfilesInner.java
NetworkProfilesInner.getByResourceGroup
public NetworkProfileInner getByResourceGroup(String resourceGroupName, String networkProfileName) { """ Gets the specified network profile in a specified resource group. @param resourceGroupName The name of the resource group. @param networkProfileName The name of the PublicIPPrefx. @throws IllegalArgumentEx...
java
public NetworkProfileInner getByResourceGroup(String resourceGroupName, String networkProfileName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().single().body(); }
[ "public", "NetworkProfileInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "networkProfileName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkProfileName", ")", ".", "toBlocking", "(", ...
Gets the specified network profile in a specified resource group. @param resourceGroupName The name of the resource group. @param networkProfileName The name of the PublicIPPrefx. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by serve...
[ "Gets", "the", "specified", "network", "profile", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkProfilesInner.java#L180-L182
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.volumeScaled
public static double volumeScaled(SpatialComparable box, double scale) { """ Computes the volume of this SpatialComparable. @param box Box @param scale Scaling factor @return the volume of this SpatialComparable """ final int dim = box.getDimensionality(); double vol = 1.; for(int i = 0; i < d...
java
public static double volumeScaled(SpatialComparable box, double scale) { final int dim = box.getDimensionality(); double vol = 1.; for(int i = 0; i < dim; i++) { double delta = box.getMax(i) - box.getMin(i); if(delta == 0.) { return 0.; } vol *= delta * scale; } retur...
[ "public", "static", "double", "volumeScaled", "(", "SpatialComparable", "box", ",", "double", "scale", ")", "{", "final", "int", "dim", "=", "box", ".", "getDimensionality", "(", ")", ";", "double", "vol", "=", "1.", ";", "for", "(", "int", "i", "=", "...
Computes the volume of this SpatialComparable. @param box Box @param scale Scaling factor @return the volume of this SpatialComparable
[ "Computes", "the", "volume", "of", "this", "SpatialComparable", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L196-L207
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleCertProcessingFactory.java
BouncyCastleCertProcessingFactory.createCertificate
public X509Certificate createCertificate(InputStream certRequestInputStream, X509Certificate cert, PrivateKey privateKey, int lifetime, int delegationMode, X509ExtensionSet extSet) throws IOException, GeneralSecurityException { """ Creates a proxy certificate from the certificate request. @see #...
java
public X509Certificate createCertificate(InputStream certRequestInputStream, X509Certificate cert, PrivateKey privateKey, int lifetime, int delegationMode, X509ExtensionSet extSet) throws IOException, GeneralSecurityException { return createCertificate(certRequestInputStream, cert, privateKey, l...
[ "public", "X509Certificate", "createCertificate", "(", "InputStream", "certRequestInputStream", ",", "X509Certificate", "cert", ",", "PrivateKey", "privateKey", ",", "int", "lifetime", ",", "int", "delegationMode", ",", "X509ExtensionSet", "extSet", ")", "throws", "IOEx...
Creates a proxy certificate from the certificate request. @see #createCertificate(InputStream, X509Certificate, PrivateKey, int, int, X509ExtensionSet, String) createCertificate @deprecated
[ "Creates", "a", "proxy", "certificate", "from", "the", "certificate", "request", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleCertProcessingFactory.java#L108-L112
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Clicker.java
Clicker.clickOnText
public void clickOnText(String regex, boolean longClick, int match, boolean scroll, int time) { """ Clicks on a specific {@link TextView} displaying a given text. @param regex the text that should be clicked on. The parameter <strong>will</strong> be interpreted as a regular expression. @param longClick {@code...
java
public void clickOnText(String regex, boolean longClick, int match, boolean scroll, int time) { TextView textToClick = waiter.waitForText(regex, match, Timeout.getSmallTimeout(), scroll, true, false); if (textToClick != null) { clickOnScreen(textToClick, longClick, time); } else { if(match > 1){ As...
[ "public", "void", "clickOnText", "(", "String", "regex", ",", "boolean", "longClick", ",", "int", "match", ",", "boolean", "scroll", ",", "int", "time", ")", "{", "TextView", "textToClick", "=", "waiter", ".", "waitForText", "(", "regex", ",", "match", ","...
Clicks on a specific {@link TextView} displaying a given text. @param regex the text that should be clicked on. The parameter <strong>will</strong> be interpreted as a regular expression. @param longClick {@code true} if the click should be a long click @param match the regex match that should be clicked on @param scr...
[ "Clicks", "on", "a", "specific", "{", "@link", "TextView", "}", "displaying", "a", "given", "text", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Clicker.java#L438-L462
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java
BetterRecyclerAdapter.onItemLongClick
protected void onItemLongClick(View view, int position) { """ Call this to trigger the user set item long click lisetner @param view the view that was clicked @param position the position that was clicked """ if(itemLongClickListener != null) itemLongClickListener.onItemLongClick(view, ...
java
protected void onItemLongClick(View view, int position){ if(itemLongClickListener != null) itemLongClickListener.onItemLongClick(view, getItem(position), position); }
[ "protected", "void", "onItemLongClick", "(", "View", "view", ",", "int", "position", ")", "{", "if", "(", "itemLongClickListener", "!=", "null", ")", "itemLongClickListener", ".", "onItemLongClick", "(", "view", ",", "getItem", "(", "position", ")", ",", "posi...
Call this to trigger the user set item long click lisetner @param view the view that was clicked @param position the position that was clicked
[ "Call", "this", "to", "trigger", "the", "user", "set", "item", "long", "click", "lisetner" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/adapter/BetterRecyclerAdapter.java#L84-L86
strator-dev/greenpepper-open
extensions-external/ognl/src/main/java/com/greenpepper/extensions/ognl/OgnlSupport.java
OgnlSupport.getFixture
public Fixture getFixture( String name, String... params ) throws Throwable { """ <p>getFixture.</p> @param name a {@link java.lang.String} object. @param params a {@link java.lang.String} object. @return a {@link com.greenpepper.reflect.Fixture} object. @throws java.lang.Throwable if any. """ re...
java
public Fixture getFixture( String name, String... params ) throws Throwable { return new OgnlFixture( systemUnderDevelopment.getFixture( name, params ) ); }
[ "public", "Fixture", "getFixture", "(", "String", "name", ",", "String", "...", "params", ")", "throws", "Throwable", "{", "return", "new", "OgnlFixture", "(", "systemUnderDevelopment", ".", "getFixture", "(", "name", ",", "params", ")", ")", ";", "}" ]
<p>getFixture.</p> @param name a {@link java.lang.String} object. @param params a {@link java.lang.String} object. @return a {@link com.greenpepper.reflect.Fixture} object. @throws java.lang.Throwable if any.
[ "<p", ">", "getFixture", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/extensions-external/ognl/src/main/java/com/greenpepper/extensions/ognl/OgnlSupport.java#L50-L53
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java
ComputePoliciesInner.listByAccountAsync
public Observable<Page<ComputePolicyInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { """ Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. @param resourceGroupName The name of the Azur...
java
public Observable<Page<ComputePolicyInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<ComputePolicyInner>>, Page<ComputePolicyInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "ComputePolicyInner", ">", ">", "listByAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listByAccountWithServiceResponseAsync", "(", "resourceGroupName", ","...
Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @throws IllegalArgumentException thrown if parameter...
[ "Lists", "the", "Data", "Lake", "Analytics", "compute", "policies", "within", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "An", "account", "supports", "at", "most", "50", "policies", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java#L142-L150
biojava/biojava
biojava-genome/src/main/java/org/biojava/nbio/genome/util/ChromosomeMappingTools.java
ChromosomeMappingTools.getCDSExonRanges
public static List<Range<Integer>> getCDSExonRanges(GeneChromosomePosition chromPos) { """ Extracts the exon boundaries in CDS coordinates. (needs to be divided by 3 to get AA positions) @param chromPos @return """ if ( chromPos.getOrientation() == '+') return getCDSExonRangesForward(chromPos,CDS); ...
java
public static List<Range<Integer>> getCDSExonRanges(GeneChromosomePosition chromPos){ if ( chromPos.getOrientation() == '+') return getCDSExonRangesForward(chromPos,CDS); return getCDSExonRangesReverse(chromPos,CDS); }
[ "public", "static", "List", "<", "Range", "<", "Integer", ">", ">", "getCDSExonRanges", "(", "GeneChromosomePosition", "chromPos", ")", "{", "if", "(", "chromPos", ".", "getOrientation", "(", ")", "==", "'", "'", ")", "return", "getCDSExonRangesForward", "(", ...
Extracts the exon boundaries in CDS coordinates. (needs to be divided by 3 to get AA positions) @param chromPos @return
[ "Extracts", "the", "exon", "boundaries", "in", "CDS", "coordinates", ".", "(", "needs", "to", "be", "divided", "by", "3", "to", "get", "AA", "positions", ")" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/util/ChromosomeMappingTools.java#L577-L581
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java
NodeImpl.setPropertyValue
public static NodeImpl setPropertyValue(final NodeImpl node, final Object value) { """ set property value to a copied node. @param node node to build @param value value to set @return new created node implementation """ return new NodeImpl( // node.name, // node.parent, // node...
java
public static NodeImpl setPropertyValue(final NodeImpl node, final Object value) { return new NodeImpl( // node.name, // node.parent, // node.isIterableValue, // node.index, // node.key, // node.kind, // node.parameterTypes, // node.parameterIndex, // ...
[ "public", "static", "NodeImpl", "setPropertyValue", "(", "final", "NodeImpl", "node", ",", "final", "Object", "value", ")", "{", "return", "new", "NodeImpl", "(", "//", "node", ".", "name", ",", "//", "node", ".", "parent", ",", "//", "node", ".", "isIte...
set property value to a copied node. @param node node to build @param value value to set @return new created node implementation
[ "set", "property", "value", "to", "a", "copied", "node", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java#L357-L371
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VTimeZone.java
VTimeZone.writeZonePropsByDOW_GEQ_DOM
private static void writeZonePropsByDOW_GEQ_DOM(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime) throws IOException { """ /* Write start times defined by a DOW_GEQ_DOM rule using VTIMEZONE RRULE """...
java
private static void writeZonePropsByDOW_GEQ_DOM(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime) throws IOException { // Check if this rule can be converted to DOW rule if (dayOfMonth%7 == 1) ...
[ "private", "static", "void", "writeZonePropsByDOW_GEQ_DOM", "(", "Writer", "writer", ",", "boolean", "isDst", ",", "String", "tzname", ",", "int", "fromOffset", ",", "int", "toOffset", ",", "int", "month", ",", "int", "dayOfMonth", ",", "int", "dayOfWeek", ","...
/* Write start times defined by a DOW_GEQ_DOM rule using VTIMEZONE RRULE
[ "/", "*", "Write", "start", "times", "defined", "by", "a", "DOW_GEQ_DOM", "rule", "using", "VTIMEZONE", "RRULE" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VTimeZone.java#L1553-L1599
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/ChannelUpgradeHandler.java
ChannelUpgradeHandler.addProtocol
public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) { """ Add a protocol to this handler. @param productString the product string to match @param openListener the open listener to call """ addProtocol(productString, openListener, null); }
java
public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) { addProtocol(productString, openListener, null); }
[ "public", "void", "addProtocol", "(", "String", "productString", ",", "ChannelListener", "<", "?", "super", "StreamConnection", ">", "openListener", ")", "{", "addProtocol", "(", "productString", ",", "openListener", ",", "null", ")", ";", "}" ]
Add a protocol to this handler. @param productString the product string to match @param openListener the open listener to call
[ "Add", "a", "protocol", "to", "this", "handler", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/ChannelUpgradeHandler.java#L97-L99
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.configureProperties
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Object object) { """ Set field values on a plugin object by using annotated field values to create a Description, and setting field values to resolved property val...
java
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Object object) { //use a default scope of InstanceOnly if the Property doesn't specify it return configureProperties(resolver, buildDescription(object, D...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "configureProperties", "(", "final", "PropertyResolver", "resolver", ",", "final", "Object", "object", ")", "{", "//use a default scope of InstanceOnly if the Property doesn't specify it", "return", "configurePro...
Set field values on a plugin object by using annotated field values to create a Description, and setting field values to resolved property values. Any resolved properties that are not mapped to a field will be included in the return result. @param resolver property resolver @param object plugin object @return Map of ...
[ "Set", "field", "values", "on", "a", "plugin", "object", "by", "using", "annotated", "field", "values", "to", "create", "a", "Description", "and", "setting", "field", "values", "to", "resolved", "property", "values", ".", "Any", "resolved", "properties", "that...
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L337-L342
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java
SnapshotsInner.createOrUpdate
public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { """ Creates or updates a snapshot. @param resourceGroupName The name of the resource group. @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapsh...
java
public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().last().body(); }
[ "public", "SnapshotInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "snapshotName", ",", "SnapshotInner", "snapshot", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "snapshotName", ",", "snapshot", ...
Creates or updates a snapshot. @param resourceGroupName The name of the resource group. @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. @param sn...
[ "Creates", "or", "updates", "a", "snapshot", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java#L144-L146
tminglei/form-binder-java
src/main/java/com/github/tminglei/bind/FrameworkUtils.java
FrameworkUtils.workObject
static Object workObject(Map<String, Object> workList, String name, boolean isArray) { """ find work object specified by name, create and attach it if not exists """ logger.trace("get working object for {}", name); if (workList.get(name) != null) return workList.get(name); else { ...
java
static Object workObject(Map<String, Object> workList, String name, boolean isArray) { logger.trace("get working object for {}", name); if (workList.get(name) != null) return workList.get(name); else { String[] parts = splitName(name); // parts: (parent, name, isArray) ...
[ "static", "Object", "workObject", "(", "Map", "<", "String", ",", "Object", ">", "workList", ",", "String", "name", ",", "boolean", "isArray", ")", "{", "logger", ".", "trace", "(", "\"get working object for {}\"", ",", "name", ")", ";", "if", "(", "workLi...
find work object specified by name, create and attach it if not exists
[ "find", "work", "object", "specified", "by", "name", "create", "and", "attach", "it", "if", "not", "exists" ]
train
https://github.com/tminglei/form-binder-java/blob/4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab/src/main/java/com/github/tminglei/bind/FrameworkUtils.java#L97-L111
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUData.java
ICUData.getStream
public static InputStream getStream(Class<?> root, String resourceName) { """ Convenience override that calls getStream(root, resourceName, false); Returns null if the resource could not be found. """ return getStream(root, resourceName, false); }
java
public static InputStream getStream(Class<?> root, String resourceName) { return getStream(root, resourceName, false); }
[ "public", "static", "InputStream", "getStream", "(", "Class", "<", "?", ">", "root", ",", "String", "resourceName", ")", "{", "return", "getStream", "(", "root", ",", "resourceName", ",", "false", ")", ";", "}" ]
Convenience override that calls getStream(root, resourceName, false); Returns null if the resource could not be found.
[ "Convenience", "override", "that", "calls", "getStream", "(", "root", "resourceName", "false", ")", ";", "Returns", "null", "if", "the", "resource", "could", "not", "be", "found", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUData.java#L213-L215
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroReader.java
SynchroReader.processTask
private void processTask(ChildTaskContainer parent, MapRow row) throws IOException { """ Extract data for a single task. @param parent task parent @param row Synchro task data """ Task task = parent.addTask(); task.setName(row.getString("NAME")); task.setGUID(row.getUUID("UUID")); t...
java
private void processTask(ChildTaskContainer parent, MapRow row) throws IOException { Task task = parent.addTask(); task.setName(row.getString("NAME")); task.setGUID(row.getUUID("UUID")); task.setText(1, row.getString("ID")); task.setDuration(row.getDuration("PLANNED_DURATION")); t...
[ "private", "void", "processTask", "(", "ChildTaskContainer", "parent", ",", "MapRow", "row", ")", "throws", "IOException", "{", "Task", "task", "=", "parent", ".", "addTask", "(", ")", ";", "task", ".", "setName", "(", "row", ".", "getString", "(", "\"NAME...
Extract data for a single task. @param parent task parent @param row Synchro task data
[ "Extract", "data", "for", "a", "single", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L286-L354
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
SlaOption.toObject
public Map<String, Object> toObject() { """ Convert the SLA option to the original JSON format, used by {@link SlaOptionDeprecated}. @return the JSON format for {@link SlaOptionDeprecated}. """ final List<String> slaActions = new ArrayList<>(); final Map<String, Object> slaInfo = new HashMap<>(); ...
java
public Map<String, Object> toObject() { final List<String> slaActions = new ArrayList<>(); final Map<String, Object> slaInfo = new HashMap<>(); slaInfo.put(SlaOptionDeprecated.INFO_FLOW_NAME, this.flowName); if (hasAlert()) { slaActions.add(SlaOptionDeprecated.ACTION_ALERT); slaInfo.put(Sla...
[ "public", "Map", "<", "String", ",", "Object", ">", "toObject", "(", ")", "{", "final", "List", "<", "String", ">", "slaActions", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "Map", "<", "String", ",", "Object", ">", "slaInfo", "=", "new", ...
Convert the SLA option to the original JSON format, used by {@link SlaOptionDeprecated}. @return the JSON format for {@link SlaOptionDeprecated}.
[ "Convert", "the", "SLA", "option", "to", "the", "original", "JSON", "format", "used", "by", "{", "@link", "SlaOptionDeprecated", "}", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/sla/SlaOption.java#L212-L256
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java
VelocityUtil.toFile
public static void toFile(String templateFileName, VelocityContext context, String destPath) { """ 生成文件,使用默认引擎 @param templateFileName 模板文件名 @param context 模板上下文 @param destPath 目标路径(绝对) """ assertInit(); toFile(Velocity.getTemplate(templateFileName), context, destPath); }
java
public static void toFile(String templateFileName, VelocityContext context, String destPath) { assertInit(); toFile(Velocity.getTemplate(templateFileName), context, destPath); }
[ "public", "static", "void", "toFile", "(", "String", "templateFileName", ",", "VelocityContext", "context", ",", "String", "destPath", ")", "{", "assertInit", "(", ")", ";", "toFile", "(", "Velocity", ".", "getTemplate", "(", "templateFileName", ")", ",", "con...
生成文件,使用默认引擎 @param templateFileName 模板文件名 @param context 模板上下文 @param destPath 目标路径(绝对)
[ "生成文件,使用默认引擎" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L152-L156
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FileRollEvent.java
FileRollEvent.dispatchToAppender
final void dispatchToAppender(final LoggingEvent customLoggingEvent) { """ Convenience method dispatches the specified event to the source appender, which will result in the custom event data being appended to the new file. @param customLoggingEvent The custom Log4J event to be appended. """ // wrap t...
java
final void dispatchToAppender(final LoggingEvent customLoggingEvent) { // wrap the LoggingEvent in a FileRollEvent to prevent recursion bug final FoundationFileRollingAppender appender = this.getSource(); if (appender != null) { appender.append(new FileRollEvent(customLoggingEvent, this)); } }
[ "final", "void", "dispatchToAppender", "(", "final", "LoggingEvent", "customLoggingEvent", ")", "{", "// wrap the LoggingEvent in a FileRollEvent to prevent recursion bug", "final", "FoundationFileRollingAppender", "appender", "=", "this", ".", "getSource", "(", ")", ";", "if...
Convenience method dispatches the specified event to the source appender, which will result in the custom event data being appended to the new file. @param customLoggingEvent The custom Log4J event to be appended.
[ "Convenience", "method", "dispatches", "the", "specified", "event", "to", "the", "source", "appender", "which", "will", "result", "in", "the", "custom", "event", "data", "being", "appended", "to", "the", "new", "file", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FileRollEvent.java#L150-L156
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/MonitoringProxyActivator.java
MonitoringProxyActivator.createDirectoryEntries
public void createDirectoryEntries(JarOutputStream jarStream, String packageName) throws IOException { """ Create the jar directory entries corresponding to the specified package name. @param jarStream the target jar's output stream @param packageName the target package name @throws IOException if an IO ...
java
public void createDirectoryEntries(JarOutputStream jarStream, String packageName) throws IOException { StringBuilder entryName = new StringBuilder(packageName.length()); for (String str : packageName.split("\\.")) { entryName.append(str).append("/"); JarEntry jarEntry = new JarEn...
[ "public", "void", "createDirectoryEntries", "(", "JarOutputStream", "jarStream", ",", "String", "packageName", ")", "throws", "IOException", "{", "StringBuilder", "entryName", "=", "new", "StringBuilder", "(", "packageName", ".", "length", "(", ")", ")", ";", "for...
Create the jar directory entries corresponding to the specified package name. @param jarStream the target jar's output stream @param packageName the target package name @throws IOException if an IO exception raised while creating the entries
[ "Create", "the", "jar", "directory", "entries", "corresponding", "to", "the", "specified", "package", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/MonitoringProxyActivator.java#L272-L279
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java
KickflipApiClient.stopStream
private void stopStream(User user, Stream stream, final KickflipCallback cb) { """ Stop a Stream owned by the given Kickflip User. @param cb This callback will receive a Stream subclass in #onSuccess(response) depending on the Kickflip account type. Implementors should check if the response is instanceof HlsS...
java
private void stopStream(User user, Stream stream, final KickflipCallback cb) { checkNotNull(stream); // TODO: Add start / stop lat lon to Stream? GenericData data = new GenericData(); data.put("stream_id", stream.getStreamId()); data.put("uuid", user.getUUID()); if (strea...
[ "private", "void", "stopStream", "(", "User", "user", ",", "Stream", "stream", ",", "final", "KickflipCallback", "cb", ")", "{", "checkNotNull", "(", "stream", ")", ";", "// TODO: Add start / stop lat lon to Stream?", "GenericData", "data", "=", "new", "GenericData"...
Stop a Stream owned by the given Kickflip User. @param cb This callback will receive a Stream subclass in #onSuccess(response) depending on the Kickflip account type. Implementors should check if the response is instanceof HlsStream, etc.
[ "Stop", "a", "Stream", "owned", "by", "the", "given", "Kickflip", "User", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java#L370-L383
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ComparableExtensions.java
ComparableExtensions.operator_spaceship
@Pure /* not guaranteed, since compareTo() is invoked */ @Inline("($1.compareTo($2))") public static <C> int operator_spaceship(Comparable<? super C> left, C right) { """ The spaceship operator <code>&lt;=&gt;</code>. @param left a comparable @param right the value to compare with @return <code>left.compa...
java
@Pure /* not guaranteed, since compareTo() is invoked */ @Inline("($1.compareTo($2))") public static <C> int operator_spaceship(Comparable<? super C> left, C right) { return left.compareTo(right); }
[ "@", "Pure", "/* not guaranteed, since compareTo() is invoked */", "@", "Inline", "(", "\"($1.compareTo($2))\"", ")", "public", "static", "<", "C", ">", "int", "operator_spaceship", "(", "Comparable", "<", "?", "super", "C", ">", "left", ",", "C", "right", ")", ...
The spaceship operator <code>&lt;=&gt;</code>. @param left a comparable @param right the value to compare with @return <code>left.compareTo(right)</code> @since 2.4
[ "The", "spaceship", "operator", "<code", ">", "&lt", ";", "=", "&gt", ";", "<", "/", "code", ">", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ComparableExtensions.java#L90-L94
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.registerAbstract
public SerializerRegistry registerAbstract(Class<?> abstractType, int id, TypeSerializerFactory factory) { """ Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param id The serializable type ID. @param...
java
public SerializerRegistry registerAbstract(Class<?> abstractType, int id, TypeSerializerFactory factory) { abstractFactories.put(abstractType, factory); types.put(id, abstractType); ids.put(abstractType, id); return this; }
[ "public", "SerializerRegistry", "registerAbstract", "(", "Class", "<", "?", ">", "abstractType", ",", "int", "id", ",", "TypeSerializerFactory", "factory", ")", "{", "abstractFactories", ".", "put", "(", "abstractType", ",", "factory", ")", ";", "types", ".", ...
Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param id The serializable type ID. @param factory The serializer factory. @return The serializer registry.
[ "Registers", "the", "given", "class", "as", "an", "abstract", "serializer", "for", "the", "given", "abstract", "type", "." ]
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L243-L248
google/closure-templates
java/src/com/google/template/soy/data/ordainers/GsonOrdainer.java
GsonOrdainer.serializeObject
public static SanitizedContent serializeObject(Gson gson, Object obj) { """ Generate sanitized js content with provided Gson serializer. @param gson A Gson serializer. @param obj The object to render as gson. @return SanitizedContent containing the object rendered as a json string. """ return ordainJs...
java
public static SanitizedContent serializeObject(Gson gson, Object obj) { return ordainJson(gson.toJson(obj)); }
[ "public", "static", "SanitizedContent", "serializeObject", "(", "Gson", "gson", ",", "Object", "obj", ")", "{", "return", "ordainJson", "(", "gson", ".", "toJson", "(", "obj", ")", ")", ";", "}" ]
Generate sanitized js content with provided Gson serializer. @param gson A Gson serializer. @param obj The object to render as gson. @return SanitizedContent containing the object rendered as a json string.
[ "Generate", "sanitized", "js", "content", "with", "provided", "Gson", "serializer", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/data/ordainers/GsonOrdainer.java#L58-L60
lindar-open/well-rested-client
src/main/java/com/lindar/wellrested/WellRestedRequestBuilder.java
WellRestedRequestBuilder.globalHeaders
public WellRestedRequestBuilder globalHeaders(Map<String, String> globalHeaders) { """ Use this method to add some global headers to the WellRestedRequest object. These headers are going to be added on every request you make. <br/> A good use for this method is setting a global authentication header or a content...
java
public WellRestedRequestBuilder globalHeaders(Map<String, String> globalHeaders) { this.globalHeaders = WellRestedUtil.buildHeaders(globalHeaders); return this; }
[ "public", "WellRestedRequestBuilder", "globalHeaders", "(", "Map", "<", "String", ",", "String", ">", "globalHeaders", ")", "{", "this", ".", "globalHeaders", "=", "WellRestedUtil", ".", "buildHeaders", "(", "globalHeaders", ")", ";", "return", "this", ";", "}" ...
Use this method to add some global headers to the WellRestedRequest object. These headers are going to be added on every request you make. <br/> A good use for this method is setting a global authentication header or a content type header.
[ "Use", "this", "method", "to", "add", "some", "global", "headers", "to", "the", "WellRestedRequest", "object", ".", "These", "headers", "are", "going", "to", "be", "added", "on", "every", "request", "you", "make", ".", "<br", "/", ">", "A", "good", "use"...
train
https://github.com/lindar-open/well-rested-client/blob/d87542f747cd624e3ce0cdc8230f51836326596b/src/main/java/com/lindar/wellrested/WellRestedRequestBuilder.java#L155-L158
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getIsomorphAtomsMap
public static List<CDKRMap> getIsomorphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { """ Returns the first isomorph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomCo...
java
public static List<CDKRMap> getIsomorphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { if (sourceGraph instanceof IQueryAtomContainer) { throw new CDKException("The first IAtomContainer must not be an IQueryAtomContainer");...
[ "public", "static", "List", "<", "CDKRMap", ">", "getIsomorphAtomsMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "if", "(", "sourceGraph", "instanceof", "IQueryA...
Returns the first isomorph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first isomorph atom mapping found projected on sourceGrap...
[ "Returns", "the", "first", "isomorph", "atom", "mapping", "found", "for", "targetGraph", "in", "sourceGraph", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L221-L236
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcEditService.java
CmsUgcEditService.handleUpload
protected void handleUpload(HttpServletRequest request, HttpServletResponse response) { """ Handles all multipart requests.<p> @param request the request @param response the response """ String sessionIdStr = request.getParameter(CmsUgcConstants.PARAM_SESSION_ID); CmsUUID sessionId = new C...
java
protected void handleUpload(HttpServletRequest request, HttpServletResponse response) { String sessionIdStr = request.getParameter(CmsUgcConstants.PARAM_SESSION_ID); CmsUUID sessionId = new CmsUUID(sessionIdStr); CmsUgcSession session = CmsUgcSessionFactory.getInstance().getSession(request, ses...
[ "protected", "void", "handleUpload", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "String", "sessionIdStr", "=", "request", ".", "getParameter", "(", "CmsUgcConstants", ".", "PARAM_SESSION_ID", ")", ";", "CmsUUID", "sessionId...
Handles all multipart requests.<p> @param request the request @param response the response
[ "Handles", "all", "multipart", "requests", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcEditService.java#L227-L233
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/utils/JaxWsUtils.java
JaxWsUtils.getPortQName
private static QName getPortQName(ClassInfo classInfo, String namespace, String wsName, String wsPortName, String suffix) { """ Get portName. 1.declared portName in web service annotation 2.name in web service annotation + Port 3.service class name + Port. From specification: The portName element of the Web...
java
private static QName getPortQName(ClassInfo classInfo, String namespace, String wsName, String wsPortName, String suffix) { String portName; if (wsPortName != null && !wsPortName.isEmpty()) { portName = wsPortName.trim(); } else { if (wsName != null && !wsName.isEmpty()) ...
[ "private", "static", "QName", "getPortQName", "(", "ClassInfo", "classInfo", ",", "String", "namespace", ",", "String", "wsName", ",", "String", "wsPortName", ",", "String", "suffix", ")", "{", "String", "portName", ";", "if", "(", "wsPortName", "!=", "null", ...
Get portName. 1.declared portName in web service annotation 2.name in web service annotation + Port 3.service class name + Port. From specification: The portName element of the WebService annotation, if present, MUST be used to derive the port name to use in WSDL. In the absence of a portName element, an implementatio...
[ "Get", "portName", ".", "1", ".", "declared", "portName", "in", "web", "service", "annotation", "2", ".", "name", "in", "web", "service", "annotation", "+", "Port", "3", ".", "service", "class", "name", "+", "Port", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/utils/JaxWsUtils.java#L407-L422
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfImportedPage.java
PdfImportedPage.addImage
public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException { """ Always throws an error. This operation is not allowed. @param image dummy @param a dummy @param b dummy @param c dummy @param d dummy @param e dummy @param f dummy @throws DocumentExceptio...
java
public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException { throwError(); }
[ "public", "void", "addImage", "(", "Image", "image", ",", "float", "a", ",", "float", "b", ",", "float", "c", ",", "float", "d", ",", "float", "e", ",", "float", "f", ")", "throws", "DocumentException", "{", "throwError", "(", ")", ";", "}" ]
Always throws an error. This operation is not allowed. @param image dummy @param a dummy @param b dummy @param c dummy @param d dummy @param e dummy @param f dummy @throws DocumentException dummy
[ "Always", "throws", "an", "error", ".", "This", "operation", "is", "not", "allowed", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfImportedPage.java#L97-L99
looly/hutool
hutool-db/src/main/java/cn/hutool/db/StatementUtil.java
StatementUtil.prepareCall
public static CallableStatement prepareCall(Connection conn, String sql, Object... params) throws SQLException { """ 创建{@link CallableStatement} @param conn 数据库连接 @param sql SQL语句,使用"?"做为占位符 @param params "?"对应参数列表 @return {@link CallableStatement} @throws SQLException SQL异常 @since 4.1.13 """ Assert...
java
public static CallableStatement prepareCall(Connection conn, String sql, Object... params) throws SQLException { Assert.notBlank(sql, "Sql String must be not blank!"); sql = sql.trim(); SqlLog.INSTASNCE.log(sql, params); final CallableStatement call = conn.prepareCall(sql); fillParams(call, params); ...
[ "public", "static", "CallableStatement", "prepareCall", "(", "Connection", "conn", ",", "String", "sql", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "Assert", ".", "notBlank", "(", "sql", ",", "\"Sql String must be not blank!\"", ")", ";", ...
创建{@link CallableStatement} @param conn 数据库连接 @param sql SQL语句,使用"?"做为占位符 @param params "?"对应参数列表 @return {@link CallableStatement} @throws SQLException SQL异常 @since 4.1.13
[ "创建", "{", "@link", "CallableStatement", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java#L200-L208
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/SqlpKit.java
SqlpKit.selectOne
public static SqlPara selectOne(ModelExt<?> model, String... columns) { """ make SqlPara use the model with attr datas. @param model @columns fetch columns """ return SqlpKit.select(model, FLAG.ONE, columns); }
java
public static SqlPara selectOne(ModelExt<?> model, String... columns) { return SqlpKit.select(model, FLAG.ONE, columns); }
[ "public", "static", "SqlPara", "selectOne", "(", "ModelExt", "<", "?", ">", "model", ",", "String", "...", "columns", ")", "{", "return", "SqlpKit", ".", "select", "(", "model", ",", "FLAG", ".", "ONE", ",", "columns", ")", ";", "}" ]
make SqlPara use the model with attr datas. @param model @columns fetch columns
[ "make", "SqlPara", "use", "the", "model", "with", "attr", "datas", "." ]
train
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/SqlpKit.java#L124-L126
alipay/sofa-rpc
extension-impl/codec-protobuf/src/main/java/com/alipay/sofa/rpc/codec/protobuf/ProtobufHelper.java
ProtobufHelper.getResClass
public Class getResClass(String service, String methodName) { """ 从缓存中获取返回值类 @param service 接口名 @param methodName 方法名 @return 请求参数类 """ String key = service + "#" + methodName; Class reqClass = responseClassCache.get(key); if (reqClass == null) { // 读取接口里的方法参数和返回值 ...
java
public Class getResClass(String service, String methodName) { String key = service + "#" + methodName; Class reqClass = responseClassCache.get(key); if (reqClass == null) { // 读取接口里的方法参数和返回值 String interfaceClass = ConfigUniqueNameGenerator.getInterfaceName(service); ...
[ "public", "Class", "getResClass", "(", "String", "service", ",", "String", "methodName", ")", "{", "String", "key", "=", "service", "+", "\"#\"", "+", "methodName", ";", "Class", "reqClass", "=", "responseClassCache", ".", "get", "(", "key", ")", ";", "if"...
从缓存中获取返回值类 @param service 接口名 @param methodName 方法名 @return 请求参数类
[ "从缓存中获取返回值类" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/codec-protobuf/src/main/java/com/alipay/sofa/rpc/codec/protobuf/ProtobufHelper.java#L88-L98
vladmihalcea/db-util
src/main/java/com/vladmihalcea/sql/SQLStatementCountValidator.java
SQLStatementCountValidator.assertUpdateCount
public static void assertUpdateCount(long expectedUpdateCount) { """ Assert update statement count @param expectedUpdateCount expected update statement count """ QueryCount queryCount = QueryCountHolder.getGrandTotal(); long recordedUpdateCount = queryCount.getUpdate(); if (expectedU...
java
public static void assertUpdateCount(long expectedUpdateCount) { QueryCount queryCount = QueryCountHolder.getGrandTotal(); long recordedUpdateCount = queryCount.getUpdate(); if (expectedUpdateCount != recordedUpdateCount) { throw new SQLUpdateCountMismatchException(expectedUpdateCoun...
[ "public", "static", "void", "assertUpdateCount", "(", "long", "expectedUpdateCount", ")", "{", "QueryCount", "queryCount", "=", "QueryCountHolder", ".", "getGrandTotal", "(", ")", ";", "long", "recordedUpdateCount", "=", "queryCount", ".", "getUpdate", "(", ")", "...
Assert update statement count @param expectedUpdateCount expected update statement count
[ "Assert", "update", "statement", "count" ]
train
https://github.com/vladmihalcea/db-util/blob/81c8c8421253c9869db1d4e221668d7afbd69fd0/src/main/java/com/vladmihalcea/sql/SQLStatementCountValidator.java#L105-L111
OpenLiberty/open-liberty
dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/BaseTraceFormatter.java
BaseTraceFormatter.consoleLogFormat
public String consoleLogFormat(LogRecord logRecord, String txt) { """ The console log is not structured, and relies on already formatted/translated messages @param logRecord @param txt the result of {@link #formatMessage} @return Formatted string for the console """ StringBuilder sb = new StringB...
java
public String consoleLogFormat(LogRecord logRecord, String txt) { StringBuilder sb = new StringBuilder(256); sb.append(BaseTraceFormatter.levelToString(logRecord.getLevel())); sb.append(txt); Throwable t = logRecord.getThrown(); if (t != null) { String s = t.getLocali...
[ "public", "String", "consoleLogFormat", "(", "LogRecord", "logRecord", ",", "String", "txt", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "256", ")", ";", "sb", ".", "append", "(", "BaseTraceFormatter", ".", "levelToString", "(", "logReco...
The console log is not structured, and relies on already formatted/translated messages @param logRecord @param txt the result of {@link #formatMessage} @return Formatted string for the console
[ "The", "console", "log", "is", "not", "structured", "and", "relies", "on", "already", "formatted", "/", "translated", "messages" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/BaseTraceFormatter.java#L394-L407
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/ExpectSteps.java
ExpectSteps.expectText
@Conditioned @Et("Je m'attends à avoir '(.*)-(.*)' avec le texte '(.*)'[\\.|\\?]") @And("I expect to have '(.*)-(.*)' with the text '(.*)'[\\.|\\?]") public void expectText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException {...
java
@Conditioned @Et("Je m'attends à avoir '(.*)-(.*)' avec le texte '(.*)'[\\.|\\?]") @And("I expect to have '(.*)-(.*)' with the text '(.*)'[\\.|\\?]") public void expectText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException {...
[ "@", "Conditioned", "@", "Et", "(", "\"Je m'attends à avoir '(.*)-(.*)' avec le texte '(.*)'[\\\\.|\\\\?]\")", "", "@", "And", "(", "\"I expect to have '(.*)-(.*)' with the text '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "expectText", "(", "String", "page", ",", "String", ...
Checks if an html element contains expected value. @param page The concerned page of elementName @param elementName The key of the PageElement to check @param textOrKey Is the new data (text or text in context (after a save)) @param conditions list of 'expected' values condition and 'actual' values ({@link com.github....
[ "Checks", "if", "an", "html", "element", "contains", "expected", "value", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/ExpectSteps.java#L51-L56
ontop/ontop
engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java
OneShotSQLGeneratorEngine.getTypeColumnForSELECT
private String getTypeColumnForSELECT(Term ht, AliasIndex index, Optional<TermType> optionalTermType) { """ Infers the type of a projected term. Note this type may differ from the one used for casting the main column (in some special cases). This type will appear as the RDF datatype. @param ht @param index...
java
private String getTypeColumnForSELECT(Term ht, AliasIndex index, Optional<TermType> optionalTermType) { if (ht instanceof Variable) { // Such variable does not hold this information, so we have to look // at the database metadata. return index.getTypeColumn((Variable) ht) .map(QualifiedAttr...
[ "private", "String", "getTypeColumnForSELECT", "(", "Term", "ht", ",", "AliasIndex", "index", ",", "Optional", "<", "TermType", ">", "optionalTermType", ")", "{", "if", "(", "ht", "instanceof", "Variable", ")", "{", "// Such variable does not hold this information, so...
Infers the type of a projected term. Note this type may differ from the one used for casting the main column (in some special cases). This type will appear as the RDF datatype. @param ht @param index Used when the term correspond to a column name @param optionalTermType
[ "Infers", "the", "type", "of", "a", "projected", "term", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java#L1038-L1056
groupon/odo
client/src/main/java/com/groupon/odo/client/Client.java
Client.setOverrideRepeatCount
public boolean setOverrideRepeatCount(String pathName, String methodName, Integer ordinal, Integer repeatCount) { """ Set the repeat count of an override at ordinal index @param pathName Path name @param methodName Fully qualified method name @param ordinal 1-based index of the override within the overrides o...
java
public boolean setOverrideRepeatCount(String pathName, String methodName, Integer ordinal, Integer repeatCount) { try { String methodId = getOverrideIdForMethodName(methodName).toString(); BasicNameValuePair[] params = { new BasicNameValuePair("profileIdentifier", this._p...
[ "public", "boolean", "setOverrideRepeatCount", "(", "String", "pathName", ",", "String", "methodName", ",", "Integer", "ordinal", ",", "Integer", "repeatCount", ")", "{", "try", "{", "String", "methodId", "=", "getOverrideIdForMethodName", "(", "methodName", ")", ...
Set the repeat count of an override at ordinal index @param pathName Path name @param methodName Fully qualified method name @param ordinal 1-based index of the override within the overrides of type methodName @param repeatCount new repeat count to set @return true if success, false otherwise
[ "Set", "the", "repeat", "count", "of", "an", "override", "at", "ordinal", "index" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L652-L667
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectRaySphere
public static boolean intersectRaySphere(Rayf ray, Spheref sphere, Vector2f 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(Rayf ray, Spheref sphere, Vector2f 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", "(", "Rayf", "ray", ",", "Spheref", "sphere", ",", "Vector2f", "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/Intersectionf.java#L2134-L2136
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_feature_duration_GET
public OvhOrder dedicated_server_serviceName_feature_duration_GET(String serviceName, String duration, OvhOrderableSysFeatureEnum feature) throws IOException { """ Get prices and contracts information REST: GET /order/dedicated/server/{serviceName}/feature/{duration} @param feature [required] the feature @par...
java
public OvhOrder dedicated_server_serviceName_feature_duration_GET(String serviceName, String duration, OvhOrderableSysFeatureEnum feature) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/feature/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "feature", fea...
[ "public", "OvhOrder", "dedicated_server_serviceName_feature_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhOrderableSysFeatureEnum", "feature", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName}/...
Get prices and contracts information REST: GET /order/dedicated/server/{serviceName}/feature/{duration} @param feature [required] the feature @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2209-L2215
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/SoundStore.java
SoundStore.getAIF
public Audio getAIF(String ref) throws IOException { """ Get the Sound based on a specified AIF file @param ref The reference to the AIF file in the classpath @return The Sound read from the AIF file @throws IOException Indicates a failure to load the AIF """ return getAIF(ref, ResourceLoader.getResour...
java
public Audio getAIF(String ref) throws IOException { return getAIF(ref, ResourceLoader.getResourceAsStream(ref)); }
[ "public", "Audio", "getAIF", "(", "String", "ref", ")", "throws", "IOException", "{", "return", "getAIF", "(", "ref", ",", "ResourceLoader", ".", "getResourceAsStream", "(", "ref", ")", ")", ";", "}" ]
Get the Sound based on a specified AIF file @param ref The reference to the AIF file in the classpath @return The Sound read from the AIF file @throws IOException Indicates a failure to load the AIF
[ "Get", "the", "Sound", "based", "on", "a", "specified", "AIF", "file" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/SoundStore.java#L595-L597
trellis-ldp-archive/trellis-http
src/main/java/org/trellisldp/http/impl/RdfUtils.java
RdfUtils.getDefaultProfile
public static IRI getDefaultProfile(final RDFSyntax syntax, final String identifier) { """ Get a default profile IRI from the syntax and/or identifier @param syntax the RDF syntax @param identifier the resource identifier @return a profile IRI usable by the output streamer """ return getDefaultProfi...
java
public static IRI getDefaultProfile(final RDFSyntax syntax, final String identifier) { return getDefaultProfile(syntax, rdf.createIRI(identifier)); }
[ "public", "static", "IRI", "getDefaultProfile", "(", "final", "RDFSyntax", "syntax", ",", "final", "String", "identifier", ")", "{", "return", "getDefaultProfile", "(", "syntax", ",", "rdf", ".", "createIRI", "(", "identifier", ")", ")", ";", "}" ]
Get a default profile IRI from the syntax and/or identifier @param syntax the RDF syntax @param identifier the resource identifier @return a profile IRI usable by the output streamer
[ "Get", "a", "default", "profile", "IRI", "from", "the", "syntax", "and", "/", "or", "identifier" ]
train
https://github.com/trellis-ldp-archive/trellis-http/blob/bc762f88602c49c2b137a7adf68d576666e55fff/src/main/java/org/trellisldp/http/impl/RdfUtils.java#L230-L232
darylteo/directory-watcher
src/main/java/com/darylteo/nio/AbstractDirectoryWatchService.java
AbstractDirectoryWatchService.newWatcher
public DirectoryWatcher newWatcher(Path dir, String separator) throws IOException { """ <p> Instantiates a new DirectoryWatcher for the path given. </p> @param dir the path to watch for events. @param separator the file path separator for this watcher @return a DirectoryWatcher for this path (and all ...
java
public DirectoryWatcher newWatcher(Path dir, String separator) throws IOException { DirectoryWatcher watcher = new DirectoryWatcher(this.watchService, dir, separator); addWatcher(watcher); return watcher; }
[ "public", "DirectoryWatcher", "newWatcher", "(", "Path", "dir", ",", "String", "separator", ")", "throws", "IOException", "{", "DirectoryWatcher", "watcher", "=", "new", "DirectoryWatcher", "(", "this", ".", "watchService", ",", "dir", ",", "separator", ")", ";"...
<p> Instantiates a new DirectoryWatcher for the path given. </p> @param dir the path to watch for events. @param separator the file path separator for this watcher @return a DirectoryWatcher for this path (and all child paths) @throws IOException
[ "<p", ">", "Instantiates", "a", "new", "DirectoryWatcher", "for", "the", "path", "given", ".", "<", "/", "p", ">" ]
train
https://github.com/darylteo/directory-watcher/blob/c1144366dcf58443073c0a67d1a5f6535ac5e8d8/src/main/java/com/darylteo/nio/AbstractDirectoryWatchService.java#L93-L98
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskLog.java
TaskLog.addCommand
public static String addCommand(List<String> cmd, boolean isExecutable) throws IOException { """ Add quotes to each of the command strings and return as a single string @param cmd The command to be quoted @param isExecutable makes shell path if the first argument is executable @return returns The quoted st...
java
public static String addCommand(List<String> cmd, boolean isExecutable) throws IOException { StringBuffer command = new StringBuffer(); for(String s: cmd) { command.append('\''); if (isExecutable) { // the executable name needs to be expressed as a shell path for the // shell to ...
[ "public", "static", "String", "addCommand", "(", "List", "<", "String", ">", "cmd", ",", "boolean", "isExecutable", ")", "throws", "IOException", "{", "StringBuffer", "command", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "String", "s", ":", "cm...
Add quotes to each of the command strings and return as a single string @param cmd The command to be quoted @param isExecutable makes shell path if the first argument is executable @return returns The quoted string. @throws IOException
[ "Add", "quotes", "to", "each", "of", "the", "command", "strings", "and", "return", "as", "a", "single", "string" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskLog.java#L685-L702
sannies/mp4parser
streaming/src/main/java/org/mp4parser/streaming/output/mp4/StandardMp4Writer.java
StandardMp4Writer.isChunkReady
protected boolean isChunkReady(StreamingTrack streamingTrack, StreamingSample next) { """ Tests if the currently received samples for a given track are already a 'chunk' as we want to have it. The next sample will not be part of the chunk will be added to the fragment buffer later. @param streamingTrack trac...
java
protected boolean isChunkReady(StreamingTrack streamingTrack, StreamingSample next) { long ts = nextSampleStartTime.get(streamingTrack); long cfst = nextChunkCreateStartTime.get(streamingTrack); return (ts >= cfst + 2 * streamingTrack.getTimescale()); // chunk interleave of 2 seconds ...
[ "protected", "boolean", "isChunkReady", "(", "StreamingTrack", "streamingTrack", ",", "StreamingSample", "next", ")", "{", "long", "ts", "=", "nextSampleStartTime", ".", "get", "(", "streamingTrack", ")", ";", "long", "cfst", "=", "nextChunkCreateStartTime", ".", ...
Tests if the currently received samples for a given track are already a 'chunk' as we want to have it. The next sample will not be part of the chunk will be added to the fragment buffer later. @param streamingTrack track to test @param next the lastest samples @return true if a chunk is to b e created.
[ "Tests", "if", "the", "currently", "received", "samples", "for", "a", "given", "track", "are", "already", "a", "chunk", "as", "we", "want", "to", "have", "it", ".", "The", "next", "sample", "will", "not", "be", "part", "of", "the", "chunk", "will", "be...
train
https://github.com/sannies/mp4parser/blob/3382ff5d489363900f352a8da0f794a20ad3b063/streaming/src/main/java/org/mp4parser/streaming/output/mp4/StandardMp4Writer.java#L181-L187
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/MessagingJBossASClient.java
MessagingJBossASClient.createNewQueueRequest
public ModelNode createNewQueueRequest(String name, Boolean durable, List<String> entryNames) { """ Returns a ModelNode that can be used to create a queue. Callers are free to tweak the queue request that is returned, if they so choose, before asking the client to execute the request. @param name the queue na...
java
public ModelNode createNewQueueRequest(String name, Boolean durable, List<String> entryNames) { String dmrTemplate = "" // + "{" // + "\"durable\" => \"%s\", " // + "\"entries\" => [\"%s\"] " // + "}"; String dmr = String.format(dmrTemplate, ((null == du...
[ "public", "ModelNode", "createNewQueueRequest", "(", "String", "name", ",", "Boolean", "durable", ",", "List", "<", "String", ">", "entryNames", ")", "{", "String", "dmrTemplate", "=", "\"\"", "//", "+", "\"{\"", "//", "+", "\"\\\"durable\\\" => \\\"%s\\\", \"", ...
Returns a ModelNode that can be used to create a queue. Callers are free to tweak the queue request that is returned, if they so choose, before asking the client to execute the request. @param name the queue name @param durable if null, default is "true" @param entryNames the jndiNames, each is prefixed with 'java:/'....
[ "Returns", "a", "ModelNode", "that", "can", "be", "used", "to", "create", "a", "queue", ".", "Callers", "are", "free", "to", "tweak", "the", "queue", "request", "that", "is", "returned", "if", "they", "so", "choose", "before", "asking", "the", "client", ...
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/MessagingJBossASClient.java#L64-L80
UrielCh/ovh-java-sdk
ovh-java-sdk-newAccount/src/main/java/net/minidev/ovh/api/ApiOvhNewAccount.java
ApiOvhNewAccount.creationRules_GET
public OvhCreationRules creationRules_GET(OvhCountryEnum country, OvhLegalFormEnum legalform, OvhOvhCompanyEnum ovhCompany, OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException { """ Give all the rules to follow in order to create an OVH identifier REST: GET /newAccount/creationRules @param legalform [requir...
java
public OvhCreationRules creationRules_GET(OvhCountryEnum country, OvhLegalFormEnum legalform, OvhOvhCompanyEnum ovhCompany, OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException { String qPath = "/newAccount/creationRules"; StringBuilder sb = path(qPath); query(sb, "country", country); query(sb, "legalform", l...
[ "public", "OvhCreationRules", "creationRules_GET", "(", "OvhCountryEnum", "country", ",", "OvhLegalFormEnum", "legalform", ",", "OvhOvhCompanyEnum", "ovhCompany", ",", "OvhOvhSubsidiaryEnum", "ovhSubsidiary", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/...
Give all the rules to follow in order to create an OVH identifier REST: GET /newAccount/creationRules @param legalform [required] @param ovhCompany [required] @param ovhSubsidiary [required] @param country [required]
[ "Give", "all", "the", "rules", "to", "follow", "in", "order", "to", "create", "an", "OVH", "identifier" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-newAccount/src/main/java/net/minidev/ovh/api/ApiOvhNewAccount.java#L167-L176
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java
Bean.setScratchData
public void setScratchData(ScratchBank bank, byte[] data) { """ Set a scratch bank data value with raw bytes. @param bank The {@link com.punchthrough.bean.sdk.message.ScratchBank} being set @param data The bytes to write into the scratch bank """ ScratchData sd = ScratchData.create(bank, data); ...
java
public void setScratchData(ScratchBank bank, byte[] data) { ScratchData sd = ScratchData.create(bank, data); sendMessage(BeanMessageID.BT_SET_SCRATCH, sd); }
[ "public", "void", "setScratchData", "(", "ScratchBank", "bank", ",", "byte", "[", "]", "data", ")", "{", "ScratchData", "sd", "=", "ScratchData", ".", "create", "(", "bank", ",", "data", ")", ";", "sendMessage", "(", "BeanMessageID", ".", "BT_SET_SCRATCH", ...
Set a scratch bank data value with raw bytes. @param bank The {@link com.punchthrough.bean.sdk.message.ScratchBank} being set @param data The bytes to write into the scratch bank
[ "Set", "a", "scratch", "bank", "data", "value", "with", "raw", "bytes", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java#L926-L929
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_exchangeLite_options_isEmailAvailable_GET
public Boolean packName_exchangeLite_options_isEmailAvailable_GET(String packName, String email) throws IOException { """ Check if the email address is available for service creation REST: GET /pack/xdsl/{packName}/exchangeLite/options/isEmailAvailable @param email [required] Email @param packName [required] ...
java
public Boolean packName_exchangeLite_options_isEmailAvailable_GET(String packName, String email) throws IOException { String qPath = "/pack/xdsl/{packName}/exchangeLite/options/isEmailAvailable"; StringBuilder sb = path(qPath, packName); query(sb, "email", email); String resp = exec(qPath, "GET", sb.toString(),...
[ "public", "Boolean", "packName_exchangeLite_options_isEmailAvailable_GET", "(", "String", "packName", ",", "String", "email", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}/exchangeLite/options/isEmailAvailable\"", ";", "StringBuilder", "sb"...
Check if the email address is available for service creation REST: GET /pack/xdsl/{packName}/exchangeLite/options/isEmailAvailable @param email [required] Email @param packName [required] The internal name of your pack
[ "Check", "if", "the", "email", "address", "is", "available", "for", "service", "creation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L604-L610
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.buildCoverage
public static GridCoverage2D buildCoverage( String name, WritableRaster writableRaster, HashMap<String, Double> envelopeParams, CoordinateReferenceSystem crs ) { """ Creates a {@link GridCoverage2D coverage} from the {@link WritableRaster writable raster} and the necessary geographic Information. @p...
java
public static GridCoverage2D buildCoverage( String name, WritableRaster writableRaster, HashMap<String, Double> envelopeParams, CoordinateReferenceSystem crs ) { if (writableRaster instanceof GrassLegacyWritableRaster) { GrassLegacyWritableRaster wRaster = (GrassLegacyWritableRaster) wri...
[ "public", "static", "GridCoverage2D", "buildCoverage", "(", "String", "name", ",", "WritableRaster", "writableRaster", ",", "HashMap", "<", "String", ",", "Double", ">", "envelopeParams", ",", "CoordinateReferenceSystem", "crs", ")", "{", "if", "(", "writableRaster"...
Creates a {@link GridCoverage2D coverage} from the {@link WritableRaster writable raster} and the necessary geographic Information. @param name the name of the coverage. @param writableRaster the raster containing the data. @param envelopeParams the map of boundary parameters. @param crs the {@link CoordinateReference...
[ "Creates", "a", "{", "@link", "GridCoverage2D", "coverage", "}", "from", "the", "{", "@link", "WritableRaster", "writable", "raster", "}", "and", "the", "necessary", "geographic", "Information", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L885-L909
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/Link.java
Link.fromSpanContext
public static Link fromSpanContext(SpanContext context, Type type) { """ Returns a new {@code Link}. @param context the context of the linked {@code Span}. @param type the type of the relationship with the linked {@code Span}. @return a new {@code Link}. @since 0.5 """ return new AutoValue_Link(conte...
java
public static Link fromSpanContext(SpanContext context, Type type) { return new AutoValue_Link(context.getTraceId(), context.getSpanId(), type, EMPTY_ATTRIBUTES); }
[ "public", "static", "Link", "fromSpanContext", "(", "SpanContext", "context", ",", "Type", "type", ")", "{", "return", "new", "AutoValue_Link", "(", "context", ".", "getTraceId", "(", ")", ",", "context", ".", "getSpanId", "(", ")", ",", "type", ",", "EMPT...
Returns a new {@code Link}. @param context the context of the linked {@code Span}. @param type the type of the relationship with the linked {@code Span}. @return a new {@code Link}. @since 0.5
[ "Returns", "a", "new", "{", "@code", "Link", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/Link.java#L69-L71
apache/incubator-zipkin
zipkin-collector/core/src/main/java/zipkin2/collector/CollectorSampler.java
CollectorSampler.isSampled
public boolean isSampled(String hexTraceId, boolean debug) { """ Returns true if spans with this trace ID should be recorded to storage. <p>Zipkin v1 allows storage-layer sampling, which can help prevent spikes in traffic from overloading the system. Debug spans are always stored. <p>This uses only the lowe...
java
public boolean isSampled(String hexTraceId, boolean debug) { if (Boolean.TRUE.equals(debug)) return true; long traceId = HexCodec.lowerHexToUnsignedLong(hexTraceId); // The absolute value of Long.MIN_VALUE is larger than a long, so Math.abs returns identity. // This converts to MAX_VALUE to avoid always...
[ "public", "boolean", "isSampled", "(", "String", "hexTraceId", ",", "boolean", "debug", ")", "{", "if", "(", "Boolean", ".", "TRUE", ".", "equals", "(", "debug", ")", ")", "return", "true", ";", "long", "traceId", "=", "HexCodec", ".", "lowerHexToUnsignedL...
Returns true if spans with this trace ID should be recorded to storage. <p>Zipkin v1 allows storage-layer sampling, which can help prevent spikes in traffic from overloading the system. Debug spans are always stored. <p>This uses only the lower 64 bits of the trace ID as instrumentation still send mixed trace ID widt...
[ "Returns", "true", "if", "spans", "with", "this", "trace", "ID", "should", "be", "recorded", "to", "storage", "." ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-collector/core/src/main/java/zipkin2/collector/CollectorSampler.java#L66-L73
zeroturnaround/zt-exec
src/main/java/org/zeroturnaround/exec/ProcessExecutor.java
ProcessExecutor.wrapTask
protected <T> Callable<T> wrapTask(Callable<T> task) { """ Override this to customize how the background task is created. @param <T> the type of the Task @param task the Task to be wrapped @return the wrapped task """ // Preserve the MDC context of the caller thread. Map contextMap = MDC.getCopyOf...
java
protected <T> Callable<T> wrapTask(Callable<T> task) { // Preserve the MDC context of the caller thread. Map contextMap = MDC.getCopyOfContextMap(); if (contextMap != null) { return new MDCCallableAdapter(task, contextMap); } return task; }
[ "protected", "<", "T", ">", "Callable", "<", "T", ">", "wrapTask", "(", "Callable", "<", "T", ">", "task", ")", "{", "// Preserve the MDC context of the caller thread.", "Map", "contextMap", "=", "MDC", ".", "getCopyOfContextMap", "(", ")", ";", "if", "(", "...
Override this to customize how the background task is created. @param <T> the type of the Task @param task the Task to be wrapped @return the wrapped task
[ "Override", "this", "to", "customize", "how", "the", "background", "task", "is", "created", "." ]
train
https://github.com/zeroturnaround/zt-exec/blob/6c3b93b99bf3c69c9f41d6350bf7707005b6a4cd/src/main/java/org/zeroturnaround/exec/ProcessExecutor.java#L1179-L1186
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/URI.java
URI.setFragment
public void setFragment(String p_fragment) throws MalformedURIException { """ Set the fragment for this URI. A non-null value is valid only if this is a URI conforming to the generic URI syntax and the path value is not null. @param p_fragment the fragment for this URI @throws MalformedURIException if p_fr...
java
public void setFragment(String p_fragment) throws MalformedURIException { if (p_fragment == null) { m_fragment = null; } else if (!isGenericURI()) { throw new MalformedURIException( XMLMessages.createXMLMessage(XMLErrorResources.ER_FRAG_FOR_GENERIC_URI, null)); //"Fragment can...
[ "public", "void", "setFragment", "(", "String", "p_fragment", ")", "throws", "MalformedURIException", "{", "if", "(", "p_fragment", "==", "null", ")", "{", "m_fragment", "=", "null", ";", "}", "else", "if", "(", "!", "isGenericURI", "(", ")", ")", "{", "...
Set the fragment for this URI. A non-null value is valid only if this is a URI conforming to the generic URI syntax and the path value is not null. @param p_fragment the fragment for this URI @throws MalformedURIException if p_fragment is not null and this URI does not conform to the generic URI syntax or if the path...
[ "Set", "the", "fragment", "for", "this", "URI", ".", "A", "non", "-", "null", "value", "is", "valid", "only", "if", "this", "is", "a", "URI", "conforming", "to", "the", "generic", "URI", "syntax", "and", "the", "path", "value", "is", "not", "null", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/URI.java#L1306-L1331
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF3.java
CommonOps_DDF3.elementDiv
public static void elementDiv( DMatrix3 a , DMatrix3 b) { """ <p>Performs an element by element division operation:<br> <br> a<sub>i</sub> = a<sub>i</sub> / b<sub>i</sub> <br> </p> @param a The left vector in the division operation. Modified. @param b The right vector in the division operation. Not modified. ...
java
public static void elementDiv( DMatrix3 a , DMatrix3 b) { a.a1 /= b.a1; a.a2 /= b.a2; a.a3 /= b.a3; }
[ "public", "static", "void", "elementDiv", "(", "DMatrix3", "a", ",", "DMatrix3", "b", ")", "{", "a", ".", "a1", "/=", "b", ".", "a1", ";", "a", ".", "a2", "/=", "b", ".", "a2", ";", "a", ".", "a3", "/=", "b", ".", "a3", ";", "}" ]
<p>Performs an element by element division operation:<br> <br> a<sub>i</sub> = a<sub>i</sub> / b<sub>i</sub> <br> </p> @param a The left vector in the division operation. Modified. @param b The right vector in the division operation. Not modified.
[ "<p", ">", "Performs", "an", "element", "by", "element", "division", "operation", ":", "<br", ">", "<br", ">", "a<sub", ">", "i<", "/", "sub", ">", "=", "a<sub", ">", "i<", "/", "sub", ">", "/", "b<sub", ">", "i<", "/", "sub", ">", "<br", ">", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF3.java#L1111-L1115
CodeNarc/CodeNarc
src/main/java/org/codenarc/util/AstUtil.java
AstUtil.isConstructorCall
public static boolean isConstructorCall(Expression expression, String classNamePattern) { """ Return true if the expression is a constructor call on a class that matches the supplied. @param expression - the expression @param classNamePattern - the possible List of class names @return as described """ ...
java
public static boolean isConstructorCall(Expression expression, String classNamePattern) { return expression instanceof ConstructorCallExpression && expression.getType().getName().matches(classNamePattern); }
[ "public", "static", "boolean", "isConstructorCall", "(", "Expression", "expression", ",", "String", "classNamePattern", ")", "{", "return", "expression", "instanceof", "ConstructorCallExpression", "&&", "expression", ".", "getType", "(", ")", ".", "getName", "(", ")...
Return true if the expression is a constructor call on a class that matches the supplied. @param expression - the expression @param classNamePattern - the possible List of class names @return as described
[ "Return", "true", "if", "the", "expression", "is", "a", "constructor", "call", "on", "a", "class", "that", "matches", "the", "supplied", "." ]
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/util/AstUtil.java#L462-L464