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
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/option/mapper/StringConverter.java
StringConverter.parseEnum
@SuppressWarnings("unchecked") private static Enum parseEnum(final String value) { """ Parse enum from full definition: enumClass.enumValue. @param value full enum definition @return parsed enum """ final int idx = value.lastIndexOf('.'); try { final Class type = Class.forNa...
java
@SuppressWarnings("unchecked") private static Enum parseEnum(final String value) { final int idx = value.lastIndexOf('.'); try { final Class type = Class.forName(value.substring(0, idx)); if (!type.isEnum()) { throw new IllegalStateException("Type " + type.get...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "Enum", "parseEnum", "(", "final", "String", "value", ")", "{", "final", "int", "idx", "=", "value", ".", "lastIndexOf", "(", "'", "'", ")", ";", "try", "{", "final", "Class", "type...
Parse enum from full definition: enumClass.enumValue. @param value full enum definition @return parsed enum
[ "Parse", "enum", "from", "full", "definition", ":", "enumClass", ".", "enumValue", "." ]
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/option/mapper/StringConverter.java#L109-L121
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setSchedulingOptions
public Operation setSchedulingOptions(SchedulingOptions scheduling, OperationOption... options) { """ Sets the scheduling options for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure """ re...
java
public Operation setSchedulingOptions(SchedulingOptions scheduling, OperationOption... options) { return compute.setSchedulingOptions(getInstanceId(), scheduling, options); }
[ "public", "Operation", "setSchedulingOptions", "(", "SchedulingOptions", "scheduling", ",", "OperationOption", "...", "options", ")", "{", "return", "compute", ".", "setSchedulingOptions", "(", "getInstanceId", "(", ")", ",", "scheduling", ",", "options", ")", ";", ...
Sets the scheduling options for this instance. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "scheduling", "options", "for", "this", "instance", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L382-L384
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/util/TypeUtil.java
TypeUtil.getSuperType
public static Type getSuperType(Type subType, Class<?> rawSuperType) { """ Get the super type for a type in its super type chain, which has a raw class that matches the specified class. @param subType the sub type to find super type for @param rawSuperType the raw class for the super type @return the super t...
java
public static Type getSuperType(Type subType, Class<?> rawSuperType) { while (subType != null && getRawClass(subType) != rawSuperType) { subType = getSuperType(subType); } return subType; }
[ "public", "static", "Type", "getSuperType", "(", "Type", "subType", ",", "Class", "<", "?", ">", "rawSuperType", ")", "{", "while", "(", "subType", "!=", "null", "&&", "getRawClass", "(", "subType", ")", "!=", "rawSuperType", ")", "{", "subType", "=", "g...
Get the super type for a type in its super type chain, which has a raw class that matches the specified class. @param subType the sub type to find super type for @param rawSuperType the raw class for the super type @return the super type that matches the requirement
[ "Get", "the", "super", "type", "for", "a", "type", "in", "its", "super", "type", "chain", "which", "has", "a", "raw", "class", "that", "matches", "the", "specified", "class", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/util/TypeUtil.java#L126-L131
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
Execution.triggerCheckpoint
public void triggerCheckpoint(long checkpointId, long timestamp, CheckpointOptions checkpointOptions) { """ Trigger a new checkpoint on the task of this execution. @param checkpointId of th checkpoint to trigger @param timestamp of the checkpoint to trigger @param checkpointOptions of the checkpoint to trigge...
java
public void triggerCheckpoint(long checkpointId, long timestamp, CheckpointOptions checkpointOptions) { triggerCheckpointHelper(checkpointId, timestamp, checkpointOptions, false); }
[ "public", "void", "triggerCheckpoint", "(", "long", "checkpointId", ",", "long", "timestamp", ",", "CheckpointOptions", "checkpointOptions", ")", "{", "triggerCheckpointHelper", "(", "checkpointId", ",", "timestamp", ",", "checkpointOptions", ",", "false", ")", ";", ...
Trigger a new checkpoint on the task of this execution. @param checkpointId of th checkpoint to trigger @param timestamp of the checkpoint to trigger @param checkpointOptions of the checkpoint to trigger
[ "Trigger", "a", "new", "checkpoint", "on", "the", "task", "of", "this", "execution", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java#L868-L870
roboconf/roboconf-platform
core/roboconf-plugin-script/src/main/java/net/roboconf/plugin/script/internal/PluginScript.java
PluginScript.generateTemplate
protected File generateTemplate(File template, Instance instance) throws IOException { """ Generates a file from the template and the instance. @param template @param instance @return the generated file @throws IOException """ String scriptName = instance.getName().replace( "\\s+", "_" ); File generat...
java
protected File generateTemplate(File template, Instance instance) throws IOException { String scriptName = instance.getName().replace( "\\s+", "_" ); File generated = File.createTempFile( scriptName, ".script"); InstanceTemplateHelper.injectInstanceImports(instance, template, generated); return generated; }
[ "protected", "File", "generateTemplate", "(", "File", "template", ",", "Instance", "instance", ")", "throws", "IOException", "{", "String", "scriptName", "=", "instance", ".", "getName", "(", ")", ".", "replace", "(", "\"\\\\s+\"", ",", "\"_\"", ")", ";", "F...
Generates a file from the template and the instance. @param template @param instance @return the generated file @throws IOException
[ "Generates", "a", "file", "from", "the", "template", "and", "the", "instance", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-script/src/main/java/net/roboconf/plugin/script/internal/PluginScript.java#L215-L222
classgraph/classgraph
src/main/java/io/github/classgraph/Classfile.java
Classfile.getConstantPoolString
private String getConstantPoolString(final int cpIdx, final int subFieldIdx) throws ClassfileFormatException, IOException { """ Get a string from the constant pool. @param cpIdx the constant pool index @param subFieldIdx should be 0 for CONSTANT_Utf8, CONSTANT_Class and CONSTANT_String, and for ...
java
private String getConstantPoolString(final int cpIdx, final int subFieldIdx) throws ClassfileFormatException, IOException { final int constantPoolStringOffset = getConstantPoolStringOffset(cpIdx, subFieldIdx); return constantPoolStringOffset == 0 ? null : intern(inputStreamOr...
[ "private", "String", "getConstantPoolString", "(", "final", "int", "cpIdx", ",", "final", "int", "subFieldIdx", ")", "throws", "ClassfileFormatException", ",", "IOException", "{", "final", "int", "constantPoolStringOffset", "=", "getConstantPoolStringOffset", "(", "cpId...
Get a string from the constant pool. @param cpIdx the constant pool index @param subFieldIdx should be 0 for CONSTANT_Utf8, CONSTANT_Class and CONSTANT_String, and for CONSTANT_NameAndType_info, fetches the name for value 0, or the type descriptor for value 1. @return the constant pool string @throws ClassfileFormatEx...
[ "Get", "a", "string", "from", "the", "constant", "pool", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Classfile.java#L569-L575
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.createOrUpdateAsync
public Observable<VirtualNetworkGatewayConnectionInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { """ Creates or updates a virtual network gateway connection in the specified resource group. @param resourceGroupNa...
java
public Observable<VirtualNetworkGatewayConnectionInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).m...
[ "public", "Observable", "<", "VirtualNetworkGatewayConnectionInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "VirtualNetworkGatewayConnectionInner", "parameters", ")", "{", "return", "createOrUpdat...
Creates or updates a virtual network gateway connection in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. @param parameters Parameters supplied to the create or update virtual network ...
[ "Creates", "or", "updates", "a", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L166-L173
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java
MemoryFileManager.getJavaFileForOutput
@Override public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, Kind kind, FileObject sibling) throws IOException { """ Returns a {@linkplain JavaFileObject file object} for output representing the specified class of the specified kind in the given locati...
java
@Override public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, Kind kind, FileObject sibling) throws IOException { OutputMemoryJavaFileObject fo; fo = new OutputMemoryJavaFileObject(className, kind); classObjects.put(className, fo); ...
[ "@", "Override", "public", "JavaFileObject", "getJavaFileForOutput", "(", "JavaFileManager", ".", "Location", "location", ",", "String", "className", ",", "Kind", "kind", ",", "FileObject", "sibling", ")", "throws", "IOException", "{", "OutputMemoryJavaFileObject", "f...
Returns a {@linkplain JavaFileObject file object} for output representing the specified class of the specified kind in the given location. <p>Optionally, this file manager might consider the sibling as a hint for where to place the output. The exact semantics of this hint is unspecified. The JDK compiler, javac, for...
[ "Returns", "a", "{", "@linkplain", "JavaFileObject", "file", "object", "}", "for", "output", "representing", "the", "specified", "class", "of", "the", "specified", "kind", "in", "the", "given", "location", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java#L428-L440
Gagravarr/VorbisJava
core/src/main/java/org/gagravarr/ogg/OggPacketWriter.java
OggPacketWriter.bufferPacket
public void bufferPacket(OggPacket packet, long granulePosition) { """ Buffers the given packet up ready for writing to the stream, but doesn't write it to disk yet. The granule position is updated on the page. If writing the packet requires a new page, then the updated granule position only applies to the n...
java
public void bufferPacket(OggPacket packet, long granulePosition) { if(closed) { throw new IllegalStateException("Can't buffer packets on a closed stream!"); } if(! doneFirstPacket) { packet.setIsBOS(); doneFirstPacket = true; } int size = pack...
[ "public", "void", "bufferPacket", "(", "OggPacket", "packet", ",", "long", "granulePosition", ")", "{", "if", "(", "closed", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Can't buffer packets on a closed stream!\"", ")", ";", "}", "if", "(", "!", "d...
Buffers the given packet up ready for writing to the stream, but doesn't write it to disk yet. The granule position is updated on the page. If writing the packet requires a new page, then the updated granule position only applies to the new page
[ "Buffers", "the", "given", "packet", "up", "ready", "for", "writing", "to", "the", "stream", "but", "doesn", "t", "write", "it", "to", "disk", "yet", ".", "The", "granule", "position", "is", "updated", "on", "the", "page", ".", "If", "writing", "the", ...
train
https://github.com/Gagravarr/VorbisJava/blob/22b4d645b00386d59d17a336a2bc9d54db08df16/core/src/main/java/org/gagravarr/ogg/OggPacketWriter.java#L89-L115
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/curves/DiscountCurveInterpolation.java
DiscountCurveInterpolation.createDiscountFactorsFromForwardRates
public static DiscountCurve createDiscountFactorsFromForwardRates(String name, TimeDiscretization tenor, double[] forwardRates) { """ Create a discount curve from given time discretization and forward rates. This function is provided for "single interest rate curve" frameworks. @param name The name of this dis...
java
public static DiscountCurve createDiscountFactorsFromForwardRates(String name, TimeDiscretization tenor, double[] forwardRates) { DiscountCurveInterpolation discountFactors = new DiscountCurveInterpolation(name); double df = 1.0; for(int timeIndex=0; timeIndex<tenor.getNumberOfTimeSteps();timeIndex++) { df /=...
[ "public", "static", "DiscountCurve", "createDiscountFactorsFromForwardRates", "(", "String", "name", ",", "TimeDiscretization", "tenor", ",", "double", "[", "]", "forwardRates", ")", "{", "DiscountCurveInterpolation", "discountFactors", "=", "new", "DiscountCurveInterpolati...
Create a discount curve from given time discretization and forward rates. This function is provided for "single interest rate curve" frameworks. @param name The name of this discount curve. @param tenor Time discretization for the forward rates @param forwardRates Array of forward rates. @return A new discount curve o...
[ "Create", "a", "discount", "curve", "from", "given", "time", "discretization", "and", "forward", "rates", ".", "This", "function", "is", "provided", "for", "single", "interest", "rate", "curve", "frameworks", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/DiscountCurveInterpolation.java#L374-L384
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableKeysAndAttributes.java
TableKeysAndAttributes.addHashOnlyPrimaryKeys
public TableKeysAndAttributes addHashOnlyPrimaryKeys(String hashKeyName, Object ... hashKeyValues) { """ Adds multiple hash-only primary keys to be included in the batch get-item operation. @param hashKeyName name of the hash key attribute name @param hashKeyValues multiple hash key values @retur...
java
public TableKeysAndAttributes addHashOnlyPrimaryKeys(String hashKeyName, Object ... hashKeyValues) { for (Object hashKeyValue: hashKeyValues) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); } return this; }
[ "public", "TableKeysAndAttributes", "addHashOnlyPrimaryKeys", "(", "String", "hashKeyName", ",", "Object", "...", "hashKeyValues", ")", "{", "for", "(", "Object", "hashKeyValue", ":", "hashKeyValues", ")", "{", "this", ".", "addPrimaryKey", "(", "new", "PrimaryKey",...
Adds multiple hash-only primary keys to be included in the batch get-item operation. @param hashKeyName name of the hash key attribute name @param hashKeyValues multiple hash key values @return the current instance for method chaining purposes
[ "Adds", "multiple", "hash", "-", "only", "primary", "keys", "to", "be", "included", "in", "the", "batch", "get", "-", "item", "operation", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableKeysAndAttributes.java#L169-L175
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java
SeaGlassInternalShadowEffect.getLeftShadowGradient
public Paint getLeftShadowGradient(Shape s) { """ Create the gradient for the left of a rectangular shadow. @param s the shape of the gradient. This is only used for its bounds. @return the gradient. """ Rectangle2D bounds = s.getBounds2D(); float minX = (float) bounds.getMinX();...
java
public Paint getLeftShadowGradient(Shape s) { Rectangle2D bounds = s.getBounds2D(); float minX = (float) bounds.getMinX(); float maxX = (float) bounds.getMaxX(); float midY = (float) bounds.getCenterY(); return new LinearGradientPaint(minX, midY, maxX, mi...
[ "public", "Paint", "getLeftShadowGradient", "(", "Shape", "s", ")", "{", "Rectangle2D", "bounds", "=", "s", ".", "getBounds2D", "(", ")", ";", "float", "minX", "=", "(", "float", ")", "bounds", ".", "getMinX", "(", ")", ";", "float", "maxX", "=", "(", ...
Create the gradient for the left of a rectangular shadow. @param s the shape of the gradient. This is only used for its bounds. @return the gradient.
[ "Create", "the", "gradient", "for", "the", "left", "of", "a", "rectangular", "shadow", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/effect/SeaGlassInternalShadowEffect.java#L156-L164
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaManager.java
PartitionReplicaManager.triggerPartitionReplicaSync
public void triggerPartitionReplicaSync(int partitionId, Collection<ServiceNamespace> namespaces, int replicaIndex) { """ This method is called on a backup node (replica). Given all conditions are satisfied, this method initiates a replica sync operation and registers it to replicaSyncRequest. The operation is sc...
java
public void triggerPartitionReplicaSync(int partitionId, Collection<ServiceNamespace> namespaces, int replicaIndex) { assert replicaIndex >= 0 && replicaIndex < InternalPartition.MAX_REPLICA_COUNT : "Invalid replica index! partitionId=" + partitionId + ", replicaIndex=" + replicaIndex; ...
[ "public", "void", "triggerPartitionReplicaSync", "(", "int", "partitionId", ",", "Collection", "<", "ServiceNamespace", ">", "namespaces", ",", "int", "replicaIndex", ")", "{", "assert", "replicaIndex", ">=", "0", "&&", "replicaIndex", "<", "InternalPartition", ".",...
This method is called on a backup node (replica). Given all conditions are satisfied, this method initiates a replica sync operation and registers it to replicaSyncRequest. The operation is scheduled for a future execution if : <ul> <li>the {@code delayMillis} is greater than 0</li> <li>if a migration is not allowed (d...
[ "This", "method", "is", "called", "on", "a", "backup", "node", "(", "replica", ")", ".", "Given", "all", "conditions", "are", "satisfied", "this", "method", "initiates", "a", "replica", "sync", "operation", "and", "registers", "it", "to", "replicaSyncRequest",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaManager.java#L134-L157
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/longrun/LongRunningJobManager.java
LongRunningJobManager.onStartJob
@Nonnull @Nonempty public String onStartJob (@Nonnull final ILongRunningJob aJob, @Nullable final String sStartingUserID) { """ Start a long running job @param aJob The job that is to be started @param sStartingUserID The ID of the user who started the job @return The internal long running job ID ""...
java
@Nonnull @Nonempty public String onStartJob (@Nonnull final ILongRunningJob aJob, @Nullable final String sStartingUserID) { ValueEnforcer.notNull (aJob, "Job"); // Create a new unique in-memory ID final String sJobID = GlobalIDFactory.getNewStringID (); final LongRunningJobData aJobData = new Lon...
[ "@", "Nonnull", "@", "Nonempty", "public", "String", "onStartJob", "(", "@", "Nonnull", "final", "ILongRunningJob", "aJob", ",", "@", "Nullable", "final", "String", "sStartingUserID", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aJob", ",", "\"Job\"", ")",...
Start a long running job @param aJob The job that is to be started @param sStartingUserID The ID of the user who started the job @return The internal long running job ID
[ "Start", "a", "long", "running", "job" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/longrun/LongRunningJobManager.java#L62-L73
elki-project/elki
elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/minkowski/LPIntegerNormDistanceFunction.java
LPIntegerNormDistanceFunction.preNorm
private double preNorm(NumberVector v, final int start, final int end) { """ Compute unscaled norm in a range of dimensions. @param v Data object @param start First dimension @param end Exclusive last dimension @return Aggregated values. """ double agg = 0.; for(int d = start; d < end; d++) { ...
java
private double preNorm(NumberVector v, final int start, final int end) { double agg = 0.; for(int d = start; d < end; d++) { final double xd = v.doubleValue(d); final double delta = xd >= 0. ? xd : -xd; agg += MathUtil.powi(delta, intp); } return agg; }
[ "private", "double", "preNorm", "(", "NumberVector", "v", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "double", "agg", "=", "0.", ";", "for", "(", "int", "d", "=", "start", ";", "d", "<", "end", ";", "d", "++", ")", "{", ...
Compute unscaled norm in a range of dimensions. @param v Data object @param start First dimension @param end Exclusive last dimension @return Aggregated values.
[ "Compute", "unscaled", "norm", "in", "a", "range", "of", "dimensions", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/minkowski/LPIntegerNormDistanceFunction.java#L135-L143
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsInvalidQueryUnsupportedSortField
public FessMessages addErrorsInvalidQueryUnsupportedSortField(String property, String arg0) { """ Add the created action message for the key 'errors.invalid_query_unsupported_sort_field' with parameters. <pre> message: The given sort ({0}) is not supported. </pre> @param property The property name for the mess...
java
public FessMessages addErrorsInvalidQueryUnsupportedSortField(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_invalid_query_unsupported_sort_field, arg0)); return this; }
[ "public", "FessMessages", "addErrorsInvalidQueryUnsupportedSortField", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_invalid_query_unsupport...
Add the created action message for the key 'errors.invalid_query_unsupported_sort_field' with parameters. <pre> message: The given sort ({0}) is not supported. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "invalid_query_unsupported_sort_field", "with", "parameters", ".", "<pre", ">", "message", ":", "The", "given", "sort", "(", "{", "0", "}", ")", "is", "not", "supported", ".", ...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L2065-L2069
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/FrameScreen.java
FrameScreen.getNextLocation
public ScreenLocation getNextLocation(short position, short setNewAnchor) { """ Code this position and Anchor to add it to the LayoutManager. @param position The location constant (see ScreenConstants). @param setNewAnchor The anchor constant. @return The new screen location object. """ if (position...
java
public ScreenLocation getNextLocation(short position, short setNewAnchor) { if (position == ScreenConstants.FIRST_LOCATION) position = ScreenConstants.FIRST_FRAME_LOCATION; if (position == ScreenConstants.NEXT_LOGICAL) position = ScreenConstants.BELOW_LAST_CONTROL; // St...
[ "public", "ScreenLocation", "getNextLocation", "(", "short", "position", ",", "short", "setNewAnchor", ")", "{", "if", "(", "position", "==", "ScreenConstants", ".", "FIRST_LOCATION", ")", "position", "=", "ScreenConstants", ".", "FIRST_FRAME_LOCATION", ";", "if", ...
Code this position and Anchor to add it to the LayoutManager. @param position The location constant (see ScreenConstants). @param setNewAnchor The anchor constant. @return The new screen location object.
[ "Code", "this", "position", "and", "Anchor", "to", "add", "it", "to", "the", "LayoutManager", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/FrameScreen.java#L126-L135
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/TieredBlockStore.java
TieredBlockStore.removeBlockInternal
private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocation location) throws InvalidWorkerStateException, BlockDoesNotExistException, IOException { """ Removes a block. @param sessionId session id @param blockId block id @param location the source location of the block @throws Inv...
java
private void removeBlockInternal(long sessionId, long blockId, BlockStoreLocation location) throws InvalidWorkerStateException, BlockDoesNotExistException, IOException { long lockId = mLockManager.lockBlock(sessionId, blockId, BlockLockType.WRITE); try { String filePath; BlockMeta blockMeta; ...
[ "private", "void", "removeBlockInternal", "(", "long", "sessionId", ",", "long", "blockId", ",", "BlockStoreLocation", "location", ")", "throws", "InvalidWorkerStateException", ",", "BlockDoesNotExistException", ",", "IOException", "{", "long", "lockId", "=", "mLockMana...
Removes a block. @param sessionId session id @param blockId block id @param location the source location of the block @throws InvalidWorkerStateException if the block to remove is a temp block @throws BlockDoesNotExistException if this block can not be found
[ "Removes", "a", "block", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/TieredBlockStore.java#L888-L917
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/f/ParamFundamentalEpipolar.java
ParamFundamentalEpipolar.encode
@Override public void encode(DMatrixRMaj F, double[] param) { """ Examines the matrix structure to determine how to parameterize F. """ // see if which columns are to be used selectColumns(F); // set the largest element in the first two columns and normalize // using that value double v[] = new d...
java
@Override public void encode(DMatrixRMaj F, double[] param) { // see if which columns are to be used selectColumns(F); // set the largest element in the first two columns and normalize // using that value double v[] = new double[]{F.get(0,col0),F.get(1,col0),F.get(2,col0), F.get(0,col1),F.get(1,col1),...
[ "@", "Override", "public", "void", "encode", "(", "DMatrixRMaj", "F", ",", "double", "[", "]", "param", ")", "{", "// see if which columns are to be used", "selectColumns", "(", "F", ")", ";", "// set the largest element in the first two columns and normalize", "// using ...
Examines the matrix structure to determine how to parameterize F.
[ "Examines", "the", "matrix", "structure", "to", "determine", "how", "to", "parameterize", "F", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/f/ParamFundamentalEpipolar.java#L61-L85
vvakame/JsonPullParser
jsonpullparser-apt/src/main/java/net/vvakame/apt/AptUtil.java
AptUtil.isMethodExists
public static boolean isMethodExists(Element element, String methodName, Modifier... modifiers) { """ Tests if the given element has the method with the given name.<br> NB: This method requires the given element has the kind of {@link ElementKind#CLASS}.<br> Also tests the method qualifies all of modifiers if an...
java
public static boolean isMethodExists(Element element, String methodName, Modifier... modifiers) { if (element.getKind() != ElementKind.CLASS) { throw new IllegalStateException(); } List<Modifier> modifiersList = Arrays.asList(modifiers); List<ExecutableElement> methods = ElementFilter.methodsIn(element.getE...
[ "public", "static", "boolean", "isMethodExists", "(", "Element", "element", ",", "String", "methodName", ",", "Modifier", "...", "modifiers", ")", "{", "if", "(", "element", ".", "getKind", "(", ")", "!=", "ElementKind", ".", "CLASS", ")", "{", "throw", "n...
Tests if the given element has the method with the given name.<br> NB: This method requires the given element has the kind of {@link ElementKind#CLASS}.<br> Also tests the method qualifies all of modifiers if any {@link Modifier} are also given. @param element @param methodName @param modifiers @return true if a match ...
[ "Tests", "if", "the", "given", "element", "has", "the", "method", "with", "the", "given", "name", ".", "<br", ">", "NB", ":", "This", "method", "requires", "the", "given", "element", "has", "the", "kind", "of", "{" ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-apt/src/main/java/net/vvakame/apt/AptUtil.java#L391-L405
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamResource.java
DatastreamResource.getDatastreamProfile
@Path("/ { """ <p>Invoke API-M.getDatastream(context, pid, dsID, asOfDateTime) </p><p> GET /objects/{pid}/datastreams/{dsID} ? asOfDateTime &amp; validateChecksum=true|false</p> """dsID}") @GET public Response getDatastreamProfile(@PathParam(RestParam.PID) String pid, ...
java
@Path("/{dsID}") @GET public Response getDatastreamProfile(@PathParam(RestParam.PID) String pid, @PathParam(RestParam.DSID) String dsID, @QueryParam(RestParam.AS_OF_DATE_TIME) String dateTime, ...
[ "@", "Path", "(", "\"/{dsID}\"", ")", "@", "GET", "public", "Response", "getDatastreamProfile", "(", "@", "PathParam", "(", "RestParam", ".", "PID", ")", "String", "pid", ",", "@", "PathParam", "(", "RestParam", ".", "DSID", ")", "String", "dsID", ",", "...
<p>Invoke API-M.getDatastream(context, pid, dsID, asOfDateTime) </p><p> GET /objects/{pid}/datastreams/{dsID} ? asOfDateTime &amp; validateChecksum=true|false</p>
[ "<p", ">", "Invoke", "API", "-", "M", ".", "getDatastream", "(", "context", "pid", "dsID", "asOfDateTime", ")", "<", "/", "p", ">", "<p", ">", "GET", "/", "objects", "/", "{", "pid", "}", "/", "datastreams", "/", "{", "dsID", "}", "?", "asOfDateTim...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamResource.java#L141-L192
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(BigInteger numerator, BigInteger denominator) { """ Creates a rational number of the specified numerator/denominator BigInteger values. @param numerator the numerator {@link BigInteger} value @param denominator the denominator {@link BigInteger} value (0 not allowed) @return ...
java
public static BigRational valueOf(BigInteger numerator, BigInteger denominator) { return of(new BigDecimal(numerator), new BigDecimal(denominator)); }
[ "public", "static", "BigRational", "valueOf", "(", "BigInteger", "numerator", ",", "BigInteger", "denominator", ")", "{", "return", "of", "(", "new", "BigDecimal", "(", "numerator", ")", ",", "new", "BigDecimal", "(", "denominator", ")", ")", ";", "}" ]
Creates a rational number of the specified numerator/denominator BigInteger values. @param numerator the numerator {@link BigInteger} value @param denominator the denominator {@link BigInteger} value (0 not allowed) @return the rational number @throws ArithmeticException if the denominator is 0 (division by zero)
[ "Creates", "a", "rational", "number", "of", "the", "specified", "numerator", "/", "denominator", "BigInteger", "values", "." ]
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L862-L864
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
AbstractIndexWriter.addDescription
protected void addDescription(ClassDoc cd, Content dlTree) { """ Add one line summary comment for the class. @param cd the class being documented @param dlTree the content tree to which the description will be added """ Content link = getLink(new LinkInfoImpl(configuration, ...
java
protected void addDescription(ClassDoc cd, Content dlTree) { Content link = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.INDEX, cd).strong(true)); Content dt = HtmlTree.DT(link); dt.addContent(" - "); addClassInfo(cd, dt); dlTree.addContent(dt...
[ "protected", "void", "addDescription", "(", "ClassDoc", "cd", ",", "Content", "dlTree", ")", "{", "Content", "link", "=", "getLink", "(", "new", "LinkInfoImpl", "(", "configuration", ",", "LinkInfoImpl", ".", "Kind", ".", "INDEX", ",", "cd", ")", ".", "str...
Add one line summary comment for the class. @param cd the class being documented @param dlTree the content tree to which the description will be added
[ "Add", "one", "line", "summary", "comment", "for", "the", "class", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java#L142-L152
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterationElementComparator.java
GraphIterationElementComparator.compareConnections
@Pure protected int compareConnections(PT p1, PT p2) { """ Compare the two given entry points. @param p1 the first connection. @param p2 the second connection. @return <code>-1</code> if {@code p1} is lower than {@code p2}, <code>1</code> if {@code p1} is greater than {@code p2}, otherwise <code>0</code>. ...
java
@Pure protected int compareConnections(PT p1, PT p2) { assert p1 != null && p2 != null; return p1.hashCode() - p2.hashCode(); }
[ "@", "Pure", "protected", "int", "compareConnections", "(", "PT", "p1", ",", "PT", "p2", ")", "{", "assert", "p1", "!=", "null", "&&", "p2", "!=", "null", ";", "return", "p1", ".", "hashCode", "(", ")", "-", "p2", ".", "hashCode", "(", ")", ";", ...
Compare the two given entry points. @param p1 the first connection. @param p2 the second connection. @return <code>-1</code> if {@code p1} is lower than {@code p2}, <code>1</code> if {@code p1} is greater than {@code p2}, otherwise <code>0</code>.
[ "Compare", "the", "two", "given", "entry", "points", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphIterationElementComparator.java#L90-L94
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java
CurationManager.emailObjectLink
private void emailObjectLink(JsonSimple response, String oid, String message) { """ Generate an order to send an email to the intended recipient with a link to an object @param response The response to add an order to @param message The message we want to send """ String link = urlBase + "default/deta...
java
private void emailObjectLink(JsonSimple response, String oid, String message) { String link = urlBase + "default/detail/" + oid; String text = "This is an automated message from the "; text += "ReDBox Curation Manager.\n\n" + message; text += "\n\nYou can find this object here:\n" + link; email(response, oid,...
[ "private", "void", "emailObjectLink", "(", "JsonSimple", "response", ",", "String", "oid", ",", "String", "message", ")", "{", "String", "link", "=", "urlBase", "+", "\"default/detail/\"", "+", "oid", ";", "String", "text", "=", "\"This is an automated message fro...
Generate an order to send an email to the intended recipient with a link to an object @param response The response to add an order to @param message The message we want to send
[ "Generate", "an", "order", "to", "send", "an", "email", "to", "the", "intended", "recipient", "with", "a", "link", "to", "an", "object" ]
train
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java#L1563-L1569
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_network_config.java
mps_network_config.update
public static mps_network_config update(nitro_service client, mps_network_config resource) throws Exception { """ <pre> Use this operation to modify MPS network configuration. </pre> """ resource.validate("modify"); return ((mps_network_config[]) resource.update_resource(client))[0]; }
java
public static mps_network_config update(nitro_service client, mps_network_config resource) throws Exception { resource.validate("modify"); return ((mps_network_config[]) resource.update_resource(client))[0]; }
[ "public", "static", "mps_network_config", "update", "(", "nitro_service", "client", ",", "mps_network_config", "resource", ")", "throws", "Exception", "{", "resource", ".", "validate", "(", "\"modify\"", ")", ";", "return", "(", "(", "mps_network_config", "[", "]"...
<pre> Use this operation to modify MPS network configuration. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "modify", "MPS", "network", "configuration", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_network_config.java#L137-L141
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/basicoperations/AddKeywords.java
AddKeywords.runExample
public static void runExample( AdWordsServicesInterface adWordsServices, AdWordsSession session, long adGroupId) throws RemoteException, UnsupportedEncodingException { """ Runs the example. @param adWordsServices the services factory. @param session the session. @param adGroupId the ID of the ad g...
java
public static void runExample( AdWordsServicesInterface adWordsServices, AdWordsSession session, long adGroupId) throws RemoteException, UnsupportedEncodingException { // Get the AdGroupCriterionService. AdGroupCriterionServiceInterface adGroupCriterionService = adWordsServices.get(session, ...
[ "public", "static", "void", "runExample", "(", "AdWordsServicesInterface", "adWordsServices", ",", "AdWordsSession", "session", ",", "long", "adGroupId", ")", "throws", "RemoteException", ",", "UnsupportedEncodingException", "{", "// Get the AdGroupCriterionService.", "AdGrou...
Runs the example. @param adWordsServices the services factory. @param session the session. @param adGroupId the ID of the ad group where the keywords will be created. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors. @...
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/basicoperations/AddKeywords.java#L142-L202
geomajas/geomajas-project-server
api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java
ManyToOneAttribute.setLongAttribute
public void setLongAttribute(String name, Long value) { """ Sets the specified long attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0 """ ensureValue(); Attribute attribute = new LongAttribute(value); attribute.setEditable(isEditable...
java
public void setLongAttribute(String name, Long value) { ensureValue(); Attribute attribute = new LongAttribute(value); attribute.setEditable(isEditable(name)); getValue().getAllAttributes().put(name, attribute); }
[ "public", "void", "setLongAttribute", "(", "String", "name", ",", "Long", "value", ")", "{", "ensureValue", "(", ")", ";", "Attribute", "attribute", "=", "new", "LongAttribute", "(", "value", ")", ";", "attribute", ".", "setEditable", "(", "isEditable", "(",...
Sets the specified long attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0
[ "Sets", "the", "specified", "long", "attribute", "to", "the", "specified", "value", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L216-L221
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ConditionalBuilder.java
ConditionalBuilder.when
public ConditionalBuilder when(Object value, Matcher expression) { """ Condition which allows execution if evaluates to true. @param expression """ action.setConditionExpression(new HamcrestConditionExpression(expression, value)); return this; }
java
public ConditionalBuilder when(Object value, Matcher expression) { action.setConditionExpression(new HamcrestConditionExpression(expression, value)); return this; }
[ "public", "ConditionalBuilder", "when", "(", "Object", "value", ",", "Matcher", "expression", ")", "{", "action", ".", "setConditionExpression", "(", "new", "HamcrestConditionExpression", "(", "expression", ",", "value", ")", ")", ";", "return", "this", ";", "}"...
Condition which allows execution if evaluates to true. @param expression
[ "Condition", "which", "allows", "execution", "if", "evaluates", "to", "true", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ConditionalBuilder.java#L89-L92
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/EntityManagerFactory.java
EntityManagerFactory.createLocalEntityManager
public EntityManager createLocalEntityManager(String serviceURL, String projectId) { """ Creates and returns an {@link EntityManager} that allows working with the local Datastore (a.k.a Datastore Emulator). Specified project ID will be used. @param serviceURL Service URL for the Datastore Emulator. (e.g. http...
java
public EntityManager createLocalEntityManager(String serviceURL, String projectId) { return createLocalEntityManager(serviceURL, projectId, null); }
[ "public", "EntityManager", "createLocalEntityManager", "(", "String", "serviceURL", ",", "String", "projectId", ")", "{", "return", "createLocalEntityManager", "(", "serviceURL", ",", "projectId", ",", "null", ")", ";", "}" ]
Creates and returns an {@link EntityManager} that allows working with the local Datastore (a.k.a Datastore Emulator). Specified project ID will be used. @param serviceURL Service URL for the Datastore Emulator. (e.g. http://localhost:9999) @param projectId the project ID. The specified project need not exist in Google...
[ "Creates", "and", "returns", "an", "{", "@link", "EntityManager", "}", "that", "allows", "working", "with", "the", "local", "Datastore", "(", "a", ".", "k", ".", "a", "Datastore", "Emulator", ")", ".", "Specified", "project", "ID", "will", "be", "used", ...
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/EntityManagerFactory.java#L237-L239
janus-project/guava.janusproject.io
guava/src/com/google/common/math/IntMath.java
IntMath.gcd
public static int gcd(int a, int b) { """ Returns the greatest common divisor of {@code a, b}. Returns {@code 0} if {@code a == 0 && b == 0}. @throws IllegalArgumentException if {@code a < 0} or {@code b < 0} """ /* * The reason we require both arguments to be >= 0 is because otherwise, what do yo...
java
public static int gcd(int a, int b) { /* * The reason we require both arguments to be >= 0 is because otherwise, what do you return on * gcd(0, Integer.MIN_VALUE)? BigInteger.gcd would return positive 2^31, but positive 2^31 * isn't an int. */ checkNonNegative("a", a); checkNonNegative("...
[ "public", "static", "int", "gcd", "(", "int", "a", ",", "int", "b", ")", "{", "/*\n * The reason we require both arguments to be >= 0 is because otherwise, what do you return on\n * gcd(0, Integer.MIN_VALUE)? BigInteger.gcd would return positive 2^31, but positive 2^31\n * isn't ...
Returns the greatest common divisor of {@code a, b}. Returns {@code 0} if {@code a == 0 && b == 0}. @throws IllegalArgumentException if {@code a < 0} or {@code b < 0}
[ "Returns", "the", "greatest", "common", "divisor", "of", "{", "@code", "a", "b", "}", ".", "Returns", "{", "@code", "0", "}", "if", "{", "@code", "a", "==", "0", "&&", "b", "==", "0", "}", "." ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/math/IntMath.java#L364-L407
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.getVisualization
public Visualization getVisualization(PlotItem item, VisualizationTask task) { """ Get the visualization referenced by a item/key combination. @param item Plot ttem @param task Visualization task @return Visualization """ Pair<Element, Visualization> pair = map.get(key(item, task)); return pair ==...
java
public Visualization getVisualization(PlotItem item, VisualizationTask task) { Pair<Element, Visualization> pair = map.get(key(item, task)); return pair == null ? null : pair.second; }
[ "public", "Visualization", "getVisualization", "(", "PlotItem", "item", ",", "VisualizationTask", "task", ")", "{", "Pair", "<", "Element", ",", "Visualization", ">", "pair", "=", "map", ".", "get", "(", "key", "(", "item", ",", "task", ")", ")", ";", "r...
Get the visualization referenced by a item/key combination. @param item Plot ttem @param task Visualization task @return Visualization
[ "Get", "the", "visualization", "referenced", "by", "a", "item", "/", "key", "combination", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L76-L79
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/CharacterExtensions.java
CharacterExtensions.operator_notEquals
@Pure @Inline(value="($1 != $2)", constantExpression=true) public static boolean operator_notEquals(char a, int b) { """ The binary <code>notEquals</code> operator. This is the equivalent to the Java <code>!=</code> operator. @param a a character. @param b an integer. @return <code>a!=b</code> @since 2...
java
@Pure @Inline(value="($1 != $2)", constantExpression=true) public static boolean operator_notEquals(char a, int b) { return a != b; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 != $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "boolean", "operator_notEquals", "(", "char", "a", ",", "int", "b", ")", "{", "return", "a", "!=", "b", ";", "}" ]
The binary <code>notEquals</code> operator. This is the equivalent to the Java <code>!=</code> operator. @param a a character. @param b an integer. @return <code>a!=b</code> @since 2.3
[ "The", "binary", "<code", ">", "notEquals<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "Java", "<code", ">", "!", "=", "<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/CharacterExtensions.java#L823-L827
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/config/xml/ReceiveMessageActionParser.java
ReceiveMessageActionParser.parseXPathValidationElements
private void parseXPathValidationElements(Element messageElement, XpathMessageValidationContext context) { """ Parses validation elements and adds information to the message validation context. @param messageElement the message DOM element. @param context the message validation context. """ //check...
java
private void parseXPathValidationElements(Element messageElement, XpathMessageValidationContext context) { //check for validate elements, these elements can either have script, xpath or namespace validation information //for now we only handle xpath validation Map<String, Object> validateXpathEx...
[ "private", "void", "parseXPathValidationElements", "(", "Element", "messageElement", ",", "XpathMessageValidationContext", "context", ")", "{", "//check for validate elements, these elements can either have script, xpath or namespace validation information", "//for now we only handle xpath v...
Parses validation elements and adds information to the message validation context. @param messageElement the message DOM element. @param context the message validation context.
[ "Parses", "validation", "elements", "and", "adds", "information", "to", "the", "message", "validation", "context", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/ReceiveMessageActionParser.java#L406-L420
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/expression/var/VariableImpl.java
VariableImpl.methodExists
private static Boolean methodExists(Class clazz, String methodName, Type[] args, Type returnType) { """ checks if a method exists @param clazz @param methodName @param args @param returnType @return returns null when checking fi """ try { Class<?>[] _args = new Class[args.length]; for (int i ...
java
private static Boolean methodExists(Class clazz, String methodName, Type[] args, Type returnType) { try { Class<?>[] _args = new Class[args.length]; for (int i = 0; i < _args.length; i++) { _args[i] = Types.toClass(args[i]); } Class<?> rtn = Types.toClass(returnType); try { java.lang.refle...
[ "private", "static", "Boolean", "methodExists", "(", "Class", "clazz", ",", "String", "methodName", ",", "Type", "[", "]", "args", ",", "Type", "returnType", ")", "{", "try", "{", "Class", "<", "?", ">", "[", "]", "_args", "=", "new", "Class", "[", "...
checks if a method exists @param clazz @param methodName @param args @param returnType @return returns null when checking fi
[ "checks", "if", "a", "method", "exists" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/expression/var/VariableImpl.java#L545-L564
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/sections/SectionLoader.java
SectionLoader.loadSectionFrom
public PESection loadSectionFrom(SectionHeader header) { """ Loads the section that belongs to the header. <p> This does not instantiate special sections. Use methods like {@link #loadImportSection()} or {@link #loadResourceSection()} instead. @param header the section's header @return {@link PESection} th...
java
public PESection loadSectionFrom(SectionHeader header) { long size = getReadSize(header); long offset = header.getAlignedPointerToRaw(); return new PESection(size, offset, header, file); }
[ "public", "PESection", "loadSectionFrom", "(", "SectionHeader", "header", ")", "{", "long", "size", "=", "getReadSize", "(", "header", ")", ";", "long", "offset", "=", "header", ".", "getAlignedPointerToRaw", "(", ")", ";", "return", "new", "PESection", "(", ...
Loads the section that belongs to the header. <p> This does not instantiate special sections. Use methods like {@link #loadImportSection()} or {@link #loadResourceSection()} instead. @param header the section's header @return {@link PESection} that belongs to the header
[ "Loads", "the", "section", "that", "belongs", "to", "the", "header", ".", "<p", ">", "This", "does", "not", "instantiate", "special", "sections", ".", "Use", "methods", "like", "{", "@link", "#loadImportSection", "()", "}", "or", "{", "@link", "#loadResource...
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/sections/SectionLoader.java#L158-L162
igniterealtime/Smack
smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java
RosterUtil.preApproveSubscriptionIfRequiredAndPossible
public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid) throws NotLoggedInException, NotConnectedException, InterruptedException { """ Pre-approve the subscription if it is required and possible. @param roster The roster which should be used for the pre-approval. ...
java
public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid) throws NotLoggedInException, NotConnectedException, InterruptedException { if (!roster.isSubscriptionPreApprovalSupported()) { return; } RosterEntry entry = roster.getEntry(jid); ...
[ "public", "static", "void", "preApproveSubscriptionIfRequiredAndPossible", "(", "Roster", "roster", ",", "BareJid", "jid", ")", "throws", "NotLoggedInException", ",", "NotConnectedException", ",", "InterruptedException", "{", "if", "(", "!", "roster", ".", "isSubscripti...
Pre-approve the subscription if it is required and possible. @param roster The roster which should be used for the pre-approval. @param jid The XMPP address which should be pre-approved. @throws NotLoggedInException @throws NotConnectedException @throws InterruptedException @since 4.2.2
[ "Pre", "-", "approve", "the", "subscription", "if", "it", "is", "required", "and", "possible", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterUtil.java#L100-L115
OpenTSDB/opentsdb
src/graph/Plot.java
Plot.setDimensions
public void setDimensions(final short width, final short height) { """ Sets the dimensions of the graph (in pixels). @param width The width of the graph produced (in pixels). @param height The height of the graph produced (in pixels). @throws IllegalArgumentException if the width or height are negative, zero o...
java
public void setDimensions(final short width, final short height) { if (width < MIN_PIXELS || height < MIN_PIXELS) { final String what = width < MIN_PIXELS ? "width" : "height"; throw new IllegalArgumentException(what + " smaller than " + MIN_PIXELS + " in " + wid...
[ "public", "void", "setDimensions", "(", "final", "short", "width", ",", "final", "short", "height", ")", "{", "if", "(", "width", "<", "MIN_PIXELS", "||", "height", "<", "MIN_PIXELS", ")", "{", "final", "String", "what", "=", "width", "<", "MIN_PIXELS", ...
Sets the dimensions of the graph (in pixels). @param width The width of the graph produced (in pixels). @param height The height of the graph produced (in pixels). @throws IllegalArgumentException if the width or height are negative, zero or "too small" (e.g. less than 100x100 pixels).
[ "Sets", "the", "dimensions", "of", "the", "graph", "(", "in", "pixels", ")", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/graph/Plot.java#L155-L163
voldemort/voldemort
src/java/voldemort/store/readonly/io/jna/mman.java
mman.mmap
public static Pointer mmap(long len, int prot, int flags, int fildes, long off) throws IOException { """ Map the given region of the given file descriptor into memory. Returns a Pointer to the newly mapped memory throws an IOException on error. """ // we don't really have a need to chang...
java
public static Pointer mmap(long len, int prot, int flags, int fildes, long off) throws IOException { // we don't really have a need to change the recommended pointer. Pointer addr = new Pointer(0); Pointer result = Delegate.mmap(addr, new Nati...
[ "public", "static", "Pointer", "mmap", "(", "long", "len", ",", "int", "prot", ",", "int", "flags", ",", "int", "fildes", ",", "long", "off", ")", "throws", "IOException", "{", "// we don't really have a need to change the recommended pointer.", "Pointer", "addr", ...
Map the given region of the given file descriptor into memory. Returns a Pointer to the newly mapped memory throws an IOException on error.
[ "Map", "the", "given", "region", "of", "the", "given", "file", "descriptor", "into", "memory", ".", "Returns", "a", "Pointer", "to", "the", "newly", "mapped", "memory", "throws", "an", "IOException", "on", "error", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/readonly/io/jna/mman.java#L36-L57
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/csi/TranStrategy.java
TranStrategy.resumeGlobalTx
final void resumeGlobalTx(Transaction control, int action) //LIDB1673.2.1.5 throws CSIException { """ /* This utility method attempts to resume the global transaction associated with the input control object. If it fails, an an exception consistent with the EJB exception conventions is thrown. <p> """ ...
java
final void resumeGlobalTx(Transaction control, int action) //LIDB1673.2.1.5 throws CSIException { try { txCtrl.resumeGlobalTx(control, action); // d165585 Begins if (TraceComponent.isAnyTracingEnabled() && // d527372 TETxLifeCycleInfo.isTraceEnabled())...
[ "final", "void", "resumeGlobalTx", "(", "Transaction", "control", ",", "int", "action", ")", "//LIDB1673.2.1.5", "throws", "CSIException", "{", "try", "{", "txCtrl", ".", "resumeGlobalTx", "(", "control", ",", "action", ")", ";", "// d165585 Begins", "if", "(", ...
/* This utility method attempts to resume the global transaction associated with the input control object. If it fails, an an exception consistent with the EJB exception conventions is thrown. <p>
[ "/", "*", "This", "utility", "method", "attempts", "to", "resume", "the", "global", "transaction", "associated", "with", "the", "input", "control", "object", ".", "If", "it", "fails", "an", "an", "exception", "consistent", "with", "the", "EJB", "exception", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/csi/TranStrategy.java#L658-L689
alkacon/opencms-core
src-gwt/org/opencms/ui/client/contextmenu/CmsContextMenuWidget.java
CmsContextMenuWidget.addRootMenuItem
public void addRootMenuItem(ContextMenuItemState rootItem, CmsContextMenuConnector connector) { """ Adds new item as context menu root item.<p> @param rootItem the root item @param connector the connector """ CmsContextMenuItemWidget itemWidget = createEmptyItemWidget( rootItem.getI...
java
public void addRootMenuItem(ContextMenuItemState rootItem, CmsContextMenuConnector connector) { CmsContextMenuItemWidget itemWidget = createEmptyItemWidget( rootItem.getId(), rootItem.getCaption(), rootItem.getDescription(), connector); itemWidget....
[ "public", "void", "addRootMenuItem", "(", "ContextMenuItemState", "rootItem", ",", "CmsContextMenuConnector", "connector", ")", "{", "CmsContextMenuItemWidget", "itemWidget", "=", "createEmptyItemWidget", "(", "rootItem", ".", "getId", "(", ")", ",", "rootItem", ".", ...
Adds new item as context menu root item.<p> @param rootItem the root item @param connector the connector
[ "Adds", "new", "item", "as", "context", "menu", "root", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ui/client/contextmenu/CmsContextMenuWidget.java#L89-L106
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.fromUnsignedByteArray
public static BigInteger fromUnsignedByteArray(byte[] buf, int off, int length) { """ 无符号bytes转{@link BigInteger} @param buf 无符号bytes @param off 起始位置 @param length 长度 @return {@link BigInteger} """ byte[] mag = buf; if (off != 0 || length != buf.length) { mag = new byte[length]; System.arra...
java
public static BigInteger fromUnsignedByteArray(byte[] buf, int off, int length) { byte[] mag = buf; if (off != 0 || length != buf.length) { mag = new byte[length]; System.arraycopy(buf, off, mag, 0, length); } return new BigInteger(1, mag); }
[ "public", "static", "BigInteger", "fromUnsignedByteArray", "(", "byte", "[", "]", "buf", ",", "int", "off", ",", "int", "length", ")", "{", "byte", "[", "]", "mag", "=", "buf", ";", "if", "(", "off", "!=", "0", "||", "length", "!=", "buf", ".", "le...
无符号bytes转{@link BigInteger} @param buf 无符号bytes @param off 起始位置 @param length 长度 @return {@link BigInteger}
[ "无符号bytes转", "{", "@link", "BigInteger", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L2293-L2300
stripe/stripe-java
src/main/java/com/stripe/net/OAuth.java
OAuth.authorizeUrl
public static String authorizeUrl(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException { """ Generates a URL to Stripe's OAuth form. @param params the parameters to include in the URL. @param options the request options. @return the URL to Stripe's...
java
public static String authorizeUrl(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException { final String base = Stripe.getConnectBase(); params.put("client_id", getClientId(params, options)); if (params.get("response_type") == null) { params.p...
[ "public", "static", "String", "authorizeUrl", "(", "Map", "<", "String", ",", "Object", ">", "params", ",", "RequestOptions", "options", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", "{", "final", "String", "base", "=", "Stripe", ".", ...
Generates a URL to Stripe's OAuth form. @param params the parameters to include in the URL. @param options the request options. @return the URL to Stripe's OAuth form.
[ "Generates", "a", "URL", "to", "Stripe", "s", "OAuth", "form", "." ]
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/net/OAuth.java#L27-L47
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java
LocalNetworkGatewaysInner.updateTagsAsync
public Observable<LocalNetworkGatewayInner> updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { """ Updates a local network gateway tags. @param resourceGroupName The name of the resource group. @param localNetworkGatewayName The name of the local network gatew...
java
public Observable<LocalNetworkGatewayInner> updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1<ServiceResponse<LocalNetworkGatewayInner>, LocalNetworkGatew...
[ "public", "Observable", "<", "LocalNetworkGatewayInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "localNetworkGatewayName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync"...
Updates a local network gateway tags. @param resourceGroupName The name of the resource group. @param localNetworkGatewayName The name of the local network gateway. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "a", "local", "network", "gateway", "tags", "." ]
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/LocalNetworkGatewaysInner.java#L617-L624
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java
SequenceGibbsSampler.collectSamples
public List<int[]> collectSamples(SequenceModel model, int numSamples, int sampleInterval) { """ Collects numSamples samples of sequences, from the distribution over sequences defined by the sequence model passed on construction. All samples collected are sampleInterval samples apart, in an attempt to reduce au...
java
public List<int[]> collectSamples(SequenceModel model, int numSamples, int sampleInterval) { int[] initialSequence = getRandomSequence(model); return collectSamples(model, numSamples, sampleInterval, initialSequence); }
[ "public", "List", "<", "int", "[", "]", ">", "collectSamples", "(", "SequenceModel", "model", ",", "int", "numSamples", ",", "int", "sampleInterval", ")", "{", "int", "[", "]", "initialSequence", "=", "getRandomSequence", "(", "model", ")", ";", "return", ...
Collects numSamples samples of sequences, from the distribution over sequences defined by the sequence model passed on construction. All samples collected are sampleInterval samples apart, in an attempt to reduce autocorrelation. @return a List containing the sequence samples, as arrays of type int, and their scores
[ "Collects", "numSamples", "samples", "of", "sequences", "from", "the", "distribution", "over", "sequences", "defined", "by", "the", "sequence", "model", "passed", "on", "construction", ".", "All", "samples", "collected", "are", "sampleInterval", "samples", "apart", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/SequenceGibbsSampler.java#L132-L135
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dateTemplate
@Deprecated public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, ImmutableList<?> args) { """ Create a new Template expression @deprecated Use {@link #dateTemplate(Class, String, ...
java
@Deprecated public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, String template, ImmutableList<?> args) { return dateTemplate(cl, createTemplate(template), args); }
[ "@", "Deprecated", "public", "static", "<", "T", "extends", "Comparable", "<", "?", ">", ">", "DateTemplate", "<", "T", ">", "dateTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "String", "template", ",", "ImmutableList", "<", "?", "...
Create a new Template expression @deprecated Use {@link #dateTemplate(Class, String, List)} instead. @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L495-L499
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AbstractHDBSCAN.java
AbstractHDBSCAN.computeCoreDists
protected WritableDoubleDataStore computeCoreDists(DBIDs ids, KNNQuery<O> knnQ, int minPts) { """ Compute the core distances for all objects. @param ids Objects @param knnQ kNN query @param minPts Minimum neighborhood size @return Data store with core distances """ final Logging LOG = getLogger(); ...
java
protected WritableDoubleDataStore computeCoreDists(DBIDs ids, KNNQuery<O> knnQ, int minPts) { final Logging LOG = getLogger(); final WritableDoubleDataStore coredists = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_DB); FiniteProgress cprog = LOG.isVerbose() ? new Fi...
[ "protected", "WritableDoubleDataStore", "computeCoreDists", "(", "DBIDs", "ids", ",", "KNNQuery", "<", "O", ">", "knnQ", ",", "int", "minPts", ")", "{", "final", "Logging", "LOG", "=", "getLogger", "(", ")", ";", "final", "WritableDoubleDataStore", "coredists", ...
Compute the core distances for all objects. @param ids Objects @param knnQ kNN query @param minPts Minimum neighborhood size @return Data store with core distances
[ "Compute", "the", "core", "distances", "for", "all", "objects", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AbstractHDBSCAN.java#L91-L101
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java
TreeUtil.isIdFocusable
public static boolean isIdFocusable(final WComponent root, final String id) { """ Check if this ID is focusable. <p> Considered focusable if the component and all its ancestors are visible and not hidden. </p> @param root the root component to search from. @param id the id to search for. @return the compon...
java
public static boolean isIdFocusable(final WComponent root, final String id) { FindComponentByIdVisitor visitor = new FindComponentByIdVisitor(id) { @Override public VisitorResult visit(final WComponent comp) { VisitorResult result = super.visit(comp); // If hidden then abort branch if (result == Vi...
[ "public", "static", "boolean", "isIdFocusable", "(", "final", "WComponent", "root", ",", "final", "String", "id", ")", "{", "FindComponentByIdVisitor", "visitor", "=", "new", "FindComponentByIdVisitor", "(", "id", ")", "{", "@", "Override", "public", "VisitorResul...
Check if this ID is focusable. <p> Considered focusable if the component and all its ancestors are visible and not hidden. </p> @param root the root component to search from. @param id the id to search for. @return the component with context if it is focusable, otherwise null
[ "Check", "if", "this", "ID", "is", "focusable", ".", "<p", ">", "Considered", "focusable", "if", "the", "component", "and", "all", "its", "ancestors", "are", "visible", "and", "not", "hidden", ".", "<", "/", "p", ">" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java#L256-L276
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleBase.java
SimpleBase.insertIntoThis
public void insertIntoThis(int insertRow, int insertCol, T B) { """ Copy matrix B into this matrix at location (insertRow, insertCol). @param insertRow First row the matrix is to be inserted into. @param insertCol First column the matrix is to be inserted into. @param B The matrix that is being inserted. ...
java
public void insertIntoThis(int insertRow, int insertCol, T B) { convertType.specify(this,B); B = convertType.convert(B); // See if this type's need to be changed or not if( convertType.commonType == getType() ) { insert(B.mat,mat,insertRow,insertCol); } else { ...
[ "public", "void", "insertIntoThis", "(", "int", "insertRow", ",", "int", "insertCol", ",", "T", "B", ")", "{", "convertType", ".", "specify", "(", "this", ",", "B", ")", ";", "B", "=", "convertType", ".", "convert", "(", "B", ")", ";", "// See if this ...
Copy matrix B into this matrix at location (insertRow, insertCol). @param insertRow First row the matrix is to be inserted into. @param insertCol First column the matrix is to be inserted into. @param B The matrix that is being inserted.
[ "Copy", "matrix", "B", "into", "this", "matrix", "at", "location", "(", "insertRow", "insertCol", ")", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleBase.java#L952-L964
arakelian/more-commons
src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java
XmlStreamReaderUtils.optionalClassAttribute
public static Class optionalClassAttribute( final XMLStreamReader reader, final String localName, final Class defaultValue) throws XMLStreamException { """ Returns the value of an attribute as a Class. If the attribute is empty, this method returns the default value provided. ...
java
public static Class optionalClassAttribute( final XMLStreamReader reader, final String localName, final Class defaultValue) throws XMLStreamException { return optionalClassAttribute(reader, null, localName, defaultValue); }
[ "public", "static", "Class", "optionalClassAttribute", "(", "final", "XMLStreamReader", "reader", ",", "final", "String", "localName", ",", "final", "Class", "defaultValue", ")", "throws", "XMLStreamException", "{", "return", "optionalClassAttribute", "(", "reader", "...
Returns the value of an attribute as a Class. If the attribute is empty, this method returns the default value provided. @param reader <code>XMLStreamReader</code> that contains attribute values. @param localName local name of attribute (the namespace is ignored). @param defaultValue default value @return value of att...
[ "Returns", "the", "value", "of", "an", "attribute", "as", "a", "Class", ".", "If", "the", "attribute", "is", "empty", "this", "method", "returns", "the", "default", "value", "provided", "." ]
train
https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L653-L658
xsonorg/xson
src/main/java/org/xson/core/asm/Type.java
Type.getReturnType
public static Type getReturnType(final String methodDescriptor) { """ Returns the Java type corresponding to the return type of the given method descriptor. @param methodDescriptor a method descriptor. @return the Java type corresponding to the return type of the given method descriptor. """ char...
java
public static Type getReturnType(final String methodDescriptor) { char[] buf = methodDescriptor.toCharArray(); return getType(buf, methodDescriptor.indexOf(')') + 1); }
[ "public", "static", "Type", "getReturnType", "(", "final", "String", "methodDescriptor", ")", "{", "char", "[", "]", "buf", "=", "methodDescriptor", ".", "toCharArray", "(", ")", ";", "return", "getType", "(", "buf", ",", "methodDescriptor", ".", "indexOf", ...
Returns the Java type corresponding to the return type of the given method descriptor. @param methodDescriptor a method descriptor. @return the Java type corresponding to the return type of the given method descriptor.
[ "Returns", "the", "Java", "type", "corresponding", "to", "the", "return", "type", "of", "the", "given", "method", "descriptor", "." ]
train
https://github.com/xsonorg/xson/blob/ce1e197ec4ef9be448ed6ca96513e886151f83a9/src/main/java/org/xson/core/asm/Type.java#L313-L316
hdbeukel/james-core
src/main/java/org/jamesframework/core/search/cache/SingleEvaluatedMoveCache.java
SingleEvaluatedMoveCache.cacheMoveValidation
@Override public final void cacheMoveValidation(Move<?> move, Validation validation) { """ Cache validation of the given move, discarding any previously cached value. @param move move applied to the current solution @param validation validation of obtained neighbour """ validatedMove = move; ...
java
@Override public final void cacheMoveValidation(Move<?> move, Validation validation) { validatedMove = move; this.validation = validation; }
[ "@", "Override", "public", "final", "void", "cacheMoveValidation", "(", "Move", "<", "?", ">", "move", ",", "Validation", "validation", ")", "{", "validatedMove", "=", "move", ";", "this", ".", "validation", "=", "validation", ";", "}" ]
Cache validation of the given move, discarding any previously cached value. @param move move applied to the current solution @param validation validation of obtained neighbour
[ "Cache", "validation", "of", "the", "given", "move", "discarding", "any", "previously", "cached", "value", "." ]
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/cache/SingleEvaluatedMoveCache.java#L89-L93
jdereg/java-util
src/main/java/com/cedarsoftware/util/DeepEquals.java
DeepEquals.compareOrderedCollection
private static boolean compareOrderedCollection(Collection col1, Collection col2, Deque stack, Set visited) { """ Deeply compare two Collections that must be same length and in same order. @param col1 First collection of items to compare @param col2 Second collection of items to compare @param stack add items t...
java
private static boolean compareOrderedCollection(Collection col1, Collection col2, Deque stack, Set visited) { // Same instance check already performed... if (col1.size() != col2.size()) { return false; } Iterator i1 = col1.iterator(); Iterator i2 = col2....
[ "private", "static", "boolean", "compareOrderedCollection", "(", "Collection", "col1", ",", "Collection", "col2", ",", "Deque", "stack", ",", "Set", "visited", ")", "{", "// Same instance check already performed...", "if", "(", "col1", ".", "size", "(", ")", "!=",...
Deeply compare two Collections that must be same length and in same order. @param col1 First collection of items to compare @param col2 Second collection of items to compare @param stack add items to compare to the Stack (Stack versus recursion) @param visited Set of objects already compared (prevents cycles) value of ...
[ "Deeply", "compare", "two", "Collections", "that", "must", "be", "same", "length", "and", "in", "same", "order", "." ]
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/DeepEquals.java#L411-L432
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java
GreenMailUtil.sendMimeMessage
public static void sendMimeMessage(MimeMessage mimeMessage) { """ Send the message using the JavaMail session defined in the message @param mimeMessage Message to send """ try { Transport.send(mimeMessage); } catch (MessagingException e) { throw new IllegalStateEx...
java
public static void sendMimeMessage(MimeMessage mimeMessage) { try { Transport.send(mimeMessage); } catch (MessagingException e) { throw new IllegalStateException("Can not send message " + mimeMessage, e); } }
[ "public", "static", "void", "sendMimeMessage", "(", "MimeMessage", "mimeMessage", ")", "{", "try", "{", "Transport", ".", "send", "(", "mimeMessage", ")", ";", "}", "catch", "(", "MessagingException", "e", ")", "{", "throw", "new", "IllegalStateException", "("...
Send the message using the JavaMail session defined in the message @param mimeMessage Message to send
[ "Send", "the", "message", "using", "the", "JavaMail", "session", "defined", "in", "the", "message" ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java#L271-L277
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java
BeanDefinitionWriter.visitBeanFactoryMethod
public void visitBeanFactoryMethod(Object factoryClass, Object producedType, String methodName, AnnotationMetadata methodAnnotationMetadata, Map<String, Object> arg...
java
public void visitBeanFactoryMethod(Object factoryClass, Object producedType, String methodName, AnnotationMetadata methodAnnotationMetadata, Map<String, Object> arg...
[ "public", "void", "visitBeanFactoryMethod", "(", "Object", "factoryClass", ",", "Object", "producedType", ",", "String", "methodName", ",", "AnnotationMetadata", "methodAnnotationMetadata", ",", "Map", "<", "String", ",", "Object", ">", "argumentTypes", ",", "Map", ...
<p>In the case where the produced class is produced by a factory method annotated with {@link io.micronaut.context.annotation.Bean} this method should be called.</p> @param factoryClass The factory class @param producedType The produced type @param methodName The method name...
[ "<p", ">", "In", "the", "case", "where", "the", "produced", "class", "is", "produced", "by", "a", "factory", "method", "annotated", "with", "{", "@link", "io", ".", "micronaut", ".", "context", ".", "annotation", ".", "Bean", "}", "this", "method", "shou...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java#L375-L401
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/MethodUtils.java
MethodUtils.invokeMethod
public static Object invokeMethod(Object object, String methodName, Object arg) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { """ <p>Invoke a named method whose parameter type matches the object type.</p> <p>The behaviour of this method is less deterministic than...
java
public static Object invokeMethod(Object object, String methodName, Object arg) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Object[] args = { arg }; return invokeMethod(object, methodName, args); }
[ "public", "static", "Object", "invokeMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Object", "arg", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "Object", "[", "]", "args", "=", ...
<p>Invoke a named method whose parameter type matches the object type.</p> <p>The behaviour of this method is less deterministic than {@code invokeExactMethod()}. It loops through all methods with names that match and then executes the first it finds with compatible parameters.</p> <p>This method supports calls to me...
[ "<p", ">", "Invoke", "a", "named", "method", "whose", "parameter", "type", "matches", "the", "object", "type", ".", "<", "/", "p", ">" ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/MethodUtils.java#L181-L185
zeromq/jeromq
src/main/java/zmq/io/Msgs.java
Msgs.startsWith
public static boolean startsWith(Msg msg, String data, boolean includeLength) { """ Checks if the message starts with the given string. @param msg the message to check. @param data the string to check the message with. Shall be shorter than 256 characters. @param includeLength true if the string in the messag...
java
public static boolean startsWith(Msg msg, String data, boolean includeLength) { final int length = data.length(); assert (length < 256); int start = includeLength ? 1 : 0; if (msg.size() < length + start) { return false; } boolean comparison = includeLeng...
[ "public", "static", "boolean", "startsWith", "(", "Msg", "msg", ",", "String", "data", ",", "boolean", "includeLength", ")", "{", "final", "int", "length", "=", "data", ".", "length", "(", ")", ";", "assert", "(", "length", "<", "256", ")", ";", "int",...
Checks if the message starts with the given string. @param msg the message to check. @param data the string to check the message with. Shall be shorter than 256 characters. @param includeLength true if the string in the message is prefixed with the length, false if not. @return true if the message starts with the give...
[ "Checks", "if", "the", "message", "starts", "with", "the", "given", "string", "." ]
train
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/zmq/io/Msgs.java#L20-L39
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipSession.java
SipSession.sendUnidirectionalRequest
public boolean sendUnidirectionalRequest(String reqMessage, boolean viaProxy) throws ParseException { """ This sendUnidirectionalRequest() method sends out a request message with no response expected. A Request object is constructed from the string parameter passed in. Example: <code> StringBuffer invit...
java
public boolean sendUnidirectionalRequest(String reqMessage, boolean viaProxy) throws ParseException { Request request = parent.getMessageFactory().createRequest(reqMessage); return sendUnidirectionalRequest(request, viaProxy); }
[ "public", "boolean", "sendUnidirectionalRequest", "(", "String", "reqMessage", ",", "boolean", "viaProxy", ")", "throws", "ParseException", "{", "Request", "request", "=", "parent", ".", "getMessageFactory", "(", ")", ".", "createRequest", "(", "reqMessage", ")", ...
This sendUnidirectionalRequest() method sends out a request message with no response expected. A Request object is constructed from the string parameter passed in. Example: <code> StringBuffer invite = new StringBuffer("INVITE sip:becky@" + PROXY_HOST + ':' + PROXY_PORT + ";transport=" + PROXY_PROTO + " SIP/2.0\n"); i...
[ "This", "sendUnidirectionalRequest", "()", "method", "sends", "out", "a", "request", "message", "with", "no", "response", "expected", ".", "A", "Request", "object", "is", "constructed", "from", "the", "string", "parameter", "passed", "in", "." ]
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipSession.java#L728-L732
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java
SeaGlassButtonUI.getEnabledIcon
private Icon getEnabledIcon(AbstractButton b, Icon defaultIcon) { """ DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME! """ if (defaultIcon == null) { defaultIcon = getSynthIcon(b, SynthConstants.ENABLED); } return de...
java
private Icon getEnabledIcon(AbstractButton b, Icon defaultIcon) { if (defaultIcon == null) { defaultIcon = getSynthIcon(b, SynthConstants.ENABLED); } return defaultIcon; }
[ "private", "Icon", "getEnabledIcon", "(", "AbstractButton", "b", ",", "Icon", "defaultIcon", ")", "{", "if", "(", "defaultIcon", "==", "null", ")", "{", "defaultIcon", "=", "getSynthIcon", "(", "b", ",", "SynthConstants", ".", "ENABLED", ")", ";", "}", "re...
DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L451-L457
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/JavaScriptUtils.java
JavaScriptUtils.getJavaScriptForRedirect
public String getJavaScriptForRedirect(String reqUrlCookieName, String redirectUrl, Map<String, String> cookieProperties) throws Exception { """ Creates a JavaScript HTML block that: <ol> <li>Creates a cookie with the specified name whose value is the browser's current location <li>Redirects the browser to the ...
java
public String getJavaScriptForRedirect(String reqUrlCookieName, String redirectUrl, Map<String, String> cookieProperties) throws Exception { String javascript = createJavaScriptForRedirectCookie(reqUrlCookieName, cookieProperties) + "\n"; javascript += createJavaScriptStringToPerformRedirect(redirectUrl...
[ "public", "String", "getJavaScriptForRedirect", "(", "String", "reqUrlCookieName", ",", "String", "redirectUrl", ",", "Map", "<", "String", ",", "String", ">", "cookieProperties", ")", "throws", "Exception", "{", "String", "javascript", "=", "createJavaScriptForRedire...
Creates a JavaScript HTML block that: <ol> <li>Creates a cookie with the specified name whose value is the browser's current location <li>Redirects the browser to the specified URL </ol>
[ "Creates", "a", "JavaScript", "HTML", "block", "that", ":", "<ol", ">", "<li", ">", "Creates", "a", "cookie", "with", "the", "specified", "name", "whose", "value", "is", "the", "browser", "s", "current", "location", "<li", ">", "Redirects", "the", "browser...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/JavaScriptUtils.java#L121-L125
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putTicketGrantingTicketInScopes
public static void putTicketGrantingTicketInScopes(final RequestContext context, final TicketGrantingTicket ticket) { """ Put ticket granting ticket in request and flow scopes. @param context the context @param ticket the ticket value """ val ticketValue = ticket != null ? ticket.getId() : null; ...
java
public static void putTicketGrantingTicketInScopes(final RequestContext context, final TicketGrantingTicket ticket) { val ticketValue = ticket != null ? ticket.getId() : null; putTicketGrantingTicketInScopes(context, ticketValue); }
[ "public", "static", "void", "putTicketGrantingTicketInScopes", "(", "final", "RequestContext", "context", ",", "final", "TicketGrantingTicket", "ticket", ")", "{", "val", "ticketValue", "=", "ticket", "!=", "null", "?", "ticket", ".", "getId", "(", ")", ":", "nu...
Put ticket granting ticket in request and flow scopes. @param context the context @param ticket the ticket value
[ "Put", "ticket", "granting", "ticket", "in", "request", "and", "flow", "scopes", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L168-L171
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/UnixResolverDnsServerAddressStreamProvider.java
UnixResolverDnsServerAddressStreamProvider.parseSilently
static DnsServerAddressStreamProvider parseSilently() { """ Attempt to parse {@code /etc/resolv.conf} and files in the {@code /etc/resolver} directory by default. A failure to parse will return {@link DefaultDnsServerAddressStreamProvider}. """ try { UnixResolverDnsServerAddressStreamProvi...
java
static DnsServerAddressStreamProvider parseSilently() { try { UnixResolverDnsServerAddressStreamProvider nameServerCache = new UnixResolverDnsServerAddressStreamProvider(ETC_RESOLV_CONF_FILE, ETC_RESOLVER_DIR); return nameServerCache.mayOverrideNameServers() ? nameSer...
[ "static", "DnsServerAddressStreamProvider", "parseSilently", "(", ")", "{", "try", "{", "UnixResolverDnsServerAddressStreamProvider", "nameServerCache", "=", "new", "UnixResolverDnsServerAddressStreamProvider", "(", "ETC_RESOLV_CONF_FILE", ",", "ETC_RESOLVER_DIR", ")", ";", "re...
Attempt to parse {@code /etc/resolv.conf} and files in the {@code /etc/resolver} directory by default. A failure to parse will return {@link DefaultDnsServerAddressStreamProvider}.
[ "Attempt", "to", "parse", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/UnixResolverDnsServerAddressStreamProvider.java#L68-L78
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.replaceElement
public void replaceElement(final CmsContainerPageElementPanel elementWidget, final String elementId) { """ Replaces the given element with another content while keeping it's settings.<p> @param elementWidget the element to replace @param elementId the id of the replacing content """ final CmsRpcAc...
java
public void replaceElement(final CmsContainerPageElementPanel elementWidget, final String elementId) { final CmsRpcAction<CmsContainerElementData> action = new CmsRpcAction<CmsContainerElementData>() { @Override public void execute() { start(500, true); ...
[ "public", "void", "replaceElement", "(", "final", "CmsContainerPageElementPanel", "elementWidget", ",", "final", "String", "elementId", ")", "{", "final", "CmsRpcAction", "<", "CmsContainerElementData", ">", "action", "=", "new", "CmsRpcAction", "<", "CmsContainerElemen...
Replaces the given element with another content while keeping it's settings.<p> @param elementWidget the element to replace @param elementId the id of the replacing content
[ "Replaces", "the", "given", "element", "with", "another", "content", "while", "keeping", "it", "s", "settings", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L2753-L2815
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java
AddressClient.insertAddress
@BetaApi public final Operation insertAddress(String region, Address addressResource) { """ Creates an address resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (AddressClient addressClient = AddressClient.create()) { ProjectRegionName region = Proj...
java
@BetaApi public final Operation insertAddress(String region, Address addressResource) { InsertAddressHttpRequest request = InsertAddressHttpRequest.newBuilder() .setRegion(region) .setAddressResource(addressResource) .build(); return insertAddress(request); }
[ "@", "BetaApi", "public", "final", "Operation", "insertAddress", "(", "String", "region", ",", "Address", "addressResource", ")", "{", "InsertAddressHttpRequest", "request", "=", "InsertAddressHttpRequest", ".", "newBuilder", "(", ")", ".", "setRegion", "(", "region...
Creates an address resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (AddressClient addressClient = AddressClient.create()) { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); Address addressResource = Address.newBuilder().build(); Operat...
[ "Creates", "an", "address", "resource", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java#L537-L546
LearnLib/automatalib
visualization/dot-visualizer/src/main/java/net/automatalib/visualization/dot/DOT.java
DOT.runDOT
public static InputStream runDOT(File dotFile, String format, String... additionalOpts) throws IOException { """ Invokes the DOT utility on a file. Convenience method, see {@link #runDOT(Reader, String, String...)}. """ return runDOT(IOUtil.asBufferedUTF8Reader(dotFile), format, additionalOpts); }
java
public static InputStream runDOT(File dotFile, String format, String... additionalOpts) throws IOException { return runDOT(IOUtil.asBufferedUTF8Reader(dotFile), format, additionalOpts); }
[ "public", "static", "InputStream", "runDOT", "(", "File", "dotFile", ",", "String", "format", ",", "String", "...", "additionalOpts", ")", "throws", "IOException", "{", "return", "runDOT", "(", "IOUtil", ".", "asBufferedUTF8Reader", "(", "dotFile", ")", ",", "...
Invokes the DOT utility on a file. Convenience method, see {@link #runDOT(Reader, String, String...)}.
[ "Invokes", "the", "DOT", "utility", "on", "a", "file", ".", "Convenience", "method", "see", "{" ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/visualization/dot-visualizer/src/main/java/net/automatalib/visualization/dot/DOT.java#L149-L151
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.findPlugin
public static Plugin findPlugin(List<Plugin> plugins, String artifactId) { """ Returns the maven plugin for the given artifact id or returns null if it cannot be found """ if (plugins != null) { for (Plugin plugin : plugins) { String groupId = plugin.getGroupId(); ...
java
public static Plugin findPlugin(List<Plugin> plugins, String artifactId) { if (plugins != null) { for (Plugin plugin : plugins) { String groupId = plugin.getGroupId(); if (Strings.isNullOrBlank(groupId) || Objects.equal(groupId, mavenPluginsGroupId)) { ...
[ "public", "static", "Plugin", "findPlugin", "(", "List", "<", "Plugin", ">", "plugins", ",", "String", "artifactId", ")", "{", "if", "(", "plugins", "!=", "null", ")", "{", "for", "(", "Plugin", "plugin", ":", "plugins", ")", "{", "String", "groupId", ...
Returns the maven plugin for the given artifact id or returns null if it cannot be found
[ "Returns", "the", "maven", "plugin", "for", "the", "given", "artifact", "id", "or", "returns", "null", "if", "it", "cannot", "be", "found" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L64-L76
google/closure-compiler
src/com/google/javascript/jscomp/CheckMissingAndExtraRequires.java
CheckMissingAndExtraRequires.maybeAddUsage
private void maybeAddUsage(NodeTraversal t, Node n, final JSTypeExpression expr) { """ Adds a usage for the given type expression (unless it references a variable that is defined in the externs, in which case no goog.require() is needed). When a usage is added, it means that there should be a goog.require for th...
java
private void maybeAddUsage(NodeTraversal t, Node n, final JSTypeExpression expr) { // Just look at the root node, don't traverse. Predicate<Node> pred = new Predicate<Node>() { @Override public boolean apply(Node n) { return n == expr.getRoot(); } }; ...
[ "private", "void", "maybeAddUsage", "(", "NodeTraversal", "t", ",", "Node", "n", ",", "final", "JSTypeExpression", "expr", ")", "{", "// Just look at the root node, don't traverse.", "Predicate", "<", "Node", ">", "pred", "=", "new", "Predicate", "<", "Node", ">",...
Adds a usage for the given type expression (unless it references a variable that is defined in the externs, in which case no goog.require() is needed). When a usage is added, it means that there should be a goog.require for that type.
[ "Adds", "a", "usage", "for", "the", "given", "type", "expression", "(", "unless", "it", "references", "a", "variable", "that", "is", "defined", "in", "the", "externs", "in", "which", "case", "no", "goog", ".", "require", "()", "is", "needed", ")", ".", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckMissingAndExtraRequires.java#L717-L727
SonarSource/sonarqube
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java
ComponentIssuesLoader.loadClosedIssues
public List<DefaultIssue> loadClosedIssues(String componentUuid) { """ Load closed issues for the specified Component, which have at least one line diff in changelog AND are neither hotspots nor manual vulnerabilities. <p> Closed issues do not have a line number in DB (it is unset when the issue is closed), thi...
java
public List<DefaultIssue> loadClosedIssues(String componentUuid) { if (closedIssueMaxAge == 0) { return emptyList(); } Date date = new Date(system2.now()); long closeDateAfter = date.toInstant() .minus(closedIssueMaxAge, ChronoUnit.DAYS) .truncatedTo(ChronoUnit.DAYS) .toEpochMil...
[ "public", "List", "<", "DefaultIssue", ">", "loadClosedIssues", "(", "String", "componentUuid", ")", "{", "if", "(", "closedIssueMaxAge", "==", "0", ")", "{", "return", "emptyList", "(", ")", ";", "}", "Date", "date", "=", "new", "Date", "(", "system2", ...
Load closed issues for the specified Component, which have at least one line diff in changelog AND are neither hotspots nor manual vulnerabilities. <p> Closed issues do not have a line number in DB (it is unset when the issue is closed), this method returns {@link DefaultIssue} objects which line number is populated fr...
[ "Load", "closed", "issues", "for", "the", "specified", "Component", "which", "have", "at", "least", "one", "line", "diff", "in", "changelog", "AND", "are", "neither", "hotspots", "nor", "manual", "vulnerabilities", ".", "<p", ">", "Closed", "issues", "do", "...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java#L217-L230
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/AbstractCompare.java
AbstractCompare.execute
@Override protected boolean execute() { """ Compare the trigger and compare value. @return true if the trigger input's value compares to the compare value, otherwise false """ // Disabled triggers are always false if ((trigger instanceof Disableable) && ((Disableable) trigger).isDisabled() && !(tri...
java
@Override protected boolean execute() { // Disabled triggers are always false if ((trigger instanceof Disableable) && ((Disableable) trigger).isDisabled() && !(trigger instanceof Input && ((Input) trigger).isReadOnly())) { return false; } final Object triggerValue = getTriggerValue(null); final Objec...
[ "@", "Override", "protected", "boolean", "execute", "(", ")", "{", "// Disabled triggers are always false", "if", "(", "(", "trigger", "instanceof", "Disableable", ")", "&&", "(", "(", "Disableable", ")", "trigger", ")", ".", "isDisabled", "(", ")", "&&", "!",...
Compare the trigger and compare value. @return true if the trigger input's value compares to the compare value, otherwise false
[ "Compare", "the", "trigger", "and", "compare", "value", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/AbstractCompare.java#L88-L100
yshrsmz/KeyboardVisibilityEvent
keyboardvisibilityevent/src/main/java/net/yslibrary/android/keyboardvisibilityevent/util/UIUtil.java
UIUtil.hideKeyboard
public static void hideKeyboard(Context context, View target) { """ hide keyboard @param context Context @param target View that currently has focus """ if (context == null || target == null) { return; } InputMethodManager imm = getInputMethodManager(context); ...
java
public static void hideKeyboard(Context context, View target) { if (context == null || target == null) { return; } InputMethodManager imm = getInputMethodManager(context); imm.hideSoftInputFromWindow(target.getWindowToken(), 0); }
[ "public", "static", "void", "hideKeyboard", "(", "Context", "context", ",", "View", "target", ")", "{", "if", "(", "context", "==", "null", "||", "target", "==", "null", ")", "{", "return", ";", "}", "InputMethodManager", "imm", "=", "getInputMethodManager",...
hide keyboard @param context Context @param target View that currently has focus
[ "hide", "keyboard" ]
train
https://github.com/yshrsmz/KeyboardVisibilityEvent/blob/fbde29a2c28ff1b2fa44f43cdd1ff3ec1d3321d8/keyboardvisibilityevent/src/main/java/net/yslibrary/android/keyboardvisibilityevent/util/UIUtil.java#L62-L69
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.getList
public List<T> getList(InputStream stream) throws IOException, JsonFormatException { """ Attempts to parse the given data as {@link List} of objects. @param stream JSON-formatted data @return {@link List} of objects @throws IOException @throws JsonFormatException The given data is malformed, or its type is u...
java
public List<T> getList(InputStream stream) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(stream); return getList(parser, null); }
[ "public", "List", "<", "T", ">", "getList", "(", "InputStream", "stream", ")", "throws", "IOException", ",", "JsonFormatException", "{", "JsonPullParser", "parser", "=", "JsonPullParser", ".", "newParser", "(", "stream", ")", ";", "return", "getList", "(", "pa...
Attempts to parse the given data as {@link List} of objects. @param stream JSON-formatted data @return {@link List} of objects @throws IOException @throws JsonFormatException The given data is malformed, or its type is unexpected
[ "Attempts", "to", "parse", "the", "given", "data", "as", "{", "@link", "List", "}", "of", "objects", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L83-L86
knowm/XChart
xchart/src/main/java/org/knowm/xchart/internal/chartpart/Legend_.java
Legend_.getSeriesTextBounds
Map<String, Rectangle2D> getSeriesTextBounds(S series) { """ Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n". This method returns a Map for each single legend entry, which is normally just a Map with one single entry. @param series @return """ // F...
java
Map<String, Rectangle2D> getSeriesTextBounds(S series) { // FontMetrics fontMetrics = g.getFontMetrics(getChartPainter().getstyler().getLegendFont()); // float fontDescent = fontMetrics.getDescent(); String lines[] = series.getName().split("\\n"); Map<String, Rectangle2D> seriesTextBounds = ne...
[ "Map", "<", "String", ",", "Rectangle2D", ">", "getSeriesTextBounds", "(", "S", "series", ")", "{", "// FontMetrics fontMetrics = g.getFontMetrics(getChartPainter().getstyler().getLegendFont());", "// float fontDescent = fontMetrics.getDescent();", "String", "lines", "[", "]", "=...
Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n". This method returns a Map for each single legend entry, which is normally just a Map with one single entry. @param series @return
[ "Normally", "each", "legend", "entry", "just", "has", "one", "line", "of", "text", "but", "it", "can", "be", "made", "multi", "-", "line", "by", "adding", "\\\\", "n", ".", "This", "method", "returns", "a", "Map", "for", "each", "single", "legend", "en...
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/internal/chartpart/Legend_.java#L289-L313
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AccessAuditContext.java
AccessAuditContext.doAs
public static <T> T doAs(final SecurityIdentity securityIdentity, final InetAddress remoteAddress, final PrivilegedAction<T> action) { """ Perform work with a new {@code AccessAuditContext} as a particular {@code SecurityIdentity} @param securityIdentity the {@code SecurityIdentity} that the specified {@code acti...
java
public static <T> T doAs(final SecurityIdentity securityIdentity, final InetAddress remoteAddress, final PrivilegedAction<T> action) { return doAs(false, securityIdentity, remoteAddress, action); }
[ "public", "static", "<", "T", ">", "T", "doAs", "(", "final", "SecurityIdentity", "securityIdentity", ",", "final", "InetAddress", "remoteAddress", ",", "final", "PrivilegedAction", "<", "T", ">", "action", ")", "{", "return", "doAs", "(", "false", ",", "sec...
Perform work with a new {@code AccessAuditContext} as a particular {@code SecurityIdentity} @param securityIdentity the {@code SecurityIdentity} that the specified {@code action} will run as. May be {@code null} @param remoteAddress the remote address of the caller. @param action the work to perform. Cannot be {@code n...
[ "Perform", "work", "with", "a", "new", "{", "@code", "AccessAuditContext", "}", "as", "a", "particular", "{", "@code", "SecurityIdentity", "}", "@param", "securityIdentity", "the", "{", "@code", "SecurityIdentity", "}", "that", "the", "specified", "{", "@code", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AccessAuditContext.java#L174-L176
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.addDataLakeStoreAccountAsync
public Observable<Void> addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { """ Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. @param resourceGroupName The name ...
java
public Observable<Void> addDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, AddDataLakeStoreParameters parameters) { return addDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName, parameters).map(new Func1<...
[ "public", "Observable", "<", "Void", ">", "addDataLakeStoreAccountAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "dataLakeStoreAccountName", ",", "AddDataLakeStoreParameters", "parameters", ")", "{", "return", "addDataLakeStoreAccou...
Updates the specified Data Lake Analytics account to include the additional Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account. @...
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "include", "the", "additional", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1161-L1168
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/Http2ConnectionManager.java
Http2ConnectionManager.removeClientChannel
void removeClientChannel(HttpRoute httpRoute, Http2ClientChannel http2ClientChannel) { """ Remove http/2 client channel from per route pool. @param httpRoute the http route @param http2ClientChannel represents the http/2 client channel to be removed """ EventLoopPool.PerRouteConnectionPool...
java
void removeClientChannel(HttpRoute httpRoute, Http2ClientChannel http2ClientChannel) { EventLoopPool.PerRouteConnectionPool perRouteConnectionPool = fetchPerRoutePool(httpRoute, http2ClientChannel.getChannel() ...
[ "void", "removeClientChannel", "(", "HttpRoute", "httpRoute", ",", "Http2ClientChannel", "http2ClientChannel", ")", "{", "EventLoopPool", ".", "PerRouteConnectionPool", "perRouteConnectionPool", "=", "fetchPerRoutePool", "(", "httpRoute", ",", "http2ClientChannel", ".", "ge...
Remove http/2 client channel from per route pool. @param httpRoute the http route @param http2ClientChannel represents the http/2 client channel to be removed
[ "Remove", "http", "/", "2", "client", "channel", "from", "per", "route", "pool", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/Http2ConnectionManager.java#L156-L163
OpenHFT/Chronicle-Map
src/main/java/net/openhft/chronicle/hash/impl/BigSegmentHeader.java
BigSegmentHeader.tryReadLockMillis
private static boolean tryReadLockMillis(long address, long timeInMillis, boolean interruptible) throws InterruptedException { """ Use a timer which is more insensitive to jumps in time like GCs and context switches. """ long lastTime = System.currentTimeMillis(); do { i...
java
private static boolean tryReadLockMillis(long address, long timeInMillis, boolean interruptible) throws InterruptedException { long lastTime = System.currentTimeMillis(); do { if (LOCK.tryReadLock(A, null, address + LOCK_OFFSET)) return true; checkInte...
[ "private", "static", "boolean", "tryReadLockMillis", "(", "long", "address", ",", "long", "timeInMillis", ",", "boolean", "interruptible", ")", "throws", "InterruptedException", "{", "long", "lastTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "do",...
Use a timer which is more insensitive to jumps in time like GCs and context switches.
[ "Use", "a", "timer", "which", "is", "more", "insensitive", "to", "jumps", "in", "time", "like", "GCs", "and", "context", "switches", "." ]
train
https://github.com/OpenHFT/Chronicle-Map/blob/0b09733cc96302f96be4394a261699eeb021fe37/src/main/java/net/openhft/chronicle/hash/impl/BigSegmentHeader.java#L133-L148
samskivert/samskivert
src/main/java/com/samskivert/util/ComparableArrayList.java
ComparableArrayList.rsort
public void rsort () { """ Sorts the elements in this list using the quick sort algorithm according to their reverse natural ordering. The elements must implement {@link Comparable} and all be mutually comparable. """ sort(new Comparator<T>() { public int compare (T o1, T o2) { ...
java
public void rsort () { sort(new Comparator<T>() { public int compare (T o1, T o2) { return _comp.compare(o2, o1); } }); }
[ "public", "void", "rsort", "(", ")", "{", "sort", "(", "new", "Comparator", "<", "T", ">", "(", ")", "{", "public", "int", "compare", "(", "T", "o1", ",", "T", "o2", ")", "{", "return", "_comp", ".", "compare", "(", "o2", ",", "o1", ")", ";", ...
Sorts the elements in this list using the quick sort algorithm according to their reverse natural ordering. The elements must implement {@link Comparable} and all be mutually comparable.
[ "Sorts", "the", "elements", "in", "this", "list", "using", "the", "quick", "sort", "algorithm", "according", "to", "their", "reverse", "natural", "ordering", ".", "The", "elements", "must", "implement", "{" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ComparableArrayList.java#L40-L47
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplaceManager.java
CmsWorkplaceManager.getDefaultGroupNameTranslation
private I_CmsGroupNameTranslation getDefaultGroupNameTranslation() { """ Returns a dummy group name translation which leaves the group names unchanged.<p> @return a dummy group name translation """ return new I_CmsGroupNameTranslation() { public String translateGroupName(String group, ...
java
private I_CmsGroupNameTranslation getDefaultGroupNameTranslation() { return new I_CmsGroupNameTranslation() { public String translateGroupName(String group, boolean keepOu) { return keepOu ? group : CmsOrganizationalUnit.getSimpleName(group); } }; }
[ "private", "I_CmsGroupNameTranslation", "getDefaultGroupNameTranslation", "(", ")", "{", "return", "new", "I_CmsGroupNameTranslation", "(", ")", "{", "public", "String", "translateGroupName", "(", "String", "group", ",", "boolean", "keepOu", ")", "{", "return", "keepO...
Returns a dummy group name translation which leaves the group names unchanged.<p> @return a dummy group name translation
[ "Returns", "a", "dummy", "group", "name", "translation", "which", "leaves", "the", "group", "names", "unchanged", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplaceManager.java#L2307-L2316
alkacon/opencms-core
src/org/opencms/xml/CmsXmlContentDefinition.java
CmsXmlContentDefinition.getContentHandlerForResource
public static I_CmsXmlContentHandler getContentHandlerForResource(CmsObject cms, CmsResource resource) throws CmsException { """ Returns a content handler instance for the given resource.<p> @param cms the cms-object @param resource the resource @return the content handler @throws CmsException if som...
java
public static I_CmsXmlContentHandler getContentHandlerForResource(CmsObject cms, CmsResource resource) throws CmsException { return getContentDefinitionForResource(cms, resource).getContentHandler(); }
[ "public", "static", "I_CmsXmlContentHandler", "getContentHandlerForResource", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "getContentDefinitionForResource", "(", "cms", ",", "resource", ")", ".", "getContentHandle...
Returns a content handler instance for the given resource.<p> @param cms the cms-object @param resource the resource @return the content handler @throws CmsException if something goes wrong
[ "Returns", "a", "content", "handler", "instance", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlContentDefinition.java#L341-L345
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/model/ModelAdapter.java
ModelAdapter.adaptResult
public ChatResult adaptResult(ComapiResult<?> result, Boolean success) { """ Translates Foundation result to Chat SDK result. @param result Foundation result. @param success True if required Chat SDK processing was successful. @return Chat SDK result. """ return new ChatResult(result.isSuccessfu...
java
public ChatResult adaptResult(ComapiResult<?> result, Boolean success) { return new ChatResult(result.isSuccessful() && success, result.isSuccessful() ? null : new ChatResult.Error(result)); }
[ "public", "ChatResult", "adaptResult", "(", "ComapiResult", "<", "?", ">", "result", ",", "Boolean", "success", ")", "{", "return", "new", "ChatResult", "(", "result", ".", "isSuccessful", "(", ")", "&&", "success", ",", "result", ".", "isSuccessful", "(", ...
Translates Foundation result to Chat SDK result. @param result Foundation result. @param success True if required Chat SDK processing was successful. @return Chat SDK result.
[ "Translates", "Foundation", "result", "to", "Chat", "SDK", "result", "." ]
train
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/model/ModelAdapter.java#L126-L129
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java
Normalizer.compare
public static int compare(int char32a, int char32b, int options) { """ Convenience method that can have faster implementation by not allocating buffers. @param char32a the first code point to be checked against the @param char32b the second code point @param options A bit set of options """ ...
java
public static int compare(int char32a, int char32b, int options) { return internalCompare(UTF16.valueOf(char32a), UTF16.valueOf(char32b), options|INPUT_IS_FCD); }
[ "public", "static", "int", "compare", "(", "int", "char32a", ",", "int", "char32b", ",", "int", "options", ")", "{", "return", "internalCompare", "(", "UTF16", ".", "valueOf", "(", "char32a", ")", ",", "UTF16", ".", "valueOf", "(", "char32b", ")", ",", ...
Convenience method that can have faster implementation by not allocating buffers. @param char32a the first code point to be checked against the @param char32b the second code point @param options A bit set of options
[ "Convenience", "method", "that", "can", "have", "faster", "implementation", "by", "not", "allocating", "buffers", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L1291-L1293
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/libcore/util/BasicLruCache.java
BasicLruCache.put
public synchronized final V put(K key, V value) { """ Caches {@code value} for {@code key}. The value is moved to the head of the queue. @return the previous value mapped by {@code key}. Although that entry is no longer cached, it has not been passed to {@link #entryEvicted}. """ if (key == null) ...
java
public synchronized final V put(K key, V value) { if (key == null) { throw new NullPointerException("key == null"); } else if (value == null) { throw new NullPointerException("value == null"); } V previous = map.put(key, value); trimToSize(maxSize); ...
[ "public", "synchronized", "final", "V", "put", "(", "K", "key", ",", "V", "value", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"key == null\"", ")", ";", "}", "else", "if", "(", "value", "==", "n...
Caches {@code value} for {@code key}. The value is moved to the head of the queue. @return the previous value mapped by {@code key}. Although that entry is no longer cached, it has not been passed to {@link #entryEvicted}.
[ "Caches", "{", "@code", "value", "}", "for", "{", "@code", "key", "}", ".", "The", "value", "is", "moved", "to", "the", "head", "of", "the", "queue", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/util/BasicLruCache.java#L71-L81
Breinify/brein-time-utilities
src/com/brein/time/timeseries/BucketTimeSeries.java
BucketTimeSeries.normalizeUnixTimeStamp
public BucketEndPoints normalizeUnixTimeStamp(final long unixTimeStamp) { """ This method is used to determine the bucket the {@code unixTimeStamp} belongs into. The bucket is represented by a {@link BucketEndPoints} instance, which defines the end-points of the bucket and provides methods to calculate the dista...
java
public BucketEndPoints normalizeUnixTimeStamp(final long unixTimeStamp) { final TimeUnit timeUnit = config.getTimeUnit(); // first get the time stamp in the unit of the time-series final long timeStamp = timeUnit.convert(unixTimeStamp, TimeUnit.SECONDS); /* * Now lets, normali...
[ "public", "BucketEndPoints", "normalizeUnixTimeStamp", "(", "final", "long", "unixTimeStamp", ")", "{", "final", "TimeUnit", "timeUnit", "=", "config", ".", "getTimeUnit", "(", ")", ";", "// first get the time stamp in the unit of the time-series", "final", "long", "timeS...
This method is used to determine the bucket the {@code unixTimeStamp} belongs into. The bucket is represented by a {@link BucketEndPoints} instance, which defines the end-points of the bucket and provides methods to calculate the distance between buckets. @param unixTimeStamp the time-stamp to determine the bucket for...
[ "This", "method", "is", "used", "to", "determine", "the", "bucket", "the", "{", "@code", "unixTimeStamp", "}", "belongs", "into", ".", "The", "bucket", "is", "represented", "by", "a", "{", "@link", "BucketEndPoints", "}", "instance", "which", "defines", "the...
train
https://github.com/Breinify/brein-time-utilities/blob/ec0165a50ec1951ec7730b72c85c801c2018f314/src/com/brein/time/timeseries/BucketTimeSeries.java#L367-L391
wildfly/wildfly-core
logging/src/main/java/org/jboss/as/logging/LoggingSubsystemParser.java
LoggingSubsystemParser.addOperationAddress
static void addOperationAddress(final ModelNode operation, final PathAddress base, final String key, final String value) { """ Appends the key and value to the address and sets the address on the operation. @param operation the operation to set the address on @param base the base address @param key ...
java
static void addOperationAddress(final ModelNode operation, final PathAddress base, final String key, final String value) { operation.get(OP_ADDR).set(base.append(key, value).toModelNode()); }
[ "static", "void", "addOperationAddress", "(", "final", "ModelNode", "operation", ",", "final", "PathAddress", "base", ",", "final", "String", "key", ",", "final", "String", "value", ")", "{", "operation", ".", "get", "(", "OP_ADDR", ")", ".", "set", "(", "...
Appends the key and value to the address and sets the address on the operation. @param operation the operation to set the address on @param base the base address @param key the key for the new address @param value the value for the new address
[ "Appends", "the", "key", "and", "value", "to", "the", "address", "and", "sets", "the", "address", "on", "the", "operation", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/logging/src/main/java/org/jboss/as/logging/LoggingSubsystemParser.java#L69-L71
pac4j/pac4j
pac4j-saml/src/main/java/org/pac4j/saml/profile/impl/AbstractSAML2ResponseValidator.java
AbstractSAML2ResponseValidator.validateIssuer
protected final void validateIssuer(final Issuer issuer, final SAML2MessageContext context) { """ Validate issuer format and value. @param issuer the issuer @param context the context """ if (issuer.getFormat() != null && !issuer.getFormat().equals(NameIDType.ENTITY)) { throw new SAMLI...
java
protected final void validateIssuer(final Issuer issuer, final SAML2MessageContext context) { if (issuer.getFormat() != null && !issuer.getFormat().equals(NameIDType.ENTITY)) { throw new SAMLIssuerException("Issuer type is not entity but " + issuer.getFormat()); } final String entit...
[ "protected", "final", "void", "validateIssuer", "(", "final", "Issuer", "issuer", ",", "final", "SAML2MessageContext", "context", ")", "{", "if", "(", "issuer", ".", "getFormat", "(", ")", "!=", "null", "&&", "!", "issuer", ".", "getFormat", "(", ")", ".",...
Validate issuer format and value. @param issuer the issuer @param context the context
[ "Validate", "issuer", "format", "and", "value", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-saml/src/main/java/org/pac4j/saml/profile/impl/AbstractSAML2ResponseValidator.java#L137-L146
mgormley/pacaya
src/main/java/edu/jhu/pacaya/hypergraph/Hyperalgo.java
Hyperalgo.weightAdjoint
private static void weightAdjoint(final Hypergraph graph, final Hyperpotential w, final Algebra s, final Scores scores, boolean backOutside) { """ Computes the adjoints of the hyperedge weights. INPUT: scores.alpha, scores.beta, scores.alphaAdj, scores.betaAdj. OUTPUT: scores.weightsAdj. @param ...
java
private static void weightAdjoint(final Hypergraph graph, final Hyperpotential w, final Algebra s, final Scores scores, boolean backOutside) { final double[] weightAdj = new double[graph.getNumEdges()]; HyperedgeDoubleFn lambda = new HyperedgeDoubleFn() { public void apply(Hypere...
[ "private", "static", "void", "weightAdjoint", "(", "final", "Hypergraph", "graph", ",", "final", "Hyperpotential", "w", ",", "final", "Algebra", "s", ",", "final", "Scores", "scores", ",", "boolean", "backOutside", ")", "{", "final", "double", "[", "]", "wei...
Computes the adjoints of the hyperedge weights. INPUT: scores.alpha, scores.beta, scores.alphaAdj, scores.betaAdj. OUTPUT: scores.weightsAdj. @param graph The hypergraph @param w The potential function. @param s The semiring. @param scores Input and output struct.
[ "Computes", "the", "adjoints", "of", "the", "hyperedge", "weights", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/hypergraph/Hyperalgo.java#L494-L504
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.getAt
public static CharSequence getAt(CharSequence text, int index) { """ Support the subscript operator for CharSequence. @param text a CharSequence @param index the index of the Character to get @return the Character at the given index @since 1.0 """ index = normaliseIndex(index, text.length()); ...
java
public static CharSequence getAt(CharSequence text, int index) { index = normaliseIndex(index, text.length()); return text.subSequence(index, index + 1); }
[ "public", "static", "CharSequence", "getAt", "(", "CharSequence", "text", ",", "int", "index", ")", "{", "index", "=", "normaliseIndex", "(", "index", ",", "text", ".", "length", "(", ")", ")", ";", "return", "text", ".", "subSequence", "(", "index", ","...
Support the subscript operator for CharSequence. @param text a CharSequence @param index the index of the Character to get @return the Character at the given index @since 1.0
[ "Support", "the", "subscript", "operator", "for", "CharSequence", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L1240-L1243
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java
AbstractSearchStructure.computeNearestNeighbors
public Answer computeNearestNeighbors(int k, String queryId) throws Exception { """ This method returns an {@link Answer} object, which contains the k nearest neighbors along with their ids and distances from the query vector, ordered by lowest distance. The methods calls {@link #computeNearestNeighborsInternal(...
java
public Answer computeNearestNeighbors(int k, String queryId) throws Exception { int internalIdQuery = getInternalId(queryId); long start = System.nanoTime(); BoundedPriorityQueue<Result> nnQueue = computeNearestNeighborsInternal(k, internalIdQuery); long indexSearchTime = System.nanoTime() - start; r...
[ "public", "Answer", "computeNearestNeighbors", "(", "int", "k", ",", "String", "queryId", ")", "throws", "Exception", "{", "int", "internalIdQuery", "=", "getInternalId", "(", "queryId", ")", ";", "long", "start", "=", "System", ".", "nanoTime", "(", ")", ";...
This method returns an {@link Answer} object, which contains the k nearest neighbors along with their ids and distances from the query vector, ordered by lowest distance. The methods calls {@link #computeNearestNeighborsInternal(int, int)} and then performs id lookup. @param k The number of nearest neighbors to return...
[ "This", "method", "returns", "an", "{", "@link", "Answer", "}", "object", "which", "contains", "the", "k", "nearest", "neighbors", "along", "with", "their", "ids", "and", "distances", "from", "the", "query", "vector", "ordered", "by", "lowest", "distance", "...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java#L320-L328
mnlipp/jgrapes
org.jgrapes.http/src/org/jgrapes/http/HttpConnector.java
HttpConnector.onConnected
@Handler(channels = NetworkChannel.class) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public void onConnected(Connected event, TcpChannel netConnChannel) throws InterruptedException, IOException { """ Called when the network connection is established. Triggers the frther processing of the...
java
@Handler(channels = NetworkChannel.class) @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public void onConnected(Connected event, TcpChannel netConnChannel) throws InterruptedException, IOException { // Check if an app channel has been waiting for such a connection WebAppMsgChannel...
[ "@", "Handler", "(", "channels", "=", "NetworkChannel", ".", "class", ")", "@", "SuppressWarnings", "(", "\"PMD.DataflowAnomalyAnalysis\"", ")", "public", "void", "onConnected", "(", "Connected", "event", ",", "TcpChannel", "netConnChannel", ")", "throws", "Interrup...
Called when the network connection is established. Triggers the frther processing of the initial request. @param event the event @param netConnChannel the network layer channel @throws InterruptedException if the execution is interrupted @throws IOException Signals that an I/O exception has occurred.
[ "Called", "when", "the", "network", "connection", "is", "established", ".", "Triggers", "the", "frther", "processing", "of", "the", "initial", "request", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.http/src/org/jgrapes/http/HttpConnector.java#L170-L187
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/spi/MediaSource.java
MediaSource.getMediaCropDimension
@Deprecated protected final @Nullable CropDimension getMediaCropDimension(@NotNull MediaRequest mediaRequest) { """ Get (optional) crop dimensions from resource @param mediaRequest Media request @return Crop dimension or null if not set or invalid @deprecated Use {@link #getMediaCropDimension(MediaRequest, Me...
java
@Deprecated protected final @Nullable CropDimension getMediaCropDimension(@NotNull MediaRequest mediaRequest) { return getMediaCropDimension(mediaRequest, null); }
[ "@", "Deprecated", "protected", "final", "@", "Nullable", "CropDimension", "getMediaCropDimension", "(", "@", "NotNull", "MediaRequest", "mediaRequest", ")", "{", "return", "getMediaCropDimension", "(", "mediaRequest", ",", "null", ")", ";", "}" ]
Get (optional) crop dimensions from resource @param mediaRequest Media request @return Crop dimension or null if not set or invalid @deprecated Use {@link #getMediaCropDimension(MediaRequest, MediaHandlerConfig)}
[ "Get", "(", "optional", ")", "crop", "dimensions", "from", "resource" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/spi/MediaSource.java#L193-L196
mgormley/pacaya
src/main/java/edu/jhu/pacaya/sch/graph/WeightedIntDiGraph.java
WeightedIntDiGraph.fromUnweighted
public static WeightedIntDiGraph fromUnweighted(IntDiGraph g, Function<DiEdge, Double> makeDefaultWeight) { """ Constructs a weighted directed graph with the same nodes and edges as the given unweighted graph """ WeightedIntDiGraph wg = new WeightedIntDiGraph(makeDefaultWeight); wg.addAll(g); ...
java
public static WeightedIntDiGraph fromUnweighted(IntDiGraph g, Function<DiEdge, Double> makeDefaultWeight) { WeightedIntDiGraph wg = new WeightedIntDiGraph(makeDefaultWeight); wg.addAll(g); return wg; }
[ "public", "static", "WeightedIntDiGraph", "fromUnweighted", "(", "IntDiGraph", "g", ",", "Function", "<", "DiEdge", ",", "Double", ">", "makeDefaultWeight", ")", "{", "WeightedIntDiGraph", "wg", "=", "new", "WeightedIntDiGraph", "(", "makeDefaultWeight", ")", ";", ...
Constructs a weighted directed graph with the same nodes and edges as the given unweighted graph
[ "Constructs", "a", "weighted", "directed", "graph", "with", "the", "same", "nodes", "and", "edges", "as", "the", "given", "unweighted", "graph" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/sch/graph/WeightedIntDiGraph.java#L83-L87
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/font/GlyphPage.java
GlyphPage.renderGlyph
private void renderGlyph(Glyph glyph, int width, int height) throws SlickException { """ Loads a single glyph to the backing texture, if it fits. @param glyph The glyph to be rendered @param width The expected width of the glyph @param height The expected height of the glyph @throws SlickException if the gly...
java
private void renderGlyph(Glyph glyph, int width, int height) throws SlickException { // Draw the glyph to the scratch image using Java2D. scratchGraphics.setComposite(AlphaComposite.Clear); scratchGraphics.fillRect(0, 0, MAX_GLYPH_SIZE, MAX_GLYPH_SIZE); scratchGraphics.setComposite(AlphaComposite.SrcOver); ...
[ "private", "void", "renderGlyph", "(", "Glyph", "glyph", ",", "int", "width", ",", "int", "height", ")", "throws", "SlickException", "{", "// Draw the glyph to the scratch image using Java2D.\r", "scratchGraphics", ".", "setComposite", "(", "AlphaComposite", ".", "Clear...
Loads a single glyph to the backing texture, if it fits. @param glyph The glyph to be rendered @param width The expected width of the glyph @param height The expected height of the glyph @throws SlickException if the glyph could not be rendered.
[ "Loads", "a", "single", "glyph", "to", "the", "backing", "texture", "if", "it", "fits", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/font/GlyphPage.java#L196-L217
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/BeanMethodActionRule.java
BeanMethodActionRule.newInstance
public static BeanMethodActionRule newInstance(String id, String beanId, String methodName, Boolean hidden) throws IllegalRuleException { """ Returns a new instance of BeanActionRule. @param id the action id @param beanId the bean id @param methodName the method name @param hidden true if hiding ...
java
public static BeanMethodActionRule newInstance(String id, String beanId, String methodName, Boolean hidden) throws IllegalRuleException { if (methodName == null) { throw new IllegalRuleException("The 'action' element requires an 'method' attribute"); } BeanMethodActionRu...
[ "public", "static", "BeanMethodActionRule", "newInstance", "(", "String", "id", ",", "String", "beanId", ",", "String", "methodName", ",", "Boolean", "hidden", ")", "throws", "IllegalRuleException", "{", "if", "(", "methodName", "==", "null", ")", "{", "throw", ...
Returns a new instance of BeanActionRule. @param id the action id @param beanId the bean id @param methodName the method name @param hidden true if hiding the result of the action; false otherwise @return the bean method action rule @throws IllegalRuleException if an illegal rule is found
[ "Returns", "a", "new", "instance", "of", "BeanActionRule", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/BeanMethodActionRule.java#L274-L286
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/memory/Cache.java
Cache.get
public synchronized Value get(Key key, CloseableListenable user) { """ Return the cached data corresponding to the given key, or null if it does not exist. The given user is added as using the cached data. Once closed, the user is automatically removed from the list of users. """ Data<Value> data = map.ge...
java
public synchronized Value get(Key key, CloseableListenable user) { Data<Value> data = map.get(key); if (data == null) return null; data.users.add(user); if (user != null) user.addCloseListener(new Listener<CloseableListenable>() { @Override public void fire(CloseableListenable event) { e...
[ "public", "synchronized", "Value", "get", "(", "Key", "key", ",", "CloseableListenable", "user", ")", "{", "Data", "<", "Value", ">", "data", "=", "map", ".", "get", "(", "key", ")", ";", "if", "(", "data", "==", "null", ")", "return", "null", ";", ...
Return the cached data corresponding to the given key, or null if it does not exist. The given user is added as using the cached data. Once closed, the user is automatically removed from the list of users.
[ "Return", "the", "cached", "data", "corresponding", "to", "the", "given", "key", "or", "null", "if", "it", "does", "not", "exist", ".", "The", "given", "user", "is", "added", "as", "using", "the", "cached", "data", ".", "Once", "closed", "the", "user", ...
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/memory/Cache.java#L51-L64
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java
Blacklist.write
public void write(OutputStream os) { """ Dumps data to the given output stream. @param os output stream """ List<String> ids = new ArrayList<String>(score.keySet()); final Map<String, Integer> score = this.score; Collections.sort(ids, new Comparator<String>() { @Override public int compare(Str...
java
public void write(OutputStream os) { List<String> ids = new ArrayList<String>(score.keySet()); final Map<String, Integer> score = this.score; Collections.sort(ids, new Comparator<String>() { @Override public int compare(String o1, String o2) { return score.get(o2).compareTo(score.get(o1)); } ...
[ "public", "void", "write", "(", "OutputStream", "os", ")", "{", "List", "<", "String", ">", "ids", "=", "new", "ArrayList", "<", "String", ">", "(", "score", ".", "keySet", "(", ")", ")", ";", "final", "Map", "<", "String", ",", "Integer", ">", "sc...
Dumps data to the given output stream. @param os output stream
[ "Dumps", "data", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/util/Blacklist.java#L152-L185
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/UnixPath.java
UnixPath.getFileName
@Nullable public UnixPath getFileName() { """ Returns last component in {@code path}. @see java.nio.file.Path#getFileName() """ if (path.isEmpty()) { return EMPTY_PATH; } else if (isRoot()) { return null; } else { List<String> parts = getParts(); String last = parts.get...
java
@Nullable public UnixPath getFileName() { if (path.isEmpty()) { return EMPTY_PATH; } else if (isRoot()) { return null; } else { List<String> parts = getParts(); String last = parts.get(parts.size() - 1); return parts.size() == 1 && path.equals(last) ? this ...
[ "@", "Nullable", "public", "UnixPath", "getFileName", "(", ")", "{", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "return", "EMPTY_PATH", ";", "}", "else", "if", "(", "isRoot", "(", ")", ")", "{", "return", "null", ";", "}", "else", "{", ...
Returns last component in {@code path}. @see java.nio.file.Path#getFileName()
[ "Returns", "last", "component", "in", "{", "@code", "path", "}", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/UnixPath.java#L157-L170
Impetus/Kundera
src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java
HibernateClient.onExecuteUpdate
public int onExecuteUpdate(String query, Map<Parameter, Object> parameterMap, int firstResult, int maxResult) { """ Find. @param query the native fquery @param parameterMap the parameter map @param maxResult @param firstResult @return the list """ s = getStatelessSession(); Query q = ...
java
public int onExecuteUpdate(String query, Map<Parameter, Object> parameterMap, int firstResult, int maxResult) { s = getStatelessSession(); Query q = s.createQuery(query); q.setFirstResult(firstResult); q.setMaxResults(maxResult); setParameters(parameterMap,...
[ "public", "int", "onExecuteUpdate", "(", "String", "query", ",", "Map", "<", "Parameter", ",", "Object", ">", "parameterMap", ",", "int", "firstResult", ",", "int", "maxResult", ")", "{", "s", "=", "getStatelessSession", "(", ")", ";", "Query", "q", "=", ...
Find. @param query the native fquery @param parameterMap the parameter map @param maxResult @param firstResult @return the list
[ "Find", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java#L645-L664
box/box-java-sdk
src/main/java/com/box/sdk/BoxGroup.java
BoxGroup.createGroup
public static BoxGroup.Info createGroup(BoxAPIConnection api, String name, String provenance, String externalSyncIdentifier, String description, String invitabilityLevel, String memberViewabilityLevel) { """ Creates a new group...
java
public static BoxGroup.Info createGroup(BoxAPIConnection api, String name, String provenance, String externalSyncIdentifier, String description, String invitabilityLevel, String memberViewabilityLevel) { JsonObject requestJS...
[ "public", "static", "BoxGroup", ".", "Info", "createGroup", "(", "BoxAPIConnection", "api", ",", "String", "name", ",", "String", "provenance", ",", "String", "externalSyncIdentifier", ",", "String", "description", ",", "String", "invitabilityLevel", ",", "String", ...
Creates a new group with a specified name. @param api the API connection to be used by the group. @param name the name of the new group. @param provenance the provenance of the new group @param externalSyncIdentifier the external_sync_identifier of the new group @param description the description of the new group @p...
[ "Creates", "a", "new", "group", "with", "a", "specified", "name", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxGroup.java#L78-L108
Azure/autorest-clientruntime-for-java
azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java
AzureClient.getPostOrDeleteResultAsync
public <T> Observable<ServiceResponse<T>> getPostOrDeleteResultAsync(Observable<Response<ResponseBody>> observable, final LongRunningOperationOptions lroOptions, final Type resourceType) { """ Handles an initial response from a POST or DELETE operation response by polling the status of the operation asynchronousl...
java
public <T> Observable<ServiceResponse<T>> getPostOrDeleteResultAsync(Observable<Response<ResponseBody>> observable, final LongRunningOperationOptions lroOptions, final Type resourceType) { return this.<T>beginPostOrDeleteAsync(observable, lroOptions, resourceType) .toObservable() ...
[ "public", "<", "T", ">", "Observable", "<", "ServiceResponse", "<", "T", ">", ">", "getPostOrDeleteResultAsync", "(", "Observable", "<", "Response", "<", "ResponseBody", ">", ">", "observable", ",", "final", "LongRunningOperationOptions", "lroOptions", ",", "final...
Handles an initial response from a POST or DELETE operation response by polling the status of the operation asynchronously, calling the user provided callback when the operation terminates. @param observable the initial response from the POST or DELETE operation. @param lroOptions long running operation options. @par...
[ "Handles", "an", "initial", "response", "from", "a", "POST", "or", "DELETE", "operation", "response", "by", "polling", "the", "status", "of", "the", "operation", "asynchronously", "calling", "the", "user", "provided", "callback", "when", "the", "operation", "ter...
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java#L354-L370
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.getWriters
private Writer getWriters(ScriptWrapper script) { """ /* This extension supports any number of writers to be registered which all get written to for ever script. It also supports script specific writers. """ Writer delegatee = this.writers; Writer writer = script.getWriter(); if (writer != null) { ...
java
private Writer getWriters(ScriptWrapper script) { Writer delegatee = this.writers; Writer writer = script.getWriter(); if (writer != null) { // Use the script specific writer in addition to the std one MultipleWriters scriptWriters = new MultipleWriters(); scriptWriters.addWriter(writer); scrip...
[ "private", "Writer", "getWriters", "(", "ScriptWrapper", "script", ")", "{", "Writer", "delegatee", "=", "this", ".", "writers", ";", "Writer", "writer", "=", "script", ".", "getWriter", "(", ")", ";", "if", "(", "writer", "!=", "null", ")", "{", "// Use...
/* This extension supports any number of writers to be registered which all get written to for ever script. It also supports script specific writers.
[ "/", "*", "This", "extension", "supports", "any", "number", "of", "writers", "to", "be", "registered", "which", "all", "get", "written", "to", "for", "ever", "script", ".", "It", "also", "supports", "script", "specific", "writers", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1204-L1215