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
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java
IntentsClient.getIntent
public final Intent getIntent(IntentName name, String languageCode) { """ Retrieves the specified intent. <p>Sample code: <pre><code> try (IntentsClient intentsClient = IntentsClient.create()) { IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); String languageCode = ""; Intent response = intentsC...
java
public final Intent getIntent(IntentName name, String languageCode) { GetIntentRequest request = GetIntentRequest.newBuilder() .setName(name == null ? null : name.toString()) .setLanguageCode(languageCode) .build(); return getIntent(request); }
[ "public", "final", "Intent", "getIntent", "(", "IntentName", "name", ",", "String", "languageCode", ")", "{", "GetIntentRequest", "request", "=", "GetIntentRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==", "null", "?", "null", ":", "n...
Retrieves the specified intent. <p>Sample code: <pre><code> try (IntentsClient intentsClient = IntentsClient.create()) { IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); String languageCode = ""; Intent response = intentsClient.getIntent(name, languageCode); } </code></pre> @param name Required. The name of...
[ "Retrieves", "the", "specified", "intent", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java#L464-L472
syphr42/prom
src/main/java/org/syphr/prom/ManagedProperties.java
ManagedProperties.setValue
private boolean setValue(String propertyName, String value, boolean sync) throws NullPointerException { """ Push or sync the given value to the appropriate stack. This method will create a new stack if this property has never had a value before. @param propertyName the property whose value will be set @param...
java
private boolean setValue(String propertyName, String value, boolean sync) throws NullPointerException { gatekeeper.signIn(); try { ChangeStack<String> stack = properties.get(propertyName); if (stack == null) { ChangeStack<String> newStack =...
[ "private", "boolean", "setValue", "(", "String", "propertyName", ",", "String", "value", ",", "boolean", "sync", ")", "throws", "NullPointerException", "{", "gatekeeper", ".", "signIn", "(", ")", ";", "try", "{", "ChangeStack", "<", "String", ">", "stack", "...
Push or sync the given value to the appropriate stack. This method will create a new stack if this property has never had a value before. @param propertyName the property whose value will be set @param value the value to set @param sync a flag to determine whether the value is {@link ChangeStack#sync(Object) synced} o...
[ "Push", "or", "sync", "the", "given", "value", "to", "the", "appropriate", "stack", ".", "This", "method", "will", "create", "a", "new", "stack", "if", "this", "property", "has", "never", "had", "a", "value", "before", "." ]
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/ManagedProperties.java#L367-L390
casmi/casmi
src/main/java/casmi/graphics/element/Lines.java
Lines.setCornerColor
public void setCornerColor(int index, Color color) { """ Sets the point's color for gradation. @param index The index number of the point. @param color The color of the point. """ if (!cornerGradation) { cornerGradation = true; } colors.set(index, color); }
java
public void setCornerColor(int index, Color color) { if (!cornerGradation) { cornerGradation = true; } colors.set(index, color); }
[ "public", "void", "setCornerColor", "(", "int", "index", ",", "Color", "color", ")", "{", "if", "(", "!", "cornerGradation", ")", "{", "cornerGradation", "=", "true", ";", "}", "colors", ".", "set", "(", "index", ",", "color", ")", ";", "}" ]
Sets the point's color for gradation. @param index The index number of the point. @param color The color of the point.
[ "Sets", "the", "point", "s", "color", "for", "gradation", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Lines.java#L309-L314
UrielCh/ovh-java-sdk
ovh-java-sdk-licensedirectadmin/src/main/java/net/minidev/ovh/api/ApiOvhLicensedirectadmin.java
ApiOvhLicensedirectadmin.serviceName_confirmTermination_POST
public String serviceName_confirmTermination_POST(String serviceName, String commentary, OvhTerminationFutureUseEnum futureUse, OvhTerminationReasonEnum reason, String token) throws IOException { """ Confirm termination of your service REST: POST /license/directadmin/{serviceName}/confirmTermination @param fut...
java
public String serviceName_confirmTermination_POST(String serviceName, String commentary, OvhTerminationFutureUseEnum futureUse, OvhTerminationReasonEnum reason, String token) throws IOException { String qPath = "/license/directadmin/{serviceName}/confirmTermination"; StringBuilder sb = path(qPath, serviceName); H...
[ "public", "String", "serviceName_confirmTermination_POST", "(", "String", "serviceName", ",", "String", "commentary", ",", "OvhTerminationFutureUseEnum", "futureUse", ",", "OvhTerminationReasonEnum", "reason", ",", "String", "token", ")", "throws", "IOException", "{", "St...
Confirm termination of your service REST: POST /license/directadmin/{serviceName}/confirmTermination @param futureUse What next after your termination request @param reason Reason of your termination request @param commentary Commentary about your termination request @param token [required] The termination token sent ...
[ "Confirm", "termination", "of", "your", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-licensedirectadmin/src/main/java/net/minidev/ovh/api/ApiOvhLicensedirectadmin.java#L68-L78
google/closure-compiler
src/com/google/javascript/jscomp/deps/DefaultDependencyResolver.java
DefaultDependencyResolver.addDependency
private void addDependency(String symbol, Set<String> seen, List<String> list) throws ServiceException { """ Adds all the transitive dependencies for a symbol to the provided list. The set is used to avoid adding dupes while keeping the correct order. NOTE: Use of a LinkedHashSet would require reversing th...
java
private void addDependency(String symbol, Set<String> seen, List<String> list) throws ServiceException { DependencyInfo dependency = getDependencyInfo(symbol); if (dependency == null) { if (this.strictRequires) { throw new ServiceException("Unknown require of " + symbol); } } else ...
[ "private", "void", "addDependency", "(", "String", "symbol", ",", "Set", "<", "String", ">", "seen", ",", "List", "<", "String", ">", "list", ")", "throws", "ServiceException", "{", "DependencyInfo", "dependency", "=", "getDependencyInfo", "(", "symbol", ")", ...
Adds all the transitive dependencies for a symbol to the provided list. The set is used to avoid adding dupes while keeping the correct order. NOTE: Use of a LinkedHashSet would require reversing the results to get correct dependency ordering.
[ "Adds", "all", "the", "transitive", "dependencies", "for", "a", "symbol", "to", "the", "provided", "list", ".", "The", "set", "is", "used", "to", "avoid", "adding", "dupes", "while", "keeping", "the", "correct", "order", ".", "NOTE", ":", "Use", "of", "a...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/deps/DefaultDependencyResolver.java#L125-L139
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java
StorageAccountsInner.getStorageContainer
public StorageContainerInner getStorageContainer(String resourceGroupName, String accountName, String storageAccountName, String containerName) { """ Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. @param resourceGroupName The name of the Azur...
java
public StorageContainerInner getStorageContainer(String resourceGroupName, String accountName, String storageAccountName, String containerName) { return getStorageContainerWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, containerName).toBlocking().single().body(); }
[ "public", "StorageContainerInner", "getStorageContainer", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "storageAccountName", ",", "String", "containerName", ")", "{", "return", "getStorageContainerWithServiceResponseAsync", "(", "resourceGr...
Gets the specified Azure Storage container associated with the given Data Lake Analytics and Azure Storage accounts. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @param storageAccountName The name of the Azure storage account from which ...
[ "Gets", "the", "specified", "Azure", "Storage", "container", "associated", "with", "the", "given", "Data", "Lake", "Analytics", "and", "Azure", "Storage", "accounts", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java#L1000-L1002
SUSE/salt-netapi-client
src/main/java/com/suse/salt/netapi/parser/XorTypeAdapterFactory.java
XorTypeAdapterFactory.errorAdapter
private <R> TypeAdapter<Xor<SaltError, R>> errorAdapter(TypeAdapter<R> innerAdapter) { """ Creates a Xor adapter specifically for the case in which the left side is a SaltError. This is used to catch any Salt-side or JSON parsing errors. @param <R> the generic type for the right side of the Xor @param innerAd...
java
private <R> TypeAdapter<Xor<SaltError, R>> errorAdapter(TypeAdapter<R> innerAdapter) { return new TypeAdapter<Xor<SaltError, R>>() { @Override public Xor<SaltError, R> read(JsonReader in) throws IOException { JsonElement json = TypeAdapters.JSON_ELEMENT.read(in); ...
[ "private", "<", "R", ">", "TypeAdapter", "<", "Xor", "<", "SaltError", ",", "R", ">", ">", "errorAdapter", "(", "TypeAdapter", "<", "R", ">", "innerAdapter", ")", "{", "return", "new", "TypeAdapter", "<", "Xor", "<", "SaltError", ",", "R", ">", ">", ...
Creates a Xor adapter specifically for the case in which the left side is a SaltError. This is used to catch any Salt-side or JSON parsing errors. @param <R> the generic type for the right side of the Xor @param innerAdapter the inner adapter @return the Xor type adapter
[ "Creates", "a", "Xor", "adapter", "specifically", "for", "the", "case", "in", "which", "the", "left", "side", "is", "a", "SaltError", ".", "This", "is", "used", "to", "catch", "any", "Salt", "-", "side", "or", "JSON", "parsing", "errors", "." ]
train
https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/parser/XorTypeAdapterFactory.java#L100-L127
Syncleus/aparapi
src/main/java/com/aparapi/internal/kernel/KernelDeviceProfile.java
KernelDeviceProfile.getElapsedTimeCurrentThread
public double getElapsedTimeCurrentThread(int from, int to) { """ Elapsed time for all events {@code from} through {@code to} for the current thread. """ Accumulator acc = getAccForThread(); return acc == null ? Double.NaN : (acc.currentTimes[to] - acc.currentTimes[from]) / MILLION; }
java
public double getElapsedTimeCurrentThread(int from, int to) { Accumulator acc = getAccForThread(); return acc == null ? Double.NaN : (acc.currentTimes[to] - acc.currentTimes[from]) / MILLION; }
[ "public", "double", "getElapsedTimeCurrentThread", "(", "int", "from", ",", "int", "to", ")", "{", "Accumulator", "acc", "=", "getAccForThread", "(", ")", ";", "return", "acc", "==", "null", "?", "Double", ".", "NaN", ":", "(", "acc", ".", "currentTimes", ...
Elapsed time for all events {@code from} through {@code to} for the current thread.
[ "Elapsed", "time", "for", "all", "events", "{" ]
train
https://github.com/Syncleus/aparapi/blob/6d5892c8e69854b3968c541023de37cf4762bd24/src/main/java/com/aparapi/internal/kernel/KernelDeviceProfile.java#L215-L219
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/gui/CommandExecutor.java
CommandExecutor.doCommandFullResponse
public synchronized Response doCommandFullResponse(String command) throws CommandFormatException, IOException { """ User-initiated commands use this method. @param command The CLI command @return A Response object containing the command line, DMR request, and DMR response @throws CommandFormatException @thro...
java
public synchronized Response doCommandFullResponse(String command) throws CommandFormatException, IOException { ModelNode request = cmdCtx.buildRequest(command); boolean replacedBytes = replaceFilePathsWithBytes(request); OperationResponse response = execute(request, isSlowCommand(command) || re...
[ "public", "synchronized", "Response", "doCommandFullResponse", "(", "String", "command", ")", "throws", "CommandFormatException", ",", "IOException", "{", "ModelNode", "request", "=", "cmdCtx", ".", "buildRequest", "(", "command", ")", ";", "boolean", "replacedBytes",...
User-initiated commands use this method. @param command The CLI command @return A Response object containing the command line, DMR request, and DMR response @throws CommandFormatException @throws IOException
[ "User", "-", "initiated", "commands", "use", "this", "method", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/CommandExecutor.java#L88-L93
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java
RESTRequest.readRequestBody
private byte[] readRequestBody() { """ zero-length byte[] is returned. The message is *not* decompressed. """ int bytesLeft = m_request.getContentLength(); if (bytesLeft <= 0) { return new byte[0]; } int totalBytesRead = 0; try { byte[] b...
java
private byte[] readRequestBody() { int bytesLeft = m_request.getContentLength(); if (bytesLeft <= 0) { return new byte[0]; } int totalBytesRead = 0; try { byte[] byteBuffer = new byte[bytesLeft]; try (InputStream inputStream = m_reque...
[ "private", "byte", "[", "]", "readRequestBody", "(", ")", "{", "int", "bytesLeft", "=", "m_request", ".", "getContentLength", "(", ")", ";", "if", "(", "bytesLeft", "<=", "0", ")", "{", "return", "new", "byte", "[", "0", "]", ";", "}", "int", "totalB...
zero-length byte[] is returned. The message is *not* decompressed.
[ "zero", "-", "length", "byte", "[]", "is", "returned", ".", "The", "message", "is", "*", "not", "*", "decompressed", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRequest.java#L332-L357
spring-cloud/spring-cloud-contract
spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/util/ContractVerifierUtil.java
ContractVerifierUtil.nodeFromXPath
public static Node nodeFromXPath(Document parsedXml, String path) { """ Helper method to retrieve XML {@link Node} with provided xPath. @param parsedXml - a {@link Document} object with parsed XML content @param path - the xPath expression to retrieve the value with @return XML {@link Node} object @since 2.1.0...
java
public static Node nodeFromXPath(Document parsedXml, String path) { XPath xPath = XPathFactory.newInstance().newXPath(); try { return (Node) xPath.evaluate(path, parsedXml.getDocumentElement(), XPathConstants.NODE); } catch (XPathExpressionException exception) { LOG.error("Incorrect xpath provided: "...
[ "public", "static", "Node", "nodeFromXPath", "(", "Document", "parsedXml", ",", "String", "path", ")", "{", "XPath", "xPath", "=", "XPathFactory", ".", "newInstance", "(", ")", ".", "newXPath", "(", ")", ";", "try", "{", "return", "(", "Node", ")", "xPat...
Helper method to retrieve XML {@link Node} with provided xPath. @param parsedXml - a {@link Document} object with parsed XML content @param path - the xPath expression to retrieve the value with @return XML {@link Node} object @since 2.1.0
[ "Helper", "method", "to", "retrieve", "XML", "{" ]
train
https://github.com/spring-cloud/spring-cloud-contract/blob/857da51950a87b393286e3bb1b2208c420c01087/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/util/ContractVerifierUtil.java#L96-L106
UrielCh/ovh-java-sdk
ovh-java-sdk-veeamCloudConnect/src/main/java/net/minidev/ovh/api/ApiOvhVeeamCloudConnect.java
ApiOvhVeeamCloudConnect.serviceName_backupRepository_inventoryName_upgradeQuota_POST
public ArrayList<OvhTask> serviceName_backupRepository_inventoryName_upgradeQuota_POST(String serviceName, String inventoryName, Long newQuota) throws IOException { """ Change your quota REST: POST /veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota @param newQuota [required] my new ...
java
public ArrayList<OvhTask> serviceName_backupRepository_inventoryName_upgradeQuota_POST(String serviceName, String inventoryName, Long newQuota) throws IOException { String qPath = "/veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota"; StringBuilder sb = path(qPath, serviceName, inventoryN...
[ "public", "ArrayList", "<", "OvhTask", ">", "serviceName_backupRepository_inventoryName_upgradeQuota_POST", "(", "String", "serviceName", ",", "String", "inventoryName", ",", "Long", "newQuota", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/veeamCloudConn...
Change your quota REST: POST /veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota @param newQuota [required] my new quota in GB @param serviceName [required] Domain of the service @param inventoryName [required] The inventory name of your backup repository
[ "Change", "your", "quota" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-veeamCloudConnect/src/main/java/net/minidev/ovh/api/ApiOvhVeeamCloudConnect.java#L116-L123
samskivert/samskivert
src/main/java/com/samskivert/swing/LabelSausage.java
LabelSausage.layout
protected void layout (Graphics2D gfx, int iconPadding, int extraPadding) { """ Lays out the label sausage. It is assumed that the desired label font is already set in the label. @param iconPadding the number of pixels in the x direction to pad around the icon. """ // if we have an icon, let that ...
java
protected void layout (Graphics2D gfx, int iconPadding, int extraPadding) { // if we have an icon, let that dictate our size; otherwise just lay out our label all on // one line int sqwid, sqhei; if (_icon == null) { sqwid = sqhei = 0; } else { sqwid =...
[ "protected", "void", "layout", "(", "Graphics2D", "gfx", ",", "int", "iconPadding", ",", "int", "extraPadding", ")", "{", "// if we have an icon, let that dictate our size; otherwise just lay out our label all on", "// one line", "int", "sqwid", ",", "sqhei", ";", "if", "...
Lays out the label sausage. It is assumed that the desired label font is already set in the label. @param iconPadding the number of pixels in the x direction to pad around the icon.
[ "Lays", "out", "the", "label", "sausage", ".", "It", "is", "assumed", "that", "the", "desired", "label", "font", "is", "already", "set", "in", "the", "label", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/LabelSausage.java#L46-L98
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/StratifiedSampling.java
StratifiedSampling.xbarStd
public static double xbarStd(TransposeDataCollection sampleDataCollection, AssociativeArray nh, AssociativeArray populationNh) { """ Calculates Standard Deviation for Xbar @param sampleDataCollection @param nh @param populationNh @return """ return Math.sqrt(xbarVariance(sampleDataCollection, nh,...
java
public static double xbarStd(TransposeDataCollection sampleDataCollection, AssociativeArray nh, AssociativeArray populationNh) { return Math.sqrt(xbarVariance(sampleDataCollection, nh, populationNh)); }
[ "public", "static", "double", "xbarStd", "(", "TransposeDataCollection", "sampleDataCollection", ",", "AssociativeArray", "nh", ",", "AssociativeArray", "populationNh", ")", "{", "return", "Math", ".", "sqrt", "(", "xbarVariance", "(", "sampleDataCollection", ",", "nh...
Calculates Standard Deviation for Xbar @param sampleDataCollection @param nh @param populationNh @return
[ "Calculates", "Standard", "Deviation", "for", "Xbar" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/StratifiedSampling.java#L203-L205
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsXmlGroupContainerFactory.java
CmsXmlGroupContainerFactory.setCache
private static void setCache(CmsObject cms, CmsXmlGroupContainer xmlGroupContainer, boolean keepEncoding) { """ Stores the given group container in the cache.<p> @param cms the cms context @param xmlGroupContainer the group container to cache @param keepEncoding if the encoding was kept while unmarshalling ...
java
private static void setCache(CmsObject cms, CmsXmlGroupContainer xmlGroupContainer, boolean keepEncoding) { if (xmlGroupContainer.getFile() instanceof I_CmsHistoryResource) { return; } boolean online = cms.getRequestContext().getCurrentProject().isOnlineProject(); getCache()...
[ "private", "static", "void", "setCache", "(", "CmsObject", "cms", ",", "CmsXmlGroupContainer", "xmlGroupContainer", ",", "boolean", "keepEncoding", ")", "{", "if", "(", "xmlGroupContainer", ".", "getFile", "(", ")", "instanceof", "I_CmsHistoryResource", ")", "{", ...
Stores the given group container in the cache.<p> @param cms the cms context @param xmlGroupContainer the group container to cache @param keepEncoding if the encoding was kept while unmarshalling
[ "Stores", "the", "given", "group", "container", "in", "the", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsXmlGroupContainerFactory.java#L418-L428
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_availableRouteActions_GET
public ArrayList<OvhRouteAvailableAction> serviceName_availableRouteActions_GET(String serviceName) throws IOException { """ Available route actions REST: GET /ipLoadbalancing/{serviceName}/availableRouteActions @param serviceName [required] The internal name of your IP load balancing """ String qPath = ...
java
public ArrayList<OvhRouteAvailableAction> serviceName_availableRouteActions_GET(String serviceName) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/availableRouteActions"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(res...
[ "public", "ArrayList", "<", "OvhRouteAvailableAction", ">", "serviceName_availableRouteActions_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/availableRouteActions\"", ";", "StringBuilder", "sb", ...
Available route actions REST: GET /ipLoadbalancing/{serviceName}/availableRouteActions @param serviceName [required] The internal name of your IP load balancing
[ "Available", "route", "actions" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L739-L744
biouno/figshare-java-api
src/main/java/org/biouno/figshare/FigShareClient.java
FigShareClient.createArticle
public Article createArticle(final String title, final String description, final String definedType) { """ Create an article. @param title title @param description description @param definedType defined type (e.g. dataset) @return an {@link Article} """ HttpClient httpClient = null; try {...
java
public Article createArticle(final String title, final String description, final String definedType) { HttpClient httpClient = null; try { final String method = "my_data/articles"; // create an HTTP request to a protected resource final String url = getURL(endpoint, v...
[ "public", "Article", "createArticle", "(", "final", "String", "title", ",", "final", "String", "description", ",", "final", "String", "definedType", ")", "{", "HttpClient", "httpClient", "=", "null", ";", "try", "{", "final", "String", "method", "=", "\"my_dat...
Create an article. @param title title @param description description @param definedType defined type (e.g. dataset) @return an {@link Article}
[ "Create", "an", "article", "." ]
train
https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L226-L265
sahan/IckleBot
icklebot/src/main/java/com/lonepulse/icklebot/fragment/support/IckleFragment.java
IckleFragment.onCreateView
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { """ <p>Uses the {@code @Layout} metadata to identify the view resource associated with this {@link Fragment} and inflates it.</p> <p>See {@link Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)...
java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = IckleSupportFragment.shadow(this).onCreateView(inflater, container, savedInstanceState); return (view != null)? view :super.onCreateView(inflater, container, savedInstanceState); }
[ "@", "Override", "public", "View", "onCreateView", "(", "LayoutInflater", "inflater", ",", "ViewGroup", "container", ",", "Bundle", "savedInstanceState", ")", "{", "View", "view", "=", "IckleSupportFragment", ".", "shadow", "(", "this", ")", ".", "onCreateView", ...
<p>Uses the {@code @Layout} metadata to identify the view resource associated with this {@link Fragment} and inflates it.</p> <p>See {@link Fragment#onCreateView(LayoutInflater, ViewGroup, Bundle)}.</p>
[ "<p", ">", "Uses", "the", "{", "@code", "@Layout", "}", "metadata", "to", "identify", "the", "view", "resource", "associated", "with", "this", "{", "@link", "Fragment", "}", "and", "inflates", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/sahan/IckleBot/blob/a19003ceb3ad7c7ee508dc23a8cb31b5676aa499/icklebot/src/main/java/com/lonepulse/icklebot/fragment/support/IckleFragment.java#L49-L54
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/MRAsyncDiskService.java
MRAsyncDiskService.moveAndDeleteAbsolutePath
public boolean moveAndDeleteAbsolutePath(String absolutePathName) throws IOException { """ Move the path name to a temporary location and then delete it. Note that if there is no volume that contains this path, the path will stay as it is, and the function will return false. This functions returns whe...
java
public boolean moveAndDeleteAbsolutePath(String absolutePathName) throws IOException { for (int v = 0; v < volumes.length; v++) { String relative = getRelativePathName(absolutePathName, volumes[v]); if (relative != null) { return moveAndDeleteRelativePath(volumes[v], relative); ...
[ "public", "boolean", "moveAndDeleteAbsolutePath", "(", "String", "absolutePathName", ")", "throws", "IOException", "{", "for", "(", "int", "v", "=", "0", ";", "v", "<", "volumes", ".", "length", ";", "v", "++", ")", "{", "String", "relative", "=", "getRela...
Move the path name to a temporary location and then delete it. Note that if there is no volume that contains this path, the path will stay as it is, and the function will return false. This functions returns when the moves are done, but not necessarily all deletions are done. This is usually good enough because appli...
[ "Move", "the", "path", "name", "to", "a", "temporary", "location", "and", "then", "delete", "it", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/MRAsyncDiskService.java#L378-L390
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/FullySegmentedWindowTinyLfuPolicy.java
FullySegmentedWindowTinyLfuPolicy.onMiss
private void onMiss(long key) { """ Adds the entry to the admission window, evicting if necessary. """ Node node = new Node(key, Status.WINDOW_PROBATION); node.appendToTail(headWindowProbation); data.put(key, node); sizeWindow++; evict(); }
java
private void onMiss(long key) { Node node = new Node(key, Status.WINDOW_PROBATION); node.appendToTail(headWindowProbation); data.put(key, node); sizeWindow++; evict(); }
[ "private", "void", "onMiss", "(", "long", "key", ")", "{", "Node", "node", "=", "new", "Node", "(", "key", ",", "Status", ".", "WINDOW_PROBATION", ")", ";", "node", ".", "appendToTail", "(", "headWindowProbation", ")", ";", "data", ".", "put", "(", "ke...
Adds the entry to the admission window, evicting if necessary.
[ "Adds", "the", "entry", "to", "the", "admission", "window", "evicting", "if", "necessary", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment/FullySegmentedWindowTinyLfuPolicy.java#L120-L126
CodeNarc/CodeNarc
src/main/java/org/codenarc/util/AstUtil.java
AstUtil.getAnnotation
public static AnnotationNode getAnnotation(AnnotatedNode node, String name) { """ Return the AnnotationNode for the named annotation, or else null. Supports Groovy 1.5 and Groovy 1.6. @param node - the AnnotatedNode @param name - the name of the annotation @return the AnnotationNode or else null """ ...
java
public static AnnotationNode getAnnotation(AnnotatedNode node, String name) { List<AnnotationNode> annotations = node.getAnnotations(); for (AnnotationNode annot : annotations) { if (annot.getClassNode().getName().equals(name)) { return annot; } } ...
[ "public", "static", "AnnotationNode", "getAnnotation", "(", "AnnotatedNode", "node", ",", "String", "name", ")", "{", "List", "<", "AnnotationNode", ">", "annotations", "=", "node", ".", "getAnnotations", "(", ")", ";", "for", "(", "AnnotationNode", "annot", "...
Return the AnnotationNode for the named annotation, or else null. Supports Groovy 1.5 and Groovy 1.6. @param node - the AnnotatedNode @param name - the name of the annotation @return the AnnotationNode or else null
[ "Return", "the", "AnnotationNode", "for", "the", "named", "annotation", "or", "else", "null", ".", "Supports", "Groovy", "1", ".", "5", "and", "Groovy", "1", ".", "6", "." ]
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/util/AstUtil.java#L473-L481
ppiastucki/recast4j
detour/src/main/java/org/recast4j/detour/DetourCommon.java
DetourCommon.pointInPolygon
static boolean pointInPolygon(float[] pt, float[] verts, int nverts) { """ / All points are projected onto the xz-plane, so the y-values are ignored. """ // TODO: Replace pnpoly with triArea2D tests? int i, j; boolean c = false; for (i = 0, j = nverts - 1; i < nverts; j = i++) {...
java
static boolean pointInPolygon(float[] pt, float[] verts, int nverts) { // TODO: Replace pnpoly with triArea2D tests? int i, j; boolean c = false; for (i = 0, j = nverts - 1; i < nverts; j = i++) { int vi = i * 3; int vj = j * 3; if (((verts[vi + 2] > p...
[ "static", "boolean", "pointInPolygon", "(", "float", "[", "]", "pt", ",", "float", "[", "]", "verts", ",", "int", "nverts", ")", "{", "// TODO: Replace pnpoly with triArea2D tests?", "int", "i", ",", "j", ";", "boolean", "c", "=", "false", ";", "for", "(",...
/ All points are projected onto the xz-plane, so the y-values are ignored.
[ "/", "All", "points", "are", "projected", "onto", "the", "xz", "-", "plane", "so", "the", "y", "-", "values", "are", "ignored", "." ]
train
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detour/src/main/java/org/recast4j/detour/DetourCommon.java#L354-L367
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java
JMElasticsearchSearchAndCount.countQuery
public long countQuery(SearchRequestBuilder countRequestBuilder, long timeoutMillis) { """ Count query long. @param countRequestBuilder the count request builder @param timeoutMillis the timeout millis @return the long """ countRequestBuilder.setSize(0); return searchQuer...
java
public long countQuery(SearchRequestBuilder countRequestBuilder, long timeoutMillis) { countRequestBuilder.setSize(0); return searchQuery("countQuery", countRequestBuilder, timeoutMillis) .getHits().getTotalHits(); }
[ "public", "long", "countQuery", "(", "SearchRequestBuilder", "countRequestBuilder", ",", "long", "timeoutMillis", ")", "{", "countRequestBuilder", ".", "setSize", "(", "0", ")", ";", "return", "searchQuery", "(", "\"countQuery\"", ",", "countRequestBuilder", ",", "t...
Count query long. @param countRequestBuilder the count request builder @param timeoutMillis the timeout millis @return the long
[ "Count", "query", "long", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java#L771-L776
gitblit/fathom
fathom-x509/src/main/java/fathom/x509/X509Utils.java
X509Utils.newSSLCertificate
public static X509Certificate newSSLCertificate(X509Metadata sslMetadata, PrivateKey caPrivateKey, X509Certificate caCert, File targetStoreFile, X509Log x509log) { """ Creates a new SSL certificate signed by the CA private key and stored in keyStore. @param sslMetadata @param caPrivateKey @param caCert @par...
java
public static X509Certificate newSSLCertificate(X509Metadata sslMetadata, PrivateKey caPrivateKey, X509Certificate caCert, File targetStoreFile, X509Log x509log) { try { KeyPair pair = newKeyPair(); X500Name webDN = buildDistinguishedName(sslMetadata); X500Name issuerDN = ne...
[ "public", "static", "X509Certificate", "newSSLCertificate", "(", "X509Metadata", "sslMetadata", ",", "PrivateKey", "caPrivateKey", ",", "X509Certificate", "caCert", ",", "File", "targetStoreFile", ",", "X509Log", "x509log", ")", "{", "try", "{", "KeyPair", "pair", "...
Creates a new SSL certificate signed by the CA private key and stored in keyStore. @param sslMetadata @param caPrivateKey @param caCert @param targetStoreFile @param x509log
[ "Creates", "a", "new", "SSL", "certificate", "signed", "by", "the", "CA", "private", "key", "and", "stored", "in", "keyStore", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-x509/src/main/java/fathom/x509/X509Utils.java#L542-L595
tvbarthel/Cheerleader
library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java
PlaybackService.seekTo
public static void seekTo(Context context, String clientId, int milli) { """ Seek to the precise track position. <p/> The current playing state of the SoundCloud player will be kept. <p/> If playing it remains playing, if paused it remains paused. @param context context from which the service will be start...
java
public static void seekTo(Context context, String clientId, int milli) { Intent intent = new Intent(context, PlaybackService.class); intent.setAction(ACTION_SEEK_TO); intent.putExtra(BUNDLE_KEY_SOUND_CLOUD_CLIENT_ID, clientId); intent.putExtra(BUNDLE_KEY_SOUND_CLOUD_TRACK_POSITION, milli...
[ "public", "static", "void", "seekTo", "(", "Context", "context", ",", "String", "clientId", ",", "int", "milli", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", "context", ",", "PlaybackService", ".", "class", ")", ";", "intent", ".", "setAction",...
Seek to the precise track position. <p/> The current playing state of the SoundCloud player will be kept. <p/> If playing it remains playing, if paused it remains paused. @param context context from which the service will be started. @param clientId SoundCloud api client id. @param milli time in milli of the posit...
[ "Seek", "to", "the", "precise", "track", "position", ".", "<p", "/", ">", "The", "current", "playing", "state", "of", "the", "SoundCloud", "player", "will", "be", "kept", ".", "<p", "/", ">", "If", "playing", "it", "remains", "playing", "if", "paused", ...
train
https://github.com/tvbarthel/Cheerleader/blob/f61527e4cc44fcd0ed2e1e98aca285f8c236f24e/library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java#L354-L360
Scout24/appmon4j
core/src/main/java/de/is24/util/monitoring/database/MonitoringDataSource.java
MonitoringDataSource.getConnection
private Connection getConnection(Callable<Connection> callable, String monitorSuffix) throws SQLException { """ Executes the specified {@link java.util.concurrent.Callable} to fetch a connection. Monitors occurring exceptions/errors. @param callable the <code>Callable</code> that actually fetches a <code>Co...
java
private Connection getConnection(Callable<Connection> callable, String monitorSuffix) throws SQLException { final long now = System.currentTimeMillis(); try { MonitoringConnection c = new MonitoringConnection(callable.call()); doConnectionMonitoring(now, monitorSuffix); return c; ...
[ "private", "Connection", "getConnection", "(", "Callable", "<", "Connection", ">", "callable", ",", "String", "monitorSuffix", ")", "throws", "SQLException", "{", "final", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "Moni...
Executes the specified {@link java.util.concurrent.Callable} to fetch a connection. Monitors occurring exceptions/errors. @param callable the <code>Callable</code> that actually fetches a <code>Connection</code> @param monitorSuffix the suffix for the monitor name to increase (forwarded to {@link #doConnectionMoni...
[ "Executes", "the", "specified", "{", "@link", "java", ".", "util", ".", "concurrent", ".", "Callable", "}", "to", "fetch", "a", "connection", ".", "Monitors", "occurring", "exceptions", "/", "errors", "." ]
train
https://github.com/Scout24/appmon4j/blob/a662e5123805ea455cfd01e1b9ae5d808f83529c/core/src/main/java/de/is24/util/monitoring/database/MonitoringDataSource.java#L216-L250
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.noWhitespace
public static Validator<CharSequence> noWhitespace(@NonNull final Context context) { """ Creates and returns a validator, which allows to validate texts to ensure, that they contain no whitespace. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as...
java
public static Validator<CharSequence> noWhitespace(@NonNull final Context context) { return new NoWhitespaceValidator(context, R.string.default_error_message); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "noWhitespace", "(", "@", "NonNull", "final", "Context", "context", ")", "{", "return", "new", "NoWhitespaceValidator", "(", "context", ",", "R", ".", "string", ".", "default_error_message", ")", ";", ...
Creates and returns a validator, which allows to validate texts to ensure, that they contain no whitespace. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @return The validator, whic...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "contain", "no", "whitespace", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L545-L547
appium/java-client
src/main/java/io/appium/java_client/ScreenshotState.java
ScreenshotState.getOverlapScore
public double getOverlapScore(BufferedImage refImage, BufferedImage tplImage) { """ Compares two valid java bitmaps and calculates similarity score between them. Both images are expected to be of the same size/resolution. The method implicitly invokes {@link ComparesImages#getImagesSimilarity(byte[], byte[])}. ...
java
public double getOverlapScore(BufferedImage refImage, BufferedImage tplImage) { try (ByteArrayOutputStream img1 = new ByteArrayOutputStream(); ByteArrayOutputStream img2 = new ByteArrayOutputStream()) { ImageIO.write(refImage, "png", img1); ImageIO.write(tplImage, "png", img...
[ "public", "double", "getOverlapScore", "(", "BufferedImage", "refImage", ",", "BufferedImage", "tplImage", ")", "{", "try", "(", "ByteArrayOutputStream", "img1", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "ByteArrayOutputStream", "img2", "=", "new", "ByteAr...
Compares two valid java bitmaps and calculates similarity score between them. Both images are expected to be of the same size/resolution. The method implicitly invokes {@link ComparesImages#getImagesSimilarity(byte[], byte[])}. @param refImage reference image @param tplImage template @return similarity score value...
[ "Compares", "two", "valid", "java", "bitmaps", "and", "calculates", "similarity", "score", "between", "them", ".", "Both", "images", "are", "expected", "to", "be", "of", "the", "same", "size", "/", "resolution", ".", "The", "method", "implicitly", "invokes", ...
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/ScreenshotState.java#L216-L228
couchbase/CouchbaseMock
src/main/java/com/couchbase/mock/memcached/VBucketStore.java
VBucketStore.incrCoords
private MutationStatus incrCoords(KeySpec ks) { """ Increments the current coordinates for a new mutation. @param ks The key spec containing the vBucket ID whose coordinates should be increases @return A status object. """ final StorageVBucketCoordinates curCoord; synchronized (vbCoords) { ...
java
private MutationStatus incrCoords(KeySpec ks) { final StorageVBucketCoordinates curCoord; synchronized (vbCoords) { curCoord = vbCoords[ks.vbId]; } long seq = curCoord.incrSeqno(); long uuid = curCoord.getUuid(); VBucketCoordinates coord = new BasicVBucketCoo...
[ "private", "MutationStatus", "incrCoords", "(", "KeySpec", "ks", ")", "{", "final", "StorageVBucketCoordinates", "curCoord", ";", "synchronized", "(", "vbCoords", ")", "{", "curCoord", "=", "vbCoords", "[", "ks", ".", "vbId", "]", ";", "}", "long", "seq", "=...
Increments the current coordinates for a new mutation. @param ks The key spec containing the vBucket ID whose coordinates should be increases @return A status object.
[ "Increments", "the", "current", "coordinates", "for", "a", "new", "mutation", "." ]
train
https://github.com/couchbase/CouchbaseMock/blob/2085bbebade1d5b6356480e7bf335139d08383da/src/main/java/com/couchbase/mock/memcached/VBucketStore.java#L93-L103
apache/groovy
src/main/java/org/codehaus/groovy/vmplugin/v7/IndyMath.java
IndyMath.chooseMathMethod
public static boolean chooseMathMethod(Selector info, MetaMethod metaMethod) { """ Choose a method to replace the originally chosen metaMethod to have a more efficient call path. """ Map<MethodType,MethodHandle> xmap = methods.get(info.name); if (xmap==null) return false; MethodType t...
java
public static boolean chooseMathMethod(Selector info, MetaMethod metaMethod) { Map<MethodType,MethodHandle> xmap = methods.get(info.name); if (xmap==null) return false; MethodType type = replaceWithMoreSpecificType(info.args, info.targetType); type = widenOperators(type); ...
[ "public", "static", "boolean", "chooseMathMethod", "(", "Selector", "info", ",", "MetaMethod", "metaMethod", ")", "{", "Map", "<", "MethodType", ",", "MethodHandle", ">", "xmap", "=", "methods", ".", "get", "(", "info", ".", "name", ")", ";", "if", "(", ...
Choose a method to replace the originally chosen metaMethod to have a more efficient call path.
[ "Choose", "a", "method", "to", "replace", "the", "originally", "chosen", "metaMethod", "to", "have", "a", "more", "efficient", "call", "path", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/vmplugin/v7/IndyMath.java#L108-L120
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java
CPMeasurementUnitPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp measurement units where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPMeasurementUnit cpMeasurementUnit : findByUuid_C(uuid, companyId, Q...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPMeasurementUnit cpMeasurementUnit : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpMeasurementUnit); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPMeasurementUnit", "cpMeasurementUnit", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "Qu...
Removes all the cp measurement units where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "measurement", "units", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java#L1405-L1411
zaproxy/zaproxy
src/org/zaproxy/zap/view/ScanPanel.java
ScanPanel.scanNode
public void scanNode(SiteNode node, boolean incPort, User user) { """ Scans a node (URL). If a User is specified, the scan should be done from the point of view of the user. @param node the node @param incPort the inc port @param user the user """ log.debug("scanNode" + prefix + " node=" + node.getNo...
java
public void scanNode(SiteNode node, boolean incPort, User user) { log.debug("scanNode" + prefix + " node=" + node.getNodeName()); this.setTabFocus(); nodeSelected(node, incPort); if (currentSite != null && this.getStartScanButton().isEnabled()) { startScan(node, false, false, null, user); } }
[ "public", "void", "scanNode", "(", "SiteNode", "node", ",", "boolean", "incPort", ",", "User", "user", ")", "{", "log", ".", "debug", "(", "\"scanNode\"", "+", "prefix", "+", "\" node=\"", "+", "node", ".", "getNodeName", "(", ")", ")", ";", "this", "....
Scans a node (URL). If a User is specified, the scan should be done from the point of view of the user. @param node the node @param incPort the inc port @param user the user
[ "Scans", "a", "node", "(", "URL", ")", ".", "If", "a", "User", "is", "specified", "the", "scan", "should", "be", "done", "from", "the", "point", "of", "view", "of", "the", "user", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/ScanPanel.java#L470-L477
groupon/monsoon
expr/src/main/java/com/groupon/lex/metrics/timeseries/InterpolatedTSC.java
InterpolatedTSC.interpolateTSV
private TimeSeriesValue interpolateTSV(GroupName name) { """ Interpolates a group name, based on the most recent backward and oldest forward occurence. @param name The name of the group to interpolate. @return The interpolated name of the group. """ final Map.Entry<DateTime, TimeSeriesValue> backT...
java
private TimeSeriesValue interpolateTSV(GroupName name) { final Map.Entry<DateTime, TimeSeriesValue> backTSV = findName(backward, name), forwTSV = findName(forward, name); final long backMillis = max(new Duration(backTSV.getKey(), getTimestamp()).getMillis(), 0), forwMill...
[ "private", "TimeSeriesValue", "interpolateTSV", "(", "GroupName", "name", ")", "{", "final", "Map", ".", "Entry", "<", "DateTime", ",", "TimeSeriesValue", ">", "backTSV", "=", "findName", "(", "backward", ",", "name", ")", ",", "forwTSV", "=", "findName", "(...
Interpolates a group name, based on the most recent backward and oldest forward occurence. @param name The name of the group to interpolate. @return The interpolated name of the group.
[ "Interpolates", "a", "group", "name", "based", "on", "the", "most", "recent", "backward", "and", "oldest", "forward", "occurence", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/expr/src/main/java/com/groupon/lex/metrics/timeseries/InterpolatedTSC.java#L189-L200
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java
DataFactory.getDate
private static Date getDate(final AnnotationData pAnnotation, final BitUtils pBit) { """ Method to get a date from the bytes array @param pAnnotation annotation data @param pBit table bytes @return The date read of null """ Date date = null; if (pAnnotation.getDateStandard() == BCD_DATE) { date =...
java
private static Date getDate(final AnnotationData pAnnotation, final BitUtils pBit) { Date date = null; if (pAnnotation.getDateStandard() == BCD_DATE) { date = pBit.getNextDate(pAnnotation.getSize(), pAnnotation.getFormat(), true); } else if (pAnnotation.getDateStandard() == CPCL_DATE) { date = calculateCplc...
[ "private", "static", "Date", "getDate", "(", "final", "AnnotationData", "pAnnotation", ",", "final", "BitUtils", "pBit", ")", "{", "Date", "date", "=", "null", ";", "if", "(", "pAnnotation", ".", "getDateStandard", "(", ")", "==", "BCD_DATE", ")", "{", "da...
Method to get a date from the bytes array @param pAnnotation annotation data @param pBit table bytes @return The date read of null
[ "Method", "to", "get", "a", "date", "from", "the", "bytes", "array" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java#L66-L76
johnkil/Android-RobotoTextView
robototextview/src/main/java/com/devspark/robototextview/RobotoTypefaces.java
RobotoTypefaces.obtainTypeface
@NonNull public static Typeface obtainTypeface(@NonNull Context context, @NonNull TypedArray attrs) { """ Obtain typeface from attributes. @param context The Context the widget is running in, through which it can access the current theme, resources, etc. @param attrs The styled attribute values in this C...
java
@NonNull public static Typeface obtainTypeface(@NonNull Context context, @NonNull TypedArray attrs) { if (attrs.hasValue(R.styleable.RobotoTextView_robotoTypeface)) { @RobotoTypeface int typefaceValue = attrs.getInt(R.styleable.RobotoTextView_robotoTypeface, TYPEFACE_ROBOTO_REGULAR); ...
[ "@", "NonNull", "public", "static", "Typeface", "obtainTypeface", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "TypedArray", "attrs", ")", "{", "if", "(", "attrs", ".", "hasValue", "(", "R", ".", "styleable", ".", "RobotoTextView_robotoTypef...
Obtain typeface from attributes. @param context The Context the widget is running in, through which it can access the current theme, resources, etc. @param attrs The styled attribute values in this Context's theme. @return specify {@link Typeface}
[ "Obtain", "typeface", "from", "attributes", "." ]
train
https://github.com/johnkil/Android-RobotoTextView/blob/1341602f16c08057dddd193411e7dab96f963b77/robototextview/src/main/java/com/devspark/robototextview/RobotoTypefaces.java#L483-L494
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java
Expr.and
public Expr and(Expr expr) { """ Utility, combine this expression with another, using conjunction. The expression will only match if both conditions are met. @param expr the other expression @return self for chaining """ if (type == Type.TRUE) { set(expr); } else if (expr.type ...
java
public Expr and(Expr expr) { if (type == Type.TRUE) { set(expr); } else if (expr.type != Type.TRUE) { if (type.isLogical() && !expr.type.isLogical()) { if (type == AND) right.and(expr); else if (type != NOT) ...
[ "public", "Expr", "and", "(", "Expr", "expr", ")", "{", "if", "(", "type", "==", "Type", ".", "TRUE", ")", "{", "set", "(", "expr", ")", ";", "}", "else", "if", "(", "expr", ".", "type", "!=", "Type", ".", "TRUE", ")", "{", "if", "(", "type",...
Utility, combine this expression with another, using conjunction. The expression will only match if both conditions are met. @param expr the other expression @return self for chaining
[ "Utility", "combine", "this", "expression", "with", "another", "using", "conjunction", ".", "The", "expression", "will", "only", "match", "if", "both", "conditions", "are", "met", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java#L458-L474
rjeschke/txtmark
src/main/java/com/github/rjeschke/txtmark/Utils.java
Utils.getXMLTag
public final static void getXMLTag(final StringBuilder out, final StringBuilder in) { """ Extracts the tag from an XML element. @param out The StringBuilder to write to. @param in Input StringBuilder. """ int pos = 1; if (in.charAt(1) == '/') { pos++; } ...
java
public final static void getXMLTag(final StringBuilder out, final StringBuilder in) { int pos = 1; if (in.charAt(1) == '/') { pos++; } while (Character.isLetterOrDigit(in.charAt(pos))) { out.append(in.charAt(pos++)); } }
[ "public", "final", "static", "void", "getXMLTag", "(", "final", "StringBuilder", "out", ",", "final", "StringBuilder", "in", ")", "{", "int", "pos", "=", "1", ";", "if", "(", "in", ".", "charAt", "(", "1", ")", "==", "'", "'", ")", "{", "pos", "++"...
Extracts the tag from an XML element. @param out The StringBuilder to write to. @param in Input StringBuilder.
[ "Extracts", "the", "tag", "from", "an", "XML", "element", "." ]
train
https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Utils.java#L605-L616
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/CaffeineConfiguration.java
CaffeineConfiguration.setWeigherFactory
@SuppressWarnings("unchecked") public void setWeigherFactory(Optional<Factory<? extends Weigher<K, V>>> factory) { """ Set the {@link Factory} for the {@link Weigher}. @param factory the {@link Weigher} {@link Factory} """ weigherFactory = (Factory<Weigher<K, V>>) factory.orElse(null); }
java
@SuppressWarnings("unchecked") public void setWeigherFactory(Optional<Factory<? extends Weigher<K, V>>> factory) { weigherFactory = (Factory<Weigher<K, V>>) factory.orElse(null); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setWeigherFactory", "(", "Optional", "<", "Factory", "<", "?", "extends", "Weigher", "<", "K", ",", "V", ">", ">", ">", "factory", ")", "{", "weigherFactory", "=", "(", "Factory", "<", ...
Set the {@link Factory} for the {@link Weigher}. @param factory the {@link Weigher} {@link Factory}
[ "Set", "the", "{", "@link", "Factory", "}", "for", "the", "{", "@link", "Weigher", "}", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/CaffeineConfiguration.java#L426-L429
isisaddons-legacy/isis-module-excel
dom/src/main/java/org/isisaddons/module/excel/dom/util/ExcelServiceImpl.java
ExcelServiceImpl.toExcelPivot
@Programmatic public <T> Blob toExcelPivot( final List<T> domainObjects, final Class<T> cls, final String fileName) throws ExcelService.Exception { """ Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the c...
java
@Programmatic public <T> Blob toExcelPivot( final List<T> domainObjects, final Class<T> cls, final String fileName) throws ExcelService.Exception { return toExcelPivot(domainObjects, cls, null, fileName); }
[ "@", "Programmatic", "public", "<", "T", ">", "Blob", "toExcelPivot", "(", "final", "List", "<", "T", ">", "domainObjects", ",", "final", "Class", "<", "T", ">", "cls", ",", "final", "String", "fileName", ")", "throws", "ExcelService", ".", "Exception", ...
Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the class name. <p> Minimal requirements for the domain object are: </p> <ul> <li> One property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot. Empty values a...
[ "Creates", "a", "Blob", "holding", "a", "single", "-", "sheet", "spreadsheet", "with", "a", "pivot", "of", "the", "domain", "objects", ".", "The", "sheet", "name", "is", "derived", "from", "the", "class", "name", "." ]
train
https://github.com/isisaddons-legacy/isis-module-excel/blob/a3b92b1797ab2ed609667933d4164e9fb54b9f25/dom/src/main/java/org/isisaddons/module/excel/dom/util/ExcelServiceImpl.java#L111-L117
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.deleteDoc
private DocumentChange deleteDoc(QueryDocumentSnapshot oldDocument) { """ Applies a document delete to the document tree. Returns the corresponding DocumentChange event. """ ResourcePath resourcePath = oldDocument.getReference().getResourcePath(); int oldIndex = documentSet.indexOf(resourcePath); d...
java
private DocumentChange deleteDoc(QueryDocumentSnapshot oldDocument) { ResourcePath resourcePath = oldDocument.getReference().getResourcePath(); int oldIndex = documentSet.indexOf(resourcePath); documentSet = documentSet.remove(resourcePath); return new DocumentChange(oldDocument, Type.REMOVED, oldIndex,...
[ "private", "DocumentChange", "deleteDoc", "(", "QueryDocumentSnapshot", "oldDocument", ")", "{", "ResourcePath", "resourcePath", "=", "oldDocument", ".", "getReference", "(", ")", ".", "getResourcePath", "(", ")", ";", "int", "oldIndex", "=", "documentSet", ".", "...
Applies a document delete to the document tree. Returns the corresponding DocumentChange event.
[ "Applies", "a", "document", "delete", "to", "the", "document", "tree", ".", "Returns", "the", "corresponding", "DocumentChange", "event", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L487-L492
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.getClob
public Clob getClob(int columnIndex) throws SQLException { """ <!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>Clob</code> object in the Java programming language. <!-- end generic documentation --> <!-- st...
java
public Clob getClob(int columnIndex) throws SQLException { Object o = getObject(columnIndex); if (o == null) { return null; } if (o instanceof ClobDataID) { return new JDBCClobClient(session, (ClobDataID) o); } else if (o instanceof Clob) { ...
[ "public", "Clob", "getClob", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "Object", "o", "=", "getObject", "(", "columnIndex", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "o", "instanceof",...
<!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>Clob</code> object in the Java programming language. <!-- end generic documentation --> <!-- start release-specific documentation --> <div class="ReleaseSpecificDocument...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "C...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L4267-L4284
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/ArrayELResolver.java
ArrayELResolver.setValue
@Override public void setValue(ELContext context, Object base, Object property, Object value) { """ If the base object is a Java language array, attempts to set the value at the given index with the given value. The index is specified by the property argument, and coerced into an integer. If the coercion could ...
java
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException("context is null"); } if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-only"); } Array.set(base, ...
[ "@", "Override", "public", "void", "setValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ",", "Object", "value", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"co...
If the base object is a Java language array, attempts to set the value at the given index with the given value. The index is specified by the property argument, and coerced into an integer. If the coercion could not be performed, an IllegalArgumentException is thrown. If the index is out of bounds, a PropertyNotFoundEx...
[ "If", "the", "base", "object", "is", "a", "Java", "language", "array", "attempts", "to", "set", "the", "value", "at", "the", "given", "index", "with", "the", "given", "value", ".", "The", "index", "is", "specified", "by", "the", "property", "argument", "...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/ArrayELResolver.java#L245-L257
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java
ProcessContext.removeAttribute
public boolean removeAttribute(String attribute, boolean removeFromACModel, boolean notifyListeners) { """ Removes the given attribute from the context. @param attribute @param removeFromACModel @param notifyListeners @return """ if (!super.removeObject(attribute, false)) { ...
java
public boolean removeAttribute(String attribute, boolean removeFromACModel, boolean notifyListeners) { if (!super.removeObject(attribute, false)) { return false; } if (acModel != null && removeFromACModel && acModel.getContext() != this) { ...
[ "public", "boolean", "removeAttribute", "(", "String", "attribute", ",", "boolean", "removeFromACModel", ",", "boolean", "notifyListeners", ")", "{", "if", "(", "!", "super", ".", "removeObject", "(", "attribute", ",", "false", ")", ")", "{", "return", "false"...
Removes the given attribute from the context. @param attribute @param removeFromACModel @param notifyListeners @return
[ "Removes", "the", "given", "attribute", "from", "the", "context", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java#L360-L377
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/model/KnowledgeSwitchYardScanner.java
KnowledgeSwitchYardScanner.toLoggersModel
protected LoggersModel toLoggersModel(Logger[] loggerAnnotations, KnowledgeNamespace knowledgeNamespace) { """ Converts logger annotations to loggers model. @param loggerAnnotations annotations @param knowledgeNamespace knowledgeNamespace @return model """ if (loggerAnnotations == null || loggerAn...
java
protected LoggersModel toLoggersModel(Logger[] loggerAnnotations, KnowledgeNamespace knowledgeNamespace) { if (loggerAnnotations == null || loggerAnnotations.length == 0) { return null; } LoggersModel loggersModel = new V1LoggersModel(knowledgeNamespace.uri()); for (Logger lo...
[ "protected", "LoggersModel", "toLoggersModel", "(", "Logger", "[", "]", "loggerAnnotations", ",", "KnowledgeNamespace", "knowledgeNamespace", ")", "{", "if", "(", "loggerAnnotations", "==", "null", "||", "loggerAnnotations", ".", "length", "==", "0", ")", "{", "re...
Converts logger annotations to loggers model. @param loggerAnnotations annotations @param knowledgeNamespace knowledgeNamespace @return model
[ "Converts", "logger", "annotations", "to", "loggers", "model", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/model/KnowledgeSwitchYardScanner.java#L181-L203
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/DynamicArray.java
DynamicArray.set
public E set(int index, E element) { """ Replaces the element at the specified position in this list with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws Index...
java
public E set(int index, E element) { RangeCheck(index); E oldValue = (E) data[index]; data[index] = element; return oldValue; }
[ "public", "E", "set", "(", "int", "index", ",", "E", "element", ")", "{", "RangeCheck", "(", "index", ")", ";", "E", "oldValue", "=", "(", "E", ")", "data", "[", "index", "]", ";", "data", "[", "index", "]", "=", "element", ";", "return", "oldVal...
Replaces the element at the specified position in this list with the specified element. @param index index of the element to replace @param element element to be stored at the specified position @return the element previously at the specified position @throws IndexOutOfBoundsException {@inheritDoc}
[ "Replaces", "the", "element", "at", "the", "specified", "position", "in", "this", "list", "with", "the", "specified", "element", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/DynamicArray.java#L267-L273
Hygieia/Hygieia
collectors/artifact/artifactory/src/main/java/com/capitalone/dashboard/collector/ArtifactoryCollectorTask.java
ArtifactoryCollectorTask.addNewRepos
private void addNewRepos(List<ArtifactoryRepo> repos, List<ArtifactoryRepo> existingRepos, ArtifactoryCollector collector) { """ Add any new {@link ArtifactoryRepo}s. @param repos list of {@link ArtifactoryRepo}s @param existingRepos list of existing {@link ArtifactoryRepo}s @param collector the {...
java
private void addNewRepos(List<ArtifactoryRepo> repos, List<ArtifactoryRepo> existingRepos, ArtifactoryCollector collector) { long start = System.currentTimeMillis(); int count = 0; List<ArtifactoryRepo> newRepos = new ArrayList<>(); for (ArtifactoryRepo repo : repos) { ...
[ "private", "void", "addNewRepos", "(", "List", "<", "ArtifactoryRepo", ">", "repos", ",", "List", "<", "ArtifactoryRepo", ">", "existingRepos", ",", "ArtifactoryCollector", "collector", ")", "{", "long", "start", "=", "System", ".", "currentTimeMillis", "(", ")"...
Add any new {@link ArtifactoryRepo}s. @param repos list of {@link ArtifactoryRepo}s @param existingRepos list of existing {@link ArtifactoryRepo}s @param collector the {@link ArtifactoryCollector}
[ "Add", "any", "new", "{", "@link", "ArtifactoryRepo", "}", "s", "." ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/artifact/artifactory/src/main/java/com/capitalone/dashboard/collector/ArtifactoryCollectorTask.java#L253-L277
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.intUnaryOperator
public static IntUnaryOperator intUnaryOperator(CheckedIntUnaryOperator operator, Consumer<Throwable> handler) { """ Wrap a {@link CheckedIntUnaryOperator} in a {@link IntUnaryOperator} with a custom handler for checked exceptions. <p> Example: <code><pre> IntStream.of(1, 2, 3).map(Unchecked.intUnaryOperator( ...
java
public static IntUnaryOperator intUnaryOperator(CheckedIntUnaryOperator operator, Consumer<Throwable> handler) { return t -> { try { return operator.applyAsInt(t); } catch (Throwable e) { handler.accept(e); throw new IllegalSta...
[ "public", "static", "IntUnaryOperator", "intUnaryOperator", "(", "CheckedIntUnaryOperator", "operator", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "t", "->", "{", "try", "{", "return", "operator", ".", "applyAsInt", "(", "t", ")", "...
Wrap a {@link CheckedIntUnaryOperator} in a {@link IntUnaryOperator} with a custom handler for checked exceptions. <p> Example: <code><pre> IntStream.of(1, 2, 3).map(Unchecked.intUnaryOperator( i -> { if (i &lt; 0) throw new Exception("Only positive numbers allowed"); return i; }, e -> { throw new IllegalStateExceptio...
[ "Wrap", "a", "{", "@link", "CheckedIntUnaryOperator", "}", "in", "a", "{", "@link", "IntUnaryOperator", "}", "with", "a", "custom", "handler", "for", "checked", "exceptions", ".", "<p", ">", "Example", ":", "<code", ">", "<pre", ">", "IntStream", ".", "of"...
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L1956-L1967
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/csv/CSVDriverFunction.java
CSVDriverFunction.exportTable
public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String csvOptions) throws SQLException, IOException { """ Export a table or a query to a CSV file @param connection Active connection, do not close this connection. @param tableReference [[catalog.]sc...
java
public void exportTable(Connection connection, String tableReference, File fileName, ProgressVisitor progress, String csvOptions) throws SQLException, IOException { String regex = ".*(?i)\\b(select|from)\\b.*"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(tableRefe...
[ "public", "void", "exportTable", "(", "Connection", "connection", ",", "String", "tableReference", ",", "File", "fileName", ",", "ProgressVisitor", "progress", ",", "String", "csvOptions", ")", "throws", "SQLException", ",", "IOException", "{", "String", "regex", ...
Export a table or a query to a CSV file @param connection Active connection, do not close this connection. @param tableReference [[catalog.]schema.]table reference @param fileName File path to read @param progress @param csvOptions the CSV options ie "charset=UTF-8 fieldSeparator=| fieldDelimiter=," @throws SQLExcept...
[ "Export", "a", "table", "or", "a", "query", "to", "a", "CSV", "file" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/csv/CSVDriverFunction.java#L94-L128
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.patchProfile
@Override public void patchProfile(@NonNull final String profileId, @NonNull Map<String, Object> profileDetails, String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback) { """ Applies given profile patch if required permission is granted. @param profileId Id of an profile to patch. ...
java
@Override public void patchProfile(@NonNull final String profileId, @NonNull Map<String, Object> profileDetails, String eTag, @Nullable Callback<ComapiResult<Map<String, Object>>> callback) { adapter.adapt(patchProfile(profileId, profileDetails, eTag), callback); }
[ "@", "Override", "public", "void", "patchProfile", "(", "@", "NonNull", "final", "String", "profileId", ",", "@", "NonNull", "Map", "<", "String", ",", "Object", ">", "profileDetails", ",", "String", "eTag", ",", "@", "Nullable", "Callback", "<", "ComapiResu...
Applies given profile patch if required permission is granted. @param profileId Id of an profile to patch. @param profileDetails Profile details. @param callback Callback with the result.
[ "Applies", "given", "profile", "patch", "if", "required", "permission", "is", "granted", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L392-L395
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java
ComponentsInner.updateTags
public ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName) { """ Updates an existing component's tags. To update other fields use the CreateOrUpdate method. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights ...
java
public ApplicationInsightsComponentInner updateTags(String resourceGroupName, String resourceName) { return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); }
[ "public", "ApplicationInsightsComponentInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "toBlocking", "(", ")", ".", ...
Updates an existing component's tags. To update other fields use the CreateOrUpdate method. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExcept...
[ "Updates", "an", "existing", "component", "s", "tags", ".", "To", "update", "other", "fields", "use", "the", "CreateOrUpdate", "method", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java#L612-L614
VoltDB/voltdb
src/frontend/org/voltdb/RealVoltDB.java
RealVoltDB.setupDefaultDeployment
static String setupDefaultDeployment(VoltLogger logger) throws IOException { """ Create default deployment.xml file in voltdbroot if the deployment path is null. @return path to default deployment file @throws IOException """ return setupDefaultDeployment(logger, CatalogUtil.getVoltDbRoot(null)); ...
java
static String setupDefaultDeployment(VoltLogger logger) throws IOException { return setupDefaultDeployment(logger, CatalogUtil.getVoltDbRoot(null)); }
[ "static", "String", "setupDefaultDeployment", "(", "VoltLogger", "logger", ")", "throws", "IOException", "{", "return", "setupDefaultDeployment", "(", "logger", ",", "CatalogUtil", ".", "getVoltDbRoot", "(", "null", ")", ")", ";", "}" ]
Create default deployment.xml file in voltdbroot if the deployment path is null. @return path to default deployment file @throws IOException
[ "Create", "default", "deployment", ".", "xml", "file", "in", "voltdbroot", "if", "the", "deployment", "path", "is", "null", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/RealVoltDB.java#L4808-L4810
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.sortThis
public static <T, L extends List<T>> L sortThis(L list, final Predicate2<? super T, ? super T> predicate) { """ SortThis is a mutating method. The List passed in is also returned. """ return Iterate.sortThis(list, new Comparator<T>() { public int compare(T o1, T o2) { ...
java
public static <T, L extends List<T>> L sortThis(L list, final Predicate2<? super T, ? super T> predicate) { return Iterate.sortThis(list, new Comparator<T>() { public int compare(T o1, T o2) { if (predicate.accept(o1, o2)) { ...
[ "public", "static", "<", "T", ",", "L", "extends", "List", "<", "T", ">", ">", "L", "sortThis", "(", "L", "list", ",", "final", "Predicate2", "<", "?", "super", "T", ",", "?", "super", "T", ">", "predicate", ")", "{", "return", "Iterate", ".", "s...
SortThis is a mutating method. The List passed in is also returned.
[ "SortThis", "is", "a", "mutating", "method", ".", "The", "List", "passed", "in", "is", "also", "returned", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L896-L913
google/error-prone
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
ASTHelpers.findMethod
@Nullable public static MethodTree findMethod(MethodSymbol symbol, VisitorState state) { """ Returns the method tree that matches the given symbol within the compilation unit, or null if none was found. """ return JavacTrees.instance(state.context).getTree(symbol); }
java
@Nullable public static MethodTree findMethod(MethodSymbol symbol, VisitorState state) { return JavacTrees.instance(state.context).getTree(symbol); }
[ "@", "Nullable", "public", "static", "MethodTree", "findMethod", "(", "MethodSymbol", "symbol", ",", "VisitorState", "state", ")", "{", "return", "JavacTrees", ".", "instance", "(", "state", ".", "context", ")", ".", "getTree", "(", "symbol", ")", ";", "}" ]
Returns the method tree that matches the given symbol within the compilation unit, or null if none was found.
[ "Returns", "the", "method", "tree", "that", "matches", "the", "given", "symbol", "within", "the", "compilation", "unit", "or", "null", "if", "none", "was", "found", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L539-L542
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getStackValue
public ValueType getStackValue(int loc) throws DataflowAnalysisException { """ Get a value on the operand stack. @param loc the stack location, counting downwards from the top (location 0) """ if (!isValid()) { throw new DataflowAnalysisException("Accessing TOP or BOTTOM frame!"); ...
java
public ValueType getStackValue(int loc) throws DataflowAnalysisException { if (!isValid()) { throw new DataflowAnalysisException("Accessing TOP or BOTTOM frame!"); } int stackDepth = getStackDepth(); if (loc >= stackDepth) { throw new DataflowAnalysisException("no...
[ "public", "ValueType", "getStackValue", "(", "int", "loc", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "!", "isValid", "(", ")", ")", "{", "throw", "new", "DataflowAnalysisException", "(", "\"Accessing TOP or BOTTOM frame!\"", ")", ";", "}", "int",...
Get a value on the operand stack. @param loc the stack location, counting downwards from the top (location 0)
[ "Get", "a", "value", "on", "the", "operand", "stack", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L241-L254
plaid/plaid-java
src/main/java/com/plaid/client/internal/Util.java
Util.notEmpty
public static void notEmpty(Map map, String name) { """ Checks that a given map is not null and not empty. @param map The map to check @param name The name of the collection to use when raising an error. @throws IllegalArgumentException If the collection was null or empty. """ notNull(map, name); ...
java
public static void notEmpty(Map map, String name) { notNull(map, name); if (map.isEmpty()) { throw new IllegalArgumentException(name + " must not be empty"); } }
[ "public", "static", "void", "notEmpty", "(", "Map", "map", ",", "String", "name", ")", "{", "notNull", "(", "map", ",", "name", ")", ";", "if", "(", "map", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "name", "...
Checks that a given map is not null and not empty. @param map The map to check @param name The name of the collection to use when raising an error. @throws IllegalArgumentException If the collection was null or empty.
[ "Checks", "that", "a", "given", "map", "is", "not", "null", "and", "not", "empty", "." ]
train
https://github.com/plaid/plaid-java/blob/360f1f8a5178fa0c3c2c2e07a58f8ccec5f33117/src/main/java/com/plaid/client/internal/Util.java#L60-L66
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java
ListManagementImagesImpl.addImage
public Image addImage(String listId, AddImageOptionalParameter addImageOptionalParameter) { """ Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param addImageOptionalParameter the object representing the optional parameters to be set before calling this ...
java
public Image addImage(String listId, AddImageOptionalParameter addImageOptionalParameter) { return addImageWithServiceResponseAsync(listId, addImageOptionalParameter).toBlocking().single().body(); }
[ "public", "Image", "addImage", "(", "String", "listId", ",", "AddImageOptionalParameter", "addImageOptionalParameter", ")", "{", "return", "addImageWithServiceResponseAsync", "(", "listId", ",", "addImageOptionalParameter", ")", ".", "toBlocking", "(", ")", ".", "single...
Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param addImageOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throws APIErrorException ...
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java#L105-L107
googleapis/google-cloud-java
google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java
KeyManagementServiceClient.updateCryptoKeyPrimaryVersion
public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { """ Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. <p>Returns an error if called on an asymmetric key. <p>Sampl...
java
public final CryptoKey updateCryptoKeyPrimaryVersion(String name, String cryptoKeyVersionId) { UpdateCryptoKeyPrimaryVersionRequest request = UpdateCryptoKeyPrimaryVersionRequest.newBuilder() .setName(name) .setCryptoKeyVersionId(cryptoKeyVersionId) .build(); return ...
[ "public", "final", "CryptoKey", "updateCryptoKeyPrimaryVersion", "(", "String", "name", ",", "String", "cryptoKeyVersionId", ")", "{", "UpdateCryptoKeyPrimaryVersionRequest", "request", "=", "UpdateCryptoKeyPrimaryVersionRequest", ".", "newBuilder", "(", ")", ".", "setName"...
Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. <p>Returns an error if called on an asymmetric key. <p>Sample code: <pre><code> try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient....
[ "Update", "the", "version", "of", "a", "[", "CryptoKey", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ".", "CryptoKey", "]", "that", "will", "be", "used", "in", "[", "Encrypt", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java#L1792-L1800
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.setDoubleAttribute
public void setDoubleAttribute(String name, Double value) { """ Set attribute value of given type. @param name attribute name @param value attribute value """ Attribute attribute = getAttributes().get(name); if (!(attribute instanceof DoubleAttribute)) { throw new IllegalStateException("Cannot set d...
java
public void setDoubleAttribute(String name, Double value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof DoubleAttribute)) { throw new IllegalStateException("Cannot set double value on attribute with different type, " + attribute.getClass().getName() + " setting value " + valu...
[ "public", "void", "setDoubleAttribute", "(", "String", "name", ",", "Double", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "DoubleAttribute", ...
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#L260-L267
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/compare/CompareFileExtensions.java
CompareFileExtensions.simpleCompareFiles
public static IFileCompareResultBean simpleCompareFiles(final File sourceFile, final File fileToCompare) { """ Simple comparing the given files. @param sourceFile the source file @param fileToCompare the file to compare @return Returns a FileCompareResultBean Object with the results. """ return co...
java
public static IFileCompareResultBean simpleCompareFiles(final File sourceFile, final File fileToCompare) { return compareFiles(sourceFile, fileToCompare, true, false, false, true, false); }
[ "public", "static", "IFileCompareResultBean", "simpleCompareFiles", "(", "final", "File", "sourceFile", ",", "final", "File", "fileToCompare", ")", "{", "return", "compareFiles", "(", "sourceFile", ",", "fileToCompare", ",", "true", ",", "false", ",", "false", ","...
Simple comparing the given files. @param sourceFile the source file @param fileToCompare the file to compare @return Returns a FileCompareResultBean Object with the results.
[ "Simple", "comparing", "the", "given", "files", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/compare/CompareFileExtensions.java#L872-L876
ragunathjawahar/adapter-kit
library/src/com/mobsandgeeks/adapters/InstantAdapterCore.java
InstantAdapterCore.createNewView
public final View createNewView(final Context context, final ViewGroup parent) { """ Create a new view by inflating the associated XML layout. @param context The {@link Context} to use. @param parent The inflated view's parent. @return The {@link View} that was inflated from the layout. """ View v...
java
public final View createNewView(final Context context, final ViewGroup parent) { View view = mLayoutInflater.inflate(mLayoutResourceId, parent, false); SparseArray<Holder> holders = new SparseArray<Holder>(); int size = mViewIdsAndMetaCache.size(); for (int i = 0; i < size; i++) { ...
[ "public", "final", "View", "createNewView", "(", "final", "Context", "context", ",", "final", "ViewGroup", "parent", ")", "{", "View", "view", "=", "mLayoutInflater", ".", "inflate", "(", "mLayoutResourceId", ",", "parent", ",", "false", ")", ";", "SparseArray...
Create a new view by inflating the associated XML layout. @param context The {@link Context} to use. @param parent The inflated view's parent. @return The {@link View} that was inflated from the layout.
[ "Create", "a", "new", "view", "by", "inflating", "the", "associated", "XML", "layout", "." ]
train
https://github.com/ragunathjawahar/adapter-kit/blob/e5c13458c7f6dcc1c61410f9cfb55cd24bd31ca2/library/src/com/mobsandgeeks/adapters/InstantAdapterCore.java#L130-L151
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/LabelsApi.java
LabelsApi.subscribeLabel
public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { """ Subscribe a specified label @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param labelId the label ID @return HttpStatusCode 503 @throws GitLabApiExceptio...
java
public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException { Response response = post(Response.Status.NOT_MODIFIED, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "labels", labelId, "subscribe"); return (response.readEntity(...
[ "public", "Label", "subscribeLabel", "(", "Object", "projectIdOrPath", ",", "Integer", "labelId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "post", "(", "Response", ".", "Status", ".", "NOT_MODIFIED", ",", "getDefaultPerPageParam", "(", ...
Subscribe a specified label @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param labelId the label ID @return HttpStatusCode 503 @throws GitLabApiException if any exception occurs
[ "Subscribe", "a", "specified", "label" ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L209-L213
stripe/stripe-java
src/main/java/com/stripe/model/SubscriptionItem.java
SubscriptionItem.usageRecordSummaries
public UsageRecordSummaryCollection usageRecordSummaries() throws StripeException { """ For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 us...
java
public UsageRecordSummaryCollection usageRecordSummaries() throws StripeException { return usageRecordSummaries((Map<String, Object>) null, (RequestOptions) null); }
[ "public", "UsageRecordSummaryCollection", "usageRecordSummaries", "(", ")", "throws", "StripeException", "{", "return", "usageRecordSummaries", "(", "(", "Map", "<", "String", ",", "Object", ">", ")", "null", ",", "(", "RequestOptions", ")", "null", ")", ";", "}...
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the billing plan’s month of September). <p>The list is sorted in reverse-chrono...
[ "For", "the", "specified", "subscription", "item", "returns", "a", "list", "of", "summary", "objects", ".", "Each", "object", "in", "the", "list", "provides", "usage", "information", "that’s", "been", "summarized", "from", "multiple", "usage", "records", "and", ...
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/SubscriptionItem.java#L268-L270
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.saveRewriteAliases
public void saveRewriteAliases(CmsRequestContext requestContext, String siteRoot, List<CmsRewriteAlias> newAliases) throws CmsException { """ Replaces the rewrite aliases for a given site root.<p> @param requestContext the current request context @param siteRoot the site root for which the rewrite aliases ...
java
public void saveRewriteAliases(CmsRequestContext requestContext, String siteRoot, List<CmsRewriteAlias> newAliases) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(requestContext); try { // checkOfflineProject(dbc); // checkPerm...
[ "public", "void", "saveRewriteAliases", "(", "CmsRequestContext", "requestContext", ",", "String", "siteRoot", ",", "List", "<", "CmsRewriteAlias", ">", "newAliases", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbCont...
Replaces the rewrite aliases for a given site root.<p> @param requestContext the current request context @param siteRoot the site root for which the rewrite aliases should be replaced @param newAliases the new list of aliases for the given site root @throws CmsException if something goes wrong
[ "Replaces", "the", "rewrite", "aliases", "for", "a", "given", "site", "root", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L5902-L5915
jhg023/SimpleNet
src/main/java/simplenet/packet/Packet.java
Packet.putLong
public Packet putLong(long l, ByteOrder order) { """ Writes a single {@code long} with the specified {@link ByteOrder} to this {@link Packet}'s payload. @param l A {@code long}. @param order The internal byte order of the {@code long}. @return The {@link Packet} to allow for chained writes. """ ...
java
public Packet putLong(long l, ByteOrder order) { var buffer = HEAP_BUFFER_POOL.take(Long.BYTES); var array = buffer.putLong(order == ByteOrder.LITTLE_ENDIAN ? Long.reverseBytes(l) : l).array(); try { return enqueue(Arrays.copyOfRange(array, 0, Long.BYTES)); } finally...
[ "public", "Packet", "putLong", "(", "long", "l", ",", "ByteOrder", "order", ")", "{", "var", "buffer", "=", "HEAP_BUFFER_POOL", ".", "take", "(", "Long", ".", "BYTES", ")", ";", "var", "array", "=", "buffer", ".", "putLong", "(", "order", "==", "ByteOr...
Writes a single {@code long} with the specified {@link ByteOrder} to this {@link Packet}'s payload. @param l A {@code long}. @param order The internal byte order of the {@code long}. @return The {@link Packet} to allow for chained writes.
[ "Writes", "a", "single", "{", "@code", "long", "}", "with", "the", "specified", "{", "@link", "ByteOrder", "}", "to", "this", "{", "@link", "Packet", "}", "s", "payload", "." ]
train
https://github.com/jhg023/SimpleNet/blob/a5b55cbfe1768c6a28874f12adac3c748f2b509a/src/main/java/simplenet/packet/Packet.java#L259-L268
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java
UploadService.holdForegroundNotification
protected synchronized boolean holdForegroundNotification(String uploadId, Notification notification) { """ Check if the task is currently the one shown in the foreground notification. @param uploadId ID of the upload @return true if the current upload task holds the foreground notification, otherwise false ...
java
protected synchronized boolean holdForegroundNotification(String uploadId, Notification notification) { if (!isExecuteInForeground()) return false; if (foregroundUploadId == null) { foregroundUploadId = uploadId; Logger.debug(TAG, uploadId + " now holds the foreground notificati...
[ "protected", "synchronized", "boolean", "holdForegroundNotification", "(", "String", "uploadId", ",", "Notification", "notification", ")", "{", "if", "(", "!", "isExecuteInForeground", "(", ")", ")", "return", "false", ";", "if", "(", "foregroundUploadId", "==", "...
Check if the task is currently the one shown in the foreground notification. @param uploadId ID of the upload @return true if the current upload task holds the foreground notification, otherwise false
[ "Check", "if", "the", "task", "is", "currently", "the", "one", "shown", "in", "the", "foreground", "notification", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/UploadService.java#L379-L393
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java
ZooKeeperMasterModel.getJobs
@Override public Map<JobId, Job> getJobs() { """ Returns a {@link Map} of {@link JobId} to {@link Job} objects for all of the jobs known. """ log.debug("getting jobs"); final String folder = Paths.configJobs(); final ZooKeeperClient client = provider.get("getJobs"); try { final List<Str...
java
@Override public Map<JobId, Job> getJobs() { log.debug("getting jobs"); final String folder = Paths.configJobs(); final ZooKeeperClient client = provider.get("getJobs"); try { final List<String> ids; try { ids = client.getChildren(folder); } catch (NoNodeException e) { ...
[ "@", "Override", "public", "Map", "<", "JobId", ",", "Job", ">", "getJobs", "(", ")", "{", "log", ".", "debug", "(", "\"getting jobs\"", ")", ";", "final", "String", "folder", "=", "Paths", ".", "configJobs", "(", ")", ";", "final", "ZooKeeperClient", ...
Returns a {@link Map} of {@link JobId} to {@link Job} objects for all of the jobs known.
[ "Returns", "a", "{" ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java#L1357-L1386
JOML-CI/JOML
src/org/joml/Matrix3x2d.java
Matrix3x2d.scaleAroundLocal
public Matrix3x2d scaleAroundLocal(double sx, double sy, double sz, double ox, double oy, double oz) { """ Pre-multiply scaling to this matrix by scaling the base axes by the given sx and sy factors while using <code>(ox, oy)</code> as the scaling origin. <p> If <code>M</code> is <code>this</code> matrix and <c...
java
public Matrix3x2d scaleAroundLocal(double sx, double sy, double sz, double ox, double oy, double oz) { return scaleAroundLocal(sx, sy, ox, oy, this); }
[ "public", "Matrix3x2d", "scaleAroundLocal", "(", "double", "sx", ",", "double", "sy", ",", "double", "sz", ",", "double", "ox", ",", "double", "oy", ",", "double", "oz", ")", "{", "return", "scaleAroundLocal", "(", "sx", ",", "sy", ",", "ox", ",", "oy"...
Pre-multiply scaling to this matrix by scaling the base axes by the given sx and sy factors while using <code>(ox, oy)</code> as the scaling origin. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>S * M</code>. So when transforming a vector <cod...
[ "Pre", "-", "multiply", "scaling", "to", "this", "matrix", "by", "scaling", "the", "base", "axes", "by", "the", "given", "sx", "and", "sy", "factors", "while", "using", "<code", ">", "(", "ox", "oy", ")", "<", "/", "code", ">", "as", "the", "scaling"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2d.java#L1562-L1564
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.getNetworkConfigurationDiagnostic
public NetworkConfigurationDiagnosticResponseInner getNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { """ Get network configuration diagnostic. @param resourceGroupName The name of the resource group. @param networkWatch...
java
public NetworkConfigurationDiagnosticResponseInner getNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { return getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toB...
[ "public", "NetworkConfigurationDiagnosticResponseInner", "getNetworkConfigurationDiagnostic", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "NetworkConfigurationDiagnosticParameters", "parameters", ")", "{", "return", "getNetworkConfigurationDiagnosticWi...
Get network configuration diagnostic. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher. @param parameters Parameters to get network configuration diagnostic. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponse...
[ "Get", "network", "configuration", "diagnostic", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkWatchersInner.java#L2657-L2659
tvesalainen/util
util/src/main/java/org/vesalainen/math/matrix/AbstractMatrix.java
AbstractMatrix.getInstance
public static AbstractMatrix getInstance(int rows, Object values, Class<?> cls) { """ Returns new AbstractMatrix initialized to values. <p>E.g. 2x2 matrix has A00, A01, A10, A11 @param rows Number of rows @param values Values row by row @return """ int length = Array.getLength(values); if (...
java
public static AbstractMatrix getInstance(int rows, Object values, Class<?> cls) { int length = Array.getLength(values); if (length % rows != 0) { throw new IllegalArgumentException("not full rows"); } return new AbstractMatrix(rows, copyOf(values, cls)); }
[ "public", "static", "AbstractMatrix", "getInstance", "(", "int", "rows", ",", "Object", "values", ",", "Class", "<", "?", ">", "cls", ")", "{", "int", "length", "=", "Array", ".", "getLength", "(", "values", ")", ";", "if", "(", "length", "%", "rows", ...
Returns new AbstractMatrix initialized to values. <p>E.g. 2x2 matrix has A00, A01, A10, A11 @param rows Number of rows @param values Values row by row @return
[ "Returns", "new", "AbstractMatrix", "initialized", "to", "values", ".", "<p", ">", "E", ".", "g", ".", "2x2", "matrix", "has", "A00", "A01", "A10", "A11" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/matrix/AbstractMatrix.java#L76-L84
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/stats/StatsInterface.java
StatsInterface.getPhotosetReferrers
public ReferrerList getPhotosetReferrers(Date date, String domain, String photosetId, int perPage, int page) throws FlickrException { """ Get a list of referrers from a given domain to a photoset. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GM...
java
public ReferrerList getPhotosetReferrers(Date date, String domain, String photosetId, int perPage, int page) throws FlickrException { return getReferrers(METHOD_GET_PHOTOSET_REFERRERS, domain, "photoset_id", photosetId, date, perPage, page); }
[ "public", "ReferrerList", "getPhotosetReferrers", "(", "Date", "date", ",", "String", "domain", ",", "String", "photosetId", ",", "int", "perPage", ",", "int", "page", ")", "throws", "FlickrException", "{", "return", "getReferrers", "(", "METHOD_GET_PHOTOSET_REFERRE...
Get a list of referrers from a given domain to a photoset. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will automatically be rounded down to the start of the day. @param domain (Required) The domain to return referrer...
[ "Get", "a", "list", "of", "referrers", "from", "a", "given", "domain", "to", "a", "photoset", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/stats/StatsInterface.java#L240-L242
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/access/WSDLServlet.java
WSDLServlet.getWSDL
private void getWSDL(String api, String requestURL, PrintWriter out) throws IOException, ServletException { """ Get the self-contained WSDL given the api name and request URL. """ String wsdlPath = (String) _WSDL_PATHS.get(api); if (wsdlPath != null) { File schemaFile ...
java
private void getWSDL(String api, String requestURL, PrintWriter out) throws IOException, ServletException { String wsdlPath = (String) _WSDL_PATHS.get(api); if (wsdlPath != null) { File schemaFile = new File(_serverDir, _XSD_PATH); File sourceWSDL = new File(_server...
[ "private", "void", "getWSDL", "(", "String", "api", ",", "String", "requestURL", ",", "PrintWriter", "out", ")", "throws", "IOException", ",", "ServletException", "{", "String", "wsdlPath", "=", "(", "String", ")", "_WSDL_PATHS", ".", "get", "(", "api", ")",...
Get the self-contained WSDL given the api name and request URL.
[ "Get", "the", "self", "-", "contained", "WSDL", "given", "the", "api", "name", "and", "request", "URL", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/WSDLServlet.java#L111-L132
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSession.java
CmsUgcSession.addContentValues
protected void addContentValues(CmsXmlContent content, Locale locale, Map<String, String> contentValues) throws CmsXmlException { """ Adds the given values to the content document.<p> @param content the content document @param locale the content locale @param contentValues the values @throws CmsXmlExce...
java
protected void addContentValues(CmsXmlContent content, Locale locale, Map<String, String> contentValues) throws CmsXmlException { if (!content.hasLocale(locale)) { content.addLocale(m_cms, locale); } List<String> paths = new ArrayList<String>(contentValues.keySet()); // ...
[ "protected", "void", "addContentValues", "(", "CmsXmlContent", "content", ",", "Locale", "locale", ",", "Map", "<", "String", ",", "String", ">", "contentValues", ")", "throws", "CmsXmlException", "{", "if", "(", "!", "content", ".", "hasLocale", "(", "locale"...
Adds the given values to the content document.<p> @param content the content document @param locale the content locale @param contentValues the values @throws CmsXmlException if writing the XML fails
[ "Adds", "the", "given", "values", "to", "the", "content", "document", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSession.java#L597-L625
OpenLiberty/open-liberty
dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/session/internal/SessionInfo.java
SessionInfo.stripURL
public static String stripURL(String url, SessionInfo info) { """ Strip out any session id information from the input URL. @param url @param info @return String """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Removing any session id from [" + url + ...
java
public static String stripURL(String url, SessionInfo info) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Removing any session id from [" + url + "]"); } String target = info.getSessionConfig().getURLRewritingMarker(); URLParser parser = n...
[ "public", "static", "String", "stripURL", "(", "String", "url", ",", "SessionInfo", "info", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc",...
Strip out any session id information from the input URL. @param url @param info @return String
[ "Strip", "out", "any", "session", "id", "information", "from", "the", "input", "URL", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/session/internal/SessionInfo.java#L171-L189
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.requestSpeak
public void requestSpeak (SpeakService speakService, String message, byte mode) { """ Requests that a speak message with the specified mode be generated and delivered via the supplied speak service instance (which will be associated with a particular "speak object"). The message will first be validated by all re...
java
public void requestSpeak (SpeakService speakService, String message, byte mode) { if (speakService == null) { if (_place == null) { return; } speakService = _place.speakService; } // make sure they can say what they want to say mes...
[ "public", "void", "requestSpeak", "(", "SpeakService", "speakService", ",", "String", "message", ",", "byte", "mode", ")", "{", "if", "(", "speakService", "==", "null", ")", "{", "if", "(", "_place", "==", "null", ")", "{", "return", ";", "}", "speakServ...
Requests that a speak message with the specified mode be generated and delivered via the supplied speak service instance (which will be associated with a particular "speak object"). The message will first be validated by all registered {@link ChatFilter}s (and possibly vetoed) before being dispatched. @param speakServ...
[ "Requests", "that", "a", "speak", "message", "with", "the", "specified", "mode", "be", "generated", "and", "delivered", "via", "the", "supplied", "speak", "service", "instance", "(", "which", "will", "be", "associated", "with", "a", "particular", "speak", "obj...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L453-L470
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectLineSegmentAar
public static int intersectLineSegmentAar(Vector2dc p0, Vector2dc p1, Vector2dc min, Vector2dc max, Vector2d result) { """ Determine whether the undirected line segment with the end points <code>p0</code> and <code>p1</code> intersects the axis-aligned rectangle given as its minimum corner <code>min</code> and ma...
java
public static int intersectLineSegmentAar(Vector2dc p0, Vector2dc p1, Vector2dc min, Vector2dc max, Vector2d result) { return intersectLineSegmentAar(p0.x(), p0.y(), p1.x(), p1.y(), min.x(), min.y(), max.x(), max.y(), result); }
[ "public", "static", "int", "intersectLineSegmentAar", "(", "Vector2dc", "p0", ",", "Vector2dc", "p1", ",", "Vector2dc", "min", ",", "Vector2dc", "max", ",", "Vector2d", "result", ")", "{", "return", "intersectLineSegmentAar", "(", "p0", ".", "x", "(", ")", "...
Determine whether the undirected line segment with the end points <code>p0</code> and <code>p1</code> intersects the axis-aligned rectangle given as its minimum corner <code>min</code> and maximum corner <code>max</code>, and store the values of the parameter <i>t</i> in the ray equation <i>p(t) = p0 + t * (p1 - p0)</i...
[ "Determine", "whether", "the", "undirected", "line", "segment", "with", "the", "end", "points", "<code", ">", "p0<", "/", "code", ">", "and", "<code", ">", "p1<", "/", "code", ">", "intersects", "the", "axis", "-", "aligned", "rectangle", "given", "as", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L4551-L4553
Metatavu/edelphi
rest/src/main/java/fi/metatavu/edelphi/permissions/PermissionController.java
PermissionController.hasDelfoiAccess
public boolean hasDelfoiAccess(User user, DelfoiActionName actionName) { """ Returns whether user has required delfoi action access @param user user @param actionName action @return whether user role required action access """ if (isSuperUser(user)) { return true; } DelfoiAction act...
java
public boolean hasDelfoiAccess(User user, DelfoiActionName actionName) { if (isSuperUser(user)) { return true; } DelfoiAction action = delfoiActionDAO.findByActionName(actionName.toString()); if (action == null) { logger.info(String.format("ActionUtils.hasDelfoiAccess - undefined action...
[ "public", "boolean", "hasDelfoiAccess", "(", "User", "user", ",", "DelfoiActionName", "actionName", ")", "{", "if", "(", "isSuperUser", "(", "user", ")", ")", "{", "return", "true", ";", "}", "DelfoiAction", "action", "=", "delfoiActionDAO", ".", "findByAction...
Returns whether user has required delfoi action access @param user user @param actionName action @return whether user role required action access
[ "Returns", "whether", "user", "has", "required", "delfoi", "action", "access" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/rest/src/main/java/fi/metatavu/edelphi/permissions/PermissionController.java#L62-L75
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/indexing/BranchUniversalObject.java
BranchUniversalObject.registerView
public void registerView(@Nullable RegisterViewStatusListener callback) { """ Mark the content referred by this object as viewed. This increment the view count of the contents referred by this object. @param callback An instance of {@link RegisterViewStatusListener} to listen to results of the operation """...
java
public void registerView(@Nullable RegisterViewStatusListener callback) { if (Branch.getInstance() != null) { Branch.getInstance().registerView(this, callback); } else { if (callback != null) { callback.onRegisterViewFinished(false, new BranchError("Register view ...
[ "public", "void", "registerView", "(", "@", "Nullable", "RegisterViewStatusListener", "callback", ")", "{", "if", "(", "Branch", ".", "getInstance", "(", ")", "!=", "null", ")", "{", "Branch", ".", "getInstance", "(", ")", ".", "registerView", "(", "this", ...
Mark the content referred by this object as viewed. This increment the view count of the contents referred by this object. @param callback An instance of {@link RegisterViewStatusListener} to listen to results of the operation
[ "Mark", "the", "content", "referred", "by", "this", "object", "as", "viewed", ".", "This", "increment", "the", "view", "count", "of", "the", "contents", "referred", "by", "this", "object", "." ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/indexing/BranchUniversalObject.java#L560-L568
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findByG_C
@Override public List<CommerceOrder> findByG_C(long groupId, long commerceAccountId, int start, int end) { """ Returns a range of all the commerce orders where groupId = &#63; and commerceAccountId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>st...
java
@Override public List<CommerceOrder> findByG_C(long groupId, long commerceAccountId, int start, int end) { return findByG_C(groupId, commerceAccountId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findByG_C", "(", "long", "groupId", ",", "long", "commerceAccountId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_C", "(", "groupId", ",", "commerceAccountId", ",", "star...
Returns a range of all the commerce orders where groupId = &#63; and commerceAccountId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to t...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "orders", "where", "groupId", "=", "&#63", ";", "and", "commerceAccountId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L3571-L3575
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/BasePrepareStatement.java
BasePrepareStatement.setBlob
public void setBlob(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException { """ Sets the designated parameter to a <code>InputStream</code> object. The inputstream must contain the number of characters specified by length otherwise a <code>SQLException</code> wil...
java
public void setBlob(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException { if (inputStream == null) { setNull(parameterIndex, ColumnType.BLOB); return; } setParameter(parameterIndex, new StreamParameter(inputStream, length, noBackslashEscapes)); ...
[ "public", "void", "setBlob", "(", "final", "int", "parameterIndex", ",", "final", "InputStream", "inputStream", ",", "final", "long", "length", ")", "throws", "SQLException", "{", "if", "(", "inputStream", "==", "null", ")", "{", "setNull", "(", "parameterInde...
Sets the designated parameter to a <code>InputStream</code> object. The inputstream must contain the number of characters specified by length otherwise a <code>SQLException</code> will be generated when the <code>PreparedStatement</code> is executed. This method differs from the <code>setBinaryStream (int, InputStrea...
[ "Sets", "the", "designated", "parameter", "to", "a", "<code", ">", "InputStream<", "/", "code", ">", "object", ".", "The", "inputstream", "must", "contain", "the", "number", "of", "characters", "specified", "by", "length", "otherwise", "a", "<code", ">", "SQ...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/BasePrepareStatement.java#L337-L345
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.readJSON
public static JSON readJSON(File file, Charset charset) throws IORuntimeException { """ 读取JSON @param file JSON文件 @param charset 编码 @return JSON(包括JSONObject和JSONArray) @throws IORuntimeException IO异常 """ return parse(FileReader.create(file, charset).readString()); }
java
public static JSON readJSON(File file, Charset charset) throws IORuntimeException { return parse(FileReader.create(file, charset).readString()); }
[ "public", "static", "JSON", "readJSON", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "return", "parse", "(", "FileReader", ".", "create", "(", "file", ",", "charset", ")", ".", "readString", "(", ")", ")", ";", ...
读取JSON @param file JSON文件 @param charset 编码 @return JSON(包括JSONObject和JSONArray) @throws IORuntimeException IO异常
[ "读取JSON" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L212-L214
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/code/CodedConstant.java
CodedConstant.computeSize
public static int computeSize(int order, Object o, FieldType type, boolean debug, File path) { """ get object size by {@link FieldType}. @param order the order @param o the o @param type the type @param debug the debug @param path the path @return the int """ return computeSize(order, o, type, ...
java
public static int computeSize(int order, Object o, FieldType type, boolean debug, File path) { return computeSize(order, o, type, false, debug, path); }
[ "public", "static", "int", "computeSize", "(", "int", "order", ",", "Object", "o", ",", "FieldType", "type", ",", "boolean", "debug", ",", "File", "path", ")", "{", "return", "computeSize", "(", "order", ",", "o", ",", "type", ",", "false", ",", "debug...
get object size by {@link FieldType}. @param order the order @param o the o @param type the type @param debug the debug @param path the path @return the int
[ "get", "object", "size", "by", "{", "@link", "FieldType", "}", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/code/CodedConstant.java#L253-L255
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/ApiImplementor.java
ApiImplementor.handleApiAction
public ApiResponse handleApiAction(String name, JSONObject params) throws ApiException { """ Override if implementing one or more actions @param name the name of the requested action @param params the API request parameters @return the API response @throws ApiException if an error occurred while handling the A...
java
public ApiResponse handleApiAction(String name, JSONObject params) throws ApiException { throw new ApiException(ApiException.Type.BAD_ACTION, name); }
[ "public", "ApiResponse", "handleApiAction", "(", "String", "name", ",", "JSONObject", "params", ")", "throws", "ApiException", "{", "throw", "new", "ApiException", "(", "ApiException", ".", "Type", ".", "BAD_ACTION", ",", "name", ")", ";", "}" ]
Override if implementing one or more actions @param name the name of the requested action @param params the API request parameters @return the API response @throws ApiException if an error occurred while handling the API action endpoint
[ "Override", "if", "implementing", "one", "or", "more", "actions" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/ApiImplementor.java#L335-L337
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/DynaBean.java
DynaBean.set
@SuppressWarnings( { """ 设置字段值 @param fieldName 字段名 @param value 字段值 @throws BeanException 反射获取属性值或字段值导致的异常 """ "unchecked", "rawtypes" }) public void set(String fieldName, Object value) throws BeanException{ if(Map.class.isAssignableFrom(beanClass)){ ((Map)bean).put(fieldName, value); return; ...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public void set(String fieldName, Object value) throws BeanException{ if(Map.class.isAssignableFrom(beanClass)){ ((Map)bean).put(fieldName, value); return; }else{ try { final Method setter = BeanUtil.getBeanDesc(beanClass).getSetter(fieldName); ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "void", "set", "(", "String", "fieldName", ",", "Object", "value", ")", "throws", "BeanException", "{", "if", "(", "Map", ".", "class", ".", "isAssignableFrom", "(",...
设置字段值 @param fieldName 字段名 @param value 字段值 @throws BeanException 反射获取属性值或字段值导致的异常
[ "设置字段值" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/DynaBean.java#L113-L129
m-m-m/util
nls/src/main/java/net/sf/mmm/util/nls/base/NlsBundleHelper.java
NlsBundleHelper.isNlsBundleMethod
public boolean isNlsBundleMethod(Method method, boolean ignoreIllegalMethods) { """ This method determines if the given {@link Method} is a regular {@link NlsBundle}-method. @param method the {@link Method} to check. @param ignoreIllegalMethods - {@code true} if illegal methods (non NlsBundleMethods other than...
java
public boolean isNlsBundleMethod(Method method, boolean ignoreIllegalMethods) { Class<?> declaringClass = method.getDeclaringClass(); assert (declaringClass.isInterface()); if (NlsMessage.class.equals(method.getReturnType())) { assert (NlsBundle.class.isAssignableFrom(declaringClass)); re...
[ "public", "boolean", "isNlsBundleMethod", "(", "Method", "method", ",", "boolean", "ignoreIllegalMethods", ")", "{", "Class", "<", "?", ">", "declaringClass", "=", "method", ".", "getDeclaringClass", "(", ")", ";", "assert", "(", "declaringClass", ".", "isInterf...
This method determines if the given {@link Method} is a regular {@link NlsBundle}-method. @param method the {@link Method} to check. @param ignoreIllegalMethods - {@code true} if illegal methods (non NlsBundleMethods other than those defined by {@link Object}) should be ignored, {@code false} if they should cause an e...
[ "This", "method", "determines", "if", "the", "given", "{", "@link", "Method", "}", "is", "a", "regular", "{", "@link", "NlsBundle", "}", "-", "method", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/nls/src/main/java/net/sf/mmm/util/nls/base/NlsBundleHelper.java#L183-L196
BeholderTAF/beholder-selenium
src/main/java/br/ufmg/dcc/saotome/beholder/selenium/WebElementAdapter.java
WebElementAdapter.findElements
@Override public List<WebElement> findElements(final By by) { """ {@inheritDoc} <p> The method using the elements matched by findElements must implement a catch for StaleElementReferenceException, because if a AJAX reloads one of the elements, the exceptions is not solved by WebElementAdapter. """ retur...
java
@Override public List<WebElement> findElements(final By by) { return (List<WebElement>) (new StaleExceptionResolver<List<WebElement>>() { @Override public List<WebElement> execute(WebElement element) { List<WebElement> elements = new ArrayList<WebElement>(); // create // a ...
[ "@", "Override", "public", "List", "<", "WebElement", ">", "findElements", "(", "final", "By", "by", ")", "{", "return", "(", "List", "<", "WebElement", ">", ")", "(", "new", "StaleExceptionResolver", "<", "List", "<", "WebElement", ">", ">", "(", ")", ...
{@inheritDoc} <p> The method using the elements matched by findElements must implement a catch for StaleElementReferenceException, because if a AJAX reloads one of the elements, the exceptions is not solved by WebElementAdapter.
[ "{" ]
train
https://github.com/BeholderTAF/beholder-selenium/blob/8dc999e74a9c3f5c09e4e68ea0ef5634cdb760ee/src/main/java/br/ufmg/dcc/saotome/beholder/selenium/WebElementAdapter.java#L252-L271
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateRxInterface
private void generateRxInterface(String daoFactory, RxInterfaceType interfaceType, Class<?> clazz) { """ Generate rx interface. @param daoFactory the dao factory @param interfaceType the interface type @param clazz the clazz """ // create interfaces { ParameterizedTypeName parameterizedTypeName ...
java
private void generateRxInterface(String daoFactory, RxInterfaceType interfaceType, Class<?> clazz) { // create interfaces { ParameterizedTypeName parameterizedTypeName = ParameterizedTypeName.get(ClassName.get(clazz), TypeVariableName.get("T")); String preExecutorName = clazz.getSimpleName().replace("Emi...
[ "private", "void", "generateRxInterface", "(", "String", "daoFactory", ",", "RxInterfaceType", "interfaceType", ",", "Class", "<", "?", ">", "clazz", ")", "{", "// create interfaces", "{", "ParameterizedTypeName", "parameterizedTypeName", "=", "ParameterizedTypeName", "...
Generate rx interface. @param daoFactory the dao factory @param interfaceType the interface type @param clazz the clazz
[ "Generate", "rx", "interface", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L1311-L1347
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/maxent/LogLinearXYData.java
LogLinearXYData.addEx
public void addEx(double weight, int x, int y, FeatureVector[] fvs) { """ Adds a new log-linear model instance. @param weight The weight of this example. @param x The observation, x. @param y The prediction, y. @param fvs The binary features on the observations, x, for all possible labels, y'. Indexed by y'....
java
public void addEx(double weight, int x, int y, FeatureVector[] fvs) { if (numYs == -1) { numYs = fvs.length; } if (yAlphabet.size() > numYs) { throw new IllegalStateException("Y alphabet has grown larger than the number of Ys"); } if (y >= numYs) { ...
[ "public", "void", "addEx", "(", "double", "weight", ",", "int", "x", ",", "int", "y", ",", "FeatureVector", "[", "]", "fvs", ")", "{", "if", "(", "numYs", "==", "-", "1", ")", "{", "numYs", "=", "fvs", ".", "length", ";", "}", "if", "(", "yAlph...
Adds a new log-linear model instance. @param weight The weight of this example. @param x The observation, x. @param y The prediction, y. @param fvs The binary features on the observations, x, for all possible labels, y'. Indexed by y'.
[ "Adds", "a", "new", "log", "-", "linear", "model", "instance", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/maxent/LogLinearXYData.java#L88-L102
liyiorg/weixin-popular
src/main/java/weixin/popular/api/BizwifiAPI.java
BizwifiAPI.couponputGet
public static CouponputGetResult couponputGet(String accessToken, ShopInfo shopInfo) { """ 卡券投放-查询门店卡券投放信息 通过此接口查询某一门店的详细卡券投放信息,包括卡券投放状态,卡券ID,卡券的投放时间等信息。 @param accessToken accessToken @param shopInfo shopInfo @return CouponputGetResult """ return couponputGet(accessToken, JsonUtil.toJSONStri...
java
public static CouponputGetResult couponputGet(String accessToken, ShopInfo shopInfo) { return couponputGet(accessToken, JsonUtil.toJSONString(shopInfo)); }
[ "public", "static", "CouponputGetResult", "couponputGet", "(", "String", "accessToken", ",", "ShopInfo", "shopInfo", ")", "{", "return", "couponputGet", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "shopInfo", ")", ")", ";", "}" ]
卡券投放-查询门店卡券投放信息 通过此接口查询某一门店的详细卡券投放信息,包括卡券投放状态,卡券ID,卡券的投放时间等信息。 @param accessToken accessToken @param shopInfo shopInfo @return CouponputGetResult
[ "卡券投放", "-", "查询门店卡券投放信息", "通过此接口查询某一门店的详细卡券投放信息,包括卡券投放状态,卡券ID,卡券的投放时间等信息。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L575-L577
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/SimpleTimeZone.java
SimpleTimeZone.setStartRule
public void setStartRule(int month, int dayOfMonth, int time) { """ Sets the DST start rule to a fixed date within a month. @param month The month in which this rule occurs (0-based). @param dayOfMonth The date in that month (1-based). @param time The time of that day (number of millis aft...
java
public void setStartRule(int month, int dayOfMonth, int time) { if (isFrozen()) { throw new UnsupportedOperationException("Attempt to modify a frozen SimpleTimeZone instance."); } getSTZInfo().setStart(month, -1, -1, time, dayOfMonth, false); setStartRule(month, dayOfMonth, ...
[ "public", "void", "setStartRule", "(", "int", "month", ",", "int", "dayOfMonth", ",", "int", "time", ")", "{", "if", "(", "isFrozen", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Attempt to modify a frozen SimpleTimeZone instance.\"",...
Sets the DST start rule to a fixed date within a month. @param month The month in which this rule occurs (0-based). @param dayOfMonth The date in that month (1-based). @param time The time of that day (number of millis after midnight) when DST takes effect in local wall time, which is standard time...
[ "Sets", "the", "DST", "start", "rule", "to", "a", "fixed", "date", "within", "a", "month", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/SimpleTimeZone.java#L378-L385
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/XLSReader.java
XLSReader.readExcel
public static void readExcel(File file, int limit, ExcelHandler callback) throws ReadExcelException { """ 用于读取limit行之后处理读取的数据(通过回调函数处理) @param file Excel文件 @param limit 指定最多读取多少数据行,&lt;= 0表示不限制,若指定了limit则在达到限制后会移除旧元素再放入新的元素 @param callback 指定{@link #datas}达到{@link #limit}限制时执行的回调函数, 若为null...
java
public static void readExcel(File file, int limit, ExcelHandler callback) throws ReadExcelException { XLSReader.readExcel(file, null, limit, callback); }
[ "public", "static", "void", "readExcel", "(", "File", "file", ",", "int", "limit", ",", "ExcelHandler", "callback", ")", "throws", "ReadExcelException", "{", "XLSReader", ".", "readExcel", "(", "file", ",", "null", ",", "limit", ",", "callback", ")", ";", ...
用于读取limit行之后处理读取的数据(通过回调函数处理) @param file Excel文件 @param limit 指定最多读取多少数据行,&lt;= 0表示不限制,若指定了limit则在达到限制后会移除旧元素再放入新的元素 @param callback 指定{@link #datas}达到{@link #limit}限制时执行的回调函数, 若为null则表示不执行回调函数。 注意:在{@link #datas}未达到指定限制而文件数据已经完全读取完毕的情况下也会调用回调函数(若有回调函数), 回调函数在datas被清空之前调用(若需要回调则必须启用限制,即{@link #limit} &gt;0)。 @...
[ "用于读取limit行之后处理读取的数据", "(", "通过回调函数处理", ")" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/XLSReader.java#L589-L592
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SessionUtil.java
SessionUtil.federatedFlowStep4
private static String federatedFlowStep4( LoginInput loginInput, String ssoUrl, String oneTimeToken) throws SnowflakeSQLException { """ Given access token, query IDP URL snowflake app to get SAML response We also need to perform important client side validation: validate the post back url come ...
java
private static String federatedFlowStep4( LoginInput loginInput, String ssoUrl, String oneTimeToken) throws SnowflakeSQLException { String responseHtml = ""; try { final URL url = new URL(ssoUrl); URI oktaGetUri = new URIBuilder() .setScheme(url.getProtocol()) ...
[ "private", "static", "String", "federatedFlowStep4", "(", "LoginInput", "loginInput", ",", "String", "ssoUrl", ",", "String", "oneTimeToken", ")", "throws", "SnowflakeSQLException", "{", "String", "responseHtml", "=", "\"\"", ";", "try", "{", "final", "URL", "url"...
Given access token, query IDP URL snowflake app to get SAML response We also need to perform important client side validation: validate the post back url come back with the SAML response contains the same prefix as the Snowflake's server url, which is the intended destination url to Snowflake. Explanation: This emulate...
[ "Given", "access", "token", "query", "IDP", "URL", "snowflake", "app", "to", "get", "SAML", "response", "We", "also", "need", "to", "perform", "important", "client", "side", "validation", ":", "validate", "the", "post", "back", "url", "come", "back", "with",...
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SessionUtil.java#L1154-L1196
BlueBrain/bluima
modules/bluima_utils/src/main/java/ch/epfl/bbp/uima/annotationviewer/BlueAnnotationViewGenerator.java
BlueAnnotationViewGenerator.writeToFile
private void writeToFile(String filename, File outputDir) { """ Writes a resource file to disk. The resource file is looked up in the classpath @param filename name of the file, to be looked up in the classpath, under the same package as this class. @return outputDir directory of output file. Output file wi...
java
private void writeToFile(String filename, File outputDir) { File outFile = new File(outputDir, filename); OutputStream os; try { os = new FileOutputStream(outFile); } catch (FileNotFoundException e) { throw new UIMARuntimeException(e); } InputStream is = null; try { is = ResourceHelper.getInputStr...
[ "private", "void", "writeToFile", "(", "String", "filename", ",", "File", "outputDir", ")", "{", "File", "outFile", "=", "new", "File", "(", "outputDir", ",", "filename", ")", ";", "OutputStream", "os", ";", "try", "{", "os", "=", "new", "FileOutputStream"...
Writes a resource file to disk. The resource file is looked up in the classpath @param filename name of the file, to be looked up in the classpath, under the same package as this class. @return outputDir directory of output file. Output file will be named the same as the <code>filename</code> parameter.
[ "Writes", "a", "resource", "file", "to", "disk", ".", "The", "resource", "file", "is", "looked", "up", "in", "the", "classpath" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_utils/src/main/java/ch/epfl/bbp/uima/annotationviewer/BlueAnnotationViewGenerator.java#L134-L164
knowm/XChart
xchart/src/main/java/org/knowm/xchart/PieChart.java
PieChart.updatePieSeries
public PieSeries updatePieSeries(String seriesName, Number value) { """ Update a series by updating the pie slide value @param seriesName @param value @return """ Map<String, PieSeries> seriesMap = getSeriesMap(); PieSeries series = seriesMap.get(seriesName); if (series == null) { throw...
java
public PieSeries updatePieSeries(String seriesName, Number value) { Map<String, PieSeries> seriesMap = getSeriesMap(); PieSeries series = seriesMap.get(seriesName); if (series == null) { throw new IllegalArgumentException("Series name >" + seriesName + "< not found!!!"); } series.replaceData(...
[ "public", "PieSeries", "updatePieSeries", "(", "String", "seriesName", ",", "Number", "value", ")", "{", "Map", "<", "String", ",", "PieSeries", ">", "seriesMap", "=", "getSeriesMap", "(", ")", ";", "PieSeries", "series", "=", "seriesMap", ".", "get", "(", ...
Update a series by updating the pie slide value @param seriesName @param value @return
[ "Update", "a", "series", "by", "updating", "the", "pie", "slide", "value" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/PieChart.java#L96-L106
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java
HexUtil.appendHexString
static public void appendHexString(StringBuilder buffer, byte value) { """ Appends 2 characters to a StringBuilder with the byte in a "Big Endian" hexidecimal format. For example, a byte 0x34 will be appended as a String in format "34". A byte of value 0 will be appended as "00". @param buffer The StringBuilde...
java
static public void appendHexString(StringBuilder buffer, byte value) { assertNotNull(buffer); int nibble = (value & 0xF0) >>> 4; buffer.append(HEX_TABLE[nibble]); nibble = (value & 0x0F); buffer.append(HEX_TABLE[nibble]); }
[ "static", "public", "void", "appendHexString", "(", "StringBuilder", "buffer", ",", "byte", "value", ")", "{", "assertNotNull", "(", "buffer", ")", ";", "int", "nibble", "=", "(", "value", "&", "0xF0", ")", ">>>", "4", ";", "buffer", ".", "append", "(", ...
Appends 2 characters to a StringBuilder with the byte in a "Big Endian" hexidecimal format. For example, a byte 0x34 will be appended as a String in format "34". A byte of value 0 will be appended as "00". @param buffer The StringBuilder the byte value in hexidecimal format will be appended to. If the buffer is null,...
[ "Appends", "2", "characters", "to", "a", "StringBuilder", "with", "the", "byte", "in", "a", "Big", "Endian", "hexidecimal", "format", ".", "For", "example", "a", "byte", "0x34", "will", "be", "appended", "as", "a", "String", "in", "format", "34", ".", "A...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java#L144-L150
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsLogin.java
CmsLogin.appendId
protected void appendId(StringBuffer html, String id) { """ Appends the HTML form name/id code for the given id to the given html.<p> @param html the html where to append the id to @param id the id to append """ html.append(" name=\""); html.append(id); html.append("\" id=\""); ...
java
protected void appendId(StringBuffer html, String id) { html.append(" name=\""); html.append(id); html.append("\" id=\""); html.append(id); html.append("\" "); }
[ "protected", "void", "appendId", "(", "StringBuffer", "html", ",", "String", "id", ")", "{", "html", ".", "append", "(", "\" name=\\\"\"", ")", ";", "html", ".", "append", "(", "id", ")", ";", "html", ".", "append", "(", "\"\\\" id=\\\"\"", ")", ";", "...
Appends the HTML form name/id code for the given id to the given html.<p> @param html the html where to append the id to @param id the id to append
[ "Appends", "the", "HTML", "form", "name", "/", "id", "code", "for", "the", "given", "id", "to", "the", "given", "html", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsLogin.java#L1094-L1101
openbase/jul
pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java
StateRunner.getState
private State getState(final Class<? extends State> stateClass) throws NotAvailableException { """ Method loads the state referred by the state class. Once the state is loaded it will be cached and next time the state is requested the cached instance will be returned out of performance reasons. @param stateC...
java
private State getState(final Class<? extends State> stateClass) throws NotAvailableException { if (!stateMap.containsKey(stateClass)) { try { final State state; try { state = stateClass.getConstructor().newInstance(); } catch (Illeg...
[ "private", "State", "getState", "(", "final", "Class", "<", "?", "extends", "State", ">", "stateClass", ")", "throws", "NotAvailableException", "{", "if", "(", "!", "stateMap", ".", "containsKey", "(", "stateClass", ")", ")", "{", "try", "{", "final", "Sta...
Method loads the state referred by the state class. Once the state is loaded it will be cached and next time the state is requested the cached instance will be returned out of performance reasons. @param stateClass the class defining the state to load. @return an new or cached instance of the state.. @throws NotAvail...
[ "Method", "loads", "the", "state", "referred", "by", "the", "state", "class", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java#L153-L169
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java
ESResponseWrapper.validateBucket
private boolean validateBucket(String left, String right, String operator) { """ Validate bucket. @param left the left @param right the right @param operator the operator @return true, if successful """ Double leftValue = Double.valueOf(left); Double rightValue = Double.valueOf(right);...
java
private boolean validateBucket(String left, String right, String operator) { Double leftValue = Double.valueOf(left); Double rightValue = Double.valueOf(right); logger.debug("Comparison expression " + operator + "found with left value: " + left + " right value: " + right); if (Expr...
[ "private", "boolean", "validateBucket", "(", "String", "left", ",", "String", "right", ",", "String", "operator", ")", "{", "Double", "leftValue", "=", "Double", ".", "valueOf", "(", "left", ")", ";", "Double", "rightValue", "=", "Double", ".", "valueOf", ...
Validate bucket. @param left the left @param right the right @param operator the operator @return true, if successful
[ "Validate", "bucket", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L475-L507
OpenLiberty/open-liberty
dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/internal/monitor/DropinMonitor.java
DropinMonitor.startApplication
private void startApplication(File currentFile, String type) { """ Takes a file and an optional file type, and updates the file. If no type is given it will use the extension of the file given. @param ca the configuration admin service. @param currentFile the file of the application to install. Can be a direc...
java
private void startApplication(File currentFile, String type) { if (_tc.isEventEnabled()) { Tr.event(_tc, "Starting dropin application '" + currentFile.getName() + "'"); } String filePath = getAppLocation(currentFile); try { Configuration config = _configs.get(fil...
[ "private", "void", "startApplication", "(", "File", "currentFile", ",", "String", "type", ")", "{", "if", "(", "_tc", ".", "isEventEnabled", "(", ")", ")", "{", "Tr", ".", "event", "(", "_tc", ",", "\"Starting dropin application '\"", "+", "currentFile", "."...
Takes a file and an optional file type, and updates the file. If no type is given it will use the extension of the file given. @param ca the configuration admin service. @param currentFile the file of the application to install. Can be a directory @param type the type of the application.
[ "Takes", "a", "file", "and", "an", "optional", "file", "type", "and", "updates", "the", "file", ".", "If", "no", "type", "is", "given", "it", "will", "use", "the", "extension", "of", "the", "file", "given", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/internal/monitor/DropinMonitor.java#L392-L423
glyptodon/guacamole-client
extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java
UserVerificationService.verifyAuthenticatedUser
public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser) throws GuacamoleException { """ Verifies the identity of the given user via the Duo multi-factor authentication service. If a signed response from Duo has not already been provided, a signed response from Duo is requested in the...
java
public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser) throws GuacamoleException { // Pull the original HTTP request used to authenticate Credentials credentials = authenticatedUser.getCredentials(); HttpServletRequest request = credentials.getRequest(); /...
[ "public", "void", "verifyAuthenticatedUser", "(", "AuthenticatedUser", "authenticatedUser", ")", "throws", "GuacamoleException", "{", "// Pull the original HTTP request used to authenticate", "Credentials", "credentials", "=", "authenticatedUser", ".", "getCredentials", "(", ")",...
Verifies the identity of the given user via the Duo multi-factor authentication service. If a signed response from Duo has not already been provided, a signed response from Duo is requested in the form of additional expected credentials. Any provided signed response is cryptographically verified. If no signed response ...
[ "Verifies", "the", "identity", "of", "the", "given", "user", "via", "the", "Duo", "multi", "-", "factor", "authentication", "service", ".", "If", "a", "signed", "response", "from", "Duo", "has", "not", "already", "been", "provided", "a", "signed", "response"...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java#L68-L107
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.clearRequestSettings
public void clearRequestSettings(int pathId, String clientUUID) throws Exception { """ Clear all overrides, reset repeat counts for a request path @param pathId ID of path @param clientUUID UUID of client @throws Exception exception """ this.setRequestEnabled(pathId, false, clientUUID); Ov...
java
public void clearRequestSettings(int pathId, String clientUUID) throws Exception { this.setRequestEnabled(pathId, false, clientUUID); OverrideService.getInstance().disableAllOverrides(pathId, clientUUID, Constants.OVERRIDE_TYPE_REQUEST); EditService.getInstance().updateRepeatNumber(Constants.OVE...
[ "public", "void", "clearRequestSettings", "(", "int", "pathId", ",", "String", "clientUUID", ")", "throws", "Exception", "{", "this", ".", "setRequestEnabled", "(", "pathId", ",", "false", ",", "clientUUID", ")", ";", "OverrideService", ".", "getInstance", "(", ...
Clear all overrides, reset repeat counts for a request path @param pathId ID of path @param clientUUID UUID of client @throws Exception exception
[ "Clear", "all", "overrides", "reset", "repeat", "counts", "for", "a", "request", "path" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L1508-L1512