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
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java
MapConstraints.constrainedEntries
private static <K, V> Collection<Entry<K, V>> constrainedEntries( Collection<Entry<K, V>> entries, MapConstraint<? super K, ? super V> constraint) { """ Returns a constrained view of the specified collection (or set) of entries, using the specified constraint. The {@link Entry#setValue} operation will be v...
java
private static <K, V> Collection<Entry<K, V>> constrainedEntries( Collection<Entry<K, V>> entries, MapConstraint<? super K, ? super V> constraint) { if (entries instanceof Set) { return constrainedEntrySet((Set<Entry<K, V>>) entries, constraint); } return new ConstrainedEntries<K, V>(entries, co...
[ "private", "static", "<", "K", ",", "V", ">", "Collection", "<", "Entry", "<", "K", ",", "V", ">", ">", "constrainedEntries", "(", "Collection", "<", "Entry", "<", "K", ",", "V", ">", ">", "entries", ",", "MapConstraint", "<", "?", "super", "K", ",...
Returns a constrained view of the specified collection (or set) of entries, using the specified constraint. The {@link Entry#setValue} operation will be verified with the constraint, along with add operations on the returned collection. The {@code add} and {@code addAll} operations simply forward to the underlying coll...
[ "Returns", "a", "constrained", "view", "of", "the", "specified", "collection", "(", "or", "set", ")", "of", "entries", "using", "the", "specified", "constraint", ".", "The", "{", "@link", "Entry#setValue", "}", "operation", "will", "be", "verified", "with", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/MapConstraints.java#L182-L188
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java
ObjectUtils.deepCopy
public static final Object deepCopy(Object source, final KunderaMetadata kunderaMetadata) { """ Deep copy. @param source the source @param kunderaMetadata the kundera metadata @return the object """ Map<Object, Object> copiedObjectMap = new HashMap<Object, Object>(); Object target = dee...
java
public static final Object deepCopy(Object source, final KunderaMetadata kunderaMetadata) { Map<Object, Object> copiedObjectMap = new HashMap<Object, Object>(); Object target = deepCopyUsingMetadata(source, copiedObjectMap, kunderaMetadata); copiedObjectMap.clear(); copiedObjectMap...
[ "public", "static", "final", "Object", "deepCopy", "(", "Object", "source", ",", "final", "KunderaMetadata", "kunderaMetadata", ")", "{", "Map", "<", "Object", ",", "Object", ">", "copiedObjectMap", "=", "new", "HashMap", "<", "Object", ",", "Object", ">", "...
Deep copy. @param source the source @param kunderaMetadata the kundera metadata @return the object
[ "Deep", "copy", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java#L70-L80
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClasspathUtility.java
ClasspathUtility.checkResource
private static void checkResource(final List<String> resources, final Pattern searchPattern, final String resourceName) { """ Check if the resource match the regex. @param resources the list of found resources @param searchPattern the regex pattern @param resourceName the resource to check and to add """ ...
java
private static void checkResource(final List<String> resources, final Pattern searchPattern, final String resourceName) { if (searchPattern.matcher(resourceName).matches()) { resources.add(resourceName); } }
[ "private", "static", "void", "checkResource", "(", "final", "List", "<", "String", ">", "resources", ",", "final", "Pattern", "searchPattern", ",", "final", "String", "resourceName", ")", "{", "if", "(", "searchPattern", ".", "matcher", "(", "resourceName", ")...
Check if the resource match the regex. @param resources the list of found resources @param searchPattern the regex pattern @param resourceName the resource to check and to add
[ "Check", "if", "the", "resource", "match", "the", "regex", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClasspathUtility.java#L226-L230
dnsjava/dnsjava
org/xbill/DNS/ZoneTransferIn.java
ZoneTransferIn.newIXFR
public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, TSIG key) throws UnknownHostException { """ Instantiates a ZoneTransferIn object to do an IXFR (incremental zone transfer). @param zone The zone to transfer. @param serial The existing serial number. @param fallback If ...
java
public static ZoneTransferIn newIXFR(Name zone, long serial, boolean fallback, String host, TSIG key) throws UnknownHostException { return newIXFR(zone, serial, fallback, host, 0, key); }
[ "public", "static", "ZoneTransferIn", "newIXFR", "(", "Name", "zone", ",", "long", "serial", ",", "boolean", "fallback", ",", "String", "host", ",", "TSIG", "key", ")", "throws", "UnknownHostException", "{", "return", "newIXFR", "(", "zone", ",", "serial", "...
Instantiates a ZoneTransferIn object to do an IXFR (incremental zone transfer). @param zone The zone to transfer. @param serial The existing serial number. @param fallback If true, fall back to AXFR if IXFR is not supported. @param host The host from which to transfer the zone. @param key The TSIG key used to authentic...
[ "Instantiates", "a", "ZoneTransferIn", "object", "to", "do", "an", "IXFR", "(", "incremental", "zone", "transfer", ")", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/ZoneTransferIn.java#L290-L295
datumbox/lpsolve
src/main/java/lpsolve/LpSolve.java
LpSolve.putBbNodefunc
public void putBbNodefunc(BbListener listener, Object userhandle) throws LpSolveException { """ Register an <code>BbNodeListener</code> for callback. @param listener the listener that should be called by lp_solve @param userhandle an arbitrary object that is passed to the listener on call """ bbNodeList...
java
public void putBbNodefunc(BbListener listener, Object userhandle) throws LpSolveException { bbNodeListener = listener; bbNodeUserhandle = (listener != null) ? userhandle : null; addLp(this); registerBbNodefunc(); }
[ "public", "void", "putBbNodefunc", "(", "BbListener", "listener", ",", "Object", "userhandle", ")", "throws", "LpSolveException", "{", "bbNodeListener", "=", "listener", ";", "bbNodeUserhandle", "=", "(", "listener", "!=", "null", ")", "?", "userhandle", ":", "n...
Register an <code>BbNodeListener</code> for callback. @param listener the listener that should be called by lp_solve @param userhandle an arbitrary object that is passed to the listener on call
[ "Register", "an", "<code", ">", "BbNodeListener<", "/", "code", ">", "for", "callback", "." ]
train
https://github.com/datumbox/lpsolve/blob/201b3e99153d907bb99c189e5647bc71a3a1add6/src/main/java/lpsolve/LpSolve.java#L1667-L1672
SonarSource/sonarqube
server/sonar-server-common/src/main/java/org/sonar/server/log/ServerProcessLogging.java
ServerProcessLogging.configureDirectToConsoleLoggers
private void configureDirectToConsoleLoggers(LoggerContext context, String... loggerNames) { """ Setup one or more specified loggers to be non additive and to print to System.out which will be caught by the Main Process and written to sonar.log. """ RootLoggerConfig config = newRootLoggerConfigBuilder() ...
java
private void configureDirectToConsoleLoggers(LoggerContext context, String... loggerNames) { RootLoggerConfig config = newRootLoggerConfigBuilder() .setProcessId(ProcessId.APP) .setThreadIdFieldPattern("") .build(); String logPattern = helper.buildLogPattern(config); ConsoleAppender<ILoggi...
[ "private", "void", "configureDirectToConsoleLoggers", "(", "LoggerContext", "context", ",", "String", "...", "loggerNames", ")", "{", "RootLoggerConfig", "config", "=", "newRootLoggerConfigBuilder", "(", ")", ".", "setProcessId", "(", "ProcessId", ".", "APP", ")", "...
Setup one or more specified loggers to be non additive and to print to System.out which will be caught by the Main Process and written to sonar.log.
[ "Setup", "one", "or", "more", "specified", "loggers", "to", "be", "non", "additive", "and", "to", "print", "to", "System", ".", "out", "which", "will", "be", "caught", "by", "the", "Main", "Process", "and", "written", "to", "sonar", ".", "log", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server-common/src/main/java/org/sonar/server/log/ServerProcessLogging.java#L140-L153
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/ShanksSimulation2DGUI.java
ShanksSimulation2DGUI.addDisplay
public void addDisplay(String displayID, Display2D display) throws ShanksException { """ Add a display to the simulation @param displayID @param display @throws DuplictaedDisplayIDException @throws DuplicatedPortrayalIDException @throws ScenarioNotFoundException """ Scenario2DPortray...
java
public void addDisplay(String displayID, Display2D display) throws ShanksException { Scenario2DPortrayal scenarioPortrayal = (Scenario2DPortrayal) this .getSimulation().getScenarioPortrayal(); HashMap<String, Display2D> displays = scenarioPortrayal.getDisplays(); if (...
[ "public", "void", "addDisplay", "(", "String", "displayID", ",", "Display2D", "display", ")", "throws", "ShanksException", "{", "Scenario2DPortrayal", "scenarioPortrayal", "=", "(", "Scenario2DPortrayal", ")", "this", ".", "getSimulation", "(", ")", ".", "getScenari...
Add a display to the simulation @param displayID @param display @throws DuplictaedDisplayIDException @throws DuplicatedPortrayalIDException @throws ScenarioNotFoundException
[ "Add", "a", "display", "to", "the", "simulation" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/ShanksSimulation2DGUI.java#L320-L330
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST
public OvhOvhPabxDialplanExtension billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST(String billingAccount, String serviceName, Long dialplanId, Boolean enable, Long position, OvhSchedulerCategoryEnum schedulerCategory, OvhOvhPabxDialplanExtensionConditionScreenListTypeEnum screenListType) throws IO...
java
public OvhOvhPabxDialplanExtension billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST(String billingAccount, String serviceName, Long dialplanId, Boolean enable, Long position, OvhSchedulerCategoryEnum schedulerCategory, OvhOvhPabxDialplanExtensionConditionScreenListTypeEnum screenListType) throws IO...
[ "public", "OvhOvhPabxDialplanExtension", "billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "dialplanId", ",", "Boolean", "enable", ",", "Long", "position", ",", "OvhSchedulerCateg...
Create a new extension for a dialplan REST: POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension @param enable [required] True to enable the extension @param schedulerCategory [required] Additionnal conditions will be used from this chosen scheduler category @param position [required]...
[ "Create", "a", "new", "extension", "for", "a", "dialplan" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7351-L7361
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java
FailoverGroupsInner.beginForceFailoverAllowDataLossAsync
public Observable<FailoverGroupInner> beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { """ Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group tha...
java
public Observable<FailoverGroupInner> beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { return beginForceFailoverAllowDataLossWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName).map(new Func1<ServiceResponse<FailoverGroupInner>, ...
[ "public", "Observable", "<", "FailoverGroupInner", ">", "beginForceFailoverAllowDataLossAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "failoverGroupName", ")", "{", "return", "beginForceFailoverAllowDataLossWithServiceResponseAsync", "(...
Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server containing the f...
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", ".", "This", "operation", "might", "result", "in", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java#L1163-L1170
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveDataPost
public static String retrieveDataPost(String sUrl, String encoding, String postRequestBody, String contentType, int timeout) throws IOException { """ Download data from an URL with a POST request, if necessary converting from a character encoding. @param sUrl The full URL used to download the content. @param e...
java
public static String retrieveDataPost(String sUrl, String encoding, String postRequestBody, String contentType, int timeout) throws IOException { return retrieveStringInternalPost(sUrl, encoding, postRequestBody, contentType, timeout, null); }
[ "public", "static", "String", "retrieveDataPost", "(", "String", "sUrl", ",", "String", "encoding", ",", "String", "postRequestBody", ",", "String", "contentType", ",", "int", "timeout", ")", "throws", "IOException", "{", "return", "retrieveStringInternalPost", "(",...
Download data from an URL with a POST request, if necessary converting from a character encoding. @param sUrl The full URL used to download the content. @param encoding An encoding, e.g. UTF-8, ISO-8859-15. Can be null. @param postRequestBody the body of the POST request, e.g. request parameters; must not be null @par...
[ "Download", "data", "from", "an", "URL", "with", "a", "POST", "request", "if", "necessary", "converting", "from", "a", "character", "encoding", "." ]
train
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L188-L190
JadiraOrg/jadira
jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java
BatchedJmsTemplate.receiveBatch
public List<Message> receiveBatch(int batchSize) throws JmsException { """ Receive a batch of up to batchSize. Other than batching this method is the same as {@link JmsTemplate#receive()} @return A list of {@link Message} @param batchSize The batch size @throws JmsException The {@link JmsException} """ ...
java
public List<Message> receiveBatch(int batchSize) throws JmsException { Destination defaultDestination = getDefaultDestination(); if (defaultDestination != null) { return receiveBatch(defaultDestination, batchSize); } else { return receiveBatch(getRequiredDefaultDestinat...
[ "public", "List", "<", "Message", ">", "receiveBatch", "(", "int", "batchSize", ")", "throws", "JmsException", "{", "Destination", "defaultDestination", "=", "getDefaultDestination", "(", ")", ";", "if", "(", "defaultDestination", "!=", "null", ")", "{", "return...
Receive a batch of up to batchSize. Other than batching this method is the same as {@link JmsTemplate#receive()} @return A list of {@link Message} @param batchSize The batch size @throws JmsException The {@link JmsException}
[ "Receive", "a", "batch", "of", "up", "to", "batchSize", ".", "Other", "than", "batching", "this", "method", "is", "the", "same", "as", "{" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java#L121-L130
appium/java-client
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
AppiumServiceBuilder.withArgument
public AppiumServiceBuilder withArgument(ServerArgument argument, String value) { """ Adds a server argument. @param argument is an instance which contains the argument name. @param value A non null string value. (Warn!!!) Boolean arguments have a special moment: the presence of an arguments means "true". ...
java
public AppiumServiceBuilder withArgument(ServerArgument argument, String value) { String argName = argument.getArgument().trim().toLowerCase(); if ("--port".equals(argName) || "-p".equals(argName)) { usingPort(Integer.valueOf(value)); } else if ("--address".equals(argName) || "-a".eq...
[ "public", "AppiumServiceBuilder", "withArgument", "(", "ServerArgument", "argument", ",", "String", "value", ")", "{", "String", "argName", "=", "argument", ".", "getArgument", "(", ")", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ";", "if", "(", ...
Adds a server argument. @param argument is an instance which contains the argument name. @param value A non null string value. (Warn!!!) Boolean arguments have a special moment: the presence of an arguments means "true". At this case an empty string should be defined. @return the self-reference.
[ "Adds", "a", "server", "argument", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java#L265-L277
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java
JCRAssert.assertNodeExistById
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException { """ Asserts that an item, identified by it's unique id, is found in the repository session. @param session the session to be searched @param itemId the item expected to be found @throws Repository...
java
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException { try { session.getNodeByIdentifier(itemId); } catch (final ItemNotFoundException e) { LOG.debug("Item with id {} does not exist", itemId, e); fail(e.getMessa...
[ "public", "static", "void", "assertNodeExistById", "(", "final", "Session", "session", ",", "final", "String", "itemId", ")", "throws", "RepositoryException", "{", "try", "{", "session", ".", "getNodeByIdentifier", "(", "itemId", ")", ";", "}", "catch", "(", "...
Asserts that an item, identified by it's unique id, is found in the repository session. @param session the session to be searched @param itemId the item expected to be found @throws RepositoryException
[ "Asserts", "that", "an", "item", "identified", "by", "it", "s", "unique", "id", "is", "found", "in", "the", "repository", "session", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java#L117-L124
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java
XmlDataProviderImpl.getDataByKeys
@Override public Object[][] getDataByKeys(String[] keys) { """ Generates a two dimensional array for TestNG DataProvider from the XML data representing a map of name value collection filtered by keys. A name value item should use the node name 'item' and a specific child structure since the implementation ...
java
@Override public Object[][] getDataByKeys(String[] keys) { logger.entering(Arrays.toString(keys)); if (null == resource.getCls()) { resource.setCls(KeyValueMap.class); } Object[][] objectArray; try { JAXBContext context = JAXBContext.newInstance(resou...
[ "@", "Override", "public", "Object", "[", "]", "[", "]", "getDataByKeys", "(", "String", "[", "]", "keys", ")", "{", "logger", ".", "entering", "(", "Arrays", ".", "toString", "(", "keys", ")", ")", ";", "if", "(", "null", "==", "resource", ".", "g...
Generates a two dimensional array for TestNG DataProvider from the XML data representing a map of name value collection filtered by keys. A name value item should use the node name 'item' and a specific child structure since the implementation depends on {@link KeyValuePair} class. The structure of an item in collecti...
[ "Generates", "a", "two", "dimensional", "array", "for", "TestNG", "DataProvider", "from", "the", "XML", "data", "representing", "a", "map", "of", "name", "value", "collection", "filtered", "by", "keys", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L262-L285
apache/incubator-druid
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java
DruidQuery.computeAggregations
private static List<Aggregation> computeAggregations( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final boolean finalizeAggregations ) { """ Returns aggregations corresponding to {@...
java
private static List<Aggregation> computeAggregations( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, final DruidQuerySignature querySignature, final RexBuilder rexBuilder, final boolean finalizeAggregations ) { final Aggregate aggregate = Preconditions.c...
[ "private", "static", "List", "<", "Aggregation", ">", "computeAggregations", "(", "final", "PartialDruidQuery", "partialQuery", ",", "final", "PlannerContext", "plannerContext", ",", "final", "DruidQuerySignature", "querySignature", ",", "final", "RexBuilder", "rexBuilder...
Returns aggregations corresponding to {@code aggregate.getAggCallList()}, in the same order. @param partialQuery partial query @param plannerContext planner context @param querySignature source row signature and re-usable virtual column references @param rexBuilder calcite RexBuilder @par...
[ "Returns", "aggregations", "corresponding", "to", "{", "@code", "aggregate", ".", "getAggCallList", "()", "}", "in", "the", "same", "order", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L522-L559
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java
DAOValidatorHelper.isExpressionContainsFunction
public static boolean isExpressionContainsFunction(String expression) { """ Methode permettant de verifier si un chemin contient des Fonctions @param expression Chaine a controler @return Resultat de la verification """ // Si la chaine est vide : false if(expression == null || expression.trim().len...
java
public static boolean isExpressionContainsFunction(String expression) { // Si la chaine est vide : false if(expression == null || expression.trim().length() == 0) { // On retourne false return false; } // On split return isExpressionContainPattern(expression, FUNC_CHAIN_PATTERN); }
[ "public", "static", "boolean", "isExpressionContainsFunction", "(", "String", "expression", ")", "{", "// Si la chaine est vide : false\r", "if", "(", "expression", "==", "null", "||", "expression", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")",...
Methode permettant de verifier si un chemin contient des Fonctions @param expression Chaine a controler @return Resultat de la verification
[ "Methode", "permettant", "de", "verifier", "si", "un", "chemin", "contient", "des", "Fonctions" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/DAOValidatorHelper.java#L554-L565
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIData.java
UIData.queueEvent
@Override public void queueEvent(FacesEvent event) { """ Modify events queued for any child components so that the UIData state will be correctly configured before the event's listeners are executed. <p> Child components or their renderers may register events against those child components. When the listene...
java
@Override public void queueEvent(FacesEvent event) { if (event == null) { throw new NullPointerException("event"); } super.queueEvent(new FacesEventWrapper(event, getRowIndex(), this)); }
[ "@", "Override", "public", "void", "queueEvent", "(", "FacesEvent", "event", ")", "{", "if", "(", "event", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"event\"", ")", ";", "}", "super", ".", "queueEvent", "(", "new", "FacesEventW...
Modify events queued for any child components so that the UIData state will be correctly configured before the event's listeners are executed. <p> Child components or their renderers may register events against those child components. When the listener for that event is eventually invoked, it may expect the uidata's ro...
[ "Modify", "events", "queued", "for", "any", "child", "components", "so", "that", "the", "UIData", "state", "will", "be", "correctly", "configured", "before", "the", "event", "s", "listeners", "are", "executed", ".", "<p", ">", "Child", "components", "or", "t...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIData.java#L1657-L1665
james-hu/jabb-core
src/main/java/net/sf/jabb/util/web/WebApplicationConfiguration.java
WebApplicationConfiguration.cleanUpMenuTree
protected void cleanUpMenuTree(WebMenuItem root, String menuName) { """ Convert MenuItemExt to WebMenuItem, and clean up all data @param root """ List<WebMenuItem> subMenu = root.getSubMenu(); List<WebMenuItem> rootBreadcrumbs = root.getBreadcrumbs(); if (subMenu != null && subMenu.size() > 0){ C...
java
protected void cleanUpMenuTree(WebMenuItem root, String menuName){ List<WebMenuItem> subMenu = root.getSubMenu(); List<WebMenuItem> rootBreadcrumbs = root.getBreadcrumbs(); if (subMenu != null && subMenu.size() > 0){ Collections.sort(subMenu); for (int i = 0; i < subMenu.size(); i++){ WebMenuItem ...
[ "protected", "void", "cleanUpMenuTree", "(", "WebMenuItem", "root", ",", "String", "menuName", ")", "{", "List", "<", "WebMenuItem", ">", "subMenu", "=", "root", ".", "getSubMenu", "(", ")", ";", "List", "<", "WebMenuItem", ">", "rootBreadcrumbs", "=", "root...
Convert MenuItemExt to WebMenuItem, and clean up all data @param root
[ "Convert", "MenuItemExt", "to", "WebMenuItem", "and", "clean", "up", "all", "data" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/web/WebApplicationConfiguration.java#L165-L186
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java
TldTemplateMatching.computeConfidence
public double computeConfidence( int x0 , int y0 , int x1 , int y1 ) { """ Compute a value which indicates how confident the specified region is to be a member of the positive set. The confidence value is from 0 to 1. 1 indicates 100% confidence. Positive and negative templates are used to compute the confide...
java
public double computeConfidence( int x0 , int y0 , int x1 , int y1 ) { computeNccDescriptor(observed,x0,y0,x1,y1); // distance from each set of templates if( templateNegative.size() > 0 && templatePositive.size() > 0 ) { double distancePositive = distance(observed,templatePositive); double distanceNegativ...
[ "public", "double", "computeConfidence", "(", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ")", "{", "computeNccDescriptor", "(", "observed", ",", "x0", ",", "y0", ",", "x1", ",", "y1", ")", ";", "// distance from each set of template...
Compute a value which indicates how confident the specified region is to be a member of the positive set. The confidence value is from 0 to 1. 1 indicates 100% confidence. Positive and negative templates are used to compute the confidence value. Only the point in each set which is closest to the specified region are...
[ "Compute", "a", "value", "which", "indicates", "how", "confident", "the", "specified", "region", "is", "to", "be", "a", "member", "of", "the", "positive", "set", ".", "The", "confidence", "value", "is", "from", "0", "to", "1", ".", "1", "indicates", "100...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTemplateMatching.java#L179-L194
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java
OrdersInner.createOrUpdate
public OrderInner createOrUpdate(String deviceName, String resourceGroupName, OrderInner order) { """ Creates or updates an order. @param deviceName The device name. @param resourceGroupName The resource group name. @param order The order to be created or updated. @throws IllegalArgumentException thrown if p...
java
public OrderInner createOrUpdate(String deviceName, String resourceGroupName, OrderInner order) { return createOrUpdateWithServiceResponseAsync(deviceName, resourceGroupName, order).toBlocking().last().body(); }
[ "public", "OrderInner", "createOrUpdate", "(", "String", "deviceName", ",", "String", "resourceGroupName", ",", "OrderInner", "order", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroupName", ",", "order", ")", ".", "t...
Creates or updates an order. @param deviceName The device name. @param resourceGroupName The resource group name. @param order The order to be created or updated. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Runtime...
[ "Creates", "or", "updates", "an", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java#L315-L317
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.createGroup
public Group createGroup(Group group, AccessToken accessToken) { """ saves the given {@link Group} to the OSIAM DB. @param group group to be saved @param accessToken the OSIAM access token from for the current session @return the same group Object like the given but with filled metadata and a new valid ...
java
public Group createGroup(Group group, AccessToken accessToken) { return getGroupService().createGroup(group, accessToken); }
[ "public", "Group", "createGroup", "(", "Group", "group", ",", "AccessToken", "accessToken", ")", "{", "return", "getGroupService", "(", ")", ".", "createGroup", "(", "group", ",", "accessToken", ")", ";", "}" ]
saves the given {@link Group} to the OSIAM DB. @param group group to be saved @param accessToken the OSIAM access token from for the current session @return the same group Object like the given but with filled metadata and a new valid id @throws UnauthorizedException if the request could not be autho...
[ "saves", "the", "given", "{", "@link", "Group", "}", "to", "the", "OSIAM", "DB", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L470-L472
lucee/Lucee
core/src/main/java/lucee/commons/lang/ClassUtil.java
ClassUtil.loadInstance
public static Object loadInstance(Class clazz, Object[] args, Object defaultValue) { """ loads a class from a String classname @param clazz class to load @param args @return matching Class """ if (args == null || args.length == 0) return loadInstance(clazz, defaultValue); try { Class[] cArgs = new ...
java
public static Object loadInstance(Class clazz, Object[] args, Object defaultValue) { if (args == null || args.length == 0) return loadInstance(clazz, defaultValue); try { Class[] cArgs = new Class[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] == null) cArgs[i] = Object.class; else cA...
[ "public", "static", "Object", "loadInstance", "(", "Class", "clazz", ",", "Object", "[", "]", "args", ",", "Object", "defaultValue", ")", "{", "if", "(", "args", "==", "null", "||", "args", ".", "length", "==", "0", ")", "return", "loadInstance", "(", ...
loads a class from a String classname @param clazz class to load @param args @return matching Class
[ "loads", "a", "class", "from", "a", "String", "classname" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ClassUtil.java#L485-L502
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java
SmilesValencyChecker.couldMatchAtomType
public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) { """ Determines if the atom can be of type AtomType. That is, it sees if this AtomType only differs in bond orders, or implicit hydrogen count. """ logger.debug("couldMatchAtomType: ... matc...
java
public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) { logger.debug("couldMatchAtomType: ... matching atom ", atom, " vs ", type); int hcount = atom.getImplicitHydrogenCount(); int charge = atom.getFormalCharge(); if (charge == ty...
[ "public", "boolean", "couldMatchAtomType", "(", "IAtom", "atom", ",", "double", "bondOrderSum", ",", "IBond", ".", "Order", "maxBondOrder", ",", "IAtomType", "type", ")", "{", "logger", ".", "debug", "(", "\"couldMatchAtomType: ... matching atom \"", ",", "atom", ...
Determines if the atom can be of type AtomType. That is, it sees if this AtomType only differs in bond orders, or implicit hydrogen count.
[ "Determines", "if", "the", "atom", "can", "be", "of", "type", "AtomType", ".", "That", "is", "it", "sees", "if", "this", "AtomType", "only", "differs", "in", "bond", "orders", "or", "implicit", "hydrogen", "count", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L232-L256
JOML-CI/JOML
src/org/joml/Vector3f.java
Vector3f.set
public Vector3f set(int index, FloatBuffer buffer) { """ Read this vector from the supplied {@link FloatBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given FloatBuffer. @param index the absolute position into the FloatBuffer @param ...
java
public Vector3f set(int index, FloatBuffer buffer) { MemUtil.INSTANCE.get(this, index, buffer); return this; }
[ "public", "Vector3f", "set", "(", "int", "index", ",", "FloatBuffer", "buffer", ")", "{", "MemUtil", ".", "INSTANCE", ".", "get", "(", "this", ",", "index", ",", "buffer", ")", ";", "return", "this", ";", "}" ]
Read this vector from the supplied {@link FloatBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given FloatBuffer. @param index the absolute position into the FloatBuffer @param buffer values will be read in <code>x, y, z</code> order @return this
[ "Read", "this", "vector", "from", "the", "supplied", "{", "@link", "FloatBuffer", "}", "starting", "at", "the", "specified", "absolute", "buffer", "position", "/", "index", ".", "<p", ">", "This", "method", "will", "not", "increment", "the", "position", "of"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3f.java#L392-L395
Alluxio/alluxio
core/server/common/src/main/java/alluxio/master/journal/ufs/UfsJournalGarbageCollector.java
UfsJournalGarbageCollector.gcFileIfStale
private void gcFileIfStale(UfsJournalFile file, long checkpointSequenceNumber) { """ Garbage collects a file if necessary. @param file the file @param checkpointSequenceNumber the first sequence number that has not been checkpointed """ if (file.getEnd() > checkpointSequenceNumber && !file.isTmpCheckpo...
java
private void gcFileIfStale(UfsJournalFile file, long checkpointSequenceNumber) { if (file.getEnd() > checkpointSequenceNumber && !file.isTmpCheckpoint()) { return; } long lastModifiedTimeMs; try { lastModifiedTimeMs = mUfs.getFileStatus(file.getLocation().toString()).getLastModifiedTime(); ...
[ "private", "void", "gcFileIfStale", "(", "UfsJournalFile", "file", ",", "long", "checkpointSequenceNumber", ")", "{", "if", "(", "file", ".", "getEnd", "(", ")", ">", "checkpointSequenceNumber", "&&", "!", "file", ".", "isTmpCheckpoint", "(", ")", ")", "{", ...
Garbage collects a file if necessary. @param file the file @param checkpointSequenceNumber the first sequence number that has not been checkpointed
[ "Garbage", "collects", "a", "file", "if", "necessary", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/master/journal/ufs/UfsJournalGarbageCollector.java#L118-L138
vlingo/vlingo-actors
src/main/java/io/vlingo/actors/Stage.java
Stage.allocateMailbox
private Mailbox allocateMailbox(final Definition definition, final Address address, final Mailbox maybeMailbox) { """ Answers a Mailbox for an Actor. If maybeMailbox is allocated answer it; otherwise answer a newly allocated Mailbox. (INTERNAL ONLY) @param definition the Definition of the newly created Actor @p...
java
private Mailbox allocateMailbox(final Definition definition, final Address address, final Mailbox maybeMailbox) { final Mailbox mailbox = maybeMailbox != null ? maybeMailbox : ActorFactory.actorMailbox(this, address, definition); return mailbox; }
[ "private", "Mailbox", "allocateMailbox", "(", "final", "Definition", "definition", ",", "final", "Address", "address", ",", "final", "Mailbox", "maybeMailbox", ")", "{", "final", "Mailbox", "mailbox", "=", "maybeMailbox", "!=", "null", "?", "maybeMailbox", ":", ...
Answers a Mailbox for an Actor. If maybeMailbox is allocated answer it; otherwise answer a newly allocated Mailbox. (INTERNAL ONLY) @param definition the Definition of the newly created Actor @param address the Address allocated to the Actor @param maybeMailbox the possible Mailbox @return Mailbox
[ "Answers", "a", "Mailbox", "for", "an", "Actor", ".", "If", "maybeMailbox", "is", "allocated", "answer", "it", ";", "otherwise", "answer", "a", "newly", "allocated", "Mailbox", ".", "(", "INTERNAL", "ONLY", ")" ]
train
https://github.com/vlingo/vlingo-actors/blob/c7d046fd139c0490cf0fd2588d7dc2f792f13493/src/main/java/io/vlingo/actors/Stage.java#L573-L577
jbehave/jbehave-core
jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
StoryRunner.storyOfPath
public Story storyOfPath(Configuration configuration, String storyPath) { """ Returns the parsed story from the given path @param configuration the Configuration used to run story @param storyPath the story path @return The parsed Story """ String storyAsText = configuration.storyLoader().loadStor...
java
public Story storyOfPath(Configuration configuration, String storyPath) { String storyAsText = configuration.storyLoader().loadStoryAsText(storyPath); return configuration.storyParser().parseStory(storyAsText, storyPath); }
[ "public", "Story", "storyOfPath", "(", "Configuration", "configuration", ",", "String", "storyPath", ")", "{", "String", "storyAsText", "=", "configuration", ".", "storyLoader", "(", ")", ".", "loadStoryAsText", "(", "storyPath", ")", ";", "return", "configuration...
Returns the parsed story from the given path @param configuration the Configuration used to run story @param storyPath the story path @return The parsed Story
[ "Returns", "the", "parsed", "story", "from", "the", "given", "path" ]
train
https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java#L195-L198
leadware/jpersistence-tools
jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java
RestrictionsContainer.addEq
public <Y extends Comparable<? super Y>> RestrictionsContainer addEq(String property, Y value) { """ Methode d'ajout de la restriction Eq @param property Nom de la Propriete @param value Valeur de la propriete @param <Y> Type de valeur @return Conteneur """ // Ajout de la restriction restrictions...
java
public <Y extends Comparable<? super Y>> RestrictionsContainer addEq(String property, Y value) { // Ajout de la restriction restrictions.add(new Eq<Y>(property, value)); // On retourne le conteneur return this; }
[ "public", "<", "Y", "extends", "Comparable", "<", "?", "super", "Y", ">", ">", "RestrictionsContainer", "addEq", "(", "String", "property", ",", "Y", "value", ")", "{", "// Ajout de la restriction\r", "restrictions", ".", "add", "(", "new", "Eq", "<", "Y", ...
Methode d'ajout de la restriction Eq @param property Nom de la Propriete @param value Valeur de la propriete @param <Y> Type de valeur @return Conteneur
[ "Methode", "d", "ajout", "de", "la", "restriction", "Eq" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L89-L96
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java
AbstractRedisStorage.checkExists
public boolean checkExists(JobKey jobKey, T jedis) { """ Check if the job identified by the given key exists in storage @param jobKey the key of the desired job @param jedis a thread-safe Redis connection @return true if the job exists; false otherwise """ return jedis.exists(redisSchema.jobHashKey(...
java
public boolean checkExists(JobKey jobKey, T jedis){ return jedis.exists(redisSchema.jobHashKey(jobKey)); }
[ "public", "boolean", "checkExists", "(", "JobKey", "jobKey", ",", "T", "jedis", ")", "{", "return", "jedis", ".", "exists", "(", "redisSchema", ".", "jobHashKey", "(", "jobKey", ")", ")", ";", "}" ]
Check if the job identified by the given key exists in storage @param jobKey the key of the desired job @param jedis a thread-safe Redis connection @return true if the job exists; false otherwise
[ "Check", "if", "the", "job", "identified", "by", "the", "given", "key", "exists", "in", "storage" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java#L353-L355
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java
TransformersLogger.logAttributeWarning
public void logAttributeWarning(PathAddress address, ModelNode operation, String message, String attribute) { """ Log a warning for the given operation at the provided address for the given attribute, using the provided detail message. @param address where warning occurred @param operation where which probl...
java
public void logAttributeWarning(PathAddress address, ModelNode operation, String message, String attribute) { messageQueue.add(new AttributeLogEntry(address, operation, message, attribute)); }
[ "public", "void", "logAttributeWarning", "(", "PathAddress", "address", ",", "ModelNode", "operation", ",", "String", "message", ",", "String", "attribute", ")", "{", "messageQueue", ".", "add", "(", "new", "AttributeLogEntry", "(", "address", ",", "operation", ...
Log a warning for the given operation at the provided address for the given attribute, using the provided detail message. @param address where warning occurred @param operation where which problem occurred @param message custom error message to append @param attribute attribute we that has problem
[ "Log", "a", "warning", "for", "the", "given", "operation", "at", "the", "provided", "address", "for", "the", "given", "attribute", "using", "the", "provided", "detail", "message", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L147-L149
aerogear/aerogear-android-pipe
library/src/main/java/org/jboss/aerogear/android/pipe/PipeManager.java
PipeManager.getPipe
public static LoaderPipe getPipe(String name, android.support.v4.app.Fragment fragment, Context applicationContext) { """ Look up for a pipe object. This will wrap the Pipe in a Loader. @param name the name of the actual pipe @param fragment the Fragment whose lifecycle the activity will follow @param applica...
java
public static LoaderPipe getPipe(String name, android.support.v4.app.Fragment fragment, Context applicationContext) { Pipe pipe = pipes.get(name); LoaderAdapter adapter = new LoaderAdapter(fragment, applicationContext, pipe, name); adapter.setLoaderIds(loaderIdsForNamed); return adapter;...
[ "public", "static", "LoaderPipe", "getPipe", "(", "String", "name", ",", "android", ".", "support", ".", "v4", ".", "app", ".", "Fragment", "fragment", ",", "Context", "applicationContext", ")", "{", "Pipe", "pipe", "=", "pipes", ".", "get", "(", "name", ...
Look up for a pipe object. This will wrap the Pipe in a Loader. @param name the name of the actual pipe @param fragment the Fragment whose lifecycle the activity will follow @param applicationContext the Context of the application. @return the new created Pipe object
[ "Look", "up", "for", "a", "pipe", "object", ".", "This", "will", "wrap", "the", "Pipe", "in", "a", "Loader", "." ]
train
https://github.com/aerogear/aerogear-android-pipe/blob/ac747965c2d06d6ad46dd8abfbabf3d793f06fa5/library/src/main/java/org/jboss/aerogear/android/pipe/PipeManager.java#L152-L157
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/util/dbextractor/MithraObjectGraphExtractor.java
MithraObjectGraphExtractor.addRelationshipFilter
public void addRelationshipFilter(RelatedFinder relatedFinder, Operation filter) { """ Add a filter to be applied to the result of a traversed relationship. @param relatedFinder - the relationship to apply the filter to @param filter - the filter to apply """ Operation existing = this.filters.get(...
java
public void addRelationshipFilter(RelatedFinder relatedFinder, Operation filter) { Operation existing = this.filters.get(relatedFinder); this.filters.put(relatedFinder, existing == null ? filter : existing.or(filter)); }
[ "public", "void", "addRelationshipFilter", "(", "RelatedFinder", "relatedFinder", ",", "Operation", "filter", ")", "{", "Operation", "existing", "=", "this", ".", "filters", ".", "get", "(", "relatedFinder", ")", ";", "this", ".", "filters", ".", "put", "(", ...
Add a filter to be applied to the result of a traversed relationship. @param relatedFinder - the relationship to apply the filter to @param filter - the filter to apply
[ "Add", "a", "filter", "to", "be", "applied", "to", "the", "result", "of", "a", "traversed", "relationship", "." ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/util/dbextractor/MithraObjectGraphExtractor.java#L117-L121
groupon/odo
client/src/main/java/com/groupon/odo/client/PathValueClient.java
PathValueClient.setCustomResponse
public boolean setCustomResponse(String pathValue, String requestType, String customData) { """ Sets a custom response on an endpoint @param pathValue path (endpoint) value @param requestType path request type. "GET", "POST", etc @param customData custom response data @return true if success, false otherwise...
java
public boolean setCustomResponse(String pathValue, String requestType, String customData) { try { JSONObject path = getPathFromEndpoint(pathValue, requestType); if (path == null) { String pathName = pathValue; createPath(pathName, pathValue, requestType); ...
[ "public", "boolean", "setCustomResponse", "(", "String", "pathValue", ",", "String", "requestType", ",", "String", "customData", ")", "{", "try", "{", "JSONObject", "path", "=", "getPathFromEndpoint", "(", "pathValue", ",", "requestType", ")", ";", "if", "(", ...
Sets a custom response on an endpoint @param pathValue path (endpoint) value @param requestType path request type. "GET", "POST", etc @param customData custom response data @return true if success, false otherwise
[ "Sets", "a", "custom", "response", "on", "an", "endpoint" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/PathValueClient.java#L125-L141
zackpollard/JavaTelegramBot-API
core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java
TelegramBot.editMessageText
public Message editMessageText(String chatId, Long messageId, String text, ParseMode parseMode, boolean disableWebPagePreview, InlineReplyMarkup inlineReplyMarkup) { """ This allows you to edit the text of a message you have already sent previously @param chatId The chat ID of the chat contai...
java
public Message editMessageText(String chatId, Long messageId, String text, ParseMode parseMode, boolean disableWebPagePreview, InlineReplyMarkup inlineReplyMarkup) { if(chatId != null && messageId != null && text != null) { JSONObject jsonResponse = this.editMessageText(chatId, messageId, null, te...
[ "public", "Message", "editMessageText", "(", "String", "chatId", ",", "Long", "messageId", ",", "String", "text", ",", "ParseMode", "parseMode", ",", "boolean", "disableWebPagePreview", ",", "InlineReplyMarkup", "inlineReplyMarkup", ")", "{", "if", "(", "chatId", ...
This allows you to edit the text of a message you have already sent previously @param chatId The chat ID of the chat containing the message you want to edit @param messageId The message ID of the message you want to edit @param text The new text you want to displ...
[ "This", "allows", "you", "to", "edit", "the", "text", "of", "a", "message", "you", "have", "already", "sent", "previously" ]
train
https://github.com/zackpollard/JavaTelegramBot-API/blob/9d100f351824042ca5fc0ea735d1fa376a13e81d/core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java#L685-L698
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java
MojoHelper.validateToolPath
public static void validateToolPath( File toolPath, String toolName, Log logger ) throws FileNotFoundException { """ Validates the path to a command-line tool. @param toolPath the configured tool path from the POM @param toolName the name of the tool, used for logging messages @param logger a Log t...
java
public static void validateToolPath( File toolPath, String toolName, Log logger ) throws FileNotFoundException { logger.debug( "Validating path for " + toolName ); if ( toolPath == null ) { logger.error( "Missing " + toolName + " path" ); throw n...
[ "public", "static", "void", "validateToolPath", "(", "File", "toolPath", ",", "String", "toolName", ",", "Log", "logger", ")", "throws", "FileNotFoundException", "{", "logger", ".", "debug", "(", "\"Validating path for \"", "+", "toolName", ")", ";", "if", "(", ...
Validates the path to a command-line tool. @param toolPath the configured tool path from the POM @param toolName the name of the tool, used for logging messages @param logger a Log to write messages to @throws FileNotFoundException if the tool cannot be found
[ "Validates", "the", "path", "to", "a", "command", "-", "line", "tool", "." ]
train
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java#L48-L66
google/closure-compiler
src/com/google/javascript/jscomp/parsing/parser/Parser.java
Parser.reportError
@FormatMethod private void reportError(Token token, @FormatString String message, Object... arguments) { """ Reports an error message at a given token. @param token The location to report the message at. @param message The message to report in String.format style. @param arguments The arguments to fill in the...
java
@FormatMethod private void reportError(Token token, @FormatString String message, Object... arguments) { if (token == null) { reportError(message, arguments); } else { errorReporter.reportError(token.getStart(), message, arguments); } }
[ "@", "FormatMethod", "private", "void", "reportError", "(", "Token", "token", ",", "@", "FormatString", "String", "message", ",", "Object", "...", "arguments", ")", "{", "if", "(", "token", "==", "null", ")", "{", "reportError", "(", "message", ",", "argum...
Reports an error message at a given token. @param token The location to report the message at. @param message The message to report in String.format style. @param arguments The arguments to fill in the message format.
[ "Reports", "an", "error", "message", "at", "a", "given", "token", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/parser/Parser.java#L4227-L4234
cdk/cdk
app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java
DepictionGenerator.withAtomNumbers
public DepictionGenerator withAtomNumbers() { """ Display atom numbers on the molecule or reaction. The numbers are based on the ordering of atoms in the molecule data structure and not a systematic system such as IUPAC numbering. Note: A depiction can not have both atom numbers and atom maps visible (but th...
java
public DepictionGenerator withAtomNumbers() { if (annotateAtomMap || annotateAtomVal) throw new IllegalArgumentException("Can not annotated atom numbers, atom values or maps are already annotated"); DepictionGenerator copy = new DepictionGenerator(this); copy.annotateAtomNum = true; ...
[ "public", "DepictionGenerator", "withAtomNumbers", "(", ")", "{", "if", "(", "annotateAtomMap", "||", "annotateAtomVal", ")", "throw", "new", "IllegalArgumentException", "(", "\"Can not annotated atom numbers, atom values or maps are already annotated\"", ")", ";", "DepictionGe...
Display atom numbers on the molecule or reaction. The numbers are based on the ordering of atoms in the molecule data structure and not a systematic system such as IUPAC numbering. Note: A depiction can not have both atom numbers and atom maps visible (but this can be achieved by manually setting the annotation). @re...
[ "Display", "atom", "numbers", "on", "the", "molecule", "or", "reaction", ".", "The", "numbers", "are", "based", "on", "the", "ordering", "of", "atoms", "in", "the", "molecule", "data", "structure", "and", "not", "a", "systematic", "system", "such", "as", "...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java#L771-L777
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.columnNameAsBytes
private ByteBuffer columnNameAsBytes(String column, String columnFamily) { """ Converts column name into byte[] according to comparator type @param column - column name from parser @param columnFamily - column family name from parser @return ByteBuffer - bytes into which column name was converted according to c...
java
private ByteBuffer columnNameAsBytes(String column, String columnFamily) { CfDef columnFamilyDef = getCfDef(columnFamily); return columnNameAsBytes(column, columnFamilyDef); }
[ "private", "ByteBuffer", "columnNameAsBytes", "(", "String", "column", ",", "String", "columnFamily", ")", "{", "CfDef", "columnFamilyDef", "=", "getCfDef", "(", "columnFamily", ")", ";", "return", "columnNameAsBytes", "(", "column", ",", "columnFamilyDef", ")", "...
Converts column name into byte[] according to comparator type @param column - column name from parser @param columnFamily - column family name from parser @return ByteBuffer - bytes into which column name was converted according to comparator type
[ "Converts", "column", "name", "into", "byte", "[]", "according", "to", "comparator", "type" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2572-L2576
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/processing/JavacFiler.java
JavacFiler.closeFileObject
private void closeFileObject(String typeName, FileObject fileObject) { """ Upon close, register files opened by create{Source, Class}File for annotation processing. """ /* * If typeName is non-null, the file object was opened as a * source or class file by the user. If a file was op...
java
private void closeFileObject(String typeName, FileObject fileObject) { /* * If typeName is non-null, the file object was opened as a * source or class file by the user. If a file was opened as * a resource, typeName will be null and the file is *not* * subject to annotation ...
[ "private", "void", "closeFileObject", "(", "String", "typeName", ",", "FileObject", "fileObject", ")", "{", "/*\n * If typeName is non-null, the file object was opened as a\n * source or class file by the user. If a file was opened as\n * a resource, typeName will be n...
Upon close, register files opened by create{Source, Class}File for annotation processing.
[ "Upon", "close", "register", "files", "opened", "by", "create", "{", "Source", "Class", "}", "File", "for", "annotation", "processing", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java#L613-L640
google/closure-templates
java/src/com/google/template/soy/msgs/internal/IcuSyntaxUtils.java
IcuSyntaxUtils.getPluralOpenString
private static String getPluralOpenString(String varName, int offset) { """ Gets the opening (left) string for a plural statement. @param varName The plural var name. @param offset The offset. @return the ICU syntax string for the plural opening string. """ StringBuilder openingPartSb = new StringBuil...
java
private static String getPluralOpenString(String varName, int offset) { StringBuilder openingPartSb = new StringBuilder(); openingPartSb.append('{').append(varName).append(",plural,"); if (offset != 0) { openingPartSb.append("offset:").append(offset).append(' '); } return openingPartSb.toStrin...
[ "private", "static", "String", "getPluralOpenString", "(", "String", "varName", ",", "int", "offset", ")", "{", "StringBuilder", "openingPartSb", "=", "new", "StringBuilder", "(", ")", ";", "openingPartSb", ".", "append", "(", "'", "'", ")", ".", "append", "...
Gets the opening (left) string for a plural statement. @param varName The plural var name. @param offset The offset. @return the ICU syntax string for the plural opening string.
[ "Gets", "the", "opening", "(", "left", ")", "string", "for", "a", "plural", "statement", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/msgs/internal/IcuSyntaxUtils.java#L267-L274
alkacon/opencms-core
src/org/opencms/importexport/CmsExport.java
CmsExport.addRelationNode
protected void addRelationNode(Element relationsElement, String structureId, String sitePath, String relationType) { """ Adds a relation node to the <code>manifest.xml</code>.<p> @param relationsElement the parent element to append the node to @param structureId the structure id of the target relation @param ...
java
protected void addRelationNode(Element relationsElement, String structureId, String sitePath, String relationType) { if ((structureId != null) && (sitePath != null) && (relationType != null)) { Element relationElement = relationsElement.addElement(CmsImportVersion10.N_RELATION); relati...
[ "protected", "void", "addRelationNode", "(", "Element", "relationsElement", ",", "String", "structureId", ",", "String", "sitePath", ",", "String", "relationType", ")", "{", "if", "(", "(", "structureId", "!=", "null", ")", "&&", "(", "sitePath", "!=", "null",...
Adds a relation node to the <code>manifest.xml</code>.<p> @param relationsElement the parent element to append the node to @param structureId the structure id of the target relation @param sitePath the site path of the target relation @param relationType the type of the relation
[ "Adds", "a", "relation", "node", "to", "the", "<code", ">", "manifest", ".", "xml<", "/", "code", ">", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExport.java#L470-L479
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_firewall_duration_POST
public OvhOrder dedicated_server_serviceName_firewall_duration_POST(String serviceName, String duration, OvhFirewallModelEnum firewallModel) throws IOException { """ Create order REST: POST /order/dedicated/server/{serviceName}/firewall/{duration} @param firewallModel [required] Firewall type @param serviceNa...
java
public OvhOrder dedicated_server_serviceName_firewall_duration_POST(String serviceName, String duration, OvhFirewallModelEnum firewallModel) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/firewall/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Objec...
[ "public", "OvhOrder", "dedicated_server_serviceName_firewall_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhFirewallModelEnum", "firewallModel", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName...
Create order REST: POST /order/dedicated/server/{serviceName}/firewall/{duration} @param firewallModel [required] Firewall type @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2802-L2809
javalite/activejdbc
javalite-common/src/main/java/org/javalite/common/Templator.java
Templator.mergeFromTemplate
public static String mergeFromTemplate(String template, Map<String, ?> values) { """ Merges from string as template. @param template template content, with placeholders like: {{name}} @param values map with values to merge """ for (String param : values.keySet()) { template = template....
java
public static String mergeFromTemplate(String template, Map<String, ?> values) { for (String param : values.keySet()) { template = template.replace("{{" + param + "}}", values.get(param) == null ? "" : values.get(param).toString()); } return template.replaceAll("\n|\r| ", ""); }
[ "public", "static", "String", "mergeFromTemplate", "(", "String", "template", ",", "Map", "<", "String", ",", "?", ">", "values", ")", "{", "for", "(", "String", "param", ":", "values", ".", "keySet", "(", ")", ")", "{", "template", "=", "template", "....
Merges from string as template. @param template template content, with placeholders like: {{name}} @param values map with values to merge
[ "Merges", "from", "string", "as", "template", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/common/Templator.java#L91-L96
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/util/cluster/ClusterManager.java
ClusterManager.launchAuto
public void launchAuto(boolean active) { """ Allows the management thread to passively take part in the cluster operations. Other cluster members will not be made aware of this instance. """ killAuto(); if (mSock != null) { try { mAuto = new AutomaticClusterManagem...
java
public void launchAuto(boolean active) { killAuto(); if (mSock != null) { try { mAuto = new AutomaticClusterManagementThread(this, mCluster .getClusterName(), ...
[ "public", "void", "launchAuto", "(", "boolean", "active", ")", "{", "killAuto", "(", ")", ";", "if", "(", "mSock", "!=", "null", ")", "{", "try", "{", "mAuto", "=", "new", "AutomaticClusterManagementThread", "(", "this", ",", "mCluster", ".", "getClusterNa...
Allows the management thread to passively take part in the cluster operations. Other cluster members will not be made aware of this instance.
[ "Allows", "the", "management", "thread", "to", "passively", "take", "part", "in", "the", "cluster", "operations", ".", "Other", "cluster", "members", "will", "not", "be", "made", "aware", "of", "this", "instance", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/util/cluster/ClusterManager.java#L440-L455
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpMethodBase.java
HttpMethodBase.writeRequestHeaders
protected void writeRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { """ Writes the request headers to the given {@link HttpConnection connection}. <p> This implementation invokes {@link #addRequestHeaders(HttpState,HttpConnection)}, and then writes each header to t...
java
protected void writeRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.writeRequestHeaders(HttpState," + "HttpConnection)"); addRequestHeaders(state, conn); String charset = getParams().getHttpElementCharset()...
[ "protected", "void", "writeRequestHeaders", "(", "HttpState", "state", ",", "HttpConnection", "conn", ")", "throws", "IOException", ",", "HttpException", "{", "LOG", ".", "trace", "(", "\"enter HttpMethodBase.writeRequestHeaders(HttpState,\"", "+", "\"HttpConnection)\"", ...
Writes the request headers to the given {@link HttpConnection connection}. <p> This implementation invokes {@link #addRequestHeaders(HttpState,HttpConnection)}, and then writes each header to the request stream. </p> <p> Subclasses may want to override this method to to customize the processing. </p> @param state th...
[ "Writes", "the", "request", "headers", "to", "the", "given", "{", "@link", "HttpConnection", "connection", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpMethodBase.java#L2305-L2321
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/position/PositionAlignmentOptions.java
PositionAlignmentOptions.setVerticalAlignment
public PositionAlignmentOptions setVerticalAlignment(PositionRelation verticalAlignment, int offsetTop) { """ Set the verticalAlignment property with an offset. One of TOP, CENTER, BOTTOM. @param verticalAlignment @param offsetTop @return the instance """ switch (verticalAlignment) { case TOP: c...
java
public PositionAlignmentOptions setVerticalAlignment(PositionRelation verticalAlignment, int offsetTop) { switch (verticalAlignment) { case TOP: case CENTER: case BOTTOM: break; default: throw new IllegalArgumentException("Illegal value for the vertical alignment property"); } this.vertica...
[ "public", "PositionAlignmentOptions", "setVerticalAlignment", "(", "PositionRelation", "verticalAlignment", ",", "int", "offsetTop", ")", "{", "switch", "(", "verticalAlignment", ")", "{", "case", "TOP", ":", "case", "CENTER", ":", "case", "BOTTOM", ":", "break", ...
Set the verticalAlignment property with an offset. One of TOP, CENTER, BOTTOM. @param verticalAlignment @param offsetTop @return the instance
[ "Set", "the", "verticalAlignment", "property", "with", "an", "offset", ".", "One", "of", "TOP", "CENTER", "BOTTOM", "." ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/position/PositionAlignmentOptions.java#L289-L304
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java
SharedPreferencesItem.storeOriginal
private void storeOriginal(Pair<String, Object> keyValue) { """ Store original value before it's changed in test mode. It will take care not to over write if original value is already stored. @param keyValue : Pair of key and original value. """ String key = SharedPreferenceUtils.keyTestMode + keyValue.f...
java
private void storeOriginal(Pair<String, Object> keyValue) { String key = SharedPreferenceUtils.keyTestMode + keyValue.first; if (!preferenceUtils.isValueExistForKey(key)) { preferenceUtils.put(key, keyValue.second); } }
[ "private", "void", "storeOriginal", "(", "Pair", "<", "String", ",", "Object", ">", "keyValue", ")", "{", "String", "key", "=", "SharedPreferenceUtils", ".", "keyTestMode", "+", "keyValue", ".", "first", ";", "if", "(", "!", "preferenceUtils", ".", "isValueE...
Store original value before it's changed in test mode. It will take care not to over write if original value is already stored. @param keyValue : Pair of key and original value.
[ "Store", "original", "value", "before", "it", "s", "changed", "in", "test", "mode", ".", "It", "will", "take", "care", "not", "to", "over", "write", "if", "original", "value", "is", "already", "stored", "." ]
train
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/fragments/SharedPreferencesItem.java#L373-L380
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/shared/core/types/Color.java
Color.rgbToBrowserHexColor
public static final String rgbToBrowserHexColor(final int r, final int g, final int b) { """ Converts RGB to hex browser-compliance color, e.g. "#1234EF" @param r int between 0 and 255 @param g int between 0 and 255 @param b int between 0 and 255 @return String """ return "#" + toBrowserHexValue(...
java
public static final String rgbToBrowserHexColor(final int r, final int g, final int b) { return "#" + toBrowserHexValue(r) + toBrowserHexValue(g) + toBrowserHexValue(b); }
[ "public", "static", "final", "String", "rgbToBrowserHexColor", "(", "final", "int", "r", ",", "final", "int", "g", ",", "final", "int", "b", ")", "{", "return", "\"#\"", "+", "toBrowserHexValue", "(", "r", ")", "+", "toBrowserHexValue", "(", "g", ")", "+...
Converts RGB to hex browser-compliance color, e.g. "#1234EF" @param r int between 0 and 255 @param g int between 0 and 255 @param b int between 0 and 255 @return String
[ "Converts", "RGB", "to", "hex", "browser", "-", "compliance", "color", "e", ".", "g", ".", "#1234EF" ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/shared/core/types/Color.java#L511-L514
apache/incubator-heron
heron/packing/src/java/org/apache/heron/packing/roundrobin/RoundRobinPacking.java
RoundRobinPacking.getLargestContainerSize
private int getLargestContainerSize(Map<Integer, List<InstanceId>> allocation) { """ Get # of instances in the largest container @param allocation the instances' allocation @return # of instances in the largest container """ int max = 0; for (List<InstanceId> instances : allocation.values()) { ...
java
private int getLargestContainerSize(Map<Integer, List<InstanceId>> allocation) { int max = 0; for (List<InstanceId> instances : allocation.values()) { if (instances.size() > max) { max = instances.size(); } } return max; }
[ "private", "int", "getLargestContainerSize", "(", "Map", "<", "Integer", ",", "List", "<", "InstanceId", ">", ">", "allocation", ")", "{", "int", "max", "=", "0", ";", "for", "(", "List", "<", "InstanceId", ">", "instances", ":", "allocation", ".", "valu...
Get # of instances in the largest container @param allocation the instances' allocation @return # of instances in the largest container
[ "Get", "#", "of", "instances", "in", "the", "largest", "container" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/packing/src/java/org/apache/heron/packing/roundrobin/RoundRobinPacking.java#L421-L429
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/templateresolver/AbstractConfigurableTemplateResolver.java
AbstractConfigurableTemplateResolver.setTemplateAliases
public final void setTemplateAliases(final Map<String,String> templateAliases) { """ <p> Sets all the new template aliases to be used. </p> <p> Template aliases allow the use of several (and probably shorter) names for templates. </p> <p> Aliases are applied to template names <b>before</b> prefix/suffix. ...
java
public final void setTemplateAliases(final Map<String,String> templateAliases) { if (templateAliases != null) { this.templateAliases.putAll(templateAliases); } }
[ "public", "final", "void", "setTemplateAliases", "(", "final", "Map", "<", "String", ",", "String", ">", "templateAliases", ")", "{", "if", "(", "templateAliases", "!=", "null", ")", "{", "this", ".", "templateAliases", ".", "putAll", "(", "templateAliases", ...
<p> Sets all the new template aliases to be used. </p> <p> Template aliases allow the use of several (and probably shorter) names for templates. </p> <p> Aliases are applied to template names <b>before</b> prefix/suffix. </p> @param templateAliases the new template aliases.
[ "<p", ">", "Sets", "all", "the", "new", "template", "aliases", "to", "be", "used", ".", "<", "/", "p", ">", "<p", ">", "Template", "aliases", "allow", "the", "use", "of", "several", "(", "and", "probably", "shorter", ")", "names", "for", "templates", ...
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/templateresolver/AbstractConfigurableTemplateResolver.java#L482-L486
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java
OrdersInner.listByDataBoxEdgeDeviceAsync
public Observable<Page<OrderInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { """ Lists all the orders related to a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException ...
java
public Observable<Page<OrderInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { return listByDataBoxEdgeDeviceWithServiceResponseAsync(deviceName, resourceGroupName) .map(new Func1<ServiceResponse<Page<OrderInner>>, Page<OrderInner>>() { @O...
[ "public", "Observable", "<", "Page", "<", "OrderInner", ">", ">", "listByDataBoxEdgeDeviceAsync", "(", "final", "String", "deviceName", ",", "final", "String", "resourceGroupName", ")", "{", "return", "listByDataBoxEdgeDeviceWithServiceResponseAsync", "(", "deviceName", ...
Lists all the orders related to a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;OrderInner&gt; object
[ "Lists", "all", "the", "orders", "related", "to", "a", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/OrdersInner.java#L144-L152
peterbencze/serritor
src/main/java/com/github/peterbencze/serritor/api/BaseCrawler.java
BaseCrawler.start
private void start(final WebDriver webDriver, final boolean isResuming) { """ Performs initialization and runs the crawler. @param isResuming indicates if a previously saved state is to be resumed """ try { Validate.validState(isStopped, "The crawler is already running."); ...
java
private void start(final WebDriver webDriver, final boolean isResuming) { try { Validate.validState(isStopped, "The crawler is already running."); this.webDriver = Validate.notNull(webDriver, "The webdriver cannot be null."); // If the crawl delay strategy is set to ada...
[ "private", "void", "start", "(", "final", "WebDriver", "webDriver", ",", "final", "boolean", "isResuming", ")", "{", "try", "{", "Validate", ".", "validState", "(", "isStopped", ",", "\"The crawler is already running.\"", ")", ";", "this", ".", "webDriver", "=",...
Performs initialization and runs the crawler. @param isResuming indicates if a previously saved state is to be resumed
[ "Performs", "initialization", "and", "runs", "the", "crawler", "." ]
train
https://github.com/peterbencze/serritor/blob/10ed6f82c90fa1dccd684382b68b5d77a37652c0/src/main/java/com/github/peterbencze/serritor/api/BaseCrawler.java#L151-L187
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamContext.java
NaaccrStreamContext.extractTag
public String extractTag(String tag) throws NaaccrIOException { """ Extracts the tag from the given raw tag (which might contain a namespace). @param tag tag without any namespace @return the tag without any namespace @throws NaaccrIOException if anything goes wrong """ if (tag == null) ...
java
public String extractTag(String tag) throws NaaccrIOException { if (tag == null) throw new NaaccrIOException("missing tag"); int idx = tag.indexOf(':'); if (idx != -1) { String namespace = tag.substring(0, idx), cleanTag = tag.substring(idx + 1); // check for ...
[ "public", "String", "extractTag", "(", "String", "tag", ")", "throws", "NaaccrIOException", "{", "if", "(", "tag", "==", "null", ")", "throw", "new", "NaaccrIOException", "(", "\"missing tag\"", ")", ";", "int", "idx", "=", "tag", ".", "indexOf", "(", "'",...
Extracts the tag from the given raw tag (which might contain a namespace). @param tag tag without any namespace @return the tag without any namespace @throws NaaccrIOException if anything goes wrong
[ "Extracts", "the", "tag", "from", "the", "given", "raw", "tag", "(", "which", "might", "contain", "a", "namespace", ")", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamContext.java#L57-L76
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java
PreConditionException.validateEqualTo
public static void validateEqualTo( long value, long condition, String identifier ) throws PreConditionException { """ Validates that the value under test is a particular value. <p/> This method ensures that <code>value == condition</code>. @param identifier The name of the object. @param condition ...
java
public static void validateEqualTo( long value, long condition, String identifier ) throws PreConditionException { if( value == condition ) { return; } throw new PreConditionException( identifier + " was not equal to " + condition + ". Was: " + value ); }
[ "public", "static", "void", "validateEqualTo", "(", "long", "value", ",", "long", "condition", ",", "String", "identifier", ")", "throws", "PreConditionException", "{", "if", "(", "value", "==", "condition", ")", "{", "return", ";", "}", "throw", "new", "Pre...
Validates that the value under test is a particular value. <p/> This method ensures that <code>value == condition</code>. @param identifier The name of the object. @param condition The condition value. @param value The value to be tested. @throws PreConditionException if the condition is not met.
[ "Validates", "that", "the", "value", "under", "test", "is", "a", "particular", "value", ".", "<p", "/", ">", "This", "method", "ensures", "that", "<code", ">", "value", "==", "condition<", "/", "code", ">", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java#L211-L219
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.acceptSessionFromEntityPathAsync
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode) { """ Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return ...
java
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode) { return acceptSessionFromEntityPathAsync(messagingFactory, entityPath, null, sessionId, receiveMode); }
[ "public", "static", "CompletableFuture", "<", "IMessageSession", ">", "acceptSessionFromEntityPathAsync", "(", "MessagingFactory", "messagingFactory", ",", "String", "entityPath", ",", "String", "sessionId", ",", "ReceiveMode", "receiveMode", ")", "{", "return", "acceptSe...
Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session. @param messagingFactory messaging factory (which represents a connection) on which the session receiver needs to be created. @param entityPath path of entity @pa...
[ "Asynchronously", "accepts", "a", "session", "from", "service", "bus", "using", "the", "client", "settings", ".", "Session", "Id", "can", "be", "null", "if", "null", "service", "will", "return", "the", "first", "available", "session", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L736-L738
redlink-gmbh/redlink-java-sdk
src/main/java/io/redlink/sdk/impl/analysis/model/Enhancements.java
Enhancements.getBestAnnotations
public Multimap<TextAnnotation, EntityAnnotation> getBestAnnotations() { """ Returns the best {@link EntityAnnotation}s (those with the highest confidence value) for each extracted {@link TextAnnotation} @return best annotations """ Ordering<EntityAnnotation> o = new Ordering<EntityAnnotation>() { ...
java
public Multimap<TextAnnotation, EntityAnnotation> getBestAnnotations() { Ordering<EntityAnnotation> o = new Ordering<EntityAnnotation>() { @Override public int compare(EntityAnnotation left, EntityAnnotation right) { return Doubles.compare(left.confidence, right.confiden...
[ "public", "Multimap", "<", "TextAnnotation", ",", "EntityAnnotation", ">", "getBestAnnotations", "(", ")", "{", "Ordering", "<", "EntityAnnotation", ">", "o", "=", "new", "Ordering", "<", "EntityAnnotation", ">", "(", ")", "{", "@", "Override", "public", "int"...
Returns the best {@link EntityAnnotation}s (those with the highest confidence value) for each extracted {@link TextAnnotation} @return best annotations
[ "Returns", "the", "best", "{", "@link", "EntityAnnotation", "}", "s", "(", "those", "with", "the", "highest", "confidence", "value", ")", "for", "each", "extracted", "{", "@link", "TextAnnotation", "}" ]
train
https://github.com/redlink-gmbh/redlink-java-sdk/blob/c412ff11bd80da52ade09f2483ab29cdbff5a28a/src/main/java/io/redlink/sdk/impl/analysis/model/Enhancements.java#L292-L319
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ZooKeeperHelper.java
ZooKeeperHelper.createIfNotThere
static void createIfNotThere(ZooKeeper zookeeper, String znode) throws KeeperException, InterruptedException { """ Create an empty normal (persistent) Znode. If the znode already exists, do nothing. @param zookeeper ZooKeeper instance to work with. @param znode Znode to create. @throws KeeperException @t...
java
static void createIfNotThere(ZooKeeper zookeeper, String znode) throws KeeperException, InterruptedException { try { create(zookeeper, znode); } catch (KeeperException e) { if (e.code() != KeeperException.Code.NODEEXISTS) { // Rethrow all exceptions, except "node ...
[ "static", "void", "createIfNotThere", "(", "ZooKeeper", "zookeeper", ",", "String", "znode", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "try", "{", "create", "(", "zookeeper", ",", "znode", ")", ";", "}", "catch", "(", "KeeperException",...
Create an empty normal (persistent) Znode. If the znode already exists, do nothing. @param zookeeper ZooKeeper instance to work with. @param znode Znode to create. @throws KeeperException @throws InterruptedException
[ "Create", "an", "empty", "normal", "(", "persistent", ")", "Znode", ".", "If", "the", "znode", "already", "exists", "do", "nothing", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ZooKeeperHelper.java#L88-L98
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createRelationTable
public static PreparedStatement createRelationTable(Connection connection, String relationTable) throws SQLException { """ Create the relation table. @param connection @param relationTable @return @throws SQLException """ try (Statement stmt = connection.createStatement()) { StringBui...
java
public static PreparedStatement createRelationTable(Connection connection, String relationTable) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(relationTable); sb.append("(ID_RELATIO...
[ "public", "static", "PreparedStatement", "createRelationTable", "(", "Connection", "connection", ",", "String", "relationTable", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ")", ")", "{", "St...
Create the relation table. @param connection @param relationTable @return @throws SQLException
[ "Create", "the", "relation", "table", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L223-L237
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
XMLConfigAdmin.removeMailServer
public void removeMailServer(String hostName, String username) throws SecurityException { """ removes a mailserver from system @param hostName @throws SecurityException """ checkWriteAccess(); Element mail = _getRootElement("mail"); Element[] children = XMLConfigWebFactory.getChildren(mail, "server"); ...
java
public void removeMailServer(String hostName, String username) throws SecurityException { checkWriteAccess(); Element mail = _getRootElement("mail"); Element[] children = XMLConfigWebFactory.getChildren(mail, "server"); String _hostName, _username; if (children.length > 0) { for (int i = 0; i < children.leng...
[ "public", "void", "removeMailServer", "(", "String", "hostName", ",", "String", "username", ")", "throws", "SecurityException", "{", "checkWriteAccess", "(", ")", ";", "Element", "mail", "=", "_getRootElement", "(", "\"mail\"", ")", ";", "Element", "[", "]", "...
removes a mailserver from system @param hostName @throws SecurityException
[ "removes", "a", "mailserver", "from", "system" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L527-L544
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.writeEmptyElement
public void writeEmptyElement(String namespaceURI, String localName) throws Exception { """ Write empty element. @param namespaceURI the namespace URI @param localName the local name @throws Exception the exception """ startTag(namespaceURI, localName); endTag(namespaceURI, localName); }
java
public void writeEmptyElement(String namespaceURI, String localName) throws Exception { startTag(namespaceURI, localName); endTag(namespaceURI, localName); }
[ "public", "void", "writeEmptyElement", "(", "String", "namespaceURI", ",", "String", "localName", ")", "throws", "Exception", "{", "startTag", "(", "namespaceURI", ",", "localName", ")", ";", "endTag", "(", "namespaceURI", ",", "localName", ")", ";", "}" ]
Write empty element. @param namespaceURI the namespace URI @param localName the local name @throws Exception the exception
[ "Write", "empty", "element", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L1719-L1723
UrielCh/ovh-java-sdk
ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java
ApiOvhRouter.serviceName_privateLink_peerServiceName_route_network_GET
public OvhPrivateLinkRoute serviceName_privateLink_peerServiceName_route_network_GET(String serviceName, String peerServiceName, String network) throws IOException { """ Get this object properties REST: GET /router/{serviceName}/privateLink/{peerServiceName}/route/{network} @param serviceName [required] The in...
java
public OvhPrivateLinkRoute serviceName_privateLink_peerServiceName_route_network_GET(String serviceName, String peerServiceName, String network) throws IOException { String qPath = "/router/{serviceName}/privateLink/{peerServiceName}/route/{network}"; StringBuilder sb = path(qPath, serviceName, peerServiceName, net...
[ "public", "OvhPrivateLinkRoute", "serviceName_privateLink_peerServiceName_route_network_GET", "(", "String", "serviceName", ",", "String", "peerServiceName", ",", "String", "network", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/router/{serviceName}/privateLin...
Get this object properties REST: GET /router/{serviceName}/privateLink/{peerServiceName}/route/{network} @param serviceName [required] The internal name of your Router offer @param peerServiceName [required] Service name of the other side of this link @param network [required] Network allowed to be routed outside
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L421-L426
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/StreamSegmentContainerRegistry.java
StreamSegmentContainerRegistry.startContainerInternal
private CompletableFuture<ContainerHandle> startContainerInternal(int containerId) { """ Creates a new Container and attempts to register it. This method works in an optimistic manner: it creates the Container first and then attempts to register it, which should prevent us from having to lock on this entire metho...
java
private CompletableFuture<ContainerHandle> startContainerInternal(int containerId) { ContainerWithHandle newContainer = new ContainerWithHandle(this.factory.createStreamSegmentContainer(containerId), new SegmentContainerHandle(containerId)); ContainerWithHandle existingContainer = this.c...
[ "private", "CompletableFuture", "<", "ContainerHandle", ">", "startContainerInternal", "(", "int", "containerId", ")", "{", "ContainerWithHandle", "newContainer", "=", "new", "ContainerWithHandle", "(", "this", ".", "factory", ".", "createStreamSegmentContainer", "(", "...
Creates a new Container and attempts to register it. This method works in an optimistic manner: it creates the Container first and then attempts to register it, which should prevent us from having to lock on this entire method. Creating new containers is cheap (we don't start them yet), so this operation should not tak...
[ "Creates", "a", "new", "Container", "and", "attempts", "to", "register", "it", ".", "This", "method", "works", "in", "an", "optimistic", "manner", ":", "it", "creates", "the", "Container", "first", "and", "then", "attempts", "to", "register", "it", "which", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/StreamSegmentContainerRegistry.java#L147-L167
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/server/JcrServiceImpl.java
JcrServiceImpl.values
private String values( PropertyDefinition pd, Property p ) throws RepositoryException { """ Displays property value as string @param pd the property definition @param p the property to display @return property value as text string @throws RepositoryException """ if (p == null) { retur...
java
private String values( PropertyDefinition pd, Property p ) throws RepositoryException { if (p == null) { return "N/A"; } if (pd.getRequiredType() == PropertyType.BINARY) { return "BINARY"; } if (!p.isMultiple()) { return p.get...
[ "private", "String", "values", "(", "PropertyDefinition", "pd", ",", "Property", "p", ")", "throws", "RepositoryException", "{", "if", "(", "p", "==", "null", ")", "{", "return", "\"N/A\"", ";", "}", "if", "(", "pd", ".", "getRequiredType", "(", ")", "==...
Displays property value as string @param pd the property definition @param p the property to display @return property value as text string @throws RepositoryException
[ "Displays", "property", "value", "as", "string" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/server/JcrServiceImpl.java#L440-L454
Stratio/stratio-cassandra
src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
MemoryUtil.getBytes
public static void getBytes(long address, byte[] buffer, int bufferOffset, int count) { """ Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset @param address start offset in the memory @param buffer the data buffer @param bufferOffset start offset of the buffer @par...
java
public static void getBytes(long address, byte[] buffer, int bufferOffset, int count) { if (buffer == null) throw new NullPointerException(); else if (bufferOffset < 0 || count < 0 || count > buffer.length - bufferOffset) throw new IndexOutOfBoundsException(); else if...
[ "public", "static", "void", "getBytes", "(", "long", "address", ",", "byte", "[", "]", "buffer", ",", "int", "bufferOffset", ",", "int", "count", ")", "{", "if", "(", "buffer", "==", "null", ")", "throw", "new", "NullPointerException", "(", ")", ";", "...
Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset @param address start offset in the memory @param buffer the data buffer @param bufferOffset start offset of the buffer @param count number of bytes to transfer
[ "Transfers", "count", "bytes", "from", "Memory", "starting", "at", "memoryOffset", "to", "buffer", "starting", "at", "bufferOffset" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java#L296-L306
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java
SOAPMessageTransport.setSOAPBody
public SOAPMessage setSOAPBody(SOAPMessage msg, BaseMessage message) { """ This utility method sticks this message into this soap message's body. @param msg The source message. """ try { if (msg == null) msg = fac.createMessage(); // Message creation takes care ...
java
public SOAPMessage setSOAPBody(SOAPMessage msg, BaseMessage message) { try { if (msg == null) msg = fac.createMessage(); // Message creation takes care of creating the SOAPPart - a // required part of the message as per the SOAP 1.1 // specific...
[ "public", "SOAPMessage", "setSOAPBody", "(", "SOAPMessage", "msg", ",", "BaseMessage", "message", ")", "{", "try", "{", "if", "(", "msg", "==", "null", ")", "msg", "=", "fac", ".", "createMessage", "(", ")", ";", "// Message creation takes care of creating the S...
This utility method sticks this message into this soap message's body. @param msg The source message.
[ "This", "utility", "method", "sticks", "this", "message", "into", "this", "soap", "message", "s", "body", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L222-L255
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createAsyncGeneratorWrapperReference
Node createAsyncGeneratorWrapperReference(JSType originalFunctionType, Scope scope) { """ Creates a reference to $jscomp.AsyncGeneratorWrapper with the template filled in to match the original function. @param originalFunctionType the type of the async generator function that needs transpilation """ No...
java
Node createAsyncGeneratorWrapperReference(JSType originalFunctionType, Scope scope) { Node ctor = createQName(scope, "$jscomp.AsyncGeneratorWrapper"); if (isAddingTypes() && !ctor.getJSType().isUnknownType()) { // if ctor has the unknown type, we must have not injected the required runtime // libra...
[ "Node", "createAsyncGeneratorWrapperReference", "(", "JSType", "originalFunctionType", ",", "Scope", "scope", ")", "{", "Node", "ctor", "=", "createQName", "(", "scope", ",", "\"$jscomp.AsyncGeneratorWrapper\"", ")", ";", "if", "(", "isAddingTypes", "(", ")", "&&", ...
Creates a reference to $jscomp.AsyncGeneratorWrapper with the template filled in to match the original function. @param originalFunctionType the type of the async generator function that needs transpilation
[ "Creates", "a", "reference", "to", "$jscomp", ".", "AsyncGeneratorWrapper", "with", "the", "template", "filled", "in", "to", "match", "the", "original", "function", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L903-L925
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.refreshMetadataCache
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings) { """ The metadata cache can become huge over time. This simply flushes it periodically. """ metadataSystemCache.clear(); for (int i = 0; i < this.getNumberOfThreads(); i+...
java
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings) { metadataSystemCache.clear(); for (int i = 0; i < this.getNumberOfThreads(); i++) { metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoade...
[ "private", "void", "refreshMetadataCache", "(", "final", "Queue", "<", "WindupMetadataSystem", ">", "metadataSystemCache", ",", "final", "DecompilerSettings", "settings", ")", "{", "metadataSystemCache", ".", "clear", "(", ")", ";", "for", "(", "int", "i", "=", ...
The metadata cache can become huge over time. This simply flushes it periodically.
[ "The", "metadata", "cache", "can", "become", "huge", "over", "time", ".", "This", "simply", "flushes", "it", "periodically", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L522-L529
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getTargetPackageLink
public Content getTargetPackageLink(PackageElement pkg, String target, Content label) { """ Get Package link, with target frame. @param pkg The link will be to the "package-summary.html" page for this package @param target name of the target frame @param label tag for the link @return a content f...
java
public Content getTargetPackageLink(PackageElement pkg, String target, Content label) { return getHyperLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label, "", target); }
[ "public", "Content", "getTargetPackageLink", "(", "PackageElement", "pkg", ",", "String", "target", ",", "Content", "label", ")", "{", "return", "getHyperLink", "(", "pathString", "(", "pkg", ",", "DocPaths", ".", "PACKAGE_SUMMARY", ")", ",", "label", ",", "\"...
Get Package link, with target frame. @param pkg The link will be to the "package-summary.html" page for this package @param target name of the target frame @param label tag for the link @return a content for the target package link
[ "Get", "Package", "link", "with", "target", "frame", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L358-L361
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/accounts/CmsTwoOrgUnitUsersList.java
CmsTwoOrgUnitUsersList.customHtmlEnd
protected String customHtmlEnd() { """ Returns the custom html end code for this dialog.<p> @return custom html code """ StringBuffer result = new StringBuffer(512); result.append("<form name='actions' method='post' action='"); result.append(getFirstWp().getDialogRealUri()); ...
java
protected String customHtmlEnd() { StringBuffer result = new StringBuffer(512); result.append("<form name='actions' method='post' action='"); result.append(getFirstWp().getDialogRealUri()); result.append("' class='nomargin' onsubmit=\"return submitAction('ok', null, 'actions');\">\n"); ...
[ "protected", "String", "customHtmlEnd", "(", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "512", ")", ";", "result", ".", "append", "(", "\"<form name='actions' method='post' action='\"", ")", ";", "result", ".", "append", "(", "getFirstWp"...
Returns the custom html end code for this dialog.<p> @return custom html code
[ "Returns", "the", "custom", "html", "end", "code", "for", "this", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/accounts/CmsTwoOrgUnitUsersList.java#L71-L99
googleads/googleads-java-lib
modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsHandler.java
JaxWsHandler.setHeaderChildString
public void setHeaderChildString(BindingProvider soapClient, final String headerName, String childNamespace, String childName, String childValue) { """ Adds a child text node named childName to the existing header named headerName. @param soapClient the binding provider @param headerName the name of the ...
java
public void setHeaderChildString(BindingProvider soapClient, final String headerName, String childNamespace, String childName, String childValue) { // Find the parent header SOAPElement SOAPElement parentHeader = (SOAPElement) getHeader(soapClient, headerName); Preconditions.checkNotNull(parentHeader,...
[ "public", "void", "setHeaderChildString", "(", "BindingProvider", "soapClient", ",", "final", "String", "headerName", ",", "String", "childNamespace", ",", "String", "childName", ",", "String", "childValue", ")", "{", "// Find the parent header SOAPElement", "SOAPElement"...
Adds a child text node named childName to the existing header named headerName. @param soapClient the binding provider @param headerName the name of the existing header @param childNamespace the namespace of the new child @param childName the name of the new child @param childValue the value of the new child @throws ...
[ "Adds", "a", "child", "text", "node", "named", "childName", "to", "the", "existing", "header", "named", "headerName", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib_appengine/src/main/java/com/google/api/ads/common/lib/soap/jaxws/JaxWsHandler.java#L134-L146
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initTopLevelState
protected void initTopLevelState(APMSpan topSpan, TraceRecorder recorder, ContextSampler sampler) { """ This method initialises the node builder and trace context for a top level trace fragment. @param topSpan The top level span in the trace @param recorder The trace recorder @param sampler The sampler ...
java
protected void initTopLevelState(APMSpan topSpan, TraceRecorder recorder, ContextSampler sampler) { nodeBuilder = new NodeBuilder(); traceContext = new TraceContext(topSpan, nodeBuilder, recorder, sampler); }
[ "protected", "void", "initTopLevelState", "(", "APMSpan", "topSpan", ",", "TraceRecorder", "recorder", ",", "ContextSampler", "sampler", ")", "{", "nodeBuilder", "=", "new", "NodeBuilder", "(", ")", ";", "traceContext", "=", "new", "TraceContext", "(", "topSpan", ...
This method initialises the node builder and trace context for a top level trace fragment. @param topSpan The top level span in the trace @param recorder The trace recorder @param sampler The sampler
[ "This", "method", "initialises", "the", "node", "builder", "and", "trace", "context", "for", "a", "top", "level", "trace", "fragment", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L166-L169
sinetja/sinetja
src/main/java/sinetja/Response.java
Response.respondEventSource
public ChannelFuture respondEventSource(Object data, String event) throws Exception { """ To respond event source, call this method as many time as you want. <p>Event Source response is a special kind of chunked response, data must be UTF-8. See: - http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3....
java
public ChannelFuture respondEventSource(Object data, String event) throws Exception { if (!nonChunkedResponseOrFirstChunkSent) { HttpUtil.setTransferEncodingChunked(response, true); response.headers().set(CONTENT_TYPE, "text/event-stream; charset=UTF-8"); return respondText("...
[ "public", "ChannelFuture", "respondEventSource", "(", "Object", "data", ",", "String", "event", ")", "throws", "Exception", "{", "if", "(", "!", "nonChunkedResponseOrFirstChunkSent", ")", "{", "HttpUtil", ".", "setTransferEncodingChunked", "(", "response", ",", "tru...
To respond event source, call this method as many time as you want. <p>Event Source response is a special kind of chunked response, data must be UTF-8. See: - http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3.3.html#section-94 - http://dev.w3.org/html5/eventsource/ <p>No need to call setChunked() before ca...
[ "To", "respond", "event", "source", "call", "this", "method", "as", "many", "time", "as", "you", "want", "." ]
train
https://github.com/sinetja/sinetja/blob/eec94dba55ec28263e3503fcdb33532282134775/src/main/java/sinetja/Response.java#L336-L343
aws/aws-sdk-java
aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/SearchProductsResult.java
SearchProductsResult.setProductViewAggregations
public void setProductViewAggregations(java.util.Map<String, java.util.List<ProductViewAggregationValue>> productViewAggregations) { """ <p> The product view aggregations. </p> @param productViewAggregations The product view aggregations. """ this.productViewAggregations = productViewAggregations...
java
public void setProductViewAggregations(java.util.Map<String, java.util.List<ProductViewAggregationValue>> productViewAggregations) { this.productViewAggregations = productViewAggregations; }
[ "public", "void", "setProductViewAggregations", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "ProductViewAggregationValue", ">", ">", "productViewAggregations", ")", "{", "this", ".", "productViewAggregations", ...
<p> The product view aggregations. </p> @param productViewAggregations The product view aggregations.
[ "<p", ">", "The", "product", "view", "aggregations", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/SearchProductsResult.java#L137-L139
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.hosting_web_new_GET
public ArrayList<String> hosting_web_new_GET(OvhDnsZoneEnum dnsZone, String domain, OvhOrderableNameEnum module, net.minidev.ovh.api.hosting.web.OvhOfferEnum offer, Boolean waiveRetractationPeriod) throws IOException { """ Get allowed durations for 'new' option REST: GET /order/hosting/web/new @param domain [r...
java
public ArrayList<String> hosting_web_new_GET(OvhDnsZoneEnum dnsZone, String domain, OvhOrderableNameEnum module, net.minidev.ovh.api.hosting.web.OvhOfferEnum offer, Boolean waiveRetractationPeriod) throws IOException { String qPath = "/order/hosting/web/new"; StringBuilder sb = path(qPath); query(sb, "dnsZone", d...
[ "public", "ArrayList", "<", "String", ">", "hosting_web_new_GET", "(", "OvhDnsZoneEnum", "dnsZone", ",", "String", "domain", ",", "OvhOrderableNameEnum", "module", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "hosting", ".", "web", ".", "OvhOfferEn...
Get allowed durations for 'new' option REST: GET /order/hosting/web/new @param domain [required] Domain name which will be linked to this hosting account @param module [required] Module installation ready to use @param dnsZone [required] Dns zone modification possibilities ( by default : RESET_ALL ) @param offer [requ...
[ "Get", "allowed", "durations", "for", "new", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L4755-L4765
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/importer/ExplodedImporterImpl.java
ExplodedImporterImpl.calculatePath
private ArchivePath calculatePath(File root, File child) { """ Calculate the relative child path. @param root The Archive root folder @param child The Child file @return a Path fort he child relative to root """ String rootPath = unifyPath(root.getPath()); String childPath = unifyPath(ch...
java
private ArchivePath calculatePath(File root, File child) { String rootPath = unifyPath(root.getPath()); String childPath = unifyPath(child.getPath()); String archiveChildPath = childPath.replaceFirst(Pattern.quote(rootPath), ""); return new BasicPath(archiveChildPath); }
[ "private", "ArchivePath", "calculatePath", "(", "File", "root", ",", "File", "child", ")", "{", "String", "rootPath", "=", "unifyPath", "(", "root", ".", "getPath", "(", ")", ")", ";", "String", "childPath", "=", "unifyPath", "(", "child", ".", "getPath", ...
Calculate the relative child path. @param root The Archive root folder @param child The Child file @return a Path fort he child relative to root
[ "Calculate", "the", "relative", "child", "path", "." ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/importer/ExplodedImporterImpl.java#L142-L147
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java
PhotosGeoApi.setPerms
public Response setPerms(String photoId, boolean isPublic, boolean isContact, boolean isFriend, boolean isFamily) throws JinxException { """ Set the permission for who may view the geo data associated with a photo. <br> This method requires authentication with 'write' permission. @param photoId (Required) T...
java
public Response setPerms(String photoId, boolean isPublic, boolean isContact, boolean isFriend, boolean isFamily) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.geo.setPerms"); params.put("photo_id", photoId); ...
[ "public", "Response", "setPerms", "(", "String", "photoId", ",", "boolean", "isPublic", ",", "boolean", "isContact", ",", "boolean", "isFriend", ",", "boolean", "isFamily", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ...
Set the permission for who may view the geo data associated with a photo. <br> This method requires authentication with 'write' permission. @param photoId (Required) The id of the photo to set permissions for. @param isPublic viewing permissions for the photo location data to public. @param isContact viewing permis...
[ "Set", "the", "permission", "for", "who", "may", "view", "the", "geo", "data", "associated", "with", "a", "photo", ".", "<br", ">", "This", "method", "requires", "authentication", "with", "write", "permission", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java#L281-L291
ACRA/acra
acra-core/src/main/java/org/acra/builder/ReportExecutor.java
ReportExecutor.handReportToDefaultExceptionHandler
public void handReportToDefaultExceptionHandler(@Nullable Thread t, @NonNull Throwable e) { """ pass-through to default handler @param t the crashed thread @param e the uncaught exception """ if (defaultExceptionHandler != null) { ACRA.log.i(LOG_TAG, "ACRA is disabled for " + context.ge...
java
public void handReportToDefaultExceptionHandler(@Nullable Thread t, @NonNull Throwable e) { if (defaultExceptionHandler != null) { ACRA.log.i(LOG_TAG, "ACRA is disabled for " + context.getPackageName() + " - forwarding uncaught Exception on to default ExceptionHandler"); ...
[ "public", "void", "handReportToDefaultExceptionHandler", "(", "@", "Nullable", "Thread", "t", ",", "@", "NonNull", "Throwable", "e", ")", "{", "if", "(", "defaultExceptionHandler", "!=", "null", ")", "{", "ACRA", ".", "log", ".", "i", "(", "LOG_TAG", ",", ...
pass-through to default handler @param t the crashed thread @param e the uncaught exception
[ "pass", "-", "through", "to", "default", "handler" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/builder/ReportExecutor.java#L98-L108
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.setFloatAttribute
public void setFloatAttribute(String name, Float value) { """ Set attribute value of given type. @param name attribute name @param value attribute value """ Attribute attribute = getAttributes().get(name); if (!(attribute instanceof FloatAttribute)) { throw new IllegalStateException("Cannot set floa...
java
public void setFloatAttribute(String name, Float value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof FloatAttribute)) { throw new IllegalStateException("Cannot set float value on attribute with different type, " + attribute.getClass().getName() + " setting value " + value); ...
[ "public", "void", "setFloatAttribute", "(", "String", "name", ",", "Float", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "FloatAttribute", ")...
Set attribute value of given type. @param name attribute name @param value attribute value
[ "Set", "attribute", "value", "of", "given", "type", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java#L275-L282
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.createPreset
public CreatePresetResponse createPreset( String presetName, String container, Clip clip, Audio audio, Encryption encryption) { """ Create a preset which help to convert audio files on be played in a wide range of devices. @param presetName The name of the new preset. @param container The contai...
java
public CreatePresetResponse createPreset( String presetName, String container, Clip clip, Audio audio, Encryption encryption) { return createPreset(presetName, null, container, false, clip, audio, null, encryption, null); }
[ "public", "CreatePresetResponse", "createPreset", "(", "String", "presetName", ",", "String", "container", ",", "Clip", "clip", ",", "Audio", "audio", ",", "Encryption", "encryption", ")", "{", "return", "createPreset", "(", "presetName", ",", "null", ",", "cont...
Create a preset which help to convert audio files on be played in a wide range of devices. @param presetName The name of the new preset. @param container The container type for the output file. Valid values include mp4, flv, hls, mp3, m4a. @param clip The clip property of the preset. @param audio Speci...
[ "Create", "a", "preset", "which", "help", "to", "convert", "audio", "files", "on", "be", "played", "in", "a", "wide", "range", "of", "devices", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L705-L708
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java
StreamingJobsInner.createOrReplace
public StreamingJobInner createOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { """ Creates a streaming job or replaces an already existing streaming job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the A...
java
public StreamingJobInner createOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) { return createOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().last().body(); }
[ "public", "StreamingJobInner", "createOrReplace", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "StreamingJobInner", "streamingJob", ")", "{", "return", "createOrReplaceWithServiceResponseAsync", "(", "resourceGroupName", ",", "jobName", ",", "streaming...
Creates a streaming job or replaces an already existing streaming job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param jobName The name of the streaming job. @param streamingJob The definition of the...
[ "Creates", "a", "streaming", "job", "or", "replaces", "an", "already", "existing", "streaming", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java#L143-L145
zaproxy/zaproxy
src/org/zaproxy/zap/extension/brk/BreakpointMessageHandler2.java
BreakpointMessageHandler2.handleMessageReceivedFromClient
public boolean handleMessageReceivedFromClient(Message aMessage, boolean onlyIfInScope) { """ Do not call if in {@link Mode#safe}. @param aMessage @param onlyIfInScope @return False if message should be dropped. """ if ( ! isBreakpoint(aMessage, true, onlyIfInScope)) { return true; ...
java
public boolean handleMessageReceivedFromClient(Message aMessage, boolean onlyIfInScope) { if ( ! isBreakpoint(aMessage, true, onlyIfInScope)) { return true; } // Do this outside of the semaphore loop so that the 'continue' button can apply to all queued break points ...
[ "public", "boolean", "handleMessageReceivedFromClient", "(", "Message", "aMessage", ",", "boolean", "onlyIfInScope", ")", "{", "if", "(", "!", "isBreakpoint", "(", "aMessage", ",", "true", ",", "onlyIfInScope", ")", ")", "{", "return", "true", ";", "}", "// Do...
Do not call if in {@link Mode#safe}. @param aMessage @param onlyIfInScope @return False if message should be dropped.
[ "Do", "not", "call", "if", "in", "{", "@link", "Mode#safe", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/brk/BreakpointMessageHandler2.java#L65-L85
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuTexRefSetMipmappedArray
public static int cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, int Flags) { """ Binds a mipmapped array to a texture reference. <pre> CUresult cuTexRefSetMipmappedArray ( CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags ) </pre> <div> <p>Binds a mip...
java
public static int cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, int Flags) { return checkResult(cuTexRefSetMipmappedArrayNative(hTexRef, hMipmappedArray, Flags)); }
[ "public", "static", "int", "cuTexRefSetMipmappedArray", "(", "CUtexref", "hTexRef", ",", "CUmipmappedArray", "hMipmappedArray", ",", "int", "Flags", ")", "{", "return", "checkResult", "(", "cuTexRefSetMipmappedArrayNative", "(", "hTexRef", ",", "hMipmappedArray", ",", ...
Binds a mipmapped array to a texture reference. <pre> CUresult cuTexRefSetMipmappedArray ( CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags ) </pre> <div> <p>Binds a mipmapped array to a texture reference. Binds the CUDA mipmapped array <tt>hMipmappedArray</tt> to the texture reference <tt>hTex...
[ "Binds", "a", "mipmapped", "array", "to", "a", "texture", "reference", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L9764-L9767
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java
SnapToEllipseEdge.change
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { """ Computes a numerical value for the difference in parameters between the two ellipses """ double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a -...
java
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a - b.a); total += Math.abs(a.b - b.b); // only care about the change of angle when it is not a circ...
[ "protected", "static", "double", "change", "(", "EllipseRotated_F64", "a", ",", "EllipseRotated_F64", "b", ")", "{", "double", "total", "=", "0", ";", "total", "+=", "Math", ".", "abs", "(", "a", ".", "center", ".", "x", "-", "b", ".", "center", ".", ...
Computes a numerical value for the difference in parameters between the two ellipses
[ "Computes", "a", "numerical", "value", "for", "the", "difference", "in", "parameters", "between", "the", "two", "ellipses" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java#L116-L129
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.parametersUsageNotAllowed
public static void parametersUsageNotAllowed(String methodName, String className) { """ Thrown when the parameters number is incorrect. @param methodName method name @param className class name """ throw new DynamicConversionParameterException(MSG.INSTANCE.message(dynamicConversionParameterException,metho...
java
public static void parametersUsageNotAllowed(String methodName, String className){ throw new DynamicConversionParameterException(MSG.INSTANCE.message(dynamicConversionParameterException,methodName,className)); }
[ "public", "static", "void", "parametersUsageNotAllowed", "(", "String", "methodName", ",", "String", "className", ")", "{", "throw", "new", "DynamicConversionParameterException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "dynamicConversionParameterException", ",...
Thrown when the parameters number is incorrect. @param methodName method name @param className class name
[ "Thrown", "when", "the", "parameters", "number", "is", "incorrect", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L214-L216
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/collection/Int2ObjectHashMap.java
Int2ObjectHashMap.computeIfAbsent
public V computeIfAbsent(final int key, final IntFunction<? extends V> mappingFunction) { """ Get a value for a given key, or if it does ot exist then default the value via a {@link IntFunction} and put it in the map. @param key to search on. @param mappingFunction to provide a value if the get re...
java
public V computeIfAbsent(final int key, final IntFunction<? extends V> mappingFunction) { checkNotNull(mappingFunction, "mappingFunction cannot be null"); V value = get(key); if (value == null) { value = mappingFunction.apply(key); if (value != null) { put...
[ "public", "V", "computeIfAbsent", "(", "final", "int", "key", ",", "final", "IntFunction", "<", "?", "extends", "V", ">", "mappingFunction", ")", "{", "checkNotNull", "(", "mappingFunction", ",", "\"mappingFunction cannot be null\"", ")", ";", "V", "value", "=",...
Get a value for a given key, or if it does ot exist then default the value via a {@link IntFunction} and put it in the map. @param key to search on. @param mappingFunction to provide a value if the get returns null. @return the value if found otherwise the default.
[ "Get", "a", "value", "for", "a", "given", "key", "or", "if", "it", "does", "ot", "exist", "then", "default", "the", "value", "via", "a", "{", "@link", "IntFunction", "}", "and", "put", "it", "in", "the", "map", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/collection/Int2ObjectHashMap.java#L193-L203
sebastiangraf/jSCSI
bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java
Configuration.getSetting
public final String getSetting (final String targetName, final int connectionID, final OperationalTextKey textKey) throws OperationalTextKeyException { """ Returns the value of a single parameter, instead of all values. @param targetName Name of the iSCSI Target to connect. @param connectionID The ID of the co...
java
public final String getSetting (final String targetName, final int connectionID, final OperationalTextKey textKey) throws OperationalTextKeyException { try { final SessionConfiguration sc; synchronized (sessionConfigs) { sc = sessionConfigs.get(targetName); ...
[ "public", "final", "String", "getSetting", "(", "final", "String", "targetName", ",", "final", "int", "connectionID", ",", "final", "OperationalTextKey", "textKey", ")", "throws", "OperationalTextKeyException", "{", "try", "{", "final", "SessionConfiguration", "sc", ...
Returns the value of a single parameter, instead of all values. @param targetName Name of the iSCSI Target to connect. @param connectionID The ID of the connection to retrieve. @param textKey The name of the parameter. @return The value of the given parameter. @throws OperationalTextKeyException If the given parameter...
[ "Returns", "the", "value", "of", "a", "single", "parameter", "instead", "of", "all", "values", "." ]
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L205-L235
jingwei/krati
krati-main/src/main/java/krati/core/array/SimpleDataArray.java
SimpleDataArray.setCompactionAddress
protected void setCompactionAddress(int index, long value, long scn) throws Exception { """ Sets the address (long value), which is produced by the Segment compactor, at the specified array index. @param index - the array index. @param value - the address value. @param scn - the System Change Number (SCN) ...
java
protected void setCompactionAddress(int index, long value, long scn) throws Exception { _addressArray.setCompactionAddress(index, value, scn); _hwmSet = Math.max(_hwmSet, scn); }
[ "protected", "void", "setCompactionAddress", "(", "int", "index", ",", "long", "value", ",", "long", "scn", ")", "throws", "Exception", "{", "_addressArray", ".", "setCompactionAddress", "(", "index", ",", "value", ",", "scn", ")", ";", "_hwmSet", "=", "Math...
Sets the address (long value), which is produced by the Segment compactor, at the specified array index. @param index - the array index. @param value - the address value. @param scn - the System Change Number (SCN) representing an ever-increasing update order. @throws Exception if the address cannot be updated at t...
[ "Sets", "the", "address", "(", "long", "value", ")", "which", "is", "produced", "by", "the", "Segment", "compactor", "at", "the", "specified", "array", "index", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/SimpleDataArray.java#L362-L365
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.zscore
@Override public Double zscore(final byte[] key, final byte[] member) { """ Return the score of the specified element of the sorted set at key. If the specified element does not exist in the sorted set, or the key does not exist at all, a special 'nil' value is returned. <p> <b>Time complexity:</b> O(1) @pa...
java
@Override public Double zscore(final byte[] key, final byte[] member) { checkIsInMultiOrPipeline(); client.zscore(key, member); final String score = client.getBulkReply(); return (score != null ? new Double(score) : null); }
[ "@", "Override", "public", "Double", "zscore", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "member", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "zscore", "(", "key", ",", "member", ")", ";", "final", ...
Return the score of the specified element of the sorted set at key. If the specified element does not exist in the sorted set, or the key does not exist at all, a special 'nil' value is returned. <p> <b>Time complexity:</b> O(1) @param key @param member @return the score
[ "Return", "the", "score", "of", "the", "specified", "element", "of", "the", "sorted", "set", "at", "key", ".", "If", "the", "specified", "element", "does", "not", "exist", "in", "the", "sorted", "set", "or", "the", "key", "does", "not", "exist", "at", ...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1836-L1842
JOML-CI/JOML
src/org/joml/Matrix3d.java
Matrix3d.setColumn
public Matrix3d setColumn(int column, Vector3dc src) throws IndexOutOfBoundsException { """ Set the column at the given <code>column</code> index, starting with <code>0</code>. @param column the column index in <code>[0..2]</code> @param src the column components to set @return this @throws IndexOutOfBound...
java
public Matrix3d setColumn(int column, Vector3dc src) throws IndexOutOfBoundsException { return setColumn(column, src.x(), src.y(), src.z()); }
[ "public", "Matrix3d", "setColumn", "(", "int", "column", ",", "Vector3dc", "src", ")", "throws", "IndexOutOfBoundsException", "{", "return", "setColumn", "(", "column", ",", "src", ".", "x", "(", ")", ",", "src", ".", "y", "(", ")", ",", "src", ".", "z...
Set the column at the given <code>column</code> index, starting with <code>0</code>. @param column the column index in <code>[0..2]</code> @param src the column components to set @return this @throws IndexOutOfBoundsException if <code>column</code> is not in <code>[0..2]</code>
[ "Set", "the", "column", "at", "the", "given", "<code", ">", "column<", "/", "code", ">", "index", "starting", "with", "<code", ">", "0<", "/", "code", ">", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3d.java#L3589-L3591
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.getMultipleValues
private void getMultipleValues(Method method, Object object, Map<String, String> map) { """ Retrieve multiple properties. @param method method definition @param object target object @param map parameter values """ try { int index = 1; while (true) { Objec...
java
private void getMultipleValues(Method method, Object object, Map<String, String> map) { try { int index = 1; while (true) { Object value = filterValue(method.invoke(object, Integer.valueOf(index))); if (value != null) { map.put...
[ "private", "void", "getMultipleValues", "(", "Method", "method", ",", "Object", "object", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "try", "{", "int", "index", "=", "1", ";", "while", "(", "true", ")", "{", "Object", "value", "=...
Retrieve multiple properties. @param method method definition @param object target object @param map parameter values
[ "Retrieve", "multiple", "properties", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L192-L211
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java
NorthArrowGraphic.createRaster
private static URI createRaster( final Dimension targetSize, final RasterReference rasterReference, final Double rotation, final Color backgroundColor, final File workingDir) throws IOException { """ Renders a given graphic into a new image, scaled to fit the new size and rotate...
java
private static URI createRaster( final Dimension targetSize, final RasterReference rasterReference, final Double rotation, final Color backgroundColor, final File workingDir) throws IOException { final File path = File.createTempFile("north-arrow-", ".png", workingDir); ...
[ "private", "static", "URI", "createRaster", "(", "final", "Dimension", "targetSize", ",", "final", "RasterReference", "rasterReference", ",", "final", "Double", "rotation", ",", "final", "Color", "backgroundColor", ",", "final", "File", "workingDir", ")", "throws", ...
Renders a given graphic into a new image, scaled to fit the new size and rotated.
[ "Renders", "a", "given", "graphic", "into", "a", "new", "image", "scaled", "to", "fit", "the", "new", "size", "and", "rotated", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/map/NorthArrowGraphic.java#L113-L171
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java
SpoofChecker.areConfusable
public int areConfusable(String s1, String s2) { """ Check the whether two specified strings are visually confusable. The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for the SpoofChecker. The tests to be performed are controlled b...
java
public int areConfusable(String s1, String s2) { // // See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable, // and for definitions of the types (single, whole, mixed-script) of confusables. // We only care about a few of the check flags. Ignore the ...
[ "public", "int", "areConfusable", "(", "String", "s1", ",", "String", "s2", ")", "{", "//", "// See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable,", "// and for definitions of the types (single, whole, mixed-script) of confusables.", "// We only ca...
Check the whether two specified strings are visually confusable. The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for the SpoofChecker. The tests to be performed are controlled by the flags SINGLE_SCRIPT_CONFUSABLE MIXED_SCRIPT_CONFUSABLE ...
[ "Check", "the", "whether", "two", "specified", "strings", "are", "visually", "confusable", ".", "The", "types", "of", "confusability", "to", "be", "tested", "-", "single", "script", "mixed", "script", "or", "whole", "script", "-", "are", "determined", "by", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1344-L1387
hibernate/hibernate-ogm
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java
InfinispanEmbeddedStoredProceduresManager.callStoredProcedure
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) { """ Returns the result of a stored procedure executed on the backend. @param embeddedCacheManager embedded...
java
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) { validate( queryParameters ); Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA...
[ "public", "ClosableIterator", "<", "Tuple", ">", "callStoredProcedure", "(", "EmbeddedCacheManager", "embeddedCacheManager", ",", "String", "storedProcedureName", ",", "ProcedureQueryParameters", "queryParameters", ",", "ClassLoaderService", "classLoaderService", ")", "{", "v...
Returns the result of a stored procedure executed on the backend. @param embeddedCacheManager embedded cache manager @param storedProcedureName name of stored procedure @param queryParameters parameters passed for this query @param classLoaderService the class loader service @return a {@link ClosableIterator} with th...
[ "Returns", "the", "result", "of", "a", "stored", "procedure", "executed", "on", "the", "backend", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java#L51-L59
apache/groovy
src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java
StampedCommonCache.doWithReadLock
private <R> R doWithReadLock(Action<K, V, R> action) { """ deal with the backed cache guarded by read lock @param action the content to complete """ long stamp = sl.tryOptimisticRead(); R result = action.doWith(commonCache); if (!sl.validate(stamp)) { stamp = sl.readLock()...
java
private <R> R doWithReadLock(Action<K, V, R> action) { long stamp = sl.tryOptimisticRead(); R result = action.doWith(commonCache); if (!sl.validate(stamp)) { stamp = sl.readLock(); try { result = action.doWith(commonCache); } finally { ...
[ "private", "<", "R", ">", "R", "doWithReadLock", "(", "Action", "<", "K", ",", "V", ",", "R", ">", "action", ")", "{", "long", "stamp", "=", "sl", ".", "tryOptimisticRead", "(", ")", ";", "R", "result", "=", "action", ".", "doWith", "(", "commonCac...
deal with the backed cache guarded by read lock @param action the content to complete
[ "deal", "with", "the", "backed", "cache", "guarded", "by", "read", "lock" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/memoize/StampedCommonCache.java#L282-L296
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/markup/DamVideoMediaMarkupBuilder.java
DamVideoMediaMarkupBuilder.getVideoPlayerElement
protected Video getVideoPlayerElement(@NotNull Media media) { """ Build HTML5 video player element @param media Media metadata @return Media element """ Dimension dimension = MediaMarkupBuilderUtil.getMediaformatDimension(media); Video video = new Video(); video.setWidth((int)dimension.getWidth(...
java
protected Video getVideoPlayerElement(@NotNull Media media) { Dimension dimension = MediaMarkupBuilderUtil.getMediaformatDimension(media); Video video = new Video(); video.setWidth((int)dimension.getWidth()); video.setHeight((int)dimension.getHeight()); video.setControls(true); // add video so...
[ "protected", "Video", "getVideoPlayerElement", "(", "@", "NotNull", "Media", "media", ")", "{", "Dimension", "dimension", "=", "MediaMarkupBuilderUtil", ".", "getMediaformatDimension", "(", "media", ")", ";", "Video", "video", "=", "new", "Video", "(", ")", ";",...
Build HTML5 video player element @param media Media metadata @return Media element
[ "Build", "HTML5", "video", "player", "element" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/markup/DamVideoMediaMarkupBuilder.java#L137-L152
bbottema/simple-java-mail
modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java
ConfigLoader.loadProperties
public static synchronized Map<Property, Object> loadProperties(final @Nullable InputStream inputStream, final boolean addProperties) { """ Loads properties from {@link InputStream}. Calling this method only has effect on new Email and Mailer instances after this. @param inputStream Source of property key=val...
java
public static synchronized Map<Property, Object> loadProperties(final @Nullable InputStream inputStream, final boolean addProperties) { final Properties prop = new Properties(); try { prop.load(checkArgumentNotEmpty(inputStream, "InputStream was null")); } catch (final IOException e) { throw new IllegalSta...
[ "public", "static", "synchronized", "Map", "<", "Property", ",", "Object", ">", "loadProperties", "(", "final", "@", "Nullable", "InputStream", "inputStream", ",", "final", "boolean", "addProperties", ")", "{", "final", "Properties", "prop", "=", "new", "Propert...
Loads properties from {@link InputStream}. Calling this method only has effect on new Email and Mailer instances after this. @param inputStream Source of property key=value pairs separated by newline \n characters. @param addProperties Flag to indicate if the new properties should be added or replacing the old prope...
[ "Loads", "properties", "from", "{", "@link", "InputStream", "}", ".", "Calling", "this", "method", "only", "has", "effect", "on", "new", "Email", "and", "Mailer", "instances", "after", "this", "." ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/core-module/src/main/java/org/simplejavamail/config/ConfigLoader.java#L260-L282
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/BrokerHelper.java
BrokerHelper.getRealClassDescriptor
private ClassDescriptor getRealClassDescriptor(ClassDescriptor aCld, Object anObj) { """ Answer the real ClassDescriptor for anObj ie. aCld may be an Interface of anObj, so the cld for anObj is returned """ ClassDescriptor result; if(aCld.getClassOfObject() == ProxyHelper.getRealClass(anOb...
java
private ClassDescriptor getRealClassDescriptor(ClassDescriptor aCld, Object anObj) { ClassDescriptor result; if(aCld.getClassOfObject() == ProxyHelper.getRealClass(anObj)) { result = aCld; } else { result = aCld.getRepository().getDe...
[ "private", "ClassDescriptor", "getRealClassDescriptor", "(", "ClassDescriptor", "aCld", ",", "Object", "anObj", ")", "{", "ClassDescriptor", "result", ";", "if", "(", "aCld", ".", "getClassOfObject", "(", ")", "==", "ProxyHelper", ".", "getRealClass", "(", "anObj"...
Answer the real ClassDescriptor for anObj ie. aCld may be an Interface of anObj, so the cld for anObj is returned
[ "Answer", "the", "real", "ClassDescriptor", "for", "anObj", "ie", ".", "aCld", "may", "be", "an", "Interface", "of", "anObj", "so", "the", "cld", "for", "anObj", "is", "returned" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/BrokerHelper.java#L141-L155
Nexmo/nexmo-java
src/main/java/com/nexmo/client/insight/InsightClient.java
InsightClient.getStandardNumberInsight
@Deprecated public StandardInsightResponse getStandardNumberInsight(String number, String country, boolean cnam) throws IOException, NexmoClientException { """ Perform a Standard Insight Request with a number, country, and cnam. @param number A single phone number that you need insight about in national or...
java
@Deprecated public StandardInsightResponse getStandardNumberInsight(String number, String country, boolean cnam) throws IOException, NexmoClientException { return getStandardNumberInsight(StandardInsightRequest.builder(number).country(country).cnam(cnam).build()); }
[ "@", "Deprecated", "public", "StandardInsightResponse", "getStandardNumberInsight", "(", "String", "number", ",", "String", "country", ",", "boolean", "cnam", ")", "throws", "IOException", ",", "NexmoClientException", "{", "return", "getStandardNumberInsight", "(", "Sta...
Perform a Standard Insight Request with a number, country, and cnam. @param number A single phone number that you need insight about in national or international format. @param country If a number does not have a country code or it is uncertain, set the two-character country code. @param cnam Indicates if the name...
[ "Perform", "a", "Standard", "Insight", "Request", "with", "a", "number", "country", "and", "cnam", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/insight/InsightClient.java#L140-L143
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java
ModelsEngine.scalarProduct
public static double scalarProduct( double[] a, double[] b ) { """ Compute the dot product. @param a is a vector. @param b is a vector. @return the dot product of a and b. """ double c = 0; for( int i = 0; i < a.length; i++ ) { c = c + a[i] * b[i]; } return c;...
java
public static double scalarProduct( double[] a, double[] b ) { double c = 0; for( int i = 0; i < a.length; i++ ) { c = c + a[i] * b[i]; } return c; }
[ "public", "static", "double", "scalarProduct", "(", "double", "[", "]", "a", ",", "double", "[", "]", "b", ")", "{", "double", "c", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "a", ".", "length", ";", "i", "++", ")", "{", ...
Compute the dot product. @param a is a vector. @param b is a vector. @return the dot product of a and b.
[ "Compute", "the", "dot", "product", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java#L1229-L1235
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
QueryReferenceBroker.getFKQuery1toN
private QueryByCriteria getFKQuery1toN(Object obj, ClassDescriptor cld, CollectionDescriptor cod) { """ Get Foreign key query for 1:n @return org.apache.ojb.broker.query.QueryByCriteria @param obj @param cld @param cod """ ValueContainer[] container = pb.serviceBrokerHelper().getKeyValues(cld, obj...
java
private QueryByCriteria getFKQuery1toN(Object obj, ClassDescriptor cld, CollectionDescriptor cod) { ValueContainer[] container = pb.serviceBrokerHelper().getKeyValues(cld, obj); ClassDescriptor refCld = pb.getClassDescriptor(cod.getItemClass()); FieldDescriptor[] fields = cod.getForeignK...
[ "private", "QueryByCriteria", "getFKQuery1toN", "(", "Object", "obj", ",", "ClassDescriptor", "cld", ",", "CollectionDescriptor", "cod", ")", "{", "ValueContainer", "[", "]", "container", "=", "pb", ".", "serviceBrokerHelper", "(", ")", ".", "getKeyValues", "(", ...
Get Foreign key query for 1:n @return org.apache.ojb.broker.query.QueryByCriteria @param obj @param cld @param cod
[ "Get", "Foreign", "key", "query", "for", "1", ":", "n" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java#L893-L907