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
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.beginCreateOrUpdate
public EventSubscriptionInner beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { """ Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @para...
java
public EventSubscriptionInner beginCreateOrUpdate(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).toBlocking().single().body(); }
[ "public", "EventSubscriptionInner", "beginCreateOrUpdate", "(", "String", "scope", ",", "String", "eventSubscriptionName", ",", "EventSubscriptionInner", "eventSubscriptionInfo", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "scope", ",", "eventSubscri...
Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource grou...
[ "Create", "or", "update", "an", "event", "subscription", ".", "Asynchronously", "creates", "a", "new", "event", "subscription", "or", "updates", "an", "existing", "event", "subscription", "based", "on", "the", "specified", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L313-L315
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMultiRoleUsagesAsync
public Observable<Page<UsageInner>> listMultiRoleUsagesAsync(final String resourceGroupName, final String name) { """ Get usage metrics for a multi-role pool of an App Service Environment. Get usage metrics for a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group...
java
public Observable<Page<UsageInner>> listMultiRoleUsagesAsync(final String resourceGroupName, final String name) { return listMultiRoleUsagesWithServiceResponseAsync(resourceGroupName, name) .map(new Func1<ServiceResponse<Page<UsageInner>>, Page<UsageInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "UsageInner", ">", ">", "listMultiRoleUsagesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listMultiRoleUsagesWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Get usage metrics for a multi-role pool of an App Service Environment. Get usage metrics for a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if pa...
[ "Get", "usage", "metrics", "for", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "usage", "metrics", "for", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L3540-L3548
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationHandler.java
WebApplicationHandler.addFilterPathMapping
public FilterHolder addFilterPathMapping(String pathSpec, String filterName, int dispatches) { """ Add a mapping from a pathSpec to a Filter. @param pathSpec The path specification @param filterName The name of the filter (must already be added or defined) @param dispatches An integer formed by the logical OR o...
java
public FilterHolder addFilterPathMapping(String pathSpec, String filterName, int dispatches) { FilterHolder holder = (FilterHolder)_filterMap.get(filterName); if (holder==null) throw new IllegalArgumentException("unknown filter: "+filterName); FilterMapping mapping = new...
[ "public", "FilterHolder", "addFilterPathMapping", "(", "String", "pathSpec", ",", "String", "filterName", ",", "int", "dispatches", ")", "{", "FilterHolder", "holder", "=", "(", "FilterHolder", ")", "_filterMap", ".", "get", "(", "filterName", ")", ";", "if", ...
Add a mapping from a pathSpec to a Filter. @param pathSpec The path specification @param filterName The name of the filter (must already be added or defined) @param dispatches An integer formed by the logical OR of FilterHolder.__REQUEST, FilterHolder.__FORWARD,FilterHolder.__INCLUDE and/or FilterHolder.__ERROR. @retur...
[ "Add", "a", "mapping", "from", "a", "pathSpec", "to", "a", "Filter", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/WebApplicationHandler.java#L123-L132
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/CreatorUtils.java
CreatorUtils.findFirstEncounteredAnnotationsOnAllHierarchy
public static <T extends Annotation> Optional<T> findFirstEncounteredAnnotationsOnAllHierarchy( RebindConfiguration configuration, JClassType type, Class<T> annotation ) { """ Browse all the hierarchy of the type an...
java
public static <T extends Annotation> Optional<T> findFirstEncounteredAnnotationsOnAllHierarchy( RebindConfiguration configuration, JClassType type, Class<T> annotation ) { return findFirstEncounteredAnnotationsOn...
[ "public", "static", "<", "T", "extends", "Annotation", ">", "Optional", "<", "T", ">", "findFirstEncounteredAnnotationsOnAllHierarchy", "(", "RebindConfiguration", "configuration", ",", "JClassType", "type", ",", "Class", "<", "T", ">", "annotation", ")", "{", "re...
Browse all the hierarchy of the type and return the first corresponding annotation it found @param type type @param annotation annotation to find @return the annotation if found, null otherwise @param configuration a {@link com.github.nmorel.gwtjackson.rebind.RebindConfiguration} object. @param <T> a T object.
[ "Browse", "all", "the", "hierarchy", "of", "the", "type", "and", "return", "the", "first", "corresponding", "annotation", "it", "found" ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/CreatorUtils.java#L55-L58
theHilikus/JRoboCom
jrobocom-core/src/main/java/com/github/thehilikus/jrobocom/World.java
World.getBotsCount
public int getBotsCount(int teamId, boolean invert) { """ Get the total number of living robots from or not from a team @param teamId the team to search for @param invert if true, find robots NOT in teamId @return number of robots in the specified group """ int total = 0; for (Robot bot : robotsPosition...
java
public int getBotsCount(int teamId, boolean invert) { int total = 0; for (Robot bot : robotsPosition.keySet()) { if (bot.getData().getTeamId() == teamId) { if (!invert) { total++; } } else { if (invert) { total++; } } } return total; }
[ "public", "int", "getBotsCount", "(", "int", "teamId", ",", "boolean", "invert", ")", "{", "int", "total", "=", "0", ";", "for", "(", "Robot", "bot", ":", "robotsPosition", ".", "keySet", "(", ")", ")", "{", "if", "(", "bot", ".", "getData", "(", "...
Get the total number of living robots from or not from a team @param teamId the team to search for @param invert if true, find robots NOT in teamId @return number of robots in the specified group
[ "Get", "the", "total", "number", "of", "living", "robots", "from", "or", "not", "from", "a", "team" ]
train
https://github.com/theHilikus/JRoboCom/blob/0e31c1ecf1006e35f68c229ff66c37640effffac/jrobocom-core/src/main/java/com/github/thehilikus/jrobocom/World.java#L301-L316
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/image/ContentNegotiationFilter.java
ContentNegotiationFilter.adjustQualityFromImage
private static void adjustQualityFromImage(Map<String, Float> pFormatQuality, BufferedImage pImage) { """ Adjusts source quality settings from image properties. @param pFormatQuality the format to quality mapping @param pImage the image """ // NOTE: The values are all made-up. May need tuning. ...
java
private static void adjustQualityFromImage(Map<String, Float> pFormatQuality, BufferedImage pImage) { // NOTE: The values are all made-up. May need tuning. // If pImage.getColorModel() instanceof IndexColorModel // JPEG qs*=0.6 // If NOT binary or 2 color index // ...
[ "private", "static", "void", "adjustQualityFromImage", "(", "Map", "<", "String", ",", "Float", ">", "pFormatQuality", ",", "BufferedImage", "pImage", ")", "{", "// NOTE: The values are all made-up. May need tuning.\r", "// If pImage.getColorModel() instanceof IndexColorModel\r",...
Adjusts source quality settings from image properties. @param pFormatQuality the format to quality mapping @param pImage the image
[ "Adjusts", "source", "quality", "settings", "from", "image", "properties", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/image/ContentNegotiationFilter.java#L375-L410
molgenis/molgenis
molgenis-core-ui/src/main/java/org/molgenis/core/ui/MolgenisMenuController.java
MolgenisMenuController.forwardMenuPlugin
@SuppressWarnings("squid:S3752") // multiple methods required @RequestMapping( method = { """ Forwards to the specified plugin in the specified menu. This may be a submenu. Only the last two levels of the possibly very deep menu tree are used to construct the URL. @param menuId ID of the menu parent of...
java
@SuppressWarnings("squid:S3752") // multiple methods required @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/{menuId}/{pluginId}/**") public String forwardMenuPlugin( HttpServletRequest request, @Valid @NotNull @PathVariable String menuId, @Valid @NotNull ...
[ "@", "SuppressWarnings", "(", "\"squid:S3752\"", ")", "// multiple methods required", "@", "RequestMapping", "(", "method", "=", "{", "RequestMethod", ".", "GET", ",", "RequestMethod", ".", "POST", "}", ",", "value", "=", "\"/{menuId}/{pluginId}/**\"", ")", "public"...
Forwards to the specified plugin in the specified menu. This may be a submenu. Only the last two levels of the possibly very deep menu tree are used to construct the URL. @param menuId ID of the menu parent of the pluginID @param pluginId ID of the plugin
[ "Forwards", "to", "the", "specified", "plugin", "in", "the", "specified", "menu", ".", "This", "may", "be", "a", "submenu", ".", "Only", "the", "last", "two", "levels", "of", "the", "possibly", "very", "deep", "menu", "tree", "are", "used", "to", "constr...
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-core-ui/src/main/java/org/molgenis/core/ui/MolgenisMenuController.java#L153-L170
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatial/blockAlgebra/BlockConstraintSolver.java
BlockConstraintSolver.extractBoundingBoxesFromSTPs
public BoundingBox extractBoundingBoxesFromSTPs(RectangularCuboidRegion rect) { """ Extracts a specific {@link BoundingBox} from the domain of a {@link RectangularRegion}. @param rect The {@link RectangularRegion} from to extract the {@link BoundingBox}. @return A specific {@link BoundingBox} from the domain of ...
java
public BoundingBox extractBoundingBoxesFromSTPs(RectangularCuboidRegion rect){ Bounds xLB, xUB, yLB, yUB, zLB, zUB; xLB = new Bounds(((AllenInterval)rect.getInternalVariables()[0]).getEST(),((AllenInterval)rect.getInternalVariables()[0]).getLST()); xUB = new Bounds(((AllenInterval)rect.getInternalVariables()[0])...
[ "public", "BoundingBox", "extractBoundingBoxesFromSTPs", "(", "RectangularCuboidRegion", "rect", ")", "{", "Bounds", "xLB", ",", "xUB", ",", "yLB", ",", "yUB", ",", "zLB", ",", "zUB", ";", "xLB", "=", "new", "Bounds", "(", "(", "(", "AllenInterval", ")", "...
Extracts a specific {@link BoundingBox} from the domain of a {@link RectangularRegion}. @param rect The {@link RectangularRegion} from to extract the {@link BoundingBox}. @return A specific {@link BoundingBox} from the domain of a {@link RectangularRegion}.
[ "Extracts", "a", "specific", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/blockAlgebra/BlockConstraintSolver.java#L72-L81
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TasksInner.java
TasksInner.beginCreate
public TaskInner beginCreate(String resourceGroupName, String registryName, String taskName, TaskInner taskCreateParameters) { """ Creates a task for a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param regis...
java
public TaskInner beginCreate(String resourceGroupName, String registryName, String taskName, TaskInner taskCreateParameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, taskName, taskCreateParameters).toBlocking().single().body(); }
[ "public", "TaskInner", "beginCreate", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "taskName", ",", "TaskInner", "taskCreateParameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registr...
Creates a task for a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param taskName The name of the container registry task. @param taskCreateParameters The parame...
[ "Creates", "a", "task", "for", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TasksInner.java#L415-L417
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLInsertClause.java
AbstractSQLInsertClause.addBatch
@WithBridgeMethods(value = SQLInsertClause.class, castRequired = true) public C addBatch() { """ Add the current state of bindings as a batch item @return the current object """ if (subQueryBuilder != null) { subQuery = subQueryBuilder.select(values.toArray(new Expression[values.size...
java
@WithBridgeMethods(value = SQLInsertClause.class, castRequired = true) public C addBatch() { if (subQueryBuilder != null) { subQuery = subQueryBuilder.select(values.toArray(new Expression[values.size()])).clone(); values.clear(); } batches.add(new SQLInsertBatch(colum...
[ "@", "WithBridgeMethods", "(", "value", "=", "SQLInsertClause", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "addBatch", "(", ")", "{", "if", "(", "subQueryBuilder", "!=", "null", ")", "{", "subQuery", "=", "subQueryBuilder", ".", "s...
Add the current state of bindings as a batch item @return the current object
[ "Add", "the", "current", "state", "of", "bindings", "as", "a", "batch", "item" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/dml/AbstractSQLInsertClause.java#L125-L136
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java
DTMDefaultBase.getExpandedTypeID
public int getExpandedTypeID(String namespace, String localName, int type) { """ Given an expanded name, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. Any additional nodes that are created that have this expanded name will use...
java
public int getExpandedTypeID(String namespace, String localName, int type) { ExpandedNameTable ent = m_expandedNameTable; return ent.getExpandedTypeID(namespace, localName, type); }
[ "public", "int", "getExpandedTypeID", "(", "String", "namespace", ",", "String", "localName", ",", "int", "type", ")", "{", "ExpandedNameTable", "ent", "=", "m_expandedNameTable", ";", "return", "ent", ".", "getExpandedTypeID", "(", "namespace", ",", "localName", ...
Given an expanded name, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. Any additional nodes that are created that have this expanded name will use this ID. @param type The simple type, i.e. one of ELEMENT, ATTRIBUTE, etc. @param name...
[ "Given", "an", "expanded", "name", "return", "an", "ID", ".", "If", "the", "expanded", "-", "name", "does", "not", "exist", "in", "the", "internal", "tables", "the", "entry", "will", "be", "created", "and", "the", "ID", "will", "be", "returned", ".", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1704-L1710
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/query/StructuredQueryBuilder.java
StructuredQueryBuilder.geoJSONProperty
public GeospatialIndex geoJSONProperty(JSONProperty parent, JSONProperty jsonProperty) { """ Identifies a parent json property with a child json property whose text has the latitude and longitude coordinates to match with a geospatial query. @param parent the parent of the json property with the coordinates ...
java
public GeospatialIndex geoJSONProperty(JSONProperty parent, JSONProperty jsonProperty) { if ( parent == null ) throw new IllegalArgumentException("parent cannot be null"); if ( jsonProperty == null ) throw new IllegalArgumentException("jsonProperty cannot be null"); return new GeoJSONPropertyImpl(parent, js...
[ "public", "GeospatialIndex", "geoJSONProperty", "(", "JSONProperty", "parent", ",", "JSONProperty", "jsonProperty", ")", "{", "if", "(", "parent", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"parent cannot be null\"", ")", ";", "if", "(", ...
Identifies a parent json property with a child json property whose text has the latitude and longitude coordinates to match with a geospatial query. @param parent the parent of the json property with the coordinates @param jsonProperty the json property containing the geospatial coordinates @return the specifi...
[ "Identifies", "a", "parent", "json", "property", "with", "a", "child", "json", "property", "whose", "text", "has", "the", "latitude", "and", "longitude", "coordinates", "to", "match", "with", "a", "geospatial", "query", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/query/StructuredQueryBuilder.java#L844-L848
Blazebit/blaze-utils
blaze-ee-utils/src/main/java/com/blazebit/cdi/CdiUtils.java
CdiUtils.getBean
public static <T> T getBean(BeanManager bm, Class<T> clazz) { """ Retrieves the bean for the given class from the given bean manager qualified with #{@link Default}. @param <T> The type of the bean to look for @param bm The bean manager which should be used for the lookup @param clazz The class of the b...
java
public static <T> T getBean(BeanManager bm, Class<T> clazz) { return getBean(bm, clazz, (Annotation[]) null); }
[ "public", "static", "<", "T", ">", "T", "getBean", "(", "BeanManager", "bm", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "getBean", "(", "bm", ",", "clazz", ",", "(", "Annotation", "[", "]", ")", "null", ")", ";", "}" ]
Retrieves the bean for the given class from the given bean manager qualified with #{@link Default}. @param <T> The type of the bean to look for @param bm The bean manager which should be used for the lookup @param clazz The class of the bean to look for @return The bean instance if found, otherwise null
[ "Retrieves", "the", "bean", "for", "the", "given", "class", "from", "the", "given", "bean", "manager", "qualified", "with", "#", "{", "@link", "Default", "}", "." ]
train
https://github.com/Blazebit/blaze-utils/blob/3e35a694a8f71d515aad066196acd523994d6aaa/blaze-ee-utils/src/main/java/com/blazebit/cdi/CdiUtils.java#L80-L82
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemcpy
public static int cudaMemcpy(Pointer dst, Pointer src, long count, int cudaMemcpyKind_kind) { """ Copies data between host and device. <pre> cudaError_t cudaMemcpy ( void* dst, const void* src, size_t count, cudaMemcpyKind kind ) </pre> <div> <p>Copies data between host and device. Copies <tt>count</tt...
java
public static int cudaMemcpy(Pointer dst, Pointer src, long count, int cudaMemcpyKind_kind) { return checkResult(cudaMemcpyNative(dst, src, count, cudaMemcpyKind_kind)); }
[ "public", "static", "int", "cudaMemcpy", "(", "Pointer", "dst", ",", "Pointer", "src", ",", "long", "count", ",", "int", "cudaMemcpyKind_kind", ")", "{", "return", "checkResult", "(", "cudaMemcpyNative", "(", "dst", ",", "src", ",", "count", ",", "cudaMemcpy...
Copies data between host and device. <pre> cudaError_t cudaMemcpy ( void* dst, const void* src, size_t count, cudaMemcpyKind kind ) </pre> <div> <p>Copies data between host and device. Copies <tt>count</tt> bytes from the memory area pointed to by <tt>src</tt> to the memory area pointed to by <tt>dst</tt>, where <tt>k...
[ "Copies", "data", "between", "host", "and", "device", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L4611-L4614
logic-ng/LogicNG
src/main/java/org/logicng/cardinalityconstraints/CCEncoder.java
CCEncoder.encodeIncremental
public Pair<ImmutableFormulaList, CCIncrementalData> encodeIncremental(final PBConstraint cc) { """ Encodes an incremental cardinality constraint and returns its encoding. @param cc the cardinality constraint @return the encoding of the constraint and the incremental data """ final EncodingResult result ...
java
public Pair<ImmutableFormulaList, CCIncrementalData> encodeIncremental(final PBConstraint cc) { final EncodingResult result = EncodingResult.resultForFormula(f); final CCIncrementalData incData = this.encodeIncremental(cc, result); return new Pair<>(new ImmutableFormulaList(FType.AND, result.result()), incD...
[ "public", "Pair", "<", "ImmutableFormulaList", ",", "CCIncrementalData", ">", "encodeIncremental", "(", "final", "PBConstraint", "cc", ")", "{", "final", "EncodingResult", "result", "=", "EncodingResult", ".", "resultForFormula", "(", "f", ")", ";", "final", "CCIn...
Encodes an incremental cardinality constraint and returns its encoding. @param cc the cardinality constraint @return the encoding of the constraint and the incremental data
[ "Encodes", "an", "incremental", "cardinality", "constraint", "and", "returns", "its", "encoding", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/cardinalityconstraints/CCEncoder.java#L140-L144
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getAttributes
@Override public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { """ Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog. """...
java
@Override public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getAttributes", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "typeNamePattern", ",", "String", "attributeNamePattern", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "...
Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog.
[ "Retrieves", "a", "description", "of", "the", "given", "attribute", "of", "the", "given", "type", "for", "a", "user", "-", "defined", "type", "(", "UDT", ")", "that", "is", "available", "in", "the", "given", "schema", "and", "catalog", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L139-L144
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.getOffsetUnsafe
public static long getOffsetUnsafe(DataBuffer shapeInformation, int row, int col) { """ Identical to {@link Shape#getOffset(DataBuffer, int, int)} but without input validation on array rank """ long offset = 0; int size_0 = sizeUnsafe(shapeInformation, 0); int size_1 = sizeUnsafe(shapeI...
java
public static long getOffsetUnsafe(DataBuffer shapeInformation, int row, int col) { long offset = 0; int size_0 = sizeUnsafe(shapeInformation, 0); int size_1 = sizeUnsafe(shapeInformation, 1); if (row >= size_0 || col >= size_1) throw new IllegalArgumentException("Invalid ind...
[ "public", "static", "long", "getOffsetUnsafe", "(", "DataBuffer", "shapeInformation", ",", "int", "row", ",", "int", "col", ")", "{", "long", "offset", "=", "0", ";", "int", "size_0", "=", "sizeUnsafe", "(", "shapeInformation", ",", "0", ")", ";", "int", ...
Identical to {@link Shape#getOffset(DataBuffer, int, int)} but without input validation on array rank
[ "Identical", "to", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L1002-L1016
graylog-labs/syslog4j-graylog2
src/main/java/org/graylog2/syslog4j/Syslog.java
Syslog.getInstance
public static final SyslogIF getInstance(String protocol) throws SyslogRuntimeException { """ Use getInstance(protocol) as the starting point for Syslog4j. @param protocol - the Syslog protocol to use, e.g. "udp", "tcp", "unix_syslog", "unix_socket", or a custom protocol @return Returns an instance of SyslogIF...
java
public static final SyslogIF getInstance(String protocol) throws SyslogRuntimeException { String _protocol = protocol.toLowerCase(); if (instances.containsKey(_protocol)) { return (SyslogIF) instances.get(_protocol); } else { StringBuffer message = new StringBuff...
[ "public", "static", "final", "SyslogIF", "getInstance", "(", "String", "protocol", ")", "throws", "SyslogRuntimeException", "{", "String", "_protocol", "=", "protocol", ".", "toLowerCase", "(", ")", ";", "if", "(", "instances", ".", "containsKey", "(", "_protoco...
Use getInstance(protocol) as the starting point for Syslog4j. @param protocol - the Syslog protocol to use, e.g. "udp", "tcp", "unix_syslog", "unix_socket", or a custom protocol @return Returns an instance of SyslogIF. @throws SyslogRuntimeException
[ "Use", "getInstance", "(", "protocol", ")", "as", "the", "starting", "point", "for", "Syslog4j", "." ]
train
https://github.com/graylog-labs/syslog4j-graylog2/blob/374bc20d77c3aaa36a68bec5125dd82ce0a88aab/src/main/java/org/graylog2/syslog4j/Syslog.java#L99-L125
jenkinsci/jenkins
core/src/main/java/hudson/model/queue/AbstractQueueSorterImpl.java
AbstractQueueSorterImpl.compare
public int compare(BuildableItem lhs, BuildableItem rhs) { """ Override this method to provide the ordering of the sort. <p> if lhs should be build before rhs, return a negative value. Or put another way, think of the comparison as a process of converting a {@link BuildableItem} into a number, then doing num(...
java
public int compare(BuildableItem lhs, BuildableItem rhs) { return compare(lhs.buildableStartMilliseconds,rhs.buildableStartMilliseconds); }
[ "public", "int", "compare", "(", "BuildableItem", "lhs", ",", "BuildableItem", "rhs", ")", "{", "return", "compare", "(", "lhs", ".", "buildableStartMilliseconds", ",", "rhs", ".", "buildableStartMilliseconds", ")", ";", "}" ]
Override this method to provide the ordering of the sort. <p> if lhs should be build before rhs, return a negative value. Or put another way, think of the comparison as a process of converting a {@link BuildableItem} into a number, then doing num(lhs)-num(rhs). <p> The default implementation does FIFO.
[ "Override", "this", "method", "to", "provide", "the", "ordering", "of", "the", "sort", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/queue/AbstractQueueSorterImpl.java#L31-L33
jenkinsci/jenkins
core/src/main/java/jenkins/util/SystemProperties.java
SystemProperties.getBoolean
public static boolean getBoolean(String name, boolean def) { """ Returns {@code true} if the system property named by the argument exists and is equal to the string {@code "true"}, or a default value. If the system property does not exist, return {@code "true"} if a property by this name exists in the {@link Se...
java
public static boolean getBoolean(String name, boolean def) { String v = getString(name); if (v != null) { return Boolean.parseBoolean(v); } return def; }
[ "public", "static", "boolean", "getBoolean", "(", "String", "name", ",", "boolean", "def", ")", "{", "String", "v", "=", "getString", "(", "name", ")", ";", "if", "(", "v", "!=", "null", ")", "{", "return", "Boolean", ".", "parseBoolean", "(", "v", "...
Returns {@code true} if the system property named by the argument exists and is equal to the string {@code "true"}, or a default value. If the system property does not exist, return {@code "true"} if a property by this name exists in the {@link ServletContext} and is equal to the string {@code "true"}. If that property...
[ "Returns", "{", "@code", "true", "}", "if", "the", "system", "property", "named", "by", "the", "argument", "exists", "and", "is", "equal", "to", "the", "string", "{", "@code", "true", "}", "or", "a", "default", "value", ".", "If", "the", "system", "pro...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/SystemProperties.java#L294-L301
pebble/pebble-android-sdk
PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/PebbleKit.java
PebbleKit.registerReceivedAckHandler
public static BroadcastReceiver registerReceivedAckHandler(final Context context, final PebbleAckReceiver receiver) { """ A convenience function to assist in programatically registering a broadcast receiver for the 'RECEIVE_ACK' intent. To avoid le...
java
public static BroadcastReceiver registerReceivedAckHandler(final Context context, final PebbleAckReceiver receiver) { return registerBroadcastReceiverInternal(context, INTENT_APP_RECEIVE_ACK, receiver); }
[ "public", "static", "BroadcastReceiver", "registerReceivedAckHandler", "(", "final", "Context", "context", ",", "final", "PebbleAckReceiver", "receiver", ")", "{", "return", "registerBroadcastReceiverInternal", "(", "context", ",", "INTENT_APP_RECEIVE_ACK", ",", "receiver",...
A convenience function to assist in programatically registering a broadcast receiver for the 'RECEIVE_ACK' intent. To avoid leaking memory, activities registering BroadcastReceivers <em>must</em> unregister them in the Activity's {@link android.app.Activity#onPause()} method. @param context The context in which to re...
[ "A", "convenience", "function", "to", "assist", "in", "programatically", "registering", "a", "broadcast", "receiver", "for", "the", "RECEIVE_ACK", "intent", "." ]
train
https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/PebbleKit.java#L448-L451
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java
PackagedProgramUtils.createJobGraph
public static JobGraph createJobGraph( PackagedProgram packagedProgram, Configuration configuration, int defaultParallelism) throws ProgramInvocationException { """ Creates a {@link JobGraph} with a random {@link JobID} from the given {@link PackagedProgram}. @param packagedProgram to extract the JobGrap...
java
public static JobGraph createJobGraph( PackagedProgram packagedProgram, Configuration configuration, int defaultParallelism) throws ProgramInvocationException { return createJobGraph(packagedProgram, configuration, defaultParallelism, null); }
[ "public", "static", "JobGraph", "createJobGraph", "(", "PackagedProgram", "packagedProgram", ",", "Configuration", "configuration", ",", "int", "defaultParallelism", ")", "throws", "ProgramInvocationException", "{", "return", "createJobGraph", "(", "packagedProgram", ",", ...
Creates a {@link JobGraph} with a random {@link JobID} from the given {@link PackagedProgram}. @param packagedProgram to extract the JobGraph from @param configuration to use for the optimizer and job graph generator @param defaultParallelism for the JobGraph @return JobGraph extracted from the PackagedProgram @throws...
[ "Creates", "a", "{", "@link", "JobGraph", "}", "with", "a", "random", "{", "@link", "JobID", "}", "from", "the", "given", "{", "@link", "PackagedProgram", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java#L118-L123
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_menu_menuId_entry_entryId_GET
public OvhOvhPabxMenuEntry billingAccount_ovhPabx_serviceName_menu_menuId_entry_entryId_GET(String billingAccount, String serviceName, Long menuId, Long entryId) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId} @param ...
java
public OvhOvhPabxMenuEntry billingAccount_ovhPabx_serviceName_menu_menuId_entry_entryId_GET(String billingAccount, String serviceName, Long menuId, Long entryId) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}"; StringBuilder sb = path(qPath, bill...
[ "public", "OvhOvhPabxMenuEntry", "billingAccount_ovhPabx_serviceName_menu_menuId_entry_entryId_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "menuId", ",", "Long", "entryId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\...
Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param menuId [required] @param entryId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7492-L7497
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java
ToHTMLStream.addUniqueAttribute
public void addUniqueAttribute(String name, String value, int flags) throws SAXException { """ This method is used to add an attribute to the currently open element. The caller has guaranted that this attribute is unique, which means that it not been seen before and will not be seen again. @param name...
java
public void addUniqueAttribute(String name, String value, int flags) throws SAXException { try { final java.io.Writer writer = m_writer; if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt) { // "flags" has indicated that the c...
[ "public", "void", "addUniqueAttribute", "(", "String", "name", ",", "String", "value", ",", "int", "flags", ")", "throws", "SAXException", "{", "try", "{", "final", "java", ".", "io", ".", "Writer", "writer", "=", "m_writer", ";", "if", "(", "(", "flags"...
This method is used to add an attribute to the currently open element. The caller has guaranted that this attribute is unique, which means that it not been seen before and will not be seen again. @param name the qualified name of the attribute @param value the value of the attribute which can contain only ASCII printa...
[ "This", "method", "is", "used", "to", "add", "an", "attribute", "to", "the", "currently", "open", "element", ".", "The", "caller", "has", "guaranted", "that", "this", "attribute", "is", "unique", "which", "means", "that", "it", "not", "been", "seen", "befo...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java#L1930-L1974
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantUTFInfo.java
ConstantUTFInfo.make
static ConstantUTFInfo make(ConstantPool cp, String str) { """ Will return either a new ConstantUTFInfo object or one already in the constant pool. If it is a new ConstantUTFInfo, it will be inserted into the pool. """ ConstantInfo ci = new ConstantUTFInfo(str); return (ConstantUTFInfo)cp.add...
java
static ConstantUTFInfo make(ConstantPool cp, String str) { ConstantInfo ci = new ConstantUTFInfo(str); return (ConstantUTFInfo)cp.addConstant(ci); }
[ "static", "ConstantUTFInfo", "make", "(", "ConstantPool", "cp", ",", "String", "str", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantUTFInfo", "(", "str", ")", ";", "return", "(", "ConstantUTFInfo", ")", "cp", ".", "addConstant", "(", "ci", ")", ";",...
Will return either a new ConstantUTFInfo object or one already in the constant pool. If it is a new ConstantUTFInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantUTFInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantUTFInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantUTFInfo.java#L35-L38
zandero/http
src/main/java/com/zandero/http/HttpUtils.java
HttpUtils.executeAsync
public static void executeAsync(Executor executor, HttpRequestBase request, FutureCallback<HttpResponse> callback) { """ Step 2. execute request asynchronously @param executor thread executor to be used @param request to be executed @param callback to be invoked when request is completed or failes """ ...
java
public static void executeAsync(Executor executor, HttpRequestBase request, FutureCallback<HttpResponse> callback) { try { executor.execute(new AsyncHttpCall(request, callback)); } catch (Exception e) { log.error("Failed to execute asynchronously: " + request.getMethod() + " " + request.getURI().toString()...
[ "public", "static", "void", "executeAsync", "(", "Executor", "executor", ",", "HttpRequestBase", "request", ",", "FutureCallback", "<", "HttpResponse", ">", "callback", ")", "{", "try", "{", "executor", ".", "execute", "(", "new", "AsyncHttpCall", "(", "request"...
Step 2. execute request asynchronously @param executor thread executor to be used @param request to be executed @param callback to be invoked when request is completed or failes
[ "Step", "2", ".", "execute", "request", "asynchronously" ]
train
https://github.com/zandero/http/blob/909eb879f1193adf24545360c3b76bd813865f65/src/main/java/com/zandero/http/HttpUtils.java#L304-L312
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/HBaseUtils.java
HBaseUtils.count
@Override public long count(String tableName, String familyName, XPath condition) throws IOException { """ Gets a number of record of tableName matching condition @param tableName the table name @param familyName the family @param condition to match @throws IOException """ logger.debug("NATIVE Begin c...
java
@Override public long count(String tableName, String familyName, XPath condition) throws IOException { logger.debug("NATIVE Begin count"); // clone the current conf org.apache.hadoop.conf.Configuration customConf = new org.apache.hadoop.conf.Configuration(super.getHbcfg()); // Increase RPC timeout, in case of a...
[ "@", "Override", "public", "long", "count", "(", "String", "tableName", ",", "String", "familyName", ",", "XPath", "condition", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"NATIVE Begin count\"", ")", ";", "// clone the current conf", "org", ...
Gets a number of record of tableName matching condition @param tableName the table name @param familyName the family @param condition to match @throws IOException
[ "Gets", "a", "number", "of", "record", "of", "tableName", "matching", "condition" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/HBaseUtils.java#L246-L272
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/AbstractDependenceMeasure.java
AbstractDependenceMeasure.size
protected static <A> int size(NumberArrayAdapter<?, A> adapter, Collection<? extends A> data) { """ Validate the length of the two data sets (must be the same, and non-zero) @param adapter Data adapter @param data Data sets @param <A> First array type """ if(data.size() < 2) { throw new IllegalA...
java
protected static <A> int size(NumberArrayAdapter<?, A> adapter, Collection<? extends A> data) { if(data.size() < 2) { throw new IllegalArgumentException("Need at least two axes to compute dependence measures."); } Iterator<? extends A> iter = data.iterator(); final int len = adapter.size(iter.next...
[ "protected", "static", "<", "A", ">", "int", "size", "(", "NumberArrayAdapter", "<", "?", ",", "A", ">", "adapter", ",", "Collection", "<", "?", "extends", "A", ">", "data", ")", "{", "if", "(", "data", ".", "size", "(", ")", "<", "2", ")", "{", ...
Validate the length of the two data sets (must be the same, and non-zero) @param adapter Data adapter @param data Data sets @param <A> First array type
[ "Validate", "the", "length", "of", "the", "two", "data", "sets", "(", "must", "be", "the", "same", "and", "non", "-", "zero", ")" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/AbstractDependenceMeasure.java#L203-L218
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_http_route_GET
public ArrayList<Long> serviceName_http_route_GET(String serviceName, Long frontendId) throws IOException { """ HTTP routes for this iplb REST: GET /ipLoadbalancing/{serviceName}/http/route @param frontendId [required] Filter the value of frontendId property (=) @param serviceName [required] The internal name...
java
public ArrayList<Long> serviceName_http_route_GET(String serviceName, Long frontendId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/http/route"; StringBuilder sb = path(qPath, serviceName); query(sb, "frontendId", frontendId); String resp = exec(qPath, "GET", sb.toString(), null); retur...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_http_route_GET", "(", "String", "serviceName", ",", "Long", "frontendId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/http/route\"", ";", "StringBuilder", "sb", "=", ...
HTTP routes for this iplb REST: GET /ipLoadbalancing/{serviceName}/http/route @param frontendId [required] Filter the value of frontendId property (=) @param serviceName [required] The internal name of your IP load balancing
[ "HTTP", "routes", "for", "this", "iplb" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L102-L108
apiman/apiman
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/GatewayServlet.java
GatewayServlet.getApiKey
protected String getApiKey(HttpServletRequest request, QueryMap queryParams) { """ Gets the API Key from the request. The API key can be passed either via a custom http request header called X-API-Key or else by a query parameter in the URL called apikey. @param request the inbound request @param queryParams ...
java
protected String getApiKey(HttpServletRequest request, QueryMap queryParams) { String apiKey = request.getHeader("X-API-Key"); //$NON-NLS-1$ if (apiKey == null || apiKey.trim().length() == 0) { apiKey = queryParams.get("apikey"); //$NON-NLS-1$ } return apiKey; }
[ "protected", "String", "getApiKey", "(", "HttpServletRequest", "request", ",", "QueryMap", "queryParams", ")", "{", "String", "apiKey", "=", "request", ".", "getHeader", "(", "\"X-API-Key\"", ")", ";", "//$NON-NLS-1$", "if", "(", "apiKey", "==", "null", "||", ...
Gets the API Key from the request. The API key can be passed either via a custom http request header called X-API-Key or else by a query parameter in the URL called apikey. @param request the inbound request @param queryParams the inbound request query params @return the api key or null if not found
[ "Gets", "the", "API", "Key", "from", "the", "request", ".", "The", "API", "key", "can", "be", "passed", "either", "via", "a", "custom", "http", "request", "header", "called", "X", "-", "API", "-", "Key", "or", "else", "by", "a", "query", "parameter", ...
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/GatewayServlet.java#L250-L256
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java
MariaDbPooledConnection.fireConnectionErrorOccured
public void fireConnectionErrorOccured(SQLException ex) { """ Fire connection error to listening listeners. @param ex exception """ ConnectionEvent event = new ConnectionEvent(this, ex); for (ConnectionEventListener listener : connectionEventListeners) { listener.connectionErrorOccurred(event)...
java
public void fireConnectionErrorOccured(SQLException ex) { ConnectionEvent event = new ConnectionEvent(this, ex); for (ConnectionEventListener listener : connectionEventListeners) { listener.connectionErrorOccurred(event); } }
[ "public", "void", "fireConnectionErrorOccured", "(", "SQLException", "ex", ")", "{", "ConnectionEvent", "event", "=", "new", "ConnectionEvent", "(", "this", ",", "ex", ")", ";", "for", "(", "ConnectionEventListener", "listener", ":", "connectionEventListeners", ")",...
Fire connection error to listening listeners. @param ex exception
[ "Fire", "connection", "error", "to", "listening", "listeners", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbPooledConnection.java#L228-L233
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaConsumerMetrics.java
KafkaConsumerMetrics.registerNotificationListener
private void registerNotificationListener(String type, BiConsumer<ObjectName, Tags> perObject) { """ This notification listener should remain indefinitely since new Kafka consumers can be added at any time. @param type The Kafka JMX type to listen for. @param perObject Metric registration handler when a n...
java
private void registerNotificationListener(String type, BiConsumer<ObjectName, Tags> perObject) { NotificationListener notificationListener = (notification, handback) -> { MBeanServerNotification mbs = (MBeanServerNotification) notification; ObjectName o = mbs.getMBeanName(); ...
[ "private", "void", "registerNotificationListener", "(", "String", "type", ",", "BiConsumer", "<", "ObjectName", ",", "Tags", ">", "perObject", ")", "{", "NotificationListener", "notificationListener", "=", "(", "notification", ",", "handback", ")", "->", "{", "MBe...
This notification listener should remain indefinitely since new Kafka consumers can be added at any time. @param type The Kafka JMX type to listen for. @param perObject Metric registration handler when a new MBean is created.
[ "This", "notification", "listener", "should", "remain", "indefinitely", "since", "new", "Kafka", "consumers", "can", "be", "added", "at", "any", "time", "." ]
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaConsumerMetrics.java#L253-L278
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/ngmf/util/cosu/luca/ParameterData.java
ParameterData.setStat
public void setStat(double[] dataValue, int calibrationType, boolean[] calibrate) { """ /* Sets the parameter values, the type of calibration, and the calibration flag. Also, the mean of the parameter values is calculated, and the max and min value of the parameter values are determined. """ this.dat...
java
public void setStat(double[] dataValue, int calibrationType, boolean[] calibrate) { this.data = dataValue; this.calibrationType = calibrationType; this.calibrationFlag = calibrate; calibrationDataSize = 0; for (int i = 0; i < this.calibrationFlag.length; i++) { if (c...
[ "public", "void", "setStat", "(", "double", "[", "]", "dataValue", ",", "int", "calibrationType", ",", "boolean", "[", "]", "calibrate", ")", "{", "this", ".", "data", "=", "dataValue", ";", "this", ".", "calibrationType", "=", "calibrationType", ";", "thi...
/* Sets the parameter values, the type of calibration, and the calibration flag. Also, the mean of the parameter values is calculated, and the max and min value of the parameter values are determined.
[ "/", "*", "Sets", "the", "parameter", "values", "the", "type", "of", "calibration", "and", "the", "calibration", "flag", ".", "Also", "the", "mean", "of", "the", "parameter", "values", "is", "calculated", "and", "the", "max", "and", "min", "value", "of", ...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/ngmf/util/cosu/luca/ParameterData.java#L202-L218
codelibs/jcifs
src/main/java/jcifs/smb1/Config.java
Config.getBoolean
public static boolean getBoolean( String key, boolean def ) { """ Retrieve a boolean value. If the property is not found, the value of <code>def</code> is returned. """ String b = getProperty( key ); if( b != null ) { def = b.toLowerCase().equals( "true" ); } return ...
java
public static boolean getBoolean( String key, boolean def ) { String b = getProperty( key ); if( b != null ) { def = b.toLowerCase().equals( "true" ); } return def; }
[ "public", "static", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "def", ")", "{", "String", "b", "=", "getProperty", "(", "key", ")", ";", "if", "(", "b", "!=", "null", ")", "{", "def", "=", "b", ".", "toLowerCase", "(", ")", ".",...
Retrieve a boolean value. If the property is not found, the value of <code>def</code> is returned.
[ "Retrieve", "a", "boolean", "value", ".", "If", "the", "property", "is", "not", "found", "the", "value", "of", "<code", ">", "def<", "/", "code", ">", "is", "returned", "." ]
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/Config.java#L313-L319
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java
ServiceRegistry.addDynamicService
public void addDynamicService(String serviceInterface, String className) { """ Add Dynamic Java Registered Service class names for each service @param serviceInterface @param className """ if (dynamicServices.containsKey(serviceInterface)) { dynamicServices.get(serviceInterface).add(class...
java
public void addDynamicService(String serviceInterface, String className) { if (dynamicServices.containsKey(serviceInterface)) { dynamicServices.get(serviceInterface).add(className); } else { Set<String> classNamesSet = new HashSet<String>(); classNamesSet.add(...
[ "public", "void", "addDynamicService", "(", "String", "serviceInterface", ",", "String", "className", ")", "{", "if", "(", "dynamicServices", ".", "containsKey", "(", "serviceInterface", ")", ")", "{", "dynamicServices", ".", "get", "(", "serviceInterface", ")", ...
Add Dynamic Java Registered Service class names for each service @param serviceInterface @param className
[ "Add", "Dynamic", "Java", "Registered", "Service", "class", "names", "for", "each", "service" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java#L140-L149
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.runAfter
public static TimerTask runAfter(Timer timer, int delay, final Closure closure) { """ Allows a simple syntax for using timers. This timer will execute the given closure after the given delay. @param timer a timer object @param delay the delay in milliseconds before running the closure code @param closur...
java
public static TimerTask runAfter(Timer timer, int delay, final Closure closure) { TimerTask timerTask = new TimerTask() { public void run() { closure.call(); } }; timer.schedule(timerTask, delay); return timerTask; }
[ "public", "static", "TimerTask", "runAfter", "(", "Timer", "timer", ",", "int", "delay", ",", "final", "Closure", "closure", ")", "{", "TimerTask", "timerTask", "=", "new", "TimerTask", "(", ")", "{", "public", "void", "run", "(", ")", "{", "closure", "....
Allows a simple syntax for using timers. This timer will execute the given closure after the given delay. @param timer a timer object @param delay the delay in milliseconds before running the closure code @param closure the closure to invoke @return The timer task which has been scheduled. @since 1.5.0
[ "Allows", "a", "simple", "syntax", "for", "using", "timers", ".", "This", "timer", "will", "execute", "the", "given", "closure", "after", "the", "given", "delay", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L16651-L16659
samskivert/pythagoras
src/main/java/pythagoras/d/Box.java
Box.intersectionX
protected double intersectionX (IRay3 ray, double x) { """ Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray intersects the box at the plane where x equals the value specified, or returns {@link Float#MAX_VALUE} if there is no such intersection. """ IVector3 origin...
java
protected double intersectionX (IRay3 ray, double x) { IVector3 origin = ray.origin(), dir = ray.direction(); double t = (x - origin.x()) / dir.x(); if (t < 0f) { return Float.MAX_VALUE; } double iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z(); return...
[ "protected", "double", "intersectionX", "(", "IRay3", "ray", ",", "double", "x", ")", "{", "IVector3", "origin", "=", "ray", ".", "origin", "(", ")", ",", "dir", "=", "ray", ".", "direction", "(", ")", ";", "double", "t", "=", "(", "x", "-", "origi...
Helper method for {@link #intersection}. Finds the <code>t</code> value where the ray intersects the box at the plane where x equals the value specified, or returns {@link Float#MAX_VALUE} if there is no such intersection.
[ "Helper", "method", "for", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Box.java#L480-L489
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createSystemLandscapeView
public SystemLandscapeView createSystemLandscapeView(String key, String description) { """ Creates a system landscape view. @param key the key for the view (must be unique) @param description a description of the view @return an SystemLandscapeView object @throws Illegal...
java
public SystemLandscapeView createSystemLandscapeView(String key, String description) { assertThatTheViewKeyIsSpecifiedAndUnique(key); SystemLandscapeView view = new SystemLandscapeView(model, key, description); view.setViewSet(this); systemLandscapeViews.add(view); return view; ...
[ "public", "SystemLandscapeView", "createSystemLandscapeView", "(", "String", "key", ",", "String", "description", ")", "{", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", "SystemLandscapeView", "view", "=", "new", "SystemLandscapeView", "(", "model", ...
Creates a system landscape view. @param key the key for the view (must be unique) @param description a description of the view @return an SystemLandscapeView object @throws IllegalArgumentException if the key is not unique
[ "Creates", "a", "system", "landscape", "view", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L53-L60
cache2k/cache2k
cache2k-api/src/main/java/org/cache2k/spi/SingleProviderResolver.java
SingleProviderResolver.resolve
@SuppressWarnings("unchecked") public synchronized static <T> T resolve(Class<T> c, Class<? extends T> defaultImpl) { """ Return a provider for this interface. @param c the provider interface that is implemented @param defaultImpl if no provider is found, instantiate the default implementation @param <T> ty...
java
@SuppressWarnings("unchecked") public synchronized static <T> T resolve(Class<T> c, Class<? extends T> defaultImpl) { if (providers.containsKey(c)) { return (T) providers.get(c); } try { String _className = readFile("org/cache2k/services/" + c.getName()); T obj = null; if (_classNa...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "synchronized", "static", "<", "T", ">", "T", "resolve", "(", "Class", "<", "T", ">", "c", ",", "Class", "<", "?", "extends", "T", ">", "defaultImpl", ")", "{", "if", "(", "providers", ".", ...
Return a provider for this interface. @param c the provider interface that is implemented @param defaultImpl if no provider is found, instantiate the default implementation @param <T> type of provider interface @return instance of the provider or {@code null} if not found @throws java.lang.LinkageError if there is a ...
[ "Return", "a", "provider", "for", "this", "interface", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-api/src/main/java/org/cache2k/spi/SingleProviderResolver.java#L95-L122
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/Broadcast.java
Broadcast.gte
public static INDArray gte(INDArray x, INDArray y, INDArray z, int... dimensions) { """ Broadcast greater than or equal to op. See: {@link BroadcastGreaterThanOrEqual} """ if(dimensions == null || dimensions.length == 0) { validateShapesNoDimCase(x,y,z); return Nd4j.getExecution...
java
public static INDArray gte(INDArray x, INDArray y, INDArray z, int... dimensions) { if(dimensions == null || dimensions.length == 0) { validateShapesNoDimCase(x,y,z); return Nd4j.getExecutioner().exec(new OldGreaterThanOrEqual(x,y,z)); } return Nd4j.getExecutioner().exec...
[ "public", "static", "INDArray", "gte", "(", "INDArray", "x", ",", "INDArray", "y", ",", "INDArray", "z", ",", "int", "...", "dimensions", ")", "{", "if", "(", "dimensions", "==", "null", "||", "dimensions", ".", "length", "==", "0", ")", "{", "validate...
Broadcast greater than or equal to op. See: {@link BroadcastGreaterThanOrEqual}
[ "Broadcast", "greater", "than", "or", "equal", "to", "op", ".", "See", ":", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/Broadcast.java#L101-L108
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Spies.java
Spies.spyRes
public static <T1, T2, R> BiFunction<T1, T2, R> spyRes(BiFunction<T1, T2, R> function, Box<R> result) { """ Proxies a binary function spying for result. @param <T1> the function first parameter type @param <T2> the function second parameter type @param <R> the function result type @param function the functio...
java
public static <T1, T2, R> BiFunction<T1, T2, R> spyRes(BiFunction<T1, T2, R> function, Box<R> result) { return spy(function, result, Box.<T1>empty(), Box.<T2>empty()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "R", ">", "BiFunction", "<", "T1", ",", "T2", ",", "R", ">", "spyRes", "(", "BiFunction", "<", "T1", ",", "T2", ",", "R", ">", "function", ",", "Box", "<", "R", ">", "result", ")", "{", "return", ...
Proxies a binary function spying for result. @param <T1> the function first parameter type @param <T2> the function second parameter type @param <R> the function result type @param function the function that will be spied @param result a box that will be containing spied result @return the proxied function
[ "Proxies", "a", "binary", "function", "spying", "for", "result", "." ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L253-L255
sarl/sarl
products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/CompilerCommandModule.java
CompilerCommandModule.getProgressBarConfig
@SuppressWarnings("static-method") @Provides @Singleton public ProgressBarConfig getProgressBarConfig(ConfigurationFactory configFactory, Injector injector) { """ Replies the instance of the compiler command configuration. @param configFactory accessor to the bootique factory. @param injector the current in...
java
@SuppressWarnings("static-method") @Provides @Singleton public ProgressBarConfig getProgressBarConfig(ConfigurationFactory configFactory, Injector injector) { final ProgressBarConfig config = ProgressBarConfig.getConfiguration(configFactory); injector.injectMembers(config); return config; }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "@", "Provides", "@", "Singleton", "public", "ProgressBarConfig", "getProgressBarConfig", "(", "ConfigurationFactory", "configFactory", ",", "Injector", "injector", ")", "{", "final", "ProgressBarConfig", "config", ...
Replies the instance of the compiler command configuration. @param configFactory accessor to the bootique factory. @param injector the current injector. @return the compiler command configuration accessor.
[ "Replies", "the", "instance", "of", "the", "compiler", "command", "configuration", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/CompilerCommandModule.java#L92-L99
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitSince
@Override public R visitSince(SinceTree node, P p) { """ {@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(node, p); }
java
@Override public R visitSince(SinceTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitSince", "(", "SinceTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L381-L384
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.registerPropertyExclusions
public void registerPropertyExclusions( Class target, String[] properties ) { """ Registers exclusions for a target class.<br> [Java -&gt; JSON] @param target the class to use as key @param properties the properties to be excluded """ if( target != null && properties != null && properties.length > 0...
java
public void registerPropertyExclusions( Class target, String[] properties ) { if( target != null && properties != null && properties.length > 0 ) { Set set = (Set) exclusionMap.get( target ); if( set == null ) { set = new HashSet(); exclusionMap.put( target, set ); ...
[ "public", "void", "registerPropertyExclusions", "(", "Class", "target", ",", "String", "[", "]", "properties", ")", "{", "if", "(", "target", "!=", "null", "&&", "properties", "!=", "null", "&&", "properties", ".", "length", ">", "0", ")", "{", "Set", "s...
Registers exclusions for a target class.<br> [Java -&gt; JSON] @param target the class to use as key @param properties the properties to be excluded
[ "Registers", "exclusions", "for", "a", "target", "class", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L886-L899
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/GenericLogicDiscoverer.java
GenericLogicDiscoverer.findOperationsConsumingSome
@Override public Map<URI, MatchResult> findOperationsConsumingSome(Set<URI> inputTypes) { """ Discover registered operations that consume some (i.e., at least one) of the types of input provided. That is, all those that have as input the types provided. @param inputTypes the types of input to be consumed ...
java
@Override public Map<URI, MatchResult> findOperationsConsumingSome(Set<URI> inputTypes) { return findServicesClassifiedBySome(inputTypes, LogicConceptMatchType.Plugin); }
[ "@", "Override", "public", "Map", "<", "URI", ",", "MatchResult", ">", "findOperationsConsumingSome", "(", "Set", "<", "URI", ">", "inputTypes", ")", "{", "return", "findServicesClassifiedBySome", "(", "inputTypes", ",", "LogicConceptMatchType", ".", "Plugin", ")"...
Discover registered operations that consume some (i.e., at least one) of the types of input provided. That is, all those that have as input the types provided. @param inputTypes the types of input to be consumed @return a Set containing all the matching operations. If there are no solutions, the Set should be empty, n...
[ "Discover", "registered", "operations", "that", "consume", "some", "(", "i", ".", "e", ".", "at", "least", "one", ")", "of", "the", "types", "of", "input", "provided", ".", "That", "is", "all", "those", "that", "have", "as", "input", "the", "types", "p...
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/GenericLogicDiscoverer.java#L265-L268
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationReader.java
CmsConfigurationReader.parseDetailPage
protected void parseDetailPage(I_CmsXmlContentLocation node) throws CmsException { """ Parses the detail pages from an XML content node.<p> @param node the XML content node @throws CmsException if something goes wrong """ I_CmsXmlContentValueLocation pageLoc = node.getSubValue(N_PAGE); S...
java
protected void parseDetailPage(I_CmsXmlContentLocation node) throws CmsException { I_CmsXmlContentValueLocation pageLoc = node.getSubValue(N_PAGE); String typeName = getString(node.getSubValue(N_TYPE)); try { String page = pageLoc.asString(m_cms); CmsResource detailPageR...
[ "protected", "void", "parseDetailPage", "(", "I_CmsXmlContentLocation", "node", ")", "throws", "CmsException", "{", "I_CmsXmlContentValueLocation", "pageLoc", "=", "node", ".", "getSubValue", "(", "N_PAGE", ")", ";", "String", "typeName", "=", "getString", "(", "nod...
Parses the detail pages from an XML content node.<p> @param node the XML content node @throws CmsException if something goes wrong
[ "Parses", "the", "detail", "pages", "from", "an", "XML", "content", "node", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L817-L844
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getResourceAsFile
public static File getResourceAsFile(String name) { """ Get file resource, that is, resource with <em>file</em> protocol. Try to load resource throwing exception if not found. If resource protocol is <em>file</em> returns it as {@link java.io.File} otherwise throws unsupported operation. @param name resource ...
java
public static File getResourceAsFile(String name) { URL resourceURL = getResource(name); if(resourceURL == null) { throw new NoSuchBeingException("Resource |%s| not found.", name); } String protocol = resourceURL.getProtocol(); if("file".equals(protocol)) try { return new File(...
[ "public", "static", "File", "getResourceAsFile", "(", "String", "name", ")", "{", "URL", "resourceURL", "=", "getResource", "(", "name", ")", ";", "if", "(", "resourceURL", "==", "null", ")", "{", "throw", "new", "NoSuchBeingException", "(", "\"Resource |%s| n...
Get file resource, that is, resource with <em>file</em> protocol. Try to load resource throwing exception if not found. If resource protocol is <em>file</em> returns it as {@link java.io.File} otherwise throws unsupported operation. @param name resource name. @return resource file. @throws NoSuchBeingException if name...
[ "Get", "file", "resource", "that", "is", "resource", "with", "<em", ">", "file<", "/", "em", ">", "protocol", ".", "Try", "to", "load", "resource", "throwing", "exception", "if", "not", "found", ".", "If", "resource", "protocol", "is", "<em", ">", "file<...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L1090-L1104
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java
RedisClusterStorage.storeCalendar
@Override public void storeCalendar(String name, Calendar calendar, boolean replaceExisting, boolean updateTriggers, JedisCluster jedis) throws JobPersistenceException { """ Store a {@link Calendar} @param name the name of the calendar @param calendar the calendar object to be stored @pa...
java
@Override public void storeCalendar(String name, Calendar calendar, boolean replaceExisting, boolean updateTriggers, JedisCluster jedis) throws JobPersistenceException { final String calendarHashKey = redisSchema.calendarHashKey(name); if (!replaceExisting && jedis.exists(calendarHashKey)) { ...
[ "@", "Override", "public", "void", "storeCalendar", "(", "String", "name", ",", "Calendar", "calendar", ",", "boolean", "replaceExisting", ",", "boolean", "updateTriggers", ",", "JedisCluster", "jedis", ")", "throws", "JobPersistenceException", "{", "final", "String...
Store a {@link Calendar} @param name the name of the calendar @param calendar the calendar object to be stored @param replaceExisting if true, any existing calendar with the same name will be overwritten @param updateTriggers if true, any existing triggers associated with the calendar will be update...
[ "Store", "a", "{", "@link", "Calendar", "}" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisClusterStorage.java#L268-L297
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.getBoolean
public boolean getBoolean(String name, boolean defaultValue) { """ Get the value of the <code>name</code> property as a <code>boolean</code>. If no such property is specified, or if the specified value is not a valid <code>boolean</code>, then <code>defaultValue</code> is returned. @param name property name. ...
java
public boolean getBoolean(String name, boolean defaultValue) { String valueString = getTrimmed(name); if (null == valueString || valueString.isEmpty()) { return defaultValue; } if (StringUtils.equalsIgnoreCase("true", valueString)) return true; else if (StringUtils.equalsIgnoreCase("false", valueString...
[ "public", "boolean", "getBoolean", "(", "String", "name", ",", "boolean", "defaultValue", ")", "{", "String", "valueString", "=", "getTrimmed", "(", "name", ")", ";", "if", "(", "null", "==", "valueString", "||", "valueString", ".", "isEmpty", "(", ")", ")...
Get the value of the <code>name</code> property as a <code>boolean</code>. If no such property is specified, or if the specified value is not a valid <code>boolean</code>, then <code>defaultValue</code> is returned. @param name property name. @param defaultValue default value. @return property value as a <code>boolean...
[ "Get", "the", "value", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", "as", "a", "<code", ">", "boolean<", "/", "code", ">", ".", "If", "no", "such", "property", "is", "specified", "or", "if", "the", "specified", "value", "is", "no...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1534-L1545
graknlabs/grakn
server/src/graql/executor/ComputeExecutor.java
ComputeExecutor.runComputePath
private Stream<ConceptList> runComputePath(GraqlCompute.Path query) { """ The Graql compute path query run method @return a Answer containing the list of shortest paths """ ConceptId fromID = ConceptId.of(query.from()); ConceptId toID = ConceptId.of(query.to()); if (!scopeContainsIn...
java
private Stream<ConceptList> runComputePath(GraqlCompute.Path query) { ConceptId fromID = ConceptId.of(query.from()); ConceptId toID = ConceptId.of(query.to()); if (!scopeContainsInstances(query, fromID, toID)) throw GraqlQueryException.instanceDoesNotExist(); if (fromID.equals(toID)) re...
[ "private", "Stream", "<", "ConceptList", ">", "runComputePath", "(", "GraqlCompute", ".", "Path", "query", ")", "{", "ConceptId", "fromID", "=", "ConceptId", ".", "of", "(", "query", ".", "from", "(", ")", ")", ";", "ConceptId", "toID", "=", "ConceptId", ...
The Graql compute path query run method @return a Answer containing the list of shortest paths
[ "The", "Graql", "compute", "path", "query", "run", "method" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/executor/ComputeExecutor.java#L333-L362
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generateKeyPair
public static KeyPair generateKeyPair(String algorithm, int keySize, byte[] seed) { """ 生成用于非对称加密的公钥和私钥<br> 密钥对生成算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator @param algorithm 非对称加密算法 @param keySize 密钥模(modulus )长度 @param seed 种子 @return {@link KeyPa...
java
public static KeyPair generateKeyPair(String algorithm, int keySize, byte[] seed) { return KeyUtil.generateKeyPair(algorithm, keySize, seed); }
[ "public", "static", "KeyPair", "generateKeyPair", "(", "String", "algorithm", ",", "int", "keySize", ",", "byte", "[", "]", "seed", ")", "{", "return", "KeyUtil", ".", "generateKeyPair", "(", "algorithm", ",", "keySize", ",", "seed", ")", ";", "}" ]
生成用于非对称加密的公钥和私钥<br> 密钥对生成算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator @param algorithm 非对称加密算法 @param keySize 密钥模(modulus )长度 @param seed 种子 @return {@link KeyPair}
[ "生成用于非对称加密的公钥和私钥<br", ">", "密钥对生成算法见:https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "7", "/", "docs", "/", "technotes", "/", "guides", "/", "security", "/", "StandardNames", ".", "html#KeyPairGenerator" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L227-L229
Axway/Grapes
commons/src/main/java/org/axway/grapes/commons/utils/FileUtils.java
FileUtils.touch
public static void touch(final File folder , final String fileName) throws IOException { """ Creates a file @param folder File @param fileName String @throws IOException """ if(!folder.exists()){ folder.mkdirs(); } final File touchedFile = new File(folder, fileName); ...
java
public static void touch(final File folder , final String fileName) throws IOException { if(!folder.exists()){ folder.mkdirs(); } final File touchedFile = new File(folder, fileName); // The JVM will only 'touch' the file if you instantiate a // FileOutputStream inst...
[ "public", "static", "void", "touch", "(", "final", "File", "folder", ",", "final", "String", "fileName", ")", "throws", "IOException", "{", "if", "(", "!", "folder", ".", "exists", "(", ")", ")", "{", "folder", ".", "mkdirs", "(", ")", ";", "}", "fin...
Creates a file @param folder File @param fileName String @throws IOException
[ "Creates", "a", "file" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/utils/FileUtils.java#L87-L107
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPCalculator.java
AFPCalculator.getEnd2EndDistance
private static final double getEnd2EndDistance(Atom[] ca1, Atom[] ca2, int p1b, int p1e, int p2b, int p2e) { """ filter 1 for AFP extration: the distance of end-to-end @param p1b @param p1e @param p2b @param p2e @return """ double min = 99; double dist1 = Calc.getDistance(ca1[p1b], ca1[p1e]); dou...
java
private static final double getEnd2EndDistance(Atom[] ca1, Atom[] ca2, int p1b, int p1e, int p2b, int p2e) { double min = 99; double dist1 = Calc.getDistance(ca1[p1b], ca1[p1e]); double dist2 = Calc.getDistance(ca2[p2b], ca2[p2e]); min = dist1 - dist2; return Math.abs(min); }
[ "private", "static", "final", "double", "getEnd2EndDistance", "(", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ",", "int", "p1b", ",", "int", "p1e", ",", "int", "p2b", ",", "int", "p2e", ")", "{", "double", "min", "=", "99", ";", "double...
filter 1 for AFP extration: the distance of end-to-end @param p1b @param p1e @param p2b @param p2e @return
[ "filter", "1", "for", "AFP", "extration", ":", "the", "distance", "of", "end", "-", "to", "-", "end" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPCalculator.java#L150-L159
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/SAXProcessor.java
SAXProcessor.charDistance
public int charDistance(char a, char b) { """ Compute the distance between the two chars based on the ASCII symbol codes. @param a The first char. @param b The second char. @return The distance. """ return Math.abs(Character.getNumericValue(a) - Character.getNumericValue(b)); }
java
public int charDistance(char a, char b) { return Math.abs(Character.getNumericValue(a) - Character.getNumericValue(b)); }
[ "public", "int", "charDistance", "(", "char", "a", ",", "char", "b", ")", "{", "return", "Math", ".", "abs", "(", "Character", ".", "getNumericValue", "(", "a", ")", "-", "Character", ".", "getNumericValue", "(", "b", ")", ")", ";", "}" ]
Compute the distance between the two chars based on the ASCII symbol codes. @param a The first char. @param b The second char. @return The distance.
[ "Compute", "the", "distance", "between", "the", "two", "chars", "based", "on", "the", "ASCII", "symbol", "codes", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/SAXProcessor.java#L316-L318
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.getExecutorName
public static String getExecutorName(String name, String versionstamp) { """ Generate the name for the executor class. Must use '$' so that it is considered by some code (eclipse debugger for example) to be an inner type of the original class (thus able to consider itself as being from the same source file). ...
java
public static String getExecutorName(String name, String versionstamp) { StringBuilder s = new StringBuilder(name); s.append("$$E"); s.append(versionstamp); return s.toString(); }
[ "public", "static", "String", "getExecutorName", "(", "String", "name", ",", "String", "versionstamp", ")", "{", "StringBuilder", "s", "=", "new", "StringBuilder", "(", "name", ")", ";", "s", ".", "append", "(", "\"$$E\"", ")", ";", "s", ".", "append", "...
Generate the name for the executor class. Must use '$' so that it is considered by some code (eclipse debugger for example) to be an inner type of the original class (thus able to consider itself as being from the same source file). @param name the name prefix for the executor class @param versionstamp the suffix stri...
[ "Generate", "the", "name", "for", "the", "executor", "class", ".", "Must", "use", "$", "so", "that", "it", "is", "considered", "by", "some", "code", "(", "eclipse", "debugger", "for", "example", ")", "to", "be", "an", "inner", "type", "of", "the", "ori...
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L885-L890
apache/incubator-gobblin
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
AzkabanClient.executeFlow
public AzkabanExecuteFlowStatus executeFlow(String projectName, String flowName, Map<String, String> flowParameters) throws AzkabanClientException { """ Execute a flow with flow parameters. The project and flow should be cr...
java
public AzkabanExecuteFlowStatus executeFlow(String projectName, String flowName, Map<String, String> flowParameters) throws AzkabanClientException { return executeFlowWithOptions(projectName, flowName, null, flowParameters);...
[ "public", "AzkabanExecuteFlowStatus", "executeFlow", "(", "String", "projectName", ",", "String", "flowName", ",", "Map", "<", "String", ",", "String", ">", "flowParameters", ")", "throws", "AzkabanClientException", "{", "return", "executeFlowWithOptions", "(", "proje...
Execute a flow with flow parameters. The project and flow should be created first. @param projectName project name @param flowName flow name @param flowParameters flow parameters @return The status object which contains success status and execution id.
[ "Execute", "a", "flow", "with", "flow", "parameters", ".", "The", "project", "and", "flow", "should", "be", "created", "first", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java#L366-L370
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper._hasSideEffects
protected Boolean _hasSideEffects(XConstructorCall expression, ISideEffectContext context) { """ Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects. """ for (final XExpre...
java
protected Boolean _hasSideEffects(XConstructorCall expression, ISideEffectContext context) { for (final XExpression ex : expression.getArguments()) { if (hasSideEffects(ex, context)) { return true; } } return false; }
[ "protected", "Boolean", "_hasSideEffects", "(", "XConstructorCall", "expression", ",", "ISideEffectContext", "context", ")", "{", "for", "(", "final", "XExpression", "ex", ":", "expression", ".", "getArguments", "(", ")", ")", "{", "if", "(", "hasSideEffects", "...
Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects.
[ "Test", "if", "the", "given", "expression", "has", "side", "effects", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L481-L488
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/CreatePlatformEndpointRequest.java
CreatePlatformEndpointRequest.withAttributes
public CreatePlatformEndpointRequest withAttributes(java.util.Map<String, String> attributes) { """ <p> For a list of attributes, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html">SetEndpointAttributes</a>. </p> @param attributes For a list of attributes, see <a href="...
java
public CreatePlatformEndpointRequest withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "CreatePlatformEndpointRequest", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> For a list of attributes, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html">SetEndpointAttributes</a>. </p> @param attributes For a list of attributes, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html" >SetEndpointAttributes</a>. @return R...
[ "<p", ">", "For", "a", "list", "of", "attributes", "see", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "sns", "/", "latest", "/", "api", "/", "API_SetEndpointAttributes", ".", "html", ">", "SetEndpointAttri...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/CreatePlatformEndpointRequest.java#L252-L255
patka/cassandra-migration
cassandra-migration/src/main/java/org/cognitor/cassandra/migration/scanner/FileSystemLocationScanner.java
FileSystemLocationScanner.toResourceNameOnClasspath
private String toResourceNameOnClasspath(String classPathRootOnDisk, File file) { """ Converts this file into a resource name on the classpath by cutting of the file path to the classpath root. @param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash. @param file ...
java
private String toResourceNameOnClasspath(String classPathRootOnDisk, File file) { String fileName = file.getAbsolutePath().replace("\\", "/"); return fileName.substring(classPathRootOnDisk.length()); }
[ "private", "String", "toResourceNameOnClasspath", "(", "String", "classPathRootOnDisk", ",", "File", "file", ")", "{", "String", "fileName", "=", "file", ".", "getAbsolutePath", "(", ")", ".", "replace", "(", "\"\\\\\"", ",", "\"/\"", ")", ";", "return", "file...
Converts this file into a resource name on the classpath by cutting of the file path to the classpath root. @param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash. @param file The file. @return The resource name on the classpath.
[ "Converts", "this", "file", "into", "a", "resource", "name", "on", "the", "classpath", "by", "cutting", "of", "the", "file", "path", "to", "the", "classpath", "root", "." ]
train
https://github.com/patka/cassandra-migration/blob/c61840c23b17a18df704d136909c26ff46bd5c77/cassandra-migration/src/main/java/org/cognitor/cassandra/migration/scanner/FileSystemLocationScanner.java#L89-L92
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TextCharacter.java
TextCharacter.withBackgroundColor
public TextCharacter withBackgroundColor(TextColor backgroundColor) { """ Returns a copy of this TextCharacter with a specified background color @param backgroundColor Background color the copy should have @return Copy of the TextCharacter with a different background color """ if(this.backgroundColor...
java
public TextCharacter withBackgroundColor(TextColor backgroundColor) { if(this.backgroundColor == backgroundColor || this.backgroundColor.equals(backgroundColor)) { return this; } return new TextCharacter(character, foregroundColor, backgroundColor, modifiers); }
[ "public", "TextCharacter", "withBackgroundColor", "(", "TextColor", "backgroundColor", ")", "{", "if", "(", "this", ".", "backgroundColor", "==", "backgroundColor", "||", "this", ".", "backgroundColor", ".", "equals", "(", "backgroundColor", ")", ")", "{", "return...
Returns a copy of this TextCharacter with a specified background color @param backgroundColor Background color the copy should have @return Copy of the TextCharacter with a different background color
[ "Returns", "a", "copy", "of", "this", "TextCharacter", "with", "a", "specified", "background", "color" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TextCharacter.java#L237-L242
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormatter.java
DateTimeFormatter.printTo
public void printTo(Writer out, ReadableInstant instant) throws IOException { """ Prints a ReadableInstant, using the chronology supplied by the instant. @param out the destination to format to, not null @param instant instant to format, null means now """ printTo((Appendable) out, instant); ...
java
public void printTo(Writer out, ReadableInstant instant) throws IOException { printTo((Appendable) out, instant); }
[ "public", "void", "printTo", "(", "Writer", "out", ",", "ReadableInstant", "instant", ")", "throws", "IOException", "{", "printTo", "(", "(", "Appendable", ")", "out", ",", "instant", ")", ";", "}" ]
Prints a ReadableInstant, using the chronology supplied by the instant. @param out the destination to format to, not null @param instant instant to format, null means now
[ "Prints", "a", "ReadableInstant", "using", "the", "chronology", "supplied", "by", "the", "instant", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormatter.java#L521-L523
aboutsip/pkts
pkts-sip/src/main/java/io/pkts/packet/sip/impl/SipParser.java
SipParser.isNext
public static boolean isNext(final Buffer buffer, final byte b) throws IOException { """ Will check whether the next readable byte in the buffer is a certain byte @param buffer the buffer to peek into @param b the byte we are checking is the next byte in the buffer to be read @return true if the next byte ...
java
public static boolean isNext(final Buffer buffer, final byte b) throws IOException { if (buffer.hasReadableBytes()) { final byte actual = buffer.peekByte(); return actual == b; } return false; }
[ "public", "static", "boolean", "isNext", "(", "final", "Buffer", "buffer", ",", "final", "byte", "b", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "hasReadableBytes", "(", ")", ")", "{", "final", "byte", "actual", "=", "buffer", ".", "pee...
Will check whether the next readable byte in the buffer is a certain byte @param buffer the buffer to peek into @param b the byte we are checking is the next byte in the buffer to be read @return true if the next byte to read indeed is what we hope it is
[ "Will", "check", "whether", "the", "next", "readable", "byte", "in", "the", "buffer", "is", "a", "certain", "byte" ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-sip/src/main/java/io/pkts/packet/sip/impl/SipParser.java#L513-L520
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getKeyVersionsWithServiceResponseAsync
public Observable<ServiceResponse<Page<KeyItem>>> getKeyVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String keyName) { """ Retrieves a list of individual key versions with the same key name. The full key identifier, attributes, and tags are provided in the response. This operation requires th...
java
public Observable<ServiceResponse<Page<KeyItem>>> getKeyVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String keyName) { return getKeyVersionsSinglePageAsync(vaultBaseUrl, keyName) .concatMap(new Func1<ServiceResponse<Page<KeyItem>>, Observable<ServiceResponse<Page<KeyItem>>>>() {...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "KeyItem", ">", ">", ">", "getKeyVersionsWithServiceResponseAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "keyName", ")", "{", "return", "getKeyVersionsSinglePageAsync", "(", ...
Retrieves a list of individual key versions with the same key name. The full key identifier, attributes, and tags are provided in the response. This operation requires the keys/list permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param keyName The name of the key. @throws ...
[ "Retrieves", "a", "list", "of", "individual", "key", "versions", "with", "the", "same", "key", "name", ".", "The", "full", "key", "identifier", "attributes", "and", "tags", "are", "provided", "in", "the", "response", ".", "This", "operation", "requires", "th...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1539-L1551
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/ProxyAwareUIStrings.java
ProxyAwareUIStrings.appendTypeSignature
public StringBuilder appendTypeSignature(JvmType type, StringBuilder result) { """ Returns the signature of the given type. If the type declares type parameters, the type parameters are included but their bounds are omitted. That is, the type {@code X<T extends CharSequence>} will be returned as {@code X<T>} ...
java
public StringBuilder appendTypeSignature(JvmType type, StringBuilder result) { result.append(type.getSimpleName()); if(type instanceof JvmTypeParameterDeclarator) { List<JvmTypeParameter> typeParameters = ((JvmTypeParameterDeclarator) type).getTypeParameters(); if (!typeParameters.isEmpty()) { result.appe...
[ "public", "StringBuilder", "appendTypeSignature", "(", "JvmType", "type", ",", "StringBuilder", "result", ")", "{", "result", ".", "append", "(", "type", ".", "getSimpleName", "(", ")", ")", ";", "if", "(", "type", "instanceof", "JvmTypeParameterDeclarator", ")"...
Returns the signature of the given type. If the type declares type parameters, the type parameters are included but their bounds are omitted. That is, the type {@code X<T extends CharSequence>} will be returned as {@code X<T>}
[ "Returns", "the", "signature", "of", "the", "given", "type", ".", "If", "the", "type", "declares", "type", "parameters", "the", "type", "parameters", "are", "included", "but", "their", "bounds", "are", "omitted", ".", "That", "is", "the", "type", "{", "@co...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/validation/ProxyAwareUIStrings.java#L60-L76
liferay/com-liferay-commerce
commerce-notification-api/src/main/java/com/liferay/commerce/notification/service/persistence/CommerceNotificationTemplateUtil.java
CommerceNotificationTemplateUtil.removeByG_T_E
public static void removeByG_T_E(long groupId, String type, boolean enabled) { """ Removes all the commerce notification templates where groupId = &#63; and type = &#63; and enabled = &#63; from the database. @param groupId the group ID @param type the type @param enabled the enabled """ getPersistence(...
java
public static void removeByG_T_E(long groupId, String type, boolean enabled) { getPersistence().removeByG_T_E(groupId, type, enabled); }
[ "public", "static", "void", "removeByG_T_E", "(", "long", "groupId", ",", "String", "type", ",", "boolean", "enabled", ")", "{", "getPersistence", "(", ")", ".", "removeByG_T_E", "(", "groupId", ",", "type", ",", "enabled", ")", ";", "}" ]
Removes all the commerce notification templates where groupId = &#63; and type = &#63; and enabled = &#63; from the database. @param groupId the group ID @param type the type @param enabled the enabled
[ "Removes", "all", "the", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-api/src/main/java/com/liferay/commerce/notification/service/persistence/CommerceNotificationTemplateUtil.java#L1272-L1274
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java
RSAUtils.signMessage
public static byte[] signMessage(RSAPrivateKey key, byte[] message) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException { """ Sign a message with RSA private key, using {@link #DEFAULT_SIGNATURE_ALGORITHM}. @param key @param message @return the signature @throws InvalidKeyExc...
java
public static byte[] signMessage(RSAPrivateKey key, byte[] message) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException { return signMessage(key, message, DEFAULT_SIGNATURE_ALGORITHM); }
[ "public", "static", "byte", "[", "]", "signMessage", "(", "RSAPrivateKey", "key", ",", "byte", "[", "]", "message", ")", "throws", "InvalidKeyException", ",", "NoSuchAlgorithmException", ",", "SignatureException", "{", "return", "signMessage", "(", "key", ",", "...
Sign a message with RSA private key, using {@link #DEFAULT_SIGNATURE_ALGORITHM}. @param key @param message @return the signature @throws InvalidKeyException @throws NoSuchAlgorithmException @throws SignatureException
[ "Sign", "a", "message", "with", "RSA", "private", "key", "using", "{", "@link", "#DEFAULT_SIGNATURE_ALGORITHM", "}", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java#L183-L186
VoltDB/voltdb
src/frontend/org/voltdb/NonVoltDBBackend.java
NonVoltDBBackend.isBigintColumn
private boolean isBigintColumn(String columnName, List<String> tableNames, boolean debugPrint) { """ Returns true if the <i>columnName</i> is of column type BIGINT, or equivalents in a comparison, non-VoltDB database; false otherwise. """ List<String> bigintColumnTypes = Arrays.asList("BIGINT"); ...
java
private boolean isBigintColumn(String columnName, List<String> tableNames, boolean debugPrint) { List<String> bigintColumnTypes = Arrays.asList("BIGINT"); return isColumnType(bigintColumnTypes, columnName, tableNames, debugPrint); }
[ "private", "boolean", "isBigintColumn", "(", "String", "columnName", ",", "List", "<", "String", ">", "tableNames", ",", "boolean", "debugPrint", ")", "{", "List", "<", "String", ">", "bigintColumnTypes", "=", "Arrays", ".", "asList", "(", "\"BIGINT\"", ")", ...
Returns true if the <i>columnName</i> is of column type BIGINT, or equivalents in a comparison, non-VoltDB database; false otherwise.
[ "Returns", "true", "if", "the", "<i", ">", "columnName<", "/", "i", ">", "is", "of", "column", "type", "BIGINT", "or", "equivalents", "in", "a", "comparison", "non", "-", "VoltDB", "database", ";", "false", "otherwise", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L570-L573
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.assignTimestampsAndWatermarks
public FlinkKafkaConsumerBase<T> assignTimestampsAndWatermarks(AssignerWithPunctuatedWatermarks<T> assigner) { """ Specifies an {@link AssignerWithPunctuatedWatermarks} to emit watermarks in a punctuated manner. The watermark extractor will run per Kafka partition, watermarks will be merged across partitions in ...
java
public FlinkKafkaConsumerBase<T> assignTimestampsAndWatermarks(AssignerWithPunctuatedWatermarks<T> assigner) { checkNotNull(assigner); if (this.periodicWatermarkAssigner != null) { throw new IllegalStateException("A periodic watermark emitter has already been set."); } try { ClosureCleaner.clean(assigner...
[ "public", "FlinkKafkaConsumerBase", "<", "T", ">", "assignTimestampsAndWatermarks", "(", "AssignerWithPunctuatedWatermarks", "<", "T", ">", "assigner", ")", "{", "checkNotNull", "(", "assigner", ")", ";", "if", "(", "this", ".", "periodicWatermarkAssigner", "!=", "n...
Specifies an {@link AssignerWithPunctuatedWatermarks} to emit watermarks in a punctuated manner. The watermark extractor will run per Kafka partition, watermarks will be merged across partitions in the same way as in the Flink runtime, when streams are merged. <p>When a subtask of a FlinkKafkaConsumer source reads mul...
[ "Specifies", "an", "{", "@link", "AssignerWithPunctuatedWatermarks", "}", "to", "emit", "watermarks", "in", "a", "punctuated", "manner", ".", "The", "watermark", "extractor", "will", "run", "per", "Kafka", "partition", "watermarks", "will", "be", "merged", "across...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L292-L305
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.geometricCdf
public static double geometricCdf(int k, double p) { """ Returns the cumulative probability of geometric @param k @param p @return """ if(k<=0 || p<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double probabilitySum = 0.0; ...
java
public static double geometricCdf(int k, double p) { if(k<=0 || p<0) { throw new IllegalArgumentException("All the parameters must be positive."); } double probabilitySum = 0.0; for(int i=1;i<=k;++i) { probabilitySum += geometric(i, p); } ...
[ "public", "static", "double", "geometricCdf", "(", "int", "k", ",", "double", "p", ")", "{", "if", "(", "k", "<=", "0", "||", "p", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"All the parameters must be positive.\"", ")", ";", "}...
Returns the cumulative probability of geometric @param k @param p @return
[ "Returns", "the", "cumulative", "probability", "of", "geometric" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L170-L181
duracloud/snapshot
snapshot-service-impl/src/main/java/org/duracloud/snapshot/service/impl/RestoreJobExecutionListener.java
RestoreJobExecutionListener.getExpirationDate
protected Date getExpirationDate(Date endDate, int daysToExpire) { """ Calculates the restore expiration date based on the restoration end date and the number of days before retirement @param endDate date on which the restoration completed @param daysToExpire number of days the restored content should st...
java
protected Date getExpirationDate(Date endDate, int daysToExpire) { Calendar calendar = Calendar.getInstance(); calendar.setTime(endDate); calendar.add(Calendar.DATE, daysToExpire); return calendar.getTime(); }
[ "protected", "Date", "getExpirationDate", "(", "Date", "endDate", ",", "int", "daysToExpire", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "setTime", "(", "endDate", ")", ";", "calendar", ".", "add", ...
Calculates the restore expiration date based on the restoration end date and the number of days before retirement @param endDate date on which the restoration completed @param daysToExpire number of days the restored content should stay in place before it is retired @return expiration date of restored content
[ "Calculates", "the", "restore", "expiration", "date", "based", "on", "the", "restoration", "end", "date", "and", "the", "number", "of", "days", "before", "retirement" ]
train
https://github.com/duracloud/snapshot/blob/7cb387b22fd4a9425087f654276138727c2c0b73/snapshot-service-impl/src/main/java/org/duracloud/snapshot/service/impl/RestoreJobExecutionListener.java#L264-L269
allengeorge/libraft
libraft-agent/src/main/java/io/libraft/agent/RaftAgent.java
RaftAgent.setupCustomCommandSerializationAndDeserialization
public synchronized void setupCustomCommandSerializationAndDeserialization(CommandSerializer commandSerializer, CommandDeserializer commandDeserializer) { """ Setup custom serialization and deserialization for POJO {@link Command} objects. This method should <strong>only</strong> be called once. @param command...
java
public synchronized void setupCustomCommandSerializationAndDeserialization(CommandSerializer commandSerializer, CommandDeserializer commandDeserializer) { checkState(!running); checkState(!initialized); checkState(!setupConversion); jdbcLog.setupCustomCommandSerializerAndDeserializer(co...
[ "public", "synchronized", "void", "setupCustomCommandSerializationAndDeserialization", "(", "CommandSerializer", "commandSerializer", ",", "CommandDeserializer", "commandDeserializer", ")", "{", "checkState", "(", "!", "running", ")", ";", "checkState", "(", "!", "initializ...
Setup custom serialization and deserialization for POJO {@link Command} objects. This method should <strong>only</strong> be called once. @param commandSerializer {@code CommandSerializer} that can serialize a POJO {@code Command} into binary @param commandDeserializer {@code CommandDeserializer} that can deserialize ...
[ "Setup", "custom", "serialization", "and", "deserialization", "for", "POJO", "{", "@link", "Command", "}", "objects", ".", "This", "method", "should", "<strong", ">", "only<", "/", "strong", ">", "be", "called", "once", "." ]
train
https://github.com/allengeorge/libraft/blob/00d68bb5e68d4020af59df3c8a9a14380108ac89/libraft-agent/src/main/java/io/libraft/agent/RaftAgent.java#L315-L324
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java
Drawable.loadSpriteAnimated
public static SpriteAnimated loadSpriteAnimated(ImageBuffer surface, int horizontalFrames, int verticalFrames) { """ Load an animated sprite, giving horizontal and vertical frames (sharing the same surface). It may be useful in case of multiple animated sprites. <p> {@link SpriteAnimated#load()} must not be cal...
java
public static SpriteAnimated loadSpriteAnimated(ImageBuffer surface, int horizontalFrames, int verticalFrames) { return new SpriteAnimatedImpl(surface, horizontalFrames, verticalFrames); }
[ "public", "static", "SpriteAnimated", "loadSpriteAnimated", "(", "ImageBuffer", "surface", ",", "int", "horizontalFrames", ",", "int", "verticalFrames", ")", "{", "return", "new", "SpriteAnimatedImpl", "(", "surface", ",", "horizontalFrames", ",", "verticalFrames", ")...
Load an animated sprite, giving horizontal and vertical frames (sharing the same surface). It may be useful in case of multiple animated sprites. <p> {@link SpriteAnimated#load()} must not be called as surface has already been loaded. </p> @param surface The surface reference (must not be <code>null</code>). @param ho...
[ "Load", "an", "animated", "sprite", "giving", "horizontal", "and", "vertical", "frames", "(", "sharing", "the", "same", "surface", ")", ".", "It", "may", "be", "useful", "in", "case", "of", "multiple", "animated", "sprites", ".", "<p", ">", "{", "@link", ...
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java#L197-L200
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsSitemapToolbar.java
CmsSitemapToolbar.setNewGalleryEnabled
public void setNewGalleryEnabled(boolean enabled, String disabledReason) { """ Enables/disables the new menu button.<p> @param enabled <code>true</code> to enable the button @param disabledReason the reason, why the button is disabled """ if (enabled) { m_newGalleryMenuButton.enable();...
java
public void setNewGalleryEnabled(boolean enabled, String disabledReason) { if (enabled) { m_newGalleryMenuButton.enable(); } else { m_newGalleryMenuButton.disable(disabledReason); } }
[ "public", "void", "setNewGalleryEnabled", "(", "boolean", "enabled", ",", "String", "disabledReason", ")", "{", "if", "(", "enabled", ")", "{", "m_newGalleryMenuButton", ".", "enable", "(", ")", ";", "}", "else", "{", "m_newGalleryMenuButton", ".", "disable", ...
Enables/disables the new menu button.<p> @param enabled <code>true</code> to enable the button @param disabledReason the reason, why the button is disabled
[ "Enables", "/", "disables", "the", "new", "menu", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsSitemapToolbar.java#L258-L265
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitSee
@Override public R visitSee(SeeTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ return scan(node.getReference(), p); }
java
@Override public R visitSee(SeeTree node, P p) { return scan(node.getReference(), p); }
[ "@", "Override", "public", "R", "visitSee", "(", "SeeTree", "node", ",", "P", "p", ")", "{", "return", "scan", "(", "node", ".", "getReference", "(", ")", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L372-L375
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java
DatabaseUtils.queryNumEntries
public static long queryNumEntries(SQLiteDatabase db, String table, String selection, String[] selectionArgs) { """ Query the table for the number of rows in the table. @param db the database the table is in @param table the name of the table to query @param selection A filter declaring which rows t...
java
public static long queryNumEntries(SQLiteDatabase db, String table, String selection, String[] selectionArgs) { String s = (!TextUtils.isEmpty(selection)) ? " where " + selection : ""; return longForQuery(db, "select count(*) from " + table + s, selectionArgs); }
[ "public", "static", "long", "queryNumEntries", "(", "SQLiteDatabase", "db", ",", "String", "table", ",", "String", "selection", ",", "String", "[", "]", "selectionArgs", ")", "{", "String", "s", "=", "(", "!", "TextUtils", ".", "isEmpty", "(", "selection", ...
Query the table for the number of rows in the table. @param db the database the table is in @param table the name of the table to query @param selection A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will count all rows for the given table @param sel...
[ "Query", "the", "table", "for", "the", "number", "of", "rows", "in", "the", "table", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L809-L814
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/MasterCatalogUrl.java
MasterCatalogUrl.getMasterCatalogUrl
public static MozuUrl getMasterCatalogUrl(Integer masterCatalogId, String responseFields) { """ Get Resource Url for GetMasterCatalog @param masterCatalogId Unique identifier for the master catalog. The master catalog contains all products accessible per catalogs and the site/tenant. @param responseFields Filter...
java
public static MozuUrl getMasterCatalogUrl(Integer masterCatalogId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={responseFields}"); formatter.formatUrl("masterCatalogId", masterCatalogId); formatter.formatUrl("...
[ "public", "static", "MozuUrl", "getMasterCatalogUrl", "(", "Integer", "masterCatalogId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/mastercatalogs/{masterCatalogId}?responseFields={respon...
Get Resource Url for GetMasterCatalog @param masterCatalogId Unique identifier for the master catalog. The master catalog contains all products accessible per catalogs and the site/tenant. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON ob...
[ "Get", "Resource", "Url", "for", "GetMasterCatalog" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/MasterCatalogUrl.java#L34-L40
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getObjectIndex
@Deprecated public static Object getObjectIndex(Object obj, double dblIndex, Context cx) { """ A cheaper and less general version of the above for well-known argument types. @deprecated Use {@link #getObjectIndex(Object, double, Context, Scriptable)} instead """ ...
java
@Deprecated public static Object getObjectIndex(Object obj, double dblIndex, Context cx) { return getObjectIndex(obj, dblIndex, cx, getTopCallScope(cx)); }
[ "@", "Deprecated", "public", "static", "Object", "getObjectIndex", "(", "Object", "obj", ",", "double", "dblIndex", ",", "Context", "cx", ")", "{", "return", "getObjectIndex", "(", "obj", ",", "dblIndex", ",", "cx", ",", "getTopCallScope", "(", "cx", ")", ...
A cheaper and less general version of the above for well-known argument types. @deprecated Use {@link #getObjectIndex(Object, double, Context, Scriptable)} instead
[ "A", "cheaper", "and", "less", "general", "version", "of", "the", "above", "for", "well", "-", "known", "argument", "types", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L1631-L1636
bazaarvoice/jolt
jolt-core/src/main/java/com/bazaarvoice/jolt/defaultr/Key.java
Key.processSpec
private static Set<Key> processSpec( boolean parentIsArray, Map<String, Object> spec ) { """ Recursively walk the spec input tree. Handle arrays by telling DefaultrKeys if they need to be ArrayKeys, and to find the max default array length. """ // TODO switch to List<Key> and sort before returning ...
java
private static Set<Key> processSpec( boolean parentIsArray, Map<String, Object> spec ) { // TODO switch to List<Key> and sort before returning Set<Key> result = new HashSet<>(); for ( String key : spec.keySet() ) { Object subSpec = spec.get( key ); if ( parentIsArray )...
[ "private", "static", "Set", "<", "Key", ">", "processSpec", "(", "boolean", "parentIsArray", ",", "Map", "<", "String", ",", "Object", ">", "spec", ")", "{", "// TODO switch to List<Key> and sort before returning", "Set", "<", "Key", ">", "result", "=", "new", ...
Recursively walk the spec input tree. Handle arrays by telling DefaultrKeys if they need to be ArrayKeys, and to find the max default array length.
[ "Recursively", "walk", "the", "spec", "input", "tree", ".", "Handle", "arrays", "by", "telling", "DefaultrKeys", "if", "they", "need", "to", "be", "ArrayKeys", "and", "to", "find", "the", "max", "default", "array", "length", "." ]
train
https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/jolt-core/src/main/java/com/bazaarvoice/jolt/defaultr/Key.java#L49-L66
alkacon/opencms-core
src/org/opencms/site/CmsSiteManagerImpl.java
CmsSiteManagerImpl.getSite
public CmsSite getSite(String rootPath, String fallbackSiteRoot) { """ Returns the site for the given resource path, using the fall back site root in case the resource path is no root path.<p> In case neither the given resource path, nor the given fall back site root matches any configured site, the default s...
java
public CmsSite getSite(String rootPath, String fallbackSiteRoot) { CmsSite result = getSiteForRootPath(rootPath); if (result == null) { result = getSiteForSiteRoot(fallbackSiteRoot); if (result == null) { result = getDefaultSite(); } } ...
[ "public", "CmsSite", "getSite", "(", "String", "rootPath", ",", "String", "fallbackSiteRoot", ")", "{", "CmsSite", "result", "=", "getSiteForRootPath", "(", "rootPath", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "getSiteForSiteRoot",...
Returns the site for the given resource path, using the fall back site root in case the resource path is no root path.<p> In case neither the given resource path, nor the given fall back site root matches any configured site, the default site is returned.<p> Usually the fall back site root should be taken from {@link...
[ "Returns", "the", "site", "for", "the", "given", "resource", "path", "using", "the", "fall", "back", "site", "root", "in", "case", "the", "resource", "path", "is", "no", "root", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/CmsSiteManagerImpl.java#L859-L869
EdwardRaff/JSAT
JSAT/src/jsat/math/optimization/NelderMead.java
NelderMead.setExpansion
public void setExpansion(double expansion) { """ Sets the expansion constant, which must be greater than 1 and the reflection constant @param expansion """ if(expansion <= 1 || Double.isNaN(expansion) || Double.isInfinite(expansion) ) throw new ArithmeticException("Expansion constant must ...
java
public void setExpansion(double expansion) { if(expansion <= 1 || Double.isNaN(expansion) || Double.isInfinite(expansion) ) throw new ArithmeticException("Expansion constant must be > 1, not " + expansion); else if(expansion <= reflection) throw new ArithmeticException("Expa...
[ "public", "void", "setExpansion", "(", "double", "expansion", ")", "{", "if", "(", "expansion", "<=", "1", "||", "Double", ".", "isNaN", "(", "expansion", ")", "||", "Double", ".", "isInfinite", "(", "expansion", ")", ")", "throw", "new", "ArithmeticExcept...
Sets the expansion constant, which must be greater than 1 and the reflection constant @param expansion
[ "Sets", "the", "expansion", "constant", "which", "must", "be", "greater", "than", "1", "and", "the", "reflection", "constant" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/optimization/NelderMead.java#L72-L79
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.perspectiveLH
public Matrix4d perspectiveLH(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne) { """ Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix. <p> If <code>M</code> is <code>this</code> matrix and <co...
java
public Matrix4d perspectiveLH(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne) { return perspectiveLH(fovy, aspect, zNear, zFar, zZeroToOne, this); }
[ "public", "Matrix4d", "perspectiveLH", "(", "double", "fovy", ",", "double", "aspect", ",", "double", "zNear", ",", "double", "zFar", ",", "boolean", "zZeroToOne", ")", "{", "return", "perspectiveLH", "(", "fovy", ",", "aspect", ",", "zNear", ",", "zFar", ...
Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix. <p> If <code>M</code> is <code>this</code> matrix and <code>P</code> the perspective projection matrix, then the new matrix will be <code>M * P</code>. So when transforming a v...
[ "Apply", "a", "symmetric", "perspective", "projection", "frustum", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "the", "given", "NDC", "z", "range", "to", "this", "matrix", ".", "<p", ">", "If", "<code", ">", "M<", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L12917-L12919
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/ops/ComplexMath_F64.java
ComplexMath_F64.sqrt
public static void sqrt(Complex_F64 input, Complex_F64 root) { """ Computes the square root of the complex number. @param input Input complex number. @param root Output. The square root of the input """ double r = input.getMagnitude(); double a = input.real; root.real = Math.sqrt((...
java
public static void sqrt(Complex_F64 input, Complex_F64 root) { double r = input.getMagnitude(); double a = input.real; root.real = Math.sqrt((r+a)/2.0); root.imaginary = Math.sqrt((r-a)/2.0); if( input.imaginary < 0 ) root.imaginary = -root.imaginary; }
[ "public", "static", "void", "sqrt", "(", "Complex_F64", "input", ",", "Complex_F64", "root", ")", "{", "double", "r", "=", "input", ".", "getMagnitude", "(", ")", ";", "double", "a", "=", "input", ".", "real", ";", "root", ".", "real", "=", "Math", "...
Computes the square root of the complex number. @param input Input complex number. @param root Output. The square root of the input
[ "Computes", "the", "square", "root", "of", "the", "complex", "number", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/ops/ComplexMath_F64.java#L207-L216
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/zinternaltools/CalculateMinimumDateFieldSize.java
CalculateMinimumDateFieldSize.getLongestTextMonthInLocale
static private Month getLongestTextMonthInLocale(Locale locale, FontMetrics fontMetrics) { """ getLongestTextMonthInLocale, For the supplied locale, this returns the month that has the longest translated, "formatting version", "long text version" month name. The version of the month name string that is used f...
java
static private Month getLongestTextMonthInLocale(Locale locale, FontMetrics fontMetrics) { // Get the "formatting names" of all the months for this locale. // Request the capitalized long version of the translated month names. String[] formattingMonthNames = ExtraDateStrings.getFormattingMonthNa...
[ "static", "private", "Month", "getLongestTextMonthInLocale", "(", "Locale", "locale", ",", "FontMetrics", "fontMetrics", ")", "{", "// Get the \"formatting names\" of all the months for this locale.", "// Request the capitalized long version of the translated month names.", "String", "...
getLongestTextMonthInLocale, For the supplied locale, this returns the month that has the longest translated, "formatting version", "long text version" month name. The version of the month name string that is used for comparison is further defined below. Note that this does not return the longest month for numeric mo...
[ "getLongestTextMonthInLocale" ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/zinternaltools/CalculateMinimumDateFieldSize.java#L106-L123
Impetus/Kundera
src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBClient.java
CouchDBClient.onDelete
private void onDelete(String schemaName, Object pKey, HttpResponse response, JsonObject jsonObject) throws URISyntaxException, IOException, ClientProtocolException { """ On delete. @param schemaName the schema name @param pKey the key @param response the response @param jsonObject the json ob...
java
private void onDelete(String schemaName, Object pKey, HttpResponse response, JsonObject jsonObject) throws URISyntaxException, IOException, ClientProtocolException { URI uri; String q; JsonElement rev = jsonObject.get("_rev"); StringBuilder builder = new StringBuilder();...
[ "private", "void", "onDelete", "(", "String", "schemaName", ",", "Object", "pKey", ",", "HttpResponse", "response", ",", "JsonObject", "jsonObject", ")", "throws", "URISyntaxException", ",", "IOException", ",", "ClientProtocolException", "{", "URI", "uri", ";", "S...
On delete. @param schemaName the schema name @param pKey the key @param response the response @param jsonObject the json object @throws URISyntaxException the URI syntax exception @throws IOException Signals that an I/O exception has occurred. @throws ClientProtocolException the client protocol exception
[ "On", "delete", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBClient.java#L544-L564
geomajas/geomajas-project-client-gwt2
plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java
FeatureClickedListener.calculateBufferFromPixelTolerance
private double calculateBufferFromPixelTolerance() { """ Calculate a buffer in which the listener may include the features from the map. @return double buffer """ Coordinate c1 = mapPresenter.getViewPort().getTransformationService() .transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WOR...
java
private double calculateBufferFromPixelTolerance() { Coordinate c1 = mapPresenter.getViewPort().getTransformationService() .transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD); Coordinate c2 = mapPresenter.getViewPort().getTransformationService() .transform(new Coordinate(pixelBuffer, 0)...
[ "private", "double", "calculateBufferFromPixelTolerance", "(", ")", "{", "Coordinate", "c1", "=", "mapPresenter", ".", "getViewPort", "(", ")", ".", "getTransformationService", "(", ")", ".", "transform", "(", "new", "Coordinate", "(", "0", ",", "0", ")", ",",...
Calculate a buffer in which the listener may include the features from the map. @return double buffer
[ "Calculate", "a", "buffer", "in", "which", "the", "listener", "may", "include", "the", "features", "from", "the", "map", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java#L149-L157
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/BoundsOnRatiosInSampledSets.java
BoundsOnRatiosInSampledSets.getLowerBoundForBoverA
public static double getLowerBoundForBoverA(final long a, final long b, final double f) { """ Return the approximate lower bound based on a 95% confidence interval @param a See class javadoc @param b See class javadoc @param f the inclusion probability used to produce the set with size <i>a</i> and should gene...
java
public static double getLowerBoundForBoverA(final long a, final long b, final double f) { checkInputs(a, b, f); if (a == 0) { return 0.0; } if (f == 1.0) { return (double) b / a; } return approximateLowerBoundOnP(a, b, NUM_STD_DEVS * hackyAdjuster(f)); }
[ "public", "static", "double", "getLowerBoundForBoverA", "(", "final", "long", "a", ",", "final", "long", "b", ",", "final", "double", "f", ")", "{", "checkInputs", "(", "a", ",", "b", ",", "f", ")", ";", "if", "(", "a", "==", "0", ")", "{", "return...
Return the approximate lower bound based on a 95% confidence interval @param a See class javadoc @param b See class javadoc @param f the inclusion probability used to produce the set with size <i>a</i> and should generally be less than 0.5. Above this value, the results not be reliable. When <i>f</i> = 1.0 this returns...
[ "Return", "the", "approximate", "lower", "bound", "based", "on", "a", "95%", "confidence", "interval" ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/BoundsOnRatiosInSampledSets.java#L38-L43
twilio/authy-java
src/main/java/com/authy/api/Users.java
Users.requestSms
public Hash requestSms(int userId, Map<String, String> options) throws AuthyException { """ Send token via sms to a user with some options defined. @param userId @param options @return Hash instance with API's response. """ MapToResponse opt = new MapToResponse(options); final Response res...
java
public Hash requestSms(int userId, Map<String, String> options) throws AuthyException { MapToResponse opt = new MapToResponse(options); final Response response = this.get(SMS_PATH + Integer.toString(userId), opt); return instanceFromJson(response.getStatus(), response.getBody()); }
[ "public", "Hash", "requestSms", "(", "int", "userId", ",", "Map", "<", "String", ",", "String", ">", "options", ")", "throws", "AuthyException", "{", "MapToResponse", "opt", "=", "new", "MapToResponse", "(", "options", ")", ";", "final", "Response", "respons...
Send token via sms to a user with some options defined. @param userId @param options @return Hash instance with API's response.
[ "Send", "token", "via", "sms", "to", "a", "user", "with", "some", "options", "defined", "." ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/Users.java#L80-L84
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java
CloudStorageFileSystemProvider.newByteChannel
@Override public SeekableByteChannel newByteChannel( Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { """ Open a file for reading or writing. To read receiver-pays buckets, specify the BlobSourceOption.userProject option. @param path: the path to the file to...
java
@Override public SeekableByteChannel newByteChannel( Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { checkNotNull(path); initStorage(); CloudStorageUtil.checkNotNullArray(attrs); if (options.contains(StandardOpenOption.WRITE)) { // TODO: Make o...
[ "@", "Override", "public", "SeekableByteChannel", "newByteChannel", "(", "Path", "path", ",", "Set", "<", "?", "extends", "OpenOption", ">", "options", ",", "FileAttribute", "<", "?", ">", "...", "attrs", ")", "throws", "IOException", "{", "checkNotNull", "(",...
Open a file for reading or writing. To read receiver-pays buckets, specify the BlobSourceOption.userProject option. @param path: the path to the file to open or create @param options: options specifying how the file is opened, e.g. StandardOpenOption.WRITE or BlobSourceOption.userProject @param attrs: (not supported, ...
[ "Open", "a", "file", "for", "reading", "or", "writing", ".", "To", "read", "receiver", "-", "pays", "buckets", "specify", "the", "BlobSourceOption", ".", "userProject", "option", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java#L295-L307
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java
MultiLayerNetwork.rnnActivateUsingStoredState
public List<INDArray> rnnActivateUsingStoredState(INDArray input, boolean training, boolean storeLastForTBPTT) { """ Similar to rnnTimeStep and feedForward() methods. Difference here is that this method:<br> (a) like rnnTimeStep does forward pass using stored state for RNN layers, and<br> (b) unlike rnnTimeStep ...
java
public List<INDArray> rnnActivateUsingStoredState(INDArray input, boolean training, boolean storeLastForTBPTT) { return ffToLayerActivationsDetached(training, FwdPassType.RNN_ACTIVATE_WITH_STORED_STATE, storeLastForTBPTT, layers.length-1, input, mask, null, false); }
[ "public", "List", "<", "INDArray", ">", "rnnActivateUsingStoredState", "(", "INDArray", "input", ",", "boolean", "training", ",", "boolean", "storeLastForTBPTT", ")", "{", "return", "ffToLayerActivationsDetached", "(", "training", ",", "FwdPassType", ".", "RNN_ACTIVAT...
Similar to rnnTimeStep and feedForward() methods. Difference here is that this method:<br> (a) like rnnTimeStep does forward pass using stored state for RNN layers, and<br> (b) unlike rnnTimeStep does not modify the RNN layer state<br> Therefore multiple calls to this method with the same input should have the same out...
[ "Similar", "to", "rnnTimeStep", "and", "feedForward", "()", "methods", ".", "Difference", "here", "is", "that", "this", "method", ":", "<br", ">", "(", "a", ")", "like", "rnnTimeStep", "does", "forward", "pass", "using", "stored", "state", "for", "RNN", "l...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/multilayer/MultiLayerNetwork.java#L3137-L3139
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.listTypes
public List<String> listTypes(final DataTypes.TypeCategory category) throws AtlasServiceException { """ Returns all type names with the given category @param category @return list of type names @throws AtlasServiceException """ JSONObject response = callAPIWithRetries(API.LIST_TYPES, null, new Resou...
java
public List<String> listTypes(final DataTypes.TypeCategory category) throws AtlasServiceException { JSONObject response = callAPIWithRetries(API.LIST_TYPES, null, new ResourceCreator() { @Override public WebResource createResource() { WebResource resource = getResource(AP...
[ "public", "List", "<", "String", ">", "listTypes", "(", "final", "DataTypes", ".", "TypeCategory", "category", ")", "throws", "AtlasServiceException", "{", "JSONObject", "response", "=", "callAPIWithRetries", "(", "API", ".", "LIST_TYPES", ",", "null", ",", "new...
Returns all type names with the given category @param category @return list of type names @throws AtlasServiceException
[ "Returns", "all", "type", "names", "with", "the", "given", "category" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L371-L381
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java
XPathQueryBuilder.createLocationStep
private LocationStepQueryNode createLocationStep(SimpleNode node, NAryQueryNode parent) { """ Creates a <code>LocationStepQueryNode</code> at the current position in parent. @param node the current node in the xpath syntax tree. @param parent the parent <code>PathQueryNode</code>. @return the created <code...
java
private LocationStepQueryNode createLocationStep(SimpleNode node, NAryQueryNode parent) { LocationStepQueryNode queryNode = null; boolean descendant = false; Node p = node.jjtGetParent(); for (int i = 0; i < p.jjtGetNumChildren(); i++) { SimpleNode c = (SimpleNode) p.jjtGetCh...
[ "private", "LocationStepQueryNode", "createLocationStep", "(", "SimpleNode", "node", ",", "NAryQueryNode", "parent", ")", "{", "LocationStepQueryNode", "queryNode", "=", "null", ";", "boolean", "descendant", "=", "false", ";", "Node", "p", "=", "node", ".", "jjtGe...
Creates a <code>LocationStepQueryNode</code> at the current position in parent. @param node the current node in the xpath syntax tree. @param parent the parent <code>PathQueryNode</code>. @return the created <code>LocationStepQueryNode</code>.
[ "Creates", "a", "<code", ">", "LocationStepQueryNode<", "/", "code", ">", "at", "the", "current", "position", "in", "parent", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java#L603-L623
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/CipherUtils.java
CipherUtils.generateKeyPair
public static KeyPair generateKeyPair(String algorithm, int keySize) { """ Generate a {@link KeyPair} for the given assymmetric algorithm and keysize Example: CipherUtils.generateKeyPair("RSA", 2048) """ KeyPairGenerator keyPairGenerator; try { keyPairGenerator = KeyPairGenerator...
java
public static KeyPair generateKeyPair(String algorithm, int keySize) { KeyPairGenerator keyPairGenerator; try { keyPairGenerator = KeyPairGenerator.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException(e); } keyP...
[ "public", "static", "KeyPair", "generateKeyPair", "(", "String", "algorithm", ",", "int", "keySize", ")", "{", "KeyPairGenerator", "keyPairGenerator", ";", "try", "{", "keyPairGenerator", "=", "KeyPairGenerator", ".", "getInstance", "(", "algorithm", ")", ";", "}"...
Generate a {@link KeyPair} for the given assymmetric algorithm and keysize Example: CipherUtils.generateKeyPair("RSA", 2048)
[ "Generate", "a", "{", "@link", "KeyPair", "}", "for", "the", "given", "assymmetric", "algorithm", "and", "keysize" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/CipherUtils.java#L173-L182
hal/core
gui/src/main/java/org/jboss/as/console/client/tools/ChildView.java
ChildView.showAddDialog
public void showAddDialog(final ModelNode address, boolean isSingleton, SecurityContext securityContext, ModelNode description) { """ Callback for creation of add dialogs. Will be invoked once the presenter has loaded the resource description. @param address @param isSingleton @param securityContext @param de...
java
public void showAddDialog(final ModelNode address, boolean isSingleton, SecurityContext securityContext, ModelNode description) { String resourceAddress = AddressUtils.asKey(address, isSingleton); if(securityContext.getOperationPriviledge(resourceAddress, "add").isGranted()) { _showAddDial...
[ "public", "void", "showAddDialog", "(", "final", "ModelNode", "address", ",", "boolean", "isSingleton", ",", "SecurityContext", "securityContext", ",", "ModelNode", "description", ")", "{", "String", "resourceAddress", "=", "AddressUtils", ".", "asKey", "(", "addres...
Callback for creation of add dialogs. Will be invoked once the presenter has loaded the resource description. @param address @param isSingleton @param securityContext @param description
[ "Callback", "for", "creation", "of", "add", "dialogs", ".", "Will", "be", "invoked", "once", "the", "presenter", "has", "loaded", "the", "resource", "description", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/tools/ChildView.java#L231-L244
zaproxy/zaproxy
src/org/parosproxy/paros/network/HttpSender.java
HttpSender.followRedirections
private void followRedirections(HttpMessage message, HttpRequestConfig requestConfig) throws IOException { """ Follows redirections using the response of the given {@code message}. The {@code validator} in the given request configuration will be called for each redirection received. After the call to this method ...
java
private void followRedirections(HttpMessage message, HttpRequestConfig requestConfig) throws IOException { HttpRedirectionValidator validator = requestConfig.getRedirectionValidator(); validator.notifyMessageReceived(message); User requestingUser = getUser(message); HttpMessage red...
[ "private", "void", "followRedirections", "(", "HttpMessage", "message", ",", "HttpRequestConfig", "requestConfig", ")", "throws", "IOException", "{", "HttpRedirectionValidator", "validator", "=", "requestConfig", ".", "getRedirectionValidator", "(", ")", ";", "validator",...
Follows redirections using the response of the given {@code message}. The {@code validator} in the given request configuration will be called for each redirection received. After the call to this method the given {@code message} will have the contents of the last response received (possibly the response of a redirectio...
[ "Follows", "redirections", "using", "the", "response", "of", "the", "given", "{", "@code", "message", "}", ".", "The", "{", "@code", "validator", "}", "in", "the", "given", "request", "configuration", "will", "be", "called", "for", "each", "redirection", "re...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpSender.java#L947-L978
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java
GoogleDriveUtils.exportFile
public static DownloadResponse exportFile(Drive drive, String fileId, String format) throws IOException { """ Exports file in requested format @param drive drive client @param fileId id of file to be exported @param format target format @return exported data @throws IOException thrown when exporting fails u...
java
public static DownloadResponse exportFile(Drive drive, String fileId, String format) throws IOException { try (InputStream inputStream = drive.files().export(fileId, format).executeAsInputStream()) { return new DownloadResponse(format, IOUtils.toByteArray(inputStream)); } }
[ "public", "static", "DownloadResponse", "exportFile", "(", "Drive", "drive", ",", "String", "fileId", ",", "String", "format", ")", "throws", "IOException", "{", "try", "(", "InputStream", "inputStream", "=", "drive", ".", "files", "(", ")", ".", "export", "...
Exports file in requested format @param drive drive client @param fileId id of file to be exported @param format target format @return exported data @throws IOException thrown when exporting fails unexpectedly
[ "Exports", "file", "in", "requested", "format" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java#L258-L262
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.element
public JSONObject element( String key, double value ) { """ Put a key/double pair in the JSONObject. @param key A key string. @param value A double which is the value. @return this. @throws JSONException If the key is null or if the number is invalid. """ verifyIsNull(); Double d = new Double...
java
public JSONObject element( String key, double value ) { verifyIsNull(); Double d = new Double( value ); JSONUtils.testValidity( d ); return element( key, d ); }
[ "public", "JSONObject", "element", "(", "String", "key", ",", "double", "value", ")", "{", "verifyIsNull", "(", ")", ";", "Double", "d", "=", "new", "Double", "(", "value", ")", ";", "JSONUtils", ".", "testValidity", "(", "d", ")", ";", "return", "elem...
Put a key/double pair in the JSONObject. @param key A key string. @param value A double which is the value. @return this. @throws JSONException If the key is null or if the number is invalid.
[ "Put", "a", "key", "/", "double", "pair", "in", "the", "JSONObject", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1612-L1617
op4j/op4j
src/main/java/org/op4j/functions/Call.java
Call.setOf
public static <R> Function<Object,Set<R>> setOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) { """ <p> Abbreviation for {{@link #methodForSetOf(Type, String, Object...)}. </p> @since 1.1 @param methodName the name of the method @param optionalParameters the (optio...
java
public static <R> Function<Object,Set<R>> setOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) { return methodForSetOf(resultType, methodName, optionalParameters); }
[ "public", "static", "<", "R", ">", "Function", "<", "Object", ",", "Set", "<", "R", ">", ">", "setOf", "(", "final", "Type", "<", "R", ">", "resultType", ",", "final", "String", "methodName", ",", "final", "Object", "...", "optionalParameters", ")", "{...
<p> Abbreviation for {{@link #methodForSetOf(Type, String, Object...)}. </p> @since 1.1 @param methodName the name of the method @param optionalParameters the (optional) parameters of the method. @return the result of the method execution
[ "<p", ">", "Abbreviation", "for", "{{", "@link", "#methodForSetOf", "(", "Type", "String", "Object", "...", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/Call.java#L676-L678
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/oracle/AbstractOracleQuery.java
AbstractOracleQuery.orderSiblingsBy
@WithBridgeMethods(value = OracleQuery.class, castRequired = true) public C orderSiblingsBy(Expression<?> path) { """ ORDER SIBLINGS BY preserves any ordering specified in the hierarchical query clause and then applies the order_by_clause to the siblings of the hierarchy. @param path path @return the curr...
java
@WithBridgeMethods(value = OracleQuery.class, castRequired = true) public C orderSiblingsBy(Expression<?> path) { return addFlag(Position.BEFORE_ORDER, ORDER_SIBLINGS_BY, path); }
[ "@", "WithBridgeMethods", "(", "value", "=", "OracleQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "C", "orderSiblingsBy", "(", "Expression", "<", "?", ">", "path", ")", "{", "return", "addFlag", "(", "Position", ".", "BEFORE_ORDER", ...
ORDER SIBLINGS BY preserves any ordering specified in the hierarchical query clause and then applies the order_by_clause to the siblings of the hierarchy. @param path path @return the current object
[ "ORDER", "SIBLINGS", "BY", "preserves", "any", "ordering", "specified", "in", "the", "hierarchical", "query", "clause", "and", "then", "applies", "the", "order_by_clause", "to", "the", "siblings", "of", "the", "hierarchy", "." ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/oracle/AbstractOracleQuery.java#L106-L109
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java
SSOCookieHelperImpl.createLogoutCookies
@Override public void createLogoutCookies(HttpServletRequest req, HttpServletResponse res) { """ /* 1) If we have the custom cookie name, then delete just the custom cookie name 2) If we have the custom cookie name but no cookie found, then will delete the default cookie name LTPAToken2 3) If jwtsso is acti...
java
@Override public void createLogoutCookies(HttpServletRequest req, HttpServletResponse res) { createLogoutCookies(req, res, true); }
[ "@", "Override", "public", "void", "createLogoutCookies", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "createLogoutCookies", "(", "req", ",", "res", ",", "true", ")", ";", "}" ]
/* 1) If we have the custom cookie name, then delete just the custom cookie name 2) If we have the custom cookie name but no cookie found, then will delete the default cookie name LTPAToken2 3) If jwtsso is active, clean up those cookies too.
[ "/", "*", "1", ")", "If", "we", "have", "the", "custom", "cookie", "name", "then", "delete", "just", "the", "custom", "cookie", "name", "2", ")", "If", "we", "have", "the", "custom", "cookie", "name", "but", "no", "cookie", "found", "then", "will", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java#L265-L268
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/overlay/Polygon.java
Polygon.onSingleTapConfirmed
@Override public boolean onSingleTapConfirmed(final MotionEvent event, final MapView mapView) { """ Default listener for a single tap event on a Polygon: set the infowindow at the tapped position, and open the infowindow (if any). @param event @param mapView @return true if tapped """ Projection pj = map...
java
@Override public boolean onSingleTapConfirmed(final MotionEvent event, final MapView mapView){ Projection pj = mapView.getProjection(); GeoPoint eventPos = (GeoPoint)pj.fromPixels((int)event.getX(), (int)event.getY()); boolean tapped = contains(event); if (tapped) { if (mOnClickListener == null) { return...
[ "@", "Override", "public", "boolean", "onSingleTapConfirmed", "(", "final", "MotionEvent", "event", ",", "final", "MapView", "mapView", ")", "{", "Projection", "pj", "=", "mapView", ".", "getProjection", "(", ")", ";", "GeoPoint", "eventPos", "=", "(", "GeoPoi...
Default listener for a single tap event on a Polygon: set the infowindow at the tapped position, and open the infowindow (if any). @param event @param mapView @return true if tapped
[ "Default", "listener", "for", "a", "single", "tap", "event", "on", "a", "Polygon", ":", "set", "the", "infowindow", "at", "the", "tapped", "position", "and", "open", "the", "infowindow", "(", "if", "any", ")", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/overlay/Polygon.java#L308-L320