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
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspInstanceDateBean.java
CmsJspInstanceDateBean.adjustForWholeDay
private Date adjustForWholeDay(Date date, boolean isEnd) { """ Adjust the date according to the whole day options. @param date the date to adjust. @param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning) @return the adjusted date, which will be exactly the beginning o...
java
private Date adjustForWholeDay(Date date, boolean isEnd) { Calendar result = new GregorianCalendar(); result.setTime(date); result.set(Calendar.HOUR_OF_DAY, 0); result.set(Calendar.MINUTE, 0); result.set(Calendar.SECOND, 0); result.set(Calendar.MILLISECOND, 0); i...
[ "private", "Date", "adjustForWholeDay", "(", "Date", "date", ",", "boolean", "isEnd", ")", "{", "Calendar", "result", "=", "new", "GregorianCalendar", "(", ")", ";", "result", ".", "setTime", "(", "date", ")", ";", "result", ".", "set", "(", "Calendar", ...
Adjust the date according to the whole day options. @param date the date to adjust. @param isEnd flag, indicating if the date is the end of the event (in contrast to the beginning) @return the adjusted date, which will be exactly the beginning or the end of the provide date's day.
[ "Adjust", "the", "date", "according", "to", "the", "whole", "day", "options", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspInstanceDateBean.java#L428-L441
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java
DefaultIncrementalAttributesMapper.lookupAttributes
public static Attributes lookupAttributes(LdapOperations ldapOperations, Name dn, String attribute) { """ Lookup all values for the specified attribute, looping through the results incrementally if necessary. @param ldapOperations The instance to use for performing the actual lookup. @param dn The ...
java
public static Attributes lookupAttributes(LdapOperations ldapOperations, Name dn, String attribute) { return lookupAttributes(ldapOperations, dn, new String[]{attribute}); }
[ "public", "static", "Attributes", "lookupAttributes", "(", "LdapOperations", "ldapOperations", ",", "Name", "dn", ",", "String", "attribute", ")", "{", "return", "lookupAttributes", "(", "ldapOperations", ",", "dn", ",", "new", "String", "[", "]", "{", "attribut...
Lookup all values for the specified attribute, looping through the results incrementally if necessary. @param ldapOperations The instance to use for performing the actual lookup. @param dn The distinguished name of the object to find. @param attribute name of the attribute to request. @return an Attri...
[ "Lookup", "all", "values", "for", "the", "specified", "attribute", "looping", "through", "the", "results", "incrementally", "if", "necessary", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/core/support/DefaultIncrementalAttributesMapper.java#L290-L292
knowm/XChart
xchart/src/main/java/org/knowm/xchart/PieChart.java
PieChart.addSeries
public PieSeries addSeries(String seriesName, Number value) { """ Add a series for a Pie type chart @param seriesName @param value @return """ PieSeries series = new PieSeries(seriesName, value); if (seriesMap.keySet().contains(seriesName)) { throw new IllegalArgumentException( "...
java
public PieSeries addSeries(String seriesName, Number value) { PieSeries series = new PieSeries(seriesName, value); if (seriesMap.keySet().contains(seriesName)) { throw new IllegalArgumentException( "Series name >" + seriesName + "< has already been used. Use unique ...
[ "public", "PieSeries", "addSeries", "(", "String", "seriesName", ",", "Number", "value", ")", "{", "PieSeries", "series", "=", "new", "PieSeries", "(", "seriesName", ",", "value", ")", ";", "if", "(", "seriesMap", ".", "keySet", "(", ")", ".", "contains", ...
Add a series for a Pie type chart @param seriesName @param value @return
[ "Add", "a", "series", "for", "a", "Pie", "type", "chart" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/PieChart.java#L74-L87
rometools/rome
rome-fetcher/src/main/java/com/rometools/fetcher/impl/AbstractFeedFetcher.java
AbstractFeedFetcher.handleErrorCodes
protected void handleErrorCodes(final int responseCode) throws FetcherException { """ <p> Handles HTTP error codes. </p> @param responseCode the HTTP response code @throws FetcherException if response code is in the range 400 to 599 inclusive """ // Handle 2xx codes as OK, so ignore them here ...
java
protected void handleErrorCodes(final int responseCode) throws FetcherException { // Handle 2xx codes as OK, so ignore them here // 3xx codes are handled by the HttpURLConnection class if (responseCode == 403) { // Authentication is required throwAuthenticationError(respo...
[ "protected", "void", "handleErrorCodes", "(", "final", "int", "responseCode", ")", "throws", "FetcherException", "{", "// Handle 2xx codes as OK, so ignore them here", "// 3xx codes are handled by the HttpURLConnection class", "if", "(", "responseCode", "==", "403", ")", "{", ...
<p> Handles HTTP error codes. </p> @param responseCode the HTTP response code @throws FetcherException if response code is in the range 400 to 599 inclusive
[ "<p", ">", "Handles", "HTTP", "error", "codes", ".", "<", "/", "p", ">" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-fetcher/src/main/java/com/rometools/fetcher/impl/AbstractFeedFetcher.java#L175-L186
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/AbstractCommand.java
AbstractCommand.createMenuItem
public final JMenuItem createMenuItem(String faceDescriptorId, MenuFactory menuFactory) { """ Create a menuItem using the default and menuItemButtonConfigurer. @see #createMenuItem(String, MenuFactory, CommandButtonConfigurer) """ return createMenuItem(faceDescriptorId, menuFactory, getMenuItemButtonConfi...
java
public final JMenuItem createMenuItem(String faceDescriptorId, MenuFactory menuFactory) { return createMenuItem(faceDescriptorId, menuFactory, getMenuItemButtonConfigurer()); }
[ "public", "final", "JMenuItem", "createMenuItem", "(", "String", "faceDescriptorId", ",", "MenuFactory", "menuFactory", ")", "{", "return", "createMenuItem", "(", "faceDescriptorId", ",", "menuFactory", ",", "getMenuItemButtonConfigurer", "(", ")", ")", ";", "}" ]
Create a menuItem using the default and menuItemButtonConfigurer. @see #createMenuItem(String, MenuFactory, CommandButtonConfigurer)
[ "Create", "a", "menuItem", "using", "the", "default", "and", "menuItemButtonConfigurer", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/AbstractCommand.java#L822-L824
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateHierarchicalEntityRoleAsync
public Observable<OperationStatus> updateHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId, UpdateHierarchicalEntityRoleOptionalParameter updateHierarchicalEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The application ID. @param ve...
java
public Observable<OperationStatus> updateHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId, UpdateHierarchicalEntityRoleOptionalParameter updateHierarchicalEntityRoleOptionalParameter) { return updateHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, ...
[ "public", "Observable", "<", "OperationStatus", ">", "updateHierarchicalEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "UUID", "roleId", ",", "UpdateHierarchicalEntityRoleOptionalParameter", "updateHierarchicalEntityRoleOpti...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param roleId The entity role ID. @param updateHierarchicalEntityRoleOptionalParameter the object representing the optional parameters to be set before call...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13291-L13298
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/dependency/EvidenceCollection.java
EvidenceCollection.addEvidence
public void addEvidence(EvidenceType type, String source, String name, String value, Confidence confidence) { """ Creates an Evidence object from the parameters and adds the resulting object to the evidence collection. @param type the type of evidence (vendor, product, version) @param source the source of the...
java
public void addEvidence(EvidenceType type, String source, String name, String value, Confidence confidence) { final Evidence e = new Evidence(source, name, value, confidence); addEvidence(type, e); }
[ "public", "void", "addEvidence", "(", "EvidenceType", "type", ",", "String", "source", ",", "String", "name", ",", "String", "value", ",", "Confidence", "confidence", ")", "{", "final", "Evidence", "e", "=", "new", "Evidence", "(", "source", ",", "name", "...
Creates an Evidence object from the parameters and adds the resulting object to the evidence collection. @param type the type of evidence (vendor, product, version) @param source the source of the Evidence. @param name the name of the Evidence. @param value the value of the Evidence. @param confidence the confidence o...
[ "Creates", "an", "Evidence", "object", "from", "the", "parameters", "and", "adds", "the", "resulting", "object", "to", "the", "evidence", "collection", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/dependency/EvidenceCollection.java#L200-L203
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/LinkedBuffer.java
LinkedBuffer.writeTo
public static int writeTo(final OutputStream out, LinkedBuffer node) throws IOException { """ Writes the contents of the {@link LinkedBuffer} into the {@link OutputStream}. @return the total content size of the buffer. """ int contentSize = 0, len; do { if ((len = nod...
java
public static int writeTo(final OutputStream out, LinkedBuffer node) throws IOException { int contentSize = 0, len; do { if ((len = node.offset - node.start) > 0) { out.write(node.buffer, node.start, len); contentSize += len; ...
[ "public", "static", "int", "writeTo", "(", "final", "OutputStream", "out", ",", "LinkedBuffer", "node", ")", "throws", "IOException", "{", "int", "contentSize", "=", "0", ",", "len", ";", "do", "{", "if", "(", "(", "len", "=", "node", ".", "offset", "-...
Writes the contents of the {@link LinkedBuffer} into the {@link OutputStream}. @return the total content size of the buffer.
[ "Writes", "the", "contents", "of", "the", "{", "@link", "LinkedBuffer", "}", "into", "the", "{", "@link", "OutputStream", "}", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/LinkedBuffer.java#L103-L116
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java
RubyBundleAuditAnalyzer.setVulnerabilityName
private void setVulnerabilityName(String parentName, Dependency dependency, Vulnerability vulnerability, String nextLine) { """ Sets the vulnerability name. @param parentName the parent name @param dependency the dependency @param vulnerability the vulnerability @param nextLine the line to parse """ ...
java
private void setVulnerabilityName(String parentName, Dependency dependency, Vulnerability vulnerability, String nextLine) { final String advisory = nextLine.substring(ADVISORY.length()); if (null != vulnerability) { vulnerability.setName(advisory); } if (null != dependency) {...
[ "private", "void", "setVulnerabilityName", "(", "String", "parentName", ",", "Dependency", "dependency", ",", "Vulnerability", "vulnerability", ",", "String", "nextLine", ")", "{", "final", "String", "advisory", "=", "nextLine", ".", "substring", "(", "ADVISORY", ...
Sets the vulnerability name. @param parentName the parent name @param dependency the dependency @param vulnerability the vulnerability @param nextLine the line to parse
[ "Sets", "the", "vulnerability", "name", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java#L380-L389
podio/podio-java
src/main/java/com/podio/comment/CommentAPI.java
CommentAPI.updateComment
public void updateComment(int commentId, CommentUpdate comment) { """ Updates an already created comment. This should only be used to correct spelling and grammatical mistakes in the comment. @param commentId The id of the comment @param comment The updated comment definition """ getResourceFactory()....
java
public void updateComment(int commentId, CommentUpdate comment) { getResourceFactory().getApiResource("/comment/" + commentId) .entity(comment, MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "updateComment", "(", "int", "commentId", ",", "CommentUpdate", "comment", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/comment/\"", "+", "commentId", ")", ".", "entity", "(", "comment", ",", "MediaType", ".", "AP...
Updates an already created comment. This should only be used to correct spelling and grammatical mistakes in the comment. @param commentId The id of the comment @param comment The updated comment definition
[ "Updates", "an", "already", "created", "comment", ".", "This", "should", "only", "be", "used", "to", "correct", "spelling", "and", "grammatical", "mistakes", "in", "the", "comment", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/comment/CommentAPI.java#L86-L89
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificatePolicyAsync
public ServiceFuture<CertificatePolicy> updateCertificatePolicyAsync(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy, final ServiceCallback<CertificatePolicy> serviceCallback) { """ Updates the policy for a certificate. Set specified members in the certificate policy. Leave others...
java
public ServiceFuture<CertificatePolicy> updateCertificatePolicyAsync(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy, final ServiceCallback<CertificatePolicy> serviceCallback) { return ServiceFuture.fromResponse(updateCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certi...
[ "public", "ServiceFuture", "<", "CertificatePolicy", ">", "updateCertificatePolicyAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "CertificatePolicy", "certificatePolicy", ",", "final", "ServiceCallback", "<", "CertificatePolicy", ">", "service...
Updates the policy for a certificate. Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate in the given vault...
[ "Updates", "the", "policy", "for", "a", "certificate", ".", "Set", "specified", "members", "in", "the", "certificate", "policy", ".", "Leave", "others", "as", "null", ".", "This", "operation", "requires", "the", "certificates", "/", "update", "permission", "."...
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#L7256-L7258
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/features/FeatureUtilities.java
FeatureUtilities.gridcoverageToCellPolygons
public static List<Polygon> gridcoverageToCellPolygons( GridCoverage2D coverage ) { """ Extracts a list of polygons from the cell bounds of a given {@link GridCoverage2D coverage}. <p><b>Note that the cells are added in a rows and cols order (for each row evaluate each column).</b></p> @param coverage the c...
java
public static List<Polygon> gridcoverageToCellPolygons( GridCoverage2D coverage ) { RegionMap regionMap = CoverageUtilities.getRegionParamsFromGridCoverage(coverage); double west = regionMap.getWest(); double north = regionMap.getNorth(); double xres = regionMap.getXres(); double...
[ "public", "static", "List", "<", "Polygon", ">", "gridcoverageToCellPolygons", "(", "GridCoverage2D", "coverage", ")", "{", "RegionMap", "regionMap", "=", "CoverageUtilities", ".", "getRegionParamsFromGridCoverage", "(", "coverage", ")", ";", "double", "west", "=", ...
Extracts a list of polygons from the cell bounds of a given {@link GridCoverage2D coverage}. <p><b>Note that the cells are added in a rows and cols order (for each row evaluate each column).</b></p> @param coverage the coverage to use. @return the list of envelope geometries.
[ "Extracts", "a", "list", "of", "polygons", "from", "the", "cell", "bounds", "of", "a", "given", "{", "@link", "GridCoverage2D", "coverage", "}", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/features/FeatureUtilities.java#L687-L718
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeFloat
public static int writeFloat(byte[] array, int offset, float v) { """ Write a float to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written """ return writeInt(array, offset, Float.floatToIntBits(v)); }
java
public static int writeFloat(byte[] array, int offset, float v) { return writeInt(array, offset, Float.floatToIntBits(v)); }
[ "public", "static", "int", "writeFloat", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "float", "v", ")", "{", "return", "writeInt", "(", "array", ",", "offset", ",", "Float", ".", "floatToIntBits", "(", "v", ")", ")", ";", "}" ]
Write a float to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written
[ "Write", "a", "float", "to", "the", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L156-L158
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.sortedAndUnique
private boolean sortedAndUnique(String[] keyList, int size) throws IOException { """ Sorted and unique. @param keyList the key list @param size the size @return true, if successful @throws IOException Signals that an I/O exception has occurred. """ if (!closed) { for (int i = 1; i < size;...
java
private boolean sortedAndUnique(String[] keyList, int size) throws IOException { if (!closed) { for (int i = 1; i < size; i++) { if (keyList[(i - 1)].compareTo(keyList[i]) >= 0) { return false; } } return true; } else { throw new IOException("already close...
[ "private", "boolean", "sortedAndUnique", "(", "String", "[", "]", "keyList", ",", "int", "size", ")", "throws", "IOException", "{", "if", "(", "!", "closed", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<", "size", ";", "i", "++", ")", ...
Sorted and unique. @param keyList the key list @param size the size @return true, if successful @throws IOException Signals that an I/O exception has occurred.
[ "Sorted", "and", "unique", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L1041-L1053
FINRAOS/JTAF-ExtWebDriver
src/main/java/org/finra/jtaf/ewd/widget/element/Element.java
Element.isElementPresentJavaXPath
private boolean isElementPresentJavaXPath() throws Exception { """ Use the Java Xpath API to determine if the element is present or not @return boolean true or false as the case is @throws Exception """ String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator(); try { xpath = formatXPathForJ...
java
private boolean isElementPresentJavaXPath() throws Exception { String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator(); try { xpath = formatXPathForJavaXPath(xpath); NodeList nodes = getNodeListUsingJavaXPath(xpath); if (nodes.getLength() > 0) { return true; } else { return false; ...
[ "private", "boolean", "isElementPresentJavaXPath", "(", ")", "throws", "Exception", "{", "String", "xpath", "=", "(", "(", "StringLocatorAwareBy", ")", "getByLocator", "(", ")", ")", ".", "getLocator", "(", ")", ";", "try", "{", "xpath", "=", "formatXPathForJa...
Use the Java Xpath API to determine if the element is present or not @return boolean true or false as the case is @throws Exception
[ "Use", "the", "Java", "Xpath", "API", "to", "determine", "if", "the", "element", "is", "present", "or", "not" ]
train
https://github.com/FINRAOS/JTAF-ExtWebDriver/blob/78d646def1bf0904f79b19a81df0241e07f2c73a/src/main/java/org/finra/jtaf/ewd/widget/element/Element.java#L808-L821
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hoiio/HoiioFaxClientSpi.java
HoiioFaxClientSpi.updateFaxJob2HTTPRequestConverterConfiguration
@Override protected void updateFaxJob2HTTPRequestConverterConfiguration(Map<String,String> configuration) { """ Hook for extending classes. @param configuration The converter configuration """ //get ID and token String applicationID=this.getConfigurationValue(FaxClientSpiConfiguration...
java
@Override protected void updateFaxJob2HTTPRequestConverterConfiguration(Map<String,String> configuration) { //get ID and token String applicationID=this.getConfigurationValue(FaxClientSpiConfigurationConstants.APPLICATION_ID_PROPERTY_KEY); String accessToken=this.getConfigurationValue(Fa...
[ "@", "Override", "protected", "void", "updateFaxJob2HTTPRequestConverterConfiguration", "(", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "//get ID and token", "String", "applicationID", "=", "this", ".", "getConfigurationValue", "(", "FaxClientS...
Hook for extending classes. @param configuration The converter configuration
[ "Hook", "for", "extending", "classes", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hoiio/HoiioFaxClientSpi.java#L171-L194
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.reimage
public void reimage(String poolId, String nodeId) { """ Reinstalls the operating system on the specified compute node. You can reinstall the operating system on a node only if it is in an idle or running state. This API can be invoked only on pools created with the cloud service configuration property. @param ...
java
public void reimage(String poolId, String nodeId) { reimageWithServiceResponseAsync(poolId, nodeId).toBlocking().single().body(); }
[ "public", "void", "reimage", "(", "String", "poolId", ",", "String", "nodeId", ")", "{", "reimageWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ")", ";", "}" ]
Reinstalls the operating system on the specified compute node. You can reinstall the operating system on a node only if it is in an idle or running state. This API can be invoked only on pools created with the cloud service configuration property. @param poolId The ID of the pool that contains the compute node. @param...
[ "Reinstalls", "the", "operating", "system", "on", "the", "specified", "compute", "node", ".", "You", "can", "reinstall", "the", "operating", "system", "on", "a", "node", "only", "if", "it", "is", "in", "an", "idle", "or", "running", "state", ".", "This", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L1283-L1285
grails/grails-core
grails-web-common/src/main/groovy/grails/web/servlet/mvc/GrailsParameterMap.java
GrailsParameterMap.getDate
@Override public Date getDate(String name) { """ Obtains a date for the parameter name using the default format @param name The name of the parameter @return A date or null """ Object returnValue = wrappedMap.get(name); if ("date.struct".equals(returnValue)) { returnValue = ...
java
@Override public Date getDate(String name) { Object returnValue = wrappedMap.get(name); if ("date.struct".equals(returnValue)) { returnValue = lazyEvaluateDateParam(name); nestedDateMap.put(name, returnValue); return (Date)returnValue; } Date date ...
[ "@", "Override", "public", "Date", "getDate", "(", "String", "name", ")", "{", "Object", "returnValue", "=", "wrappedMap", ".", "get", "(", "name", ")", ";", "if", "(", "\"date.struct\"", ".", "equals", "(", "returnValue", ")", ")", "{", "returnValue", "...
Obtains a date for the parameter name using the default format @param name The name of the parameter @return A date or null
[ "Obtains", "a", "date", "for", "the", "parameter", "name", "using", "the", "default", "format" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/grails/web/servlet/mvc/GrailsParameterMap.java#L206-L223
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/InstanceHelpers.java
InstanceHelpers.findInstanceDirectoryOnAgent
public static File findInstanceDirectoryOnAgent( Instance instance ) { """ Finds the directory where an agent stores the files for a given instance. @param instance an instance (not null) @return a file (not null, but may not exist) """ String path = InstanceHelpers.computeInstancePath( instance ); path...
java
public static File findInstanceDirectoryOnAgent( Instance instance ) { String path = InstanceHelpers.computeInstancePath( instance ); path = path.substring( 1 ).replace( '/', '_' ).replace( ' ', '_' ); String installerName = ComponentHelpers.findComponentInstaller( instance.getComponent()); return new File( C...
[ "public", "static", "File", "findInstanceDirectoryOnAgent", "(", "Instance", "instance", ")", "{", "String", "path", "=", "InstanceHelpers", ".", "computeInstancePath", "(", "instance", ")", ";", "path", "=", "path", ".", "substring", "(", "1", ")", ".", "repl...
Finds the directory where an agent stores the files for a given instance. @param instance an instance (not null) @return a file (not null, but may not exist)
[ "Finds", "the", "directory", "where", "an", "agent", "stores", "the", "files", "for", "a", "given", "instance", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/InstanceHelpers.java#L484-L491
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/message/remote/RemoteMessageReceiver.java
RemoteMessageReceiver.init
public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { """ Constructor. @param server The remote server. @param baseMessageQueue My parent message queue. """ super.init(baseMessageQueue); m_receiveQueue = server.createRemoteReceiveQueue(baseMes...
java
public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { super.init(baseMessageQueue); m_receiveQueue = server.createRemoteReceiveQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType()); }
[ "public", "void", "init", "(", "RemoteTask", "server", ",", "BaseMessageQueue", "baseMessageQueue", ")", "throws", "RemoteException", "{", "super", ".", "init", "(", "baseMessageQueue", ")", ";", "m_receiveQueue", "=", "server", ".", "createRemoteReceiveQueue", "(",...
Constructor. @param server The remote server. @param baseMessageQueue My parent message queue.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/message/remote/RemoteMessageReceiver.java#L54-L59
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/BcUtils.java
BcUtils.getSubjectPublicKeyInfo
public static SubjectPublicKeyInfo getSubjectPublicKeyInfo(PublicKeyParameters publicKey) { """ Convert public key parameter to subject public key info. @param publicKey the public key to convert. @return a subject public key info. """ try { if (publicKey instanceof BcPublicKeyParameter...
java
public static SubjectPublicKeyInfo getSubjectPublicKeyInfo(PublicKeyParameters publicKey) { try { if (publicKey instanceof BcPublicKeyParameters) { return ((BcPublicKeyParameters) publicKey).getSubjectPublicKeyInfo(); } else { return SubjectPublicKeyIn...
[ "public", "static", "SubjectPublicKeyInfo", "getSubjectPublicKeyInfo", "(", "PublicKeyParameters", "publicKey", ")", "{", "try", "{", "if", "(", "publicKey", "instanceof", "BcPublicKeyParameters", ")", "{", "return", "(", "(", "BcPublicKeyParameters", ")", "publicKey", ...
Convert public key parameter to subject public key info. @param publicKey the public key to convert. @return a subject public key info.
[ "Convert", "public", "key", "parameter", "to", "subject", "public", "key", "info", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/BcUtils.java#L110-L122
iwgang/SimplifySpan
library/src/main/java/cn/iwgang/simplifyspan/SimplifySpanBuild.java
SimplifySpanBuild.appendMultiClickable
public SimplifySpanBuild appendMultiClickable(SpecialClickableUnit specialClickableUnit, Object... specialUnitOrStrings) { """ append multi clickable SpecialUnit or String @param specialClickableUnit SpecialClickableUnit @param specialUnitOrStrings Unit Or String @return """ processMultiClickableS...
java
public SimplifySpanBuild appendMultiClickable(SpecialClickableUnit specialClickableUnit, Object... specialUnitOrStrings) { processMultiClickableSpecialUnit(false, specialClickableUnit, specialUnitOrStrings); return this; }
[ "public", "SimplifySpanBuild", "appendMultiClickable", "(", "SpecialClickableUnit", "specialClickableUnit", ",", "Object", "...", "specialUnitOrStrings", ")", "{", "processMultiClickableSpecialUnit", "(", "false", ",", "specialClickableUnit", ",", "specialUnitOrStrings", ")", ...
append multi clickable SpecialUnit or String @param specialClickableUnit SpecialClickableUnit @param specialUnitOrStrings Unit Or String @return
[ "append", "multi", "clickable", "SpecialUnit", "or", "String" ]
train
https://github.com/iwgang/SimplifySpan/blob/34e917cd5497215c8abc07b3d8df187949967283/library/src/main/java/cn/iwgang/simplifyspan/SimplifySpanBuild.java#L240-L243
UrielCh/ovh-java-sdk
ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java
ApiOvhClusterhadoop.serviceName_node_GET
public ArrayList<String> serviceName_node_GET(String serviceName, OvhNodeProfileEnum softwareProfile) throws IOException { """ Nodes of the Cluster REST: GET /cluster/hadoop/{serviceName}/node @param softwareProfile [required] Filter the value of softwareProfile property (=) @param serviceName [required] The ...
java
public ArrayList<String> serviceName_node_GET(String serviceName, OvhNodeProfileEnum softwareProfile) throws IOException { String qPath = "/cluster/hadoop/{serviceName}/node"; StringBuilder sb = path(qPath, serviceName); query(sb, "softwareProfile", softwareProfile); String resp = exec(qPath, "GET", sb.toString...
[ "public", "ArrayList", "<", "String", ">", "serviceName_node_GET", "(", "String", "serviceName", ",", "OvhNodeProfileEnum", "softwareProfile", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cluster/hadoop/{serviceName}/node\"", ";", "StringBuilder", "sb", ...
Nodes of the Cluster REST: GET /cluster/hadoop/{serviceName}/node @param softwareProfile [required] Filter the value of softwareProfile property (=) @param serviceName [required] The internal name of your cluster
[ "Nodes", "of", "the", "Cluster" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java#L392-L398
enasequence/sequencetools
src/main/java/uk/ac/ebi/embl/flatfile/FlatFileUtils.java
FlatFileUtils.trimRight
public static String trimRight( String string, char c ) { """ Removes all whitespace characters and instances of the given character from the end of the string. """ for( int i = string.length(); i > 0; --i ) { char charAt = string.charAt( i - 1 ); if( charAt != c && c...
java
public static String trimRight( String string, char c ) { for( int i = string.length(); i > 0; --i ) { char charAt = string.charAt( i - 1 ); if( charAt != c && charAt != ' ' && charAt != '\t' && charAt != '\n' && charAt != '\r' ) { ...
[ "public", "static", "String", "trimRight", "(", "String", "string", ",", "char", "c", ")", "{", "for", "(", "int", "i", "=", "string", ".", "length", "(", ")", ";", "i", ">", "0", ";", "--", "i", ")", "{", "char", "charAt", "=", "string", ".", ...
Removes all whitespace characters and instances of the given character from the end of the string.
[ "Removes", "all", "whitespace", "characters", "and", "instances", "of", "the", "given", "character", "from", "the", "end", "of", "the", "string", "." ]
train
https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/flatfile/FlatFileUtils.java#L123-L140
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java
SpiderService.addAutoTable
private TableDefinition addAutoTable(ApplicationDefinition appDef, String tableName) { """ Add an implicit table to the given application and return its new TableDefinition. """ m_logger.debug("Adding implicit table '{}' to application '{}'", tableName, appDef.getAppName()); Tenant tenant = T...
java
private TableDefinition addAutoTable(ApplicationDefinition appDef, String tableName) { m_logger.debug("Adding implicit table '{}' to application '{}'", tableName, appDef.getAppName()); Tenant tenant = Tenant.getTenant(appDef); TableDefinition tableDef = new TableDefinition(appDef); t...
[ "private", "TableDefinition", "addAutoTable", "(", "ApplicationDefinition", "appDef", ",", "String", "tableName", ")", "{", "m_logger", ".", "debug", "(", "\"Adding implicit table '{}' to application '{}'\"", ",", "tableName", ",", "appDef", ".", "getAppName", "(", ")",...
Add an implicit table to the given application and return its new TableDefinition.
[ "Add", "an", "implicit", "table", "to", "the", "given", "application", "and", "return", "its", "new", "TableDefinition", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java#L515-L524
phax/ph-javacc-maven-plugin
src/main/java/org/codehaus/mojo/javacc/JTB.java
JTB.getOutputFile
public File getOutputFile () { """ Gets the absolute path to the enhanced grammar file generated by JTB. @return The absolute path to the enhanced grammar file generated by JTB or <code>null</code> if either the input file or the output directory have not been set. """ File outputFile = null; if (...
java
public File getOutputFile () { File outputFile = null; if (this.outputDirectory != null && this.inputFile != null) { final String fileName = FileUtils.removeExtension (this.inputFile.getName ()) + ".jj"; outputFile = new File (this.outputDirectory, fileName); } return outputFile; }
[ "public", "File", "getOutputFile", "(", ")", "{", "File", "outputFile", "=", "null", ";", "if", "(", "this", ".", "outputDirectory", "!=", "null", "&&", "this", ".", "inputFile", "!=", "null", ")", "{", "final", "String", "fileName", "=", "FileUtils", "....
Gets the absolute path to the enhanced grammar file generated by JTB. @return The absolute path to the enhanced grammar file generated by JTB or <code>null</code> if either the input file or the output directory have not been set.
[ "Gets", "the", "absolute", "path", "to", "the", "enhanced", "grammar", "file", "generated", "by", "JTB", "." ]
train
https://github.com/phax/ph-javacc-maven-plugin/blob/99497a971fe59ab2289258ca7ddcfa40e651f19f/src/main/java/org/codehaus/mojo/javacc/JTB.java#L174-L183
Impetus/Kundera
src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java
KuduDBDataHandler.addToRow
public static void addToRow(PartialRow row, String jpaColumnName, Object value, Type type) { """ Adds the to row. @param row the row @param jpaColumnName the jpa column name @param value the value @param type the type """ if (value == null) { row.setNull(jpaColumnName); ...
java
public static void addToRow(PartialRow row, String jpaColumnName, Object value, Type type) { if (value == null) { row.setNull(jpaColumnName); } else { switch (type) { case BINARY: row.addBinary(jpaColumnName, (by...
[ "public", "static", "void", "addToRow", "(", "PartialRow", "row", ",", "String", "jpaColumnName", ",", "Object", "value", ",", "Type", "type", ")", "{", "if", "(", "value", "==", "null", ")", "{", "row", ".", "setNull", "(", "jpaColumnName", ")", ";", ...
Adds the to row. @param row the row @param jpaColumnName the jpa column name @param value the value @param type the type
[ "Adds", "the", "to", "row", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java#L69-L112
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonMultiPoint
public static void toGeojsonMultiPoint(MultiPoint multiPoint, StringBuilder sb) { """ Coordinates of a MultiPoint are an array of positions. Syntax: { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } @param multiPoint @param sb """ sb.append("{\"type\":\"MultiPoint\",\"co...
java
public static void toGeojsonMultiPoint(MultiPoint multiPoint, StringBuilder sb) { sb.append("{\"type\":\"MultiPoint\",\"coordinates\":"); toGeojsonCoordinates(multiPoint.getCoordinates(), sb); sb.append("}"); }
[ "public", "static", "void", "toGeojsonMultiPoint", "(", "MultiPoint", "multiPoint", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"{\\\"type\\\":\\\"MultiPoint\\\",\\\"coordinates\\\":\"", ")", ";", "toGeojsonCoordinates", "(", "multiPoint", ".", "ge...
Coordinates of a MultiPoint are an array of positions. Syntax: { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } @param multiPoint @param sb
[ "Coordinates", "of", "a", "MultiPoint", "are", "an", "array", "of", "positions", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L126-L130
chr78rm/tracelogger
src/main/java/de/christofreichardt/diagnosis/JDKLoggingRouter.java
JDKLoggingRouter.logMessage
@Override public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName) { """ Calls the {@link Logger} for the given clazz. @param logLevel the log level @param message the to be logged message @param clazz the originating class """ Logger logger = Logger.getLogger(claz...
java
@Override public void logMessage(LogLevel logLevel, String message, Class clazz, String methodName) { Logger logger = Logger.getLogger(clazz.getName()); logger.logp(convertToJDK14Level(logLevel), clazz.getName(), methodName, message); }
[ "@", "Override", "public", "void", "logMessage", "(", "LogLevel", "logLevel", ",", "String", "message", ",", "Class", "clazz", ",", "String", "methodName", ")", "{", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "clazz", ".", "getName", "(", ")...
Calls the {@link Logger} for the given clazz. @param logLevel the log level @param message the to be logged message @param clazz the originating class
[ "Calls", "the", "{", "@link", "Logger", "}", "for", "the", "given", "clazz", "." ]
train
https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/JDKLoggingRouter.java#L56-L60
marvec/encryptor
encryptor-util/src/main/java/org/marvec/encryptor/util/EncryptionUtil.java
EncryptionUtil.getPemPrivateKey
private PrivateKey getPemPrivateKey(final String keyString) throws EncryptionException { """ Initializes a private key from a string. @param keyString String representation of the key. @return An initialized private key. @throws EncryptionException When it was not possible to initialize the key. """ ...
java
private PrivateKey getPemPrivateKey(final String keyString) throws EncryptionException { try { final String privKeyPEM = keyString.replace("-----BEGIN PRIVATE KEY-----", "").replace("-----END PRIVATE KEY-----", "").replaceAll("\\v", ""); final Base64 b64 = new Base64(); final byte[] de...
[ "private", "PrivateKey", "getPemPrivateKey", "(", "final", "String", "keyString", ")", "throws", "EncryptionException", "{", "try", "{", "final", "String", "privKeyPEM", "=", "keyString", ".", "replace", "(", "\"-----BEGIN PRIVATE KEY-----\"", ",", "\"\"", ")", ".",...
Initializes a private key from a string. @param keyString String representation of the key. @return An initialized private key. @throws EncryptionException When it was not possible to initialize the key.
[ "Initializes", "a", "private", "key", "from", "a", "string", "." ]
train
https://github.com/marvec/encryptor/blob/a3fd82fd98ee5aeec4116b66ae3320f724cc6097/encryptor-util/src/main/java/org/marvec/encryptor/util/EncryptionUtil.java#L139-L153
geomajas/geomajas-project-client-gwt
plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/MultiFeatureListGrid.java
MultiFeatureListGrid.addButton
@Api public void addButton(String layerId, ToolStripButton button, int position) { """ Add a button in the tool strip at the requested position. @param layerId layer which needs the extra button @param button button to add @param position position """ extraButtons.add(new ExtraButton(constructIdSaveLay...
java
@Api public void addButton(String layerId, ToolStripButton button, int position) { extraButtons.add(new ExtraButton(constructIdSaveLayerId(layerId), button, position)); }
[ "@", "Api", "public", "void", "addButton", "(", "String", "layerId", ",", "ToolStripButton", "button", ",", "int", "position", ")", "{", "extraButtons", ".", "add", "(", "new", "ExtraButton", "(", "constructIdSaveLayerId", "(", "layerId", ")", ",", "button", ...
Add a button in the tool strip at the requested position. @param layerId layer which needs the extra button @param button button to add @param position position
[ "Add", "a", "button", "in", "the", "tool", "strip", "at", "the", "requested", "position", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/MultiFeatureListGrid.java#L203-L206
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java
ParameterBuilder.checkPattern
private String checkPattern(final String value, final Pattern pattern, final boolean withBrace) { """ Check if the given string contains an environment variable. @param value the string value to parse @param pattern the regex pattern to use @param withBrace true for ${varname}, false for $varname @return t...
java
private String checkPattern(final String value, final Pattern pattern, final boolean withBrace) { String res = value; final Matcher matcher = pattern.matcher(value); while (matcher.find()) { final String envName = matcher.group(2); if (!this.varenvMap.containsKey(env...
[ "private", "String", "checkPattern", "(", "final", "String", "value", ",", "final", "Pattern", "pattern", ",", "final", "boolean", "withBrace", ")", "{", "String", "res", "=", "value", ";", "final", "Matcher", "matcher", "=", "pattern", ".", "matcher", "(", ...
Check if the given string contains an environment variable. @param value the string value to parse @param pattern the regex pattern to use @param withBrace true for ${varname}, false for $varname @return the given string updated with right environment variable content
[ "Check", "if", "the", "given", "string", "contains", "an", "environment", "variable", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java#L181-L202
Impetus/Kundera
src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/KunderaPropertyBuilder.java
KunderaPropertyBuilder.getKunderaClientToLookupClass
private static String getKunderaClientToLookupClass(String client) { """ Gets the kundera client to lookup class. @param client the client @return the kundera client to lookup class """ Datasource datasource; try { datasource = Datasource.valueOf(client.toUpperCase());...
java
private static String getKunderaClientToLookupClass(String client) { Datasource datasource; try { datasource = Datasource.valueOf(client.toUpperCase()); } catch (IllegalArgumentException ex) { LOGGER.error(client + " is not supported!", ex); ...
[ "private", "static", "String", "getKunderaClientToLookupClass", "(", "String", "client", ")", "{", "Datasource", "datasource", ";", "try", "{", "datasource", "=", "Datasource", ".", "valueOf", "(", "client", ".", "toUpperCase", "(", ")", ")", ";", "}", "catch"...
Gets the kundera client to lookup class. @param client the client @return the kundera client to lookup class
[ "Gets", "the", "kundera", "client", "to", "lookup", "class", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-ethereum/src/main/java/com/impetus/kundera/blockchain/util/KunderaPropertyBuilder.java#L170-L185
kikinteractive/ice
ice/src/main/java/com/kik/config/ice/ConfigSystem.java
ConfigSystem.overrideModule
public static <C> Module overrideModule( final Class<C> configInterface, final Named name, final OverrideConsumer<C> overrideConsumer) { """ Generates a Guice Module for use with Injector creation. The module created is intended to be used in a <code>Modules.override</code> manner, to prod...
java
public static <C> Module overrideModule( final Class<C> configInterface, final Named name, final OverrideConsumer<C> overrideConsumer) { return overrideModule(configInterface, Optional.of(name), overrideConsumer); }
[ "public", "static", "<", "C", ">", "Module", "overrideModule", "(", "final", "Class", "<", "C", ">", "configInterface", ",", "final", "Named", "name", ",", "final", "OverrideConsumer", "<", "C", ">", "overrideConsumer", ")", "{", "return", "overrideModule", ...
Generates a Guice Module for use with Injector creation. The module created is intended to be used in a <code>Modules.override</code> manner, to produce overrides for static configuration. @param configInterface The configuration interface type for which values are to be overridden @param name Named annot...
[ "Generates", "a", "Guice", "Module", "for", "use", "with", "Injector", "creation", ".", "The", "module", "created", "is", "intended", "to", "be", "used", "in", "a", "<code", ">", "Modules", ".", "override<", "/", "code", ">", "manner", "to", "produce", "...
train
https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/ConfigSystem.java#L189-L195
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java
SecurityActions.setAccessible
static void setAccessible(final Method m, final boolean value) { """ Invoke setAccessible on a method @param m The method @param value The value """ AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); ...
java
static void setAccessible(final Method m, final boolean value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); return null; } }); }
[ "static", "void", "setAccessible", "(", "final", "Method", "m", ",", "final", "boolean", "value", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "Object", ">", "(", ")", "{", "public", "Object", "run", "(", ")", "{"...
Invoke setAccessible on a method @param m The method @param value The value
[ "Invoke", "setAccessible", "on", "a", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java#L46-L56
togglz/togglz
core/src/main/java/org/togglz/core/activation/AbstractPropertyDrivenActivationStrategy.java
AbstractPropertyDrivenActivationStrategy.getPropertyName
protected String getPropertyName(FeatureState featureState, String parameterName) { """ <p> Returns the name of the property on which to base the activation of the feature. </p> <p> This method will first attempt to use the value of the parameter with the name provided. If that does not return a valid propert...
java
protected String getPropertyName(FeatureState featureState, String parameterName) { String propertyName = featureState.getParameter(parameterName); if (Strings.isNotBlank(propertyName)) { return propertyName; } return DEFAULT_PROPERTY_PREFIX + featureState.getFeature().name(...
[ "protected", "String", "getPropertyName", "(", "FeatureState", "featureState", ",", "String", "parameterName", ")", "{", "String", "propertyName", "=", "featureState", ".", "getParameter", "(", "parameterName", ")", ";", "if", "(", "Strings", ".", "isNotBlank", "(...
<p> Returns the name of the property on which to base the activation of the feature. </p> <p> This method will first attempt to use the value of the parameter with the name provided. If that does not return a valid property name (i.e. non-blank), then a property name will be constructed using a common prefix ("{@value ...
[ "<p", ">", "Returns", "the", "name", "of", "the", "property", "on", "which", "to", "base", "the", "activation", "of", "the", "feature", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "will", "first", "attempt", "to", "use", "the", "value", "of...
train
https://github.com/togglz/togglz/blob/76d3ffbc8e3fac5a6cb566cc4afbd8dd5f06c4e5/core/src/main/java/org/togglz/core/activation/AbstractPropertyDrivenActivationStrategy.java#L63-L70
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java
ClientFactory.getNamedClient
public static synchronized IClient getNamedClient(String name, Class<? extends IClientConfig> configClass) { """ Return the named client from map if already created. Otherwise creates the client using the configuration returned by {@link #createNamedClient(String, Class)}. @throws RuntimeException if an error o...
java
public static synchronized IClient getNamedClient(String name, Class<? extends IClientConfig> configClass) { if (simpleClientMap.get(name) != null) { return simpleClientMap.get(name); } try { return createNamedClient(name, configClass); } catch (ClientException e) { ...
[ "public", "static", "synchronized", "IClient", "getNamedClient", "(", "String", "name", ",", "Class", "<", "?", "extends", "IClientConfig", ">", "configClass", ")", "{", "if", "(", "simpleClientMap", ".", "get", "(", "name", ")", "!=", "null", ")", "{", "r...
Return the named client from map if already created. Otherwise creates the client using the configuration returned by {@link #createNamedClient(String, Class)}. @throws RuntimeException if an error occurs in creating the client.
[ "Return", "the", "named", "client", "from", "map", "if", "already", "created", ".", "Otherwise", "creates", "the", "client", "using", "the", "configuration", "returned", "by", "{", "@link", "#createNamedClient", "(", "String", "Class", ")", "}", "." ]
train
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/client/ClientFactory.java#L111-L120
UrielCh/ovh-java-sdk
ovh-java-sdk-core/src/main/java/net/minidev/ovh/core/ApiOvhCore.java
ApiOvhCore.getRequest
private HttpURLConnection getRequest(String method, URL url) throws IOException { """ Build an HTTP Request with customs headers (Content-Type, X-Ovh-Application) @param method @param url @return @throws IOException """ HttpURLConnection connection; if (proxy == null) connection = (HttpURLConnecti...
java
private HttpURLConnection getRequest(String method, URL url) throws IOException { HttpURLConnection connection; if (proxy == null) connection = (HttpURLConnection) url.openConnection(); else connection = (HttpURLConnection) url.openConnection(proxy); connection.setRequestMethod(method); connection.setRe...
[ "private", "HttpURLConnection", "getRequest", "(", "String", "method", ",", "URL", "url", ")", "throws", "IOException", "{", "HttpURLConnection", "connection", ";", "if", "(", "proxy", "==", "null", ")", "connection", "=", "(", "HttpURLConnection", ")", "url", ...
Build an HTTP Request with customs headers (Content-Type, X-Ovh-Application) @param method @param url @return @throws IOException
[ "Build", "an", "HTTP", "Request", "with", "customs", "headers", "(", "Content", "-", "Type", "X", "-", "Ovh", "-", "Application", ")" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-core/src/main/java/net/minidev/ovh/core/ApiOvhCore.java#L269-L281
tinosteinort/beanrepository
src/main/java/com/github/tinosteinort/beanrepository/BeanRepository.java
BeanRepository.getPrototypeBean
public <T> T getPrototypeBean(final Supplier<T> creator) { """ Returns a new created Object with the given {@code creator}. This equates to a {@code prototype} Bean. It is not required to configure a {@code prototype} Bean in the BeanRepository before. This Method can be used to pass Parameters to the Constructo...
java
public <T> T getPrototypeBean(final Supplier<T> creator) { final PrototypeProvider provider = new PrototypeProvider(name, repository -> creator.get()); return provider.getBean(this, dryRun); }
[ "public", "<", "T", ">", "T", "getPrototypeBean", "(", "final", "Supplier", "<", "T", ">", "creator", ")", "{", "final", "PrototypeProvider", "provider", "=", "new", "PrototypeProvider", "(", "name", ",", "repository", "->", "creator", ".", "get", "(", ")"...
Returns a new created Object with the given {@code creator}. This equates to a {@code prototype} Bean. It is not required to configure a {@code prototype} Bean in the BeanRepository before. This Method can be used to pass Parameters to the Constructor of an Object. Use this Method if the {@code prototype} Bean has <b>n...
[ "Returns", "a", "new", "created", "Object", "with", "the", "given", "{", "@code", "creator", "}", ".", "This", "equates", "to", "a", "{", "@code", "prototype", "}", "Bean", ".", "It", "is", "not", "required", "to", "configure", "a", "{", "@code", "prot...
train
https://github.com/tinosteinort/beanrepository/blob/4131d1e380ebc511392f3bda9d0966997bb34a62/src/main/java/com/github/tinosteinort/beanrepository/BeanRepository.java#L78-L81
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ProjectsInner.java
ProjectsInner.createOrUpdateAsync
public Observable<ProjectInner> createOrUpdateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { """ Create or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one....
java
public Observable<ProjectInner> createOrUpdateAsync(String groupName, String serviceName, String projectName, ProjectInner parameters) { return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, parameters).map(new Func1<ServiceResponse<ProjectInner>, ProjectInner>() { @Over...
[ "public", "Observable", "<", "ProjectInner", ">", "createOrUpdateAsync", "(", "String", "groupName", ",", "String", "serviceName", ",", "String", "projectName", ",", "ProjectInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "groupN...
Create or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one. @param groupName Name of the resource group @param serviceName Name of the service @param projectName Name of the project @param parameters Infor...
[ "Create", "or", "update", "project", ".", "The", "project", "resource", "is", "a", "nested", "resource", "representing", "a", "stored", "migration", "project", ".", "The", "PUT", "method", "creates", "a", "new", "project", "or", "updates", "an", "existing", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ProjectsInner.java#L263-L270
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/Ray.java
Ray.getPointAt
public Point getPointAt(double t) { """ Gets the {@link Point} at the specified distance. @param t the distance @return the point at the distance t """ if (Double.isNaN(t)) return null; return new Point(origin.x + t * direction.x, origin.y + t * direction.y, origin.z + t * direction.z); }
java
public Point getPointAt(double t) { if (Double.isNaN(t)) return null; return new Point(origin.x + t * direction.x, origin.y + t * direction.y, origin.z + t * direction.z); }
[ "public", "Point", "getPointAt", "(", "double", "t", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "t", ")", ")", "return", "null", ";", "return", "new", "Point", "(", "origin", ".", "x", "+", "t", "*", "direction", ".", "x", ",", "origin", "...
Gets the {@link Point} at the specified distance. @param t the distance @return the point at the distance t
[ "Gets", "the", "{", "@link", "Point", "}", "at", "the", "specified", "distance", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/Ray.java#L89-L94
mlhartme/jasmin
src/main/java/net/oneandone/jasmin/model/Repository.java
Repository.loadApplication
public void loadApplication(Resolver resolver, Node docroot, Node descriptor) throws IOException { """ An application is not a classpath item because jasmin.xml is from WEB-INF, it's not a resource. I don't want to make it a resource (by moving WEB-INF/jasmin.xml to META-INF/jasmin.xml) because all other config ...
java
public void loadApplication(Resolver resolver, Node docroot, Node descriptor) throws IOException { Node properties; // pws removes WEB-INF classes and uses target/classes instead ... properties = docroot.getParent().join("classes", PROJECT_PROPERTIES); if (!properties.isFile()) { ...
[ "public", "void", "loadApplication", "(", "Resolver", "resolver", ",", "Node", "docroot", ",", "Node", "descriptor", ")", "throws", "IOException", "{", "Node", "properties", ";", "// pws removes WEB-INF classes and uses target/classes instead ...", "properties", "=", "doc...
An application is not a classpath item because jasmin.xml is from WEB-INF, it's not a resource. I don't want to make it a resource (by moving WEB-INF/jasmin.xml to META-INF/jasmin.xml) because all other config files reside in WEB-INF. Some webapps have no META-INF directory at all.
[ "An", "application", "is", "not", "a", "classpath", "item", "because", "jasmin", ".", "xml", "is", "from", "WEB", "-", "INF", "it", "s", "not", "a", "resource", ".", "I", "don", "t", "want", "to", "make", "it", "a", "resource", "(", "by", "moving", ...
train
https://github.com/mlhartme/jasmin/blob/1c44339a2555ae7ffb7d40fd3a7d80d81c3fc39d/src/main/java/net/oneandone/jasmin/model/Repository.java#L264-L273
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/WiredCache.java
WiredCache.onEvictionFromHeap
@Override public void onEvictionFromHeap(final Entry<K, V> e) { """ Nothing done here. Will notify the storage about eviction in some future version. """ CacheEntry<K,V> _currentEntry = heapCache.returnCacheEntry(e); if (syncEntryEvictedListeners != null) { for (CacheEntryEvictedListener<K, V> ...
java
@Override public void onEvictionFromHeap(final Entry<K, V> e) { CacheEntry<K,V> _currentEntry = heapCache.returnCacheEntry(e); if (syncEntryEvictedListeners != null) { for (CacheEntryEvictedListener<K, V> l : syncEntryEvictedListeners) { l.onEntryEvicted(this, _currentEntry); } } }
[ "@", "Override", "public", "void", "onEvictionFromHeap", "(", "final", "Entry", "<", "K", ",", "V", ">", "e", ")", "{", "CacheEntry", "<", "K", ",", "V", ">", "_currentEntry", "=", "heapCache", ".", "returnCacheEntry", "(", "e", ")", ";", "if", "(", ...
Nothing done here. Will notify the storage about eviction in some future version.
[ "Nothing", "done", "here", ".", "Will", "notify", "the", "storage", "about", "eviction", "in", "some", "future", "version", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/WiredCache.java#L667-L675
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepsInner.java
JobStepsInner.getAsync
public Observable<JobStepInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { """ Gets a job step in a job's current version. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azu...
java
public Observable<JobStepInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { return getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName).map(new Func1<ServiceResponse<JobStepInner>, JobStepInner>() { ...
[ "public", "Observable", "<", "JobStepInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "jobName", ",", "String", "stepName", ")", "{", "return", "getWithServiceResponseAsync", "(",...
Gets a job step in a job's current version. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param jobName The name o...
[ "Gets", "a", "job", "step", "in", "a", "job", "s", "current", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepsInner.java#L536-L543
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.findByGroupId
@Override public List<CommerceCountry> findByGroupId(long groupId) { """ Returns all the commerce countries where groupId = &#63;. @param groupId the group ID @return the matching commerce countries """ return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceCountry> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceCountry", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce countries where groupId = &#63;. @param groupId the group ID @return the matching commerce countries
[ "Returns", "all", "the", "commerce", "countries", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L1513-L1516
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/MethodHelpDto.java
MethodHelpDto.fromMethodClass
public static MethodHelpDto fromMethodClass(String parentPath, Method method) { """ Creates a method help DTO from a method object. @param parentPath The parent method path. @param method The method to convert. @return The method help DTO. """ String methodName = _getHttpMethod(method...
java
public static MethodHelpDto fromMethodClass(String parentPath, Method method) { String methodName = _getHttpMethod(method); Path path = method.getAnnotation(Path.class); Description description = method.getAnnotation(Description.class); Produces produces = method.getAnnotation(Produces.c...
[ "public", "static", "MethodHelpDto", "fromMethodClass", "(", "String", "parentPath", ",", "Method", "method", ")", "{", "String", "methodName", "=", "_getHttpMethod", "(", "method", ")", ";", "Path", "path", "=", "method", ".", "getAnnotation", "(", "Path", "....
Creates a method help DTO from a method object. @param parentPath The parent method path. @param method The method to convert. @return The method help DTO.
[ "Creates", "a", "method", "help", "DTO", "from", "a", "method", "object", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/MethodHelpDto.java#L168-L197
spring-projects/spring-security-oauth
spring-security-oauth2/src/main/java/org/springframework/security/oauth2/common/exceptions/OAuth2Exception.java
OAuth2Exception.addAdditionalInformation
public void addAdditionalInformation(String key, String value) { """ Add some additional information with this OAuth error. @param key The key. @param value The value. """ if (this.additionalInformation == null) { this.additionalInformation = new TreeMap<String, String>(); } this.additionalInform...
java
public void addAdditionalInformation(String key, String value) { if (this.additionalInformation == null) { this.additionalInformation = new TreeMap<String, String>(); } this.additionalInformation.put(key, value); }
[ "public", "void", "addAdditionalInformation", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "this", ".", "additionalInformation", "==", "null", ")", "{", "this", ".", "additionalInformation", "=", "new", "TreeMap", "<", "String", ",", "S...
Add some additional information with this OAuth error. @param key The key. @param value The value.
[ "Add", "some", "additional", "information", "with", "this", "OAuth", "error", "." ]
train
https://github.com/spring-projects/spring-security-oauth/blob/bbae0027eceb2c74a21ac26bbc86142dc732ffbe/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/common/exceptions/OAuth2Exception.java#L79-L86
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientImpl.java
ClientImpl.callProcedureWithClientTimeout
public boolean callProcedureWithClientTimeout( ProcedureCallback callback, int batchTimeout, boolean allPartition, String procName, long clientTimeout, TimeUnit clientTimeoutUnit, Object... parameters) throws IOExcep...
java
public boolean callProcedureWithClientTimeout( ProcedureCallback callback, int batchTimeout, boolean allPartition, String procName, long clientTimeout, TimeUnit clientTimeoutUnit, Object... parameters) throws IOExcep...
[ "public", "boolean", "callProcedureWithClientTimeout", "(", "ProcedureCallback", "callback", ",", "int", "batchTimeout", ",", "boolean", "allPartition", ",", "String", "procName", ",", "long", "clientTimeout", ",", "TimeUnit", "clientTimeoutUnit", ",", "Object", "...", ...
Asynchronously invoke a procedure call. @param callback TransactionCallback that will be invoked with procedure results. @param batchTimeout procedure invocation batch timeout. @param procName class name (not qualified by package) of the procedure to execute. @param timeout timeout for the procedure @param allPartitio...
[ "Asynchronously", "invoke", "a", "procedure", "call", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientImpl.java#L401-L428
alkacon/opencms-core
src/org/opencms/staticexport/CmsDefaultLinkSubstitutionHandler.java
CmsDefaultLinkSubstitutionHandler.isSecureLink
protected boolean isSecureLink(CmsObject cms, String vfsName, CmsSite targetSite, boolean secureRequest) { """ Checks if the link target is a secure link.<p @param cms the current CMS context @param vfsName the path of the link target @param targetSite the target site containing the detail page @param secure...
java
protected boolean isSecureLink(CmsObject cms, String vfsName, CmsSite targetSite, boolean secureRequest) { return OpenCms.getStaticExportManager().isSecureLink(cms, vfsName, targetSite.getSiteRoot(), secureRequest); }
[ "protected", "boolean", "isSecureLink", "(", "CmsObject", "cms", ",", "String", "vfsName", ",", "CmsSite", "targetSite", ",", "boolean", "secureRequest", ")", "{", "return", "OpenCms", ".", "getStaticExportManager", "(", ")", ".", "isSecureLink", "(", "cms", ","...
Checks if the link target is a secure link.<p @param cms the current CMS context @param vfsName the path of the link target @param targetSite the target site containing the detail page @param secureRequest true if the currently running request is secure @return true if the link should be a secure link
[ "Checks", "if", "the", "link", "target", "is", "a", "secure", "link", ".", "<p" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsDefaultLinkSubstitutionHandler.java#L692-L695
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java
ChartModelProvider.createBubbleChart
@SuppressWarnings ("squid:S00107") public static Chart createBubbleChart(String chartCaption, String xLabel, List<String> xTickLabels, String yLabel, List<String> yTickLabels, int xAxisLabelRotation, int yAxisLabelRotation, Double[][] values) { """ Creates a bubble chart without averages and quartiles @param ...
java
@SuppressWarnings ("squid:S00107") public static Chart createBubbleChart(String chartCaption, String xLabel, List<String> xTickLabels, String yLabel, List<String> yTickLabels, int xAxisLabelRotation, int yAxisLabelRotation, Double[][] values) { return createBubbleChart(chartCaption, xLabel, xTickLabels, yLabel, y...
[ "@", "SuppressWarnings", "(", "\"squid:S00107\"", ")", "public", "static", "Chart", "createBubbleChart", "(", "String", "chartCaption", ",", "String", "xLabel", ",", "List", "<", "String", ">", "xTickLabels", ",", "String", "yLabel", ",", "List", "<", "String", ...
Creates a bubble chart without averages and quartiles @param chartCaption chart caption @param xLabel x axis label @param xTickLabels x axis tick labels @param yLabel y axis label @param yTickLabels y axis tick labels @param xAxisLabelRotation x axis label rotation @param yAxisLabelRotation y axis label rotation @para...
[ "Creates", "a", "bubble", "chart", "without", "averages", "and", "quartiles" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java#L598-L601
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getWvWMatchInfo
public List<? extends WvWMatch> getWvWMatchInfo(String[] ids, WvWMatch.Endpoint type) throws GuildWars2Exception { """ For more info on WvW matches API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/matches">here</a><br/> Get wvw match info using wvw match id(s) @param ids list of wvw match id(s) @pa...
java
public List<? extends WvWMatch> getWvWMatchInfo(String[] ids, WvWMatch.Endpoint type) throws GuildWars2Exception { isParamValid(new ParamChecker(ids)); if (type == null) return getWvWMatchInfoUsingID(ids); try { switch (type) { case All: return getWvWMatchInfoUsingID(ids); case Overview: Resp...
[ "public", "List", "<", "?", "extends", "WvWMatch", ">", "getWvWMatchInfo", "(", "String", "[", "]", "ids", ",", "WvWMatch", ".", "Endpoint", "type", ")", "throws", "GuildWars2Exception", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ")", ")", ...
For more info on WvW matches API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/matches">here</a><br/> Get wvw match info using wvw match id(s) @param ids list of wvw match id(s) @param type endpoint type @return list of wvw match info, exact class depend on endpoint type @throws GuildWars2Exception see {@lin...
[ "For", "more", "info", "on", "WvW", "matches", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "wvw", "/", "matches", ">", "here<", "/", "a", ">", "<br", "/", ">...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L3572-L3597
google/auto
value/src/main/java/com/google/auto/value/processor/TypeEncoder.java
TypeEncoder.encodeWithAnnotations
static String encodeWithAnnotations(TypeMirror type, Set<TypeMirror> excludedAnnotationTypes) { """ Encodes the given type and its type annotations. The class comment for {@link TypeEncoder} covers the details of annotation encoding. @param excludedAnnotationTypes annotations not to include in the encoding. Fo...
java
static String encodeWithAnnotations(TypeMirror type, Set<TypeMirror> excludedAnnotationTypes) { StringBuilder sb = new StringBuilder(); return new AnnotatedEncodingTypeVisitor(excludedAnnotationTypes).visit2(type, sb).toString(); }
[ "static", "String", "encodeWithAnnotations", "(", "TypeMirror", "type", ",", "Set", "<", "TypeMirror", ">", "excludedAnnotationTypes", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "return", "new", "AnnotatedEncodingTypeVisitor", "(", ...
Encodes the given type and its type annotations. The class comment for {@link TypeEncoder} covers the details of annotation encoding. @param excludedAnnotationTypes annotations not to include in the encoding. For example, if {@code com.example.Nullable} is in this set then the encoding will not include this {@code @Nu...
[ "Encodes", "the", "given", "type", "and", "its", "type", "annotations", ".", "The", "class", "comment", "for", "{", "@link", "TypeEncoder", "}", "covers", "the", "details", "of", "annotation", "encoding", "." ]
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/value/src/main/java/com/google/auto/value/processor/TypeEncoder.java#L110-L113
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_tcp_route_routeId_GET
public OvhRouteTcp serviceName_tcp_route_routeId_GET(String serviceName, Long routeId) throws IOException { """ Get this object properties REST: GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId} @param serviceName [required] The internal name of your IP load balancing @param routeId [required] Id of your...
java
public OvhRouteTcp serviceName_tcp_route_routeId_GET(String serviceName, Long routeId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/route/{routeId}"; StringBuilder sb = path(qPath, serviceName, routeId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, Ovh...
[ "public", "OvhRouteTcp", "serviceName_tcp_route_routeId_GET", "(", "String", "serviceName", ",", "Long", "routeId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/tcp/route/{routeId}\"", ";", "StringBuilder", "sb", "=", "path", ...
Get this object properties REST: GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId} @param serviceName [required] The internal name of your IP load balancing @param routeId [required] Id of your route
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1306-L1311
cache2k/cache2k
cache2k-jcache/src/main/java/org/cache2k/jcache/provider/event/AsyncDispatcher.java
AsyncDispatcher.deliverAsyncEvent
void deliverAsyncEvent(final EntryEvent<K,V> _event) { """ If listeners are registered for this event type, run the listeners or queue the event, if already something is happening for this key. """ if (asyncListenerByType.get(_event.getEventType()).isEmpty()) { return; } List<Listener<K,V>> ...
java
void deliverAsyncEvent(final EntryEvent<K,V> _event) { if (asyncListenerByType.get(_event.getEventType()).isEmpty()) { return; } List<Listener<K,V>> _listeners = new ArrayList<Listener<K, V>>(asyncListenerByType.get(_event.getEventType())); if (_listeners.isEmpty()) { return; } ...
[ "void", "deliverAsyncEvent", "(", "final", "EntryEvent", "<", "K", ",", "V", ">", "_event", ")", "{", "if", "(", "asyncListenerByType", ".", "get", "(", "_event", ".", "getEventType", "(", ")", ")", ".", "isEmpty", "(", ")", ")", "{", "return", ";", ...
If listeners are registered for this event type, run the listeners or queue the event, if already something is happening for this key.
[ "If", "listeners", "are", "registered", "for", "this", "event", "type", "run", "the", "listeners", "or", "queue", "the", "event", "if", "already", "something", "is", "happening", "for", "this", "key", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-jcache/src/main/java/org/cache2k/jcache/provider/event/AsyncDispatcher.java#L118-L138
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/PartnersInner.java
PartnersInner.createOrUpdate
public IntegrationAccountPartnerInner createOrUpdate(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { """ Creates or updates an integration account partner. @param resourceGroupName The resource group name. @param integrationAccountName The ...
java
public IntegrationAccountPartnerInner createOrUpdate(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner).toBlocking().single().body();...
[ "public", "IntegrationAccountPartnerInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "partnerName", ",", "IntegrationAccountPartnerInner", "partner", ")", "{", "return", "createOrUpdateWithServiceResponseAsync",...
Creates or updates an integration account partner. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param partnerName The integration account partner name. @param partner The integration account partner. @throws IllegalArgumentException thrown if parameters...
[ "Creates", "or", "updates", "an", "integration", "account", "partner", "." ]
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/PartnersInner.java#L448-L450
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getAchievementProgression
public void getAchievementProgression(String API, Callback<List<AchievementProgression>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Account API go <a href="https://wiki.guildwars2.com/wiki/API:2/account">here</a><br/> Give user the access to {@link Callback#onResponse(Call, ...
java
public void getAchievementProgression(String API, Callback<List<AchievementProgression>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API)); gw2API.getAchievementProgression(API).enqueue(callback); }
[ "public", "void", "getAchievementProgression", "(", "String", "API", ",", "Callback", "<", "List", "<", "AchievementProgression", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", ...
For more info on Account API go <a href="https://wiki.guildwars2.com/wiki/API:2/account">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param API API key @param callback callback that is going to be...
[ "For", "more", "info", "on", "Account", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "account", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L179-L182
samskivert/pythagoras
src/main/java/pythagoras/i/Points.java
Points.distanceSq
public static int distanceSq (int x1, int y1, int x2, int y2) { """ Returns the squared Euclidian distance between the specified two points. """ x2 -= x1; y2 -= y1; return x2 * x2 + y2 * y2; }
java
public static int distanceSq (int x1, int y1, int x2, int y2) { x2 -= x1; y2 -= y1; return x2 * x2 + y2 * y2; }
[ "public", "static", "int", "distanceSq", "(", "int", "x1", ",", "int", "y1", ",", "int", "x2", ",", "int", "y2", ")", "{", "x2", "-=", "x1", ";", "y2", "-=", "y1", ";", "return", "x2", "*", "x2", "+", "y2", "*", "y2", ";", "}" ]
Returns the squared Euclidian distance between the specified two points.
[ "Returns", "the", "squared", "Euclidian", "distance", "between", "the", "specified", "two", "points", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/i/Points.java#L15-L19
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.zeroPaddingNumber
protected String zeroPaddingNumber(long value, int minDigits, int maxDigits) { """ Formats a number with the specified minimum and maximum number of digits. """ numberFormat.setMinimumIntegerDigits(minDigits); numberFormat.setMaximumIntegerDigits(maxDigits); return numberFormat.format(v...
java
protected String zeroPaddingNumber(long value, int minDigits, int maxDigits) { numberFormat.setMinimumIntegerDigits(minDigits); numberFormat.setMaximumIntegerDigits(maxDigits); return numberFormat.format(value); }
[ "protected", "String", "zeroPaddingNumber", "(", "long", "value", ",", "int", "minDigits", ",", "int", "maxDigits", ")", "{", "numberFormat", ".", "setMinimumIntegerDigits", "(", "minDigits", ")", ";", "numberFormat", ".", "setMaximumIntegerDigits", "(", "maxDigits"...
Formats a number with the specified minimum and maximum number of digits.
[ "Formats", "a", "number", "with", "the", "specified", "minimum", "and", "maximum", "number", "of", "digits", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2287-L2292
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/ItemsUtil.java
ItemsUtil.validateValues
static final <T> void validateValues(final T[] values, final Comparator<? super T> comparator) { """ Checks the sequential validity of the given array of values. They must be unique, monotonically increasing and not null. @param <T> the data type @param values given array of values @param comparator the compar...
java
static final <T> void validateValues(final T[] values, final Comparator<? super T> comparator) { final int lenM1 = values.length - 1; for (int j = 0; j < lenM1; j++) { if ((values[j] != null) && (values[j + 1] != null) && (comparator.compare(values[j], values[j + 1]) < 0)) { continue; ...
[ "static", "final", "<", "T", ">", "void", "validateValues", "(", "final", "T", "[", "]", "values", ",", "final", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "final", "int", "lenM1", "=", "values", ".", "length", "-", "1", ";", ...
Checks the sequential validity of the given array of values. They must be unique, monotonically increasing and not null. @param <T> the data type @param values given array of values @param comparator the comparator for data type T
[ "Checks", "the", "sequential", "validity", "of", "the", "given", "array", "of", "values", ".", "They", "must", "be", "unique", "monotonically", "increasing", "and", "not", "null", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/ItemsUtil.java#L49-L59
UrielCh/ovh-java-sdk
ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java
ApiOvhHorizonView.serviceName_accessPoint_accessPointId_GET
public OvhPool serviceName_accessPoint_accessPointId_GET(String serviceName, Long accessPointId) throws IOException { """ Get this object properties REST: GET /horizonView/{serviceName}/accessPoint/{accessPointId} @param serviceName [required] Domain of the service @param accessPointId [required] Pool id ...
java
public OvhPool serviceName_accessPoint_accessPointId_GET(String serviceName, Long accessPointId) throws IOException { String qPath = "/horizonView/{serviceName}/accessPoint/{accessPointId}"; StringBuilder sb = path(qPath, serviceName, accessPointId); String resp = exec(qPath, "GET", sb.toString(), null); return...
[ "public", "OvhPool", "serviceName_accessPoint_accessPointId_GET", "(", "String", "serviceName", ",", "Long", "accessPointId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/horizonView/{serviceName}/accessPoint/{accessPointId}\"", ";", "StringBuilder", "sb", "...
Get this object properties REST: GET /horizonView/{serviceName}/accessPoint/{accessPointId} @param serviceName [required] Domain of the service @param accessPointId [required] Pool id
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L151-L156
lucee/Lucee
core/src/main/java/lucee/runtime/op/Elvis.java
Elvis.operate
public static boolean operate(PageContext pc, String[] varNames) { """ called by the Elvis operator from the interpreter @param pc @param scope @param varNames @return """ int scope = VariableInterpreter.scopeString2Int(pc.ignoreScopes(), varNames[0]); return _operate(pc, scope, KeyImpl.toKeyArray(varN...
java
public static boolean operate(PageContext pc, String[] varNames) { int scope = VariableInterpreter.scopeString2Int(pc.ignoreScopes(), varNames[0]); return _operate(pc, scope, KeyImpl.toKeyArray(varNames), scope == Scope.SCOPE_UNDEFINED ? 0 : 1); }
[ "public", "static", "boolean", "operate", "(", "PageContext", "pc", ",", "String", "[", "]", "varNames", ")", "{", "int", "scope", "=", "VariableInterpreter", ".", "scopeString2Int", "(", "pc", ".", "ignoreScopes", "(", ")", ",", "varNames", "[", "0", "]",...
called by the Elvis operator from the interpreter @param pc @param scope @param varNames @return
[ "called", "by", "the", "Elvis", "operator", "from", "the", "interpreter" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Elvis.java#L63-L66
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClientImpl.java
MarkLogicClientImpl.performBooleanQuery
public boolean performBooleanQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) { """ executes BooleanQuery @param queryString @param bindings @param tx @param includeInferred @param baseURI @return """ SPARQLQueryDefinition qdef =...
java
public boolean performBooleanQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) { SPARQLQueryDefinition qdef = sparqlManager.newQueryDefinition(queryString); if(notNull(baseURI) && !baseURI.isEmpty()){ qdef.setBaseUri(baseURI);} qde...
[ "public", "boolean", "performBooleanQuery", "(", "String", "queryString", ",", "SPARQLQueryBindingSet", "bindings", ",", "Transaction", "tx", ",", "boolean", "includeInferred", ",", "String", "baseURI", ")", "{", "SPARQLQueryDefinition", "qdef", "=", "sparqlManager", ...
executes BooleanQuery @param queryString @param bindings @param tx @param includeInferred @param baseURI @return
[ "executes", "BooleanQuery" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClientImpl.java#L228-L242
Bearded-Hen/Android-Bootstrap
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java
AwesomeTextView.startRotate
public void startRotate(boolean clockwise, AnimationSpeed speed) { """ Starts a rotating animation on the AwesomeTextView @param clockwise true for clockwise, false for anti clockwise spinning @param speed how fast the item should rotate """ Animation rotate; //set up the rotation anim...
java
public void startRotate(boolean clockwise, AnimationSpeed speed) { Animation rotate; //set up the rotation animation if (clockwise) { rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); } else { rotate...
[ "public", "void", "startRotate", "(", "boolean", "clockwise", ",", "AnimationSpeed", "speed", ")", "{", "Animation", "rotate", ";", "//set up the rotation animation", "if", "(", "clockwise", ")", "{", "rotate", "=", "new", "RotateAnimation", "(", "0", ",", "360"...
Starts a rotating animation on the AwesomeTextView @param clockwise true for clockwise, false for anti clockwise spinning @param speed how fast the item should rotate
[ "Starts", "a", "rotating", "animation", "on", "the", "AwesomeTextView" ]
train
https://github.com/Bearded-Hen/Android-Bootstrap/blob/b3d62cc1847e26d420c53c92665a4fe1e6ee7ecf/AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java#L186-L204
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.getRequestGroups
public Collection<SingularityRequestGroup> getRequestGroups() { """ Retrieve the list of request groups @return A collection of {@link SingularityRequestGroup} """ final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_FORMAT, getApiBase(host)); return getCollection(req...
java
public Collection<SingularityRequestGroup> getRequestGroups() { final Function<String, String> requestUri = (host) -> String.format(REQUEST_GROUPS_FORMAT, getApiBase(host)); return getCollection(requestUri, "request groups", REQUEST_GROUP_COLLECTION); }
[ "public", "Collection", "<", "SingularityRequestGroup", ">", "getRequestGroups", "(", ")", "{", "final", "Function", "<", "String", ",", "String", ">", "requestUri", "=", "(", "host", ")", "-", ">", "String", ".", "format", "(", "REQUEST_GROUPS_FORMAT", ",", ...
Retrieve the list of request groups @return A collection of {@link SingularityRequestGroup}
[ "Retrieve", "the", "list", "of", "request", "groups" ]
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1388-L1392
ontop/ontop
engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java
OneShotSQLGeneratorEngine.generateSourceQuery
SQLExecutableQuery generateSourceQuery(IntermediateQuery intermediateQuery) throws OntopReformulationException { """ Generates and SQL query ready to be executed by Quest. Each query is a SELECT FROM WHERE query. To know more about each of these see the inner method descriptions. Observe that the SQL is prod...
java
SQLExecutableQuery generateSourceQuery(IntermediateQuery intermediateQuery) throws OntopReformulationException { IQ normalizedQuery = normalizeIQ(intermediateQuery); DatalogProgram queryProgram = iq2DatalogTranslator.translate(normalizedQuery); for (CQIE cq : queryProgram.getRules()) { datalogNormalizer....
[ "SQLExecutableQuery", "generateSourceQuery", "(", "IntermediateQuery", "intermediateQuery", ")", "throws", "OntopReformulationException", "{", "IQ", "normalizedQuery", "=", "normalizeIQ", "(", "intermediateQuery", ")", ";", "DatalogProgram", "queryProgram", "=", "iq2DatalogTr...
Generates and SQL query ready to be executed by Quest. Each query is a SELECT FROM WHERE query. To know more about each of these see the inner method descriptions. Observe that the SQL is produced by {@link #generateQuery} @param intermediateQuery
[ "Generates", "and", "SQL", "query", "ready", "to", "be", "executed", "by", "Quest", ".", "Each", "query", "is", "a", "SELECT", "FROM", "WHERE", "query", ".", "To", "know", "more", "about", "each", "of", "these", "see", "the", "inner", "method", "descript...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java#L288-L347
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java
LabelProcessor.generateLabelBuilder
public static Label.Builder generateLabelBuilder(final Locale locale, final String label) { """ Create a new labelBuilder and register label with given locale. @param locale the locale from which the language code is extracted for which the label is added @param label the label to be added @return the upda...
java
public static Label.Builder generateLabelBuilder(final Locale locale, final String label) { return addLabel(Label.newBuilder(), locale.getLanguage(), label); }
[ "public", "static", "Label", ".", "Builder", "generateLabelBuilder", "(", "final", "Locale", "locale", ",", "final", "String", "label", ")", "{", "return", "addLabel", "(", "Label", ".", "newBuilder", "(", ")", ",", "locale", ".", "getLanguage", "(", ")", ...
Create a new labelBuilder and register label with given locale. @param locale the locale from which the language code is extracted for which the label is added @param label the label to be added @return the updated label builder
[ "Create", "a", "new", "labelBuilder", "and", "register", "label", "with", "given", "locale", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L108-L110
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/LogUtils.java
LogUtils.configureLogback
public static void configureLogback( ServletContext servletContext, File logDirFallback, String vHostName, Logger log ) throws FileNotFoundException, MalformedURLException, IOException { """ <p>Reconfigures the logging context.</p> <p>The LoggerContext gets configured with "/WEB-INF/context-logback.xml". There is...
java
public static void configureLogback( ServletContext servletContext, File logDirFallback, String vHostName, Logger log ) throws FileNotFoundException, MalformedURLException, IOException { log.debug("Reconfiguring Logback!"); String systemLogDir = System.getProperty(LOG_DIRECTORY_OVERRIDE, System.getProperty(JBOS...
[ "public", "static", "void", "configureLogback", "(", "ServletContext", "servletContext", ",", "File", "logDirFallback", ",", "String", "vHostName", ",", "Logger", "log", ")", "throws", "FileNotFoundException", ",", "MalformedURLException", ",", "IOException", "{", "lo...
<p>Reconfigures the logging context.</p> <p>The LoggerContext gets configured with "/WEB-INF/context-logback.xml". There is a <code>logDir</code> property set here which is expected to be the directory that the log file is written to.</p> <p>The <code>logDir</code> property gets set on the LoggerContext with the follow...
[ "<p", ">", "Reconfigures", "the", "logging", "context", ".", "<", "/", "p", ">", "<p", ">", "The", "LoggerContext", "gets", "configured", "with", "/", "WEB", "-", "INF", "/", "context", "-", "logback", ".", "xml", ".", "There", "is", "a", "<code", ">...
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/LogUtils.java#L119-L146
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readGroup
public CmsGroup readGroup(CmsRequestContext context, String groupname) throws CmsException { """ Reads a group based on its name.<p> @param context the current request context @param groupname the name of the group that is to be read @return the requested group @throws CmsException if operation was not s...
java
public CmsGroup readGroup(CmsRequestContext context, String groupname) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.readGroup(dbc, CmsOrganizationalUnit.removeLeadingSeparator(groupname)); ...
[ "public", "CmsGroup", "readGroup", "(", "CmsRequestContext", "context", ",", "String", "groupname", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "CmsGroup", "result", "=", "nul...
Reads a group based on its name.<p> @param context the current request context @param groupname the name of the group that is to be read @return the requested group @throws CmsException if operation was not successful
[ "Reads", "a", "group", "based", "on", "its", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4374-L4386
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.concatColumns
public static DMatrixSparseCSC concatColumns(DMatrixSparseCSC left , DMatrixSparseCSC right , @Nullable DMatrixSparseCSC out ) { """ Concats two matrices along their columns (horizontal). @param left Matrix on the left @param right Matrix on the right @param o...
java
public static DMatrixSparseCSC concatColumns(DMatrixSparseCSC left , DMatrixSparseCSC right , @Nullable DMatrixSparseCSC out ) { if( left.numRows != right.numRows ) throw new MatrixDimensionException("Number of rows must match. "+stringShapes(left...
[ "public", "static", "DMatrixSparseCSC", "concatColumns", "(", "DMatrixSparseCSC", "left", ",", "DMatrixSparseCSC", "right", ",", "@", "Nullable", "DMatrixSparseCSC", "out", ")", "{", "if", "(", "left", ".", "numRows", "!=", "right", ".", "numRows", ")", "throw",...
Concats two matrices along their columns (horizontal). @param left Matrix on the left @param right Matrix on the right @param out (Output) (Optional) Storage for combined matrix. Resized. @return Combination of the two matrices
[ "Concats", "two", "matrices", "along", "their", "columns", "(", "horizontal", ")", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1096-L1127
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasesInner.java
DatabasesInner.beginResume
public DatabaseInner beginResume(String resourceGroupName, String serverName, String databaseName) { """ Resumes a database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The nam...
java
public DatabaseInner beginResume(String resourceGroupName, String serverName, String databaseName) { return beginResumeWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
[ "public", "DatabaseInner", "beginResume", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "beginResumeWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "databaseName", ")", "....
Resumes a database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database to be resumed. @throws IllegalArgumentException thr...
[ "Resumes", "a", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasesInner.java#L1475-L1477
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.assertSeleniumHasAttributeValue
@Then("^the element on index '(\\d+?)' has '(.+?)' as '(.+?)'$") public void assertSeleniumHasAttributeValue(Integer index, String attribute, String value) { """ Verifies that a webelement previously found has {@code attribute} with {@code value} (as a regexp) @param index @param attribute @param value ...
java
@Then("^the element on index '(\\d+?)' has '(.+?)' as '(.+?)'$") public void assertSeleniumHasAttributeValue(Integer index, String attribute, String value) { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required") .hasAtLeast(index);...
[ "@", "Then", "(", "\"^the element on index '(\\\\d+?)' has '(.+?)' as '(.+?)'$\"", ")", "public", "void", "assertSeleniumHasAttributeValue", "(", "Integer", "index", ",", "String", "attribute", ",", "String", "value", ")", "{", "assertThat", "(", "this", ".", "commonspe...
Verifies that a webelement previously found has {@code attribute} with {@code value} (as a regexp) @param index @param attribute @param value
[ "Verifies", "that", "a", "webelement", "previously", "found", "has", "{", "@code", "attribute", "}", "with", "{", "@code", "value", "}", "(", "as", "a", "regexp", ")" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L527-L534
nwillc/almost-functional
src/main/java/almost/functional/utils/Preconditions.java
Preconditions.isAssignableTo
public static Class isAssignableTo(final Class<?> reference, final Class<?> toValue, final String message) { """ Check that one class is assignable to another. @param reference the class to test @param toValue the class assigning to @param message the message used in the exception if thrown @throws Class...
java
public static Class isAssignableTo(final Class<?> reference, final Class<?> toValue, final String message) { return precondition(reference, new Predicate<Class>() { @Override public boolean test(Class testValue) { return toValue.isAssignableFrom(testValue); } ...
[ "public", "static", "Class", "isAssignableTo", "(", "final", "Class", "<", "?", ">", "reference", ",", "final", "Class", "<", "?", ">", "toValue", ",", "final", "String", "message", ")", "{", "return", "precondition", "(", "reference", ",", "new", "Predica...
Check that one class is assignable to another. @param reference the class to test @param toValue the class assigning to @param message the message used in the exception if thrown @throws ClassCastException if the assignment can not be made
[ "Check", "that", "one", "class", "is", "assignable", "to", "another", "." ]
train
https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/utils/Preconditions.java#L95-L102
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java
JobHistoryFileParserHadoop2.processCounters
private void processCounters(Put p, JSONObject eventDetails, String key) { """ process the counter details example line in .jhist file for counters: { "name":"MAP_COUNTERS", "groups":[ { "name":"org.apache.hadoop.mapreduce.FileSystemCounter", "displayName":"File System Counters", "counts":[ { "name":"HDFS_BYTES_...
java
private void processCounters(Put p, JSONObject eventDetails, String key) { try { JSONObject jsonCounters = eventDetails.getJSONObject(key); String counterMetaGroupName = jsonCounters.getString(NAME); JSONArray groups = jsonCounters.getJSONArray(GROUPS); for (int i = 0; i < groups.length(); ...
[ "private", "void", "processCounters", "(", "Put", "p", ",", "JSONObject", "eventDetails", ",", "String", "key", ")", "{", "try", "{", "JSONObject", "jsonCounters", "=", "eventDetails", ".", "getJSONObject", "(", "key", ")", ";", "String", "counterMetaGroupName",...
process the counter details example line in .jhist file for counters: { "name":"MAP_COUNTERS", "groups":[ { "name":"org.apache.hadoop.mapreduce.FileSystemCounter", "displayName":"File System Counters", "counts":[ { "name":"HDFS_BYTES_READ", "displayName":"HDFS: Number of bytes read", "value":480 }, { "name":"HDFS_BYTES...
[ "process", "the", "counter", "details", "example", "line", "in", ".", "jhist", "file", "for", "counters", ":", "{", "name", ":", "MAP_COUNTERS", "groups", ":", "[", "{", "name", ":", "org", ".", "apache", ".", "hadoop", ".", "mapreduce", ".", "FileSystem...
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java#L390-L409
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java
RoaringBitmap.isHammingSimilar
public boolean isHammingSimilar(RoaringBitmap other, int tolerance) { """ Returns true if the other bitmap has no more than tolerance bits differing from this bitmap. The other may be transformed into a bitmap equal to this bitmap in no more than tolerance bit flips if this method returns true. @param other t...
java
public boolean isHammingSimilar(RoaringBitmap other, int tolerance) { final int size1 = highLowContainer.size(); final int size2 = other.highLowContainer.size(); int pos1 = 0; int pos2 = 0; int budget = tolerance; while(budget >= 0 && pos1 < size1 && pos2 < size2) { final short key1 = this...
[ "public", "boolean", "isHammingSimilar", "(", "RoaringBitmap", "other", ",", "int", "tolerance", ")", "{", "final", "int", "size1", "=", "highLowContainer", ".", "size", "(", ")", ";", "final", "int", "size2", "=", "other", ".", "highLowContainer", ".", "siz...
Returns true if the other bitmap has no more than tolerance bits differing from this bitmap. The other may be transformed into a bitmap equal to this bitmap in no more than tolerance bit flips if this method returns true. @param other the bitmap to compare to @param tolerance the maximum number of bits that may differ...
[ "Returns", "true", "if", "the", "other", "bitmap", "has", "no", "more", "than", "tolerance", "bits", "differing", "from", "this", "bitmap", ".", "The", "other", "may", "be", "transformed", "into", "a", "bitmap", "equal", "to", "this", "bitmap", "in", "no",...
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java#L1515-L1547
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIViewRoot.java
UIViewRoot._getEvents
private Events _getEvents(PhaseId phaseId) { """ Gathers all event for current and ANY phase @param phaseId current phase id """ // Gather the events and purge the event list to prevent concurrent modification during broadcasting int size = _events.size(); List<FacesEvent> anyPhase = n...
java
private Events _getEvents(PhaseId phaseId) { // Gather the events and purge the event list to prevent concurrent modification during broadcasting int size = _events.size(); List<FacesEvent> anyPhase = new ArrayList<FacesEvent>(size); List<FacesEvent> onPhase = new ArrayList<FacesEven...
[ "private", "Events", "_getEvents", "(", "PhaseId", "phaseId", ")", "{", "// Gather the events and purge the event list to prevent concurrent modification during broadcasting", "int", "size", "=", "_events", ".", "size", "(", ")", ";", "List", "<", "FacesEvent", ">", "anyP...
Gathers all event for current and ANY phase @param phaseId current phase id
[ "Gathers", "all", "event", "for", "current", "and", "ANY", "phase" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIViewRoot.java#L1706-L1733
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java
JdbcRegistry.getApiInternal
protected Api getApiInternal(String organizationId, String apiId, String apiVersion) throws SQLException { """ Gets an api from the DB. @param organizationId @param apiId @param apiVersion @throws SQLException """ QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_...
java
protected Api getApiInternal(String organizationId, String apiId, String apiVersion) throws SQLException { QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_apis WHERE org_id = ? AND id = ? AND version = ?", //$NON-NLS-1$ Handlers.API_HANDLER, organizationId, a...
[ "protected", "Api", "getApiInternal", "(", "String", "organizationId", ",", "String", "apiId", ",", "String", "apiVersion", ")", "throws", "SQLException", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", "ds", ")", ";", "return", "run", ".", "query",...
Gets an api from the DB. @param organizationId @param apiId @param apiVersion @throws SQLException
[ "Gets", "an", "api", "from", "the", "DB", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java#L247-L251
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/JsonWriter.java
JsonWriter.toJSONString
public static void toJSONString(OutputAccessor out, Map<String, ? extends Object> map) { """ Utility method to write a {@link Map} into a JSON representation. @param out @param map """ writeObjectStart(out); boolean first = true; for (Map.Entry<String, ? extends Object> entry : ma...
java
public static void toJSONString(OutputAccessor out, Map<String, ? extends Object> map) { writeObjectStart(out); boolean first = true; for (Map.Entry<String, ? extends Object> entry : map.entrySet()) { if (first) { first = false; } else { ...
[ "public", "static", "void", "toJSONString", "(", "OutputAccessor", "out", ",", "Map", "<", "String", ",", "?", "extends", "Object", ">", "map", ")", "{", "writeObjectStart", "(", "out", ")", ";", "boolean", "first", "=", "true", ";", "for", "(", "Map", ...
Utility method to write a {@link Map} into a JSON representation. @param out @param map
[ "Utility", "method", "to", "write", "a", "{", "@link", "Map", "}", "into", "a", "JSON", "representation", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/JsonWriter.java#L74-L92
apache/incubator-druid
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java
S3DataSegmentPuller.getVersion
@Override public String getVersion(URI uri) throws IOException { """ Returns the "version" (aka last modified timestamp) of the URI @param uri The URI to check the last timestamp @return The time in ms of the last modification of the URI in String format @throws IOException """ try { final...
java
@Override public String getVersion(URI uri) throws IOException { try { final S3Coords coords = new S3Coords(checkURI(uri)); final S3ObjectSummary objectSummary = S3Utils.getSingleObjectSummary(s3Client, coords.bucket, coords.path); return StringUtils.format("%d", objectSummary.getLastModified(...
[ "@", "Override", "public", "String", "getVersion", "(", "URI", "uri", ")", "throws", "IOException", "{", "try", "{", "final", "S3Coords", "coords", "=", "new", "S3Coords", "(", "checkURI", "(", "uri", ")", ")", ";", "final", "S3ObjectSummary", "objectSummary...
Returns the "version" (aka last modified timestamp) of the URI @param uri The URI to check the last timestamp @return The time in ms of the last modification of the URI in String format @throws IOException
[ "Returns", "the", "version", "(", "aka", "last", "modified", "timestamp", ")", "of", "the", "URI" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java#L288-L304
apache/groovy
src/main/groovy/groovy/util/Node.java
Node.appendNode
public Node appendNode(Object name, Map attributes, Object value) { """ Creates a new node as a child of the current node. @param name the name of the new node @param attributes the attributes of the new node @param value the value of the new node @return the newly created <code>Node</code> """ r...
java
public Node appendNode(Object name, Map attributes, Object value) { return new Node(this, name, attributes, value); }
[ "public", "Node", "appendNode", "(", "Object", "name", ",", "Map", "attributes", ",", "Object", "value", ")", "{", "return", "new", "Node", "(", "this", ",", "name", ",", "attributes", ",", "value", ")", ";", "}" ]
Creates a new node as a child of the current node. @param name the name of the new node @param attributes the attributes of the new node @param value the value of the new node @return the newly created <code>Node</code>
[ "Creates", "a", "new", "node", "as", "a", "child", "of", "the", "current", "node", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/Node.java#L218-L220
b3log/latke
latke-core/src/main/java/org/b3log/latke/repository/jdbc/JdbcRepository.java
JdbcRepository.buildWhere
private void buildWhere(final StringBuilder whereBuilder, final List<Object> paramList, final Filter filter) throws RepositoryException { """ Builds 'WHERE' part with the specified where build, param list and filter. @param whereBuilder the specified where builder @param paramList the specified param list ...
java
private void buildWhere(final StringBuilder whereBuilder, final List<Object> paramList, final Filter filter) throws RepositoryException { if (null == filter) { return; } if (filter instanceof PropertyFilter) { processPropertyFilter(whereBuilder, paramList, (PropertyFilte...
[ "private", "void", "buildWhere", "(", "final", "StringBuilder", "whereBuilder", ",", "final", "List", "<", "Object", ">", "paramList", ",", "final", "Filter", "filter", ")", "throws", "RepositoryException", "{", "if", "(", "null", "==", "filter", ")", "{", "...
Builds 'WHERE' part with the specified where build, param list and filter. @param whereBuilder the specified where builder @param paramList the specified param list @param filter the specified filter @throws RepositoryException RepositoryException
[ "Builds", "WHERE", "part", "with", "the", "specified", "where", "build", "param", "list", "and", "filter", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/repository/jdbc/JdbcRepository.java#L601-L611
amlinv/registry-utils
src/main/java/com/amlinv/registry/util/listener/SimpleSynchronousNotificationExecutor.java
SimpleSynchronousNotificationExecutor.fireRemoveNotification
public void fireRemoveNotification (Iterator<RegistryListener<K, V>> listeners, K removeKey, V removeValue) { """ Fire notification of an entry that was just removed from the registry. @param removeKey key identifying the entry removed from the registry. @param removeValue value of the entry in the registry. ...
java
public void fireRemoveNotification (Iterator<RegistryListener<K, V>> listeners, K removeKey, V removeValue) { while ( listeners.hasNext() ) { listeners.next().onRemoveEntry(removeKey, removeValue); } }
[ "public", "void", "fireRemoveNotification", "(", "Iterator", "<", "RegistryListener", "<", "K", ",", "V", ">", ">", "listeners", ",", "K", "removeKey", ",", "V", "removeValue", ")", "{", "while", "(", "listeners", ".", "hasNext", "(", ")", ")", "{", "lis...
Fire notification of an entry that was just removed from the registry. @param removeKey key identifying the entry removed from the registry. @param removeValue value of the entry in the registry.
[ "Fire", "notification", "of", "an", "entry", "that", "was", "just", "removed", "from", "the", "registry", "." ]
train
https://github.com/amlinv/registry-utils/blob/784c455be38acb0df3a35c38afe60a516b8e4f32/src/main/java/com/amlinv/registry/util/listener/SimpleSynchronousNotificationExecutor.java#L51-L55
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/cfg/impl/HostParser.java
HostParser.parse
public static Hosts parse(String hostString, Integer explicitGlobalPort, Integer defaultPort) { """ Accepts a comma separated list of host / ports. For example www.example.com, www2.example.com:123, 192.0.2.1, 192.0.2.2:123, 2001:db8::ff00:42:8329, [2001:db8::ff00:42:8329]:123 """ List<String> hosts = ...
java
public static Hosts parse(String hostString, Integer explicitGlobalPort, Integer defaultPort) { List<String> hosts = new ArrayList<>(); List<Integer> ports = new ArrayList<>(); if ( hostString == null || hostString.trim().isEmpty() ) { return Hosts.NO_HOST; } // for each element between commas String[] s...
[ "public", "static", "Hosts", "parse", "(", "String", "hostString", ",", "Integer", "explicitGlobalPort", ",", "Integer", "defaultPort", ")", "{", "List", "<", "String", ">", "hosts", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "Integer", ">"...
Accepts a comma separated list of host / ports. For example www.example.com, www2.example.com:123, 192.0.2.1, 192.0.2.2:123, 2001:db8::ff00:42:8329, [2001:db8::ff00:42:8329]:123
[ "Accepts", "a", "comma", "separated", "list", "of", "host", "/", "ports", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/cfg/impl/HostParser.java#L56-L78
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/dataset/DatasetUtils.java
DatasetUtils.getDatasetSpecificProps
public static Map<String, State> getDatasetSpecificProps(Iterable<String> datasets, State state) { """ Given a {@link Iterable} of dataset identifiers (e.g., name, URN, etc.), return a {@link Map} that links each dataset with the extra configuration information specified in the state via {@link #DATASET_SPECIFIC_...
java
public static Map<String, State> getDatasetSpecificProps(Iterable<String> datasets, State state) { if (!Strings.isNullOrEmpty(state.getProp(DATASET_SPECIFIC_PROPS)) || !Strings.isNullOrEmpty(state.getProp(KAFKA_TOPIC_SPECIFIC_STATE))) { Map<String, State> datasetSpecificConfigMap = Maps.newHashMap(); ...
[ "public", "static", "Map", "<", "String", ",", "State", ">", "getDatasetSpecificProps", "(", "Iterable", "<", "String", ">", "datasets", ",", "State", "state", ")", "{", "if", "(", "!", "Strings", ".", "isNullOrEmpty", "(", "state", ".", "getProp", "(", ...
Given a {@link Iterable} of dataset identifiers (e.g., name, URN, etc.), return a {@link Map} that links each dataset with the extra configuration information specified in the state via {@link #DATASET_SPECIFIC_PROPS}.
[ "Given", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/dataset/DatasetUtils.java#L76-L115
hawkular/hawkular-apm
client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java
TraceContext.initTraceState
public void initTraceState(Map<String, Object> state) { """ Initialise the trace state from the supplied state. @param state The propagated state """ Object traceId = state.get(Constants.HAWKULAR_APM_TRACEID); Object transaction = state.get(Constants.HAWKULAR_APM_TXN); Object level =...
java
public void initTraceState(Map<String, Object> state) { Object traceId = state.get(Constants.HAWKULAR_APM_TRACEID); Object transaction = state.get(Constants.HAWKULAR_APM_TXN); Object level = state.get(Constants.HAWKULAR_APM_LEVEL); if (traceId != null) { setTraceId(traceId.to...
[ "public", "void", "initTraceState", "(", "Map", "<", "String", ",", "Object", ">", "state", ")", "{", "Object", "traceId", "=", "state", ".", "get", "(", "Constants", ".", "HAWKULAR_APM_TRACEID", ")", ";", "Object", "transaction", "=", "state", ".", "get",...
Initialise the trace state from the supplied state. @param state The propagated state
[ "Initialise", "the", "trace", "state", "from", "the", "supplied", "state", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/org/hawkular/apm/client/opentracing/TraceContext.java#L211-L226
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/version/SemanticVersion.java
SemanticVersion.isAtLeastMajorMinor
public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) { """ Check whether the current version is at least the given major and minor version. @param version The version to check @param majorVersion The major version @param minorVersion The minor version @return Tru...
java
public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) { SemanticVersion semanticVersion = new SemanticVersion(version); return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion); }
[ "public", "static", "boolean", "isAtLeastMajorMinor", "(", "String", "version", ",", "int", "majorVersion", ",", "int", "minorVersion", ")", "{", "SemanticVersion", "semanticVersion", "=", "new", "SemanticVersion", "(", "version", ")", ";", "return", "isAtLeastMajor...
Check whether the current version is at least the given major and minor version. @param version The version to check @param majorVersion The major version @param minorVersion The minor version @return True if it is
[ "Check", "whether", "the", "current", "version", "is", "at", "least", "the", "given", "major", "and", "minor", "version", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/version/SemanticVersion.java#L99-L102
Canadensys/canadensys-core
src/main/java/net/canadensys/bundle/UTF8PropertyResourceBundle.java
UTF8PropertyResourceBundle.getBundle
public static PropertyResourceBundle getBundle(String baseName, Locale locale) throws UnsupportedEncodingException, IOException { """ Get a PropertyResourceBundle able to read an UTF-8 properties file. @param baseName @param locale @return new ResourceBundle or null if no bundle can be found. @throws Unsupport...
java
public static PropertyResourceBundle getBundle(String baseName, Locale locale) throws UnsupportedEncodingException, IOException{ InputStream is = UTF8PropertyResourceBundle.class.getResourceAsStream("/"+baseName + "_"+locale.toString()+PROPERTIES_EXT); if(is != null){ return new PropertyResourceBundle(new InputS...
[ "public", "static", "PropertyResourceBundle", "getBundle", "(", "String", "baseName", ",", "Locale", "locale", ")", "throws", "UnsupportedEncodingException", ",", "IOException", "{", "InputStream", "is", "=", "UTF8PropertyResourceBundle", ".", "class", ".", "getResource...
Get a PropertyResourceBundle able to read an UTF-8 properties file. @param baseName @param locale @return new ResourceBundle or null if no bundle can be found. @throws UnsupportedEncodingException @throws IOException
[ "Get", "a", "PropertyResourceBundle", "able", "to", "read", "an", "UTF", "-", "8", "properties", "file", "." ]
train
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/bundle/UTF8PropertyResourceBundle.java#L26-L32
real-logic/agrona
agrona/src/main/java/org/agrona/SystemUtil.java
SystemUtil.parseSize
public static long parseSize(final String propertyName, final String propertyValue) { """ Parse a string representation of a value with optional suffix of 'g', 'm', and 'k' suffix to indicate gigabytes, megabytes, or kilobytes respectively. @param propertyName that associated with the size value. @param prop...
java
public static long parseSize(final String propertyName, final String propertyValue) { final int lengthMinusSuffix = propertyValue.length() - 1; final char lastCharacter = propertyValue.charAt(lengthMinusSuffix); if (Character.isDigit(lastCharacter)) { return Long.valueOf(...
[ "public", "static", "long", "parseSize", "(", "final", "String", "propertyName", ",", "final", "String", "propertyValue", ")", "{", "final", "int", "lengthMinusSuffix", "=", "propertyValue", ".", "length", "(", ")", "-", "1", ";", "final", "char", "lastCharact...
Parse a string representation of a value with optional suffix of 'g', 'm', and 'k' suffix to indicate gigabytes, megabytes, or kilobytes respectively. @param propertyName that associated with the size value. @param propertyValue to be parsed. @return the long value. @throws NumberFormatException if the value is out o...
[ "Parse", "a", "string", "representation", "of", "a", "value", "with", "optional", "suffix", "of", "g", "m", "and", "k", "suffix", "to", "indicate", "gigabytes", "megabytes", "or", "kilobytes", "respectively", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/SystemUtil.java#L284-L325
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.rewriteUrl
protected String rewriteUrl(String path) throws UnsupportedEncodingException { """ URL rewriter.<p> @param path path which has to be rewritten @return a string with the encoded path @throws UnsupportedEncodingException if something goes wrong while encoding the url """ return new String(URLCo...
java
protected String rewriteUrl(String path) throws UnsupportedEncodingException { return new String(URLCodec.encodeUrl(URL_SAFE_CHARS, path.getBytes("ISO-8859-1"))); }
[ "protected", "String", "rewriteUrl", "(", "String", "path", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "String", "(", "URLCodec", ".", "encodeUrl", "(", "URL_SAFE_CHARS", ",", "path", ".", "getBytes", "(", "\"ISO-8859-1\"", ")", ")", ")...
URL rewriter.<p> @param path path which has to be rewritten @return a string with the encoded path @throws UnsupportedEncodingException if something goes wrong while encoding the url
[ "URL", "rewriter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L2580-L2583
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java
GISTreeSetUtil.computeIcosepSubarea
private static Rectangle2d computeIcosepSubarea(IcosepQuadTreeZone region, Rectangle2d area) { """ Computes the area covered by a child node of an icosep-node. @param region is the id of the region for which the area must be computed @param area is the parent icosep area. @return the area covered by the chi...
java
private static Rectangle2d computeIcosepSubarea(IcosepQuadTreeZone region, Rectangle2d area) { if (area == null || area.isEmpty()) { return area; } final double demiWidth = area.getWidth() / 2.; final double demiHeight = area.getHeight() / 2.; switch (region) { case ICOSEP: return area; case SOUTH...
[ "private", "static", "Rectangle2d", "computeIcosepSubarea", "(", "IcosepQuadTreeZone", "region", ",", "Rectangle2d", "area", ")", "{", "if", "(", "area", "==", "null", "||", "area", ".", "isEmpty", "(", ")", ")", "{", "return", "area", ";", "}", "final", "...
Computes the area covered by a child node of an icosep-node. @param region is the id of the region for which the area must be computed @param area is the parent icosep area. @return the area covered by the child node.
[ "Computes", "the", "area", "covered", "by", "a", "child", "node", "of", "an", "icosep", "-", "node", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L473-L502
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/Annotate.java
Annotate.enterAnnotation
Attribute.Compound enterAnnotation(JCAnnotation a, Type expected, Env<AttrContext> env) { """ Process a single compound annotation, returning its Attribute. Used from MemberEnter for attaching the attributes to the annotated symbol. ...
java
Attribute.Compound enterAnnotation(JCAnnotation a, Type expected, Env<AttrContext> env) { return enterAnnotation(a, expected, env, false); }
[ "Attribute", ".", "Compound", "enterAnnotation", "(", "JCAnnotation", "a", ",", "Type", "expected", ",", "Env", "<", "AttrContext", ">", "env", ")", "{", "return", "enterAnnotation", "(", "a", ",", "expected", ",", "env", ",", "false", ")", ";", "}" ]
Process a single compound annotation, returning its Attribute. Used from MemberEnter for attaching the attributes to the annotated symbol.
[ "Process", "a", "single", "compound", "annotation", "returning", "its", "Attribute", ".", "Used", "from", "MemberEnter", "for", "attaching", "the", "attributes", "to", "the", "annotated", "symbol", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Annotate.java#L233-L237
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPane.java
LogPane.publish
public void publish(String message, Level level) { """ Print a message as if it were logged, without going through the full logger. @param message Message text @param level Message level """ try { publish(new LogRecord(level, message)); } catch(BadLocationException e) { throw new...
java
public void publish(String message, Level level) { try { publish(new LogRecord(level, message)); } catch(BadLocationException e) { throw new RuntimeException("Error writing a log-like message.", e); } }
[ "public", "void", "publish", "(", "String", "message", ",", "Level", "level", ")", "{", "try", "{", "publish", "(", "new", "LogRecord", "(", "level", ",", "message", ")", ")", ";", "}", "catch", "(", "BadLocationException", "e", ")", "{", "throw", "new...
Print a message as if it were logged, without going through the full logger. @param message Message text @param level Message level
[ "Print", "a", "message", "as", "if", "it", "were", "logged", "without", "going", "through", "the", "full", "logger", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPane.java#L125-L132
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/LookasideCacheFileSystem.java
LookasideCacheFileSystem.addCache
void addCache(Path hdfsPath, Path localPath, long size) throws IOException { """ Insert a file into the cache. If the cache is exceeding capacity, then this call can, in turn, call backinto evictCache(). """ assert size == new File(localPath.toString()).length(); assert size == fs.getFileStatus(hdfsPa...
java
void addCache(Path hdfsPath, Path localPath, long size) throws IOException { assert size == new File(localPath.toString()).length(); assert size == fs.getFileStatus(hdfsPath).getLen(); lookasideCache.addCache(hdfsPath, localPath, size); }
[ "void", "addCache", "(", "Path", "hdfsPath", ",", "Path", "localPath", ",", "long", "size", ")", "throws", "IOException", "{", "assert", "size", "==", "new", "File", "(", "localPath", ".", "toString", "(", ")", ")", ".", "length", "(", ")", ";", "asser...
Insert a file into the cache. If the cache is exceeding capacity, then this call can, in turn, call backinto evictCache().
[ "Insert", "a", "file", "into", "the", "cache", ".", "If", "the", "cache", "is", "exceeding", "capacity", "then", "this", "call", "can", "in", "turn", "call", "backinto", "evictCache", "()", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/LookasideCacheFileSystem.java#L185-L189
primefaces/primefaces
src/main/java/org/primefaces/util/TreeUtils.java
TreeUtils.sortNode
public static void sortNode(TreeNode node, Comparator comparator) { """ Sorts children of a node using a comparator @param node Node instance whose children to be sorted @param comparator Comparator to use in sorting """ TreeNodeList children = (TreeNodeList) node.getChildren(); if (childr...
java
public static void sortNode(TreeNode node, Comparator comparator) { TreeNodeList children = (TreeNodeList) node.getChildren(); if (children != null && !children.isEmpty()) { Object[] childrenArray = children.toArray(); Arrays.sort(childrenArray, comparator); for (int...
[ "public", "static", "void", "sortNode", "(", "TreeNode", "node", ",", "Comparator", "comparator", ")", "{", "TreeNodeList", "children", "=", "(", "TreeNodeList", ")", "node", ".", "getChildren", "(", ")", ";", "if", "(", "children", "!=", "null", "&&", "!"...
Sorts children of a node using a comparator @param node Node instance whose children to be sorted @param comparator Comparator to use in sorting
[ "Sorts", "children", "of", "a", "node", "using", "a", "comparator" ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/TreeUtils.java#L45-L59
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java
MessageSetImpl.getMessagesBeforeUntil
public static CompletableFuture<MessageSet> getMessagesBeforeUntil( TextChannel channel, Predicate<Message> condition, long before) { """ Gets messages in the given channel before a given message in any channel until one that meets the given condition is found. If no message matches the condition, an...
java
public static CompletableFuture<MessageSet> getMessagesBeforeUntil( TextChannel channel, Predicate<Message> condition, long before) { return getMessagesUntil(channel, condition, before, -1); }
[ "public", "static", "CompletableFuture", "<", "MessageSet", ">", "getMessagesBeforeUntil", "(", "TextChannel", "channel", ",", "Predicate", "<", "Message", ">", "condition", ",", "long", "before", ")", "{", "return", "getMessagesUntil", "(", "channel", ",", "condi...
Gets messages in the given channel before a given message in any channel until one that meets the given condition is found. If no message matches the condition, an empty set is returned. @param channel The channel of the messages. @param condition The abort condition for when to stop retrieving messages. @param before...
[ "Gets", "messages", "in", "the", "given", "channel", "before", "a", "given", "message", "in", "any", "channel", "until", "one", "that", "meets", "the", "given", "condition", "is", "found", ".", "If", "no", "message", "matches", "the", "condition", "an", "e...
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java#L331-L334
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java
GenericBoJdbcDao.updateOrCreate
protected DaoResult updateOrCreate(Connection conn, T bo) { """ Update an existing BO or create a new one. @param conn @param bo @return @since 0.8.1 """ if (bo == null) { return new DaoResult(DaoOperationStatus.NOT_FOUND); } DaoResult result = update(conn, bo); ...
java
protected DaoResult updateOrCreate(Connection conn, T bo) { if (bo == null) { return new DaoResult(DaoOperationStatus.NOT_FOUND); } DaoResult result = update(conn, bo); DaoOperationStatus status = result.getStatus(); if (status == DaoOperationStatus.NOT_FOUND) { ...
[ "protected", "DaoResult", "updateOrCreate", "(", "Connection", "conn", ",", "T", "bo", ")", "{", "if", "(", "bo", "==", "null", ")", "{", "return", "new", "DaoResult", "(", "DaoOperationStatus", ".", "NOT_FOUND", ")", ";", "}", "DaoResult", "result", "=", ...
Update an existing BO or create a new one. @param conn @param bo @return @since 0.8.1
[ "Update", "an", "existing", "BO", "or", "create", "a", "new", "one", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L730-L740
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java
JCRAssert.assertNodeNotExistByPath
public static void assertNodeNotExistByPath(final Session session, final String absPath) throws RepositoryException { """ Asserts that a specific node with the given absolute path does not exist in the session @param session the session to search for the node @param absPath the absolute path to look for a no...
java
public static void assertNodeNotExistByPath(final Session session, final String absPath) throws RepositoryException { try { session.getNode(absPath); fail("Node " + absPath + " does not exist"); } catch (final PathNotFoundException e) { // NOSONAR // the exception is ...
[ "public", "static", "void", "assertNodeNotExistByPath", "(", "final", "Session", "session", ",", "final", "String", "absPath", ")", "throws", "RepositoryException", "{", "try", "{", "session", ".", "getNode", "(", "absPath", ")", ";", "fail", "(", "\"Node \"", ...
Asserts that a specific node with the given absolute path does not exist in the session @param session the session to search for the node @param absPath the absolute path to look for a node @throws RepositoryException if the repository access failed
[ "Asserts", "that", "a", "specific", "node", "with", "the", "given", "absolute", "path", "does", "not", "exist", "in", "the", "session" ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java#L99-L106
devnull-tools/trugger
src/main/java/tools/devnull/trugger/reflection/impl/TruggerGenericTypeResolver.java
TruggerGenericTypeResolver.resolveType
static Class resolveType(Type genericType, Map<Type, Type> typeVariableMap) { """ Resolve the specified generic type against the given TypeVariable map. @param genericType the generic type to resolve @param typeVariableMap the TypeVariable Map to resolved against @return the type if it resolves to a Cla...
java
static Class resolveType(Type genericType, Map<Type, Type> typeVariableMap) { Type rawType = getRawType(genericType, typeVariableMap); return (rawType instanceof Class ? (Class) rawType : Object.class); }
[ "static", "Class", "resolveType", "(", "Type", "genericType", ",", "Map", "<", "Type", ",", "Type", ">", "typeVariableMap", ")", "{", "Type", "rawType", "=", "getRawType", "(", "genericType", ",", "typeVariableMap", ")", ";", "return", "(", "rawType", "insta...
Resolve the specified generic type against the given TypeVariable map. @param genericType the generic type to resolve @param typeVariableMap the TypeVariable Map to resolved against @return the type if it resolves to a Class, or <code>Object.class otherwise
[ "Resolve", "the", "specified", "generic", "type", "against", "the", "given", "TypeVariable", "map", "." ]
train
https://github.com/devnull-tools/trugger/blob/614d5f0b30daf82fc251a46fb436d0fc5e787627/src/main/java/tools/devnull/trugger/reflection/impl/TruggerGenericTypeResolver.java#L59-L62
js-lib-com/commons
src/main/java/js/util/Types.java
Types.isKindOf
public static boolean isKindOf(Type t, Type... typesToMatch) throws IllegalArgumentException { """ Determine if a given type is a kind of one of the requested types to match. Traverses <code>typesToMatch</code> and delegates {@link #isKindOf(Type, Type)} till first positive match and returns true. If no match fou...
java
public static boolean isKindOf(Type t, Type... typesToMatch) throws IllegalArgumentException { Params.notNullOrEmpty(typesToMatch, "Types to match"); for(Type typeToMatch : typesToMatch) { if(isKindOf(t, typeToMatch)) { return true; } } return false; }
[ "public", "static", "boolean", "isKindOf", "(", "Type", "t", ",", "Type", "...", "typesToMatch", ")", "throws", "IllegalArgumentException", "{", "Params", ".", "notNullOrEmpty", "(", "typesToMatch", ",", "\"Types to match\"", ")", ";", "for", "(", "Type", "typeT...
Determine if a given type is a kind of one of the requested types to match. Traverses <code>typesToMatch</code> and delegates {@link #isKindOf(Type, Type)} till first positive match and returns true. If no match found returns false. If <code>type</code> is null returns false. If a type to match happened to be null is c...
[ "Determine", "if", "a", "given", "type", "is", "a", "kind", "of", "one", "of", "the", "requested", "types", "to", "match", ".", "Traverses", "<code", ">", "typesToMatch<", "/", "code", ">", "and", "delegates", "{", "@link", "#isKindOf", "(", "Type", "Typ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Types.java#L82-L91
meertensinstituut/mtas
src/main/java/mtas/solr/handler/util/MtasSolrStatus.java
MtasSolrStatus.getString
private final String getString(NamedList<Object> response, String... args) { """ Gets the string. @param response the response @param args the args @return the string """ Object objectItem = response.findRecursive(args); if (objectItem != null && objectItem instanceof String) { return (Str...
java
private final String getString(NamedList<Object> response, String... args) { Object objectItem = response.findRecursive(args); if (objectItem != null && objectItem instanceof String) { return (String) objectItem; } else { return null; } }
[ "private", "final", "String", "getString", "(", "NamedList", "<", "Object", ">", "response", ",", "String", "...", "args", ")", "{", "Object", "objectItem", "=", "response", ".", "findRecursive", "(", "args", ")", ";", "if", "(", "objectItem", "!=", "null"...
Gets the string. @param response the response @param args the args @return the string
[ "Gets", "the", "string", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/util/MtasSolrStatus.java#L624-L631
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java
AlignmentTools.getSymmetryOrder
public static int getSymmetryOrder(AFPChain afpChain, int maxSymmetry, float minimumMetricChange) throws StructureException { """ Guesses the order of symmetry in an alignment <p>Uses {@link #getSymmetryOrder(Map alignment, Map identity, int, float)} to determine the the symmetry order. For the identity alignm...
java
public static int getSymmetryOrder(AFPChain afpChain, int maxSymmetry, float minimumMetricChange) throws StructureException { // alignment comes from the afpChain alignment Map<Integer,Integer> alignment = AlignmentTools.alignmentAsMap(afpChain); // Now construct identity to map aligned residues in sequential or...
[ "public", "static", "int", "getSymmetryOrder", "(", "AFPChain", "afpChain", ",", "int", "maxSymmetry", ",", "float", "minimumMetricChange", ")", "throws", "StructureException", "{", "// alignment comes from the afpChain alignment", "Map", "<", "Integer", ",", "Integer", ...
Guesses the order of symmetry in an alignment <p>Uses {@link #getSymmetryOrder(Map alignment, Map identity, int, float)} to determine the the symmetry order. For the identity alignment, sorts the aligned residues of each protein sequentially, then defines the ith residues of each protein to be equivalent. <p>Note tha...
[ "Guesses", "the", "order", "of", "symmetry", "in", "an", "alignment" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java#L400-L411