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
mcxiaoke/Android-Next
recycler/src/main/java/com/mcxiaoke/next/recycler/HeaderFooterRecyclerAdapter.java
HeaderFooterRecyclerAdapter.notifyContentItemRangeInserted
public final void notifyContentItemRangeInserted(int positionStart, int itemCount) { """ Notifies that multiple content items are inserted. @param positionStart the position. @param itemCount the item count. """ int newHeaderItemCount = getHeaderItemCount(); int newContentItemCount = ge...
java
public final void notifyContentItemRangeInserted(int positionStart, int itemCount) { int newHeaderItemCount = getHeaderItemCount(); int newContentItemCount = getContentItemCount(); if (positionStart < 0 || itemCount < 0 || positionStart + itemCount > newContentItemCount) { throw new ...
[ "public", "final", "void", "notifyContentItemRangeInserted", "(", "int", "positionStart", ",", "int", "itemCount", ")", "{", "int", "newHeaderItemCount", "=", "getHeaderItemCount", "(", ")", ";", "int", "newContentItemCount", "=", "getContentItemCount", "(", ")", ";...
Notifies that multiple content items are inserted. @param positionStart the position. @param itemCount the item count.
[ "Notifies", "that", "multiple", "content", "items", "are", "inserted", "." ]
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/recycler/src/main/java/com/mcxiaoke/next/recycler/HeaderFooterRecyclerAdapter.java#L224-L233
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getKey
public KeyBundle getKey(String vaultBaseUrl, String keyName, String keyVersion) { """ Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission. ...
java
public KeyBundle getKey(String vaultBaseUrl, String keyName, String keyVersion) { return getKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion).toBlocking().single().body(); }
[ "public", "KeyBundle", "getKey", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ")", "{", "return", "getKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ",", "keyVersion", ")", ".", "toBlocking", "(", ")", ...
Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. This operation requires the keys/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param keyNa...
[ "Gets", "the", "public", "part", "of", "a", "stored", "key", ".", "The", "get", "key", "operation", "is", "applicable", "to", "all", "key", "types", ".", "If", "the", "requested", "key", "is", "symmetric", "then", "no", "key", "material", "is", "released...
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#L1385-L1387
alkacon/opencms-core
src/org/opencms/search/solr/CmsSolrIndex.java
CmsSolrIndex.gallerySearch
public CmsGallerySearchResultList gallerySearch(CmsObject cms, CmsGallerySearchParameters params) { """ Performs a search with according to the gallery search parameters.<p> @param cms the cms context @param params the search parameters @return the search result """ CmsGallerySearchResultList...
java
public CmsGallerySearchResultList gallerySearch(CmsObject cms, CmsGallerySearchParameters params) { CmsGallerySearchResultList resultList = new CmsGallerySearchResultList(); try { CmsSolrResultList list = search( cms, params.getQuery(cms), ...
[ "public", "CmsGallerySearchResultList", "gallerySearch", "(", "CmsObject", "cms", ",", "CmsGallerySearchParameters", "params", ")", "{", "CmsGallerySearchResultList", "resultList", "=", "new", "CmsGallerySearchResultList", "(", ")", ";", "try", "{", "CmsSolrResultList", "...
Performs a search with according to the gallery search parameters.<p> @param cms the cms context @param params the search parameters @return the search result
[ "Performs", "a", "search", "with", "according", "to", "the", "gallery", "search", "parameters", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrIndex.java#L457-L492
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java
GobblinMetrics.startMetricReportingWithFileSuffix
public void startMetricReportingWithFileSuffix(State state, String metricsFileSuffix) { """ Starts metric reporting and appends the given metrics file suffix to the current value of {@link ConfigurationKeys#METRICS_FILE_SUFFIX}. """ Properties metricsReportingProps = new Properties(); metricsReporting...
java
public void startMetricReportingWithFileSuffix(State state, String metricsFileSuffix) { Properties metricsReportingProps = new Properties(); metricsReportingProps.putAll(state.getProperties()); String oldMetricsFileSuffix = state.getProp(ConfigurationKeys.METRICS_FILE_SUFFIX, ConfigurationKeys.DEFA...
[ "public", "void", "startMetricReportingWithFileSuffix", "(", "State", "state", ",", "String", "metricsFileSuffix", ")", "{", "Properties", "metricsReportingProps", "=", "new", "Properties", "(", ")", ";", "metricsReportingProps", ".", "putAll", "(", "state", ".", "g...
Starts metric reporting and appends the given metrics file suffix to the current value of {@link ConfigurationKeys#METRICS_FILE_SUFFIX}.
[ "Starts", "metric", "reporting", "and", "appends", "the", "given", "metrics", "file", "suffix", "to", "the", "current", "value", "of", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java#L353-L366
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/stats/VariantAggregatedExacStatsCalculator.java
VariantAggregatedExacStatsCalculator.addReferenceGenotype
private static void addReferenceGenotype(Variant variant, VariantStats stats, int alleleNumber) { """ Infers the 0/0 genotype count, given that: sum(Heterozygous) + sum(Homozygous) + sum(Reference) = alleleNumber/2 @param variant to retrieve the alleles to construct the genotype @param stats where to add the 0/0...
java
private static void addReferenceGenotype(Variant variant, VariantStats stats, int alleleNumber) { int gtSum = 0; for (Integer gtCounts : stats.getGenotypeCount().values()) { gtSum += gtCounts; } Genotype genotype = new Genotype("0/0", variant.getReference(), variant.getAltern...
[ "private", "static", "void", "addReferenceGenotype", "(", "Variant", "variant", ",", "VariantStats", "stats", ",", "int", "alleleNumber", ")", "{", "int", "gtSum", "=", "0", ";", "for", "(", "Integer", "gtCounts", ":", "stats", ".", "getGenotypeCount", "(", ...
Infers the 0/0 genotype count, given that: sum(Heterozygous) + sum(Homozygous) + sum(Reference) = alleleNumber/2 @param variant to retrieve the alleles to construct the genotype @param stats where to add the 0/0 genotype count @param alleleNumber total sum of alleles.
[ "Infers", "the", "0", "/", "0", "genotype", "count", "given", "that", ":", "sum", "(", "Heterozygous", ")", "+", "sum", "(", "Homozygous", ")", "+", "sum", "(", "Reference", ")", "=", "alleleNumber", "/", "2" ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/stats/VariantAggregatedExacStatsCalculator.java#L195-L202
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java
WDataTable.getRowIds
private List<Integer> getRowIds(final int startIndex, final int endIndex) { """ Determine the row ids for the provided index range. @param startIndex the startIndex @param endIndex the endIndex @return the list of rowIds for the provided index range """ // If the table is sorted, we may require a mappin...
java
private List<Integer> getRowIds(final int startIndex, final int endIndex) { // If the table is sorted, we may require a mapping for table row index <--> data model index. int[] rowIndexMapping = getComponentModel().rowIndexMapping; // Check if sort mapping needs updating if (isSorted() && rowIndexMapping != nu...
[ "private", "List", "<", "Integer", ">", "getRowIds", "(", "final", "int", "startIndex", ",", "final", "int", "endIndex", ")", "{", "// If the table is sorted, we may require a mapping for table row index <--> data model index.", "int", "[", "]", "rowIndexMapping", "=", "g...
Determine the row ids for the provided index range. @param startIndex the startIndex @param endIndex the endIndex @return the list of rowIds for the provided index range
[ "Determine", "the", "row", "ids", "for", "the", "provided", "index", "range", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java#L1536-L1560
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.getCreatorArg
static TypeMirror getCreatorArg(Elements elements, Types types, DeclaredType creatorType) { """ Returns the {@link TypeMirror} argument found in a given {@code Parcelable.Creator} type. """ TypeElement creatorElement = elements.getTypeElement(PARCELABLE_CREATOR_CLASS_NAME); TypeParameterElement param =...
java
static TypeMirror getCreatorArg(Elements elements, Types types, DeclaredType creatorType) { TypeElement creatorElement = elements.getTypeElement(PARCELABLE_CREATOR_CLASS_NAME); TypeParameterElement param = creatorElement.getTypeParameters().get(0); return paramAsMemberOf(types, creatorType, param); }
[ "static", "TypeMirror", "getCreatorArg", "(", "Elements", "elements", ",", "Types", "types", ",", "DeclaredType", "creatorType", ")", "{", "TypeElement", "creatorElement", "=", "elements", ".", "getTypeElement", "(", "PARCELABLE_CREATOR_CLASS_NAME", ")", ";", "TypePar...
Returns the {@link TypeMirror} argument found in a given {@code Parcelable.Creator} type.
[ "Returns", "the", "{" ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L239-L243
tcurdt/jdeb
src/main/java/org/vafer/jdeb/signing/PGPSigner.java
PGPSigner.getSecretKey
private PGPSecretKey getSecretKey(InputStream input, String keyId) throws IOException, PGPException { """ Returns the secret key matching the specified identifier. @param input the input stream containing the keyring collection @param keyId the 4 bytes identifier of the key """ PGPSecretKeyRingColl...
java
private PGPSecretKey getSecretKey(InputStream input, String keyId) throws IOException, PGPException { PGPSecretKeyRingCollection keyrings = new PGPSecretKeyRingCollection(PGPUtil.getDecoderStream(input), new JcaKeyFingerprintCalculator()); Iterator rIt = keyrings.getKeyRings(); while (rIt.hasN...
[ "private", "PGPSecretKey", "getSecretKey", "(", "InputStream", "input", ",", "String", "keyId", ")", "throws", "IOException", ",", "PGPException", "{", "PGPSecretKeyRingCollection", "keyrings", "=", "new", "PGPSecretKeyRingCollection", "(", "PGPUtil", ".", "getDecoderSt...
Returns the secret key matching the specified identifier. @param input the input stream containing the keyring collection @param keyId the 4 bytes identifier of the key
[ "Returns", "the", "secret", "key", "matching", "the", "specified", "identifier", "." ]
train
https://github.com/tcurdt/jdeb/blob/b899a7b1b3391356aafc491ab601f258961f67f0/src/main/java/org/vafer/jdeb/signing/PGPSigner.java#L136-L155
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java
MasterWorkerInfo.addLostStorage
public void addLostStorage(Map<String, StorageList> lostStorage) { """ Adds new worker lost storage paths. @param lostStorage the lost storage to add """ for (Map.Entry<String, StorageList> entry : lostStorage.entrySet()) { List<String> paths = mLostStorage.getOrDefault(entry.getKey(), new ArrayLi...
java
public void addLostStorage(Map<String, StorageList> lostStorage) { for (Map.Entry<String, StorageList> entry : lostStorage.entrySet()) { List<String> paths = mLostStorage.getOrDefault(entry.getKey(), new ArrayList<>()); paths.addAll(entry.getValue().getStorageList()); mLostStorage.put(entry.getKey...
[ "public", "void", "addLostStorage", "(", "Map", "<", "String", ",", "StorageList", ">", "lostStorage", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "StorageList", ">", "entry", ":", "lostStorage", ".", "entrySet", "(", ")", ")", "{", ...
Adds new worker lost storage paths. @param lostStorage the lost storage to add
[ "Adds", "new", "worker", "lost", "storage", "paths", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/block/meta/MasterWorkerInfo.java#L199-L205
alkacon/opencms-core
src/org/opencms/db/CmsExportPointDriver.java
CmsExportPointDriver.writeResource
protected void writeResource(String resourceName, String exportpoint, byte[] content) { """ Writes (if required creates) a resource with the given name to the real file system.<p> @param resourceName the root path of the resource to write @param exportpoint the name of the export point @param content the cont...
java
protected void writeResource(String resourceName, String exportpoint, byte[] content) { File file = getExportPointFile(resourceName, exportpoint); writeResource(file, content); }
[ "protected", "void", "writeResource", "(", "String", "resourceName", ",", "String", "exportpoint", ",", "byte", "[", "]", "content", ")", "{", "File", "file", "=", "getExportPointFile", "(", "resourceName", ",", "exportpoint", ")", ";", "writeResource", "(", "...
Writes (if required creates) a resource with the given name to the real file system.<p> @param resourceName the root path of the resource to write @param exportpoint the name of the export point @param content the contents of the file to write
[ "Writes", "(", "if", "required", "creates", ")", "a", "resource", "with", "the", "given", "name", "to", "the", "real", "file", "system", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsExportPointDriver.java#L227-L231
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java
SPUIComponentProvider.createCreatedByLabel
public static Label createCreatedByLabel(final VaadinMessageSource i18n, final BaseEntity baseEntity) { """ Create label which represents the {@link BaseEntity#getCreatedBy()} by user name @param i18n the i18n @param baseEntity the entity @return the label """ return createUsernameLabel(i18n.ge...
java
public static Label createCreatedByLabel(final VaadinMessageSource i18n, final BaseEntity baseEntity) { return createUsernameLabel(i18n.getMessage("label.created.by"), baseEntity == null ? "" : baseEntity.getCreatedBy()); }
[ "public", "static", "Label", "createCreatedByLabel", "(", "final", "VaadinMessageSource", "i18n", ",", "final", "BaseEntity", "baseEntity", ")", "{", "return", "createUsernameLabel", "(", "i18n", ".", "getMessage", "(", "\"label.created.by\"", ")", ",", "baseEntity", ...
Create label which represents the {@link BaseEntity#getCreatedBy()} by user name @param i18n the i18n @param baseEntity the entity @return the label
[ "Create", "label", "which", "represents", "the", "{", "@link", "BaseEntity#getCreatedBy", "()", "}", "by", "user", "name" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L233-L236
liuyukuai/commons
commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateUtil.java
LocalDateUtil.addDays
public static LocalDate addDays(String localDate, long days) { """ addDays @param localDate 时间 @param days 天数 @return localDate """ LocalDate parse = parse(localDate, DEFAULT_PATTERN); return parse.plusDays(days); }
java
public static LocalDate addDays(String localDate, long days) { LocalDate parse = parse(localDate, DEFAULT_PATTERN); return parse.plusDays(days); }
[ "public", "static", "LocalDate", "addDays", "(", "String", "localDate", ",", "long", "days", ")", "{", "LocalDate", "parse", "=", "parse", "(", "localDate", ",", "DEFAULT_PATTERN", ")", ";", "return", "parse", ".", "plusDays", "(", "days", ")", ";", "}" ]
addDays @param localDate 时间 @param days 天数 @return localDate
[ "addDays" ]
train
https://github.com/liuyukuai/commons/blob/ba67eddb542446b12f419f1866dbaa82e47fbf35/commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateUtil.java#L95-L98
cycorp/api-suite
core-api/src/main/java/com/cyc/session/exception/SessionException.java
SessionException.fromThrowable
public static SessionException fromThrowable(String message, Throwable cause) { """ Converts a Throwable to a SessionException with the specified detail message. If the Throwable is a SessionException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified...
java
public static SessionException fromThrowable(String message, Throwable cause) { return (cause instanceof SessionException && Objects.equals(message, cause.getMessage())) ? (SessionException) cause : new SessionException(message, cause); }
[ "public", "static", "SessionException", "fromThrowable", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "(", "cause", "instanceof", "SessionException", "&&", "Objects", ".", "equals", "(", "message", ",", "cause", ".", "getMessage", "("...
Converts a Throwable to a SessionException with the specified detail message. If the Throwable is a SessionException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in a new SessionException with the detail message. @param ...
[ "Converts", "a", "Throwable", "to", "a", "SessionException", "with", "the", "specified", "detail", "message", ".", "If", "the", "Throwable", "is", "a", "SessionException", "and", "if", "the", "Throwable", "s", "message", "is", "identical", "to", "the", "one", ...
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/session/exception/SessionException.java#L65-L69
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/av/FFmpegMuxer.java
FFmpegMuxer.addAdtsToPacket
private void addAdtsToPacket(byte[] packet, int packetLen) { """ Add ADTS header at the beginning of each and every AAC packet. This is needed as MediaCodec encoder generates a packet of raw AAC data. <p/> Note the packetLen must count in the ADTS header itself. See: http://wiki.multimedia.cx/index.php?title=...
java
private void addAdtsToPacket(byte[] packet, int packetLen) { packet[0] = (byte) 0xFF; // 11111111 = syncword packet[1] = (byte) 0xF9; // 1111 1 00 1 = syncword MPEG-2 Layer CRC packet[2] = (byte) (((profile - 1) << 6) + (freqIdx << 2) + (chanCfg >> 2)); packe...
[ "private", "void", "addAdtsToPacket", "(", "byte", "[", "]", "packet", ",", "int", "packetLen", ")", "{", "packet", "[", "0", "]", "=", "(", "byte", ")", "0xFF", ";", "// 11111111 = syncword", "packet", "[", "1", "]", "=", "(", "byte", ")", "0...
Add ADTS header at the beginning of each and every AAC packet. This is needed as MediaCodec encoder generates a packet of raw AAC data. <p/> Note the packetLen must count in the ADTS header itself. See: http://wiki.multimedia.cx/index.php?title=ADTS Also: http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Channel_C...
[ "Add", "ADTS", "header", "at", "the", "beginning", "of", "each", "and", "every", "AAC", "packet", ".", "This", "is", "needed", "as", "MediaCodec", "encoder", "generates", "a", "packet", "of", "raw", "AAC", "data", ".", "<p", "/", ">", "Note", "the", "p...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/av/FFmpegMuxer.java#L344-L352
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_ipCountryAvailable_GET
public ArrayList<OvhIpCountryEnum> serviceName_ipCountryAvailable_GET(String serviceName) throws IOException { """ Retrieve available country for IP order REST: GET /dedicated/server/{serviceName}/ipCountryAvailable @param serviceName [required] The internal name of your dedicated server """ String qPath...
java
public ArrayList<OvhIpCountryEnum> serviceName_ipCountryAvailable_GET(String serviceName) throws IOException { String qPath = "/dedicated/server/{serviceName}/ipCountryAvailable"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t14); }
[ "public", "ArrayList", "<", "OvhIpCountryEnum", ">", "serviceName_ipCountryAvailable_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/ipCountryAvailable\"", ";", "StringBuilder", "sb", "=", "pa...
Retrieve available country for IP order REST: GET /dedicated/server/{serviceName}/ipCountryAvailable @param serviceName [required] The internal name of your dedicated server
[ "Retrieve", "available", "country", "for", "IP", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1857-L1862
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/FastaWriterHelper.java
FastaWriterHelper.writeSequence
public static void writeSequence(File file, Sequence<?> sequence) throws Exception { """ Write a sequence to a file @param file @param sequence @throws Exception """ FileOutputStream outputStream = new FileOutputStream(file); BufferedOutputStream bo = new BufferedOutputStream(outputStream); writeSeque...
java
public static void writeSequence(File file, Sequence<?> sequence) throws Exception { FileOutputStream outputStream = new FileOutputStream(file); BufferedOutputStream bo = new BufferedOutputStream(outputStream); writeSequences(bo, singleSeqToCollection(sequence)); bo.close(); outputStream.close(); }
[ "public", "static", "void", "writeSequence", "(", "File", "file", ",", "Sequence", "<", "?", ">", "sequence", ")", "throws", "Exception", "{", "FileOutputStream", "outputStream", "=", "new", "FileOutputStream", "(", "file", ")", ";", "BufferedOutputStream", "bo"...
Write a sequence to a file @param file @param sequence @throws Exception
[ "Write", "a", "sequence", "to", "a", "file" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/FastaWriterHelper.java#L148-L154
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java
ServiceTaskBase.checkProgressRatio
@Override public boolean checkProgressRatio(final double newWorkDone, final double totalWork, final double amountThreshold) { """ Check if the task has enough progressed according to the given threshold. This method can be called outside the JAT, it's useful to filter useless call to JAT @param newWorkDo...
java
@Override public boolean checkProgressRatio(final double newWorkDone, final double totalWork, final double amountThreshold) { double currentRatio; synchronized (this) { // Compute the actual progression currentRatio = this.localWorkDone >= 0 ? 100 * this.localWorkDone / tota...
[ "@", "Override", "public", "boolean", "checkProgressRatio", "(", "final", "double", "newWorkDone", ",", "final", "double", "totalWork", ",", "final", "double", "amountThreshold", ")", "{", "double", "currentRatio", ";", "synchronized", "(", "this", ")", "{", "//...
Check if the task has enough progressed according to the given threshold. This method can be called outside the JAT, it's useful to filter useless call to JAT @param newWorkDone the amount of work done @param totalWork the total amount of work @param amountThreshold the minimum threshold amount to return true; range ...
[ "Check", "if", "the", "task", "has", "enough", "progressed", "according", "to", "the", "given", "threshold", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L367-L381
OpenTSDB/opentsdb
src/tools/UidManager.java
UidManager.extactLookupId
private static int extactLookupId(final HBaseClient client, final byte[] table, final short idwidth, final String kind, final byte[] id) { """ Looks up an ID for a given k...
java
private static int extactLookupId(final HBaseClient client, final byte[] table, final short idwidth, final String kind, final byte[] id) { final UniqueId uid = new UniqueId...
[ "private", "static", "int", "extactLookupId", "(", "final", "HBaseClient", "client", ",", "final", "byte", "[", "]", "table", ",", "final", "short", "idwidth", ",", "final", "String", "kind", ",", "final", "byte", "[", "]", "id", ")", "{", "final", "Uniq...
Looks up an ID for a given kind, and prints it if found. @param client The HBase client to use. @param table The name of the HBase table to use. @param idwidth Number of bytes on which the UIDs should be. @param kind The 'kind' of the ID (must not be {@code null}). @param id The ID to look for. @return 0 if the ID for ...
[ "Looks", "up", "an", "ID", "for", "a", "given", "kind", "and", "prints", "it", "if", "found", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tools/UidManager.java#L891-L905
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.regenerateAccessKey
public void regenerateAccessKey(String resourceGroupName, String workflowName) { """ Regenerates the callback URL access key for request triggers. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation ...
java
public void regenerateAccessKey(String resourceGroupName, String workflowName) { regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); }
[ "public", "void", "regenerateAccessKey", "(", "String", "resourceGroupName", ",", "String", "workflowName", ")", "{", "regenerateAccessKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "workflowName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")...
Regenerates the callback URL access key for request triggers. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException al...
[ "Regenerates", "the", "callback", "URL", "access", "key", "for", "request", "triggers", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L1585-L1587
twilio/twilio-java
src/main/java/com/twilio/http/Response.java
Response.getStream
public InputStream getStream() { """ Get response data as stream. @return the response data as a stream """ if (stream != null) { return stream; } try { return new ByteArrayInputStream(content.getBytes("utf-8")); } catch (final UnsupportedEncodingExcep...
java
public InputStream getStream() { if (stream != null) { return stream; } try { return new ByteArrayInputStream(content.getBytes("utf-8")); } catch (final UnsupportedEncodingException e) { throw new ApiException("UTF-8 encoding not supported", e); ...
[ "public", "InputStream", "getStream", "(", ")", "{", "if", "(", "stream", "!=", "null", ")", "{", "return", "stream", ";", "}", "try", "{", "return", "new", "ByteArrayInputStream", "(", "content", ".", "getBytes", "(", "\"utf-8\"", ")", ")", ";", "}", ...
Get response data as stream. @return the response data as a stream
[ "Get", "response", "data", "as", "stream", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/http/Response.java#L77-L86
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.executorShutDown
public static void executorShutDown(ExecutorService executorService, long timeOutSec) { """ Wait to shutdown service @param executorService Executor service to shutdown @param timeOutSec Time we wait for """ try { executorService.shutdown(); executorService.awaitTermination(...
java
public static void executorShutDown(ExecutorService executorService, long timeOutSec) { try { executorService.shutdown(); executorService.awaitTermination(timeOutSec, TimeUnit.SECONDS); } catch(Exception e) { logger.warn("Error while stoping executor service.", e); ...
[ "public", "static", "void", "executorShutDown", "(", "ExecutorService", "executorService", ",", "long", "timeOutSec", ")", "{", "try", "{", "executorService", ".", "shutdown", "(", ")", ";", "executorService", ".", "awaitTermination", "(", "timeOutSec", ",", "Time...
Wait to shutdown service @param executorService Executor service to shutdown @param timeOutSec Time we wait for
[ "Wait", "to", "shutdown", "service" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L704-L711
stackify/stackify-api-java
src/main/java/com/stackify/api/common/lang/Throwables.java
Throwables.toErrorItem
public static ErrorItem toErrorItem(final String logMessage, final Throwable t) { """ Converts a Throwable to an ErrorItem @param logMessage The log message (can be null) @param t The Throwable to be converted @return The ErrorItem """ // get a flat list of the throwable and the causal chain List<...
java
public static ErrorItem toErrorItem(final String logMessage, final Throwable t) { // get a flat list of the throwable and the causal chain List<Throwable> throwables = Throwables.getCausalChain(t); // create and populate builders for all throwables List<ErrorItem.Builder> builders = new ArrayList<Erro...
[ "public", "static", "ErrorItem", "toErrorItem", "(", "final", "String", "logMessage", ",", "final", "Throwable", "t", ")", "{", "// get a flat list of the throwable and the causal chain", "List", "<", "Throwable", ">", "throwables", "=", "Throwables", ".", "getCausalCha...
Converts a Throwable to an ErrorItem @param logMessage The log message (can be null) @param t The Throwable to be converted @return The ErrorItem
[ "Converts", "a", "Throwable", "to", "an", "ErrorItem" ]
train
https://github.com/stackify/stackify-api-java/blob/d3000b7c87ed53a88b302939b0c88405d63d7b67/src/main/java/com/stackify/api/common/lang/Throwables.java#L60-L92
elki-project/elki
addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java
XSplitter.getRatioOfDataInIntersectionVolume
public double getRatioOfDataInIntersectionVolume(List<SpatialEntry>[] split, HyperBoundingBox[] mbrs) { """ Get the ratio of data objects in the intersection volume (weighted overlap). @param split two entry lists representing the given split @param mbrs the MBRs for the given split @return the ration of dat...
java
public double getRatioOfDataInIntersectionVolume(List<SpatialEntry>[] split, HyperBoundingBox[] mbrs) { final ModifiableHyperBoundingBox xMBR = SpatialUtil.intersection(mbrs[0], mbrs[1]); if(xMBR == null) { return 0.; } // Total number of entries, intersecting entries int[] numOf = { 0, 0 }; ...
[ "public", "double", "getRatioOfDataInIntersectionVolume", "(", "List", "<", "SpatialEntry", ">", "[", "]", "split", ",", "HyperBoundingBox", "[", "]", "mbrs", ")", "{", "final", "ModifiableHyperBoundingBox", "xMBR", "=", "SpatialUtil", ".", "intersection", "(", "m...
Get the ratio of data objects in the intersection volume (weighted overlap). @param split two entry lists representing the given split @param mbrs the MBRs for the given split @return the ration of data objects in the intersection volume as value between 0 and 1
[ "Get", "the", "ratio", "of", "data", "objects", "in", "the", "intersection", "volume", "(", "weighted", "overlap", ")", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L742-L753
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java
InnerClassAccessMap.getInnerClassAccess
public InnerClassAccess getInnerClassAccess(String className, String methodName) throws ClassNotFoundException { """ Get the InnerClassAccess in given class with the given method name. @param className the name of the class @param methodName the name of the access method @return the InnerClassAccess object ...
java
public InnerClassAccess getInnerClassAccess(String className, String methodName) throws ClassNotFoundException { Map<String, InnerClassAccess> map = getAccessMapForClass(className); return map.get(methodName); }
[ "public", "InnerClassAccess", "getInnerClassAccess", "(", "String", "className", ",", "String", "methodName", ")", "throws", "ClassNotFoundException", "{", "Map", "<", "String", ",", "InnerClassAccess", ">", "map", "=", "getAccessMapForClass", "(", "className", ")", ...
Get the InnerClassAccess in given class with the given method name. @param className the name of the class @param methodName the name of the access method @return the InnerClassAccess object for the method, or null if the method doesn't seem to be an inner class access
[ "Get", "the", "InnerClassAccess", "in", "given", "class", "with", "the", "given", "method", "name", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java#L93-L96
martint/jmxutils
src/main/java/org/weakref/jmx/ObjectNames.java
ObjectNames.generatedNameOf
public static String generatedNameOf(Class<?> clazz, Class<? extends Annotation> annotationClass) { """ Produce a generated JMX object name. @return JMX object name of the form "[package_name]:type=[class_name],name=[ann_class_name]" """ return builder(clazz, annotationClass).build(); }
java
public static String generatedNameOf(Class<?> clazz, Class<? extends Annotation> annotationClass) { return builder(clazz, annotationClass).build(); }
[ "public", "static", "String", "generatedNameOf", "(", "Class", "<", "?", ">", "clazz", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClass", ")", "{", "return", "builder", "(", "clazz", ",", "annotationClass", ")", ".", "build", "(", ")"...
Produce a generated JMX object name. @return JMX object name of the form "[package_name]:type=[class_name],name=[ann_class_name]"
[ "Produce", "a", "generated", "JMX", "object", "name", "." ]
train
https://github.com/martint/jmxutils/blob/f2770ba1f3c126fb841c388d631456afd68dbf25/src/main/java/org/weakref/jmx/ObjectNames.java#L39-L42
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/SyncSupervisorEvent.java
SyncSupervisorEvent.getLocalAssign
private Map<Integer, LocalAssignment> getLocalAssign(StormClusterState stormClusterState, String supervisorId, Map<String, Assignment> assignments) throws Exception { """ a port must be assigned to a topology @return map: [port,LocalAssignment] """ ...
java
private Map<Integer, LocalAssignment> getLocalAssign(StormClusterState stormClusterState, String supervisorId, Map<String, Assignment> assignments) throws Exception { Map<Integer, LocalAssignment> portToAssignment = new HashMap<>(); for (Entry<Str...
[ "private", "Map", "<", "Integer", ",", "LocalAssignment", ">", "getLocalAssign", "(", "StormClusterState", "stormClusterState", ",", "String", "supervisorId", ",", "Map", "<", "String", ",", "Assignment", ">", "assignments", ")", "throws", "Exception", "{", "Map",...
a port must be assigned to a topology @return map: [port,LocalAssignment]
[ "a", "port", "must", "be", "assigned", "to", "a", "topology" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/SyncSupervisorEvent.java#L223-L248
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/propagation/BinaryFormat.java
BinaryFormat.fromByteArray
public SpanContext fromByteArray(byte[] bytes) throws SpanContextParseException { """ Parses the {@link SpanContext} from a byte array using the binary format. @param bytes a binary encoded buffer from which the {@code SpanContext} will be parsed. @return the parsed {@code SpanContext}. @throws NullPointerExc...
java
public SpanContext fromByteArray(byte[] bytes) throws SpanContextParseException { // Implementation must override this method. If it doesn't, the below will StackOverflowError. try { return fromBinaryValue(bytes); } catch (ParseException e) { throw new SpanContextParseException("Error while pars...
[ "public", "SpanContext", "fromByteArray", "(", "byte", "[", "]", "bytes", ")", "throws", "SpanContextParseException", "{", "// Implementation must override this method. If it doesn't, the below will StackOverflowError.", "try", "{", "return", "fromBinaryValue", "(", "bytes", ")...
Parses the {@link SpanContext} from a byte array using the binary format. @param bytes a binary encoded buffer from which the {@code SpanContext} will be parsed. @return the parsed {@code SpanContext}. @throws NullPointerException if the {@code input} is {@code null}. @throws SpanContextParseException if the version i...
[ "Parses", "the", "{", "@link", "SpanContext", "}", "from", "a", "byte", "array", "using", "the", "binary", "format", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/propagation/BinaryFormat.java#L123-L130
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsPreviewDialog.java
CmsPreviewDialog.createPreviewDialog
public static CmsPreviewDialog createPreviewDialog(CmsPreviewInfo previewInfo) { """ Creates a new preview dialog instance.<p> @param previewInfo the preview information @return the new preview dialog instance """ String caption = generateCaption(previewInfo); CmsPreviewDialog dialog ...
java
public static CmsPreviewDialog createPreviewDialog(CmsPreviewInfo previewInfo) { String caption = generateCaption(previewInfo); CmsPreviewDialog dialog = new CmsPreviewDialog(caption, DIALOG_WIDTH + 12); dialog.initContent(previewInfo); dialog.initLocales(previewInfo); ret...
[ "public", "static", "CmsPreviewDialog", "createPreviewDialog", "(", "CmsPreviewInfo", "previewInfo", ")", "{", "String", "caption", "=", "generateCaption", "(", "previewInfo", ")", ";", "CmsPreviewDialog", "dialog", "=", "new", "CmsPreviewDialog", "(", "caption", ",",...
Creates a new preview dialog instance.<p> @param previewInfo the preview information @return the new preview dialog instance
[ "Creates", "a", "new", "preview", "dialog", "instance", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsPreviewDialog.java#L127-L134
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.from
public static Signature from(Class<?> retval, Class<?>[] argTypes, String... argNames) { """ Create a new signature based on the given return value, argument types, and argument names @param retval the type of the return value @param argTypes the types of the arguments @param argNames the names of the argumen...
java
public static Signature from(Class<?> retval, Class<?>[] argTypes, String... argNames) { assert argTypes.length == argNames.length; return new Signature(retval, argTypes, argNames); }
[ "public", "static", "Signature", "from", "(", "Class", "<", "?", ">", "retval", ",", "Class", "<", "?", ">", "[", "]", "argTypes", ",", "String", "...", "argNames", ")", "{", "assert", "argTypes", ".", "length", "==", "argNames", ".", "length", ";", ...
Create a new signature based on the given return value, argument types, and argument names @param retval the type of the return value @param argTypes the types of the arguments @param argNames the names of the arguments @return a new Signature
[ "Create", "a", "new", "signature", "based", "on", "the", "given", "return", "value", "argument", "types", "and", "argument", "names" ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L154-L158
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java
PrivateKeyReader.readPemPrivateKey
public static PrivateKey readPemPrivateKey(final File file, final String algorithm) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { """ Reads the given {@link File}( in *.pem format) with given algorithm and returns the {@link PrivateKey} object. @param file...
java
public static PrivateKey readPemPrivateKey(final File file, final String algorithm) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { final String privateKeyAsString = readPemFileAsBase64(file); return readPemPrivateKey(privateKeyAsString, algorithm); }
[ "public", "static", "PrivateKey", "readPemPrivateKey", "(", "final", "File", "file", ",", "final", "String", "algorithm", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "final", "String...
Reads the given {@link File}( in *.pem format) with given algorithm and returns the {@link PrivateKey} object. @param file the file( in *.pem format) that contains the private key @param algorithm the algorithm @return the {@link PrivateKey} object @throws IOException Signals that an I/O exception has occurred. @thro...
[ "Reads", "the", "given", "{", "@link", "File", "}", "(", "in", "*", ".", "pem", "format", ")", "with", "given", "algorithm", "and", "returns", "the", "{", "@link", "PrivateKey", "}", "object", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java#L281-L287
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/PassThruTable.java
PassThruTable.syncRecordToBase
public void syncRecordToBase(Record recBase, Record recAlt, boolean syncSelection) { """ Sync the current record's contents and status to the base record @param syncSelection Sync selected fields? """ if ((recAlt != null) && (recBase != null)) { recBase.moveFields(recAlt, null, tru...
java
public void syncRecordToBase(Record recBase, Record recAlt, boolean syncSelection) { if ((recAlt != null) && (recBase != null)) { recBase.moveFields(recAlt, null, true, DBConstants.READ_MOVE, false, false, true, syncSelection); recBase.setEditMode(recAlt.getEditMode()); ...
[ "public", "void", "syncRecordToBase", "(", "Record", "recBase", ",", "Record", "recAlt", ",", "boolean", "syncSelection", ")", "{", "if", "(", "(", "recAlt", "!=", "null", ")", "&&", "(", "recBase", "!=", "null", ")", ")", "{", "recBase", ".", "moveField...
Sync the current record's contents and status to the base record @param syncSelection Sync selected fields?
[ "Sync", "the", "current", "record", "s", "contents", "and", "status", "to", "the", "base", "record" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/PassThruTable.java#L571-L583
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java
CommonCodeReview.checkForServiceAccount
public static boolean checkForServiceAccount(String userLdapDN, ApiSettings settings,Map<String,String> allowedUsers,String author,List<String> commitFiles,boolean isCommit,AuditReviewResponse auditReviewResponse) { """ Check if the passed in account is a Service Account or not by comparing against list of valid ...
java
public static boolean checkForServiceAccount(String userLdapDN, ApiSettings settings,Map<String,String> allowedUsers,String author,List<String> commitFiles,boolean isCommit,AuditReviewResponse auditReviewResponse) { List<String> serviceAccountOU = settings.getServiceAccountOU(); boolean isValid = false;...
[ "public", "static", "boolean", "checkForServiceAccount", "(", "String", "userLdapDN", ",", "ApiSettings", "settings", ",", "Map", "<", "String", ",", "String", ">", "allowedUsers", ",", "String", "author", ",", "List", "<", "String", ">", "commitFiles", ",", "...
Check if the passed in account is a Service Account or not by comparing against list of valid ServiceAccountOU in ApiSettings. @param userLdapDN @param settings @return
[ "Check", "if", "the", "passed", "in", "account", "is", "a", "Service", "Account", "or", "not", "by", "comparing", "against", "list", "of", "valid", "ServiceAccountOU", "in", "ApiSettings", "." ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java#L160-L182
puniverse/capsule
capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java
Jar.addEntries
public Jar addEntries(Path path, Path dirOrZip, Filter filter) throws IOException { """ Adds a directory (with all its subdirectories) or the contents of a zip/JAR to this JAR. @param path the path within the JAR where the root of the directory will be placed, or {@code null} for the JAR's root @param dirO...
java
public Jar addEntries(Path path, Path dirOrZip, Filter filter) throws IOException { if (Files.isDirectory(dirOrZip)) addDir(path, dirOrZip, filter, true); else { try (JarInputStream jis1 = newJarInputStream(Files.newInputStream(dirOrZip))) { addEntries(path, jis1,...
[ "public", "Jar", "addEntries", "(", "Path", "path", ",", "Path", "dirOrZip", ",", "Filter", "filter", ")", "throws", "IOException", "{", "if", "(", "Files", ".", "isDirectory", "(", "dirOrZip", ")", ")", "addDir", "(", "path", ",", "dirOrZip", ",", "filt...
Adds a directory (with all its subdirectories) or the contents of a zip/JAR to this JAR. @param path the path within the JAR where the root of the directory will be placed, or {@code null} for the JAR's root @param dirOrZip the directory to add as an entry or a zip/JAR file whose contents will be extracted and add...
[ "Adds", "a", "directory", "(", "with", "all", "its", "subdirectories", ")", "or", "the", "contents", "of", "a", "zip", "/", "JAR", "to", "this", "JAR", "." ]
train
https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L392-L401
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.L1_L3
@Pure public static Point2d L1_L3(double x, double y) { """ This function convert France Lambert I coordinate to France Lambert III coordinate. @param x is the coordinate in France Lambert I @param y is the coordinate in France Lambert I @return the France Lambert III coordinate. """ final Point2d ntf...
java
@Pure public static Point2d L1_L3(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_1_N, LAMBERT_1_C, LAMBERT_1_XS, LAMBERT_1_YS); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS,...
[ "@", "Pure", "public", "static", "Point2d", "L1_L3", "(", "double", "x", ",", "double", "y", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "NTFLambert_NTFLambdaPhi", "(", "x", ",", "y", ",", "LAMBERT_1_N", ",", "LAMBERT_1_C", ",", "LAMBERT_1_XS", ",", ...
This function convert France Lambert I coordinate to France Lambert III coordinate. @param x is the coordinate in France Lambert I @param y is the coordinate in France Lambert I @return the France Lambert III coordinate.
[ "This", "function", "convert", "France", "Lambert", "I", "coordinate", "to", "France", "Lambert", "III", "coordinate", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L351-L364
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnScaleTensor
public static int cudnnScaleTensor( cudnnHandle handle, cudnnTensorDescriptor yDesc, Pointer y, Pointer alpha) { """ Scale all values of a tensor by a given factor : y[i] = alpha * y[i] """ return checkResult(cudnnScaleTensorNative(handle, yDesc, y, alpha)); }
java
public static int cudnnScaleTensor( cudnnHandle handle, cudnnTensorDescriptor yDesc, Pointer y, Pointer alpha) { return checkResult(cudnnScaleTensorNative(handle, yDesc, y, alpha)); }
[ "public", "static", "int", "cudnnScaleTensor", "(", "cudnnHandle", "handle", ",", "cudnnTensorDescriptor", "yDesc", ",", "Pointer", "y", ",", "Pointer", "alpha", ")", "{", "return", "checkResult", "(", "cudnnScaleTensorNative", "(", "handle", ",", "yDesc", ",", ...
Scale all values of a tensor by a given factor : y[i] = alpha * y[i]
[ "Scale", "all", "values", "of", "a", "tensor", "by", "a", "given", "factor", ":", "y", "[", "i", "]", "=", "alpha", "*", "y", "[", "i", "]" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L706-L713
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveInternal.java
ApptentiveInternal.createInstance
static void createInstance(@NonNull Application application, @NonNull ApptentiveConfiguration configuration) { """ Create a new or return a existing thread-safe instance of the Apptentive SDK. If this or any other {@link #getInstance()} has already been called in the application's lifecycle, the App key will be ...
java
static void createInstance(@NonNull Application application, @NonNull ApptentiveConfiguration configuration) { final String apptentiveKey = configuration.getApptentiveKey(); final String apptentiveSignature = configuration.getApptentiveSignature(); final String baseURL = configuration.getBaseURL(); final boolea...
[ "static", "void", "createInstance", "(", "@", "NonNull", "Application", "application", ",", "@", "NonNull", "ApptentiveConfiguration", "configuration", ")", "{", "final", "String", "apptentiveKey", "=", "configuration", ".", "getApptentiveKey", "(", ")", ";", "final...
Create a new or return a existing thread-safe instance of the Apptentive SDK. If this or any other {@link #getInstance()} has already been called in the application's lifecycle, the App key will be ignored and the current instance will be returned. <p/> This will be called from the application's onCreate(), before any ...
[ "Create", "a", "new", "or", "return", "a", "existing", "thread", "-", "safe", "instance", "of", "the", "Apptentive", "SDK", ".", "If", "this", "or", "any", "other", "{", "@link", "#getInstance", "()", "}", "has", "already", "been", "called", "in", "the",...
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/ApptentiveInternal.java#L211-L257
flex-oss/flex-fruit
fruit-jpa/src/main/java/org/cdlflex/fruit/jpa/QueryFactory.java
QueryFactory.select
public TypedQuery<T> select(Filter filter, OrderBy orderBy) { """ Creates a new query that is the basis for the {@link JpaRepository#find(org.cdlflex.fruit.Query)} call without limit and offset. @param filter the filter @param orderBy the order by clause @return a typed query """ CriteriaQuery<T>...
java
public TypedQuery<T> select(Filter filter, OrderBy orderBy) { CriteriaQuery<T> query = cb.createQuery(getEntityClass()); Root<T> from = query.from(getEntityClass()); CriteriaMapper criteriaMapper = new CriteriaMapper(from, cb); if (orderBy != null) { query.orderBy(criteriaM...
[ "public", "TypedQuery", "<", "T", ">", "select", "(", "Filter", "filter", ",", "OrderBy", "orderBy", ")", "{", "CriteriaQuery", "<", "T", ">", "query", "=", "cb", ".", "createQuery", "(", "getEntityClass", "(", ")", ")", ";", "Root", "<", "T", ">", "...
Creates a new query that is the basis for the {@link JpaRepository#find(org.cdlflex.fruit.Query)} call without limit and offset. @param filter the filter @param orderBy the order by clause @return a typed query
[ "Creates", "a", "new", "query", "that", "is", "the", "basis", "for", "the", "{", "@link", "JpaRepository#find", "(", "org", ".", "cdlflex", ".", "fruit", ".", "Query", ")", "}", "call", "without", "limit", "and", "offset", "." ]
train
https://github.com/flex-oss/flex-fruit/blob/30d7eca5ee796b829f96c9932a95b259ca9738d9/fruit-jpa/src/main/java/org/cdlflex/fruit/jpa/QueryFactory.java#L101-L115
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/geom/GeomUtil.java
GeomUtil.rationalPoint
public static int rationalPoint(Shape shape, int p) { """ Rationalise a point in terms of a given shape @param shape The shape @param p The index of the point @return The index that is rational for the shape """ while (p < 0) { p += shape.getPointCount(); } while (p >= shape.getPointCount()) ...
java
public static int rationalPoint(Shape shape, int p) { while (p < 0) { p += shape.getPointCount(); } while (p >= shape.getPointCount()) { p -= shape.getPointCount(); } return p; }
[ "public", "static", "int", "rationalPoint", "(", "Shape", "shape", ",", "int", "p", ")", "{", "while", "(", "p", "<", "0", ")", "{", "p", "+=", "shape", ".", "getPointCount", "(", ")", ";", "}", "while", "(", "p", ">=", "shape", ".", "getPointCount...
Rationalise a point in terms of a given shape @param shape The shape @param p The index of the point @return The index that is rational for the shape
[ "Rationalise", "a", "point", "in", "terms", "of", "a", "given", "shape" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/geom/GeomUtil.java#L392-L401
mikereedell/sunrisesunsetlib-java
src/main/java/com/luckycatlabs/sunrisesunset/dto/Location.java
Location.setLocation
public void setLocation(String latitude, String longitude) { """ Sets the coordinates of the location object. @param latitude the latitude, in degrees, of this location. North latitude is positive, south negative. @param longitude the longitude, in degrees, of this location. East longitude is positive, east ...
java
public void setLocation(String latitude, String longitude) { this.latitude = new BigDecimal(latitude); this.longitude = new BigDecimal(longitude); }
[ "public", "void", "setLocation", "(", "String", "latitude", ",", "String", "longitude", ")", "{", "this", ".", "latitude", "=", "new", "BigDecimal", "(", "latitude", ")", ";", "this", ".", "longitude", "=", "new", "BigDecimal", "(", "longitude", ")", ";", ...
Sets the coordinates of the location object. @param latitude the latitude, in degrees, of this location. North latitude is positive, south negative. @param longitude the longitude, in degrees, of this location. East longitude is positive, east negative.
[ "Sets", "the", "coordinates", "of", "the", "location", "object", "." ]
train
https://github.com/mikereedell/sunrisesunsetlib-java/blob/6e6de23f1d11429eef58de2541582cbde9b85b92/src/main/java/com/luckycatlabs/sunrisesunset/dto/Location.java#L76-L79
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.callIterator
public static Object callIterator(Object obj, Context cx, Scriptable scope) { """ Given an object, get the "Symbol.iterator" element, throw a TypeError if it is not present, then call the result, (throwing a TypeError if the result is not a function), and return that result, whatever it is. """ final...
java
public static Object callIterator(Object obj, Context cx, Scriptable scope) { final Callable getIterator = ScriptRuntime.getElemFunctionAndThis(obj, SymbolKey.ITERATOR, cx, scope); final Scriptable iterable = ScriptRuntime.lastStoredScriptable(cx); return getIterator.call(cx,...
[ "public", "static", "Object", "callIterator", "(", "Object", "obj", ",", "Context", "cx", ",", "Scriptable", "scope", ")", "{", "final", "Callable", "getIterator", "=", "ScriptRuntime", ".", "getElemFunctionAndThis", "(", "obj", ",", "SymbolKey", ".", "ITERATOR"...
Given an object, get the "Symbol.iterator" element, throw a TypeError if it is not present, then call the result, (throwing a TypeError if the result is not a function), and return that result, whatever it is.
[ "Given", "an", "object", "get", "the", "Symbol", ".", "iterator", "element", "throw", "a", "TypeError", "if", "it", "is", "not", "present", "then", "call", "the", "result", "(", "throwing", "a", "TypeError", "if", "the", "result", "is", "not", "a", "func...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L2627-L2633
Jasig/uPortal
uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java
UserAccountHelper.createPassword
public void createPassword(PersonForm form, String token) { """ Similar to updateAccount, but narrowed to the password and re-tooled to work as the guest user (which is what you are, when you have a valid security token). """ final String username = form.getUsername(); // Re-validate the tok...
java
public void createPassword(PersonForm form, String token) { final String username = form.getUsername(); // Re-validate the token to prevent URL hacking if (!validateLoginToken(username, token)) { throw new RuntimeException( "Attempt to set a password for user '"...
[ "public", "void", "createPassword", "(", "PersonForm", "form", ",", "String", "token", ")", "{", "final", "String", "username", "=", "form", ".", "getUsername", "(", ")", ";", "// Re-validate the token to prevent URL hacking", "if", "(", "!", "validateLoginToken", ...
Similar to updateAccount, but narrowed to the password and re-tooled to work as the guest user (which is what you are, when you have a valid security token).
[ "Similar", "to", "updateAccount", "but", "narrowed", "to", "the", "password", "and", "re", "-", "tooled", "to", "work", "as", "the", "guest", "user", "(", "which", "is", "what", "you", "are", "when", "you", "have", "a", "valid", "security", "token", ")",...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java#L461-L493
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.evaluateVerifyCredentialsResponse
public Map<String, Object> evaluateVerifyCredentialsResponse(String responseBody) { """ Evaluate the response from the {@value TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS} endpoint. This checks the status code of the response and ensures that an email value is contained in the response. @param respons...
java
public Map<String, Object> evaluateVerifyCredentialsResponse(String responseBody) { String endpoint = TwitterConstants.TWITTER_ENDPOINT_VERIFY_CREDENTIALS; Map<String, Object> responseValues = null; try { responseValues = populateJsonResponse(responseBody); } catch (JoseExce...
[ "public", "Map", "<", "String", ",", "Object", ">", "evaluateVerifyCredentialsResponse", "(", "String", "responseBody", ")", "{", "String", "endpoint", "=", "TwitterConstants", ".", "TWITTER_ENDPOINT_VERIFY_CREDENTIALS", ";", "Map", "<", "String", ",", "Object", ">"...
Evaluate the response from the {@value TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS} endpoint. This checks the status code of the response and ensures that an email value is contained in the response. @param responseBody @return
[ "Evaluate", "the", "response", "from", "the", "{", "@value", "TwitterConstants#TWITTER_ENDPOINT_VERIFY_CREDENTIALS", "}", "endpoint", ".", "This", "checks", "the", "status", "code", "of", "the", "response", "and", "ensures", "that", "an", "email", "value", "is", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L749-L772
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java
JMElasticsearchIndex.sendData
public String sendData(Map<String, ?> source, String index, String type) { """ Send data string. @param source the source @param index the index @param type the type @return the string """ return sendData(source, index, type, null).getId(); }
java
public String sendData(Map<String, ?> source, String index, String type) { return sendData(source, index, type, null).getId(); }
[ "public", "String", "sendData", "(", "Map", "<", "String", ",", "?", ">", "source", ",", "String", "index", ",", "String", "type", ")", "{", "return", "sendData", "(", "source", ",", "index", ",", "type", ",", "null", ")", ".", "getId", "(", ")", "...
Send data string. @param source the source @param index the index @param type the type @return the string
[ "Send", "data", "string", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L221-L224
payneteasy/superfly
superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java
CommonsHttpInvokerRequestExecutor.doExecuteRequest
@Override protected RemoteInvocationResult doExecuteRequest( HttpInvokerClientConfiguration config, ByteArrayOutputStream baos) throws IOException, ClassNotFoundException { """ Execute the given request through Commons HttpClient. <p>This method implements the basic processing workflow...
java
@Override protected RemoteInvocationResult doExecuteRequest( HttpInvokerClientConfiguration config, ByteArrayOutputStream baos) throws IOException, ClassNotFoundException { PostMethod postMethod = createPostMethod(config); try { setRequestBody(config, postMethod,...
[ "@", "Override", "protected", "RemoteInvocationResult", "doExecuteRequest", "(", "HttpInvokerClientConfiguration", "config", ",", "ByteArrayOutputStream", "baos", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "PostMethod", "postMethod", "=", "createPostMet...
Execute the given request through Commons HttpClient. <p>This method implements the basic processing workflow: The actual work happens in this class's template methods. @see #createPostMethod @see #setRequestBody @see #executePostMethod @see #validateResponse @see #getResponseBody
[ "Execute", "the", "given", "request", "through", "Commons", "HttpClient", ".", "<p", ">", "This", "method", "implements", "the", "basic", "processing", "workflow", ":", "The", "actual", "work", "happens", "in", "this", "class", "s", "template", "methods", "." ...
train
https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-demo/src/main/java/com/payneteasy/superfly/demo/web/utils/CommonsHttpInvokerRequestExecutor.java#L118-L135
DDTH/ddth-tsc
ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java
CassandraCounter._getRow
private Map<Long, DataPoint> _getRow(String counterName, int yyyymm, int dd) { """ Gets all data points of a day. @param counterName @param yyyymm @param dd @return @since 0.3.1.1 """ Map<Long, DataPoint> result = new HashMap<Long, DataPoint>(); ResultSet rs = CqlUtils.execute(sessionHe...
java
private Map<Long, DataPoint> _getRow(String counterName, int yyyymm, int dd) { Map<Long, DataPoint> result = new HashMap<Long, DataPoint>(); ResultSet rs = CqlUtils.execute(sessionHelper.getSession(), cqlGetRow, getConsistencyLevelForRead(), counterName, yyyymm, dd); for (Iterat...
[ "private", "Map", "<", "Long", ",", "DataPoint", ">", "_getRow", "(", "String", "counterName", ",", "int", "yyyymm", ",", "int", "dd", ")", "{", "Map", "<", "Long", ",", "DataPoint", ">", "result", "=", "new", "HashMap", "<", "Long", ",", "DataPoint", ...
Gets all data points of a day. @param counterName @param yyyymm @param dd @return @since 0.3.1.1
[ "Gets", "all", "data", "points", "of", "a", "day", "." ]
train
https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/CassandraCounter.java#L278-L292
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/CannyEdge.java
CannyEdge.process
public void process(T input , float threshLow, float threshHigh , GrayU8 output ) { """ <p> Runs a canny edge detector on the input image given the provided thresholds. If configured to save a list of trace points then the output image is optional. </p> <p> NOTE: Input and output can be the same instance, if...
java
public void process(T input , float threshLow, float threshHigh , GrayU8 output ) { if( threshLow < 0 || threshHigh < 0 ) throw new IllegalArgumentException("Threshold must be >= zero!"); if( hysteresisMark != null ) { if( output == null ) throw new IllegalArgumentException("An output image must be spec...
[ "public", "void", "process", "(", "T", "input", ",", "float", "threshLow", ",", "float", "threshHigh", ",", "GrayU8", "output", ")", "{", "if", "(", "threshLow", "<", "0", "||", "threshHigh", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ...
<p> Runs a canny edge detector on the input image given the provided thresholds. If configured to save a list of trace points then the output image is optional. </p> <p> NOTE: Input and output can be the same instance, if the image type allows it. </p> @param input Input image. Not modified. @param threshLow Lower thr...
[ "<p", ">", "Runs", "a", "canny", "edge", "detector", "on", "the", "input", "image", "given", "the", "provided", "thresholds", ".", "If", "configured", "to", "save", "a", "list", "of", "trace", "points", "then", "the", "output", "image", "is", "optional", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/CannyEdge.java#L111-L140
upwork/java-upwork
src/com/Upwork/api/Routers/Messages.java
Messages.getRoomByOffer
public JSONObject getRoomByOffer(String company, String offerId, HashMap<String, String> params) throws JSONException { """ Get a specific room by offer ID @param company Company ID @param offerId Offer ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} ...
java
public JSONObject getRoomByOffer(String company, String offerId, HashMap<String, String> params) throws JSONException { return oClient.get("/messages/v3/" + company + "/rooms/offers/" + offerId, params); }
[ "public", "JSONObject", "getRoomByOffer", "(", "String", "company", ",", "String", "offerId", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/messages/v3/\"", "+", "com...
Get a specific room by offer ID @param company Company ID @param offerId Offer ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Get", "a", "specific", "room", "by", "offer", "ID" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Messages.java#L75-L77
pkiraly/metadata-qa-api
src/main/java/de/gwdg/metadataqa/api/util/StringDuplicationDetector.java
StringDuplicationDetector.isDuplicated
public static boolean isDuplicated(final String input) { """ Checks if the string is a duplication is a substring. @param input The input string @return True is the string is a duplication. """ int len = input.length(); if (len % 2 == 0) { int half = len / 2; if (hasEqualParts(input, h...
java
public static boolean isDuplicated(final String input) { int len = input.length(); if (len % 2 == 0) { int half = len / 2; if (hasEqualParts(input, half, half)) { return true; } if (input.substring(half, half + 1).equals(" ") && input.substring(half - 1, half).matches("...
[ "public", "static", "boolean", "isDuplicated", "(", "final", "String", "input", ")", "{", "int", "len", "=", "input", ".", "length", "(", ")", ";", "if", "(", "len", "%", "2", "==", "0", ")", "{", "int", "half", "=", "len", "/", "2", ";", "if", ...
Checks if the string is a duplication is a substring. @param input The input string @return True is the string is a duplication.
[ "Checks", "if", "the", "string", "is", "a", "duplication", "is", "a", "substring", "." ]
train
https://github.com/pkiraly/metadata-qa-api/blob/622a69e7c1628ccf64047070817ecfaa68f15b1d/src/main/java/de/gwdg/metadataqa/api/util/StringDuplicationDetector.java#L52-L74
VoltDB/voltdb
src/frontend/org/voltdb/TheHashinator.java
TheHashinator.getPartitionForParameter
public static int getPartitionForParameter(VoltType partitionType, Object invocationParameter) { """ Given the type of the targeting partition parameter and an object, coerce the object to the correct type and hash it. NOTE NOTE NOTE NOTE! THIS SHOULD BE THE ONLY WAY THAT YOU FIGURE OUT THE PARTITIONING FOR A P...
java
public static int getPartitionForParameter(VoltType partitionType, Object invocationParameter) { return instance.get().getSecond().getHashedPartitionForParameter(partitionType, invocationParameter); }
[ "public", "static", "int", "getPartitionForParameter", "(", "VoltType", "partitionType", ",", "Object", "invocationParameter", ")", "{", "return", "instance", ".", "get", "(", ")", ".", "getSecond", "(", ")", ".", "getHashedPartitionForParameter", "(", "partitionTyp...
Given the type of the targeting partition parameter and an object, coerce the object to the correct type and hash it. NOTE NOTE NOTE NOTE! THIS SHOULD BE THE ONLY WAY THAT YOU FIGURE OUT THE PARTITIONING FOR A PARAMETER! ON SERVER @return The partition best set up to execute the procedure. @throws VoltTypeException
[ "Given", "the", "type", "of", "the", "targeting", "partition", "parameter", "and", "an", "object", "coerce", "the", "object", "to", "the", "correct", "type", "and", "hash", "it", ".", "NOTE", "NOTE", "NOTE", "NOTE!", "THIS", "SHOULD", "BE", "THE", "ONLY", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TheHashinator.java#L238-L240
javamelody/javamelody
javamelody-core/src/main/java/net/bull/javamelody/MonitoringProxy.java
MonitoringProxy.invoke
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { """ Intercepte une exécution de méthode sur une façade. @param proxy Object @param method Method @param args Object[] @return Object @throws Throwable t """ if (DISABLED || !SERVICES_COUNTER.isDisplayed()) {...
java
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (DISABLED || !SERVICES_COUNTER.isDisplayed()) { return method.invoke(facade, args); } // nom identifiant la requête final String requestName = getRequestName(method); return invokeTarget(facade, metho...
[ "@", "Override", "public", "Object", "invoke", "(", "Object", "proxy", ",", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "Throwable", "{", "if", "(", "DISABLED", "||", "!", "SERVICES_COUNTER", ".", "isDisplayed", "(", ")", ")", "{"...
Intercepte une exécution de méthode sur une façade. @param proxy Object @param method Method @param args Object[] @return Object @throws Throwable t
[ "Intercepte", "une", "exécution", "de", "méthode", "sur", "une", "façade", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-core/src/main/java/net/bull/javamelody/MonitoringProxy.java#L156-L165
Azure/azure-sdk-for-java
privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/PrivateZonesInner.java
PrivateZonesInner.updateAsync
public Observable<PrivateZoneInner> updateAsync(String resourceGroupName, String privateZoneName, PrivateZoneInner parameters, String ifMatch) { """ Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone. @param resourceGroupName The name of the resource group. @param ...
java
public Observable<PrivateZoneInner> updateAsync(String resourceGroupName, String privateZoneName, PrivateZoneInner parameters, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, privateZoneName, parameters, ifMatch).map(new Func1<ServiceResponse<PrivateZoneInner>, PrivateZoneInner>() { ...
[ "public", "Observable", "<", "PrivateZoneInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "privateZoneName", ",", "PrivateZoneInner", "parameters", ",", "String", "ifMatch", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resour...
Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @param parameters Parameters supplied to the Update operation. @param ifMatch T...
[ "Updates", "a", "Private", "DNS", "zone", ".", "Does", "not", "modify", "virtual", "network", "links", "or", "DNS", "records", "within", "the", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/PrivateZonesInner.java#L588-L595
podio/podio-java
src/main/java/com/podio/contact/ContactAPI.java
ContactAPI.updateSpaceContact
public void updateSpaceContact(int profileId, ContactUpdate update, boolean silent, boolean hook) { """ Updates the entire space contact. Only fields which have values specified will be updated. To delete the contents of a field, pass an empty array for the value. @param profileId The id of the space contact...
java
public void updateSpaceContact(int profileId, ContactUpdate update, boolean silent, boolean hook) { getResourceFactory().getApiResource("/contact/" + profileId) .queryParam("silent", silent ? "1" : "0") .queryParam("hook", hook ? "1" : "0") .entity(update, MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "updateSpaceContact", "(", "int", "profileId", ",", "ContactUpdate", "update", ",", "boolean", "silent", ",", "boolean", "hook", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/contact/\"", "+", "profileId", ")", ".", ...
Updates the entire space contact. Only fields which have values specified will be updated. To delete the contents of a field, pass an empty array for the value. @param profileId The id of the space contact to be updated @param update The data for the update @param silent True if the update should be silent, false othe...
[ "Updates", "the", "entire", "space", "contact", ".", "Only", "fields", "which", "have", "values", "specified", "will", "be", "updated", ".", "To", "delete", "the", "contents", "of", "a", "field", "pass", "an", "empty", "array", "for", "the", "value", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/contact/ContactAPI.java#L61-L66
forge/javaee-descriptors
impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/portletapp20/PortletDescriptorImpl.java
PortletDescriptorImpl.addNamespace
public PortletDescriptor addNamespace(String name, String value) { """ Adds a new namespace @return the current instance of <code>PortletDescriptor</code> """ model.attribute(name, value); return this; }
java
public PortletDescriptor addNamespace(String name, String value) { model.attribute(name, value); return this; }
[ "public", "PortletDescriptor", "addNamespace", "(", "String", "name", ",", "String", "value", ")", "{", "model", ".", "attribute", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a new namespace @return the current instance of <code>PortletDescriptor</code>
[ "Adds", "a", "new", "namespace" ]
train
https://github.com/forge/javaee-descriptors/blob/cb914330a1a0b04bfc1d0f199bd9cde3bbf0b3ed/impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/portletapp20/PortletDescriptorImpl.java#L93-L97
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java
SyntheticStorableReferenceBuilder.addKeyProperty
public SyntheticProperty addKeyProperty(String name, Direction direction) { """ Add a property to the primary key which is a member of the Storable type being referenced by this one. @param name """ StorableProperty<S> prop = mMasterStorableInfo.getAllProperties().get(name); if (prop == n...
java
public SyntheticProperty addKeyProperty(String name, Direction direction) { StorableProperty<S> prop = mMasterStorableInfo.getAllProperties().get(name); if (prop == null) { throw new IllegalArgumentException(name + " is not a property of " + mMasterStorableInfo.getNam...
[ "public", "SyntheticProperty", "addKeyProperty", "(", "String", "name", ",", "Direction", "direction", ")", "{", "StorableProperty", "<", "S", ">", "prop", "=", "mMasterStorableInfo", ".", "getAllProperties", "(", ")", ".", "get", "(", "name", ")", ";", "if", ...
Add a property to the primary key which is a member of the Storable type being referenced by this one. @param name
[ "Add", "a", "property", "to", "the", "primary", "key", "which", "is", "a", "member", "of", "the", "Storable", "type", "being", "referenced", "by", "this", "one", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceBuilder.java#L243-L255
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toPolyhedralSurfaceWithOptions
public PolyhedralSurface toPolyhedralSurfaceWithOptions( MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) { """ Convert a {@link MultiPolygonOptions} to a {@link PolyhedralSurface} @param multiPolygonOptions multi polygon options @param hasZ has z flag @param has...
java
public PolyhedralSurface toPolyhedralSurfaceWithOptions( MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) { PolyhedralSurface polyhedralSurface = new PolyhedralSurface(hasZ, hasM); for (PolygonOptions mapPolygon : multiPolygonOptions .getPolygonOptions()...
[ "public", "PolyhedralSurface", "toPolyhedralSurfaceWithOptions", "(", "MultiPolygonOptions", "multiPolygonOptions", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "PolyhedralSurface", "polyhedralSurface", "=", "new", "PolyhedralSurface", "(", "hasZ", ",", "hasM...
Convert a {@link MultiPolygonOptions} to a {@link PolyhedralSurface} @param multiPolygonOptions multi polygon options @param hasZ has z flag @param hasM has m flag @return polyhedral surface
[ "Convert", "a", "{", "@link", "MultiPolygonOptions", "}", "to", "a", "{", "@link", "PolyhedralSurface", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L1253-L1265
alkacon/opencms-core
src/org/opencms/main/OpenCms.java
OpenCms.initCmsObject
public static CmsObject initCmsObject(CmsObject adminCms, CmsContextInfo contextInfo) throws CmsException { """ Returns an initialized CmsObject with the user and context initialized as provided.<p> Note: Only if the provided <code>adminCms</code> CmsObject has admin permissions, this method allows the creatio...
java
public static CmsObject initCmsObject(CmsObject adminCms, CmsContextInfo contextInfo) throws CmsException { return OpenCmsCore.getInstance().initCmsObject(adminCms, contextInfo); }
[ "public", "static", "CmsObject", "initCmsObject", "(", "CmsObject", "adminCms", ",", "CmsContextInfo", "contextInfo", ")", "throws", "CmsException", "{", "return", "OpenCmsCore", ".", "getInstance", "(", ")", ".", "initCmsObject", "(", "adminCms", ",", "contextInfo"...
Returns an initialized CmsObject with the user and context initialized as provided.<p> Note: Only if the provided <code>adminCms</code> CmsObject has admin permissions, this method allows the creation a CmsObject for any existing user. Otherwise only the default users 'Guest' and 'Export' can initialized with this met...
[ "Returns", "an", "initialized", "CmsObject", "with", "the", "user", "and", "context", "initialized", "as", "provided", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCms.java#L698-L701
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/heap/Heap.java
Heap.heapifyUp
protected void heapifyUp(int pos, E elem) { """ Execute a "Heapify Upwards" aka "SiftUp". Used in insertions. @param pos insertion position @param elem Element to insert """ assert (pos < size && pos >= 0); while(pos > 0) { final int parent = (pos - 1) >>> 1; Object par = queue[parent];...
java
protected void heapifyUp(int pos, E elem) { assert (pos < size && pos >= 0); while(pos > 0) { final int parent = (pos - 1) >>> 1; Object par = queue[parent]; if(comparator.compare(elem, par) >= 0) { break; } queue[pos] = par; pos = parent; } queue[pos] = elem...
[ "protected", "void", "heapifyUp", "(", "int", "pos", ",", "E", "elem", ")", "{", "assert", "(", "pos", "<", "size", "&&", "pos", ">=", "0", ")", ";", "while", "(", "pos", ">", "0", ")", "{", "final", "int", "parent", "=", "(", "pos", "-", "1", ...
Execute a "Heapify Upwards" aka "SiftUp". Used in insertions. @param pos insertion position @param elem Element to insert
[ "Execute", "a", "Heapify", "Upwards", "aka", "SiftUp", ".", "Used", "in", "insertions", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/heap/Heap.java#L185-L198
EdwardRaff/JSAT
JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java
WolfeNWLineSearch.setC2
public void setC2(double c2) { """ Sets the constant used for the <i>curvature condition</i> p<sup>T</sup> &nabla;f(x+&alpha; p) &ge; c<sub>2</sub> p<sup>T</sup>&nabla;f(x) @param c2 the <i>curvature condition</i> constant """ if(c2 >= 1) throw new IllegalArgumentException("c2 must be les...
java
public void setC2(double c2) { if(c2 >= 1) throw new IllegalArgumentException("c2 must be less than 1, not " + c2); else if(c2 <= c1) throw new IllegalArgumentException("c2 must be greater than c1"); this.c2 = c2; }
[ "public", "void", "setC2", "(", "double", "c2", ")", "{", "if", "(", "c2", ">=", "1", ")", "throw", "new", "IllegalArgumentException", "(", "\"c2 must be less than 1, not \"", "+", "c2", ")", ";", "else", "if", "(", "c2", "<=", "c1", ")", "throw", "new",...
Sets the constant used for the <i>curvature condition</i> p<sup>T</sup> &nabla;f(x+&alpha; p) &ge; c<sub>2</sub> p<sup>T</sup>&nabla;f(x) @param c2 the <i>curvature condition</i> constant
[ "Sets", "the", "constant", "used", "for", "the", "<i", ">", "curvature", "condition<", "/", "i", ">", "p<sup", ">", "T<", "/", "sup", ">", "&nabla", ";", "f", "(", "x", "+", "&alpha", ";", "p", ")", "&ge", ";", "c<sub", ">", "2<", "/", "sub", "...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java#L89-L96
Netflix/dyno
dyno-demo/src/main/java/com/netflix/dyno/demo/redis/DynoDistributedCounterDemo.java
DynoDistributedCounterDemo.main
public static void main(String[] args) { """ Entry point to run {@link DynoCounter} demos @param args Should contain: <ol>dynomite_cluster_name</ol> <ol># of distributed counters (optional)</ol> """ final String clusterName = args[0]; final DynoDistributedCounterDemo demo = new DynoDistr...
java
public static void main(String[] args) { final String clusterName = args[0]; final DynoDistributedCounterDemo demo = new DynoDistributedCounterDemo(clusterName, "us-east-1e"); int numCounters = (args.length == 2) ? Integer.valueOf(args[1]) : 1; try { demo.initWithRemoteClu...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "final", "String", "clusterName", "=", "args", "[", "0", "]", ";", "final", "DynoDistributedCounterDemo", "demo", "=", "new", "DynoDistributedCounterDemo", "(", "clusterName", ",", ...
Entry point to run {@link DynoCounter} demos @param args Should contain: <ol>dynomite_cluster_name</ol> <ol># of distributed counters (optional)</ol>
[ "Entry", "point", "to", "run", "{", "@link", "DynoCounter", "}", "demos" ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-demo/src/main/java/com/netflix/dyno/demo/redis/DynoDistributedCounterDemo.java#L237-L258
alkacon/opencms-core
src/org/opencms/module/CmsModuleUpdater.java
CmsModuleUpdater.updateAcls
public boolean updateAcls(CmsObject cms, CmsResourceImportData resData, CmsResource resource) throws CmsException { """ Updates the access control list fr a resource.<p> @param cms the current cms context @param resData the resource data @param resource the existing resource @return the resource @throws C...
java
public boolean updateAcls(CmsObject cms, CmsResourceImportData resData, CmsResource resource) throws CmsException { boolean changed = false; Map<CmsUUID, CmsAccessControlEntry> importAces = buildAceMap(resData.getAccessControlEntries()); String path = cms.getSitePath(resource); List<Cm...
[ "public", "boolean", "updateAcls", "(", "CmsObject", "cms", ",", "CmsResourceImportData", "resData", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "boolean", "changed", "=", "false", ";", "Map", "<", "CmsUUID", ",", "CmsAccessControlEntry", "...
Updates the access control list fr a resource.<p> @param cms the current cms context @param resData the resource data @param resource the existing resource @return the resource @throws CmsException if something goes wrong
[ "Updates", "the", "access", "control", "list", "fr", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleUpdater.java#L366-L388
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Scheduler.java
Scheduler.durationSeconds
public static double durationSeconds(LocalDateTime start, LocalDateTime end) { """ 1 millisecond = 0.001 seconds @param start between time @param end finish time @return duration in seconds """ return Duration.between(start, end).getSeconds(); }
java
public static double durationSeconds(LocalDateTime start, LocalDateTime end) { return Duration.between(start, end).getSeconds(); }
[ "public", "static", "double", "durationSeconds", "(", "LocalDateTime", "start", ",", "LocalDateTime", "end", ")", "{", "return", "Duration", ".", "between", "(", "start", ",", "end", ")", ".", "getSeconds", "(", ")", ";", "}" ]
1 millisecond = 0.001 seconds @param start between time @param end finish time @return duration in seconds
[ "1", "millisecond", "=", "0", ".", "001", "seconds" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Scheduler.java#L100-L103
nakamura5akihito/six-util
src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java
AbstractMarshaller.marshalStreamResult
protected void marshalStreamResult(Object graph, StreamResult streamResult) throws XmlMappingException, IOException { """ Template method for handling {@code StreamResult}s. <p>This implementation delegates to {@code marshalOutputStream} or {@code marshalWriter}, depending on what is contained in the {@code S...
java
protected void marshalStreamResult(Object graph, StreamResult streamResult) throws XmlMappingException, IOException { if (streamResult.getOutputStream() != null) { marshalOutputStream(graph, streamResult.getOutputStream()); } else if (streamResult.getWriter() != null) { marshalWriter(graph, streamResult...
[ "protected", "void", "marshalStreamResult", "(", "Object", "graph", ",", "StreamResult", "streamResult", ")", "throws", "XmlMappingException", ",", "IOException", "{", "if", "(", "streamResult", ".", "getOutputStream", "(", ")", "!=", "null", ")", "{", "marshalOut...
Template method for handling {@code StreamResult}s. <p>This implementation delegates to {@code marshalOutputStream} or {@code marshalWriter}, depending on what is contained in the {@code StreamResult} @param graph the root of the object graph to marshal @param streamResult the {@code StreamResult} @throws IOException i...
[ "Template", "method", "for", "handling", "{" ]
train
https://github.com/nakamura5akihito/six-util/blob/a6db388a345e220cea2b1fa6324d15c80c6278b6/src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java#L265-L277
TomasMikula/EasyBind
src/main/java/org/fxmisc/easybind/EasyBind.java
EasyBind.includeWhen
public static <T> Subscription includeWhen( Collection<T> collection, T element, ObservableValue<Boolean> condition) { """ Adds {@code element} to {@code collection} when {@code condition} is {@code true} and removes it from {@code collection} when {@code condition} is {@code ...
java
public static <T> Subscription includeWhen( Collection<T> collection, T element, ObservableValue<Boolean> condition) { return subscribe(condition, new Consumer<Boolean>() { private boolean included = false; @Override public void accept(Boo...
[ "public", "static", "<", "T", ">", "Subscription", "includeWhen", "(", "Collection", "<", "T", ">", "collection", ",", "T", "element", ",", "ObservableValue", "<", "Boolean", ">", "condition", ")", "{", "return", "subscribe", "(", "condition", ",", "new", ...
Adds {@code element} to {@code collection} when {@code condition} is {@code true} and removes it from {@code collection} when {@code condition} is {@code false}. @return a subscription that can be used to stop observing {@code condition} and manipulating {@code collection}.
[ "Adds", "{" ]
train
https://github.com/TomasMikula/EasyBind/blob/516947dec9de4977d8a817b7d1dfd320cc644298/src/main/java/org/fxmisc/easybind/EasyBind.java#L272-L289
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/activator/Activator.java
Activator.postInvoke
public void postInvoke(ContainerTx tx, BeanO bean) { """ Perform actions required following method invocation; this is the complement to activateBean, and should be called by the container to balance activateBean. <p> """ bean.getActivationStrategy().atPostInvoke(tx, bean); }
java
public void postInvoke(ContainerTx tx, BeanO bean) { bean.getActivationStrategy().atPostInvoke(tx, bean); }
[ "public", "void", "postInvoke", "(", "ContainerTx", "tx", ",", "BeanO", "bean", ")", "{", "bean", ".", "getActivationStrategy", "(", ")", ".", "atPostInvoke", "(", "tx", ",", "bean", ")", ";", "}" ]
Perform actions required following method invocation; this is the complement to activateBean, and should be called by the container to balance activateBean. <p>
[ "Perform", "actions", "required", "following", "method", "invocation", ";", "this", "is", "the", "complement", "to", "activateBean", "and", "should", "be", "called", "by", "the", "container", "to", "balance", "activateBean", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/activator/Activator.java#L312-L315
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java
SignatureConverter.convertMethodSignature
public static String convertMethodSignature(XMethod xmethod) { """ Convenience method for generating a method signature in human readable form. @param xmethod an XMethod @return the formatted version of that signature """ @DottedClassName String className = xmethod.getClassName(); ...
java
public static String convertMethodSignature(XMethod xmethod) { @DottedClassName String className = xmethod.getClassName(); assert className.indexOf('/') == -1; return convertMethodSignature(className, xmethod.getName(), xmethod.getSignature()); }
[ "public", "static", "String", "convertMethodSignature", "(", "XMethod", "xmethod", ")", "{", "@", "DottedClassName", "String", "className", "=", "xmethod", ".", "getClassName", "(", ")", ";", "assert", "className", ".", "indexOf", "(", "'", "'", ")", "==", "...
Convenience method for generating a method signature in human readable form. @param xmethod an XMethod @return the formatted version of that signature
[ "Convenience", "method", "for", "generating", "a", "method", "signature", "in", "human", "readable", "form", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java#L197-L202
aleksandr-m/gitflow-maven-plugin
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
AbstractGitFlowMojo.replaceProperties
private String replaceProperties(String message, Map<String, String> map) { """ Replaces properties in message. @param message @param map Key is a string to replace wrapped in <code>@{...}</code>. Value is a string to replace with. @return """ if (map != null) { for (Entry<String, St...
java
private String replaceProperties(String message, Map<String, String> map) { if (map != null) { for (Entry<String, String> entr : map.entrySet()) { message = StringUtils.replace(message, "@{" + entr.getKey() + "}", entr.getValue()); } } return message; ...
[ "private", "String", "replaceProperties", "(", "String", "message", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "if", "(", "map", "!=", "null", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "entr", ":", "map", ...
Replaces properties in message. @param message @param map Key is a string to replace wrapped in <code>@{...}</code>. Value is a string to replace with. @return
[ "Replaces", "properties", "in", "message", "." ]
train
https://github.com/aleksandr-m/gitflow-maven-plugin/blob/d7be13c653d885c1cb1d8cd0337fa9db985c381e/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java#L604-L611
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/util/StringUtil.java
StringUtil.buildParam
public static String buildParam(String paramName, List<String> paramArgs) throws IOException { """ builds up a String with the parameters for the filtering of fields @param paramName @param paramArgs @return String @throws IOException """ StringBuilder sb = new StringBuilder(); for (String ar...
java
public static String buildParam(String paramName, List<String> paramArgs) throws IOException { StringBuilder sb = new StringBuilder(); for (String arg : paramArgs) { if (sb.length() > 0) { sb.append("&"); } sb.append(paramName).append("=").append(URLEncoder.encode(arg, "UTF-8"));...
[ "public", "static", "String", "buildParam", "(", "String", "paramName", ",", "List", "<", "String", ">", "paramArgs", ")", "throws", "IOException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "arg", ":", "p...
builds up a String with the parameters for the filtering of fields @param paramName @param paramArgs @return String @throws IOException
[ "builds", "up", "a", "String", "with", "the", "parameters", "for", "the", "filtering", "of", "fields" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/util/StringUtil.java#L56-L66
JoeKerouac/utils
src/main/java/com/joe/utils/proxy/cglib/CglibProxyClient.java
CglibProxyClient.createClass
@Override @SuppressWarnings("unchecked") public <T> Class<? extends T> createClass(Class<T> parent, T proxy, ClassLoader loader, String name, Interception interception) { """ 构建指定对象的代理Class,稍后可以通过反射构建该class的实例,对象的类必须是公共的,同时代理方法也必须是公共的 <p> 注意:生成的class通过反射调用构造器...
java
@Override @SuppressWarnings("unchecked") public <T> Class<? extends T> createClass(Class<T> parent, T proxy, ClassLoader loader, String name, Interception interception) { Enhancer enhancer = new Enhancer(); if (parent.isInterface()) { enh...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Class", "<", "?", "extends", "T", ">", "createClass", "(", "Class", "<", "T", ">", "parent", ",", "T", "proxy", ",", "ClassLoader", "loader", ",", "String", ...
构建指定对象的代理Class,稍后可以通过反射构建该class的实例,对象的类必须是公共的,同时代理方法也必须是公共的 <p> 注意:生成的class通过反射调用构造器创建对象的时候,构造器中调用的方法不会被拦截!!! </p> @param parent 指定接口 @param proxy 被代理的对象 @param loader 加载生成的对象的class的classloader @param name 生成的对象的class名字,不一定支持(java代理不支持) @param interception 方法代理 @param <T> 代理真实类型 @return 代理class
[ "构建指定对象的代理Class,稍后可以通过反射构建该class的实例,对象的类必须是公共的,同时代理方法也必须是公共的", "<p", ">", "注意:生成的class通过反射调用构造器创建对象的时候,构造器中调用的方法不会被拦截!!!", "<", "/", "p", ">" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/proxy/cglib/CglibProxyClient.java#L56-L70
aws/aws-sdk-java
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Application.java
Application.withAdditionalInfo
public Application withAdditionalInfo(java.util.Map<String, String> additionalInfo) { """ <p> This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes. </p> @param additionalInfo This option is for advanced users only. ...
java
public Application withAdditionalInfo(java.util.Map<String, String> additionalInfo) { setAdditionalInfo(additionalInfo); return this; }
[ "public", "Application", "withAdditionalInfo", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "additionalInfo", ")", "{", "setAdditionalInfo", "(", "additionalInfo", ")", ";", "return", "this", ";", "}" ]
<p> This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes. </p> @param additionalInfo This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purp...
[ "<p", ">", "This", "option", "is", "for", "advanced", "users", "only", ".", "This", "is", "meta", "information", "about", "third", "-", "party", "applications", "that", "third", "-", "party", "vendors", "use", "for", "testing", "purposes", ".", "<", "/", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Application.java#L263-L266
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.listWithServiceResponseAsync
public Observable<ServiceResponse<List<Person>>> listWithServiceResponseAsync(String personGroupId, ListPersonGroupPersonsOptionalParameter listOptionalParameter) { """ List all persons in a person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces o...
java
public Observable<ServiceResponse<List<Person>>> listWithServiceResponseAsync(String personGroupId, ListPersonGroupPersonsOptionalParameter listOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "Person", ">", ">", ">", "listWithServiceResponseAsync", "(", "String", "personGroupId", ",", "ListPersonGroupPersonsOptionalParameter", "listOptionalParameter", ")", "{", "if", "(", "this", ".", "clien...
List all persons in a person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person). @param personGroupId Id referencing a particular person group. @param listOptionalParameter the object representing the optional parameters to be set before c...
[ "List", "all", "persons", "in", "a", "person", "group", "and", "retrieve", "person", "information", "(", "including", "personId", "name", "userData", "and", "persistedFaceIds", "of", "registered", "faces", "of", "the", "person", ")", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L335-L346
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildConstantSummaries
public void buildConstantSummaries(XMLNode node, Content contentTree) throws DocletException { """ Build the summary for each documented package. @param node the XML element that specifies which components to document @param contentTree the tree to which the summaries will be added @throws DocletException if ...
java
public void buildConstantSummaries(XMLNode node, Content contentTree) throws DocletException { printedPackageHeaders.clear(); Content summariesTree = writer.getConstantSummaries(); for (PackageElement aPackage : configuration.packages) { if (hasConstantField(aPackage)) { ...
[ "public", "void", "buildConstantSummaries", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "DocletException", "{", "printedPackageHeaders", ".", "clear", "(", ")", ";", "Content", "summariesTree", "=", "writer", ".", "getConstantSummaries", "(...
Build the summary for each documented package. @param node the XML element that specifies which components to document @param contentTree the tree to which the summaries will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "summary", "for", "each", "documented", "package", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java#L185-L197
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLBaseDAO.java
MySQLBaseDAO.queryWithTransaction
protected <R> R queryWithTransaction(String query, QueryFunction<R> function) { """ Initiate a new transaction and execute a {@link Query} within that context, then return the results of {@literal function}. @param query The query string to prepare. @param function The functional callback to pass a {@link ...
java
protected <R> R queryWithTransaction(String query, QueryFunction<R> function) { return getWithTransaction(tx -> query(tx, query, function)); }
[ "protected", "<", "R", ">", "R", "queryWithTransaction", "(", "String", "query", ",", "QueryFunction", "<", "R", ">", "function", ")", "{", "return", "getWithTransaction", "(", "tx", "->", "query", "(", "tx", ",", "query", ",", "function", ")", ")", ";",...
Initiate a new transaction and execute a {@link Query} within that context, then return the results of {@literal function}. @param query The query string to prepare. @param function The functional callback to pass a {@link Query} to. @param <R> The expected return type of {@literal function}. @return The resul...
[ "Initiate", "a", "new", "transaction", "and", "execute", "a", "{", "@link", "Query", "}", "within", "that", "context", "then", "return", "the", "results", "of", "{", "@literal", "function", "}", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLBaseDAO.java#L167-L169
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java
StructureTools.getAtomsInContact
public static AtomContactSet getAtomsInContact(Chain chain1, Chain chain2, double cutoff, boolean hetAtoms) { """ Returns the set of inter-chain contacts between the two given chains for all non-H atoms. Uses a geometric hashing algorithm that speeds up the calculation without need of full distance matrix. Th...
java
public static AtomContactSet getAtomsInContact(Chain chain1, Chain chain2, double cutoff, boolean hetAtoms) { return getAtomsInContact(chain1, chain2, null, cutoff, hetAtoms); }
[ "public", "static", "AtomContactSet", "getAtomsInContact", "(", "Chain", "chain1", ",", "Chain", "chain2", ",", "double", "cutoff", ",", "boolean", "hetAtoms", ")", "{", "return", "getAtomsInContact", "(", "chain1", ",", "chain2", ",", "null", ",", "cutoff", "...
Returns the set of inter-chain contacts between the two given chains for all non-H atoms. Uses a geometric hashing algorithm that speeds up the calculation without need of full distance matrix. The parsing mode {@link FileParsingParameters#setAlignSeqRes(boolean)} needs to be set to true for this to work. @param chain...
[ "Returns", "the", "set", "of", "inter", "-", "chain", "contacts", "between", "the", "two", "given", "chains", "for", "all", "non", "-", "H", "atoms", ".", "Uses", "a", "geometric", "hashing", "algorithm", "that", "speeds", "up", "the", "calculation", "with...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L1533-L1536
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/ThreeViewEstimateMetricScene.java
ThreeViewEstimateMetricScene.setupMetricBundleAdjustment
private void setupMetricBundleAdjustment(List<AssociatedTriple> inliers) { """ Using the initial metric reconstruction, provide the initial configurations for bundle adjustment """ // Construct bundle adjustment data structure structure = new SceneStructureMetric(false); observations = new SceneObservati...
java
private void setupMetricBundleAdjustment(List<AssociatedTriple> inliers) { // Construct bundle adjustment data structure structure = new SceneStructureMetric(false); observations = new SceneObservations(3); structure.initialize(3,3,inliers.size()); for (int i = 0; i < listPinhole.size(); i++) { CameraPinh...
[ "private", "void", "setupMetricBundleAdjustment", "(", "List", "<", "AssociatedTriple", ">", "inliers", ")", "{", "// Construct bundle adjustment data structure", "structure", "=", "new", "SceneStructureMetric", "(", "false", ")", ";", "observations", "=", "new", "Scene...
Using the initial metric reconstruction, provide the initial configurations for bundle adjustment
[ "Using", "the", "initial", "metric", "reconstruction", "provide", "the", "initial", "configurations", "for", "bundle", "adjustment" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/ThreeViewEstimateMetricScene.java#L339-L368
JavaMoney/jsr354-api
src/main/java/javax/money/format/AmountFormatQueryBuilder.java
AmountFormatQueryBuilder.setMonetaryAmountFactory
public AmountFormatQueryBuilder setMonetaryAmountFactory(MonetaryAmountFactory<?> monetaryFactory) { """ Sets the {@link javax.money.MonetaryAmountFactory} to be used to of amounts during parsing. @param monetaryFactory the {@link javax.money.MonetaryAmountFactory} to be used, not null. @return this builder fo...
java
public AmountFormatQueryBuilder setMonetaryAmountFactory(MonetaryAmountFactory<?> monetaryFactory) { Objects.requireNonNull(monetaryFactory); return set(MonetaryAmountFactory.class, monetaryFactory); }
[ "public", "AmountFormatQueryBuilder", "setMonetaryAmountFactory", "(", "MonetaryAmountFactory", "<", "?", ">", "monetaryFactory", ")", "{", "Objects", ".", "requireNonNull", "(", "monetaryFactory", ")", ";", "return", "set", "(", "MonetaryAmountFactory", ".", "class", ...
Sets the {@link javax.money.MonetaryAmountFactory} to be used to of amounts during parsing. @param monetaryFactory the {@link javax.money.MonetaryAmountFactory} to be used, not null. @return this builder for chaining.
[ "Sets", "the", "{", "@link", "javax", ".", "money", ".", "MonetaryAmountFactory", "}", "to", "be", "used", "to", "of", "amounts", "during", "parsing", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/format/AmountFormatQueryBuilder.java#L105-L108
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildMapClickTableData
public FeatureTableData buildMapClickTableData(LatLng latLng, View view, GoogleMap map) { """ Perform a query based upon the map click location and build feature table data @param latLng location @param view view @param map Google Map @return table data on what was clicked, or null @since 1.2.7 """...
java
public FeatureTableData buildMapClickTableData(LatLng latLng, View view, GoogleMap map) { return buildMapClickTableData(latLng, view, map, null); }
[ "public", "FeatureTableData", "buildMapClickTableData", "(", "LatLng", "latLng", ",", "View", "view", ",", "GoogleMap", "map", ")", "{", "return", "buildMapClickTableData", "(", "latLng", ",", "view", ",", "map", ",", "null", ")", ";", "}" ]
Perform a query based upon the map click location and build feature table data @param latLng location @param view view @param map Google Map @return table data on what was clicked, or null @since 1.2.7
[ "Perform", "a", "query", "based", "upon", "the", "map", "click", "location", "and", "build", "feature", "table", "data" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L461-L463
emilsjolander/android-FlipView
library/src/se/emilsjolander/flipview/FlipView.java
FlipView.setDrawWithLayer
private void setDrawWithLayer(View v, boolean drawWithLayer) { """ Enable a hardware layer for the view. @param v @param drawWithLayer """ if (isHardwareAccelerated()) { if (v.getLayerType() != LAYER_TYPE_HARDWARE && drawWithLayer) { v.setLayerType(LAYER_TYPE_HARDWARE, null); } else if (v.getLa...
java
private void setDrawWithLayer(View v, boolean drawWithLayer) { if (isHardwareAccelerated()) { if (v.getLayerType() != LAYER_TYPE_HARDWARE && drawWithLayer) { v.setLayerType(LAYER_TYPE_HARDWARE, null); } else if (v.getLayerType() != LAYER_TYPE_NONE && !drawWithLayer) { v.setLayerType(LAYER_TYPE_NONE, nul...
[ "private", "void", "setDrawWithLayer", "(", "View", "v", ",", "boolean", "drawWithLayer", ")", "{", "if", "(", "isHardwareAccelerated", "(", ")", ")", "{", "if", "(", "v", ".", "getLayerType", "(", ")", "!=", "LAYER_TYPE_HARDWARE", "&&", "drawWithLayer", ")"...
Enable a hardware layer for the view. @param v @param drawWithLayer
[ "Enable", "a", "hardware", "layer", "for", "the", "view", "." ]
train
https://github.com/emilsjolander/android-FlipView/blob/7dc0dbd37339dc9691934b60a1c2763b5ed29ffe/library/src/se/emilsjolander/flipview/FlipView.java#L875-L883
samskivert/samskivert
src/main/java/com/samskivert/util/Config.java
Config.getValue
public String getValue (String name, String defval) { """ Fetches and returns the value for the specified configuration property. If the value is not specified in the associated properties file, the supplied default value is returned instead. @param name the name of the property to be fetched. @param defval t...
java
public String getValue (String name, String defval) { return _props.getProperty(name, defval); }
[ "public", "String", "getValue", "(", "String", "name", ",", "String", "defval", ")", "{", "return", "_props", ".", "getProperty", "(", "name", ",", "defval", ")", ";", "}" ]
Fetches and returns the value for the specified configuration property. If the value is not specified in the associated properties file, the supplied default value is returned instead. @param name the name of the property to be fetched. @param defval the value to return if the property is not specified in the config f...
[ "Fetches", "and", "returns", "the", "value", "for", "the", "specified", "configuration", "property", ".", "If", "the", "value", "is", "not", "specified", "in", "the", "associated", "properties", "file", "the", "supplied", "default", "value", "is", "returned", ...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Config.java#L202-L205
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/common/abstracts/featureselectors/AbstractScoreBasedFeatureSelector.java
AbstractScoreBasedFeatureSelector.removeRareFeatures
protected void removeRareFeatures(Map<Object, Double> featureCounts, int rareFeatureThreshold) { """ Removes any feature with less occurrences than the threshold. @param featureCounts @param rareFeatureThreshold """ logger.debug("removeRareFeatures()"); Iterator<Map.Entry<Object, Double>> ...
java
protected void removeRareFeatures(Map<Object, Double> featureCounts, int rareFeatureThreshold) { logger.debug("removeRareFeatures()"); Iterator<Map.Entry<Object, Double>> it = featureCounts.entrySet().iterator(); while(it.hasNext()) { Map.Entry<Object, Double> entry = it.next(); ...
[ "protected", "void", "removeRareFeatures", "(", "Map", "<", "Object", ",", "Double", ">", "featureCounts", ",", "int", "rareFeatureThreshold", ")", "{", "logger", ".", "debug", "(", "\"removeRareFeatures()\"", ")", ";", "Iterator", "<", "Map", ".", "Entry", "<...
Removes any feature with less occurrences than the threshold. @param featureCounts @param rareFeatureThreshold
[ "Removes", "any", "feature", "with", "less", "occurrences", "than", "the", "threshold", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/common/abstracts/featureselectors/AbstractScoreBasedFeatureSelector.java#L213-L223
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.shiftRightI
public static long[] shiftRightI(long[] v, int off) { """ Shift a long[] bitset in-place. <p> Low-endian layout for the array. @param v existing bitset @param off Offset to shift by @return Bitset """ if(off == 0) { return v; } if(off < 0) { return shiftLeftI(v, -off); } ...
java
public static long[] shiftRightI(long[] v, int off) { if(off == 0) { return v; } if(off < 0) { return shiftLeftI(v, -off); } // Break shift into integers to shift and bits to shift final int shiftWords = off >>> LONG_LOG2_SIZE; final int shiftBits = off & LONG_LOG2_MASK; if(...
[ "public", "static", "long", "[", "]", "shiftRightI", "(", "long", "[", "]", "v", ",", "int", "off", ")", "{", "if", "(", "off", "==", "0", ")", "{", "return", "v", ";", "}", "if", "(", "off", "<", "0", ")", "{", "return", "shiftLeftI", "(", "...
Shift a long[] bitset in-place. <p> Low-endian layout for the array. @param v existing bitset @param off Offset to shift by @return Bitset
[ "Shift", "a", "long", "[]", "bitset", "in", "-", "place", ".", "<p", ">", "Low", "-", "endian", "layout", "for", "the", "array", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L709-L743
restfb/restfb
src/main/java/com/restfb/util/ReflectionUtils.java
ReflectionUtils.createInstance
public static <T> T createInstance(Class<T> type) { """ Creates a new instance of the given {@code type}. <p> @param <T> Java type to map to. @param type Type token. @return A new instance of {@code type}. @throws FacebookJsonMappingException If an error occurs when creating a new instance ({@code type...
java
public static <T> T createInstance(Class<T> type) { String errorMessage = "Unable to create an instance of " + type + ". Please make sure that if it's a nested class, is marked 'static'. " + "It should have a no-argument constructor."; try { Constructor<T> defaultConstructor = typ...
[ "public", "static", "<", "T", ">", "T", "createInstance", "(", "Class", "<", "T", ">", "type", ")", "{", "String", "errorMessage", "=", "\"Unable to create an instance of \"", "+", "type", "+", "\". Please make sure that if it's a nested class, is marked 'static'. \"", ...
Creates a new instance of the given {@code type}. <p> @param <T> Java type to map to. @param type Type token. @return A new instance of {@code type}. @throws FacebookJsonMappingException If an error occurs when creating a new instance ({@code type} is inaccessible, doesn't have a no-arg constructor, etc.)
[ "Creates", "a", "new", "instance", "of", "the", "given", "{", "@code", "type", "}", ".", "<p", ">" ]
train
https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/ReflectionUtils.java#L394-L413
alkacon/opencms-core
src/org/opencms/main/CmsShellCommands.java
CmsShellCommands.importResources
public void importResources(String importFile, String importPath) throws Exception { """ Imports a resource into the Cms.<p> @param importFile the name (absolute Path) of the import resource (zip or folder) @param importPath the name (absolute Path) of folder in which should be imported @throws Exception if...
java
public void importResources(String importFile, String importPath) throws Exception { CmsImportParameters params = new CmsImportParameters( OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(importFile), importPath, true); OpenCms.getImportExportManager().imp...
[ "public", "void", "importResources", "(", "String", "importFile", ",", "String", "importPath", ")", "throws", "Exception", "{", "CmsImportParameters", "params", "=", "new", "CmsImportParameters", "(", "OpenCms", ".", "getSystemInfo", "(", ")", ".", "getAbsoluteRfsPa...
Imports a resource into the Cms.<p> @param importFile the name (absolute Path) of the import resource (zip or folder) @param importPath the name (absolute Path) of folder in which should be imported @throws Exception if something goes wrong
[ "Imports", "a", "resource", "into", "the", "Cms", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShellCommands.java#L912-L923
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java
EncodingUtils.encodeBase64
public static String encodeBase64(final byte[] data, final boolean chunked) { """ Base64-encode the given byte[] as a string. @param data the byte array to encode @param chunked the chunked @return the encoded string """ if (data != null && data.length > 0) { if (chunked) { ...
java
public static String encodeBase64(final byte[] data, final boolean chunked) { if (data != null && data.length > 0) { if (chunked) { return BASE64_CHUNKED_ENCODER.encodeToString(data).trim(); } return BASE64_UNCHUNKED_ENCODER.encodeToString(data).trim(); ...
[ "public", "static", "String", "encodeBase64", "(", "final", "byte", "[", "]", "data", ",", "final", "boolean", "chunked", ")", "{", "if", "(", "data", "!=", "null", "&&", "data", ".", "length", ">", "0", ")", "{", "if", "(", "chunked", ")", "{", "r...
Base64-encode the given byte[] as a string. @param data the byte array to encode @param chunked the chunked @return the encoded string
[ "Base64", "-", "encode", "the", "given", "byte", "[]", "as", "a", "string", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java#L149-L157
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AbstractInputHandler.java
AbstractInputHandler.registerMessage
public void registerMessage(MessageItem msg, TransactionCommon tran) throws SIIncorrectCallException { """ Method registerMessage. @param msg @param tran <p>Register the message with the pre-prepare callback on the transaction. When called back, the choice of OutputHandler for the message is made and the mess...
java
public void registerMessage(MessageItem msg, TransactionCommon tran) throws SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "registerMessage", new Object[] { msg, tran }); if (tran != null && !tran.isAlive()) { SIMPIncorrectCallExcep...
[ "public", "void", "registerMessage", "(", "MessageItem", "msg", ",", "TransactionCommon", "tran", ")", "throws", "SIIncorrectCallException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", ...
Method registerMessage. @param msg @param tran <p>Register the message with the pre-prepare callback on the transaction. When called back, the choice of OutputHandler for the message is made and the message is put to the itemstream of the chosen OutputHandler. </p>
[ "Method", "registerMessage", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AbstractInputHandler.java#L411-L446
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.mapSheet2Excel
public void mapSheet2Excel(List<MapSheetWrapper> sheetWrappers, String templatePath, String targetPath) throws Excel4JException { """ 基于模板、注解的多sheet导出{@code Map[String, List[?]]}类型数据 模板定制详见定制说明 @param sheetWrappers sheet包装类 @param templatePath Excel模板 @param targetPath 导出Excel路径 @throws Exce...
java
public void mapSheet2Excel(List<MapSheetWrapper> sheetWrappers, String templatePath, String targetPath) throws Excel4JException { try (SheetTemplate sheetTemplate = exportExcelByMapHandler(sheetWrappers, templatePath)) { sheetTemplate.write2File(targetPath); } catch (IOException...
[ "public", "void", "mapSheet2Excel", "(", "List", "<", "MapSheetWrapper", ">", "sheetWrappers", ",", "String", "templatePath", ",", "String", "targetPath", ")", "throws", "Excel4JException", "{", "try", "(", "SheetTemplate", "sheetTemplate", "=", "exportExcelByMapHandl...
基于模板、注解的多sheet导出{@code Map[String, List[?]]}类型数据 模板定制详见定制说明 @param sheetWrappers sheet包装类 @param templatePath Excel模板 @param targetPath 导出Excel路径 @throws Excel4JException 异常
[ "基于模板、注解的多sheet导出", "{", "@code", "Map", "[", "String", "List", "[", "?", "]]", "}", "类型数据", "模板定制详见定制说明" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L887-L895
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.getStorageAccountAsync
public Observable<StorageAccountInfoInner> getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { """ Gets the specified Azure Storage account linked to the given Data Lake Analytics account. @param resourceGroupName The name of the Azure resource group that contains t...
java
public Observable<StorageAccountInfoInner> getStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName) { return getStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).map(new Func1<ServiceResponse<StorageAccountInfoInner>, StorageAccount...
[ "public", "Observable", "<", "StorageAccountInfoInner", ">", "getStorageAccountAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "storageAccountName", ")", "{", "return", "getStorageAccountWithServiceResponseAsync", "(", "resourceGroupNa...
Gets the specified Azure Storage account linked to the given Data Lake Analytics account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account from which to retrieve Azure storage account details. @pa...
[ "Gets", "the", "specified", "Azure", "Storage", "account", "linked", "to", "the", "given", "Data", "Lake", "Analytics", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L219-L226
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.getMapMerkleTreeConfig
public MerkleTreeConfig getMapMerkleTreeConfig(String name) { """ Returns the map merkle tree config for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name} with...
java
public MerkleTreeConfig getMapMerkleTreeConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, mapMerkleTreeConfigs, name, MerkleTreeConfig.class, new BiConsumer<MerkleTreeConfig, String>() { @Override public void accept(MerkleTreeConfig ...
[ "public", "MerkleTreeConfig", "getMapMerkleTreeConfig", "(", "String", "name", ")", "{", "return", "ConfigUtils", ".", "getConfig", "(", "configPatternMatcher", ",", "mapMerkleTreeConfigs", ",", "name", ",", "MerkleTreeConfig", ".", "class", ",", "new", "BiConsumer", ...
Returns the map merkle tree config for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name} without the partition qualifier (the part of the name after {@code '@'}). If no...
[ "Returns", "the", "map", "merkle", "tree", "config", "for", "the", "given", "name", "creating", "one", "if", "necessary", "and", "adding", "it", "to", "the", "collection", "of", "known", "configurations", ".", "<p", ">", "The", "configuration", "is", "found"...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L2958-L2969
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/TailoredSet.java
TailoredSet.handleCE32
private void handleCE32(int start, int end, int ce32) { """ function (enumTailoredRange()). This is not necessary for Java implementation. """ assert (ce32 != Collation.FALLBACK_CE32); if (Collation.isSpecialCE32(ce32)) { ce32 = data.getIndirectCE32(ce32); if (ce32 == Co...
java
private void handleCE32(int start, int end, int ce32) { assert (ce32 != Collation.FALLBACK_CE32); if (Collation.isSpecialCE32(ce32)) { ce32 = data.getIndirectCE32(ce32); if (ce32 == Collation.FALLBACK_CE32) { return; } } do { ...
[ "private", "void", "handleCE32", "(", "int", "start", ",", "int", "end", ",", "int", "ce32", ")", "{", "assert", "(", "ce32", "!=", "Collation", ".", "FALLBACK_CE32", ")", ";", "if", "(", "Collation", ".", "isSpecialCE32", "(", "ce32", ")", ")", "{", ...
function (enumTailoredRange()). This is not necessary for Java implementation.
[ "function", "(", "enumTailoredRange", "()", ")", ".", "This", "is", "not", "necessary", "for", "Java", "implementation", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/TailoredSet.java#L76-L98
ogaclejapan/SmartTabLayout
utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java
Bundler.putParcelable
public Bundler putParcelable(String key, Parcelable value) { """ Inserts a Parcelable 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 a Parcelable object, or null @return this """ bundle...
java
public Bundler putParcelable(String key, Parcelable value) { bundle.putParcelable(key, value); return this; }
[ "public", "Bundler", "putParcelable", "(", "String", "key", ",", "Parcelable", "value", ")", "{", "bundle", ".", "putParcelable", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Parcelable 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 a Parcelable object, or null @return this
[ "Inserts", "a", "Parcelable", "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/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java#L140-L143
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getLong
public static long getLong(JsonObject object, String field, long defaultValue) { """ Returns a field in a Json object as a long. @param object the Json Object @param field the field in the Json object to return @param defaultValue a default value for the field if the field value is null @return the Json fiel...
java
public static long getLong(JsonObject object, String field, long defaultValue) { final JsonValue value = object.get(field); if (value == null || value.isNull()) { return defaultValue; } else { return value.asLong(); } }
[ "public", "static", "long", "getLong", "(", "JsonObject", "object", ",", "String", "field", ",", "long", "defaultValue", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "if", "(", "value", "==", "null", "||", ...
Returns a field in a Json object as a long. @param object the Json Object @param field the field in the Json object to return @param defaultValue a default value for the field if the field value is null @return the Json field value as a long
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "a", "long", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L90-L97
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/registry/NotificationHandlerNodeRegistry.java
NotificationHandlerNodeRegistry.findEntries
void findEntries(ListIterator<PathElement> iterator, Collection<NotificationHandler> handlers, Notification notification) { """ Collect all the entries in the {@code handler} notifications (if the registry is the leaf node) or continue to traverse the tree Only entries that are not filtered out after calling {@li...
java
void findEntries(ListIterator<PathElement> iterator, Collection<NotificationHandler> handlers, Notification notification) { if (!iterator.hasNext()) { for (ConcreteNotificationHandlerRegistration.NotificationHandlerEntry entry : entries) { if (entry.getFilter().isNotificationEnabled(...
[ "void", "findEntries", "(", "ListIterator", "<", "PathElement", ">", "iterator", ",", "Collection", "<", "NotificationHandler", ">", "handlers", ",", "Notification", "notification", ")", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "f...
Collect all the entries in the {@code handler} notifications (if the registry is the leaf node) or continue to traverse the tree Only entries that are not filtered out after calling {@link org.jboss.as.controller.notification.NotificationFilter#isNotificationEnabled(org.jboss.as.controller.notification.Notification)} f...
[ "Collect", "all", "the", "entries", "in", "the", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/registry/NotificationHandlerNodeRegistry.java#L105-L125
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java
Util.getSystemVariableValue
private static String getSystemVariableValue(String variableName, String defaultValue) { """ A utility which allows reading variables from the environment or System properties. If the variable in available in the environment as well as a System property, the System property takes precedence. @param variableNa...
java
private static String getSystemVariableValue(String variableName, String defaultValue) { String value; if (System.getProperty(variableName) != null) { value = System.getProperty(variableName); } else if (System.getenv(variableName) != null) { value = System.getenv(variabl...
[ "private", "static", "String", "getSystemVariableValue", "(", "String", "variableName", ",", "String", "defaultValue", ")", "{", "String", "value", ";", "if", "(", "System", ".", "getProperty", "(", "variableName", ")", "!=", "null", ")", "{", "value", "=", ...
A utility which allows reading variables from the environment or System properties. If the variable in available in the environment as well as a System property, the System property takes precedence. @param variableName System/environment variable name @param defaultValue default value to be returned if the specified ...
[ "A", "utility", "which", "allows", "reading", "variables", "from", "the", "environment", "or", "System", "properties", ".", "If", "the", "variable", "in", "available", "in", "the", "environment", "as", "well", "as", "a", "System", "property", "the", "System", ...
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java#L556-L566
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/date/GosuDateUtil.java
GosuDateUtil.addDays
public static Date addDays(Date date, int iDays) { """ Adds the specified (signed) amount of days to the given date. For example, to subtract 5 days from the current date, you can achieve it by calling: <code>addDays(Date, -5)</code>. @param date The time. @param iDays The amount of days to add. @return ...
java
public static Date addDays(Date date, int iDays) { Calendar dateTime = dateToCalendar(date); dateTime.add(Calendar.DATE, iDays); return dateTime.getTime(); }
[ "public", "static", "Date", "addDays", "(", "Date", "date", ",", "int", "iDays", ")", "{", "Calendar", "dateTime", "=", "dateToCalendar", "(", "date", ")", ";", "dateTime", ".", "add", "(", "Calendar", ".", "DATE", ",", "iDays", ")", ";", "return", "da...
Adds the specified (signed) amount of days to the given date. For example, to subtract 5 days from the current date, you can achieve it by calling: <code>addDays(Date, -5)</code>. @param date The time. @param iDays The amount of days to add. @return A new date with the days added.
[ "Adds", "the", "specified", "(", "signed", ")", "amount", "of", "days", "to", "the", "given", "date", ".", "For", "example", "to", "subtract", "5", "days", "from", "the", "current", "date", "you", "can", "achieve", "it", "by", "calling", ":", "<code", ...
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/date/GosuDateUtil.java#L77-L81
gosu-lang/gosu-lang
gosu-core/src/main/java/gw/internal/gosu/parser/GosuParserFactoryImpl.java
GosuParserFactoryImpl.createParser
public IGosuParser createParser( String strSource, ISymbolTable symTable ) { """ Creates an IGosuParser appropriate for parsing and executing Gosu. @param strSource The text of the the rule source @param symTable The symbol table the parser uses to parse and execute the rule @return A parser appropriate fo...
java
public IGosuParser createParser( String strSource, ISymbolTable symTable ) { return createParser( strSource, symTable, null ); }
[ "public", "IGosuParser", "createParser", "(", "String", "strSource", ",", "ISymbolTable", "symTable", ")", "{", "return", "createParser", "(", "strSource", ",", "symTable", ",", "null", ")", ";", "}" ]
Creates an IGosuParser appropriate for parsing and executing Gosu. @param strSource The text of the the rule source @param symTable The symbol table the parser uses to parse and execute the rule @return A parser appropriate for parsing Gosu source.
[ "Creates", "an", "IGosuParser", "appropriate", "for", "parsing", "and", "executing", "Gosu", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/parser/GosuParserFactoryImpl.java#L79-L82
huangp/entityunit
src/main/java/com/github/huangp/entityunit/entity/EntityMakerBuilder.java
EntityMakerBuilder.reuseEntities
public EntityMakerBuilder reuseEntities(Object first, Object second, Object... rest) { """ Reuse entities. @param first first @param second second @param rest rest of reusable entities as var args @return this """ List<Object> objects = ImmutableList.builder().add(first).add(second).add(rest)....
java
public EntityMakerBuilder reuseEntities(Object first, Object second, Object... rest) { List<Object> objects = ImmutableList.builder().add(first).add(second).add(rest).build(); return reuseEntities(objects); }
[ "public", "EntityMakerBuilder", "reuseEntities", "(", "Object", "first", ",", "Object", "second", ",", "Object", "...", "rest", ")", "{", "List", "<", "Object", ">", "objects", "=", "ImmutableList", ".", "builder", "(", ")", ".", "add", "(", "first", ")", ...
Reuse entities. @param first first @param second second @param rest rest of reusable entities as var args @return this
[ "Reuse", "entities", "." ]
train
https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/entity/EntityMakerBuilder.java#L102-L105
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/util/xml/ElementList.java
ElementList.renameNodesWithAttributeValue
public void renameNodesWithAttributeValue(String oldName, String newName, String attributeName, String attributeValue) { """ Rename all nodes with a certain name and a certain attribute name-value pair @param oldName @param newName @param attributeName @param attributeValue """ List<Node> nodes = getN...
java
public void renameNodesWithAttributeValue(String oldName, String newName, String attributeName, String attributeValue) { List<Node> nodes = getNodesFromTreeByName(oldName); Iterator i = nodes.iterator(); while (i.hasNext()) { Node n = (Node) i.next(); n.setName(newName); } }
[ "public", "void", "renameNodesWithAttributeValue", "(", "String", "oldName", ",", "String", "newName", ",", "String", "attributeName", ",", "String", "attributeValue", ")", "{", "List", "<", "Node", ">", "nodes", "=", "getNodesFromTreeByName", "(", "oldName", ")",...
Rename all nodes with a certain name and a certain attribute name-value pair @param oldName @param newName @param attributeName @param attributeValue
[ "Rename", "all", "nodes", "with", "a", "certain", "name", "and", "a", "certain", "attribute", "name", "-", "value", "pair" ]
train
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/util/xml/ElementList.java#L372-L379
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/PropertiesUtils.java
PropertiesUtils.checkProperties
@SuppressWarnings("unchecked") public static void checkProperties(Properties properties, Properties defaults) { """ Checks to make sure that all properties specified in <code>properties</code> are known to the program by checking that each simply overrides a default value @param properties Current properties...
java
@SuppressWarnings("unchecked") public static void checkProperties(Properties properties, Properties defaults) { Set<String> names = Generics.newHashSet(); for (Enumeration<String> e = (Enumeration<String>) properties.propertyNames(); e.hasMoreElements(); ) { names.add(e.nextElement()); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "void", "checkProperties", "(", "Properties", "properties", ",", "Properties", "defaults", ")", "{", "Set", "<", "String", ">", "names", "=", "Generics", ".", "newHashSet", "(", ")", ";", ...
Checks to make sure that all properties specified in <code>properties</code> are known to the program by checking that each simply overrides a default value @param properties Current properties @param defaults Default properties which lists all known keys
[ "Checks", "to", "make", "sure", "that", "all", "properties", "specified", "in", "<code", ">", "properties<", "/", "code", ">", "are", "known", "to", "the", "program", "by", "checking", "that", "each", "simply", "overrides", "a", "default", "value" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/PropertiesUtils.java#L82-L100
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VirtualFile.java
VirtualFile.getChildrenRecursively
public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException { """ Get all the children recursively<p> <p/> This always uses {@link VisitorAttributes#RECURSE} @param filter to filter the children @return the children @throws IOException for any problem accessing the...
java
public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException { // isDirectory does the read security check if (!isDirectory()) { return Collections.emptyList(); } if (filter == null) { filter = MatchAllVirtualFileFilter.INSTANCE; } FilterVirtualFileVisitor...
[ "public", "List", "<", "VirtualFile", ">", "getChildrenRecursively", "(", "VirtualFileFilter", "filter", ")", "throws", "IOException", "{", "// isDirectory does the read security check", "if", "(", "!", "isDirectory", "(", ")", ")", "{", "return", "Collections", ".", ...
Get all the children recursively<p> <p/> This always uses {@link VisitorAttributes#RECURSE} @param filter to filter the children @return the children @throws IOException for any problem accessing the virtual file system @throws IllegalStateException if the file is closed or it is a leaf node
[ "Get", "all", "the", "children", "recursively<p", ">", "<p", "/", ">", "This", "always", "uses", "{", "@link", "VisitorAttributes#RECURSE", "}" ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VirtualFile.java#L454-L461
future-architect/uroborosql
src/main/java/jp/co/future/uroborosql/utils/StringFunction.java
StringFunction.rightPad
public String rightPad(final String str, final int size, final char padChar) { """ 文字列の末尾に指定した埋め込み文字を埋めて指定された長さにする <pre> StringUtils.rightPad(null, *, *) = null StringUtils.rightPad("", 3, 'z') = "zzz" StringUtils.rightPad("bat", 3, 'z') = "bat" StringUtils.rightPad("bat", 5, 'z') = "batzz" Strin...
java
public String rightPad(final String str, final int size, final char padChar) { return StringUtils.rightPad(str, size, padChar); }
[ "public", "String", "rightPad", "(", "final", "String", "str", ",", "final", "int", "size", ",", "final", "char", "padChar", ")", "{", "return", "StringUtils", ".", "rightPad", "(", "str", ",", "size", ",", "padChar", ")", ";", "}" ]
文字列の末尾に指定した埋め込み文字を埋めて指定された長さにする <pre> StringUtils.rightPad(null, *, *) = null StringUtils.rightPad("", 3, 'z') = "zzz" StringUtils.rightPad("bat", 3, 'z') = "bat" StringUtils.rightPad("bat", 5, 'z') = "batzz" StringUtils.rightPad("bat", 1, 'z') = "bat" StringUtils.rightPad("bat", -1, 'z') = "bat" </pre> @p...
[ "文字列の末尾に指定した埋め込み文字を埋めて指定された長さにする" ]
train
https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/utils/StringFunction.java#L230-L232
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
BinaryRowProtocol.getInternalByte
public byte getInternalByte(ColumnInformation columnInfo) throws SQLException { """ Get byte from raw binary format. @param columnInfo column information @return byte value @throws SQLException if column type doesn't permit conversion """ if (lastValueWasNull()) { return 0; } long value;...
java
public byte getInternalByte(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return 0; } long value; switch (columnInfo.getColumnType()) { case BIT: value = parseBit(); break; case TINYINT: value = getInternalTinyInt(columnInfo); ...
[ "public", "byte", "getInternalByte", "(", "ColumnInformation", "columnInfo", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "0", ";", "}", "long", "value", ";", "switch", "(", "columnInfo", ".", "getColumnType"...
Get byte from raw binary format. @param columnInfo column information @return byte value @throws SQLException if column type doesn't permit conversion
[ "Get", "byte", "from", "raw", "binary", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java#L1114-L1160