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
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/panelGrid/PanelGridRenderer.java
PanelGridRenderer.generateContainerStart
protected void generateContainerStart(ResponseWriter writer, PanelGrid panelGrid, boolean idHasBeenRendered) throws IOException { """ Generates the start of the entire Bootstrap container. @param writer the current response writer. @throws IOException if something's wrong with the response writer. """ ...
java
protected void generateContainerStart(ResponseWriter writer, PanelGrid panelGrid, boolean idHasBeenRendered) throws IOException { writer.startElement("div", panelGrid); if (!idHasBeenRendered) { String clientId = panelGrid.getClientId(); writer.writeAttribute("id", clientId, "id"); } writeAttribute(writer...
[ "protected", "void", "generateContainerStart", "(", "ResponseWriter", "writer", ",", "PanelGrid", "panelGrid", ",", "boolean", "idHasBeenRendered", ")", "throws", "IOException", "{", "writer", ".", "startElement", "(", "\"div\"", ",", "panelGrid", ")", ";", "if", ...
Generates the start of the entire Bootstrap container. @param writer the current response writer. @throws IOException if something's wrong with the response writer.
[ "Generates", "the", "start", "of", "the", "entire", "Bootstrap", "container", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/panelGrid/PanelGridRenderer.java#L304-L324
prestodb/presto
presto-main/src/main/java/com/facebook/presto/util/FinalizerService.java
FinalizerService.addFinalizer
public void addFinalizer(Object referent, Runnable cleanup) { """ When referent is freed by the garbage collector, run cleanup. <p> Note: cleanup must not contain a reference to the referent object. """ requireNonNull(referent, "referent is null"); requireNonNull(cleanup, "cleanup is null"); ...
java
public void addFinalizer(Object referent, Runnable cleanup) { requireNonNull(referent, "referent is null"); requireNonNull(cleanup, "cleanup is null"); finalizers.add(new FinalizerReference(referent, finalizerQueue, cleanup)); }
[ "public", "void", "addFinalizer", "(", "Object", "referent", ",", "Runnable", "cleanup", ")", "{", "requireNonNull", "(", "referent", ",", "\"referent is null\"", ")", ";", "requireNonNull", "(", "cleanup", ",", "\"cleanup is null\"", ")", ";", "finalizers", ".", ...
When referent is freed by the garbage collector, run cleanup. <p> Note: cleanup must not contain a reference to the referent object.
[ "When", "referent", "is", "freed", "by", "the", "garbage", "collector", "run", "cleanup", ".", "<p", ">", "Note", ":", "cleanup", "must", "not", "contain", "a", "reference", "to", "the", "referent", "object", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/util/FinalizerService.java#L81-L86
d-michail/jheaps
src/main/java/org/jheaps/tree/ReflectedHeap.java
ReflectedHeap.insertPair
@SuppressWarnings("unchecked") private void insertPair(ReflectedHandle<K, V> handle1, ReflectedHandle<K, V> handle2) { """ Insert a pair of elements, one in the min heap and one in the max heap. @param handle1 a handle to the first element @param handle2 a handle to the second element """ int...
java
@SuppressWarnings("unchecked") private void insertPair(ReflectedHandle<K, V> handle1, ReflectedHandle<K, V> handle2) { int c; if (comparator == null) { c = ((Comparable<? super K>) handle1.key).compareTo(handle2.key); } else { c = comparator.compare(handle1.key, handl...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "insertPair", "(", "ReflectedHandle", "<", "K", ",", "V", ">", "handle1", ",", "ReflectedHandle", "<", "K", ",", "V", ">", "handle2", ")", "{", "int", "c", ";", "if", "(", "comparator...
Insert a pair of elements, one in the min heap and one in the max heap. @param handle1 a handle to the first element @param handle2 a handle to the second element
[ "Insert", "a", "pair", "of", "elements", "one", "in", "the", "min", "heap", "and", "one", "in", "the", "max", "heap", "." ]
train
https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/ReflectedHeap.java#L510-L538
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getImageRegionProposals
public ImageRegionProposal getImageRegionProposals(UUID projectId, UUID imageId) { """ Get region proposals for an image. Returns empty array if no proposals are found. This API will get region proposals for an image along with confidences for the region. It returns an empty array if no proposals are found. @p...
java
public ImageRegionProposal getImageRegionProposals(UUID projectId, UUID imageId) { return getImageRegionProposalsWithServiceResponseAsync(projectId, imageId).toBlocking().single().body(); }
[ "public", "ImageRegionProposal", "getImageRegionProposals", "(", "UUID", "projectId", ",", "UUID", "imageId", ")", "{", "return", "getImageRegionProposalsWithServiceResponseAsync", "(", "projectId", ",", "imageId", ")", ".", "toBlocking", "(", ")", ".", "single", "(",...
Get region proposals for an image. Returns empty array if no proposals are found. This API will get region proposals for an image along with confidences for the region. It returns an empty array if no proposals are found. @param projectId The project id @param imageId The image id @throws IllegalArgumentException thro...
[ "Get", "region", "proposals", "for", "an", "image", ".", "Returns", "empty", "array", "if", "no", "proposals", "are", "found", ".", "This", "API", "will", "get", "region", "proposals", "for", "an", "image", "along", "with", "confidences", "for", "the", "re...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3172-L3174
tvesalainen/util
util/src/main/java/org/vesalainen/util/InterfaceTracer.java
InterfaceTracer.getTracer
public static <T> T getTracer(Class<T> intf, T ob, Appendable appendable) { """ Creates a tracer for intf @param <T> @param intf Implemented interface @param ob Class instance for given interface or null @param appendable Output for trace @return """ return getTracer(intf, new InterfaceTracer(ob),...
java
public static <T> T getTracer(Class<T> intf, T ob, Appendable appendable) { return getTracer(intf, new InterfaceTracer(ob), ob, appendable); }
[ "public", "static", "<", "T", ">", "T", "getTracer", "(", "Class", "<", "T", ">", "intf", ",", "T", "ob", ",", "Appendable", "appendable", ")", "{", "return", "getTracer", "(", "intf", ",", "new", "InterfaceTracer", "(", "ob", ")", ",", "ob", ",", ...
Creates a tracer for intf @param <T> @param intf Implemented interface @param ob Class instance for given interface or null @param appendable Output for trace @return
[ "Creates", "a", "tracer", "for", "intf" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/InterfaceTracer.java#L90-L93
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java
ProtobufIDLProxy.generateSource
public static void generateSource(String data, File sourceOutputPath) { """ Generate source. @param data the data @param sourceOutputPath the source output path """ ProtoFile protoFile = ProtoParser.parse(DEFAULT_FILE_NAME, data); List<CodeDependent> cds = new ArrayList<CodeDependent>(); ...
java
public static void generateSource(String data, File sourceOutputPath) { ProtoFile protoFile = ProtoParser.parse(DEFAULT_FILE_NAME, data); List<CodeDependent> cds = new ArrayList<CodeDependent>(); try { doCreate(protoFile, true, false, null, true, sourceOutputPath, cds, new HashMa...
[ "public", "static", "void", "generateSource", "(", "String", "data", ",", "File", "sourceOutputPath", ")", "{", "ProtoFile", "protoFile", "=", "ProtoParser", ".", "parse", "(", "DEFAULT_FILE_NAME", ",", "data", ")", ";", "List", "<", "CodeDependent", ">", "cds...
Generate source. @param data the data @param sourceOutputPath the source output path
[ "Generate", "source", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java#L1485-L1493
line/armeria
thrift/src/main/java/com/linecorp/armeria/internal/thrift/ThriftFunction.java
ThriftFunction.setSuccess
public void setSuccess(TBase<?, ?> result, Object value) { """ Sets the success field of the specified {@code result} to the specified {@code value}. """ if (successField != null) { ThriftFieldAccess.set(result, successField, value); } }
java
public void setSuccess(TBase<?, ?> result, Object value) { if (successField != null) { ThriftFieldAccess.set(result, successField, value); } }
[ "public", "void", "setSuccess", "(", "TBase", "<", "?", ",", "?", ">", "result", ",", "Object", "value", ")", "{", "if", "(", "successField", "!=", "null", ")", "{", "ThriftFieldAccess", ".", "set", "(", "result", ",", "successField", ",", "value", ")"...
Sets the success field of the specified {@code result} to the specified {@code value}.
[ "Sets", "the", "success", "field", "of", "the", "specified", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/thrift/src/main/java/com/linecorp/armeria/internal/thrift/ThriftFunction.java#L232-L236
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java
BigDecimalExtensions.operator_plus
@Pure @Inline(value="$1.add($2)") public static BigDecimal operator_plus(BigDecimal a, BigDecimal b) { """ The binary <code>plus</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.add(b)</code> @throws NullPointerExce...
java
@Pure @Inline(value="$1.add($2)") public static BigDecimal operator_plus(BigDecimal a, BigDecimal b) { return a.add(b); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"$1.add($2)\"", ")", "public", "static", "BigDecimal", "operator_plus", "(", "BigDecimal", "a", ",", "BigDecimal", "b", ")", "{", "return", "a", ".", "add", "(", "b", ")", ";", "}" ]
The binary <code>plus</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.add(b)</code> @throws NullPointerException if {@code a} or {@code b} is <code>null</code>.
[ "The", "binary", "<code", ">", "plus<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java#L49-L53
amzn/ion-java
src/com/amazon/ion/impl/lite/ReverseBinaryEncoder.java
ReverseBinaryEncoder.writeImport
private void writeImport(SymbolTable symTab) { """ Write a single import declaration (which refers to a shared SymbolTable). @param symTab the shared symbol table, not local, not system """ assert symTab.isSharedTable(); final int originalOffset = myBuffer.length - myOffset; // Wri...
java
private void writeImport(SymbolTable symTab) { assert symTab.isSharedTable(); final int originalOffset = myBuffer.length - myOffset; // Write the maxId as int int maxId = symTab.getMaxId(); if (maxId == 0) { writeByte((byte) TYPE_POS_INT); } else { ...
[ "private", "void", "writeImport", "(", "SymbolTable", "symTab", ")", "{", "assert", "symTab", ".", "isSharedTable", "(", ")", ";", "final", "int", "originalOffset", "=", "myBuffer", ".", "length", "-", "myOffset", ";", "// Write the maxId as int", "int", "maxId"...
Write a single import declaration (which refers to a shared SymbolTable). @param symTab the shared symbol table, not local, not system
[ "Write", "a", "single", "import", "declaration", "(", "which", "refers", "to", "a", "shared", "SymbolTable", ")", "." ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/ReverseBinaryEncoder.java#L1363-L1401
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/core/Range.java
Range.valueOf
public static Range valueOf(final String value) { """ Get a Range object from a header value. @param value the header value @return the Range object or null if the value is not parseable """ final int[] vals = parse(value); if (vals.length == 2) { return new Range(vals[0], vals[...
java
public static Range valueOf(final String value) { final int[] vals = parse(value); if (vals.length == 2) { return new Range(vals[0], vals[1]); } return null; }
[ "public", "static", "Range", "valueOf", "(", "final", "String", "value", ")", "{", "final", "int", "[", "]", "vals", "=", "parse", "(", "value", ")", ";", "if", "(", "vals", ".", "length", "==", "2", ")", "{", "return", "new", "Range", "(", "vals",...
Get a Range object from a header value. @param value the header value @return the Range object or null if the value is not parseable
[ "Get", "a", "Range", "object", "from", "a", "header", "value", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/core/Range.java#L69-L75
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.createConstructorDelegateScope
protected IScope createConstructorDelegateScope(EObject featureCall, LightweightTypeReference type, IScope parent, IFeatureScopeSession session) { """ A constructor delegate scope provides the descriptions for {@code this()} and {@code super()} calls in a constructor body. """ return new ConstructorDelegate...
java
protected IScope createConstructorDelegateScope(EObject featureCall, LightweightTypeReference type, IScope parent, IFeatureScopeSession session) { return new ConstructorDelegateScope(parent, type, session, asAbstractFeatureCall(featureCall)); }
[ "protected", "IScope", "createConstructorDelegateScope", "(", "EObject", "featureCall", ",", "LightweightTypeReference", "type", ",", "IScope", "parent", ",", "IFeatureScopeSession", "session", ")", "{", "return", "new", "ConstructorDelegateScope", "(", "parent", ",", "...
A constructor delegate scope provides the descriptions for {@code this()} and {@code super()} calls in a constructor body.
[ "A", "constructor", "delegate", "scope", "provides", "the", "descriptions", "for", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L636-L638
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/DbPro.java
DbPro.batchUpdate
public int[] batchUpdate(List<? extends Model> modelList, int batchSize) { """ Batch update models using the attrs names of the first model in modelList. Ensure all the models can use the same sql as the first model. """ if (modelList == null || modelList.size() == 0) return new int[0]; ...
java
public int[] batchUpdate(List<? extends Model> modelList, int batchSize) { if (modelList == null || modelList.size() == 0) return new int[0]; Model model = modelList.get(0); Table table = TableMapping.me().getTable(model.getClass()); String[] pKeys = table.getPrimaryKey(); Ma...
[ "public", "int", "[", "]", "batchUpdate", "(", "List", "<", "?", "extends", "Model", ">", "modelList", ",", "int", "batchSize", ")", "{", "if", "(", "modelList", "==", "null", "||", "modelList", ".", "size", "(", ")", "==", "0", ")", "return", "new",...
Batch update models using the attrs names of the first model in modelList. Ensure all the models can use the same sql as the first model.
[ "Batch", "update", "models", "using", "the", "attrs", "names", "of", "the", "first", "model", "in", "modelList", ".", "Ensure", "all", "the", "models", "can", "use", "the", "same", "sql", "as", "the", "first", "model", "." ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/DbPro.java#L1191-L1217
katharsis-project/katharsis-framework
katharsis-jpa/src/main/java/io/katharsis/jpa/internal/JpaRepositoryUtils.java
JpaRepositoryUtils.addMergeInclusions
private static void addMergeInclusions(JpaQueryExecutor<?> executor, QuerySpec querySpec) { """ related attribute that are merged into a resource should be loaded by graph control to avoid lazy-loading or potential lack of session in serialization. """ ArrayDeque<String> attributePath = new ArrayDeque<>();...
java
private static void addMergeInclusions(JpaQueryExecutor<?> executor, QuerySpec querySpec) { ArrayDeque<String> attributePath = new ArrayDeque<>(); Class<?> resourceClass = querySpec.getResourceClass(); addMergeInclusions(attributePath, executor, resourceClass); }
[ "private", "static", "void", "addMergeInclusions", "(", "JpaQueryExecutor", "<", "?", ">", "executor", ",", "QuerySpec", "querySpec", ")", "{", "ArrayDeque", "<", "String", ">", "attributePath", "=", "new", "ArrayDeque", "<>", "(", ")", ";", "Class", "<", "?...
related attribute that are merged into a resource should be loaded by graph control to avoid lazy-loading or potential lack of session in serialization.
[ "related", "attribute", "that", "are", "merged", "into", "a", "resource", "should", "be", "loaded", "by", "graph", "control", "to", "avoid", "lazy", "-", "loading", "or", "potential", "lack", "of", "session", "in", "serialization", "." ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-jpa/src/main/java/io/katharsis/jpa/internal/JpaRepositoryUtils.java#L88-L93
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java
PublicIPPrefixesInner.getByResourceGroup
public PublicIPPrefixInner getByResourceGroup(String resourceGroupName, String publicIpPrefixName, String expand) { """ Gets the specified public IP prefix in a specified resource group. @param resourceGroupName The name of the resource group. @param publicIpPrefixName The name of the PublicIPPrefx. @param ex...
java
public PublicIPPrefixInner getByResourceGroup(String resourceGroupName, String publicIpPrefixName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, expand).toBlocking().single().body(); }
[ "public", "PublicIPPrefixInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "publicIpPrefixName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "publicIpPrefixName", ",",...
Gets the specified public IP prefix in a specified resource group. @param resourceGroupName The name of the resource group. @param publicIpPrefixName The name of the PublicIPPrefx. @param expand Expands referenced resources. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExcepti...
[ "Gets", "the", "specified", "public", "IP", "prefix", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java#L356-L358
JodaOrg/joda-time
src/main/java/org/joda/time/YearMonth.java
YearMonth.toInterval
public Interval toInterval(DateTimeZone zone) { """ Converts this object to an Interval representing the whole month. <p> The interval will use the chronology of the year-month in the specified zone. <p> This instance is immutable and unaffected by this method call. @param zone the zone to get the Interval...
java
public Interval toInterval(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); DateTime start = toLocalDate(1).toDateTimeAtStartOfDay(zone); DateTime end = plusMonths(1).toLocalDate(1).toDateTimeAtStartOfDay(zone); return new Interval(start, end); }
[ "public", "Interval", "toInterval", "(", "DateTimeZone", "zone", ")", "{", "zone", "=", "DateTimeUtils", ".", "getZone", "(", "zone", ")", ";", "DateTime", "start", "=", "toLocalDate", "(", "1", ")", ".", "toDateTimeAtStartOfDay", "(", "zone", ")", ";", "D...
Converts this object to an Interval representing the whole month. <p> The interval will use the chronology of the year-month in the specified zone. <p> This instance is immutable and unaffected by this method call. @param zone the zone to get the Interval in, null means default @return an interval over the month, nev...
[ "Converts", "this", "object", "to", "an", "Interval", "representing", "the", "whole", "month", ".", "<p", ">", "The", "interval", "will", "use", "the", "chronology", "of", "the", "year", "-", "month", "in", "the", "specified", "zone", ".", "<p", ">", "Th...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/YearMonth.java#L696-L701
GoogleCloudPlatform/bigdata-interop
bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/BigQueryHelper.java
BigQueryHelper.insertJobOrFetchDuplicate
public Job insertJobOrFetchDuplicate(String projectId, Job job) throws IOException { """ Tries to run jobs().insert(...) with the provided {@code projectId} and {@code job}, which returns a {@code Job} under normal operation, which is then returned from this method. In case of an exception being thrown, if the c...
java
public Job insertJobOrFetchDuplicate(String projectId, Job job) throws IOException { Preconditions.checkArgument( job.getJobReference() != null && job.getJobReference().getJobId() != null, "Require non-null JobReference and JobId inside; getJobReference() == '%s'", job.getJobReference()); ...
[ "public", "Job", "insertJobOrFetchDuplicate", "(", "String", "projectId", ",", "Job", "job", ")", "throws", "IOException", "{", "Preconditions", ".", "checkArgument", "(", "job", ".", "getJobReference", "(", ")", "!=", "null", "&&", "job", ".", "getJobReference"...
Tries to run jobs().insert(...) with the provided {@code projectId} and {@code job}, which returns a {@code Job} under normal operation, which is then returned from this method. In case of an exception being thrown, if the cause was "409 conflict", then we issue a separate "jobs().get(...)" request and return the resul...
[ "Tries", "to", "run", "jobs", "()", ".", "insert", "(", "...", ")", "with", "the", "provided", "{" ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/BigQueryHelper.java#L323-L346
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java
ListManagementImagesImpl.addImageFileInputWithServiceResponseAsync
public Observable<ServiceResponse<Image>> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter) { """ Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param imag...
java
public Observable<ServiceResponse<Image>> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is ...
[ "public", "Observable", "<", "ServiceResponse", "<", "Image", ">", ">", "addImageFileInputWithServiceResponseAsync", "(", "String", "listId", ",", "byte", "[", "]", "imageStream", ",", "AddImageFileInputOptionalParameter", "addImageFileInputOptionalParameter", ")", "{", "...
Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param imageStream The image file. @param addImageFileInputOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fa...
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java#L747-L761
square/okhttp
okhttp/src/main/java/okhttp3/internal/http/HttpHeaders.java
HttpHeaders.parseSeconds
public static int parseSeconds(String value, int defaultValue) { """ Returns {@code value} as a positive integer, or 0 if it is negative, or {@code defaultValue} if it cannot be parsed. """ try { long seconds = Long.parseLong(value); if (seconds > Integer.MAX_VALUE) { return Integer.MA...
java
public static int parseSeconds(String value, int defaultValue) { try { long seconds = Long.parseLong(value); if (seconds > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } else if (seconds < 0) { return 0; } else { return (int) seconds; } } catch (NumberForm...
[ "public", "static", "int", "parseSeconds", "(", "String", "value", ",", "int", "defaultValue", ")", "{", "try", "{", "long", "seconds", "=", "Long", ".", "parseLong", "(", "value", ")", ";", "if", "(", "seconds", ">", "Integer", ".", "MAX_VALUE", ")", ...
Returns {@code value} as a positive integer, or 0 if it is negative, or {@code defaultValue} if it cannot be parsed.
[ "Returns", "{" ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/http/HttpHeaders.java#L387-L400
jhy/jsoup
src/main/java/org/jsoup/nodes/Attributes.java
Attributes.put
public Attributes put(String key, boolean value) { """ Set a new boolean attribute, remove attribute if value is false. @param key case <b>insensitive</b> attribute key @param value attribute value @return these attributes, for chaining """ if (value) putIgnoreCase(key, null); el...
java
public Attributes put(String key, boolean value) { if (value) putIgnoreCase(key, null); else remove(key); return this; }
[ "public", "Attributes", "put", "(", "String", "key", ",", "boolean", "value", ")", "{", "if", "(", "value", ")", "putIgnoreCase", "(", "key", ",", "null", ")", ";", "else", "remove", "(", "key", ")", ";", "return", "this", ";", "}" ]
Set a new boolean attribute, remove attribute if value is false. @param key case <b>insensitive</b> attribute key @param value attribute value @return these attributes, for chaining
[ "Set", "a", "new", "boolean", "attribute", "remove", "attribute", "if", "value", "is", "false", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Attributes.java#L154-L160
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.writeStringInto
public static void writeStringInto( String s, File outputFile ) throws IOException { """ Writes a string into a file. @param s the string to write (not null) @param outputFile the file to write into @throws IOException if something went wrong """ InputStream in = new ByteArrayInputStream( s.getBytes( St...
java
public static void writeStringInto( String s, File outputFile ) throws IOException { InputStream in = new ByteArrayInputStream( s.getBytes( StandardCharsets.UTF_8 )); copyStream( in, outputFile ); }
[ "public", "static", "void", "writeStringInto", "(", "String", "s", ",", "File", "outputFile", ")", "throws", "IOException", "{", "InputStream", "in", "=", "new", "ByteArrayInputStream", "(", "s", ".", "getBytes", "(", "StandardCharsets", ".", "UTF_8", ")", ")"...
Writes a string into a file. @param s the string to write (not null) @param outputFile the file to write into @throws IOException if something went wrong
[ "Writes", "a", "string", "into", "a", "file", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L405-L408
rometools/rome
rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java
Utilities.replaceNonAlphanumeric
public static String replaceNonAlphanumeric(final String str, final char subst) { """ Replaces occurences of non-alphanumeric characters with a supplied char. """ final StringBuffer ret = new StringBuffer(str.length()); final char[] testChars = str.toCharArray(); for (final char testCha...
java
public static String replaceNonAlphanumeric(final String str, final char subst) { final StringBuffer ret = new StringBuffer(str.length()); final char[] testChars = str.toCharArray(); for (final char testChar : testChars) { if (Character.isLetterOrDigit(testChar)) { re...
[ "public", "static", "String", "replaceNonAlphanumeric", "(", "final", "String", "str", ",", "final", "char", "subst", ")", "{", "final", "StringBuffer", "ret", "=", "new", "StringBuffer", "(", "str", ".", "length", "(", ")", ")", ";", "final", "char", "[",...
Replaces occurences of non-alphanumeric characters with a supplied char.
[ "Replaces", "occurences", "of", "non", "-", "alphanumeric", "characters", "with", "a", "supplied", "char", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/utils/Utilities.java#L124-L135
qiniu/java-sdk
src/main/java/com/qiniu/storage/UploadManager.java
UploadManager.put
public Response put(String filePath, String key, String token) throws QiniuException { """ 上传文件 @param filePath 上传的文件路径 @param key 上传文件保存的文件名 @param token 上传凭证 """ return put(filePath, key, token, null, null, false); }
java
public Response put(String filePath, String key, String token) throws QiniuException { return put(filePath, key, token, null, null, false); }
[ "public", "Response", "put", "(", "String", "filePath", ",", "String", "key", ",", "String", "token", ")", "throws", "QiniuException", "{", "return", "put", "(", "filePath", ",", "key", ",", "token", ",", "null", ",", "null", ",", "false", ")", ";", "}...
上传文件 @param filePath 上传的文件路径 @param key 上传文件保存的文件名 @param token 上传凭证
[ "上传文件" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/UploadManager.java#L159-L161
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/ast/prims/assign/AstRecAsgnHelper.java
AstRecAsgnHelper.createValueSetter
public static ValueSetter createValueSetter(Vec v, Object value) { """ Create an instance of ValueSetter for a given scalar value. It creates setter of the appropriate type based on the type of the underlying Vec. @param v Vec @param value scalar value @return instance of ValueSetter """ if (value == n...
java
public static ValueSetter createValueSetter(Vec v, Object value) { if (value == null) { return new NAValueSetter(); } switch (v.get_type()) { case Vec.T_CAT: return new CatValueSetter(v.domain(), value); case Vec.T_NUM: case Vec.T_TIME: return new NumValueSetter(value...
[ "public", "static", "ValueSetter", "createValueSetter", "(", "Vec", "v", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "new", "NAValueSetter", "(", ")", ";", "}", "switch", "(", "v", ".", "get_type", "(", ")", ...
Create an instance of ValueSetter for a given scalar value. It creates setter of the appropriate type based on the type of the underlying Vec. @param v Vec @param value scalar value @return instance of ValueSetter
[ "Create", "an", "instance", "of", "ValueSetter", "for", "a", "given", "scalar", "value", ".", "It", "creates", "setter", "of", "the", "appropriate", "type", "based", "on", "the", "type", "of", "the", "underlying", "Vec", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/ast/prims/assign/AstRecAsgnHelper.java#L35-L52
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
DFSClient.reportChecksumFailure
void reportChecksumFailure(String file, LocatedBlock lblocks[]) { """ just reports checksum failure and ignores any exception during the report. """ try { reportBadBlocks(lblocks); } catch (IOException ie) { LOG.info("Found corruption while reading " + file + ". Error repair...
java
void reportChecksumFailure(String file, LocatedBlock lblocks[]) { try { reportBadBlocks(lblocks); } catch (IOException ie) { LOG.info("Found corruption while reading " + file + ". Error repairing corrupt blocks. Bad blocks remain. " + StringUtils.stringifyException(ie...
[ "void", "reportChecksumFailure", "(", "String", "file", ",", "LocatedBlock", "lblocks", "[", "]", ")", "{", "try", "{", "reportBadBlocks", "(", "lblocks", ")", ";", "}", "catch", "(", "IOException", "ie", ")", "{", "LOG", ".", "info", "(", "\"Found corrupt...
just reports checksum failure and ignores any exception during the report.
[ "just", "reports", "checksum", "failure", "and", "ignores", "any", "exception", "during", "the", "report", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java#L3051-L3059
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionsInner.java
ConnectionsInner.createOrUpdate
public ConnectionInner createOrUpdate(String resourceGroupName, String automationAccountName, String connectionName, ConnectionCreateOrUpdateParameters parameters) { """ Create or update a connection. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automat...
java
public ConnectionInner createOrUpdate(String resourceGroupName, String automationAccountName, String connectionName, ConnectionCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, automationAccountName, connectionName, parameters).toBlocking().single().body(); ...
[ "public", "ConnectionInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "connectionName", ",", "ConnectionCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "("...
Create or update a connection. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param connectionName The parameters supplied to the create or update connection operation. @param parameters The parameters supplied to the create or update connect...
[ "Create", "or", "update", "a", "connection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ConnectionsInner.java#L288-L290
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeImpl_CustomFieldSerializer.java
OWLDatatypeImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user....
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDatatypeImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeImpl_CustomFieldSerializer.java#L83-L86
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/pathanimator/MaterialPathAnimator.java
MaterialPathAnimator.reverseAnimate
public static void reverseAnimate(final Widget source, final Widget target) { """ Helper method to reverse animate the source element to target element. @param source Source widget to apply the Path Animator @param target Target widget to apply the Path Animator """ reverseAnimate(source.getElement...
java
public static void reverseAnimate(final Widget source, final Widget target) { reverseAnimate(source.getElement(), target.getElement()); }
[ "public", "static", "void", "reverseAnimate", "(", "final", "Widget", "source", ",", "final", "Widget", "target", ")", "{", "reverseAnimate", "(", "source", ".", "getElement", "(", ")", ",", "target", ".", "getElement", "(", ")", ")", ";", "}" ]
Helper method to reverse animate the source element to target element. @param source Source widget to apply the Path Animator @param target Target widget to apply the Path Animator
[ "Helper", "method", "to", "reverse", "animate", "the", "source", "element", "to", "target", "element", "." ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/pathanimator/MaterialPathAnimator.java#L223-L225
authlete/authlete-java-common
src/main/java/com/authlete/common/util/TypedProperties.java
TypedProperties.getString
public String getString(Enum<?> key, String defaultValue) { """ Equivalent to {@link #getString(String, String) getString}{@code (key.name(), defaultValue)}. If {@code key} is null, {@code defaultValue} is returned. """ if (key == null) { return defaultValue; } re...
java
public String getString(Enum<?> key, String defaultValue) { if (key == null) { return defaultValue; } return getString(key.name(), defaultValue); }
[ "public", "String", "getString", "(", "Enum", "<", "?", ">", "key", ",", "String", "defaultValue", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "return", "getString", "(", "key", ".", "name", "(", ")", ",", ...
Equivalent to {@link #getString(String, String) getString}{@code (key.name(), defaultValue)}. If {@code key} is null, {@code defaultValue} is returned.
[ "Equivalent", "to", "{" ]
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/TypedProperties.java#L528-L536
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.osAvailabilities_GET
public ArrayList<OvhOsAvailabilitiesEnum> osAvailabilities_GET(String hardware) throws IOException { """ List the os available for a specified hardware reference REST: GET /dedicated/server/osAvailabilities @param hardware [required] Hardware reference requested """ String qPath = "/dedicated/server/osAv...
java
public ArrayList<OvhOsAvailabilitiesEnum> osAvailabilities_GET(String hardware) throws IOException { String qPath = "/dedicated/server/osAvailabilities"; StringBuilder sb = path(qPath); query(sb, "hardware", hardware); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
[ "public", "ArrayList", "<", "OvhOsAvailabilitiesEnum", ">", "osAvailabilities_GET", "(", "String", "hardware", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/osAvailabilities\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", "...
List the os available for a specified hardware reference REST: GET /dedicated/server/osAvailabilities @param hardware [required] Hardware reference requested
[ "List", "the", "os", "available", "for", "a", "specified", "hardware", "reference" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L136-L142
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.persistence.2.0/src/com/ibm/ws/javaee/persistence/internal/HybridPersistenceActivator.java
HybridPersistenceActivator.getPersistenceProviders
@Override public List<PersistenceProvider> getPersistenceProviders() { """ This method returns a combination of those persistence providers available from the application classloader in addition to those in the OSGi service registry. OSGi providers are not cached and should not be cached because bundles can ...
java
@Override public List<PersistenceProvider> getPersistenceProviders() { // try to get the context classloader first, if that fails, use the loader // that loaded this class ClassLoader cl = PrivClassLoader.get(null); if (cl == null) { cl = PrivClassLoader.get(HybridPersist...
[ "@", "Override", "public", "List", "<", "PersistenceProvider", ">", "getPersistenceProviders", "(", ")", "{", "// try to get the context classloader first, if that fails, use the loader", "// that loaded this class", "ClassLoader", "cl", "=", "PrivClassLoader", ".", "get", "(",...
This method returns a combination of those persistence providers available from the application classloader in addition to those in the OSGi service registry. OSGi providers are not cached and should not be cached because bundles can be moved in and out of the system and it is the job of the the service tracker to main...
[ "This", "method", "returns", "a", "combination", "of", "those", "persistence", "providers", "available", "from", "the", "application", "classloader", "in", "addition", "to", "those", "in", "the", "OSGi", "service", "registry", ".", "OSGi", "providers", "are", "n...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.persistence.2.0/src/com/ibm/ws/javaee/persistence/internal/HybridPersistenceActivator.java#L42-L73
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsCreateSiteThread.java
CmsCreateSiteThread.setTemplate
private void setTemplate(CmsResource siteRootResource) { """ Sets the selected template as property to site root folder.<p> @param siteRootResource Resource representing root folder """ try { m_cms.lockResource(siteRootResource); // add template property if (Cms...
java
private void setTemplate(CmsResource siteRootResource) { try { m_cms.lockResource(siteRootResource); // add template property if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_template)) { CmsProperty prop = new CmsProperty(CmsPropertyDefinition.PROPERTY_TEMPLA...
[ "private", "void", "setTemplate", "(", "CmsResource", "siteRootResource", ")", "{", "try", "{", "m_cms", ".", "lockResource", "(", "siteRootResource", ")", ";", "// add template property", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "m_templat...
Sets the selected template as property to site root folder.<p> @param siteRootResource Resource representing root folder
[ "Sets", "the", "selected", "template", "as", "property", "to", "site", "root", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsCreateSiteThread.java#L612-L625
alkacon/opencms-core
src/org/opencms/ui/dialogs/CmsSiteSelectDialog.java
CmsSiteSelectDialog.prepareComboBox
private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { """ Prepares a combo box.<p> @param container the indexed item container @param captionKey the caption message key @return the combo box """ ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLoc...
java
private ComboBox prepareComboBox(IndexedContainer container, String captionKey) { ComboBox result = new ComboBox(CmsVaadinUtils.getWpMessagesForCurrentLocale().key(captionKey), container); result.setTextInputAllowed(true); result.setNullSelectionAllowed(false); result.setWidth("100%"); ...
[ "private", "ComboBox", "prepareComboBox", "(", "IndexedContainer", "container", ",", "String", "captionKey", ")", "{", "ComboBox", "result", "=", "new", "ComboBox", "(", "CmsVaadinUtils", ".", "getWpMessagesForCurrentLocale", "(", ")", ".", "key", "(", "captionKey",...
Prepares a combo box.<p> @param container the indexed item container @param captionKey the caption message key @return the combo box
[ "Prepares", "a", "combo", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/CmsSiteSelectDialog.java#L182-L193
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java
Swagger2MarkupProperties.getRequiredString
public String getRequiredString(String key) throws IllegalStateException { """ Return the String property value associated with the given key (never {@code null}). @return The String property @throws IllegalStateException if the key cannot be resolved """ Optional<String> property = getString(key);...
java
public String getRequiredString(String key) throws IllegalStateException { Optional<String> property = getString(key); if (property.isPresent()) { return property.get(); } else { throw new IllegalStateException(String.format("required key [%s] not found", key)); }...
[ "public", "String", "getRequiredString", "(", "String", "key", ")", "throws", "IllegalStateException", "{", "Optional", "<", "String", ">", "property", "=", "getString", "(", "key", ")", ";", "if", "(", "property", ".", "isPresent", "(", ")", ")", "{", "re...
Return the String property value associated with the given key (never {@code null}). @return The String property @throws IllegalStateException if the key cannot be resolved
[ "Return", "the", "String", "property", "value", "associated", "with", "the", "given", "key", "(", "never", "{", "@code", "null", "}", ")", "." ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java#L333-L340
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeQuantifier
private boolean executeQuantifier(int index, Expr.Quantifier expr, CallStack frame) { """ Execute one range of the quantifier, or the body if no ranges remain. @param index @param expr @param frame @param context @return """ Tuple<Decl.Variable> vars = expr.getParameters(); if (index == vars.size())...
java
private boolean executeQuantifier(int index, Expr.Quantifier expr, CallStack frame) { Tuple<Decl.Variable> vars = expr.getParameters(); if (index == vars.size()) { // This is the base case where we evaluate the condition itself. RValue.Bool r = executeExpression(BOOL_T, expr.getOperand(), frame); boolean q...
[ "private", "boolean", "executeQuantifier", "(", "int", "index", ",", "Expr", ".", "Quantifier", "expr", ",", "CallStack", "frame", ")", "{", "Tuple", "<", "Decl", ".", "Variable", ">", "vars", "=", "expr", ".", "getParameters", "(", ")", ";", "if", "(", ...
Execute one range of the quantifier, or the body if no ranges remain. @param index @param expr @param frame @param context @return
[ "Execute", "one", "range", "of", "the", "quantifier", "or", "the", "body", "if", "no", "ranges", "remain", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L777-L800
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PositiveDepthConstraintCheck.java
PositiveDepthConstraintCheck.checkConstraint
public boolean checkConstraint( Point2D_F64 viewA , Point2D_F64 viewB , Se3_F64 fromAtoB ) { """ Checks to see if a single point meets the constraint. @param viewA View of the 3D point from the first camera. Calibrated coordinates. @param viewB View of the 3D point from the second camera. Calibrated coordina...
java
public boolean checkConstraint( Point2D_F64 viewA , Point2D_F64 viewB , Se3_F64 fromAtoB ) { triangulate.triangulate(viewA,viewB,fromAtoB,P); if( P.z > 0 ) { SePointOps_F64.transform(fromAtoB,P,P); return P.z > 0; } return false; }
[ "public", "boolean", "checkConstraint", "(", "Point2D_F64", "viewA", ",", "Point2D_F64", "viewB", ",", "Se3_F64", "fromAtoB", ")", "{", "triangulate", ".", "triangulate", "(", "viewA", ",", "viewB", ",", "fromAtoB", ",", "P", ")", ";", "if", "(", "P", ".",...
Checks to see if a single point meets the constraint. @param viewA View of the 3D point from the first camera. Calibrated coordinates. @param viewB View of the 3D point from the second camera. Calibrated coordinates. @param fromAtoB Transform from the B to A camera frame. @return If the triangulated point appears in...
[ "Checks", "to", "see", "if", "a", "single", "point", "meets", "the", "constraint", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PositiveDepthConstraintCheck.java#L67-L76
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroWriter.java
MicroWriter.writeToFile
@Nonnull public static ESuccess writeToFile (@Nonnull final IMicroNode aNode, @Nonnull final File aFile, @Nonnull final IXMLWriterSettings aSettings) { """ Write a Micro Node to a file. @param aNode The node to be serialized. May be ...
java
@Nonnull public static ESuccess writeToFile (@Nonnull final IMicroNode aNode, @Nonnull final File aFile, @Nonnull final IXMLWriterSettings aSettings) { ValueEnforcer.notNull (aFile, "File"); final OutputStream aOS = FileHelper.getO...
[ "@", "Nonnull", "public", "static", "ESuccess", "writeToFile", "(", "@", "Nonnull", "final", "IMicroNode", "aNode", ",", "@", "Nonnull", "final", "File", "aFile", ",", "@", "Nonnull", "final", "IXMLWriterSettings", "aSettings", ")", "{", "ValueEnforcer", ".", ...
Write a Micro Node to a file. @param aNode The node to be serialized. May be any kind of node (incl. documents). May not be <code>null</code>. @param aFile The file to write to. May not be <code>null</code>. @param aSettings The settings to be used for the creation. May not be <code>null</code>. @return {@link ESucces...
[ "Write", "a", "Micro", "Node", "to", "a", "file", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroWriter.java#L89-L103
structr/structr
structr-rest/src/main/java/org/structr/rest/common/XMLHandler.java
XMLHandler.handleSetProperty
private void handleSetProperty(final Element element, final Map<String, Object> entityData, final Map<String, Object> config) { """ The setProperty action will not descend further into the collection of children, but will instead evaluate a transformation expression. @param element element @param entityData p...
java
private void handleSetProperty(final Element element, final Map<String, Object> entityData, final Map<String, Object> config) { String propertyName = (String)config.get(PROPERTY_NAME); if (propertyName == null) { propertyName = element.tagName; } entityData.put(propertyName, element.text); }
[ "private", "void", "handleSetProperty", "(", "final", "Element", "element", ",", "final", "Map", "<", "String", ",", "Object", ">", "entityData", ",", "final", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "String", "propertyName", "=", "("...
The setProperty action will not descend further into the collection of children, but will instead evaluate a transformation expression. @param element element @param entityData parent's entity data @param config type configuration
[ "The", "setProperty", "action", "will", "not", "descend", "further", "into", "the", "collection", "of", "children", "but", "will", "instead", "evaluate", "a", "transformation", "expression", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-rest/src/main/java/org/structr/rest/common/XMLHandler.java#L310-L319
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/concurrent/ThreadUtils.java
ThreadUtils.waitFor
@FluentApi public static WaitTask waitFor(long duration, TimeUnit timeUnit) { """ Waits for a specified duration on a {@link Condition} possibly checking every specified interval on whether the {@link Condition} has been satisfied. @param duration a long value indicating the duration of time to wait for the ...
java
@FluentApi public static WaitTask waitFor(long duration, TimeUnit timeUnit) { return WaitTask.newWaitTask().waitFor(duration, timeUnit); }
[ "@", "FluentApi", "public", "static", "WaitTask", "waitFor", "(", "long", "duration", ",", "TimeUnit", "timeUnit", ")", "{", "return", "WaitTask", ".", "newWaitTask", "(", ")", ".", "waitFor", "(", "duration", ",", "timeUnit", ")", ";", "}" ]
Waits for a specified duration on a {@link Condition} possibly checking every specified interval on whether the {@link Condition} has been satisfied. @param duration a long value indicating the duration of time to wait for the Condition to be satisfied. @param timeUnit the TimeUnit of the duration time value. @return ...
[ "Waits", "for", "a", "specified", "duration", "on", "a", "{", "@link", "Condition", "}", "possibly", "checking", "every", "specified", "interval", "on", "whether", "the", "{", "@link", "Condition", "}", "has", "been", "satisfied", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/concurrent/ThreadUtils.java#L373-L376
infinispan/infinispan
query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java
ClusteredQueryInvoker.unicast
QueryResponse unicast(Address address, ClusteredQueryCommand clusteredQueryCommand) { """ Send this ClusteredQueryCommand to a node. @param address Address of the destination node @param clusteredQueryCommand @return the response """ if (address.equals(myAddress)) { Future<Que...
java
QueryResponse unicast(Address address, ClusteredQueryCommand clusteredQueryCommand) { if (address.equals(myAddress)) { Future<QueryResponse> localResponse = localInvoke(clusteredQueryCommand); try { return localResponse.get(); } catch (InterruptedException e) { t...
[ "QueryResponse", "unicast", "(", "Address", "address", ",", "ClusteredQueryCommand", "clusteredQueryCommand", ")", "{", "if", "(", "address", ".", "equals", "(", "myAddress", ")", ")", "{", "Future", "<", "QueryResponse", ">", "localResponse", "=", "localInvoke", ...
Send this ClusteredQueryCommand to a node. @param address Address of the destination node @param clusteredQueryCommand @return the response
[ "Send", "this", "ClusteredQueryCommand", "to", "a", "node", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java#L51-L66
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.exclusiveBetween
public long exclusiveBetween(long start, long end, long value, String message) { """ Validate that the specified primitive value falls between the two exclusive values specified; otherwise, throws an exception with the specified message. <pre>Validate.exclusiveBetween(0, 2, 1, "Not in range");</pre> @param sta...
java
public long exclusiveBetween(long start, long end, long value, String message) { if (value <= start || value >= end) { fail(message); } return value; }
[ "public", "long", "exclusiveBetween", "(", "long", "start", ",", "long", "end", ",", "long", "value", ",", "String", "message", ")", "{", "if", "(", "value", "<=", "start", "||", "value", ">=", "end", ")", "{", "fail", "(", "message", ")", ";", "}", ...
Validate that the specified primitive value falls between the two exclusive values specified; otherwise, throws an exception with the specified message. <pre>Validate.exclusiveBetween(0, 2, 1, "Not in range");</pre> @param start the exclusive start value @param end the exclusive end value @param value the value to val...
[ "Validate", "that", "the", "specified", "primitive", "value", "falls", "between", "the", "two", "exclusive", "values", "specified", ";", "otherwise", "throws", "an", "exception", "with", "the", "specified", "message", ".", "<pre", ">", "Validate", ".", "exclusiv...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L1467-L1472
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/datamovement/HostAvailabilityListener.java
HostAvailabilityListener.processFailure
public void processFailure(QueryBatchException queryBatch) { """ This implements the QueryFailureListener interface @param queryBatch the exception with information about the failed query attempt """ boolean isHostUnavailableException = processException(queryBatch.getBatcher(), queryBatch, queryBatch.ge...
java
public void processFailure(QueryBatchException queryBatch) { boolean isHostUnavailableException = processException(queryBatch.getBatcher(), queryBatch, queryBatch.getClient().getHost()); if ( isHostUnavailableException == true ) { try { logger.warn("Retrying failed batch: {}, results so far: {}, f...
[ "public", "void", "processFailure", "(", "QueryBatchException", "queryBatch", ")", "{", "boolean", "isHostUnavailableException", "=", "processException", "(", "queryBatch", ".", "getBatcher", "(", ")", ",", "queryBatch", ",", "queryBatch", ".", "getClient", "(", ")"...
This implements the QueryFailureListener interface @param queryBatch the exception with information about the failed query attempt
[ "This", "implements", "the", "QueryFailureListener", "interface" ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/datamovement/HostAvailabilityListener.java#L213-L226
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.rebootComputeNode
public void rebootComputeNode(String poolId, String nodeId) throws BatchErrorException, IOException { """ Reboots the specified compute node. <p>You can reboot a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link com.microsoft.azure.batch.pro...
java
public void rebootComputeNode(String poolId, String nodeId) throws BatchErrorException, IOException { rebootComputeNode(poolId, nodeId, null, null); }
[ "public", "void", "rebootComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ")", "throws", "BatchErrorException", ",", "IOException", "{", "rebootComputeNode", "(", "poolId", ",", "nodeId", ",", "null", ",", "null", ")", ";", "}" ]
Reboots the specified compute node. <p>You can reboot a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#RUNNING Running} state.</p> @param poolId The ID of the pool that contains the co...
[ "Reboots", "the", "specified", "compute", "node", ".", "<p", ">", "You", "can", "reboot", "a", "compute", "node", "only", "when", "it", "is", "in", "the", "{", "@link", "com", ".", "microsoft", ".", "azure", ".", "batch", ".", "protocol", ".", "models"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L277-L279
ixa-ehu/ixa-pipe-pos
src/main/java/eus/ixa/ixa/pipe/pos/dict/MultiWordMatcher.java
MultiWordMatcher.multiWordsToSpans
public final Span[] multiWordsToSpans(final String[] tokens) { """ Detects multiword expressions ignoring case. @param tokens the tokenized sentence @return spans of the multiword """ final List<Span> multiWordsFound = new LinkedList<Span>(); for (int offsetFrom = 0; offsetFrom < tokens.length; o...
java
public final Span[] multiWordsToSpans(final String[] tokens) { final List<Span> multiWordsFound = new LinkedList<Span>(); for (int offsetFrom = 0; offsetFrom < tokens.length; offsetFrom++) { Span multiwordFound = null; String tokensSearching[] = new String[] {}; for (int offsetTo = offsetFro...
[ "public", "final", "Span", "[", "]", "multiWordsToSpans", "(", "final", "String", "[", "]", "tokens", ")", "{", "final", "List", "<", "Span", ">", "multiWordsFound", "=", "new", "LinkedList", "<", "Span", ">", "(", ")", ";", "for", "(", "int", "offsetF...
Detects multiword expressions ignoring case. @param tokens the tokenized sentence @return spans of the multiword
[ "Detects", "multiword", "expressions", "ignoring", "case", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-pos/blob/083c986103f95ae8063b8ddc89a2caa8047d29b9/src/main/java/eus/ixa/ixa/pipe/pos/dict/MultiWordMatcher.java#L184-L216
groovy/groovy-core
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.eachRow
public void eachRow(String sql, List<Object> params, Closure metaClosure, int offset, int maxRows, Closure rowClosure) throws SQLException { """ Performs the given SQL query calling the given <code>rowClosure</code> with each row of the result set starting at the provided <code>offset</code>, and including up to ...
java
public void eachRow(String sql, List<Object> params, Closure metaClosure, int offset, int maxRows, Closure rowClosure) throws SQLException { Connection connection = createConnection(); PreparedStatement statement = null; ResultSet results = null; try { statement = getPrepared...
[ "public", "void", "eachRow", "(", "String", "sql", ",", "List", "<", "Object", ">", "params", ",", "Closure", "metaClosure", ",", "int", "offset", ",", "int", "maxRows", ",", "Closure", "rowClosure", ")", "throws", "SQLException", "{", "Connection", "connect...
Performs the given SQL query calling the given <code>rowClosure</code> with each row of the result set starting at the provided <code>offset</code>, and including up to <code>maxRows</code> number of rows. The row will be a <code>GroovyResultSet</code> which is a <code>ResultSet</code> that supports accessing the field...
[ "Performs", "the", "given", "SQL", "query", "calling", "the", "given", "<code", ">", "rowClosure<", "/", "code", ">", "with", "each", "row", "of", "the", "result", "set", "starting", "at", "the", "provided", "<code", ">", "offset<", "/", "code", ">", "an...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1244-L1266
citrusframework/citrus
modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/endpoint/RmiEndpointUtils.java
RmiEndpointUtils.getPort
public static Integer getPort(String resourcePath, RmiEndpointConfiguration endpointConfiguration) { """ Extract port number from resource path. If not present use default port from endpoint configuration. @param resourcePath @param endpointConfiguration @return """ if (resourcePath.contains(":")) {...
java
public static Integer getPort(String resourcePath, RmiEndpointConfiguration endpointConfiguration) { if (resourcePath.contains(":")) { String portSpec = resourcePath.split(":")[1]; if (portSpec.contains("/")) { portSpec = portSpec.substring(0, portSpec.indexOf('/')); ...
[ "public", "static", "Integer", "getPort", "(", "String", "resourcePath", ",", "RmiEndpointConfiguration", "endpointConfiguration", ")", "{", "if", "(", "resourcePath", ".", "contains", "(", "\":\"", ")", ")", "{", "String", "portSpec", "=", "resourcePath", ".", ...
Extract port number from resource path. If not present use default port from endpoint configuration. @param resourcePath @param endpointConfiguration @return
[ "Extract", "port", "number", "from", "resource", "path", ".", "If", "not", "present", "use", "default", "port", "from", "endpoint", "configuration", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-rmi/src/main/java/com/consol/citrus/rmi/endpoint/RmiEndpointUtils.java#L51-L63
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.stopInstance
public void stopInstance(String instanceId, boolean forceStop) { """ Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get <code>409</code> errorCode. This is an asynchronous interface, you can get the latest status by invoke {@link #g...
java
public void stopInstance(String instanceId, boolean forceStop) { this.stopInstance(new StopInstanceRequest() .withInstanceId(instanceId).withForceStop(forceStop)); }
[ "public", "void", "stopInstance", "(", "String", "instanceId", ",", "boolean", "forceStop", ")", "{", "this", ".", "stopInstance", "(", "new", "StopInstanceRequest", "(", ")", ".", "withInstanceId", "(", "instanceId", ")", ".", "withForceStop", "(", "forceStop",...
Stopping the instance owned by the user. You can stop the instance only when the instance is Running, otherwise,it's will get <code>409</code> errorCode. This is an asynchronous interface, you can get the latest status by invoke {@link #getInstance(GetInstanceRequest)} @param instanceId The id of the instance. @para...
[ "Stopping", "the", "instance", "owned", "by", "the", "user", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L425-L428
tweea/matrixjavalib-main-common
src/main/java/net/matrix/lang/Reflections.java
Reflections.invokeMethodByName
public static <T> T invokeMethodByName(final Object target, final String name, final Object[] parameterValues) { """ 直接调用对象方法,无视 private/protected 修饰符。 用于一次性调用的情况,否则应使用 getAccessibleMethodByName() 函数获得 Method 后反复调用。 只匹配函数名,如果有多个同名函数调用第一个。 @param target 目标对象 @param name 方法名 @param parameterValues 参数值 @pa...
java
public static <T> T invokeMethodByName(final Object target, final String name, final Object[] parameterValues) { Method method = getAccessibleMethodByName(target, name); if (method == null) { throw new IllegalArgumentException("Could not find method [" + name + "] on target [" + target + ']'); } try {...
[ "public", "static", "<", "T", ">", "T", "invokeMethodByName", "(", "final", "Object", "target", ",", "final", "String", "name", ",", "final", "Object", "[", "]", "parameterValues", ")", "{", "Method", "method", "=", "getAccessibleMethodByName", "(", "target", ...
直接调用对象方法,无视 private/protected 修饰符。 用于一次性调用的情况,否则应使用 getAccessibleMethodByName() 函数获得 Method 后反复调用。 只匹配函数名,如果有多个同名函数调用第一个。 @param target 目标对象 @param name 方法名 @param parameterValues 参数值 @param <T> 期待的返回值类型 @return 返回值
[ "直接调用对象方法,无视", "private", "/", "protected", "修饰符。", "用于一次性调用的情况,否则应使用", "getAccessibleMethodByName", "()", "函数获得", "Method", "后反复调用。", "只匹配函数名,如果有多个同名函数调用第一个。" ]
train
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/lang/Reflections.java#L173-L184
sinetja/sinetja
src/main/java/sinetja/Response.java
Response.respondJson
public ChannelFuture respondJson(Object ref) throws Exception { """ Converts the given Java object to JSON object using Jackson ObjectMapper, and responds it. If you just want to respond a text with "application/json" as content type, use respondJsonText(text). <p> Content-Type header is set to "application/j...
java
public ChannelFuture respondJson(Object ref) throws Exception { final String json = jsonObjectMapper.writeValueAsString(ref); return respondText(json, "application/json"); }
[ "public", "ChannelFuture", "respondJson", "(", "Object", "ref", ")", "throws", "Exception", "{", "final", "String", "json", "=", "jsonObjectMapper", ".", "writeValueAsString", "(", "ref", ")", ";", "return", "respondText", "(", "json", ",", "\"application/json\"",...
Converts the given Java object to JSON object using Jackson ObjectMapper, and responds it. If you just want to respond a text with "application/json" as content type, use respondJsonText(text). <p> Content-Type header is set to "application/json". "text/json" would make the browser download instead of displaying the co...
[ "Converts", "the", "given", "Java", "object", "to", "JSON", "object", "using", "Jackson", "ObjectMapper", "and", "responds", "it", ".", "If", "you", "just", "want", "to", "respond", "a", "text", "with", "application", "/", "json", "as", "content", "type", ...
train
https://github.com/sinetja/sinetja/blob/eec94dba55ec28263e3503fcdb33532282134775/src/main/java/sinetja/Response.java#L213-L216
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/AbstractSelectCodeGenerator.java
AbstractSelectCodeGenerator.generateCommonPart
public void generateCommonPart(SQLiteModelMethod method, TypeSpec.Builder classBuilder, MethodSpec.Builder methodBuilder, Set<JQLProjection> fieldList, boolean generateSqlField) { """ Generate common part. @param method the method @param classBuilder the class builder @param methodBuilder the method builde...
java
public void generateCommonPart(SQLiteModelMethod method, TypeSpec.Builder classBuilder, MethodSpec.Builder methodBuilder, Set<JQLProjection> fieldList, boolean generateSqlField) { generateCommonPart(method, classBuilder, methodBuilder, fieldList, GenerationType.ALL, null, generateSqlField, false); }
[ "public", "void", "generateCommonPart", "(", "SQLiteModelMethod", "method", ",", "TypeSpec", ".", "Builder", "classBuilder", ",", "MethodSpec", ".", "Builder", "methodBuilder", ",", "Set", "<", "JQLProjection", ">", "fieldList", ",", "boolean", "generateSqlField", "...
Generate common part. @param method the method @param classBuilder the class builder @param methodBuilder the method builder @param fieldList the field list @param mapFields the map fields
[ "Generate", "common", "part", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/AbstractSelectCodeGenerator.java#L324-L326
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_volume_GET
public ArrayList<OvhVolume> project_serviceName_volume_GET(String serviceName, String region) throws IOException { """ Get volumes REST: GET /cloud/project/{serviceName}/volume @param region [required] Volume region @param serviceName [required] Project id """ String qPath = "/cloud/project/{serviceName...
java
public ArrayList<OvhVolume> project_serviceName_volume_GET(String serviceName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/volume"; StringBuilder sb = path(qPath, serviceName); query(sb, "region", region); String resp = exec(qPath, "GET", sb.toString(), null); return conve...
[ "public", "ArrayList", "<", "OvhVolume", ">", "project_serviceName_volume_GET", "(", "String", "serviceName", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/volume\"", ";", "StringBuilder", "sb", "=", ...
Get volumes REST: GET /cloud/project/{serviceName}/volume @param region [required] Volume region @param serviceName [required] Project id
[ "Get", "volumes" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1205-L1211
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java
Atom10Parser.formURI
private static String formURI(String base, String append) { """ Form URI by combining base with append portion and giving special consideration to append portions that begin with ".." @param base Base of URI, may end with trailing slash @param append String to append, may begin with slash or ".." """ ...
java
private static String formURI(String base, String append) { base = stripTrailingSlash(base); append = stripStartingSlash(append); if (append.startsWith("..")) { final String[] parts = append.split("/"); for (final String part : parts) { if ("..".equals(par...
[ "private", "static", "String", "formURI", "(", "String", "base", ",", "String", "append", ")", "{", "base", "=", "stripTrailingSlash", "(", "base", ")", ";", "append", "=", "stripStartingSlash", "(", "append", ")", ";", "if", "(", "append", ".", "startsWit...
Form URI by combining base with append portion and giving special consideration to append portions that begin with ".." @param base Base of URI, may end with trailing slash @param append String to append, may begin with slash or ".."
[ "Form", "URI", "by", "combining", "base", "with", "append", "portion", "and", "giving", "special", "consideration", "to", "append", "portions", "that", "begin", "with", ".." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/Atom10Parser.java#L646-L664
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.containsNone
public static boolean containsNone(String str, String invalidChars) { """ <p>Checks that the String does not contain certain characters.</p> <p>A <code>null</code> String will return <code>true</code>. A <code>null</code> invalid character array will return <code>true</code>. An empty String ("") always retur...
java
public static boolean containsNone(String str, String invalidChars) { if (str == null || invalidChars == null) { return true; } return containsNone(str, invalidChars.toCharArray()); }
[ "public", "static", "boolean", "containsNone", "(", "String", "str", ",", "String", "invalidChars", ")", "{", "if", "(", "str", "==", "null", "||", "invalidChars", "==", "null", ")", "{", "return", "true", ";", "}", "return", "containsNone", "(", "str", ...
<p>Checks that the String does not contain certain characters.</p> <p>A <code>null</code> String will return <code>true</code>. A <code>null</code> invalid character array will return <code>true</code>. An empty String ("") always returns true.</p> <pre> GosuStringUtil.containsNone(null, *) = true GosuStringUti...
[ "<p", ">", "Checks", "that", "the", "String", "does", "not", "contain", "certain", "characters", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L1388-L1393
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/NarAssemblyMojo.java
NarAssemblyMojo.narExecute
@Override public final void narExecute() throws MojoExecutionException, MojoFailureException { """ Copies the unpacked nar libraries and files into the projects target area """ // download the dependencies if needed in local maven repository. List<AttachedNarArtifact> attachedNarArtifacts = getAttach...
java
@Override public final void narExecute() throws MojoExecutionException, MojoFailureException { // download the dependencies if needed in local maven repository. List<AttachedNarArtifact> attachedNarArtifacts = getAttachedNarArtifacts(libraries); downloadAttachedNars(attachedNarArtifacts); // Warning,...
[ "@", "Override", "public", "final", "void", "narExecute", "(", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "// download the dependencies if needed in local maven repository.", "List", "<", "AttachedNarArtifact", ">", "attachedNarArtifacts", "=", ...
Copies the unpacked nar libraries and files into the projects target area
[ "Copies", "the", "unpacked", "nar", "libraries", "and", "files", "into", "the", "projects", "target", "area" ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/NarAssemblyMojo.java#L56-L104
VoltDB/voltdb
third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java
JFile.genCode
public void genCode(String language, File outputDirectory) throws IOException { """ Generate record code in given language. Language should be all lowercase. @param outputDirectory """ if ("c++".equals(language)) { CppGenerator gen = new CppGenerator(mName, mInclFiles, mRecor...
java
public void genCode(String language, File outputDirectory) throws IOException { if ("c++".equals(language)) { CppGenerator gen = new CppGenerator(mName, mInclFiles, mRecords, outputDirectory); gen.genCode(); } else if ("java".equals(language)) { ...
[ "public", "void", "genCode", "(", "String", "language", ",", "File", "outputDirectory", ")", "throws", "IOException", "{", "if", "(", "\"c++\"", ".", "equals", "(", "language", ")", ")", "{", "CppGenerator", "gen", "=", "new", "CppGenerator", "(", "mName", ...
Generate record code in given language. Language should be all lowercase. @param outputDirectory
[ "Generate", "record", "code", "in", "given", "language", ".", "Language", "should", "be", "all", "lowercase", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java#L64-L81
alkacon/opencms-core
src/org/opencms/lock/CmsLockManager.java
CmsLockManager.getSiblingsLock
private CmsLock getSiblingsLock(List<CmsResource> siblings, String resourcename) { """ Returns the indirect lock of a resource depending on siblings lock state.<p> @param siblings the list of siblings @param resourcename the name of the resource @return the indirect lock of the resource or the null lock ...
java
private CmsLock getSiblingsLock(List<CmsResource> siblings, String resourcename) { for (int i = 0; i < siblings.size(); i++) { CmsResource sibling = siblings.get(i); CmsLock exclusiveLock = getDirectLock(sibling.getRootPath()); if (exclusiveLock != null) { //...
[ "private", "CmsLock", "getSiblingsLock", "(", "List", "<", "CmsResource", ">", "siblings", ",", "String", "resourcename", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "siblings", ".", "size", "(", ")", ";", "i", "++", ")", "{", "CmsReso...
Returns the indirect lock of a resource depending on siblings lock state.<p> @param siblings the list of siblings @param resourcename the name of the resource @return the indirect lock of the resource or the null lock
[ "Returns", "the", "indirect", "lock", "of", "a", "resource", "depending", "on", "siblings", "lock", "state", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockManager.java#L813-L826
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getMaterialStorage
public void getMaterialStorage(String API, Callback<List<MaterialStorage>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on MaterialCategory Storage API go <a href="https://wiki.guildwars2.com/wiki/API:2/account/materials">here</a><br/> Give user the access to {@link Callback#onRe...
java
public void getMaterialStorage(String API, Callback<List<MaterialStorage>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API)); gw2API.getMaterialBank(API).enqueue(callback); }
[ "public", "void", "getMaterialStorage", "(", "String", "API", ",", "Callback", "<", "List", "<", "MaterialStorage", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "Para...
For more info on MaterialCategory Storage API go <a href="https://wiki.guildwars2.com/wiki/API:2/account/materials">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param API API key @param callback c...
[ "For", "more", "info", "on", "MaterialCategory", "Storage", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "account", "/", "materials", ">", "here<", "/", "a", ">", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L340-L343
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.onLossPacket
private void onLossPacket(Packet p) { """ On the Packet lost in the DirectoryConnection. @param p the Packet. """ if (p.respHeader == null) { p.respHeader = new ResponseHeader(-1, -1, ErrorCode.OK); } switch (getStatus()) { case AUTH_FAILED: p.respHea...
java
private void onLossPacket(Packet p) { if (p.respHeader == null) { p.respHeader = new ResponseHeader(-1, -1, ErrorCode.OK); } switch (getStatus()) { case AUTH_FAILED: p.respHeader.setErr(ErrorCode.AUTHENT_FAILED); break; case CLOSED: ...
[ "private", "void", "onLossPacket", "(", "Packet", "p", ")", "{", "if", "(", "p", ".", "respHeader", "==", "null", ")", "{", "p", ".", "respHeader", "=", "new", "ResponseHeader", "(", "-", "1", ",", "-", "1", ",", "ErrorCode", ".", "OK", ")", ";", ...
On the Packet lost in the DirectoryConnection. @param p the Packet.
[ "On", "the", "Packet", "lost", "in", "the", "DirectoryConnection", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L822-L837
rholder/guava-retrying
src/main/java/com/github/rholder/retry/WaitStrategies.java
WaitStrategies.randomWait
public static WaitStrategy randomWait(long maximumTime, @Nonnull TimeUnit timeUnit) { """ Returns a strategy that sleeps a random amount of time before retrying. @param maximumTime the maximum time to sleep @param timeUnit the unit of the maximum time @return a wait strategy with a random wait time @throw...
java
public static WaitStrategy randomWait(long maximumTime, @Nonnull TimeUnit timeUnit) { Preconditions.checkNotNull(timeUnit, "The time unit may not be null"); return new RandomWaitStrategy(0L, timeUnit.toMillis(maximumTime)); }
[ "public", "static", "WaitStrategy", "randomWait", "(", "long", "maximumTime", ",", "@", "Nonnull", "TimeUnit", "timeUnit", ")", "{", "Preconditions", ".", "checkNotNull", "(", "timeUnit", ",", "\"The time unit may not be null\"", ")", ";", "return", "new", "RandomWa...
Returns a strategy that sleeps a random amount of time before retrying. @param maximumTime the maximum time to sleep @param timeUnit the unit of the maximum time @return a wait strategy with a random wait time @throws IllegalStateException if the maximum sleep time is &lt;= 0.
[ "Returns", "a", "strategy", "that", "sleeps", "a", "random", "amount", "of", "time", "before", "retrying", "." ]
train
https://github.com/rholder/guava-retrying/blob/177b6c9b9f3e7957f404f0bdb8e23374cb1de43f/src/main/java/com/github/rholder/retry/WaitStrategies.java#L71-L74
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/EventManager.java
EventManager.fireProgressEvent
public void fireProgressEvent(int state, int progress, String message) throws Exception { """ Fires progress event messages @param state The state integer @param progress The progress integer @param message The message to be displayed @throws Exception """ if (listenersMap != null) { ...
java
public void fireProgressEvent(int state, int progress, String message) throws Exception { if (listenersMap != null) { Collection<InstallEventListener> listeners = listenersMap.get(InstallConstants.EVENT_TYPE_PROGRESS); if (listeners != null) { for (InstallEventListener li...
[ "public", "void", "fireProgressEvent", "(", "int", "state", ",", "int", "progress", ",", "String", "message", ")", "throws", "Exception", "{", "if", "(", "listenersMap", "!=", "null", ")", "{", "Collection", "<", "InstallEventListener", ">", "listeners", "=", ...
Fires progress event messages @param state The state integer @param progress The progress integer @param message The message to be displayed @throws Exception
[ "Fires", "progress", "event", "messages" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/EventManager.java#L72-L81
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java
ChecksumsManager.registerNewChecksums
public void registerNewChecksums(File featureDir, String fileName, String checksum) { """ Registers a new feature directory's new checksum @param featureDir the feature directory @param fileName the filename for the checksum @param checksum the checksum as a String """ ChecksumData checksums = che...
java
public void registerNewChecksums(File featureDir, String fileName, String checksum) { ChecksumData checksums = checksumsMap.get(featureDir); if (checksums == null) { checksums = new ChecksumData(); checksumsMap.put(featureDir, checksums); } checksums.registerNewCh...
[ "public", "void", "registerNewChecksums", "(", "File", "featureDir", ",", "String", "fileName", ",", "String", "checksum", ")", "{", "ChecksumData", "checksums", "=", "checksumsMap", ".", "get", "(", "featureDir", ")", ";", "if", "(", "checksums", "==", "null"...
Registers a new feature directory's new checksum @param featureDir the feature directory @param fileName the filename for the checksum @param checksum the checksum as a String
[ "Registers", "a", "new", "feature", "directory", "s", "new", "checksum" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java#L238-L245
DDTH/ddth-zookeeper
src/main/java/com/github/ddth/zookeeper/ZooKeeperClient.java
ZooKeeperClient.createNode
public boolean createNode(String path, String value) throws ZooKeeperException { """ Creates a node, with initial values. <p> Note: nodes are created recursively (parent nodes are created if needed). </p> @param path @param value @return @throws ZooKeeperException """ return _create(path, va...
java
public boolean createNode(String path, String value) throws ZooKeeperException { return _create(path, value != null ? value.getBytes(UTF8) : null, CreateMode.PERSISTENT); }
[ "public", "boolean", "createNode", "(", "String", "path", ",", "String", "value", ")", "throws", "ZooKeeperException", "{", "return", "_create", "(", "path", ",", "value", "!=", "null", "?", "value", ".", "getBytes", "(", "UTF8", ")", ":", "null", ",", "...
Creates a node, with initial values. <p> Note: nodes are created recursively (parent nodes are created if needed). </p> @param path @param value @return @throws ZooKeeperException
[ "Creates", "a", "node", "with", "initial", "values", "." ]
train
https://github.com/DDTH/ddth-zookeeper/blob/0994eea8b25fa3d885f3da4579768b7d08c1c32b/src/main/java/com/github/ddth/zookeeper/ZooKeeperClient.java#L469-L471
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.getRelationFromInts
private char getRelationFromInts(int lg, int mg, int syn, int opp) { """ Decides which relation to return. @param lg number of less general words between two extended gloss @param mg number of more general words between two extended gloss @param syn number of synonym words between two extended gloss @param...
java
private char getRelationFromInts(int lg, int mg, int syn, int opp) { if ((lg >= mg) && (lg >= syn) && (lg >= opp) && (lg > 0)) { return IMappingElement.LESS_GENERAL; } if ((mg >= lg) && (mg >= syn) && (mg >= opp) && (mg > 0)) { return IMappingElement.MORE_GENERAL; ...
[ "private", "char", "getRelationFromInts", "(", "int", "lg", ",", "int", "mg", ",", "int", "syn", ",", "int", "opp", ")", "{", "if", "(", "(", "lg", ">=", "mg", ")", "&&", "(", "lg", ">=", "syn", ")", "&&", "(", "lg", ">=", "opp", ")", "&&", "...
Decides which relation to return. @param lg number of less general words between two extended gloss @param mg number of more general words between two extended gloss @param syn number of synonym words between two extended gloss @param opp number of opposite words between two extended gloss @return the more frequent ...
[ "Decides", "which", "relation", "to", "return", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L130-L144
jbundle/jbundle
thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java
Application.getParameterByReflection
public String getParameterByReflection(Object obj, String param) { """ Lame method, since android doesn't have awt/applet support. @param obj @param text """ Object value = null; try { java.lang.reflect.Method method = obj.getClass().getMethod("getParameter", String.class); ...
java
public String getParameterByReflection(Object obj, String param) { Object value = null; try { java.lang.reflect.Method method = obj.getClass().getMethod("getParameter", String.class); if (method != null) value = method.invoke(obj, param); ...
[ "public", "String", "getParameterByReflection", "(", "Object", "obj", ",", "String", "param", ")", "{", "Object", "value", "=", "null", ";", "try", "{", "java", ".", "lang", ".", "reflect", ".", "Method", "method", "=", "obj", ".", "getClass", "(", ")", ...
Lame method, since android doesn't have awt/applet support. @param obj @param text
[ "Lame", "method", "since", "android", "doesn", "t", "have", "awt", "/", "applet", "support", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java#L909-L924
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/postal/PostalCodeManager.java
PostalCodeManager.isValidPostalCodeDefaultYes
public boolean isValidPostalCodeDefaultYes (@Nullable final Locale aCountry, @Nullable final String sPostalCode) { """ Check if the passed postal code is valid for the passed country. If no information for that specific country is defined, the postal code is assumed valid! @param aCountry The country to chec...
java
public boolean isValidPostalCodeDefaultYes (@Nullable final Locale aCountry, @Nullable final String sPostalCode) { return isValidPostalCode (aCountry, sPostalCode).getAsBooleanValue (true); }
[ "public", "boolean", "isValidPostalCodeDefaultYes", "(", "@", "Nullable", "final", "Locale", "aCountry", ",", "@", "Nullable", "final", "String", "sPostalCode", ")", "{", "return", "isValidPostalCode", "(", "aCountry", ",", "sPostalCode", ")", ".", "getAsBooleanValu...
Check if the passed postal code is valid for the passed country. If no information for that specific country is defined, the postal code is assumed valid! @param aCountry The country to check. May be <code>null</code>. @param sPostalCode The postal code to check. May be <code>null</code>. @return <code>true</code> if ...
[ "Check", "if", "the", "passed", "postal", "code", "is", "valid", "for", "the", "passed", "country", ".", "If", "no", "information", "for", "that", "specific", "country", "is", "defined", "the", "postal", "code", "is", "assumed", "valid!" ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/postal/PostalCodeManager.java#L133-L136
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.normmax
public SDVariable normmax(String name, SDVariable x, int... dimensions) { """ Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the specified dimensions @param name Output variable name @param x Input variable @param dimensions dimensio...
java
public SDVariable normmax(String name, SDVariable x, int... dimensions) { return normmax(name, x, false, dimensions); }
[ "public", "SDVariable", "normmax", "(", "String", "name", ",", "SDVariable", "x", ",", "int", "...", "dimensions", ")", "{", "return", "normmax", "(", "name", ",", "x", ",", "false", ",", "dimensions", ")", ";", "}" ]
Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the specified dimensions @param name Output variable name @param x Input variable @param dimensions dimensions to reduce over @return Output variable
[ "Max", "norm", "(", "infinity", "norm", ")", "reduction", "operation", ":", "The", "output", "contains", "the", "max", "norm", "for", "each", "tensor", "/", "subset", "along", "the", "specified", "dimensions" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1423-L1425
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.isSymbolicLink
private static boolean isSymbolicLink(final File file, File parentFile) throws PrivilegedActionException { """ Test if a file is a symbolic link. Test only the file. A symbolic link elsewhere in the path to the file is not detected. Gets the canonical form of the parent directory and appends the file name. Th...
java
private static boolean isSymbolicLink(final File file, File parentFile) throws PrivilegedActionException { File canonicalParentDir = getCanonicalFile(parentFile); File fileInCanonicalParentDir = new File(canonicalParentDir, file.getName()); File canonicalFile = getCanonicalFile(fileInCanonicalPa...
[ "private", "static", "boolean", "isSymbolicLink", "(", "final", "File", "file", ",", "File", "parentFile", ")", "throws", "PrivilegedActionException", "{", "File", "canonicalParentDir", "=", "getCanonicalFile", "(", "parentFile", ")", ";", "File", "fileInCanonicalPare...
Test if a file is a symbolic link. Test only the file. A symbolic link elsewhere in the path to the file is not detected. Gets the canonical form of the parent directory and appends the file name. Then compares that canonical form of the file to the "Absolute" file. If it doesn't match, then it is a symbolic link. @p...
[ "Test", "if", "a", "file", "is", "a", "symbolic", "link", ".", "Test", "only", "the", "file", ".", "A", "symbolic", "link", "elsewhere", "in", "the", "path", "to", "the", "file", "is", "not", "detected", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1399-L1405
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/compare/CompareFileExtensions.java
CompareFileExtensions.compareFiles
public static IFileContentResultBean compareFiles(final File sourceFile, final File fileToCompare) { """ Compare files. @param sourceFile the source file @param fileToCompare the file to compare @return the i file content result bean """ return compareFiles(sourceFile, fileToCompare, true, false, ...
java
public static IFileContentResultBean compareFiles(final File sourceFile, final File fileToCompare) { return compareFiles(sourceFile, fileToCompare, true, false, false, true, false, true); }
[ "public", "static", "IFileContentResultBean", "compareFiles", "(", "final", "File", "sourceFile", ",", "final", "File", "fileToCompare", ")", "{", "return", "compareFiles", "(", "sourceFile", ",", "fileToCompare", ",", "true", ",", "false", ",", "false", ",", "t...
Compare files. @param sourceFile the source file @param fileToCompare the file to compare @return the i file content result bean
[ "Compare", "files", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/compare/CompareFileExtensions.java#L321-L325
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java
GImageDerivativeOps.lookupKernelX
public static KernelBase lookupKernelX( DerivativeType type , boolean isInteger) { """ Returns the kernel for finding the X derivative. @param type Type of gradient @param isInteger integer or floating point kernels @return The kernel. Can be 1D or 2D """ switch( type ) { case PREWITT: return Grad...
java
public static KernelBase lookupKernelX( DerivativeType type , boolean isInteger) { switch( type ) { case PREWITT: return GradientPrewitt.getKernelX(isInteger); case SOBEL: return GradientSobel.getKernelX(isInteger); case THREE: return GradientThree.getKernelX(isInteger); case TWO_0: ret...
[ "public", "static", "KernelBase", "lookupKernelX", "(", "DerivativeType", "type", ",", "boolean", "isInteger", ")", "{", "switch", "(", "type", ")", "{", "case", "PREWITT", ":", "return", "GradientPrewitt", ".", "getKernelX", "(", "isInteger", ")", ";", "case"...
Returns the kernel for finding the X derivative. @param type Type of gradient @param isInteger integer or floating point kernels @return The kernel. Can be 1D or 2D
[ "Returns", "the", "kernel", "for", "finding", "the", "X", "derivative", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L268-L287
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.greaterThanOrEqual
public boolean greaterThanOrEqual(Object left, Object right) { """ Test if left >= right. @param left first value @param right second value @return test result. """ if (left == right) { return true; } else if (left == null || right == null) { return false; } else { ...
java
public boolean greaterThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, ">=") >= 0; } }
[ "public", "boolean", "greaterThanOrEqual", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "right", ")", "{", "return", "true", ";", "}", "else", "if", "(", "left", "==", "null", "||", "right", "==", "null", ")", "{"...
Test if left >= right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", ">", "=", "right", "." ]
train
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L872-L882
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.getEffectivePropertyObject
public CmsClientProperty getEffectivePropertyObject(CmsClientSitemapEntry entry, String name) { """ Gets the value of a property which is effective at a given sitemap entry.<p> @param entry the sitemap entry @param name the name of the property @return the effective property value """ Map<String,...
java
public CmsClientProperty getEffectivePropertyObject(CmsClientSitemapEntry entry, String name) { Map<String, CmsClientProperty> dfProps = entry.getDefaultFileProperties(); CmsClientProperty result = safeLookup(dfProps, name); if (!CmsClientProperty.isPropertyEmpty(result)) { return r...
[ "public", "CmsClientProperty", "getEffectivePropertyObject", "(", "CmsClientSitemapEntry", "entry", ",", "String", "name", ")", "{", "Map", "<", "String", ",", "CmsClientProperty", ">", "dfProps", "=", "entry", ".", "getDefaultFileProperties", "(", ")", ";", "CmsCli...
Gets the value of a property which is effective at a given sitemap entry.<p> @param entry the sitemap entry @param name the name of the property @return the effective property value
[ "Gets", "the", "value", "of", "a", "property", "which", "is", "effective", "at", "a", "given", "sitemap", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L1092-L1104
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java
Form.setAnswer
public void setAnswer(String variable, int value) { """ Sets a new int value to a given form's field. The field whose variable matches the requested variable will be completed with the specified value. If no field could be found for the specified variable then an exception will be raised. @param variable the ...
java
public void setAnswer(String variable, int value) { FormField field = getField(variable); if (field == null) { throw new IllegalArgumentException("Field not found for the specified variable name."); } validateThatFieldIsText(field); setAnswer(field, value); }
[ "public", "void", "setAnswer", "(", "String", "variable", ",", "int", "value", ")", "{", "FormField", "field", "=", "getField", "(", "variable", ")", ";", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field...
Sets a new int value to a given form's field. The field whose variable matches the requested variable will be completed with the specified value. If no field could be found for the specified variable then an exception will be raised. @param variable the variable name that was completed. @param value the int value that...
[ "Sets", "a", "new", "int", "value", "to", "a", "given", "form", "s", "field", ".", "The", "field", "whose", "variable", "matches", "the", "requested", "variable", "will", "be", "completed", "with", "the", "specified", "value", ".", "If", "no", "field", "...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java#L139-L146
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.PUT
public void PUT(String partialUrl, Object payload) { """ Execute a PUT call against the partial URL. @param partialUrl The partial URL to build @param payload The object to use for the PUT """ URI uri = buildUri(partialUrl); executePutRequest(uri, payload); }
java
public void PUT(String partialUrl, Object payload) { URI uri = buildUri(partialUrl); executePutRequest(uri, payload); }
[ "public", "void", "PUT", "(", "String", "partialUrl", ",", "Object", "payload", ")", "{", "URI", "uri", "=", "buildUri", "(", "partialUrl", ")", ";", "executePutRequest", "(", "uri", ",", "payload", ")", ";", "}" ]
Execute a PUT call against the partial URL. @param partialUrl The partial URL to build @param payload The object to use for the PUT
[ "Execute", "a", "PUT", "call", "against", "the", "partial", "URL", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L136-L140
geomajas/geomajas-project-client-gwt2
plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java
WmsServerExtension.setHintValue
public <T> void setHintValue(Hint<T> hint, T value) { """ Apply a new value for a specific WMS hint. @param hint The hint to change the value for. @param value The new actual value. If the value is null, an IllegalArgumentException is thrown. """ if (value == null) { throw new IllegalArgumentException...
java
public <T> void setHintValue(Hint<T> hint, T value) { if (value == null) { throw new IllegalArgumentException("Null value passed."); } hintValues.put(hint, value); }
[ "public", "<", "T", ">", "void", "setHintValue", "(", "Hint", "<", "T", ">", "hint", ",", "T", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Null value passed.\"", ")", ";", "}", "hin...
Apply a new value for a specific WMS hint. @param hint The hint to change the value for. @param value The new actual value. If the value is null, an IllegalArgumentException is thrown.
[ "Apply", "a", "new", "value", "for", "a", "specific", "WMS", "hint", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java#L193-L198
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java
DefaultCacheableResourceService.downloadResourceForUse
private File downloadResourceForUse(String resourceLocation, ResourceType type) throws ResourceDownloadError { """ Download and copy the resource for use. @param resourceLocation {@link String}, the resource location @param type {@link ResourceType}, the type of resource @return the re...
java
private File downloadResourceForUse(String resourceLocation, ResourceType type) throws ResourceDownloadError { File downloadResource = downloadResource(resourceLocation, type); return copyResource(downloadResource, resourceLocation); }
[ "private", "File", "downloadResourceForUse", "(", "String", "resourceLocation", ",", "ResourceType", "type", ")", "throws", "ResourceDownloadError", "{", "File", "downloadResource", "=", "downloadResource", "(", "resourceLocation", ",", "type", ")", ";", "return", "co...
Download and copy the resource for use. @param resourceLocation {@link String}, the resource location @param type {@link ResourceType}, the type of resource @return the resource copy {@link File} ready for processing @throws ResourceDownloadError Throw if an error occurred resolving or copying the resource
[ "Download", "and", "copy", "the", "resource", "for", "use", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java#L196-L201
apereo/cas
support/cas-server-support-token-authentication/src/main/java/org/apereo/cas/token/authentication/TokenAuthenticationHandler.java
TokenAuthenticationHandler.getRegisteredServiceJwtProperty
protected String getRegisteredServiceJwtProperty(final RegisteredService service, final RegisteredServiceProperty.RegisteredServiceProperties propName) { """ Gets registered service jwt secret. @param service the service @param propName the prop name @return the registered service jwt secret """ ...
java
protected String getRegisteredServiceJwtProperty(final RegisteredService service, final RegisteredServiceProperty.RegisteredServiceProperties propName) { if (service == null || !service.getAccessStrategy().isServiceAccessAllowed()) { LOGGER.debug("Service is not defined/found or its access is disabl...
[ "protected", "String", "getRegisteredServiceJwtProperty", "(", "final", "RegisteredService", "service", ",", "final", "RegisteredServiceProperty", ".", "RegisteredServiceProperties", "propName", ")", "{", "if", "(", "service", "==", "null", "||", "!", "service", ".", ...
Gets registered service jwt secret. @param service the service @param propName the prop name @return the registered service jwt secret
[ "Gets", "registered", "service", "jwt", "secret", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-token-authentication/src/main/java/org/apereo/cas/token/authentication/TokenAuthenticationHandler.java#L168-L178
census-instrumentation/opencensus-java
benchmarks/src/jmh/java/io/opencensus/benchmarks/tags/TagsBenchmarksUtil.java
TagsBenchmarksUtil.getTagContextBinarySerializer
@VisibleForTesting public static TagContextBinarySerializer getTagContextBinarySerializer(String implementation) { """ Gets the {@link TagContextBinarySerializer} for the specified 'implementation'. """ if (implementation.equals("impl")) { // We can return the global tracer here because if impl is ...
java
@VisibleForTesting public static TagContextBinarySerializer getTagContextBinarySerializer(String implementation) { if (implementation.equals("impl")) { // We can return the global tracer here because if impl is linked the global tracer will be // the impl one. // TODO(bdrutu): Make everything no...
[ "@", "VisibleForTesting", "public", "static", "TagContextBinarySerializer", "getTagContextBinarySerializer", "(", "String", "implementation", ")", "{", "if", "(", "implementation", ".", "equals", "(", "\"impl\"", ")", ")", "{", "// We can return the global tracer here becau...
Gets the {@link TagContextBinarySerializer} for the specified 'implementation'.
[ "Gets", "the", "{" ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/benchmarks/src/jmh/java/io/opencensus/benchmarks/tags/TagsBenchmarksUtil.java#L62-L75
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java
EventCollector.updateManagementGraph
private void updateManagementGraph(final JobID jobID, final ExecutionStateChangeEvent executionStateChangeEvent, String optionalMessage) { """ Applies changes in the state of an execution vertex to the stored management graph. @param jobID the ID of the job whose management graph shall be updated @param execu...
java
private void updateManagementGraph(final JobID jobID, final ExecutionStateChangeEvent executionStateChangeEvent, String optionalMessage) { synchronized (this.recentManagementGraphs) { final ManagementGraph managementGraph = this.recentManagementGraphs.get(jobID); if (managementGraph == null) { return; ...
[ "private", "void", "updateManagementGraph", "(", "final", "JobID", "jobID", ",", "final", "ExecutionStateChangeEvent", "executionStateChangeEvent", ",", "String", "optionalMessage", ")", "{", "synchronized", "(", "this", ".", "recentManagementGraphs", ")", "{", "final",...
Applies changes in the state of an execution vertex to the stored management graph. @param jobID the ID of the job whose management graph shall be updated @param executionStateChangeEvent the event describing the changes in the execution state of the vertex
[ "Applies", "changes", "in", "the", "state", "of", "an", "execution", "vertex", "to", "the", "stored", "management", "graph", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/EventCollector.java#L624-L642
alkacon/opencms-core
src/org/opencms/workplace/editors/CmsDialogCopyLanguage.java
CmsDialogCopyLanguage.actionUpdateLanguages
public void actionUpdateLanguages() throws JspException { """ Updates the languages of the current xmlcontent by copying from the current language.<p> @throws JspException if there is an error including the error page """ if ((m_paramSelectedLanguages != null) && !m_paramSelectedLanguages.isEmpty()...
java
public void actionUpdateLanguages() throws JspException { if ((m_paramSelectedLanguages != null) && !m_paramSelectedLanguages.isEmpty()) { try { CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION); CmsXmlContent content = CmsXmlC...
[ "public", "void", "actionUpdateLanguages", "(", ")", "throws", "JspException", "{", "if", "(", "(", "m_paramSelectedLanguages", "!=", "null", ")", "&&", "!", "m_paramSelectedLanguages", ".", "isEmpty", "(", ")", ")", "{", "try", "{", "CmsFile", "file", "=", ...
Updates the languages of the current xmlcontent by copying from the current language.<p> @throws JspException if there is an error including the error page
[ "Updates", "the", "languages", "of", "the", "current", "xmlcontent", "by", "copying", "from", "the", "current", "language", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsDialogCopyLanguage.java#L126-L163
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/CompilerExecutor.java
CompilerExecutor.build
public static WatchingException build(AbstractWisdomMojo mojo, Throwable exception) { """ Creates a {@link org.wisdom.maven.WatchingException} object from the given Java compilation exception. @param mojo the mojo @param exception the exception, thrown by the execution of the maven-compiler-plugin @retur...
java
public static WatchingException build(AbstractWisdomMojo mojo, Throwable exception) { String message = getLongMessage(mojo, exception); if (message == null) { // The extraction has failed. return new WatchingException(ERROR_TITLE, exception.getMessage(), null, exception); ...
[ "public", "static", "WatchingException", "build", "(", "AbstractWisdomMojo", "mojo", ",", "Throwable", "exception", ")", "{", "String", "message", "=", "getLongMessage", "(", "mojo", ",", "exception", ")", ";", "if", "(", "message", "==", "null", ")", "{", "...
Creates a {@link org.wisdom.maven.WatchingException} object from the given Java compilation exception. @param mojo the mojo @param exception the exception, thrown by the execution of the maven-compiler-plugin @return the watching exception
[ "Creates", "a", "{", "@link", "org", ".", "wisdom", ".", "maven", ".", "WatchingException", "}", "object", "from", "the", "given", "Java", "compilation", "exception", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/CompilerExecutor.java#L212-L235
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/NotificationDto.java
NotificationDto.transformToDto
public static List<NotificationDto> transformToDto(List<Notification> notifications) { """ Converts list of notification entity objects to list of notificationDto objects. @param notifications list of notification objects. Cannot be null. @return list of notificationDto objects @throws WebApplication...
java
public static List<NotificationDto> transformToDto(List<Notification> notifications) { if (notifications == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } List<NotificationDto> result = new ArrayLis...
[ "public", "static", "List", "<", "NotificationDto", ">", "transformToDto", "(", "List", "<", "Notification", ">", "notifications", ")", "{", "if", "(", "notifications", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object c...
Converts list of notification entity objects to list of notificationDto objects. @param notifications list of notification objects. Cannot be null. @return list of notificationDto objects @throws WebApplicationException If an error occurs.
[ "Converts", "list", "of", "notification", "entity", "objects", "to", "list", "of", "notificationDto", "objects", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/NotificationDto.java#L101-L112
bernardladenthin/streambuffer
src/main/java/net/ladenthin/streambuffer/StreamBuffer.java
StreamBuffer.correctOffsetAndLengthToWrite
public static boolean correctOffsetAndLengthToWrite(byte[] b, int off, int len) { """ Security check mostly copied from {@link OutputStream#write(byte[], int, int)}. Ensures the parameter are valid. @param b the byte array to write to the array @param off the offset to write to the array @param len the len of ...
java
public static boolean correctOffsetAndLengthToWrite(byte[] b, int off, int len) { if (b == null) { throw new NullPointerException(); } else if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) { throw new IndexOutOfBound...
[ "public", "static", "boolean", "correctOffsetAndLengthToWrite", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "{", "if", "(", "b", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "else", "if"...
Security check mostly copied from {@link OutputStream#write(byte[], int, int)}. Ensures the parameter are valid. @param b the byte array to write to the array @param off the offset to write to the array @param len the len of the bytes to write to the array @return <code>true</code> if there are bytes to write, otherwis...
[ "Security", "check", "mostly", "copied", "from", "{" ]
train
https://github.com/bernardladenthin/streambuffer/blob/46d586c95fc3316c7a92b76a556c932b9346015d/src/main/java/net/ladenthin/streambuffer/StreamBuffer.java#L191-L201
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.createMessageSenderFromEntityPathAsync
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath) { """ Creates a message sender asynchronously to the entity using the {@link MessagingFactory} @param messagingFactory messaging factory (which represents a connection) on w...
java
public static CompletableFuture<IMessageSender> createMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath) { return createMessageSenderFromEntityPathAsync(messagingFactory, entityPath, null); }
[ "public", "static", "CompletableFuture", "<", "IMessageSender", ">", "createMessageSenderFromEntityPathAsync", "(", "MessagingFactory", "messagingFactory", ",", "String", "entityPath", ")", "{", "return", "createMessageSenderFromEntityPathAsync", "(", "messagingFactory", ",", ...
Creates a message sender asynchronously to the entity using the {@link MessagingFactory} @param messagingFactory messaging factory (which represents a connection) on which sender needs to be created @param entityPath path of entity @return a CompletableFuture representing the pending creating of IMessageSender instance
[ "Creates", "a", "message", "sender", "asynchronously", "to", "the", "entity", "using", "the", "{" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L187-L189
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java
Tanimoto.calculate
public static float calculate(double[] features1, double[] features2) throws CDKException { """ Evaluates the continuous Tanimoto coefficient for two real valued vectors. <p> @param features1 The first feature vector @param features2 The second feature vector @return The continuous Tanimoto coefficient @throw...
java
public static float calculate(double[] features1, double[] features2) throws CDKException { if (features1.length != features2.length) { throw new CDKException("Features vectors must be of the same length"); } int n = features1.length; double ab = 0.0; double a2 = 0....
[ "public", "static", "float", "calculate", "(", "double", "[", "]", "features1", ",", "double", "[", "]", "features2", ")", "throws", "CDKException", "{", "if", "(", "features1", ".", "length", "!=", "features2", ".", "length", ")", "{", "throw", "new", "...
Evaluates the continuous Tanimoto coefficient for two real valued vectors. <p> @param features1 The first feature vector @param features2 The second feature vector @return The continuous Tanimoto coefficient @throws org.openscience.cdk.exception.CDKException if the features are not of the same length
[ "Evaluates", "the", "continuous", "Tanimoto", "coefficient", "for", "two", "real", "valued", "vectors", ".", "<p", ">" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java#L122-L139
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/Controller.java
Controller.sendCookie
public void sendCookie(String name, String value) { """ Sends cookie to browse with response. @param name name of cookie @param value value of cookie. """ context.addCookie(Cookie.builder(name, value).build()); }
java
public void sendCookie(String name, String value) { context.addCookie(Cookie.builder(name, value).build()); }
[ "public", "void", "sendCookie", "(", "String", "name", ",", "String", "value", ")", "{", "context", ".", "addCookie", "(", "Cookie", ".", "builder", "(", "name", ",", "value", ")", ".", "build", "(", ")", ")", ";", "}" ]
Sends cookie to browse with response. @param name name of cookie @param value value of cookie.
[ "Sends", "cookie", "to", "browse", "with", "response", "." ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/Controller.java#L1273-L1275
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeRootElement.java
TreeRootElement.changeSelected
public void changeSelected(String selectNode, ServletRequest request) { """ Change the node that is selected. This is an optimization were the root node can track which node is currently selected so it can unselect that node instead of searching the whole tree to find the selected node. @param selectNode "...
java
public void changeSelected(String selectNode, ServletRequest request) { _selectedNode = TreeHelpers.changeSelected(this, _selectedNode, selectNode, request); }
[ "public", "void", "changeSelected", "(", "String", "selectNode", ",", "ServletRequest", "request", ")", "{", "_selectedNode", "=", "TreeHelpers", ".", "changeSelected", "(", "this", ",", "_selectedNode", ",", "selectNode", ",", "request", ")", ";", "}" ]
Change the node that is selected. This is an optimization were the root node can track which node is currently selected so it can unselect that node instead of searching the whole tree to find the selected node. @param selectNode
[ "Change", "the", "node", "that", "is", "selected", ".", "This", "is", "an", "optimization", "were", "the", "root", "node", "can", "track", "which", "node", "is", "currently", "selected", "so", "it", "can", "unselect", "that", "node", "instead", "of", "sear...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeRootElement.java#L61-L64
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.productUpdateContSign
public JSONObject productUpdateContSign(String contSign, HashMap<String, String> options) { """ 商品检索—更新接口 **更新图库中图片的摘要和分类信息(具体变量为brief、class_id1/class_id2)** @param contSign - 图片签名 @param options - 可选参数对象,key: value都为string类型 options - options列表: brief 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} class_id1...
java
public JSONObject productUpdateContSign(String contSign, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("cont_sign", contSign); if (options != null) { request.addBody(options); } reques...
[ "public", "JSONObject", "productUpdateContSign", "(", "String", "contSign", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "r...
商品检索—更新接口 **更新图库中图片的摘要和分类信息(具体变量为brief、class_id1/class_id2)** @param contSign - 图片签名 @param options - 可选参数对象,key: value都为string类型 options - options列表: brief 更新的摘要信息,最长256B。样例:{"name":"周杰伦", "id":"666"} class_id1 更新的商品分类1,支持1-60范围内的整数。 class_id2 更新的商品分类2,支持1-60范围内的整数。 @return JSONObject
[ "商品检索—更新接口", "**", "更新图库中图片的摘要和分类信息(具体变量为brief、class_id1", "/", "class_id2)", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L918-L929
google/closure-compiler
src/com/google/javascript/rhino/JSDocInfoBuilder.java
JSDocInfoBuilder.markAnnotation
public void markAnnotation(String annotation, int lineno, int charno) { """ Adds a marker to the current JSDocInfo and populates the marker with the annotation information. """ JSDocInfo.Marker marker = currentInfo.addMarker(); if (marker != null) { JSDocInfo.TrimmedStringPosition position = ...
java
public void markAnnotation(String annotation, int lineno, int charno) { JSDocInfo.Marker marker = currentInfo.addMarker(); if (marker != null) { JSDocInfo.TrimmedStringPosition position = new JSDocInfo.TrimmedStringPosition(); position.setItem(annotation); position.setPositionInform...
[ "public", "void", "markAnnotation", "(", "String", "annotation", ",", "int", "lineno", ",", "int", "charno", ")", "{", "JSDocInfo", ".", "Marker", "marker", "=", "currentInfo", ".", "addMarker", "(", ")", ";", "if", "(", "marker", "!=", "null", ")", "{",...
Adds a marker to the current JSDocInfo and populates the marker with the annotation information.
[ "Adds", "a", "marker", "to", "the", "current", "JSDocInfo", "and", "populates", "the", "marker", "with", "the", "annotation", "information", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/JSDocInfoBuilder.java#L211-L225
alkacon/opencms-core
src/org/opencms/gwt/shared/property/CmsClientProperty.java
CmsClientProperty.getPathValue
public static CmsPathValue getPathValue(CmsClientProperty property, Mode mode) { """ Gets the path value for a property object (which may be null) and a property access mode.<p> @param property the property which values to access @param mode the property access mode @return the path value for the property a...
java
public static CmsPathValue getPathValue(CmsClientProperty property, Mode mode) { if (property != null) { return property.getPathValue(mode); } switch (mode) { case resource: return new CmsPathValue("", PATH_RESOURCE_VALUE); case structure: ...
[ "public", "static", "CmsPathValue", "getPathValue", "(", "CmsClientProperty", "property", ",", "Mode", "mode", ")", "{", "if", "(", "property", "!=", "null", ")", "{", "return", "property", ".", "getPathValue", "(", "mode", ")", ";", "}", "switch", "(", "m...
Gets the path value for a property object (which may be null) and a property access mode.<p> @param property the property which values to access @param mode the property access mode @return the path value for the property and access mode
[ "Gets", "the", "path", "value", "for", "a", "property", "object", "(", "which", "may", "be", "null", ")", "and", "a", "property", "access", "mode", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/shared/property/CmsClientProperty.java#L178-L193
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_TRACK_Image
protected BufferedImage create_TRACK_Image(final int WIDTH, final double FREE_AREA_ANGLE, final double ROTATION_OFFSET, final double MIN_VALUE, final double MAX_VALUE, final double ANGLE_STEP, ...
java
protected BufferedImage create_TRACK_Image(final int WIDTH, final double FREE_AREA_ANGLE, final double ROTATION_OFFSET, final double MIN_VALUE, final double MAX_VALUE, final double ANGLE_STEP, ...
[ "protected", "BufferedImage", "create_TRACK_Image", "(", "final", "int", "WIDTH", ",", "final", "double", "FREE_AREA_ANGLE", ",", "final", "double", "ROTATION_OFFSET", ",", "final", "double", "MIN_VALUE", ",", "final", "double", "MAX_VALUE", ",", "final", "double", ...
Returns the track image with a given values. The gradient will be created by drawing a series of lines and varies the color of the lines. The linewidth will be calculated from the size of the component and from the gaugeType. @param WIDTH @param FREE_AREA_ANGLE @param ROTATION_OFFSET @param MIN_VALUE @param MAX_VALUE @...
[ "Returns", "the", "track", "image", "with", "a", "given", "values", ".", "The", "gradient", "will", "be", "created", "by", "drawing", "a", "series", "of", "lines", "and", "varies", "the", "color", "of", "the", "lines", ".", "The", "linewidth", "will", "b...
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1529-L1542
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/xa/PGXAConnection.java
PGXAConnection.commitOnePhase
private void commitOnePhase(Xid xid) throws XAException { """ <p>Preconditions:</p> <ol> <li>xid must in ended state.</li> </ol> <p>Implementation deficiency preconditions:</p> <ol> <li>this connection must have been used to run the transaction</li> </ol> <p>Postconditions:</p> <ol> <li>Transaction i...
java
private void commitOnePhase(Xid xid) throws XAException { try { // Check preconditions if (xid.equals(preparedXid)) { // TODO: check if the condition should be negated throw new PGXAException(GT.tr("One-phase commit called for xid {0} but connection was prepared with xid {1}", xid, p...
[ "private", "void", "commitOnePhase", "(", "Xid", "xid", ")", "throws", "XAException", "{", "try", "{", "// Check preconditions", "if", "(", "xid", ".", "equals", "(", "preparedXid", ")", ")", "{", "// TODO: check if the condition should be negated", "throw", "new", ...
<p>Preconditions:</p> <ol> <li>xid must in ended state.</li> </ol> <p>Implementation deficiency preconditions:</p> <ol> <li>this connection must have been used to run the transaction</li> </ol> <p>Postconditions:</p> <ol> <li>Transaction is committed</li> </ol>
[ "<p", ">", "Preconditions", ":", "<", "/", "p", ">", "<ol", ">", "<li", ">", "xid", "must", "in", "ended", "state", ".", "<", "/", "li", ">", "<", "/", "ol", ">" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/xa/PGXAConnection.java#L517-L550
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.getOpeningTag
public static String getOpeningTag(String tag, Map<String, String> attributes) { """ Create a string containing a closing tag. @param tag the closing tag to generate. @param attributes the map of attributes @return the opening tag. """ StringBuffer _result = new StringBuffer(); Map<String, String> _...
java
public static String getOpeningTag(String tag, Map<String, String> attributes) { StringBuffer _result = new StringBuffer(); Map<String, String> _attributes = (null != attributes) ? attributes : EMPTY_MAP; return doAppendOpeningTag(_result, tag, _attributes).toString(); }
[ "public", "static", "String", "getOpeningTag", "(", "String", "tag", ",", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "StringBuffer", "_result", "=", "new", "StringBuffer", "(", ")", ";", "Map", "<", "String", ",", "String", ">", "_...
Create a string containing a closing tag. @param tag the closing tag to generate. @param attributes the map of attributes @return the opening tag.
[ "Create", "a", "string", "containing", "a", "closing", "tag", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L593-L598
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriterExtraAdapter.java
JBBPTextWriterExtraAdapter.extractFieldValue
public Object extractFieldValue(final Object instance, final Field field) { """ Auxiliary method to extract field value. @param instance object instance, can be null @param field the filed which value should be extracted, must not be null @return the field value """ JBBPUtils.assertNotNull(field, "...
java
public Object extractFieldValue(final Object instance, final Field field) { JBBPUtils.assertNotNull(field, "Field must not be null"); try { return ReflectUtils.makeAccessible(field).get(instance); } catch (Exception ex) { throw new JBBPException("Can't extract value from field for exception", ex...
[ "public", "Object", "extractFieldValue", "(", "final", "Object", "instance", ",", "final", "Field", "field", ")", "{", "JBBPUtils", ".", "assertNotNull", "(", "field", ",", "\"Field must not be null\"", ")", ";", "try", "{", "return", "ReflectUtils", ".", "makeA...
Auxiliary method to extract field value. @param instance object instance, can be null @param field the filed which value should be extracted, must not be null @return the field value
[ "Auxiliary", "method", "to", "extract", "field", "value", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriterExtraAdapter.java#L97-L104
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/model/ClassDescriptorDef.java
ClassDescriptorDef.cloneCollection
private CollectionDescriptorDef cloneCollection(CollectionDescriptorDef collDef, String prefix) { """ Clones the given collection. @param collDef The collection descriptor @param prefix A prefix for the name @return The cloned collection """ CollectionDescriptorDef copyCollDef = new CollectionDe...
java
private CollectionDescriptorDef cloneCollection(CollectionDescriptorDef collDef, String prefix) { CollectionDescriptorDef copyCollDef = new CollectionDescriptorDef(collDef, prefix); copyCollDef.setOwner(this); // we remove properties that are only relevant to the class the features are...
[ "private", "CollectionDescriptorDef", "cloneCollection", "(", "CollectionDescriptorDef", "collDef", ",", "String", "prefix", ")", "{", "CollectionDescriptorDef", "copyCollDef", "=", "new", "CollectionDescriptorDef", "(", "collDef", ",", "prefix", ")", ";", "copyCollDef", ...
Clones the given collection. @param collDef The collection descriptor @param prefix A prefix for the name @return The cloned collection
[ "Clones", "the", "given", "collection", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/ClassDescriptorDef.java#L512-L536
Netflix/eureka
eureka-client/src/main/java/com/netflix/discovery/util/DeserializerStringCache.java
DeserializerStringCache.apply
public String apply(final String stringValue, CacheScope cacheScope) { """ returns a String that may be interned at the given scope to reduce heap consumption @param stringValue @param cacheScope @return a possibly interned String """ if (stringValue != null && (lengthLimit < 0 || stringValue.len...
java
public String apply(final String stringValue, CacheScope cacheScope) { if (stringValue != null && (lengthLimit < 0 || stringValue.length() <= lengthLimit)) { return (String) (cacheScope == CacheScope.GLOBAL_SCOPE ? globalCache : applicationCache) .computeIfAbsent(CharBuffer.wrap(...
[ "public", "String", "apply", "(", "final", "String", "stringValue", ",", "CacheScope", "cacheScope", ")", "{", "if", "(", "stringValue", "!=", "null", "&&", "(", "lengthLimit", "<", "0", "||", "stringValue", ".", "length", "(", ")", "<=", "lengthLimit", ")...
returns a String that may be interned at the given scope to reduce heap consumption @param stringValue @param cacheScope @return a possibly interned String
[ "returns", "a", "String", "that", "may", "be", "interned", "at", "the", "given", "scope", "to", "reduce", "heap", "consumption" ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/util/DeserializerStringCache.java#L270-L279
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java
TransformationPerformer.writeObjectToField
private void writeObjectToField(String fieldname, Object value, Object object, Object alternative) throws Exception { """ Writes a value to the object from the field with the given name from either the object parameter or if this parameter is null from the alternative parameter. """ Object tar...
java
private void writeObjectToField(String fieldname, Object value, Object object, Object alternative) throws Exception { Object target = object != null ? object : alternative; try { FieldUtils.writeField(target, fieldname, value, true); } catch (Exception e) { throw ...
[ "private", "void", "writeObjectToField", "(", "String", "fieldname", ",", "Object", "value", ",", "Object", "object", ",", "Object", "alternative", ")", "throws", "Exception", "{", "Object", "target", "=", "object", "!=", "null", "?", "object", ":", "alternati...
Writes a value to the object from the field with the given name from either the object parameter or if this parameter is null from the alternative parameter.
[ "Writes", "a", "value", "to", "the", "object", "from", "the", "field", "with", "the", "given", "name", "from", "either", "the", "object", "parameter", "or", "if", "this", "parameter", "is", "null", "from", "the", "alternative", "parameter", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java#L210-L219
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.unzipFileBytes
@SuppressWarnings("unchecked") public static byte[] unzipFileBytes(File zipFile, Charset charset, String name) { """ 从Zip文件中提取指定的文件为bytes @param zipFile Zip文件 @param charset 编码 @param name 文件名,如果存在于子文件夹中,此文件名必须包含目录名,例如images/aaa.txt @return 文件内容bytes @since 4.1.8 """ ZipFile zipFileObj = null; t...
java
@SuppressWarnings("unchecked") public static byte[] unzipFileBytes(File zipFile, Charset charset, String name) { ZipFile zipFileObj = null; try { zipFileObj = new ZipFile(zipFile, charset); final Enumeration<ZipEntry> em = (Enumeration<ZipEntry>) zipFileObj.entries(); ZipEntry zipEntry = null; w...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "byte", "[", "]", "unzipFileBytes", "(", "File", "zipFile", ",", "Charset", "charset", ",", "String", "name", ")", "{", "ZipFile", "zipFileObj", "=", "null", ";", "try", "{", "zipFileObj...
从Zip文件中提取指定的文件为bytes @param zipFile Zip文件 @param charset 编码 @param name 文件名,如果存在于子文件夹中,此文件名必须包含目录名,例如images/aaa.txt @return 文件内容bytes @since 4.1.8
[ "从Zip文件中提取指定的文件为bytes" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L459-L480
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/rename/RenameFileExtensions.java
RenameFileExtensions.appendSystemtimeToFilename
public static String appendSystemtimeToFilename(final File fileToRename, final Date add2Name) { """ Returns the filename from the given file with the systemtime. @param fileToRename The file. @param add2Name Adds the Date to the Filename. @return Returns the filename from the given file with the systemtim...
java
public static String appendSystemtimeToFilename(final File fileToRename, final Date add2Name) { final String format = "HHmmssSSS"; String sysTime = null; if (null != add2Name) { final DateFormat df = new SimpleDateFormat(format); sysTime = df.format(add2Name); } else { final DateFormat df = new ...
[ "public", "static", "String", "appendSystemtimeToFilename", "(", "final", "File", "fileToRename", ",", "final", "Date", "add2Name", ")", "{", "final", "String", "format", "=", "\"HHmmssSSS\"", ";", "String", "sysTime", "=", "null", ";", "if", "(", "null", "!="...
Returns the filename from the given file with the systemtime. @param fileToRename The file. @param add2Name Adds the Date to the Filename. @return Returns the filename from the given file with the systemtime.
[ "Returns", "the", "filename", "from", "the", "given", "file", "with", "the", "systemtime", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/rename/RenameFileExtensions.java#L77-L98
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java
TimeUtils.timeFromSecsSinceEpoch
public static DateTimeValue timeFromSecsSinceEpoch(long secsSinceEpoch) { """ Computes the gregorian time from the number of seconds since the Proleptic Gregorian Epoch. See "Calendrical Calculations", Reingold and Dershowitz. @param secsSinceEpoch the number of seconds since the epoch @return the gregorian ti...
java
public static DateTimeValue timeFromSecsSinceEpoch(long secsSinceEpoch) { // TODO: should we handle -ve years? int secsInDay = (int) (secsSinceEpoch % SECS_PER_DAY); int daysSinceEpoch = (int) (secsSinceEpoch / SECS_PER_DAY); int approx = (int) ((daysSinceEpoch + 10) * 400L / 146097); int year = (daysSinceEpo...
[ "public", "static", "DateTimeValue", "timeFromSecsSinceEpoch", "(", "long", "secsSinceEpoch", ")", "{", "// TODO: should we handle -ve years?", "int", "secsInDay", "=", "(", "int", ")", "(", "secsSinceEpoch", "%", "SECS_PER_DAY", ")", ";", "int", "daysSinceEpoch", "="...
Computes the gregorian time from the number of seconds since the Proleptic Gregorian Epoch. See "Calendrical Calculations", Reingold and Dershowitz. @param secsSinceEpoch the number of seconds since the epoch @return the gregorian time
[ "Computes", "the", "gregorian", "time", "from", "the", "number", "of", "seconds", "since", "the", "Proleptic", "Gregorian", "Epoch", ".", "See", "Calendrical", "Calculations", "Reingold", "and", "Dershowitz", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java#L323-L344
mnlipp/jgrapes
org.jgrapes.http/src/org/jgrapes/http/ResponseCreationSupport.java
ResponseCreationSupport.setMaxAge
public static long setMaxAge(HttpResponse response, int maxAge) { """ Sets the cache control header in the given response. @param response the response @param maxAge the max age @return the value set """ List<Directive> directives = new ArrayList<>(); directives.add(new Directive("max-age"...
java
public static long setMaxAge(HttpResponse response, int maxAge) { List<Directive> directives = new ArrayList<>(); directives.add(new Directive("max-age", maxAge)); response.setField(HttpField.CACHE_CONTROL, directives); return maxAge; }
[ "public", "static", "long", "setMaxAge", "(", "HttpResponse", "response", ",", "int", "maxAge", ")", "{", "List", "<", "Directive", ">", "directives", "=", "new", "ArrayList", "<>", "(", ")", ";", "directives", ".", "add", "(", "new", "Directive", "(", "...
Sets the cache control header in the given response. @param response the response @param maxAge the max age @return the value set
[ "Sets", "the", "cache", "control", "header", "in", "the", "given", "response", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.http/src/org/jgrapes/http/ResponseCreationSupport.java#L343-L348
samskivert/pythagoras
src/main/java/pythagoras/i/Rectangle.java
Rectangle.add
public void add (int px, int py) { """ Expands the bounds of this rectangle to contain the specified point. """ int x1 = Math.min(x, px); int x2 = Math.max(x + width, px); int y1 = Math.min(y, py); int y2 = Math.max(y + height, py); setBounds(x1, y1, x2 - x1, y2 - y1); ...
java
public void add (int px, int py) { int x1 = Math.min(x, px); int x2 = Math.max(x + width, px); int y1 = Math.min(y, py); int y2 = Math.max(y + height, py); setBounds(x1, y1, x2 - x1, y2 - y1); }
[ "public", "void", "add", "(", "int", "px", ",", "int", "py", ")", "{", "int", "x1", "=", "Math", ".", "min", "(", "x", ",", "px", ")", ";", "int", "x2", "=", "Math", ".", "max", "(", "x", "+", "width", ",", "px", ")", ";", "int", "y1", "=...
Expands the bounds of this rectangle to contain the specified point.
[ "Expands", "the", "bounds", "of", "this", "rectangle", "to", "contain", "the", "specified", "point", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/i/Rectangle.java#L140-L146