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
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.localSeo_visibilityCheck_POST
public OvhVisibilityCheckResponse localSeo_visibilityCheck_POST(OvhCountryEnum country, String name, String street, String zip) throws IOException { """ Check visibility of a location REST: POST /hosting/web/localSeo/visibilityCheck @param name [required] Name of the location @param country [required] Country...
java
public OvhVisibilityCheckResponse localSeo_visibilityCheck_POST(OvhCountryEnum country, String name, String street, String zip) throws IOException { String qPath = "/hosting/web/localSeo/visibilityCheck"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "count...
[ "public", "OvhVisibilityCheckResponse", "localSeo_visibilityCheck_POST", "(", "OvhCountryEnum", "country", ",", "String", "name", ",", "String", "street", ",", "String", "zip", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/localSeo/visibilityC...
Check visibility of a location REST: POST /hosting/web/localSeo/visibilityCheck @param name [required] Name of the location @param country [required] Country of the location @param street [required] Address line 1 of the location @param zip [required] Zipcode of the location
[ "Check", "visibility", "of", "a", "location" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L2211-L2221
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java
MultiChangeBuilder.deleteText
public MultiChangeBuilder<PS, SEG, S> deleteText(int start, int end) { """ Removes a range of text. It must hold {@code 0 <= start <= end <= getLength()}. @param start Start position of the range to remove @param end End position of the range to remove """ return replaceText(start, end, ""); ...
java
public MultiChangeBuilder<PS, SEG, S> deleteText(int start, int end) { return replaceText(start, end, ""); }
[ "public", "MultiChangeBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "deleteText", "(", "int", "start", ",", "int", "end", ")", "{", "return", "replaceText", "(", "start", ",", "end", ",", "\"\"", ")", ";", "}" ]
Removes a range of text. It must hold {@code 0 <= start <= end <= getLength()}. @param start Start position of the range to remove @param end End position of the range to remove
[ "Removes", "a", "range", "of", "text", "." ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java#L262-L264
mapbox/mapbox-java
services-directions/src/main/java/com/mapbox/api/directions/v5/MapboxDirections.java
MapboxDirections.enqueueCall
@Override public void enqueueCall(final Callback<DirectionsResponse> callback) { """ Wrapper method for Retrofits {@link Call#enqueue(Callback)} call returning a response specific to the Directions API. Use this method to make a directions request on the Main Thread. @param callback a {@link Callback} which ...
java
@Override public void enqueueCall(final Callback<DirectionsResponse> callback) { getCall().enqueue(new Callback<DirectionsResponse>() { @Override public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) { DirectionsResponseFactory factory = new DirectionsRes...
[ "@", "Override", "public", "void", "enqueueCall", "(", "final", "Callback", "<", "DirectionsResponse", ">", "callback", ")", "{", "getCall", "(", ")", ".", "enqueue", "(", "new", "Callback", "<", "DirectionsResponse", ">", "(", ")", "{", "@", "Override", "...
Wrapper method for Retrofits {@link Call#enqueue(Callback)} call returning a response specific to the Directions API. Use this method to make a directions request on the Main Thread. @param callback a {@link Callback} which is used once the {@link DirectionsResponse} is created. @since 1.0.0
[ "Wrapper", "method", "for", "Retrofits", "{", "@link", "Call#enqueue", "(", "Callback", ")", "}", "call", "returning", "a", "response", "specific", "to", "the", "Directions", "API", ".", "Use", "this", "method", "to", "make", "a", "directions", "request", "o...
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-directions/src/main/java/com/mapbox/api/directions/v5/MapboxDirections.java#L170-L185
Stratio/deep-spark
deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java
CassandraCell.create
public static Cell create(String cellName, Object cellValue) { """ Factory method, builds a new CassandraCell (isPartitionKey = false and isClusterKey = false). The validator will be automatically calculated using the value object type. @param cellName the cell name @param cellValue the cell value, provided ...
java
public static Cell create(String cellName, Object cellValue) { return create(cellName, cellValue, Boolean.FALSE, Boolean.FALSE); }
[ "public", "static", "Cell", "create", "(", "String", "cellName", ",", "Object", "cellValue", ")", "{", "return", "create", "(", "cellName", ",", "cellValue", ",", "Boolean", ".", "FALSE", ",", "Boolean", ".", "FALSE", ")", ";", "}" ]
Factory method, builds a new CassandraCell (isPartitionKey = false and isClusterKey = false). The validator will be automatically calculated using the value object type. @param cellName the cell name @param cellValue the cell value, provided as a ByteBuffer. @return an instance of a Cell object for the provided param...
[ "Factory", "method", "builds", "a", "new", "CassandraCell", "(", "isPartitionKey", "=", "false", "and", "isClusterKey", "=", "false", ")", ".", "The", "validator", "will", "be", "automatically", "calculated", "using", "the", "value", "object", "type", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java#L72-L74
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/DisksInner.java
DisksInner.revokeAccessAsync
public Observable<OperationStatusResponseInner> revokeAccessAsync(String resourceGroupName, String diskName) { """ Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is c...
java
public Observable<OperationStatusResponseInner> revokeAccessAsync(String resourceGroupName, String diskName) { return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "revokeAccessAsync", "(", "String", "resourceGroupName", ",", "String", "diskName", ")", "{", "return", "revokeAccessWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ")", ".", "map", ...
Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @throws Illega...
[ "Revokes", "access", "to", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/DisksInner.java#L1149-L1156
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/SettingsInMemory.java
SettingsInMemory.getText
public String getText(String key, String aDefault) { """ Retrieves a Settings property as a String object. <p/>Loads the file if not already initialized. @param key the Key name of the property to be returned. @param aDefault the default value @return Value of the property as a string or null if no property ...
java
public String getText(String key, String aDefault) { String retval = null; retval = getText(key); if (retval == null || retval.length() == 0) { retval = aDefault; } if (retval.startsWith(CRYPTION_PREFIX)) { try { retval = re...
[ "public", "String", "getText", "(", "String", "key", ",", "String", "aDefault", ")", "{", "String", "retval", "=", "null", ";", "retval", "=", "getText", "(", "key", ")", ";", "if", "(", "retval", "==", "null", "||", "retval", ".", "length", "(", ")"...
Retrieves a Settings property as a String object. <p/>Loads the file if not already initialized. @param key the Key name of the property to be returned. @param aDefault the default value @return Value of the property as a string or null if no property found.
[ "Retrieves", "a", "Settings", "property", "as", "a", "String", "object", ".", "<p", "/", ">", "Loads", "the", "file", "if", "not", "already", "initialized", "." ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/SettingsInMemory.java#L139-L161
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/IntStream.java
IntStream.rangeClosed
@NotNull public static IntStream rangeClosed(final int startInclusive, final int endInclusive) { """ Returns a sequential ordered {@code IntStream} from {@code startInclusive} (inclusive) to {@code endInclusive} (inclusive) by an incremental step of {@code 1}. @param startInclusive the (inclusive) initial...
java
@NotNull public static IntStream rangeClosed(final int startInclusive, final int endInclusive) { if (startInclusive > endInclusive) { return empty(); } else if (startInclusive == endInclusive) { return of(startInclusive); } else { return new IntStream(new ...
[ "@", "NotNull", "public", "static", "IntStream", "rangeClosed", "(", "final", "int", "startInclusive", ",", "final", "int", "endInclusive", ")", "{", "if", "(", "startInclusive", ">", "endInclusive", ")", "{", "return", "empty", "(", ")", ";", "}", "else", ...
Returns a sequential ordered {@code IntStream} from {@code startInclusive} (inclusive) to {@code endInclusive} (inclusive) by an incremental step of {@code 1}. @param startInclusive the (inclusive) initial value @param endInclusive the inclusive upper bound @return a sequential {@code IntStream} for the range of {@cod...
[ "Returns", "a", "sequential", "ordered", "{", "@code", "IntStream", "}", "from", "{", "@code", "startInclusive", "}", "(", "inclusive", ")", "to", "{", "@code", "endInclusive", "}", "(", "inclusive", ")", "by", "an", "incremental", "step", "of", "{", "@cod...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/IntStream.java#L132-L141
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/CGroupMemoryWatcher.java
CGroupMemoryWatcher.killTask
private void killTask(TaskAttemptID tid, String msg, boolean wasFailure) { """ Kill the task and clean up CGroupProcessTreeInfo @param tid task attempt ID of the task to be killed. @param msg diagonostic message @param wasFailure if true, fail the task """ // Kill the task and mark it as killed. tas...
java
private void killTask(TaskAttemptID tid, String msg, boolean wasFailure) { // Kill the task and mark it as killed. taskTracker.cleanUpOverMemoryTask(tid, wasFailure, msg); // Now destroy the ProcessTree, remove it from monitoring map. CGroupProcessTreeInfo ptInfo = processTreeInfoMap.get(tid); try {...
[ "private", "void", "killTask", "(", "TaskAttemptID", "tid", ",", "String", "msg", ",", "boolean", "wasFailure", ")", "{", "// Kill the task and mark it as killed.", "taskTracker", ".", "cleanUpOverMemoryTask", "(", "tid", ",", "wasFailure", ",", "msg", ")", ";", "...
Kill the task and clean up CGroupProcessTreeInfo @param tid task attempt ID of the task to be killed. @param msg diagonostic message @param wasFailure if true, fail the task
[ "Kill", "the", "task", "and", "clean", "up", "CGroupProcessTreeInfo" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/CGroupMemoryWatcher.java#L788-L800
alkacon/opencms-core
src-gwt/org/opencms/ugc/client/CmsJsUtils.java
CmsJsUtils.convertMapToJsObject
public static JavaScriptObject convertMapToJsObject(Map<String, String> stringMap) { """ Converts a map whose keys and values are strings to a Javascript object with the keys as attributes and the corresponding values as the attribute values.<p> @param stringMap the map to convert @return the Javascript objec...
java
public static JavaScriptObject convertMapToJsObject(Map<String, String> stringMap) { if (stringMap == null) { return null; } JSONObject json = new JSONObject(); for (Map.Entry<String, String> entry : stringMap.entrySet()) { String key = entry.getKey(); ...
[ "public", "static", "JavaScriptObject", "convertMapToJsObject", "(", "Map", "<", "String", ",", "String", ">", "stringMap", ")", "{", "if", "(", "stringMap", "==", "null", ")", "{", "return", "null", ";", "}", "JSONObject", "json", "=", "new", "JSONObject", ...
Converts a map whose keys and values are strings to a Javascript object with the keys as attributes and the corresponding values as the attribute values.<p> @param stringMap the map to convert @return the Javascript object with the attributes defined by the map
[ "Converts", "a", "map", "whose", "keys", "and", "values", "are", "strings", "to", "a", "Javascript", "object", "with", "the", "keys", "as", "attributes", "and", "the", "corresponding", "values", "as", "the", "attribute", "values", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ugc/client/CmsJsUtils.java#L74-L86
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_tts_id_GET
public OvhOvhPabxTts billingAccount_ovhPabx_serviceName_tts_id_GET(String billingAccount, String serviceName, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id} @param billingAccount [required] The name of your billingAccount @para...
java
public OvhOvhPabxTts billingAccount_ovhPabx_serviceName_tts_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); String resp = exec(qPath, "GET",...
[ "public", "OvhOvhPabxTts", "billingAccount_ovhPabx_serviceName_tts_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}...
Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7621-L7626
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.data_afnicCorporationTrademarkInformation_POST
public OvhAfnicCorporationTrademarkContact data_afnicCorporationTrademarkInformation_POST(Long contactId, String inpiNumber, String inpiTrademarkOwner) throws IOException { """ Post a new corporation trademark information according to Afnic REST: POST /domain/data/afnicCorporationTrademarkInformation @param in...
java
public OvhAfnicCorporationTrademarkContact data_afnicCorporationTrademarkInformation_POST(Long contactId, String inpiNumber, String inpiTrademarkOwner) throws IOException { String qPath = "/domain/data/afnicCorporationTrademarkInformation"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<St...
[ "public", "OvhAfnicCorporationTrademarkContact", "data_afnicCorporationTrademarkInformation_POST", "(", "Long", "contactId", ",", "String", "inpiNumber", ",", "String", "inpiTrademarkOwner", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/data/afnicCorpora...
Post a new corporation trademark information according to Afnic REST: POST /domain/data/afnicCorporationTrademarkInformation @param inpiNumber [required] Number of the Inpi declaration @param inpiTrademarkOwner [required] Owner of the trademark @param contactId [required] Contact ID related to the Inpi additional info...
[ "Post", "a", "new", "corporation", "trademark", "information", "according", "to", "Afnic" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L95-L104
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.printFailuresLog
public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput) { """ print Failures into Log files. @param validator validator validator validator instance used to run validation rules @param failures failures failures the list of Failures to be printed @param fhIn...
java
public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput) { String errorText = ""; FailureHelper fh = null; if (fhInput.length == 0) fh = new FailureHelper(failures); else fh = fhInput[0]; if (failures != null && failu...
[ "public", "String", "printFailuresLog", "(", "Validator", "validator", ",", "Collection", "<", "Failure", ">", "failures", ",", "FailureHelper", "...", "fhInput", ")", "{", "String", "errorText", "=", "\"\"", ";", "FailureHelper", "fh", "=", "null", ";", "if",...
print Failures into Log files. @param validator validator validator validator instance used to run validation rules @param failures failures failures the list of Failures to be printed @param fhInput fhInput fhInput optional parameter. Normally used only for test or in case of FailureHelper already present in context ...
[ "print", "Failures", "into", "Log", "files", "." ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1536-L1550
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.purgeDeletedKeyAsync
public ServiceFuture<Void> purgeDeletedKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<Void> serviceCallback) { """ Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will retu...
java
public ServiceFuture<Void> purgeDeletedKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(purgeDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName), serviceCallback); }
[ "public", "ServiceFuture", "<", "Void", ">", "purgeDeletedKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "final", "ServiceCallback", "<", "Void", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", "fromResponse", "(", "purg...
Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission. @param vaultBaseUrl The vault n...
[ "Permanently", "deletes", "the", "specified", "key", ".", "The", "Purge", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", "vault", "i...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3159-L3161
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.deleteTag
public void deleteTag(Serializable projectId, String tagName) throws IOException { """ Delete tag in specific project @param projectId @param tagName @throws IOException on gitlab api call error """ String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabTag.URL + "/" + tag...
java
public void deleteTag(Serializable projectId, String tagName) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabTag.URL + "/" + tagName; retrieve().method(DELETE).to(tailUrl, Void.class); }
[ "public", "void", "deleteTag", "(", "Serializable", "projectId", ",", "String", "tagName", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "sanitizeProjectId", "(", "projectId", ")", "+", "GitlabTag", ...
Delete tag in specific project @param projectId @param tagName @throws IOException on gitlab api call error
[ "Delete", "tag", "in", "specific", "project" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3427-L3430
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationsInner.java
ExpressRouteCircuitAuthorizationsInner.createOrUpdate
public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { """ Creates or updates an authorization in the specified express route circuit. @param resourceGroupName The name o...
java
public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParam...
[ "public", "ExpressRouteCircuitAuthorizationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "circuitName", ",", "String", "authorizationName", ",", "ExpressRouteCircuitAuthorizationInner", "authorizationParameters", ")", "{", "return", "createOrUpdateW...
Creates or updates an authorization in the specified express route circuit. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @param authorizationName The name of the authorization. @param authorizationParameters Parameters supplied to the create or upda...
[ "Creates", "or", "updates", "an", "authorization", "in", "the", "specified", "express", "route", "circuit", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationsInner.java#L362-L364
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/SansOrm.java
SansOrm.initializeTxCustom
public static DataSource initializeTxCustom(DataSource dataSource, TransactionManager txManager, UserTransaction userTx) { """ Use this one if you have custom/provided {@link TransactionManager}, e.g. to run within web app container. @param dataSource the {@link DataSource} to use by the default @param txManag...
java
public static DataSource initializeTxCustom(DataSource dataSource, TransactionManager txManager, UserTransaction userTx) { TransactionElf.setTransactionManager(txManager); TransactionElf.setUserTransaction(userTx); return initializeTxNone(dataSource); }
[ "public", "static", "DataSource", "initializeTxCustom", "(", "DataSource", "dataSource", ",", "TransactionManager", "txManager", ",", "UserTransaction", "userTx", ")", "{", "TransactionElf", ".", "setTransactionManager", "(", "txManager", ")", ";", "TransactionElf", "."...
Use this one if you have custom/provided {@link TransactionManager}, e.g. to run within web app container. @param dataSource the {@link DataSource} to use by the default @param txManager the {@link TransactionManager} to use for tx management @param userTx the {@link UserTransaction} to use for tx management together ...
[ "Use", "this", "one", "if", "you", "have", "custom", "/", "provided", "{", "@link", "TransactionManager", "}", "e", ".", "g", ".", "to", "run", "within", "web", "app", "container", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/SansOrm.java#L45-L49
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.addStringArrayList
public Groundy addStringArrayList(String key, ArrayList<String> value) { """ Inserts an ArrayList<String> value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or null ...
java
public Groundy addStringArrayList(String key, ArrayList<String> value) { mArgs.putStringArrayList(key, value); return this; }
[ "public", "Groundy", "addStringArrayList", "(", "String", "key", ",", "ArrayList", "<", "String", ">", "value", ")", "{", "mArgs", ".", "putStringArrayList", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts an ArrayList<String> value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or null
[ "Inserts", "an", "ArrayList<String", ">", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L572-L575
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_billingAccount_securityDeposit_POST
public OvhOrder telephony_billingAccount_securityDeposit_POST(String billingAccount, OvhSecurityDepositAmountsEnum amount) throws IOException { """ Create order REST: POST /order/telephony/{billingAccount}/securityDeposit @param amount [required] The amount, in euros, to credit to the current security deposit ...
java
public OvhOrder telephony_billingAccount_securityDeposit_POST(String billingAccount, OvhSecurityDepositAmountsEnum amount) throws IOException { String qPath = "/order/telephony/{billingAccount}/securityDeposit"; StringBuilder sb = path(qPath, billingAccount); HashMap<String, Object>o = new HashMap<String, Object>...
[ "public", "OvhOrder", "telephony_billingAccount_securityDeposit_POST", "(", "String", "billingAccount", ",", "OvhSecurityDepositAmountsEnum", "amount", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/telephony/{billingAccount}/securityDeposit\"", ";", "String...
Create order REST: POST /order/telephony/{billingAccount}/securityDeposit @param amount [required] The amount, in euros, to credit to the current security deposit @param billingAccount [required] The name of your billingAccount
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6411-L6418
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java
ExpressRouteCrossConnectionsInner.updateTags
public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName, Map<String, String> tags) { """ Updates an express route cross connection tags. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the cross connection. @param ...
java
public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().last().body(); }
[ "public", "ExpressRouteCrossConnectionInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName",...
Updates an express route cross connection tags. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the cross connection. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is reje...
[ "Updates", "an", "express", "route", "cross", "connection", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java#L680-L682
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.updatePostAuthor
public boolean updatePostAuthor(final long postId, final long authorId) throws SQLException { """ Updates the author of a post. @param postId The post id. @param authorId The new author id. @return Was the author changed? @throws SQLException on database error. """ Connection conn = null; Prep...
java
public boolean updatePostAuthor(final long postId, final long authorId) throws SQLException { Connection conn = null; PreparedStatement stmt = null; try { conn = connectionSupplier.getConnection(); stmt = conn.prepareStatement(updatePostAuthorSQL); stmt.setLong(1, authorId)...
[ "public", "boolean", "updatePostAuthor", "(", "final", "long", "postId", ",", "final", "long", "authorId", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "try", "{", "conn", "=", "co...
Updates the author of a post. @param postId The post id. @param authorId The new author id. @return Was the author changed? @throws SQLException on database error.
[ "Updates", "the", "author", "of", "a", "post", "." ]
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L1648-L1661
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java
CertificatesImpl.cancelDeletion
public void cancelDeletion(String thumbprintAlgorithm, String thumbprint, CertificateCancelDeletionOptions certificateCancelDeletionOptions) { """ Cancels a failed deletion of a certificate from the specified account. If you try to delete a certificate that is being used by a pool or compute node, the status of t...
java
public void cancelDeletion(String thumbprintAlgorithm, String thumbprint, CertificateCancelDeletionOptions certificateCancelDeletionOptions) { cancelDeletionWithServiceResponseAsync(thumbprintAlgorithm, thumbprint, certificateCancelDeletionOptions).toBlocking().single().body(); }
[ "public", "void", "cancelDeletion", "(", "String", "thumbprintAlgorithm", ",", "String", "thumbprint", ",", "CertificateCancelDeletionOptions", "certificateCancelDeletionOptions", ")", "{", "cancelDeletionWithServiceResponseAsync", "(", "thumbprintAlgorithm", ",", "thumbprint", ...
Cancels a failed deletion of a certificate from the specified account. If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this operation to set the status of th...
[ "Cancels", "a", "failed", "deletion", "of", "a", "certificate", "from", "the", "specified", "account", ".", "If", "you", "try", "to", "delete", "a", "certificate", "that", "is", "being", "used", "by", "a", "pool", "or", "compute", "node", "the", "status", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java#L675-L677
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyFiles
public static void copyFiles(File[] files, String storageFolder) throws IOException { """ 批量复制文件,使用原文件名 @param files 文件数组 @param storageFolder 存储目录 @throws IOException 异常 """ storageFolder = checkFolder(storageFolder) + ValueConsts.SEPARATOR; for (File file : files) { copyFil...
java
public static void copyFiles(File[] files, String storageFolder) throws IOException { storageFolder = checkFolder(storageFolder) + ValueConsts.SEPARATOR; for (File file : files) { copyFile(file, new File(storageFolder + file.getName())); } }
[ "public", "static", "void", "copyFiles", "(", "File", "[", "]", "files", ",", "String", "storageFolder", ")", "throws", "IOException", "{", "storageFolder", "=", "checkFolder", "(", "storageFolder", ")", "+", "ValueConsts", ".", "SEPARATOR", ";", "for", "(", ...
批量复制文件,使用原文件名 @param files 文件数组 @param storageFolder 存储目录 @throws IOException 异常
[ "批量复制文件,使用原文件名" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L498-L503
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.printToFile
public static void printToFile(String filename, String message, boolean append) { """ Prints to a file. If the file already exists, appends if <code>append=true</code>, and overwrites if <code>append=false</code> """ printToFile(new File(filename), message, append); }
java
public static void printToFile(String filename, String message, boolean append) { printToFile(new File(filename), message, append); }
[ "public", "static", "void", "printToFile", "(", "String", "filename", ",", "String", "message", ",", "boolean", "append", ")", "{", "printToFile", "(", "new", "File", "(", "filename", ")", ",", "message", ",", "append", ")", ";", "}" ]
Prints to a file. If the file already exists, appends if <code>append=true</code>, and overwrites if <code>append=false</code>
[ "Prints", "to", "a", "file", ".", "If", "the", "file", "already", "exists", "appends", "if", "<code", ">", "append", "=", "true<", "/", "code", ">", "and", "overwrites", "if", "<code", ">", "append", "=", "false<", "/", "code", ">" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L960-L962
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.isEpsilonEqual
@Pure public static boolean isEpsilonEqual(double v1, double v2, double epsilon) { """ Replies if the given values are near. @param v1 first value. @param v2 second value. @param epsilon the approximation epsilon. If {@link Double#NaN}, the function {@link Math#ulp(double)} is used for evaluating the epsilo...
java
@Pure public static boolean isEpsilonEqual(double v1, double v2, double epsilon) { if (Double.isInfinite(v1)) { return Double.isInfinite(v2) && Math.signum(v1) == Math.signum(v2); } else if (Double.isNaN(v1)) { return false; } final double value = Math.abs(v1 - v2); final double eps = Double.isNaN(epsi...
[ "@", "Pure", "public", "static", "boolean", "isEpsilonEqual", "(", "double", "v1", ",", "double", "v2", ",", "double", "epsilon", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "v1", ")", ")", "{", "return", "Double", ".", "isInfinite", "(", "v...
Replies if the given values are near. @param v1 first value. @param v2 second value. @param epsilon the approximation epsilon. If {@link Double#NaN}, the function {@link Math#ulp(double)} is used for evaluating the epsilon. @return <code>true</code> if the given {@code v1} is near {@code v2}, otherwise <code>false</co...
[ "Replies", "if", "the", "given", "values", "are", "near", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L166-L176
keenlabs/KeenClient-Java
core/src/main/java/io/keen/client/java/KeenClient.java
KeenClient.publishAll
private String publishAll(KeenProject project, Map<String, List<Map<String, Object>>> events) throws IOException { """ Publishes a batch of events to the Keen service. @param project The project in which to publish the event. @param events A map from collection name to a list of ...
java
private String publishAll(KeenProject project, Map<String, List<Map<String, Object>>> events) throws IOException { // just using basic JDK HTTP library String urlString = String.format(Locale.US, "%s/%s/projects/%s/events", getBaseUrl(), KeenConstants.API_VE...
[ "private", "String", "publishAll", "(", "KeenProject", "project", ",", "Map", "<", "String", ",", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "events", ")", "throws", "IOException", "{", "// just using basic JDK HTTP library", "String", "u...
Publishes a batch of events to the Keen service. @param project The project in which to publish the event. @param events A map from collection name to a list of event maps. @return The response from the server. @throws IOException If there was an error communicating with the server.
[ "Publishes", "a", "batch", "of", "events", "to", "the", "Keen", "service", "." ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/core/src/main/java/io/keen/client/java/KeenClient.java#L1425-L1432
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Size.java
Size.satisfies
@Override public boolean satisfies(Match match, int... ind) { """ Checks if generated element size is in limits. @param match current pattern match @param ind mapped indices @return true if generated element size is in limits """ Collection<BioPAXElement> set = con.generate(match, ind); switch (type...
java
@Override public boolean satisfies(Match match, int... ind) { Collection<BioPAXElement> set = con.generate(match, ind); switch (type) { case EQUAL: return set.size() == size; case GREATER: return set.size() > size; case GREATER_OR_EQUAL: return set.size() >= size; case LESS: return set.size() < s...
[ "@", "Override", "public", "boolean", "satisfies", "(", "Match", "match", ",", "int", "...", "ind", ")", "{", "Collection", "<", "BioPAXElement", ">", "set", "=", "con", ".", "generate", "(", "match", ",", "ind", ")", ";", "switch", "(", "type", ")", ...
Checks if generated element size is in limits. @param match current pattern match @param ind mapped indices @return true if generated element size is in limits
[ "Checks", "if", "generated", "element", "size", "is", "in", "limits", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Size.java#L63-L78
trellis-ldp/trellis
components/file/src/main/java/org/trellisldp/file/FileUtils.java
FileUtils.getNquadsFile
public static File getNquadsFile(final File dir, final Instant time) { """ Get the nquads file for a given moment in time. @param dir the directory @param time the time @return the file """ return new File(dir, Long.toString(time.getEpochSecond()) + ".nq"); }
java
public static File getNquadsFile(final File dir, final Instant time) { return new File(dir, Long.toString(time.getEpochSecond()) + ".nq"); }
[ "public", "static", "File", "getNquadsFile", "(", "final", "File", "dir", ",", "final", "Instant", "time", ")", "{", "return", "new", "File", "(", "dir", ",", "Long", ".", "toString", "(", "time", ".", "getEpochSecond", "(", ")", ")", "+", "\".nq\"", "...
Get the nquads file for a given moment in time. @param dir the directory @param time the time @return the file
[ "Get", "the", "nquads", "file", "for", "a", "given", "moment", "in", "time", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/file/src/main/java/org/trellisldp/file/FileUtils.java#L200-L202
duracloud/duracloud
storageprovider/src/main/java/org/duracloud/storage/xml/StorageAccountsDocumentBinding.java
StorageAccountsDocumentBinding.createStorageAccountsFromXml
public List<StorageAccount> createStorageAccountsFromXml(InputStream xml) { """ Creates storage accounts listing from XML which includes only the storage accounts list (not the full DuraStore config. This is used to parse the response of the GET stores DuraStore REST call. @param xml @return """ ...
java
public List<StorageAccount> createStorageAccountsFromXml(InputStream xml) { try { SAXBuilder builder = new SAXBuilder(); Document doc = builder.build(xml); Element root = doc.getRootElement(); return createStorageAccountsFrom(root); } catch (Exception e) {...
[ "public", "List", "<", "StorageAccount", ">", "createStorageAccountsFromXml", "(", "InputStream", "xml", ")", "{", "try", "{", "SAXBuilder", "builder", "=", "new", "SAXBuilder", "(", ")", ";", "Document", "doc", "=", "builder", ".", "build", "(", "xml", ")",...
Creates storage accounts listing from XML which includes only the storage accounts list (not the full DuraStore config. This is used to parse the response of the GET stores DuraStore REST call. @param xml @return
[ "Creates", "storage", "accounts", "listing", "from", "XML", "which", "includes", "only", "the", "storage", "accounts", "list", "(", "not", "the", "full", "DuraStore", "config", ".", "This", "is", "used", "to", "parse", "the", "response", "of", "the", "GET", ...
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/storageprovider/src/main/java/org/duracloud/storage/xml/StorageAccountsDocumentBinding.java#L105-L116
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/util/exceptions/ExceptionMapper.java
ExceptionMapper.throwException
public static void throwException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement) throws SQLException { """ Helper to throw exception. @param exception exception @param connection current connection @param statement current statement @throws SQLException exception ...
java
public static void throwException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement) throws SQLException { throw getException(exception, connection, statement, false); }
[ "public", "static", "void", "throwException", "(", "SQLException", "exception", ",", "MariaDbConnection", "connection", ",", "MariaDbStatement", "statement", ")", "throws", "SQLException", "{", "throw", "getException", "(", "exception", ",", "connection", ",", "statem...
Helper to throw exception. @param exception exception @param connection current connection @param statement current statement @throws SQLException exception
[ "Helper", "to", "throw", "exception", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/util/exceptions/ExceptionMapper.java#L91-L94
VoltDB/voltdb
src/frontend/org/voltdb/modular/ModuleManager.java
ModuleManager.getService
public <T> T getService(URI bundleURI, Class<T> svcClazz) { """ Gets the service from the given bundle jar uri. Loads and starts the bundle if it isn't yet loaded @param bundleURI bundle jar URI @param svcClazz the service class exposed by the bundle jar @return a reference to an instance of the service clas...
java
public <T> T getService(URI bundleURI, Class<T> svcClazz) { return m_bundles.getService(bundleURI, svcClazz); }
[ "public", "<", "T", ">", "T", "getService", "(", "URI", "bundleURI", ",", "Class", "<", "T", ">", "svcClazz", ")", "{", "return", "m_bundles", ".", "getService", "(", "bundleURI", ",", "svcClazz", ")", ";", "}" ]
Gets the service from the given bundle jar uri. Loads and starts the bundle if it isn't yet loaded @param bundleURI bundle jar URI @param svcClazz the service class exposed by the bundle jar @return a reference to an instance of the service class
[ "Gets", "the", "service", "from", "the", "given", "bundle", "jar", "uri", ".", "Loads", "and", "starts", "the", "bundle", "if", "it", "isn", "t", "yet", "loaded" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/modular/ModuleManager.java#L187-L189
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java
OutputPropertiesFactory.fixupPropertyString
static private String fixupPropertyString(String s, boolean doClipping) { """ Fix up a string in an output properties file according to the rules of {@link #loadPropertiesFile}. @param s non-null reference to string that may need to be fixed up. @return A new string if fixup occured, otherwise the s argument....
java
static private String fixupPropertyString(String s, boolean doClipping) { int index; if (doClipping && s.startsWith(S_XSLT_PREFIX)) { s = s.substring(S_XSLT_PREFIX_LEN); } if (s.startsWith(S_XALAN_PREFIX)) { s = S_BUILTIN_EXTENS...
[ "static", "private", "String", "fixupPropertyString", "(", "String", "s", ",", "boolean", "doClipping", ")", "{", "int", "index", ";", "if", "(", "doClipping", "&&", "s", ".", "startsWith", "(", "S_XSLT_PREFIX", ")", ")", "{", "s", "=", "s", ".", "substr...
Fix up a string in an output properties file according to the rules of {@link #loadPropertiesFile}. @param s non-null reference to string that may need to be fixed up. @return A new string if fixup occured, otherwise the s argument.
[ "Fix", "up", "a", "string", "in", "an", "output", "properties", "file", "according", "to", "the", "rules", "of", "{", "@link", "#loadPropertiesFile", "}", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java#L516-L536
jenkinsci/ssh-slaves-plugin
src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
SSHLauncher.startAgent
private void startAgent(SlaveComputer computer, final TaskListener listener, String java, String workingDirectory) throws IOException { """ Starts the agent process. @param computer The computer. @param listener The listener. @param java The full path na...
java
private void startAgent(SlaveComputer computer, final TaskListener listener, String java, String workingDirectory) throws IOException { session = connection.openSession(); expandChannelBufferSize(session,listener); String cmd = "cd \"" + workingDirectory + "\" && " + ...
[ "private", "void", "startAgent", "(", "SlaveComputer", "computer", ",", "final", "TaskListener", "listener", ",", "String", "java", ",", "String", "workingDirectory", ")", "throws", "IOException", "{", "session", "=", "connection", ".", "openSession", "(", ")", ...
Starts the agent process. @param computer The computer. @param listener The listener. @param java The full path name of the java executable to use. @param workingDirectory The working directory from which to start the java process. @throws IOException If something goes wrong.
[ "Starts", "the", "agent", "process", "." ]
train
https://github.com/jenkinsci/ssh-slaves-plugin/blob/95f528730fc1e01b25983459927b7516ead3ee00/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L590-L619
junit-team/junit4
src/main/java/org/junit/Assert.java
Assert.assertEquals
public static void assertEquals(String message, Object expected, Object actual) { """ Asserts that two objects are equal. If they are not, an {@link AssertionError} is thrown with the given message. If <code>expected</code> and <code>actual</code> are <code>null</code>, they are considered equal. ...
java
public static void assertEquals(String message, Object expected, Object actual) { if (equalsRegardingNull(expected, actual)) { return; } if (expected instanceof String && actual instanceof String) { String cleanMessage = message == null ? "" : message; ...
[ "public", "static", "void", "assertEquals", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "if", "(", "equalsRegardingNull", "(", "expected", ",", "actual", ")", ")", "{", "return", ";", "}", "if", "(", "expected", ...
Asserts that two objects are equal. If they are not, an {@link AssertionError} is thrown with the given message. If <code>expected</code> and <code>actual</code> are <code>null</code>, they are considered equal. @param message the identifying message for the {@link AssertionError} (<code>null</code> okay) @param expec...
[ "Asserts", "that", "two", "objects", "are", "equal", ".", "If", "they", "are", "not", "an", "{", "@link", "AssertionError", "}", "is", "thrown", "with", "the", "given", "message", ".", "If", "<code", ">", "expected<", "/", "code", ">", "and", "<code", ...
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/Assert.java#L110-L122
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/util/EntityUtils.java
EntityUtils.isNullValue
public static boolean isNullValue(Entity entity, Attribute attribute) { """ Returns whether an entity attribute value is <tt>null</tt> or empty for attributes referencing multiple entities. """ boolean isNullValue; String attributeName = attribute.getName(); AttributeType attributeType = attribute...
java
public static boolean isNullValue(Entity entity, Attribute attribute) { boolean isNullValue; String attributeName = attribute.getName(); AttributeType attributeType = attribute.getDataType(); switch (attributeType) { case BOOL: isNullValue = entity.getBoolean(attributeName) == null; ...
[ "public", "static", "boolean", "isNullValue", "(", "Entity", "entity", ",", "Attribute", "attribute", ")", "{", "boolean", "isNullValue", ";", "String", "attributeName", "=", "attribute", ".", "getName", "(", ")", ";", "AttributeType", "attributeType", "=", "att...
Returns whether an entity attribute value is <tt>null</tt> or empty for attributes referencing multiple entities.
[ "Returns", "whether", "an", "entity", "attribute", "value", "is", "<tt", ">", "null<", "/", "tt", ">", "or", "empty", "for", "attributes", "referencing", "multiple", "entities", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/util/EntityUtils.java#L553-L602
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/startup/ConvergedServletContextImpl.java
ConvergedServletContextImpl.doPrivileged
private Object doPrivileged(final String methodName, final Class<?>[] clazz, Object[] params) { """ Use reflection to invoke the requested method. Cache the method object to speed up the process @param methodName The method to invoke. @param clazz The class where the method is. @param params The arguments pas...
java
private Object doPrivileged(final String methodName, final Class<?>[] clazz, Object[] params) { try { Method method = context.getClass().getMethod(methodName, clazz); return executeMethod(method, context, params); } catch (Exception ex) { try { handle...
[ "private", "Object", "doPrivileged", "(", "final", "String", "methodName", ",", "final", "Class", "<", "?", ">", "[", "]", "clazz", ",", "Object", "[", "]", "params", ")", "{", "try", "{", "Method", "method", "=", "context", ".", "getClass", "(", ")", ...
Use reflection to invoke the requested method. Cache the method object to speed up the process @param methodName The method to invoke. @param clazz The class where the method is. @param params The arguments passed to the called method.
[ "Use", "reflection", "to", "invoke", "the", "requested", "method", ".", "Cache", "the", "method", "object", "to", "speed", "up", "the", "process" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/startup/ConvergedServletContextImpl.java#L834-L850
box/box-java-sdk
src/main/java/com/box/sdk/BoxItem.java
BoxItem.getSharedItem
public static BoxItem.Info getSharedItem(BoxAPIConnection api, String sharedLink) { """ Gets an item that was shared with a shared link. @param api the API connection to be used by the shared item. @param sharedLink the shared link to the item. @return info about the shared item. """ ...
java
public static BoxItem.Info getSharedItem(BoxAPIConnection api, String sharedLink) { return getSharedItem(api, sharedLink, null); }
[ "public", "static", "BoxItem", ".", "Info", "getSharedItem", "(", "BoxAPIConnection", "api", ",", "String", "sharedLink", ")", "{", "return", "getSharedItem", "(", "api", ",", "sharedLink", ",", "null", ")", ";", "}" ]
Gets an item that was shared with a shared link. @param api the API connection to be used by the shared item. @param sharedLink the shared link to the item. @return info about the shared item.
[ "Gets", "an", "item", "that", "was", "shared", "with", "a", "shared", "link", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxItem.java#L60-L62
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerHybrid.java
MultiNormalizerHybrid.revertLabels
public void revertLabels(@NonNull INDArray[] labels, INDArray[] maskArrays, int output) { """ Undo (revert) the normalization applied by this DataNormalization instance to the labels of a particular output @param labels The normalized array of outputs @param maskArrays Optional mask arrays belonging to the...
java
public void revertLabels(@NonNull INDArray[] labels, INDArray[] maskArrays, int output) { NormalizerStrategy strategy = getStrategy(globalOutputStrategy, perOutputStrategies, output); if (strategy != null) { INDArray mask = (maskArrays == null ? null : maskArrays[output]); //noin...
[ "public", "void", "revertLabels", "(", "@", "NonNull", "INDArray", "[", "]", "labels", ",", "INDArray", "[", "]", "maskArrays", ",", "int", "output", ")", "{", "NormalizerStrategy", "strategy", "=", "getStrategy", "(", "globalOutputStrategy", ",", "perOutputStra...
Undo (revert) the normalization applied by this DataNormalization instance to the labels of a particular output @param labels The normalized array of outputs @param maskArrays Optional mask arrays belonging to the outputs @param output the index of the output to revert normalization on
[ "Undo", "(", "revert", ")", "the", "normalization", "applied", "by", "this", "DataNormalization", "instance", "to", "the", "labels", "of", "a", "particular", "output" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerHybrid.java#L419-L426
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java
BuildTasksInner.updateAsync
public Observable<BuildTaskInner> updateAsync(String resourceGroupName, String registryName, String buildTaskName, BuildTaskUpdateParameters buildTaskUpdateParameters) { """ Updates a build task with the specified parameters. @param resourceGroupName The name of the resource group to which the container registr...
java
public Observable<BuildTaskInner> updateAsync(String resourceGroupName, String registryName, String buildTaskName, BuildTaskUpdateParameters buildTaskUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, buildTaskName, buildTaskUpdateParameters).map(new Func1<ServiceResponse...
[ "public", "Observable", "<", "BuildTaskInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildTaskName", ",", "BuildTaskUpdateParameters", "buildTaskUpdateParameters", ")", "{", "return", "updateWithServiceRespons...
Updates a build task with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildTaskName The name of the container registry build task. @param buildTaskUpdateParameters The parameter...
[ "Updates", "a", "build", "task", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java#L835-L842
aws/aws-sdk-java
aws-java-sdk-discovery/src/main/java/com/amazonaws/services/applicationdiscovery/model/DescribeConfigurationsResult.java
DescribeConfigurationsResult.setConfigurations
public void setConfigurations(java.util.Collection<java.util.Map<String, String>> configurations) { """ <p> A key in the response map. The value is an array of data. </p> @param configurations A key in the response map. The value is an array of data. """ if (configurations == null) { ...
java
public void setConfigurations(java.util.Collection<java.util.Map<String, String>> configurations) { if (configurations == null) { this.configurations = null; return; } this.configurations = new java.util.ArrayList<java.util.Map<String, String>>(configurations); }
[ "public", "void", "setConfigurations", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", ">", "configurations", ")", "{", "if", "(", "configurations", "==", "null", ")", "{", "this", "...
<p> A key in the response map. The value is an array of data. </p> @param configurations A key in the response map. The value is an array of data.
[ "<p", ">", "A", "key", "in", "the", "response", "map", ".", "The", "value", "is", "an", "array", "of", "data", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-discovery/src/main/java/com/amazonaws/services/applicationdiscovery/model/DescribeConfigurationsResult.java#L49-L56
kiegroup/drools
drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java
BinaryHeapQueue.percolateDownMaxHeap
protected void percolateDownMaxHeap(final int index) { """ Percolates element down heap from the position given by the index. <p> Assumes it is a maximum heap. @param index the index of the element """ final Activation element = elements[index]; int hole = index; while ((hole * 2)...
java
protected void percolateDownMaxHeap(final int index) { final Activation element = elements[index]; int hole = index; while ((hole * 2) <= size) { int child = hole * 2; // if we have a right child and that child can not be percolated // up then move onto othe...
[ "protected", "void", "percolateDownMaxHeap", "(", "final", "int", "index", ")", "{", "final", "Activation", "element", "=", "elements", "[", "index", "]", ";", "int", "hole", "=", "index", ";", "while", "(", "(", "hole", "*", "2", ")", "<=", "size", ")...
Percolates element down heap from the position given by the index. <p> Assumes it is a maximum heap. @param index the index of the element
[ "Percolates", "element", "down", "heap", "from", "the", "position", "given", "by", "the", "index", ".", "<p", ">", "Assumes", "it", "is", "a", "maximum", "heap", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java#L230-L253
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/ContentCryptoMaterial.java
ContentCryptoMaterial.parseInstructionFile
static String parseInstructionFile(S3Object instructionFile) { """ Parses instruction data retrieved from S3 and returns a JSON string representing the instruction. Made for testing purposes. """ try { return convertStreamToString(instructionFile.getObjectContent()); } catch (Excep...
java
static String parseInstructionFile(S3Object instructionFile) { try { return convertStreamToString(instructionFile.getObjectContent()); } catch (Exception e) { throw failure(e, "Error parsing JSON instruction file"); } }
[ "static", "String", "parseInstructionFile", "(", "S3Object", "instructionFile", ")", "{", "try", "{", "return", "convertStreamToString", "(", "instructionFile", ".", "getObjectContent", "(", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", ...
Parses instruction data retrieved from S3 and returns a JSON string representing the instruction. Made for testing purposes.
[ "Parses", "instruction", "data", "retrieved", "from", "S3", "and", "returns", "a", "JSON", "string", "representing", "the", "instruction", ".", "Made", "for", "testing", "purposes", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/ContentCryptoMaterial.java#L562-L568
onepf/OpenIAB
library/src/main/java/org/onepf/oms/OpenIabHelper.java
OpenIabHelper.queryInventoryAsync
public void queryInventoryAsync(final boolean querySkuDetails, @Nullable final List<String> moreItemSkus, @Nullable final List<String> moreSubsSkus, @NotNull final IabHelper.QueryInventoryFinishedListener listene...
java
public void queryInventoryAsync(final boolean querySkuDetails, @Nullable final List<String> moreItemSkus, @Nullable final List<String> moreSubsSkus, @NotNull final IabHelper.QueryInventoryFinishedListener listene...
[ "public", "void", "queryInventoryAsync", "(", "final", "boolean", "querySkuDetails", ",", "@", "Nullable", "final", "List", "<", "String", ">", "moreItemSkus", ",", "@", "Nullable", "final", "List", "<", "String", ">", "moreSubsSkus", ",", "@", "NotNull", "fin...
Queries the inventory. This will query all owned items from the server, as well as information on additional skus, if specified. This method may block or take long to execute. @param querySkuDetails if true, SKU details (price, description, etc) will be queried as well as purchase information. @param moreItemSkus a...
[ "Queries", "the", "inventory", ".", "This", "will", "query", "all", "owned", "items", "from", "the", "server", "as", "well", "as", "information", "on", "additional", "skus", "if", "specified", ".", "This", "method", "may", "block", "or", "take", "long", "t...
train
https://github.com/onepf/OpenIAB/blob/90552d53c5303b322940d96a0c4b7cb797d78760/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L1437-L1469
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleGenerator.java
TupleGenerator.getValidTupleSet
private VarTupleSet getValidTupleSet( RandSeq randSeq, FunctionInputDef inputDef) { """ Returns the all valid input tuples required for generated test cases. """ List<Tuple> validTuples = new ArrayList<Tuple>(); // Get tuple sets required for each specified combiner, ordered for "greedy" processing, i...
java
private VarTupleSet getValidTupleSet( RandSeq randSeq, FunctionInputDef inputDef) { List<Tuple> validTuples = new ArrayList<Tuple>(); // Get tuple sets required for each specified combiner, ordered for "greedy" processing, i.e. biggest tuples first. // For this purpose, "all permutations" is considered...
[ "private", "VarTupleSet", "getValidTupleSet", "(", "RandSeq", "randSeq", ",", "FunctionInputDef", "inputDef", ")", "{", "List", "<", "Tuple", ">", "validTuples", "=", "new", "ArrayList", "<", "Tuple", ">", "(", ")", ";", "// Get tuple sets required for each specifie...
Returns the all valid input tuples required for generated test cases.
[ "Returns", "the", "all", "valid", "input", "tuples", "required", "for", "generated", "test", "cases", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleGenerator.java#L623-L657
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/DockerPathUtil.java
DockerPathUtil.resolveAbsolutely
public static File resolveAbsolutely(String pathToResolve, String baseDir) { """ Resolves the supplied resource (a path or directory on the filesystem) relative the supplied {@code baseDir}. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. The returned file is <em>not</em> guar...
java
public static File resolveAbsolutely(String pathToResolve, String baseDir) { // TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to "/" and a relative path of "../../foo". File fileToResolve = new File(pathToResolve); if (fileToResolve...
[ "public", "static", "File", "resolveAbsolutely", "(", "String", "pathToResolve", ",", "String", "baseDir", ")", "{", "// TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to \"/\" and a relative path of \"../../foo\".", "File", "...
Resolves the supplied resource (a path or directory on the filesystem) relative the supplied {@code baseDir}. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. The returned file is <em>not</em> guaranteed to exist. <p> If the supplied {@code pathToResolve} is already {@link File#isAbso...
[ "Resolves", "the", "supplied", "resource", "(", "a", "path", "or", "directory", "on", "the", "filesystem", ")", "relative", "the", "supplied", "{", "@code", "baseDir", "}", ".", "The", "returned", "{", "@code", "File", "}", "is", "guaranteed", "to", "be", ...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/DockerPathUtil.java#L32-L56
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkInputText
protected boolean checkInputText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { """ Checks if input text contains expected value. @param pageElement Is target element @param textOrKey Is the data to check (text or text in context (after a save)) @return true or fals...
java
protected boolean checkInputText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { WebElement inputText = null; String value = getTextOrKey(textOrKey); try { inputText = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities...
[ "protected", "boolean", "checkInputText", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "FailureException", ",", "TechnicalException", "{", "WebElement", "inputText", "=", "null", ";", "String", "value", "=", "getTextOrKey", "(", "tex...
Checks if input text contains expected value. @param pageElement Is target element @param textOrKey Is the data to check (text or text in context (after a save)) @return true or false @throws FailureException if the scenario encounters a functional error @throws TechnicalException
[ "Checks", "if", "input", "text", "contains", "expected", "value", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L288-L297
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/InternalFedoraBinary.java
InternalFedoraBinary.decorateContentNode
private static void decorateContentNode(final Node dsNode, final Node descNode, final Collection<URI> checksums) throws RepositoryException { """ Add necessary information to node @param dsNode The target binary node to add information to @param descNode The description node associated with the binary no...
java
private static void decorateContentNode(final Node dsNode, final Node descNode, final Collection<URI> checksums) throws RepositoryException { if (dsNode == null) { LOGGER.warn("{} node appears to be null!", JCR_CONTENT); return; } if (dsNode.hasProperty(JCR_DATA...
[ "private", "static", "void", "decorateContentNode", "(", "final", "Node", "dsNode", ",", "final", "Node", "descNode", ",", "final", "Collection", "<", "URI", ">", "checksums", ")", "throws", "RepositoryException", "{", "if", "(", "dsNode", "==", "null", ")", ...
Add necessary information to node @param dsNode The target binary node to add information to @param descNode The description node associated with the binary node @param checksums The checksum information @throws RepositoryException on error
[ "Add", "necessary", "information", "to", "node" ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/InternalFedoraBinary.java#L288-L313
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/LionEngineException.java
LionEngineException.getMessage
private static String getMessage(Media media, String message) { """ Get formatted message with media. @param media The media reference (must not be <code>null</code>). @param message The message to concatenate (must not be <code>null</code>). @return The formatted message. @throws LionEngineException If inva...
java
private static String getMessage(Media media, String message) { Check.notNull(message); return new StringBuilder(getMessage(media)).append(message).toString(); }
[ "private", "static", "String", "getMessage", "(", "Media", "media", ",", "String", "message", ")", "{", "Check", ".", "notNull", "(", "message", ")", ";", "return", "new", "StringBuilder", "(", "getMessage", "(", "media", ")", ")", ".", "append", "(", "m...
Get formatted message with media. @param media The media reference (must not be <code>null</code>). @param message The message to concatenate (must not be <code>null</code>). @return The formatted message. @throws LionEngineException If invalid arguments.
[ "Get", "formatted", "message", "with", "media", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/LionEngineException.java#L54-L59
SonarSource/sonarqube
server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
DatabaseUtils.toUniqueAndSortedPartitions
public static <INPUT extends Comparable<INPUT>> Iterable<List<INPUT>> toUniqueAndSortedPartitions(Collection<INPUT> inputs) { """ Ensure values {@code inputs} are unique (which avoids useless arguments) and sorted before creating the partition. """ return toUniqueAndSortedPartitions(inputs, i -> i); }
java
public static <INPUT extends Comparable<INPUT>> Iterable<List<INPUT>> toUniqueAndSortedPartitions(Collection<INPUT> inputs) { return toUniqueAndSortedPartitions(inputs, i -> i); }
[ "public", "static", "<", "INPUT", "extends", "Comparable", "<", "INPUT", ">", ">", "Iterable", "<", "List", "<", "INPUT", ">", ">", "toUniqueAndSortedPartitions", "(", "Collection", "<", "INPUT", ">", "inputs", ")", "{", "return", "toUniqueAndSortedPartitions", ...
Ensure values {@code inputs} are unique (which avoids useless arguments) and sorted before creating the partition.
[ "Ensure", "values", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java#L175-L177
hibernate/hibernate-ogm
infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/configuration/impl/InfinispanRemoteConfiguration.java
InfinispanRemoteConfiguration.getHotRodConfiguration
private Properties getHotRodConfiguration(Map<?, ?> configurationMap, ConfigurationPropertyReader propertyReader, URL configurationResourceUrl) { """ Extract from the configuration the Hot Rod client properties: the one prefixed with {@link InfinispanRemoteProperties#HOT_ROD_CLIENT_PREFIX} or defined in the resou...
java
private Properties getHotRodConfiguration(Map<?, ?> configurationMap, ConfigurationPropertyReader propertyReader, URL configurationResourceUrl) { Properties hotRodConfiguration = new Properties(); loadResourceFile( configurationResourceUrl, hotRodConfiguration ); setAdditionalProperties( configurationMap, propert...
[ "private", "Properties", "getHotRodConfiguration", "(", "Map", "<", "?", ",", "?", ">", "configurationMap", ",", "ConfigurationPropertyReader", "propertyReader", ",", "URL", "configurationResourceUrl", ")", "{", "Properties", "hotRodConfiguration", "=", "new", "Properti...
Extract from the configuration the Hot Rod client properties: the one prefixed with {@link InfinispanRemoteProperties#HOT_ROD_CLIENT_PREFIX} or defined in the resource file via {@link InfinispanRemoteProperties#CONFIGURATION_RESOURCE_NAME}. <p> Note that the properties with the prefix will override the same properties ...
[ "Extract", "from", "the", "configuration", "the", "Hot", "Rod", "client", "properties", ":", "the", "one", "prefixed", "with", "{" ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/configuration/impl/InfinispanRemoteConfiguration.java#L264-L271
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java
AtomPlacer3D.getDoubleBondConfiguration2D
private int getDoubleBondConfiguration2D(IBond bond, Point2d a, Point2d b, Point2d c, Point2d d) throws CDKException { """ Gets the doubleBondConfiguration2D attribute of the AtomPlacer3D object using existing 2D coordinates. @param bond the double bond @param a coordinate...
java
private int getDoubleBondConfiguration2D(IBond bond, Point2d a, Point2d b, Point2d c, Point2d d) throws CDKException { if (bond.getOrder() != IBond.Order.DOUBLE) { return 0; } // no 2D coordinates or existing configuration if (a == null || b == null || c == null |...
[ "private", "int", "getDoubleBondConfiguration2D", "(", "IBond", "bond", ",", "Point2d", "a", ",", "Point2d", "b", ",", "Point2d", "c", ",", "Point2d", "d", ")", "throws", "CDKException", "{", "if", "(", "bond", ".", "getOrder", "(", ")", "!=", "IBond", "...
Gets the doubleBondConfiguration2D attribute of the AtomPlacer3D object using existing 2D coordinates. @param bond the double bond @param a coordinates (Point2d) of atom1 connected to bond @param b coordinates (Point2d) of atom2 connected to bond @param c coordinate...
[ "Gets", "the", "doubleBondConfiguration2D", "attribute", "of", "the", "AtomPlacer3D", "object", "using", "existing", "2D", "coordinates", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomPlacer3D.java#L302-L318
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/executors/IteratorExecutor.java
IteratorExecutor.logFailures
public static <T> void logFailures(List<Either<T, ExecutionException>> results, Logger useLogger, int atMost) { """ Log failures in the output of {@link #executeAndGetResults()}. @param results output of {@link #executeAndGetResults()} @param useLogger logger to log the messages into. @param atMost will log at ...
java
public static <T> void logFailures(List<Either<T, ExecutionException>> results, Logger useLogger, int atMost) { Logger actualLogger = useLogger == null ? log : useLogger; Iterator<Either<T, ExecutionException>> it = results.iterator(); int printed = 0; while (it.hasNext()) { Either<T, ExecutionExc...
[ "public", "static", "<", "T", ">", "void", "logFailures", "(", "List", "<", "Either", "<", "T", ",", "ExecutionException", ">", ">", "results", ",", "Logger", "useLogger", ",", "int", "atMost", ")", "{", "Logger", "actualLogger", "=", "useLogger", "==", ...
Log failures in the output of {@link #executeAndGetResults()}. @param results output of {@link #executeAndGetResults()} @param useLogger logger to log the messages into. @param atMost will log at most this many errors.
[ "Log", "failures", "in", "the", "output", "of", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/executors/IteratorExecutor.java#L155-L170
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java
RolloutHelper.getOverlappingWithGroupsTargetFilter
public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups, final RolloutGroup group) { """ Creates an RSQL Filter that matches all targets that are in the provided group and in the provided groups. @param baseFilter the base filter from the ...
java
public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups, final RolloutGroup group) { final String groupFilter = group.getTargetFilterQuery(); // when any previous group has the same filter as the target group the // overlap i...
[ "public", "static", "String", "getOverlappingWithGroupsTargetFilter", "(", "final", "String", "baseFilter", ",", "final", "List", "<", "RolloutGroup", ">", "groups", ",", "final", "RolloutGroup", "group", ")", "{", "final", "String", "groupFilter", "=", "group", "...
Creates an RSQL Filter that matches all targets that are in the provided group and in the provided groups. @param baseFilter the base filter from the rollout @param groups the rollout groups @param group the target group @return RSQL string without base filter of the Rollout. Can be an empty string.
[ "Creates", "an", "RSQL", "Filter", "that", "matches", "all", "targets", "that", "are", "in", "the", "provided", "group", "and", "in", "the", "provided", "groups", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L191-L212
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CollectionReference.java
CollectionReference.getParent
@Nullable public DocumentReference getParent() { """ Returns a DocumentReference to the containing Document if this is a subcollection, else null. @return A DocumentReference pointing to the parent document. """ ResourcePath parent = path.getParent(); return parent.isDocument() ? new DocumentRefer...
java
@Nullable public DocumentReference getParent() { ResourcePath parent = path.getParent(); return parent.isDocument() ? new DocumentReference(firestore, parent) : null; }
[ "@", "Nullable", "public", "DocumentReference", "getParent", "(", ")", "{", "ResourcePath", "parent", "=", "path", ".", "getParent", "(", ")", ";", "return", "parent", ".", "isDocument", "(", ")", "?", "new", "DocumentReference", "(", "firestore", ",", "pare...
Returns a DocumentReference to the containing Document if this is a subcollection, else null. @return A DocumentReference pointing to the parent document.
[ "Returns", "a", "DocumentReference", "to", "the", "containing", "Document", "if", "this", "is", "a", "subcollection", "else", "null", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/CollectionReference.java#L70-L74
denisneuling/cctrl.jar
cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java
ClassUtil.getValueOfField
public static Object getValueOfField(Field field, Object ref) { """ <p> getValueOfField. </p> @param field a {@link java.lang.reflect.Field} object. @param ref a {@link java.lang.Object} object. @return a {@link java.lang.Object} object. """ field.setAccessible(true); Object value = null; try { ...
java
public static Object getValueOfField(Field field, Object ref) { field.setAccessible(true); Object value = null; try { value = field.get(ref); } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } return value; }
[ "public", "static", "Object", "getValueOfField", "(", "Field", "field", ",", "Object", "ref", ")", "{", "field", ".", "setAccessible", "(", "true", ")", ";", "Object", "value", "=", "null", ";", "try", "{", "value", "=", "field", ".", "get", "(", "ref"...
<p> getValueOfField. </p> @param field a {@link java.lang.reflect.Field} object. @param ref a {@link java.lang.Object} object. @return a {@link java.lang.Object} object.
[ "<p", ">", "getValueOfField", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/cctrl.jar/blob/37450d824f4dc5ecbcc81c61e48f1ec876ca2de8/cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java#L189-L198
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MergeRequestApi.java
MergeRequestApi.cancelMergeRequest
public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { """ Cancel merge when pipeline succeeds. If you don't have permissions to accept this merge request, you'll get a 401. If the merge request is already merged or closed, you get 405 and error messag...
java
public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { if (mergeRequestIid == null) { throw new RuntimeException("mergeRequestIid cannot be null"); } Response response = put(Response.Status.OK, null, "projects", getProjec...
[ "public", "MergeRequest", "cancelMergeRequest", "(", "Object", "projectIdOrPath", ",", "Integer", "mergeRequestIid", ")", "throws", "GitLabApiException", "{", "if", "(", "mergeRequestIid", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"mergeReques...
Cancel merge when pipeline succeeds. If you don't have permissions to accept this merge request, you'll get a 401. If the merge request is already merged or closed, you get 405 and error message 'Method Not Allowed'. In case the merge request is not set to be merged when the pipeline succeeds, you'll also get a 406 err...
[ "Cancel", "merge", "when", "pipeline", "succeeds", ".", "If", "you", "don", "t", "have", "permissions", "to", "accept", "this", "merge", "request", "you", "ll", "get", "a", "401", ".", "If", "the", "merge", "request", "is", "already", "merged", "or", "cl...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L674-L682
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java
StitchingFromMotion2D.checkLargeMotion
private boolean checkLargeMotion( int width , int height ) { """ Looks for sudden large changes in corner location to detect motion estimation faults. @param width image width @param height image height @return true for fault """ if( first ) { getImageCorners(width,height,corners); previousArea = co...
java
private boolean checkLargeMotion( int width , int height ) { if( first ) { getImageCorners(width,height,corners); previousArea = computeArea(corners); first = false; } else { getImageCorners(width,height,corners); double area = computeArea(corners); double change = Math.max(area/previousArea,pre...
[ "private", "boolean", "checkLargeMotion", "(", "int", "width", ",", "int", "height", ")", "{", "if", "(", "first", ")", "{", "getImageCorners", "(", "width", ",", "height", ",", "corners", ")", ";", "previousArea", "=", "computeArea", "(", "corners", ")", ...
Looks for sudden large changes in corner location to detect motion estimation faults. @param width image width @param height image height @return true for fault
[ "Looks", "for", "sudden", "large", "changes", "in", "corner", "location", "to", "detect", "motion", "estimation", "faults", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d2/StitchingFromMotion2D.java#L169-L188
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsFrameset.java
CmsFrameset.getSiteSelect
public String getSiteSelect(String htmlAttributes) { """ Returns a html select box filled with the current users accessible sites.<p> @param htmlAttributes attributes that will be inserted into the generated html @return a html select box filled with the current users accessible sites """ List<Str...
java
public String getSiteSelect(String htmlAttributes) { List<String> options = new ArrayList<String>(); List<String> values = new ArrayList<String>(); int selectedIndex = 0; List<CmsSite> sites = OpenCms.getSiteManager().getAvailableSites(getCms(), true); Iterator<CmsSite> i = si...
[ "public", "String", "getSiteSelect", "(", "String", "htmlAttributes", ")", "{", "List", "<", "String", ">", "options", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "String", ">", "values", "=", "new", "ArrayList", "<", "String...
Returns a html select box filled with the current users accessible sites.<p> @param htmlAttributes attributes that will be inserted into the generated html @return a html select box filled with the current users accessible sites
[ "Returns", "a", "html", "select", "box", "filled", "with", "the", "current", "users", "accessible", "sites", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsFrameset.java#L367-L394
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.pressImage
public static void pressImage(Image srcImage, OutputStream out, Image pressImg, int x, int y, float alpha) throws IORuntimeException { """ 给图片添加图片水印<br> 此方法并不关闭流 @param srcImage 源图像流 @param out 目标图像流 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中...
java
public static void pressImage(Image srcImage, OutputStream out, Image pressImg, int x, int y, float alpha) throws IORuntimeException { pressImage(srcImage, getImageOutputStream(out), pressImg, x, y, alpha); }
[ "public", "static", "void", "pressImage", "(", "Image", "srcImage", ",", "OutputStream", "out", ",", "Image", "pressImg", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "throws", "IORuntimeException", "{", "pressImage", "(", "srcImage", ",", ...
给图片添加图片水印<br> 此方法并不关闭流 @param srcImage 源图像流 @param out 目标图像流 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @throws IORuntimeException IO异常 @since 3.2.2
[ "给图片添加图片水印<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L941-L943
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java
KeyVaultClientImpl.deleteCertificateAsync
public Observable<CertificateBundle> deleteCertificateAsync(String vaultBaseUrl, String certificateName) { """ Deletes a certificate from a specified key vault. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @return the obse...
java
public Observable<CertificateBundle> deleteCertificateAsync(String vaultBaseUrl, String certificateName) { return deleteCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundle>() { @Override public Certificate...
[ "public", "Observable", "<", "CertificateBundle", ">", "deleteCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "deleteCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "map",...
Deletes a certificate from a specified key vault. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @return the observable to the CertificateBundle object
[ "Deletes", "a", "certificate", "from", "a", "specified", "key", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java#L3617-L3624
SQLDroid/SQLDroid
src/main/java/org/sqldroid/SQLDroidPreparedStatement.java
SQLDroidPreparedStatement.setBinaryStream
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException { """ Read the byte stream and set the object as a byte[]. This is a pass through to <code>setBinaryStream(parameterIndex, inputStream, Integer.MAX_VALUE);</code> @see #setBinaryStream(int, InputStream, int)...
java
@Override public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException { setBinaryStream(parameterIndex, inputStream, Integer.MAX_VALUE); }
[ "@", "Override", "public", "void", "setBinaryStream", "(", "int", "parameterIndex", ",", "InputStream", "inputStream", ")", "throws", "SQLException", "{", "setBinaryStream", "(", "parameterIndex", ",", "inputStream", ",", "Integer", ".", "MAX_VALUE", ")", ";", "}"...
Read the byte stream and set the object as a byte[]. This is a pass through to <code>setBinaryStream(parameterIndex, inputStream, Integer.MAX_VALUE);</code> @see #setBinaryStream(int, InputStream, int)
[ "Read", "the", "byte", "stream", "and", "set", "the", "object", "as", "a", "byte", "[]", ".", "This", "is", "a", "pass", "through", "to", "<code", ">", "setBinaryStream", "(", "parameterIndex", "inputStream", "Integer", ".", "MAX_VALUE", ")", ";", "<", "...
train
https://github.com/SQLDroid/SQLDroid/blob/4fb38ee40338673cb0205044571e4379573762c4/src/main/java/org/sqldroid/SQLDroidPreparedStatement.java#L737-L740
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractController.java
AbstractController.getUserData
protected <T> Optional<T> getUserData(Optional<? extends Node> node, Class<T> type) { """ Gets the user data. @param node the node @param type the cls @param <T> the generic type @return the user data """ if (node.isPresent()) { final Node n = node.get(); return getVal...
java
protected <T> Optional<T> getUserData(Optional<? extends Node> node, Class<T> type) { if (node.isPresent()) { final Node n = node.get(); return getValue(n, n::getUserData, type); } return Optional.empty(); }
[ "protected", "<", "T", ">", "Optional", "<", "T", ">", "getUserData", "(", "Optional", "<", "?", "extends", "Node", ">", "node", ",", "Class", "<", "T", ">", "type", ")", "{", "if", "(", "node", ".", "isPresent", "(", ")", ")", "{", "final", "Nod...
Gets the user data. @param node the node @param type the cls @param <T> the generic type @return the user data
[ "Gets", "the", "user", "data", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractController.java#L315-L321
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/Assert.java
Assert.isNull
public static void isNull(@Nullable final Object object, final String message) { """ Assert that an object is {@code null}. <pre class="code"> Assert.isNull(value, "The value must be null"); </pre> @param object the object to check @param message the exception message to use if the assertion fails @throw...
java
public static void isNull(@Nullable final Object object, final String message) { if (object != null) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "isNull", "(", "@", "Nullable", "final", "Object", "object", ",", "final", "String", "message", ")", "{", "if", "(", "object", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", ...
Assert that an object is {@code null}. <pre class="code"> Assert.isNull(value, "The value must be null"); </pre> @param object the object to check @param message the exception message to use if the assertion fails @throws IllegalArgumentException if the object is not {@code null}
[ "Assert", "that", "an", "object", "is", "{", "@code", "null", "}", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/Assert.java#L173-L177
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/sparse/Arrays.java
Arrays.binarySearchGreater
public static int binarySearchGreater(int[] index, int key, int begin, int end) { """ Searches for a key in a sorted array, and returns an index to an element which is greater than or equal key. @param index Sorted array of integers @param key Search for something equal or greater @param begin ...
java
public static int binarySearchGreater(int[] index, int key, int begin, int end) { return binarySearchInterval(index, key, begin, end, true); }
[ "public", "static", "int", "binarySearchGreater", "(", "int", "[", "]", "index", ",", "int", "key", ",", "int", "begin", ",", "int", "end", ")", "{", "return", "binarySearchInterval", "(", "index", ",", "key", ",", "begin", ",", "end", ",", "true", ")"...
Searches for a key in a sorted array, and returns an index to an element which is greater than or equal key. @param index Sorted array of integers @param key Search for something equal or greater @param begin Start posisiton in the index @param end One past the end position in the index @return end if nothing greater ...
[ "Searches", "for", "a", "key", "in", "a", "sorted", "array", "and", "returns", "an", "index", "to", "an", "element", "which", "is", "greater", "than", "or", "equal", "key", "." ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/sparse/Arrays.java#L51-L54
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/RowMapper.java
RowMapper.build
public static RowMapper build(CFMetaData metadata, ColumnDefinition columnDefinition, Schema schema) { """ Returns a new {@link RowMapper} for the specified column family metadata, indexed column definition and {@link Schema}. @param metadata The indexed column family metadata. @param columnDefinition...
java
public static RowMapper build(CFMetaData metadata, ColumnDefinition columnDefinition, Schema schema) { if (metadata.clusteringColumns().size() > 0) { return new RowMapperWide(metadata, columnDefinition, schema); } else { return new RowMapperSkinny(metadata, columnDefinition, sche...
[ "public", "static", "RowMapper", "build", "(", "CFMetaData", "metadata", ",", "ColumnDefinition", "columnDefinition", ",", "Schema", "schema", ")", "{", "if", "(", "metadata", ".", "clusteringColumns", "(", ")", ".", "size", "(", ")", ">", "0", ")", "{", "...
Returns a new {@link RowMapper} for the specified column family metadata, indexed column definition and {@link Schema}. @param metadata The indexed column family metadata. @param columnDefinition The indexed column definition. @param schema The mapping {@link Schema}. @return A new {@link RowMapper} ...
[ "Returns", "a", "new", "{", "@link", "RowMapper", "}", "for", "the", "specified", "column", "family", "metadata", "indexed", "column", "definition", "and", "{", "@link", "Schema", "}", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/RowMapper.java#L76-L82
alkacon/opencms-core
src/org/opencms/relations/CmsCategoryService.java
CmsCategoryService.copyCategories
public void copyCategories(CmsObject cms, CmsResource fromResource, String toResourceSitePath) throws CmsException { """ Adds all categories from one resource to another, skipping categories that are not available for the resource copied to. The resource where categories are copied to has to be locked. @para...
java
public void copyCategories(CmsObject cms, CmsResource fromResource, String toResourceSitePath) throws CmsException { List<CmsCategory> categories = readResourceCategories(cms, fromResource); for (CmsCategory category : categories) { addResourceToCategory(cms, toResourceSitePath, category); ...
[ "public", "void", "copyCategories", "(", "CmsObject", "cms", ",", "CmsResource", "fromResource", ",", "String", "toResourceSitePath", ")", "throws", "CmsException", "{", "List", "<", "CmsCategory", ">", "categories", "=", "readResourceCategories", "(", "cms", ",", ...
Adds all categories from one resource to another, skipping categories that are not available for the resource copied to. The resource where categories are copied to has to be locked. @param cms the CmsObject used for reading and writing. @param fromResource the resource to copy the categories from. @param toResourceS...
[ "Adds", "all", "categories", "from", "one", "resource", "to", "another", "skipping", "categories", "that", "are", "not", "available", "for", "the", "resource", "copied", "to", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L167-L173
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoLocationUtil.java
GeoLocationUtil.epsilonEqualsDistance
@Pure public static boolean epsilonEqualsDistance(double value1, double value2) { """ Replies if the specified distances are approximatively equal. @param value1 the first value. @param value2 the second value. @return <code>true</code> if both values are equal, otherwise <code>false</code> """ return ...
java
@Pure public static boolean epsilonEqualsDistance(double value1, double value2) { return value1 >= (value2 - distancePrecision) && value1 <= (value2 + distancePrecision); }
[ "@", "Pure", "public", "static", "boolean", "epsilonEqualsDistance", "(", "double", "value1", ",", "double", "value2", ")", "{", "return", "value1", ">=", "(", "value2", "-", "distancePrecision", ")", "&&", "value1", "<=", "(", "value2", "+", "distancePrecisio...
Replies if the specified distances are approximatively equal. @param value1 the first value. @param value2 the second value. @return <code>true</code> if both values are equal, otherwise <code>false</code>
[ "Replies", "if", "the", "specified", "distances", "are", "approximatively", "equal", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/location/GeoLocationUtil.java#L143-L146
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/styles/Style.java
Style.dashToString
public static String dashToString( float[] dash, Float shift ) { """ Convert a dash array to string. @param dash the dash to convert. @param shift the shift. @return the string representation. """ StringBuilder sb = new StringBuilder(); if (shift != null) sb.append(shift); ...
java
public static String dashToString( float[] dash, Float shift ) { StringBuilder sb = new StringBuilder(); if (shift != null) sb.append(shift); for( int i = 0; i < dash.length; i++ ) { if (shift != null || i > 0) { sb.append(","); } s...
[ "public", "static", "String", "dashToString", "(", "float", "[", "]", "dash", ",", "Float", "shift", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "shift", "!=", "null", ")", "sb", ".", "append", "(", "shift", ...
Convert a dash array to string. @param dash the dash to convert. @param shift the shift. @return the string representation.
[ "Convert", "a", "dash", "array", "to", "string", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/styles/Style.java#L206-L217
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.notEmpty
public <T extends Map<?, ?>> T notEmpty(final T map, final String message, final Object... values) { """ <p>Validate that the specified argument map is neither {@code null} nor a size of zero (no elements); otherwise throwing an exception with the specified message.</p> <pre>Validate.notEmpty(myMap, "The map must...
java
public <T extends Map<?, ?>> T notEmpty(final T map, final String message, final Object... values) { if (map == null) { failNull(String.format(message, values)); } if (map.isEmpty()) { fail(String.format(message, values)); } return map; }
[ "public", "<", "T", "extends", "Map", "<", "?", ",", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "map", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "map", "==", "null", ")", "{", "failNu...
<p>Validate that the specified argument map is neither {@code null} nor a size of zero (no elements); otherwise throwing an exception with the specified message.</p> <pre>Validate.notEmpty(myMap, "The map must not be empty");</pre> @param <T> the map type @param map the map to check, validated not null by this method ...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "map", "is", "neither", "{", "@code", "null", "}", "nor", "a", "size", "of", "zero", "(", "no", "elements", ")", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L663-L671
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/SCannedBox.java
SCannedBox.getProperties
public String getProperties(String strCommand, Map<String,Object> properties) { """ Parse the command string into properties. @param strCommand @param properties @return """ int iIndex = strCommand.indexOf('='); if (iIndex != -1) { if (this.getParentScreen().getTask() != ...
java
public String getProperties(String strCommand, Map<String,Object> properties) { int iIndex = strCommand.indexOf('='); if (iIndex != -1) { if (this.getParentScreen().getTask() != null) Util.parseArgs(properties, strCommand); if (properties.get(DBParams.COM...
[ "public", "String", "getProperties", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "int", "iIndex", "=", "strCommand", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "iIndex", "!=", "-", "1", ...
Parse the command string into properties. @param strCommand @param properties @return
[ "Parse", "the", "command", "string", "into", "properties", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/SCannedBox.java#L418-L429
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/StringUtils.java
StringUtils.join
public static String join(String[] strings, String separator) { """ 连接字符串数组 @param strings 字符串数组 @param separator 分隔符 @return 按分隔符分隔的字符串 """ if (strings == null || strings.length == 0) { return EMPTY; } StringBuilder sb = new StringBuilder(); for (String strin...
java
public static String join(String[] strings, String separator) { if (strings == null || strings.length == 0) { return EMPTY; } StringBuilder sb = new StringBuilder(); for (String string : strings) { if (isNotBlank(string)) { sb.append(string).append...
[ "public", "static", "String", "join", "(", "String", "[", "]", "strings", ",", "String", "separator", ")", "{", "if", "(", "strings", "==", "null", "||", "strings", ".", "length", "==", "0", ")", "{", "return", "EMPTY", ";", "}", "StringBuilder", "sb",...
连接字符串数组 @param strings 字符串数组 @param separator 分隔符 @return 按分隔符分隔的字符串
[ "连接字符串数组" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/StringUtils.java#L364-L375
dustin/java-memcached-client
src/main/java/net/spy/memcached/compat/log/AbstractLogger.java
AbstractLogger.warn
public void warn(String message, Object... args) { """ Log a formatted message at debug level. @param message the message to log @param args the arguments for that message """ warn(String.format(message, args), getThrowable(args)); }
java
public void warn(String message, Object... args) { warn(String.format(message, args), getThrowable(args)); }
[ "public", "void", "warn", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "warn", "(", "String", ".", "format", "(", "message", ",", "args", ")", ",", "getThrowable", "(", "args", ")", ")", ";", "}" ]
Log a formatted message at debug level. @param message the message to log @param args the arguments for that message
[ "Log", "a", "formatted", "message", "at", "debug", "level", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/compat/log/AbstractLogger.java#L190-L192
lucee/Lucee
core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java
HttpServletRequestDummy.setHeader
public void setHeader(String name, String value) { """ sets a new header value @param name name of the new value @param value header value """ headers = ReqRspUtil.set(headers, name, value); }
java
public void setHeader(String name, String value) { headers = ReqRspUtil.set(headers, name, value); }
[ "public", "void", "setHeader", "(", "String", "name", ",", "String", "value", ")", "{", "headers", "=", "ReqRspUtil", ".", "set", "(", "headers", ",", "name", ",", "value", ")", ";", "}" ]
sets a new header value @param name name of the new value @param value header value
[ "sets", "a", "new", "header", "value" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java#L237-L239
box/box-java-sdk
src/main/java/com/box/sdk/BoxMetadataFilter.java
BoxMetadataFilter.addDateRangeFilter
public void addDateRangeFilter(String key, DateRange dateRange) { """ Set a filter to the filterList, example: key=documentNumber, gt : "", lt : "". @param key the key that the filter should be looking for. @param dateRange the date range that is start and end dates """ JsonObject opObj = new JsonOb...
java
public void addDateRangeFilter(String key, DateRange dateRange) { JsonObject opObj = new JsonObject(); if (dateRange.getFromDate() != null) { String dateGtString = BoxDateFormat.format(dateRange.getFromDate()); //workaround replacing + and - 000 at the end with 'Z' ...
[ "public", "void", "addDateRangeFilter", "(", "String", "key", ",", "DateRange", "dateRange", ")", "{", "JsonObject", "opObj", "=", "new", "JsonObject", "(", ")", ";", "if", "(", "dateRange", ".", "getFromDate", "(", ")", "!=", "null", ")", "{", "String", ...
Set a filter to the filterList, example: key=documentNumber, gt : "", lt : "". @param key the key that the filter should be looking for. @param dateRange the date range that is start and end dates
[ "Set", "a", "filter", "to", "the", "filterList", "example", ":", "key", "=", "documentNumber", "gt", ":", "lt", ":", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxMetadataFilter.java#L73-L91
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java
XmlPrintStream.printElement
public void printElement(String elementName, Object value) { """ Output a complete element with the given content. @param elementName Name of element. @param value Content of element. """ println("<" + elementName + ">" + (value == null ? "" : escape(value.toString())) + "</" + elementName + ">"); }
java
public void printElement(String elementName, Object value) { println("<" + elementName + ">" + (value == null ? "" : escape(value.toString())) + "</" + elementName + ">"); }
[ "public", "void", "printElement", "(", "String", "elementName", ",", "Object", "value", ")", "{", "println", "(", "\"<\"", "+", "elementName", "+", "\">\"", "+", "(", "value", "==", "null", "?", "\"\"", ":", "escape", "(", "value", ".", "toString", "(", ...
Output a complete element with the given content. @param elementName Name of element. @param value Content of element.
[ "Output", "a", "complete", "element", "with", "the", "given", "content", "." ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java#L109-L111
jronrun/benayn
benayn-berkeley/src/main/java/com/benayn/berkeley/Berkeley.java
Berkeley.getSequence
public Sequence getSequence(String sequenceKey, SequenceConfig sequenceConfig) { """ Returns a {@link Sequence} instance with given configuration or {@link Berkeley#defaultSequenceConfig()} if null """ Sequence sequence = sequences.get(checkNotNull(sequenceKey)); if (null == sequence) { ...
java
public Sequence getSequence(String sequenceKey, SequenceConfig sequenceConfig) { Sequence sequence = sequences.get(checkNotNull(sequenceKey)); if (null == sequence) { sequence = sequenceDB().openSequence(null, sequenceDB().getEntry(sequenceKey), firstNonNull(sequenceConf...
[ "public", "Sequence", "getSequence", "(", "String", "sequenceKey", ",", "SequenceConfig", "sequenceConfig", ")", "{", "Sequence", "sequence", "=", "sequences", ".", "get", "(", "checkNotNull", "(", "sequenceKey", ")", ")", ";", "if", "(", "null", "==", "sequen...
Returns a {@link Sequence} instance with given configuration or {@link Berkeley#defaultSequenceConfig()} if null
[ "Returns", "a", "{" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-berkeley/src/main/java/com/benayn/berkeley/Berkeley.java#L2713-L2722
Pi4J/pi4j
pi4j-device/src/main/java/com/pi4j/component/potentiometer/microchip/impl/MicrochipPotentiometerDeviceController.java
MicrochipPotentiometerDeviceController.setTerminalConfiguration
public void setTerminalConfiguration(final DeviceControllerTerminalConfiguration config) throws IOException { """ Sets the given terminal-configuration to the device. @param config A terminal-configuration for a certain channel. @throws IOException Thrown if communication fails or device returned a malforme...
java
public void setTerminalConfiguration(final DeviceControllerTerminalConfiguration config) throws IOException { if (config == null) { throw new RuntimeException("null-config is not allowed!"); } final DeviceControllerChannel channel = config.getChannel(); if (channel == null) { throw new RuntimeExceptio...
[ "public", "void", "setTerminalConfiguration", "(", "final", "DeviceControllerTerminalConfiguration", "config", ")", "throws", "IOException", "{", "if", "(", "config", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"null-config is not allowed!\"", ")"...
Sets the given terminal-configuration to the device. @param config A terminal-configuration for a certain channel. @throws IOException Thrown if communication fails or device returned a malformed result
[ "Sets", "the", "given", "terminal", "-", "configuration", "to", "the", "device", "." ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-device/src/main/java/com/pi4j/component/potentiometer/microchip/impl/MicrochipPotentiometerDeviceController.java#L294-L325
qiujuer/Genius-Android
caprice/kit-handler/src/main/java/net/qiujuer/genius/kit/handler/Run.java
Run.onBackground
public static Result onBackground(Action action) { """ Asynchronously The current thread asynchronous run relative to the sub thread, not blocking the current thread @param action Action Interface, you can do something in this """ final HandlerPoster poster = getBackgroundPoster(); if (Loo...
java
public static Result onBackground(Action action) { final HandlerPoster poster = getBackgroundPoster(); if (Looper.myLooper() == poster.getLooper()) { action.call(); return new ActionAsyncTask(action, true); } ActionAsyncTask task = new ActionAsyncTask(action); ...
[ "public", "static", "Result", "onBackground", "(", "Action", "action", ")", "{", "final", "HandlerPoster", "poster", "=", "getBackgroundPoster", "(", ")", ";", "if", "(", "Looper", ".", "myLooper", "(", ")", "==", "poster", ".", "getLooper", "(", ")", ")",...
Asynchronously The current thread asynchronous run relative to the sub thread, not blocking the current thread @param action Action Interface, you can do something in this
[ "Asynchronously", "The", "current", "thread", "asynchronous", "run", "relative", "to", "the", "sub", "thread", "not", "blocking", "the", "current", "thread" ]
train
https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/kit-handler/src/main/java/net/qiujuer/genius/kit/handler/Run.java#L115-L124
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/StatefulBeanO.java
StatefulBeanO.setEnterpriseBean
public void setEnterpriseBean(Object sb, ManagedObjectContext ejbContext) { """ Set enterprise bean associate with this <code>BeanO</code>. <p> @param sb the enterprise bean instance that represents this stateful session bean. Not required to implement SessionBean starting with EJB 3.0. """ setEnt...
java
public void setEnterpriseBean(Object sb, ManagedObjectContext ejbContext) { setEnterpriseBean(sb); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setEnterpriseBean : ejbContext = " + ejbContext); ivEjbManagedObjectContext = ejbContext; }
[ "public", "void", "setEnterpriseBean", "(", "Object", "sb", ",", "ManagedObjectContext", "ejbContext", ")", "{", "setEnterpriseBean", "(", "sb", ")", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ...
Set enterprise bean associate with this <code>BeanO</code>. <p> @param sb the enterprise bean instance that represents this stateful session bean. Not required to implement SessionBean starting with EJB 3.0.
[ "Set", "enterprise", "bean", "associate", "with", "this", "<code", ">", "BeanO<", "/", "code", ">", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/StatefulBeanO.java#L625-L632
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/FormatOperator.java
FormatOperator.doExec
@Override protected Object doExec(Element element, Object scope, String formatterName, Object... arguments) { """ Execute FORMAT operator. Returns requested formatter instance throwing templates exception if not found. @param element context element, unused, @param scope scope object, unused, @param formatt...
java
@Override protected Object doExec(Element element, Object scope, String formatterName, Object... arguments) { Format format = getFormat(formatterName); if (format == null) { throw new TemplateException("Formatting class |%s| not found.", formatterName); } return format; }
[ "@", "Override", "protected", "Object", "doExec", "(", "Element", "element", ",", "Object", "scope", ",", "String", "formatterName", ",", "Object", "...", "arguments", ")", "{", "Format", "format", "=", "getFormat", "(", "formatterName", ")", ";", "if", "(",...
Execute FORMAT operator. Returns requested formatter instance throwing templates exception if not found. @param element context element, unused, @param scope scope object, unused, @param formatterName formatter qualified class name, @param arguments optional arguments, not used. @return format instance. @throws Templa...
[ "Execute", "FORMAT", "operator", ".", "Returns", "requested", "formatter", "instance", "throwing", "templates", "exception", "if", "not", "found", "." ]
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/FormatOperator.java#L41-L48
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/unsafe/UnsafeInput.java
UnsafeInput.readBytes
public void readBytes (Object to, long offset, int count) throws KryoException { """ Read count bytes and write them to the object at the given offset inside the in-memory representation of the object. """ int copyCount = Math.min(limit - position, count); while (true) { unsafe.copyMemory(buffer, byteAr...
java
public void readBytes (Object to, long offset, int count) throws KryoException { int copyCount = Math.min(limit - position, count); while (true) { unsafe.copyMemory(buffer, byteArrayBaseOffset + position, to, offset, copyCount); position += copyCount; count -= copyCount; if (count == 0) break; offset...
[ "public", "void", "readBytes", "(", "Object", "to", ",", "long", "offset", ",", "int", "count", ")", "throws", "KryoException", "{", "int", "copyCount", "=", "Math", ".", "min", "(", "limit", "-", "position", ",", "count", ")", ";", "while", "(", "true...
Read count bytes and write them to the object at the given offset inside the in-memory representation of the object.
[ "Read", "count", "bytes", "and", "write", "them", "to", "the", "object", "at", "the", "given", "offset", "inside", "the", "in", "-", "memory", "representation", "of", "the", "object", "." ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/unsafe/UnsafeInput.java#L185-L196
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/WishlistUrl.java
WishlistUrl.updateWishlistUrl
public static MozuUrl updateWishlistUrl(String responseFields, String wishlistId) { """ Get Resource Url for UpdateWishlist @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. ...
java
public static MozuUrl updateWishlistUrl(String responseFields, String wishlistId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("wishlistId", wishlistId); retur...
[ "public", "static", "MozuUrl", "updateWishlistUrl", "(", "String", "responseFields", ",", "String", "wishlistId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/wishlists/{wishlistId}?responseFields={responseFields}\"", ")", ";", "f...
Get Resource Url for UpdateWishlist @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. @param wishlistId Unique i...
[ "Get", "Resource", "Url", "for", "UpdateWishlist" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/WishlistUrl.java#L88-L94
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroReader.java
SynchroReader.processChildTasks
private void processChildTasks(Task task, MapRow row) throws IOException { """ Extract child task data. @param task MPXJ task @param row Synchro task data """ List<MapRow> tasks = row.getRows("TASKS"); if (tasks != null) { for (MapRow childTask : tasks) { pro...
java
private void processChildTasks(Task task, MapRow row) throws IOException { List<MapRow> tasks = row.getRows("TASKS"); if (tasks != null) { for (MapRow childTask : tasks) { processTask(task, childTask); } } }
[ "private", "void", "processChildTasks", "(", "Task", "task", ",", "MapRow", "row", ")", "throws", "IOException", "{", "List", "<", "MapRow", ">", "tasks", "=", "row", ".", "getRows", "(", "\"TASKS\"", ")", ";", "if", "(", "tasks", "!=", "null", ")", "{...
Extract child task data. @param task MPXJ task @param row Synchro task data
[ "Extract", "child", "task", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L362-L372
jbundle/jbundle
base/model/src/main/java/org/jbundle/base/model/Utility.java
Utility.copyTreeToNode
public static Node copyTreeToNode(Node tree, Node node) { """ Copy DOM tree to a SOAP tree. @param tree @param node @return The parent of the new child node. """ DOMResult result = new DOMResult(node); if (Utility.copyTreeToResult(tree, result)) return node.getLastChild(); ...
java
public static Node copyTreeToNode(Node tree, Node node) { DOMResult result = new DOMResult(node); if (Utility.copyTreeToResult(tree, result)) return node.getLastChild(); else return null; // Failure }
[ "public", "static", "Node", "copyTreeToNode", "(", "Node", "tree", ",", "Node", "node", ")", "{", "DOMResult", "result", "=", "new", "DOMResult", "(", "node", ")", ";", "if", "(", "Utility", ".", "copyTreeToResult", "(", "tree", ",", "result", ")", ")", ...
Copy DOM tree to a SOAP tree. @param tree @param node @return The parent of the new child node.
[ "Copy", "DOM", "tree", "to", "a", "SOAP", "tree", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Utility.java#L768-L775
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabSetRenderer.java
WTabSetRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WTabSet. @param component the WTabSet to paint. @param renderContext the RenderContext to paint to. """ WTabSet tabSet = (WTabSet) component; XmlStringBuilder xml = renderContext....
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTabSet tabSet = (WTabSet) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:tabset"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", com...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTabSet", "tabSet", "=", "(", "WTabSet", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext"...
Paints the given WTabSet. @param component the WTabSet to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTabSet", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabSetRenderer.java#L24-L52
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/ConfigurationSupport.java
ConfigurationSupport.setAdditionalFieldTypes
public static void setAdditionalFieldTypes(String spec, GelfMessageAssembler gelfMessageAssembler) { """ Set the additional field types. @param spec field=String,field1=Double, ... See {@link GelfMessage} for supported types. @param gelfMessageAssembler the Gelf message assembler to apply the configuration ...
java
public static void setAdditionalFieldTypes(String spec, GelfMessageAssembler gelfMessageAssembler) { if (null != spec) { String[] properties = spec.split(MULTI_VALUE_DELIMITTER); for (String field : properties) { final int index = field.indexOf(EQ); if (-...
[ "public", "static", "void", "setAdditionalFieldTypes", "(", "String", "spec", ",", "GelfMessageAssembler", "gelfMessageAssembler", ")", "{", "if", "(", "null", "!=", "spec", ")", "{", "String", "[", "]", "properties", "=", "spec", ".", "split", "(", "MULTI_VAL...
Set the additional field types. @param spec field=String,field1=Double, ... See {@link GelfMessage} for supported types. @param gelfMessageAssembler the Gelf message assembler to apply the configuration
[ "Set", "the", "additional", "field", "types", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/ConfigurationSupport.java#L77-L88
grpc/grpc-java
core/src/main/java/io/grpc/internal/GrpcUtil.java
GrpcUtil.iterableContains
static <T> boolean iterableContains(Iterable<T> iterable, T item) { """ Checks whether the given item exists in the iterable. This is copied from Guava Collect's {@code Iterables.contains()} because Guava Collect is not Android-friendly thus core can't depend on it. """ if (iterable instanceof Collectio...
java
static <T> boolean iterableContains(Iterable<T> iterable, T item) { if (iterable instanceof Collection) { Collection<?> collection = (Collection<?>) iterable; try { return collection.contains(item); } catch (NullPointerException e) { return false; } catch (ClassCastException ...
[ "static", "<", "T", ">", "boolean", "iterableContains", "(", "Iterable", "<", "T", ">", "iterable", ",", "T", "item", ")", "{", "if", "(", "iterable", "instanceof", "Collection", ")", "{", "Collection", "<", "?", ">", "collection", "=", "(", "Collection"...
Checks whether the given item exists in the iterable. This is copied from Guava Collect's {@code Iterables.contains()} because Guava Collect is not Android-friendly thus core can't depend on it.
[ "Checks", "whether", "the", "given", "item", "exists", "in", "the", "iterable", ".", "This", "is", "copied", "from", "Guava", "Collect", "s", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/GrpcUtil.java#L765-L782
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.linkMtoN
public void linkMtoN(Object obj, CollectionDescriptor cod, boolean insert) { """ Assign FK values and store entries in indirection table for all objects referenced by given object. @param obj real object with 1:n reference @param cod {@link CollectionDescriptor} of referenced 1:n objects @param insert flag s...
java
public void linkMtoN(Object obj, CollectionDescriptor cod, boolean insert) { Object referencedObjects = cod.getPersistentField().get(obj); storeAndLinkMtoN(true, obj, cod, referencedObjects, insert); }
[ "public", "void", "linkMtoN", "(", "Object", "obj", ",", "CollectionDescriptor", "cod", ",", "boolean", "insert", ")", "{", "Object", "referencedObjects", "=", "cod", ".", "getPersistentField", "(", ")", ".", "get", "(", "obj", ")", ";", "storeAndLinkMtoN", ...
Assign FK values and store entries in indirection table for all objects referenced by given object. @param obj real object with 1:n reference @param cod {@link CollectionDescriptor} of referenced 1:n objects @param insert flag signal insert operation, false signals update operation
[ "Assign", "FK", "values", "and", "store", "entries", "in", "indirection", "table", "for", "all", "objects", "referenced", "by", "given", "object", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L1325-L1329
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java
HeaderCell.setBehavior
public void setBehavior(String name, Object value, String facet) throws JspException { """ <p> Implementation of the {@link IBehaviorConsumer} interface that extends the functionality of this tag beyond that exposed via the JSP tag attributes. This method accepts the following facets: <table> <tr><td>Facet Na...
java
public void setBehavior(String name, Object value, String facet) throws JspException { if(facet != null && facet.equals(BEHAVIOR_RENDERER_NAME)) { String className = value != null ? value.toString() : null; /* provides a way to extend the existing decorators */ CellDecorator ...
[ "public", "void", "setBehavior", "(", "String", "name", ",", "Object", "value", ",", "String", "facet", ")", "throws", "JspException", "{", "if", "(", "facet", "!=", "null", "&&", "facet", ".", "equals", "(", "BEHAVIOR_RENDERER_NAME", ")", ")", "{", "Strin...
<p> Implementation of the {@link IBehaviorConsumer} interface that extends the functionality of this tag beyond that exposed via the JSP tag attributes. This method accepts the following facets: <table> <tr><td>Facet Name</td><td>Operation</td></tr> <tr><td><code>renderer</code></td><td>Extends the cell decorator chai...
[ "<p", ">", "Implementation", "of", "the", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java#L736-L758
OpenLiberty/open-liberty
dev/com.ibm.ws.repository.parsers/src/com/ibm/ws/repository/parsers/IfixParser.java
IfixParser.getFixId
private String getFixId(IFixInfo iFixInfo, ExtractedFileInformation xmlInfo) throws RepositoryArchiveInvalidEntryException { """ Get the ID of the iFix from the Java representation of the iFix XML @param iFixInfo @param xmlInfo @return A String containing the iFix ID @throws RepositoryArchiveInvalidEntryExce...
java
private String getFixId(IFixInfo iFixInfo, ExtractedFileInformation xmlInfo) throws RepositoryArchiveInvalidEntryException { // check for null input if (null == iFixInfo) { throw new RepositoryArchiveInvalidEntryException("Null XML object provided", xmlInfo.getSourceArchive(), xmlInfo.getSe...
[ "private", "String", "getFixId", "(", "IFixInfo", "iFixInfo", ",", "ExtractedFileInformation", "xmlInfo", ")", "throws", "RepositoryArchiveInvalidEntryException", "{", "// check for null input", "if", "(", "null", "==", "iFixInfo", ")", "{", "throw", "new", "RepositoryA...
Get the ID of the iFix from the Java representation of the iFix XML @param iFixInfo @param xmlInfo @return A String containing the iFix ID @throws RepositoryArchiveInvalidEntryException
[ "Get", "the", "ID", "of", "the", "iFix", "from", "the", "Java", "representation", "of", "the", "iFix", "XML" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.parsers/src/com/ibm/ws/repository/parsers/IfixParser.java#L143-L152
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getIsomorphMaps
public static List<List<CDKRMap>> getIsomorphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { """ Returns all the isomorph 'mappings' found between two atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContaine...
java
public static List<List<CDKRMap>> getIsomorphMaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { return search(sourceGraph, targetGraph, getBitSet(sourceGraph), getBitSet(targetGraph), true, true, shouldMatchBonds); }
[ "public", "static", "List", "<", "List", "<", "CDKRMap", ">", ">", "getIsomorphMaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "return", "search", "(", "sour...
Returns all the isomorph 'mappings' found between two atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the list of all the 'mappings' @throws CDKException
[ "Returns", "all", "the", "isomorph", "mappings", "found", "between", "two", "atom", "containers", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L248-L252
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.offlineRegionAsync
public Observable<Void> offlineRegionAsync(String resourceGroupName, String accountName, String region) { """ Offline the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param re...
java
public Observable<Void> offlineRegionAsync(String resourceGroupName, String accountName, String region) { return offlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> r...
[ "public", "Observable", "<", "Void", ">", "offlineRegionAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "region", ")", "{", "return", "offlineRegionWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "...
Offline the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param region Cosmos DB region, with spaces between words and each word capitalized. @throws IllegalArgumentException thrown if ...
[ "Offline", "the", "specified", "region", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1311-L1318
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java
TypeCheckingExtension.isStaticMethodCallOnClass
public boolean isStaticMethodCallOnClass(MethodCall call, ClassNode receiver) { """ Given a method call, checks if it's a static method call and if it is, tells if the receiver matches the one supplied as an argument. @param call a method call @param receiver a class node @return true if the method call is a s...
java
public boolean isStaticMethodCallOnClass(MethodCall call, ClassNode receiver) { ClassNode staticReceiver = extractStaticReceiver(call); return staticReceiver!=null && staticReceiver.equals(receiver); }
[ "public", "boolean", "isStaticMethodCallOnClass", "(", "MethodCall", "call", ",", "ClassNode", "receiver", ")", "{", "ClassNode", "staticReceiver", "=", "extractStaticReceiver", "(", "call", ")", ";", "return", "staticReceiver", "!=", "null", "&&", "staticReceiver", ...
Given a method call, checks if it's a static method call and if it is, tells if the receiver matches the one supplied as an argument. @param call a method call @param receiver a class node @return true if the method call is a static method call on the receiver
[ "Given", "a", "method", "call", "checks", "if", "it", "s", "a", "static", "method", "call", "and", "if", "it", "is", "tells", "if", "the", "receiver", "matches", "the", "one", "supplied", "as", "an", "argument", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java#L398-L401
alkacon/opencms-core
src/org/opencms/ui/apps/logfile/CmsLogFileView.java
CmsLogFileView.selectLogFile
private void selectLogFile(List<Appender> appender, String filePath) { """ Selects the currently set log file.<p> @param appender all given appender @param filePath of log file """ for (Appender app : appender) { String fileName = CmsLogFileApp.getFileName(app); if ((fileN...
java
private void selectLogFile(List<Appender> appender, String filePath) { for (Appender app : appender) { String fileName = CmsLogFileApp.getFileName(app); if ((fileName != null) && fileName.equals(filePath)) { m_logfile.select(fileName); return; ...
[ "private", "void", "selectLogFile", "(", "List", "<", "Appender", ">", "appender", ",", "String", "filePath", ")", "{", "for", "(", "Appender", "app", ":", "appender", ")", "{", "String", "fileName", "=", "CmsLogFileApp", ".", "getFileName", "(", "app", ")...
Selects the currently set log file.<p> @param appender all given appender @param filePath of log file
[ "Selects", "the", "currently", "set", "log", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/logfile/CmsLogFileView.java#L237-L254
threerings/nenya
core/src/main/java/com/threerings/util/KeyboardManager.java
KeyboardManager.notifyObservers
protected synchronized void notifyObservers (int id, int keyCode, long timestamp) { """ Notifies all registered key observers of the supplied key event. This method provides a thread-safe manner in which to notify the observers, which is necessary since the {@link KeyInfo} objects do various antics from the inte...
java
protected synchronized void notifyObservers (int id, int keyCode, long timestamp) { _keyOp.init(id, keyCode, timestamp); _observers.apply(_keyOp); }
[ "protected", "synchronized", "void", "notifyObservers", "(", "int", "id", ",", "int", "keyCode", ",", "long", "timestamp", ")", "{", "_keyOp", ".", "init", "(", "id", ",", "keyCode", ",", "timestamp", ")", ";", "_observers", ".", "apply", "(", "_keyOp", ...
Notifies all registered key observers of the supplied key event. This method provides a thread-safe manner in which to notify the observers, which is necessary since the {@link KeyInfo} objects do various antics from the interval manager thread whilst we may do other notification from the AWT thread when normal key eve...
[ "Notifies", "all", "registered", "key", "observers", "of", "the", "supplied", "key", "event", ".", "This", "method", "provides", "a", "thread", "-", "safe", "manner", "in", "which", "to", "notify", "the", "observers", "which", "is", "necessary", "since", "th...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyboardManager.java#L384-L388
killbill/killbill
subscription/src/main/java/org/killbill/billing/subscription/alignment/PlanAligner.java
PlanAligner.getCurrentTimedPhaseOnChange
public TimedPhase getCurrentTimedPhaseOnChange(final DefaultSubscriptionBase subscription, final Plan plan, final DateTime effectiveDate, final PhaseType newPlanInitia...
java
public TimedPhase getCurrentTimedPhaseOnChange(final DefaultSubscriptionBase subscription, final Plan plan, final DateTime effectiveDate, final PhaseType newPlanInitia...
[ "public", "TimedPhase", "getCurrentTimedPhaseOnChange", "(", "final", "DefaultSubscriptionBase", "subscription", ",", "final", "Plan", "plan", ",", "final", "DateTime", "effectiveDate", ",", "final", "PhaseType", "newPlanInitialPhaseType", ",", "final", "Catalog", "catalo...
Returns current Phase for that Plan change @param subscription the subscription in change (only start date, bundle start date, current phase, plan and pricelist are looked at) @param plan the current Plan @param effectiveDate the effective change date (driven by the catalog poli...
[ "Returns", "current", "Phase", "for", "that", "Plan", "change" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/subscription/src/main/java/org/killbill/billing/subscription/alignment/PlanAligner.java#L113-L121
henkexbg/gallery-api
src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java
GalleryController.getImage
@RequestMapping(value = "/image/ { """ Requests an image with the given {@link ImageFormat}. @param request Spring request @param servletRequest Servlet request @param imageFormatCode Image format. @return The image as a stream with the appropriate response headers set or a not-modified response, (see ...
java
@RequestMapping(value = "/image/{imageFormat}/**", method = RequestMethod.GET) public ResponseEntity<InputStreamResource> getImage(WebRequest request, HttpServletRequest servletRequest, @PathVariable(value = "imageFormat") String imageFormatCode) throws IOExce...
[ "@", "RequestMapping", "(", "value", "=", "\"/image/{imageFormat}/**\"", ",", "method", "=", "RequestMethod", ".", "GET", ")", "public", "ResponseEntity", "<", "InputStreamResource", ">", "getImage", "(", "WebRequest", "request", ",", "HttpServletRequest", "servletReq...
Requests an image with the given {@link ImageFormat}. @param request Spring request @param servletRequest Servlet request @param imageFormatCode Image format. @return The image as a stream with the appropriate response headers set or a not-modified response, (see {@link #returnResource(WebRequest, GalleryFile)}). @th...
[ "Requests", "an", "image", "with", "the", "given", "{", "@link", "ImageFormat", "}", "." ]
train
https://github.com/henkexbg/gallery-api/blob/530e68c225b5e8fc3b608d670b34bd539a5b0a71/src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java#L182-L204
classgraph/classgraph
src/main/java/io/github/classgraph/ClassInfo.java
ClassInfo.getAllClasses
static ClassInfoList getAllClasses(final Collection<ClassInfo> classes, final ScanSpec scanSpec) { """ Get all classes found during the scan. @param classes the classes @param scanSpec the scan spec @return A list of all classes found during the scan, or the empty list if none. """ return new Cl...
java
static ClassInfoList getAllClasses(final Collection<ClassInfo> classes, final ScanSpec scanSpec) { return new ClassInfoList( ClassInfo.filterClassInfo(classes, scanSpec, /* strictWhitelist = */ true, ClassType.ALL), /* sortByName = */ true); }
[ "static", "ClassInfoList", "getAllClasses", "(", "final", "Collection", "<", "ClassInfo", ">", "classes", ",", "final", "ScanSpec", "scanSpec", ")", "{", "return", "new", "ClassInfoList", "(", "ClassInfo", ".", "filterClassInfo", "(", "classes", ",", "scanSpec", ...
Get all classes found during the scan. @param classes the classes @param scanSpec the scan spec @return A list of all classes found during the scan, or the empty list if none.
[ "Get", "all", "classes", "found", "during", "the", "scan", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L825-L829
mangstadt/biweekly
src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java
ICalPropertyScribe._writeJson
protected JCalValue _writeJson(T property, WriteContext context) { """ <p> Marshals a property's value to a JSON data stream (jCal). </p> <p> This method should be overridden by child classes that wish to support jCal. The default implementation of this method will create a jCard property that has a single J...
java
protected JCalValue _writeJson(T property, WriteContext context) { String value = writeText(property, context); return JCalValue.single(value); }
[ "protected", "JCalValue", "_writeJson", "(", "T", "property", ",", "WriteContext", "context", ")", "{", "String", "value", "=", "writeText", "(", "property", ",", "context", ")", ";", "return", "JCalValue", ".", "single", "(", "value", ")", ";", "}" ]
<p> Marshals a property's value to a JSON data stream (jCal). </p> <p> This method should be overridden by child classes that wish to support jCal. The default implementation of this method will create a jCard property that has a single JSON string value (generated by the {@link #writeText} method). </p> @param propert...
[ "<p", ">", "Marshals", "a", "property", "s", "value", "to", "a", "JSON", "data", "stream", "(", "jCal", ")", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "should", "be", "overridden", "by", "child", "classes", "that", "wish", "to", "support"...
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java#L394-L397
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildPackageHeader
public void buildPackageHeader(XMLNode node, Content packageSerializedTree) { """ Build the package header. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added """ packageSerializedTree.addContent...
java
public void buildPackageHeader(XMLNode node, Content packageSerializedTree) { packageSerializedTree.addContent(writer.getPackageHeader( utils.getPackageName(currentPackage))); }
[ "public", "void", "buildPackageHeader", "(", "XMLNode", "node", ",", "Content", "packageSerializedTree", ")", "{", "packageSerializedTree", ".", "addContent", "(", "writer", ".", "getPackageHeader", "(", "utils", ".", "getPackageName", "(", "currentPackage", ")", ")...
Build the package header. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added
[ "Build", "the", "package", "header", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java#L203-L206
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/data/SerialArrayList.java
SerialArrayList.putAll
public synchronized void putAll(Collection<U> data, int startIndex) { """ Put all. @param data the data @param startIndex the start index """ putAll(new SerialArrayList<U>(factory, data), startIndex); }
java
public synchronized void putAll(Collection<U> data, int startIndex) { putAll(new SerialArrayList<U>(factory, data), startIndex); }
[ "public", "synchronized", "void", "putAll", "(", "Collection", "<", "U", ">", "data", ",", "int", "startIndex", ")", "{", "putAll", "(", "new", "SerialArrayList", "<", "U", ">", "(", "factory", ",", "data", ")", ",", "startIndex", ")", ";", "}" ]
Put all. @param data the data @param startIndex the start index
[ "Put", "all", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/data/SerialArrayList.java#L229-L231