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
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/SequenceFile.java
SequenceFile.createWriter
private static Writer createWriter(Configuration conf, FSDataOutputStream out, Class keyClass, Class valClass, boolean compress, boolean blockCompress, CompressionCodec codec, Metadata metadata) throws IOException { """ Construct the preferred type of 'raw' SequenceFile W...
java
private static Writer createWriter(Configuration conf, FSDataOutputStream out, Class keyClass, Class valClass, boolean compress, boolean blockCompress, CompressionCodec codec, Metadata metadata) throws IOException { if (codec != null && (codec instanceof GzipCodec) && ...
[ "private", "static", "Writer", "createWriter", "(", "Configuration", "conf", ",", "FSDataOutputStream", "out", ",", "Class", "keyClass", ",", "Class", "valClass", ",", "boolean", "compress", ",", "boolean", "blockCompress", ",", "CompressionCodec", "codec", ",", "...
Construct the preferred type of 'raw' SequenceFile Writer. @param out The stream on top which the writer is to be constructed. @param keyClass The 'key' type. @param valClass The 'value' type. @param compress Compress data? @param blockCompress Compress blocks? @param metadata The metadata of the file. @return Returns ...
[ "Construct", "the", "preferred", "type", "of", "raw", "SequenceFile", "Writer", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/SequenceFile.java#L571-L594
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNotVoidType
public static void assertNotVoidType(final Field field, Class<? extends Annotation> annotation) { """ Asserts field isn't of void type. @param field to validate @param annotation annotation to propagate in exception message """ if ((field.getClass().equals(Void.class)) && (field.getClass().equals(Voi...
java
public static void assertNotVoidType(final Field field, Class<? extends Annotation> annotation) { if ((field.getClass().equals(Void.class)) && (field.getClass().equals(Void.TYPE))) { throw annotation == null ? MESSAGES.fieldCannotBeOfPrimitiveOrVoidType(field) : MESSAGES.fieldCannotBeOfPrimitive...
[ "public", "static", "void", "assertNotVoidType", "(", "final", "Field", "field", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "if", "(", "(", "field", ".", "getClass", "(", ")", ".", "equals", "(", "Void", ".", "class", ...
Asserts field isn't of void type. @param field to validate @param annotation annotation to propagate in exception message
[ "Asserts", "field", "isn", "t", "of", "void", "type", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L152-L158
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/randomizers/text/StringRandomizer.java
StringRandomizer.aNewStringRandomizer
public static StringRandomizer aNewStringRandomizer(final int minLength, final int maxLength, final long seed) { """ Create a new {@link StringRandomizer}. @param maxLength of the String to generate @param minLength of the String to generate @param seed initial seed @return a new {@link StringRandomizer...
java
public static StringRandomizer aNewStringRandomizer(final int minLength, final int maxLength, final long seed) { if (minLength > maxLength) { throw new IllegalArgumentException("minLength should be less than or equal to maxLength"); } return new StringRandomizer(minLength, maxLength,...
[ "public", "static", "StringRandomizer", "aNewStringRandomizer", "(", "final", "int", "minLength", ",", "final", "int", "maxLength", ",", "final", "long", "seed", ")", "{", "if", "(", "minLength", ">", "maxLength", ")", "{", "throw", "new", "IllegalArgumentExcept...
Create a new {@link StringRandomizer}. @param maxLength of the String to generate @param minLength of the String to generate @param seed initial seed @return a new {@link StringRandomizer}.
[ "Create", "a", "new", "{", "@link", "StringRandomizer", "}", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/randomizers/text/StringRandomizer.java#L218-L223
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java
DynamoDBMapper.validBatchGetRequest
private boolean validBatchGetRequest(Map<Class<?>, List<KeyPair>> itemsToGet) { """ Check whether the batchGetRequest meet all the constraints. @param itemsToGet """ if (itemsToGet == null || itemsToGet.size() == 0) { return false; } for (Class<?> clazz : itemsToGet.keyS...
java
private boolean validBatchGetRequest(Map<Class<?>, List<KeyPair>> itemsToGet) { if (itemsToGet == null || itemsToGet.size() == 0) { return false; } for (Class<?> clazz : itemsToGet.keySet()) { if (itemsToGet.get(clazz) != null && itemsToGet.get(clazz).size() > 0) { ...
[ "private", "boolean", "validBatchGetRequest", "(", "Map", "<", "Class", "<", "?", ">", ",", "List", "<", "KeyPair", ">", ">", "itemsToGet", ")", "{", "if", "(", "itemsToGet", "==", "null", "||", "itemsToGet", ".", "size", "(", ")", "==", "0", ")", "{...
Check whether the batchGetRequest meet all the constraints. @param itemsToGet
[ "Check", "whether", "the", "batchGetRequest", "meet", "all", "the", "constraints", "." ]
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java#L950-L961
geomajas/geomajas-project-server
plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HibernateLayerUtil.java
HibernateLayerUtil.setSessionFactory
public void setSessionFactory(SessionFactory sessionFactory) throws HibernateLayerException { """ Set session factory. @param sessionFactory session factory @throws HibernateLayerException could not get class metadata for data source """ try { this.sessionFactory = sessionFactory; if (null != layer...
java
public void setSessionFactory(SessionFactory sessionFactory) throws HibernateLayerException { try { this.sessionFactory = sessionFactory; if (null != layerInfo) { entityMetadata = sessionFactory.getClassMetadata(layerInfo.getFeatureInfo().getDataSourceName()); } } catch (Exception e) { // NOSONAR th...
[ "public", "void", "setSessionFactory", "(", "SessionFactory", "sessionFactory", ")", "throws", "HibernateLayerException", "{", "try", "{", "this", ".", "sessionFactory", "=", "sessionFactory", ";", "if", "(", "null", "!=", "layerInfo", ")", "{", "entityMetadata", ...
Set session factory. @param sessionFactory session factory @throws HibernateLayerException could not get class metadata for data source
[ "Set", "session", "factory", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HibernateLayerUtil.java#L145-L154
lets-blade/blade
src/main/java/com/blade/kit/ReflectKit.java
ReflectKit.getMethod
public static Method getMethod(Class<?> cls, String methodName, Class<?>... types) { """ Get cls method name by name and parameter types @param cls @param methodName @param types @return """ try { return cls.getMethod(methodName, types); } catch (Exception e) { ret...
java
public static Method getMethod(Class<?> cls, String methodName, Class<?>... types) { try { return cls.getMethod(methodName, types); } catch (Exception e) { return null; } }
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "cls", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "types", ")", "{", "try", "{", "return", "cls", ".", "getMethod", "(", "methodName", ",", "types", ")", ";...
Get cls method name by name and parameter types @param cls @param methodName @param types @return
[ "Get", "cls", "method", "name", "by", "name", "and", "parameter", "types" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/ReflectKit.java#L252-L258
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.rotateLocalZ
public Matrix3f rotateLocalZ(float ang, Matrix3f dest) { """ Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vecto...
java
public Matrix3f rotateLocalZ(float ang, Matrix3f dest) { float sin = (float) Math.sin(ang); float cos = (float) Math.cosFromSin(sin, ang); float nm00 = cos * m00 - sin * m01; float nm01 = sin * m00 + cos * m01; float nm10 = cos * m10 - sin * m11; float nm11 = sin * m10 + ...
[ "public", "Matrix3f", "rotateLocalZ", "(", "float", "ang", ",", "Matrix3f", "dest", ")", "{", "float", "sin", "=", "(", "float", ")", "Math", ".", "sin", "(", "ang", ")", ";", "float", "cos", "=", "(", "float", ")", "Math", ".", "cosFromSin", "(", ...
Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the ...
[ "Pre", "-", "multiply", "a", "rotation", "around", "the", "Z", "axis", "to", "this", "matrix", "by", "rotating", "the", "given", "amount", "of", "radians", "about", "the", "Z", "axis", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L2621-L2640
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java
FactorTable.conditionalLogProbGivenNext
public double conditionalLogProbGivenNext(int[] given, int of) { """ Computes the probability of the tag OF being at the beginning of the table given that the tag sequence GIVEN is at the end of the table. given is at the end, of is at the beginning @return the probability of the tag of being at the beginning...
java
public double conditionalLogProbGivenNext(int[] given, int of) { if (given.length != windowSize - 1) { throw new IllegalArgumentException("conditionalLogProbGivenNext requires given one less than clique size (" + windowSize + ") but was " + Arrays.toString(given)); } int[] label = indic...
[ "public", "double", "conditionalLogProbGivenNext", "(", "int", "[", "]", "given", ",", "int", "of", ")", "{", "if", "(", "given", ".", "length", "!=", "windowSize", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"conditionalLogProbGiven...
Computes the probability of the tag OF being at the beginning of the table given that the tag sequence GIVEN is at the end of the table. given is at the end, of is at the beginning @return the probability of the tag of being at the beginning of the table
[ "Computes", "the", "probability", "of", "the", "tag", "OF", "being", "at", "the", "beginning", "of", "the", "table", "given", "that", "the", "tag", "sequence", "GIVEN", "is", "at", "the", "end", "of", "the", "table", ".", "given", "is", "at", "the", "e...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/crf/FactorTable.java#L338-L351
optimaize/anythingworks
server/implgrizzly/src/main/java/com/optimaize/anythingworks/server/implgrizzly/GrizzlyHttpServer.java
GrizzlyHttpServer.getSoapWebServicePublisher
public synchronized GrizzlySoapWebServicePublisher getSoapWebServicePublisher(@NotNull TransportInfo transportInfo) { """ Overloaded method that gives you full control over the host instead of using the one given in the constructor. This way you can publish to multiple host names, or different port numbers or pro...
java
public synchronized GrizzlySoapWebServicePublisher getSoapWebServicePublisher(@NotNull TransportInfo transportInfo) { GrizzlySoapWebServicePublisher publisher = soapPublishers.get(transportInfo); if (publisher==null) { publisher = new GrizzlySoapWebServicePublisher(httpServer, transportInfo)...
[ "public", "synchronized", "GrizzlySoapWebServicePublisher", "getSoapWebServicePublisher", "(", "@", "NotNull", "TransportInfo", "transportInfo", ")", "{", "GrizzlySoapWebServicePublisher", "publisher", "=", "soapPublishers", ".", "get", "(", "transportInfo", ")", ";", "if",...
Overloaded method that gives you full control over the host instead of using the one given in the constructor. This way you can publish to multiple host names, or different port numbers or protocols. @return The publisher where you can add services.
[ "Overloaded", "method", "that", "gives", "you", "full", "control", "over", "the", "host", "instead", "of", "using", "the", "one", "given", "in", "the", "constructor", ".", "This", "way", "you", "can", "publish", "to", "multiple", "host", "names", "or", "di...
train
https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/server/implgrizzly/src/main/java/com/optimaize/anythingworks/server/implgrizzly/GrizzlyHttpServer.java#L68-L75
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_storage_POST
public OvhContainer project_serviceName_storage_POST(String serviceName, Boolean archive, String containerName, String region) throws IOException { """ Create container REST: POST /cloud/project/{serviceName}/storage @param archive [required] Archive container flag @param containerName [required] Container na...
java
public OvhContainer project_serviceName_storage_POST(String serviceName, Boolean archive, String containerName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/storage"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBod...
[ "public", "OvhContainer", "project_serviceName_storage_POST", "(", "String", "serviceName", ",", "Boolean", "archive", ",", "String", "containerName", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/stora...
Create container REST: POST /cloud/project/{serviceName}/storage @param archive [required] Archive container flag @param containerName [required] Container name @param region [required] Region @param serviceName [required] Service name
[ "Create", "container" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L569-L578
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java
CPFriendlyURLEntryPersistenceImpl.countByG_C_U
@Override public int countByG_C_U(long groupId, long classNameId, String urlTitle) { """ Returns the number of cp friendly url entries where groupId = &#63; and classNameId = &#63; and urlTitle = &#63;. @param groupId the group ID @param classNameId the class name ID @param urlTitle the url title @return th...
java
@Override public int countByG_C_U(long groupId, long classNameId, String urlTitle) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C_U; Object[] finderArgs = new Object[] { groupId, classNameId, urlTitle }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { Stri...
[ "@", "Override", "public", "int", "countByG_C_U", "(", "long", "groupId", ",", "long", "classNameId", ",", "String", "urlTitle", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_G_C_U", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object",...
Returns the number of cp friendly url entries where groupId = &#63; and classNameId = &#63; and urlTitle = &#63;. @param groupId the group ID @param classNameId the class name ID @param urlTitle the url title @return the number of matching cp friendly url entries
[ "Returns", "the", "number", "of", "cp", "friendly", "url", "entries", "where", "groupId", "=", "&#63", ";", "and", "classNameId", "=", "&#63", ";", "and", "urlTitle", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L3191-L3256
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/XmlUtils.java
XmlUtils.getEncoding
private static String getEncoding(String text) { """ Gets the encoding pattern from given XML file. @param text the context of the XML file @return the encoding pattern string of given XML file """ String result = "UTF-8";//默认编码格式 String xml = text.trim(); if (xml.startsWith("<?xm...
java
private static String getEncoding(String text) { String result = "UTF-8";//默认编码格式 String xml = text.trim(); if (xml.startsWith("<?xml")) { int end = xml.indexOf("?>"); String sub = xml.substring(0, end); StringTokenizer tokens = new StringTokenizer(sub, " =\...
[ "private", "static", "String", "getEncoding", "(", "String", "text", ")", "{", "String", "result", "=", "\"UTF-8\"", ";", "//默认编码格式", "String", "xml", "=", "text", ".", "trim", "(", ")", ";", "if", "(", "xml", ".", "startsWith", "(", "\"<?xml\"", ")", ...
Gets the encoding pattern from given XML file. @param text the context of the XML file @return the encoding pattern string of given XML file
[ "Gets", "the", "encoding", "pattern", "from", "given", "XML", "file", "." ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L166-L189
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/KeyPointsCircleRegularGrid.java
KeyPointsCircleRegularGrid.addTangents
private boolean addTangents(Grid grid, int rowA, int colA, int rowB, int colB) { """ Computes tangent points to the two ellipses specified by the grid coordinates """ EllipseRotated_F64 a = grid.get(rowA,colA); EllipseRotated_F64 b = grid.get(rowB,colB); if( !tangentFinder.process(a,b, A0, A1, A2, A3, B...
java
private boolean addTangents(Grid grid, int rowA, int colA, int rowB, int colB) { EllipseRotated_F64 a = grid.get(rowA,colA); EllipseRotated_F64 b = grid.get(rowB,colB); if( !tangentFinder.process(a,b, A0, A1, A2, A3, B0, B1, B2, B3) ) { return false; } Tangents ta = tangents.get(grid.getIndexOfRegEllipse(...
[ "private", "boolean", "addTangents", "(", "Grid", "grid", ",", "int", "rowA", ",", "int", "colA", ",", "int", "rowB", ",", "int", "colB", ")", "{", "EllipseRotated_F64", "a", "=", "grid", ".", "get", "(", "rowA", ",", "colA", ")", ";", "EllipseRotated_...
Computes tangent points to the two ellipses specified by the grid coordinates
[ "Computes", "tangent", "points", "to", "the", "two", "ellipses", "specified", "by", "the", "grid", "coordinates" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/KeyPointsCircleRegularGrid.java#L117-L155
wisdom-framework/wisdom
core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java
CookieHelper.getCookieValue
public static String getCookieValue(String name, Cookies cookies) { """ Gets the value of the cookie having the given name. The cookie is looked from the given cookies set. @param name the name of the cookie @param cookies the set of cookie @return the value of the cookie, {@literal null} if there are no c...
java
public static String getCookieValue(String name, Cookies cookies) { Cookie c = cookies.get(name); if (c != null) { return c.value(); } return null; }
[ "public", "static", "String", "getCookieValue", "(", "String", "name", ",", "Cookies", "cookies", ")", "{", "Cookie", "c", "=", "cookies", ".", "get", "(", "name", ")", ";", "if", "(", "c", "!=", "null", ")", "{", "return", "c", ".", "value", "(", ...
Gets the value of the cookie having the given name. The cookie is looked from the given cookies set. @param name the name of the cookie @param cookies the set of cookie @return the value of the cookie, {@literal null} if there are no cookie with the given name in the cookies set.
[ "Gets", "the", "value", "of", "the", "cookie", "having", "the", "given", "name", ".", "The", "cookie", "is", "looked", "from", "the", "given", "cookies", "set", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java#L107-L113
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.listStorageAccountsWithServiceResponseAsync
public Observable<ServiceResponse<Page<StorageAccountInfoInner>>> listStorageAccountsWithServiceResponseAsync(final String resourceGroupName, final String accountName) { """ Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to t...
java
public Observable<ServiceResponse<Page<StorageAccountInfoInner>>> listStorageAccountsWithServiceResponseAsync(final String resourceGroupName, final String accountName) { return listStorageAccountsSinglePageAsync(resourceGroupName, accountName) .concatMap(new Func1<ServiceResponse<Page<StorageAccount...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "StorageAccountInfoInner", ">", ">", ">", "listStorageAccountsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listStorag...
Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake An...
[ "Gets", "the", "first", "page", "of", "Azure", "Storage", "accounts", "if", "any", "linked", "to", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "The", "response", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1288-L1300
OpenLiberty/open-liberty
dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLogSet.java
FileLogSet.createNewUniqueFile
private File createNewUniqueFile(File srcFile) throws IOException { """ Create a new unique file name. If the source file is specified, the new file should be created by renaming the source file as the unique file. @param srcFile the file to rename, or null to create a new file @return the newly created file,...
java
private File createNewUniqueFile(File srcFile) throws IOException { String dateString = getDateString(); int index = findFileIndexAndUpdateCounter(dateString); String destFileName; File destFile; do { int counter = lastCounter++; destFileName = fileName +...
[ "private", "File", "createNewUniqueFile", "(", "File", "srcFile", ")", "throws", "IOException", "{", "String", "dateString", "=", "getDateString", "(", ")", ";", "int", "index", "=", "findFileIndexAndUpdateCounter", "(", "dateString", ")", ";", "String", "destFile...
Create a new unique file name. If the source file is specified, the new file should be created by renaming the source file as the unique file. @param srcFile the file to rename, or null to create a new file @return the newly created file, or null if the could not be created @throws IOException if an unexpected I/O err...
[ "Create", "a", "new", "unique", "file", "name", ".", "If", "the", "source", "file", "is", "specified", "the", "new", "file", "should", "be", "created", "by", "renaming", "the", "source", "file", "as", "the", "unique", "file", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLogSet.java#L240-L279
Red5/red5-server-common
src/main/java/org/red5/server/stream/StreamService.java
StreamService.sendNetStreamStatus
public static void sendNetStreamStatus(IConnection conn, String statusCode, String description, String name, String status, Number streamId) { """ Send NetStream.Status to the client. @param conn connection @param statusCode NetStream status code @param description description @param name name @param st...
java
public static void sendNetStreamStatus(IConnection conn, String statusCode, String description, String name, String status, Number streamId) { if (conn instanceof RTMPConnection) { Status s = new Status(statusCode); s.setClientid(streamId); s.setDesciption(description); ...
[ "public", "static", "void", "sendNetStreamStatus", "(", "IConnection", "conn", ",", "String", "statusCode", ",", "String", "description", ",", "String", "name", ",", "String", "status", ",", "Number", "streamId", ")", "{", "if", "(", "conn", "instanceof", "RTM...
Send NetStream.Status to the client. @param conn connection @param statusCode NetStream status code @param description description @param name name @param status The status - error, warning, or status @param streamId stream id
[ "Send", "NetStream", ".", "Status", "to", "the", "client", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/StreamService.java#L834-L848
biezhi/anima
src/main/java/io/github/biezhi/anima/Anima.java
Anima.open
public static Anima open(String url, String user, String pass) { """ Create anima with url and db info @param url jdbc url @param user database username @param pass database password @return Anima """ return open(url, user, pass, QuirksDetector.forURL(url)); }
java
public static Anima open(String url, String user, String pass) { return open(url, user, pass, QuirksDetector.forURL(url)); }
[ "public", "static", "Anima", "open", "(", "String", "url", ",", "String", "user", ",", "String", "pass", ")", "{", "return", "open", "(", "url", ",", "user", ",", "pass", ",", "QuirksDetector", ".", "forURL", "(", "url", ")", ")", ";", "}" ]
Create anima with url and db info @param url jdbc url @param user database username @param pass database password @return Anima
[ "Create", "anima", "with", "url", "and", "db", "info" ]
train
https://github.com/biezhi/anima/blob/d6655e47ac4c08d9d7f961ac0569062bead8b1ed/src/main/java/io/github/biezhi/anima/Anima.java#L199-L201
casmi/casmi
src/main/java/casmi/graphics/Graphics.java
Graphics.setPerspective
public void setPerspective(double fov, double aspect, double zNear, double zFar) { """ Sets a perspective projection applying foreshortening, making distant objects appear smaller than closer ones. The parameters define a viewing volume with the shape of truncated pyramid. Objects near to the front of the volume...
java
public void setPerspective(double fov, double aspect, double zNear, double zFar) { matrixMode(MatrixMode.PROJECTION); resetMatrix(); glu.gluPerspective(fov, aspect, zNear, zFar); matrixMode(MatrixMode.MODELVIEW); resetMatrix(); }
[ "public", "void", "setPerspective", "(", "double", "fov", ",", "double", "aspect", ",", "double", "zNear", ",", "double", "zFar", ")", "{", "matrixMode", "(", "MatrixMode", ".", "PROJECTION", ")", ";", "resetMatrix", "(", ")", ";", "glu", ".", "gluPerspect...
Sets a perspective projection applying foreshortening, making distant objects appear smaller than closer ones. The parameters define a viewing volume with the shape of truncated pyramid. Objects near to the front of the volume appear their actual size, while farther objects appear smaller. This projection simulates the...
[ "Sets", "a", "perspective", "projection", "applying", "foreshortening", "making", "distant", "objects", "appear", "smaller", "than", "closer", "ones", ".", "The", "parameters", "define", "a", "viewing", "volume", "with", "the", "shape", "of", "truncated", "pyramid...
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/Graphics.java#L730-L736
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
ClustersInner.rotateDiskEncryptionKeyAsync
public Observable<Void> rotateDiskEncryptionKeyAsync(String resourceGroupName, String clusterName, ClusterDiskEncryptionParameters parameters) { """ Rotate disk encryption key of the specified HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster...
java
public Observable<Void> rotateDiskEncryptionKeyAsync(String resourceGroupName, String clusterName, ClusterDiskEncryptionParameters parameters) { return rotateDiskEncryptionKeyWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Override...
[ "public", "Observable", "<", "Void", ">", "rotateDiskEncryptionKeyAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "ClusterDiskEncryptionParameters", "parameters", ")", "{", "return", "rotateDiskEncryptionKeyWithServiceResponseAsync", "(", "resou...
Rotate disk encryption key of the specified HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param parameters The parameters for the disk encryption operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the o...
[ "Rotate", "disk", "encryption", "key", "of", "the", "specified", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L1320-L1327
molgenis/molgenis
molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/importer/repository/OntologyRepositoryCollection.java
OntologyRepositoryCollection.createNodePaths
private void createNodePaths() { """ Creates {@link OntologyTermNodePathMetadata} {@link Entity}s for an entire ontology tree and writes them to the {@link #nodePathsPerOntologyTerm} {@link Multimap}. """ TreeTraverser<OWLClassContainer> traverser = new TreeTraverser<OWLClassContainer>() { ...
java
private void createNodePaths() { TreeTraverser<OWLClassContainer> traverser = new TreeTraverser<OWLClassContainer>() { @Override public Iterable<OWLClassContainer> children(OWLClassContainer container) { int count = 0; List<OWLClassContainer> containers = new Arra...
[ "private", "void", "createNodePaths", "(", ")", "{", "TreeTraverser", "<", "OWLClassContainer", ">", "traverser", "=", "new", "TreeTraverser", "<", "OWLClassContainer", ">", "(", ")", "{", "@", "Override", "public", "Iterable", "<", "OWLClassContainer", ">", "ch...
Creates {@link OntologyTermNodePathMetadata} {@link Entity}s for an entire ontology tree and writes them to the {@link #nodePathsPerOntologyTerm} {@link Multimap}.
[ "Creates", "{" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/importer/repository/OntologyRepositoryCollection.java#L166-L194
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java
FineUploader5Session.setCustomHeaders
@Nonnull public FineUploader5Session setCustomHeaders (@Nullable final Map <String, String> aCustomHeaders) { """ Any additional headers you would like included with the GET request sent to your server. Ignored in IE9 and IE8 if the endpoint is cross-origin. @param aCustomHeaders Custom headers to be set. ...
java
@Nonnull public FineUploader5Session setCustomHeaders (@Nullable final Map <String, String> aCustomHeaders) { m_aSessionCustomHeaders.setAll (aCustomHeaders); return this; }
[ "@", "Nonnull", "public", "FineUploader5Session", "setCustomHeaders", "(", "@", "Nullable", "final", "Map", "<", "String", ",", "String", ">", "aCustomHeaders", ")", "{", "m_aSessionCustomHeaders", ".", "setAll", "(", "aCustomHeaders", ")", ";", "return", "this", ...
Any additional headers you would like included with the GET request sent to your server. Ignored in IE9 and IE8 if the endpoint is cross-origin. @param aCustomHeaders Custom headers to be set. @return this
[ "Any", "additional", "headers", "you", "would", "like", "included", "with", "the", "GET", "request", "sent", "to", "your", "server", ".", "Ignored", "in", "IE9", "and", "IE8", "if", "the", "endpoint", "is", "cross", "-", "origin", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java#L64-L69
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/helper/CheckPointHelper.java
CheckPointHelper.replaceExceptionCallback
public CheckPointHelper replaceExceptionCallback(BasicCheckRule checkRule, ValidationInvalidCallback cb) { """ Replace the callback to be used basic exception. @param checkRule basic rule type ex,, BasicCheckRule.Mandatory @param cb callback class with implement ValidationInvalidCallback @return CheckP...
java
public CheckPointHelper replaceExceptionCallback(BasicCheckRule checkRule, ValidationInvalidCallback cb) { this.msgChecker.replaceCallback(checkRule, cb); return this; }
[ "public", "CheckPointHelper", "replaceExceptionCallback", "(", "BasicCheckRule", "checkRule", ",", "ValidationInvalidCallback", "cb", ")", "{", "this", ".", "msgChecker", ".", "replaceCallback", "(", "checkRule", ",", "cb", ")", ";", "return", "this", ";", "}" ]
Replace the callback to be used basic exception. @param checkRule basic rule type ex,, BasicCheckRule.Mandatory @param cb callback class with implement ValidationInvalidCallback @return CheckPointHeler check point helper
[ "Replace", "the", "callback", "to", "be", "used", "basic", "exception", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/helper/CheckPointHelper.java#L49-L52
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java
ExtensionAuthentication.getPopupFlagLoggedOutIndicatorMenu
private PopupContextMenuItemFactory getPopupFlagLoggedOutIndicatorMenu() { """ Gets the popup menu for flagging the "Logged out" pattern. @return the popup menu """ if (this.popupFlagLoggedOutIndicatorMenuFactory == null) { popupFlagLoggedOutIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - ...
java
private PopupContextMenuItemFactory getPopupFlagLoggedOutIndicatorMenu() { if (this.popupFlagLoggedOutIndicatorMenuFactory == null) { popupFlagLoggedOutIndicatorMenuFactory = new PopupContextMenuItemFactory("dd - " + Constant.messages.getString("context.flag.popup")) { private static final long serialVer...
[ "private", "PopupContextMenuItemFactory", "getPopupFlagLoggedOutIndicatorMenu", "(", ")", "{", "if", "(", "this", ".", "popupFlagLoggedOutIndicatorMenuFactory", "==", "null", ")", "{", "popupFlagLoggedOutIndicatorMenuFactory", "=", "new", "PopupContextMenuItemFactory", "(", "...
Gets the popup menu for flagging the "Logged out" pattern. @return the popup menu
[ "Gets", "the", "popup", "menu", "for", "flagging", "the", "Logged", "out", "pattern", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authentication/ExtensionAuthentication.java#L178-L193
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java
DeprecatedAPIListBuilder.composeDeprecatedList
private void composeDeprecatedList(SortedSet<Element> rset, SortedSet<Element> sset, List<? extends Element> members) { """ Add the members into a single list of deprecated members. @param rset set of elements deprecated for removal. @param sset set of deprecated elements. @param list List of all the particul...
java
private void composeDeprecatedList(SortedSet<Element> rset, SortedSet<Element> sset, List<? extends Element> members) { for (Element member : members) { if (utils.isDeprecatedForRemoval(member)) { rset.add(member); } if (utils.isDeprecated(member)) { ...
[ "private", "void", "composeDeprecatedList", "(", "SortedSet", "<", "Element", ">", "rset", ",", "SortedSet", "<", "Element", ">", "sset", ",", "List", "<", "?", "extends", "Element", ">", "members", ")", "{", "for", "(", "Element", "member", ":", "members"...
Add the members into a single list of deprecated members. @param rset set of elements deprecated for removal. @param sset set of deprecated elements. @param list List of all the particular deprecated members, e.g. methods. @param members members to be added in the list.
[ "Add", "the", "members", "into", "a", "single", "list", "of", "deprecated", "members", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java#L173-L182
OpenLiberty/open-liberty
dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java
RepositoryResolver.createInstallList
List<RepositoryResource> createInstallList(String featureName) { """ Create a list of resources which should be installed in order to install the given featutre. <p> The install list consists of all the dependencies which are needed by {@code esa}, ordered so that each resource in the list comes after its depend...
java
List<RepositoryResource> createInstallList(String featureName) { ProvisioningFeatureDefinition feature = resolverRepository.getFeature(featureName); if (feature == null) { // Feature missing missingTopLevelRequirements.add(featureName); // If we didn't find this featu...
[ "List", "<", "RepositoryResource", ">", "createInstallList", "(", "String", "featureName", ")", "{", "ProvisioningFeatureDefinition", "feature", "=", "resolverRepository", ".", "getFeature", "(", "featureName", ")", ";", "if", "(", "feature", "==", "null", ")", "{...
Create a list of resources which should be installed in order to install the given featutre. <p> The install list consists of all the dependencies which are needed by {@code esa}, ordered so that each resource in the list comes after its dependencies. @param featureName the feature name (as provided to {@link #resolve...
[ "Create", "a", "list", "of", "resources", "which", "should", "be", "installed", "in", "order", "to", "install", "the", "given", "featutre", ".", "<p", ">", "The", "install", "list", "consists", "of", "all", "the", "dependencies", "which", "are", "needed", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java#L545-L579
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/FullMappingPropertiesBasedBundlesHandlerFactory.java
FullMappingPropertiesBasedBundlesHandlerFactory.getResourceBundles
public List<JoinableResourceBundle> getResourceBundles(Properties properties) { """ Returns the list of joinable resource bundle @param properties the properties @return the list of joinable resource bundle """ PropertiesConfigHelper props = new PropertiesConfigHelper(properties, resourceType); Strin...
java
public List<JoinableResourceBundle> getResourceBundles(Properties properties) { PropertiesConfigHelper props = new PropertiesConfigHelper(properties, resourceType); String fileExtension = "." + resourceType; // Initialize custom bundles List<JoinableResourceBundle> customBundles = new ArrayList<>(); // Chec...
[ "public", "List", "<", "JoinableResourceBundle", ">", "getResourceBundles", "(", "Properties", "properties", ")", "{", "PropertiesConfigHelper", "props", "=", "new", "PropertiesConfigHelper", "(", "properties", ",", "resourceType", ")", ";", "String", "fileExtension", ...
Returns the list of joinable resource bundle @param properties the properties @return the list of joinable resource bundle
[ "Returns", "the", "list", "of", "joinable", "resource", "bundle" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/FullMappingPropertiesBasedBundlesHandlerFactory.java#L97-L137
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageHandler.java
CmsContainerpageHandler.createElementViewSelectionMenuEntry
protected I_CmsContextMenuEntry createElementViewSelectionMenuEntry() { """ Creates the element view selection menu entry, returns <code>null</code> in case no other views available.<p> @return the menu entry """ List<CmsElementViewInfo> elementViews = m_controller.getData().getElementViews(); ...
java
protected I_CmsContextMenuEntry createElementViewSelectionMenuEntry() { List<CmsElementViewInfo> elementViews = m_controller.getData().getElementViews(); if (elementViews.size() > 1) { CmsContextMenuEntry parentEntry = new CmsContextMenuEntry(this, null, new I_CmsContextMenuCommand() { ...
[ "protected", "I_CmsContextMenuEntry", "createElementViewSelectionMenuEntry", "(", ")", "{", "List", "<", "CmsElementViewInfo", ">", "elementViews", "=", "m_controller", ".", "getData", "(", ")", ".", "getElementViews", "(", ")", ";", "if", "(", "elementViews", ".", ...
Creates the element view selection menu entry, returns <code>null</code> in case no other views available.<p> @return the menu entry
[ "Creates", "the", "element", "view", "selection", "menu", "entry", "returns", "<code", ">", "null<", "/", "code", ">", "in", "case", "no", "other", "views", "available", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageHandler.java#L1206-L1256
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.openSSHConnection
@Given("^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$") public void openSSHConnection(String remoteHost, String tmp, String remotePort, String user, String foo, String password, String bar, String pemFile) throws Exception { """ Open...
java
@Given("^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$") public void openSSHConnection(String remoteHost, String tmp, String remotePort, String user, String foo, String password, String bar, String pemFile) throws Exception { if ((...
[ "@", "Given", "(", "\"^I open a ssh connection to '(.+?)'( in port '(.+?)')? with user '(.+?)'( and password '(.+?)')?( using pem file '(.+?)')?$\"", ")", "public", "void", "openSSHConnection", "(", "String", "remoteHost", ",", "String", "tmp", ",", "String", "remotePort", ",", "...
Opens a ssh connection to remote host @param remoteHost remote host @param user remote user @param password (required if pemFile null) @param pemFile (required if password null) @throws Exception exception
[ "Opens", "a", "ssh", "connection", "to", "remote", "host" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L52-L68
voldemort/voldemort
src/java/voldemort/client/scheduler/AsyncMetadataVersionManager.java
AsyncMetadataVersionManager.fetchNewVersion
public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) { """ /* This method checks for any update in the version for 'versionKey'. If there is any change, it returns the new version. Otherwise it will return a null. """ try { Long newVersion = getCurrent...
java
public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) { try { Long newVersion = getCurrentVersion(versionKey, versionProps); // If version obtained is null, the store is untouched. Continue if(newVersion != null) { logger.de...
[ "public", "Long", "fetchNewVersion", "(", "String", "versionKey", ",", "Long", "curVersion", ",", "Properties", "versionProps", ")", "{", "try", "{", "Long", "newVersion", "=", "getCurrentVersion", "(", "versionKey", ",", "versionProps", ")", ";", "// If version o...
/* This method checks for any update in the version for 'versionKey'. If there is any change, it returns the new version. Otherwise it will return a null.
[ "/", "*", "This", "method", "checks", "for", "any", "update", "in", "the", "version", "for", "versionKey", ".", "If", "there", "is", "any", "change", "it", "returns", "the", "new", "version", ".", "Otherwise", "it", "will", "return", "a", "null", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/scheduler/AsyncMetadataVersionManager.java#L111-L138
jsurfer/JsonSurfer
jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java
JsonSurfer.collectAll
public Collection<Object> collectAll(InputStream inputStream, String... paths) { """ Collect all matched value into a collection @param inputStream Json reader @param paths JsonPath @return values """ return collectAll(inputStream, compile(paths)); }
java
public Collection<Object> collectAll(InputStream inputStream, String... paths) { return collectAll(inputStream, compile(paths)); }
[ "public", "Collection", "<", "Object", ">", "collectAll", "(", "InputStream", "inputStream", ",", "String", "...", "paths", ")", "{", "return", "collectAll", "(", "inputStream", ",", "compile", "(", "paths", ")", ")", ";", "}" ]
Collect all matched value into a collection @param inputStream Json reader @param paths JsonPath @return values
[ "Collect", "all", "matched", "value", "into", "a", "collection" ]
train
https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L347-L349
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java
BoxApiMetadata.getAddFolderMetadataRequest
public BoxRequestsMetadata.AddItemMetadata getAddFolderMetadataRequest(String id, LinkedHashMap<String, Object> values, String scope, String template) { """ Gets a request that adds metadata to a folder @param id id of the folder to add metadata to @param values mapping of the template keys to their valu...
java
public BoxRequestsMetadata.AddItemMetadata getAddFolderMetadataRequest(String id, LinkedHashMap<String, Object> values, String scope, String template) { BoxRequestsMetadata.AddItemMetadata request = new BoxRequestsMetadata.AddItemMetadata(values, getFolderMetadataUrl(id, scope, template), mSession); ret...
[ "public", "BoxRequestsMetadata", ".", "AddItemMetadata", "getAddFolderMetadataRequest", "(", "String", "id", ",", "LinkedHashMap", "<", "String", ",", "Object", ">", "values", ",", "String", "scope", ",", "String", "template", ")", "{", "BoxRequestsMetadata", ".", ...
Gets a request that adds metadata to a folder @param id id of the folder to add metadata to @param values mapping of the template keys to their values @param scope currently only global and enterprise scopes are supported @param template metadata template to use @return request to add metadata to a folder
[ "Gets", "a", "request", "that", "adds", "metadata", "to", "a", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java#L129-L132
koendeschacht/bow-utils
src/main/java/be/bagofwords/util/SerializationUtils.java
SerializationUtils.writeObject
public static void writeObject(Object object, OutputStream outputStream) { """ Careful! Not compatible with above method to convert objects to byte arrays! """ try { if (object instanceof Compactable) { ((Compactable) object).compact(); } defaultObjec...
java
public static void writeObject(Object object, OutputStream outputStream) { try { if (object instanceof Compactable) { ((Compactable) object).compact(); } defaultObjectMapper.writeValue(outputStream, object); } catch (IOException exp) { thro...
[ "public", "static", "void", "writeObject", "(", "Object", "object", ",", "OutputStream", "outputStream", ")", "{", "try", "{", "if", "(", "object", "instanceof", "Compactable", ")", "{", "(", "(", "Compactable", ")", "object", ")", ".", "compact", "(", ")"...
Careful! Not compatible with above method to convert objects to byte arrays!
[ "Careful!", "Not", "compatible", "with", "above", "method", "to", "convert", "objects", "to", "byte", "arrays!" ]
train
https://github.com/koendeschacht/bow-utils/blob/f599da17cb7a40b8ffc5610a9761fa922e99d7cb/src/main/java/be/bagofwords/util/SerializationUtils.java#L352-L361
alkacon/opencms-core
src-modules/org/opencms/workplace/list/A_CmsListDialog.java
A_CmsListDialog.setListObject
public void setListObject(Class<?> listDialog, CmsHtmlList listObject) { """ Stores the given object as "list object" for the given list dialog in the current users session.<p> @param listDialog the list dialog class @param listObject the list to store """ if (listObject == null) { // ...
java
public void setListObject(Class<?> listDialog, CmsHtmlList listObject) { if (listObject == null) { // null object: remove the entry from the map getListObjectMap(getSettings()).remove(listDialog.getName()); } else { if ((listObject.getMetadata() != null) && listObjec...
[ "public", "void", "setListObject", "(", "Class", "<", "?", ">", "listDialog", ",", "CmsHtmlList", "listObject", ")", "{", "if", "(", "listObject", "==", "null", ")", "{", "// null object: remove the entry from the map", "getListObjectMap", "(", "getSettings", "(", ...
Stores the given object as "list object" for the given list dialog in the current users session.<p> @param listDialog the list dialog class @param listObject the list to store
[ "Stores", "the", "given", "object", "as", "list", "object", "for", "the", "given", "list", "dialog", "in", "the", "current", "users", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/list/A_CmsListDialog.java#L728-L739
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_dynHost_login_login_PUT
public void zone_zoneName_dynHost_login_login_PUT(String zoneName, String login, OvhDynHostLogin body) throws IOException { """ Alter this object properties REST: PUT /domain/zone/{zoneName}/dynHost/login/{login} @param body [required] New object properties @param zoneName [required] The internal name of your...
java
public void zone_zoneName_dynHost_login_login_PUT(String zoneName, String login, OvhDynHostLogin body) throws IOException { String qPath = "/domain/zone/{zoneName}/dynHost/login/{login}"; StringBuilder sb = path(qPath, zoneName, login); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "zone_zoneName_dynHost_login_login_PUT", "(", "String", "zoneName", ",", "String", "login", ",", "OvhDynHostLogin", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/dynHost/login/{login}\"", ";", "StringBuilder"...
Alter this object properties REST: PUT /domain/zone/{zoneName}/dynHost/login/{login} @param body [required] New object properties @param zoneName [required] The internal name of your zone @param login [required] Login
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L453-L457
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.processIndexTemplate
protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { """ Create the php index listing all of the Docs features @param cfg @param workUnitList @param groupMaps ...
java
protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { // Get or create a template and merge in the data final Template template = cfg.getTemplate(getIndex...
[ "protected", "void", "processIndexTemplate", "(", "final", "Configuration", "cfg", ",", "final", "List", "<", "DocWorkUnit", ">", "workUnitList", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "throws", "IOException...
Create the php index listing all of the Docs features @param cfg @param workUnitList @param groupMaps @throws IOException
[ "Create", "the", "php", "index", "listing", "all", "of", "the", "Docs", "features" ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L464-L482
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_udp_farm_POST
public OvhBackendUdp serviceName_udp_farm_POST(String serviceName, String displayName, Long port, Long vrackNetworkId, String zone) throws IOException { """ Add a new UDP Farm on your IP Load Balancing REST: POST /ipLoadbalancing/{serviceName}/udp/farm @param zone [required] Zone of your farm @param vrackNetw...
java
public OvhBackendUdp serviceName_udp_farm_POST(String serviceName, String displayName, Long port, Long vrackNetworkId, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/farm"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); ...
[ "public", "OvhBackendUdp", "serviceName_udp_farm_POST", "(", "String", "serviceName", ",", "String", "displayName", ",", "Long", "port", ",", "Long", "vrackNetworkId", ",", "String", "zone", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalanc...
Add a new UDP Farm on your IP Load Balancing REST: POST /ipLoadbalancing/{serviceName}/udp/farm @param zone [required] Zone of your farm @param vrackNetworkId [required] Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack @para...
[ "Add", "a", "new", "UDP", "Farm", "on", "your", "IP", "Load", "Balancing" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L874-L884
akquinet/needle
src/main/java/de/akquinet/jbosscc/needle/reflection/ReflectionUtil.java
ReflectionUtil.invokeMethod
public static Object invokeMethod(final Object object, final Class<?> clazz, final String methodName, final Object... arguments) throws Exception { """ Invoke a given method with given arguments on a given object via reflection. @param object -- target object of invocation @param clazz -- type o...
java
public static Object invokeMethod(final Object object, final Class<?> clazz, final String methodName, final Object... arguments) throws Exception { Class<?> superClazz = clazz; while (superClazz != null) { for (final Method declaredMethod : superClazz.getDeclaredMethods()) { ...
[ "public", "static", "Object", "invokeMethod", "(", "final", "Object", "object", ",", "final", "Class", "<", "?", ">", "clazz", ",", "final", "String", "methodName", ",", "final", "Object", "...", "arguments", ")", "throws", "Exception", "{", "Class", "<", ...
Invoke a given method with given arguments on a given object via reflection. @param object -- target object of invocation @param clazz -- type of argument object @param methodName -- name of method to be invoked @param arguments -- arguments for method invocation @return -- method object to which invocation is actuall...
[ "Invoke", "a", "given", "method", "with", "given", "arguments", "on", "a", "given", "object", "via", "reflection", "." ]
train
https://github.com/akquinet/needle/blob/8b411c521246b8212882485edc01644f9aac7e24/src/main/java/de/akquinet/jbosscc/needle/reflection/ReflectionUtil.java#L296-L316
j256/ormlite-core
src/main/java/com/j256/ormlite/dao/DaoManager.java
DaoManager.createDao
public synchronized static <D extends Dao<T, ?>, T> D createDao(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig) throws SQLException { """ Helper method to create a DAO object without having to define a class. This checks to see if the DAO has already been created. If not then it is a cal...
java
public synchronized static <D extends Dao<T, ?>, T> D createDao(ConnectionSource connectionSource, DatabaseTableConfig<T> tableConfig) throws SQLException { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } return doCreateDao(connectionSource, ...
[ "public", "synchronized", "static", "<", "D", "extends", "Dao", "<", "T", ",", "?", ">", ",", "T", ">", "D", "createDao", "(", "ConnectionSource", "connectionSource", ",", "DatabaseTableConfig", "<", "T", ">", "tableConfig", ")", "throws", "SQLException", "{...
Helper method to create a DAO object without having to define a class. This checks to see if the DAO has already been created. If not then it is a call through to {@link BaseDaoImpl#createDao(ConnectionSource, DatabaseTableConfig)}.
[ "Helper", "method", "to", "create", "a", "DAO", "object", "without", "having", "to", "define", "a", "class", ".", "This", "checks", "to", "see", "if", "the", "DAO", "has", "already", "been", "created", ".", "If", "not", "then", "it", "is", "a", "call",...
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/dao/DaoManager.java#L125-L131
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractModuleIndexWriter.java
AbstractModuleIndexWriter.addModulePackagesIndex
protected void addModulePackagesIndex(Content body, ModuleElement mdle) { """ Adds the frame or non-frame module packages index to the documentation tree. @param body the document tree to which the index will be added @param mdle the module being documented """ addModulePackagesIndexContents("docle...
java
protected void addModulePackagesIndex(Content body, ModuleElement mdle) { addModulePackagesIndexContents("doclet.Module_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Module_Summary"), configuration.getText("doclet.mod...
[ "protected", "void", "addModulePackagesIndex", "(", "Content", "body", ",", "ModuleElement", "mdle", ")", "{", "addModulePackagesIndexContents", "(", "\"doclet.Module_Summary\"", ",", "configuration", ".", "getText", "(", "\"doclet.Member_Table_Summary\"", ",", "configurati...
Adds the frame or non-frame module packages index to the documentation tree. @param body the document tree to which the index will be added @param mdle the module being documented
[ "Adds", "the", "frame", "or", "non", "-", "frame", "module", "packages", "index", "to", "the", "documentation", "tree", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractModuleIndexWriter.java#L189-L194
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTextFieldRenderer.java
WTextFieldRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WTextField. @param component the WTextField to paint. @param renderContext the RenderContext to paint to. """ WTextField textField = (WTextField) component; XmlStringBuilder xml =...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTextField textField = (WTextField) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = textField.isReadOnly(); xml.appendTagOpen("ui:textfield"); xml.appendAttribute("id", compo...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTextField", "textField", "=", "(", "WTextField", ")", "component", ";", "XmlStringBuilder", "xml", "=", "rende...
Paints the given WTextField. @param component the WTextField to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTextField", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTextFieldRenderer.java#L25-L73
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/operations/Compose.java
Compose.makeFilter
private static MutableFst makeFilter(WriteableSymbolTable table, Semiring semiring, String eps1, String eps2) { """ Get a filter to use for avoiding multiple epsilon paths in the resulting Fst See: M. Mohri, "Weighted automata algorithms", Handbook of Weighted Automata. Springer, pp. 213-250, 2009. @param ta...
java
private static MutableFst makeFilter(WriteableSymbolTable table, Semiring semiring, String eps1, String eps2) { MutableFst filter = new MutableFst(semiring, table, table); // State 0 MutableState s0 = filter.newStartState(); s0.setFinalWeight(semiring.one()); MutableState s1 = filter.newState(); ...
[ "private", "static", "MutableFst", "makeFilter", "(", "WriteableSymbolTable", "table", ",", "Semiring", "semiring", ",", "String", "eps1", ",", "String", "eps2", ")", "{", "MutableFst", "filter", "=", "new", "MutableFst", "(", "semiring", ",", "table", ",", "t...
Get a filter to use for avoiding multiple epsilon paths in the resulting Fst See: M. Mohri, "Weighted automata algorithms", Handbook of Weighted Automata. Springer, pp. 213-250, 2009. @param table the filter's input/output symbols @param semiring the semiring to use in the operation
[ "Get", "a", "filter", "to", "use", "for", "avoiding", "multiple", "epsilon", "paths", "in", "the", "resulting", "Fst" ]
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/operations/Compose.java#L190-L219
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java
SwaptionDataLattice.containsEntryFor
public boolean containsEntryFor(int maturityInMonths, int tenorInMonths, int moneynessBP) { """ Returns true if the lattice contains an entry at the specified location. @param maturityInMonths The maturity in months to check. @param tenorInMonths The tenor in months to check. @param moneynessBP The moneyness ...
java
public boolean containsEntryFor(int maturityInMonths, int tenorInMonths, int moneynessBP) { return entryMap.containsKey(new DataKey(maturityInMonths, tenorInMonths, moneynessBP)); }
[ "public", "boolean", "containsEntryFor", "(", "int", "maturityInMonths", ",", "int", "tenorInMonths", ",", "int", "moneynessBP", ")", "{", "return", "entryMap", ".", "containsKey", "(", "new", "DataKey", "(", "maturityInMonths", ",", "tenorInMonths", ",", "moneyne...
Returns true if the lattice contains an entry at the specified location. @param maturityInMonths The maturity in months to check. @param tenorInMonths The tenor in months to check. @param moneynessBP The moneyness in bp to check. @return True iff there is an entry at the specified location.
[ "Returns", "true", "if", "the", "lattice", "contains", "an", "entry", "at", "the", "specified", "location", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java#L547-L549
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.firstRow
public GroovyRowResult firstRow(String sql, Object[] params) throws SQLException { """ Performs the given SQL query and return the first row of the result set. <p> An Object array variant of {@link #firstRow(String, List)}. <p> This method supports named and named ordinal parameters by supplying such paramete...
java
public GroovyRowResult firstRow(String sql, Object[] params) throws SQLException { return firstRow(sql, Arrays.asList(params)); }
[ "public", "GroovyRowResult", "firstRow", "(", "String", "sql", ",", "Object", "[", "]", "params", ")", "throws", "SQLException", "{", "return", "firstRow", "(", "sql", ",", "Arrays", ".", "asList", "(", "params", ")", ")", ";", "}" ]
Performs the given SQL query and return the first row of the result set. <p> An Object array variant of {@link #firstRow(String, List)}. <p> This method supports named and named ordinal parameters by supplying such parameters in the <code>params</code> array. See the class Javadoc for more details. @param sql the S...
[ "Performs", "the", "given", "SQL", "query", "and", "return", "the", "first", "row", "of", "the", "result", "set", ".", "<p", ">", "An", "Object", "array", "variant", "of", "{", "@link", "#firstRow", "(", "String", "List", ")", "}", ".", "<p", ">", "T...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L2289-L2291
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdNotInCollectionCondition
protected void addIdNotInCollectionCondition(final String propertyName, final Collection<Integer> values) { """ Add a Field Search Condition that will check if the id field does not exist in an array of values. eg. {@code field NOT IN (values)} @param propertyName The name of the field id as defined in the Ent...
java
protected void addIdNotInCollectionCondition(final String propertyName, final Collection<Integer> values) { if (values != null && !values.isEmpty()) { fieldConditions.add(getCriteriaBuilder().not(getRootPath().get(propertyName).in(values))); } }
[ "protected", "void", "addIdNotInCollectionCondition", "(", "final", "String", "propertyName", ",", "final", "Collection", "<", "Integer", ">", "values", ")", "{", "if", "(", "values", "!=", "null", "&&", "!", "values", ".", "isEmpty", "(", ")", ")", "{", "...
Add a Field Search Condition that will check if the id field does not exist in an array of values. eg. {@code field NOT IN (values)} @param propertyName The name of the field id as defined in the Entity mapping class. @param values The List of Ids to be compared to.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "does", "not", "exist", "in", "an", "array", "of", "values", ".", "eg", ".", "{", "@code", "field", "NOT", "IN", "(", "values", ")", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L370-L374
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java
QueueService.create
public static QueueContract create(String profile, Configuration config) { """ A static factory method that returns an instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance and profile prefix for service settings. The {@link Confi...
java
public static QueueContract create(String profile, Configuration config) { return config.create(profile, QueueContract.class); }
[ "public", "static", "QueueContract", "create", "(", "String", "profile", ",", "Configuration", "config", ")", "{", "return", "config", ".", "create", "(", "profile", ",", "QueueContract", ".", "class", ")", ";", "}" ]
A static factory method that returns an instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance and profile prefix for service settings. The {@link Configuration} instance must have storage account information and credentials set with the ...
[ "A", "static", "factory", "method", "that", "returns", "an", "instance", "implementing", "{", "@link", "com", ".", "microsoft", ".", "windowsazure", ".", "services", ".", "queue", ".", "QueueContract", "}", "using", "the", "specified", "{", "@link", "Configura...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java#L99-L101
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java
Util.generateSuperclassPattern
public static String generateSuperclassPattern(URI origin, String matchVariable) { """ Generate a pattern for matching var to the superclasses of clazz @param origin @param matchVariable @return """ return new StringBuilder() .append(sparqlWrapUri(origin)).append(" ") ...
java
public static String generateSuperclassPattern(URI origin, String matchVariable) { return new StringBuilder() .append(sparqlWrapUri(origin)).append(" ") .append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ") .append("?").append(matchVariable).append(" .") ...
[ "public", "static", "String", "generateSuperclassPattern", "(", "URI", "origin", ",", "String", "matchVariable", ")", "{", "return", "new", "StringBuilder", "(", ")", ".", "append", "(", "sparqlWrapUri", "(", "origin", ")", ")", ".", "append", "(", "\" \"", ...
Generate a pattern for matching var to the superclasses of clazz @param origin @param matchVariable @return
[ "Generate", "a", "pattern", "for", "matching", "var", "to", "the", "superclasses", "of", "clazz" ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L248-L254
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/metrics/export/TimeSeries.java
TimeSeries.createWithOnePoint
public static TimeSeries createWithOnePoint( List<LabelValue> labelValues, Point point, @Nullable Timestamp startTimestamp) { """ Creates a {@link TimeSeries}. @param labelValues the {@code LabelValue}s that uniquely identify this {@code TimeSeries}. @param point the single data {@code Point} of this {@c...
java
public static TimeSeries createWithOnePoint( List<LabelValue> labelValues, Point point, @Nullable Timestamp startTimestamp) { Utils.checkNotNull(point, "point"); return createInternal(labelValues, Collections.singletonList(point), startTimestamp); }
[ "public", "static", "TimeSeries", "createWithOnePoint", "(", "List", "<", "LabelValue", ">", "labelValues", ",", "Point", "point", ",", "@", "Nullable", "Timestamp", "startTimestamp", ")", "{", "Utils", ".", "checkNotNull", "(", "point", ",", "\"point\"", ")", ...
Creates a {@link TimeSeries}. @param labelValues the {@code LabelValue}s that uniquely identify this {@code TimeSeries}. @param point the single data {@code Point} of this {@code TimeSeries}. @param startTimestamp the start {@code Timestamp} of this {@code TimeSeries}. Must be non-null for cumulative {@code Point}s. @...
[ "Creates", "a", "{", "@link", "TimeSeries", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/metrics/export/TimeSeries.java#L81-L85
sarxos/v4l4j
src/main/java/au/edu/jcu/v4l4j/AbstractGrabber.java
AbstractGrabber.getAvailableVideoFrame
private BaseVideoFrame getAvailableVideoFrame() { """ This method is called as part of {@link #getVideoFrame()}. It retrieves a video frame marked as available (recycled). if no frame is available, this method will block. If interrupted while waiting, a {@link StateException} will be thrown @return an availabl...
java
private BaseVideoFrame getAvailableVideoFrame() { BaseVideoFrame frame = null; // block until a video frame is available synchronized (availableVideoFrames) { while (availableVideoFrames.size() == 0) try { availableVideoFrames.wait(); } catch (InterruptedException e) { throw new StateExcepti...
[ "private", "BaseVideoFrame", "getAvailableVideoFrame", "(", ")", "{", "BaseVideoFrame", "frame", "=", "null", ";", "// block until a video frame is available", "synchronized", "(", "availableVideoFrames", ")", "{", "while", "(", "availableVideoFrames", ".", "size", "(", ...
This method is called as part of {@link #getVideoFrame()}. It retrieves a video frame marked as available (recycled). if no frame is available, this method will block. If interrupted while waiting, a {@link StateException} will be thrown @return an available video frame. @thrown {@link StateException} if interrupted wh...
[ "This", "method", "is", "called", "as", "part", "of", "{" ]
train
https://github.com/sarxos/v4l4j/blob/4fc0eec2c3a1a4260593f6ac03b7a8013e3804c9/src/main/java/au/edu/jcu/v4l4j/AbstractGrabber.java#L364-L381
zandero/rest.vertx
src/main/java/com/zandero/rest/RestBuilder.java
RestBuilder.enableCors
public RestBuilder enableCors() { """ Enables CORS for all methods and headers / intended for testing purposes only - not recommended for production use @return self """ Set<String> allowedHeaders = new HashSet<>(); allowedHeaders.add("Access-Control-Allow-Origin"); //allowedHeaders.add("Access-Contro...
java
public RestBuilder enableCors() { Set<String> allowedHeaders = new HashSet<>(); allowedHeaders.add("Access-Control-Allow-Origin"); //allowedHeaders.add("Access-Control-Allow-Credentials"); allowedHeaders.add("Access-Control-Allow-Headers"); allowedHeaders.add("Access-Control-Allow-Methods"); allowedHeaders...
[ "public", "RestBuilder", "enableCors", "(", ")", "{", "Set", "<", "String", ">", "allowedHeaders", "=", "new", "HashSet", "<>", "(", ")", ";", "allowedHeaders", ".", "add", "(", "\"Access-Control-Allow-Origin\"", ")", ";", "//allowedHeaders.add(\"Access-Control-Allo...
Enables CORS for all methods and headers / intended for testing purposes only - not recommended for production use @return self
[ "Enables", "CORS", "for", "all", "methods", "and", "headers", "/", "intended", "for", "testing", "purposes", "only", "-", "not", "recommended", "for", "production", "use" ]
train
https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/RestBuilder.java#L121-L134
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolableConnection.java
PoolableConnection.prepareStatement
@Override public PoolablePreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { """ Method prepareStatement. @param sql @param columnIndexes @return PreparedStatement @throws SQLException @see java.sql.Connection#prepareStatement(String, int[]) """ return...
java
@Override public PoolablePreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { return new PoolablePreparedStatement(internalConn.prepareStatement(sql, columnIndexes), this, null); }
[ "@", "Override", "public", "PoolablePreparedStatement", "prepareStatement", "(", "String", "sql", ",", "int", "[", "]", "columnIndexes", ")", "throws", "SQLException", "{", "return", "new", "PoolablePreparedStatement", "(", "internalConn", ".", "prepareStatement", "("...
Method prepareStatement. @param sql @param columnIndexes @return PreparedStatement @throws SQLException @see java.sql.Connection#prepareStatement(String, int[])
[ "Method", "prepareStatement", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolableConnection.java#L522-L525
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4Request.java
AwsSigner4Request.canonicalHeaders
private static String canonicalHeaders(Map<String, String> headers) { """ Create canonical header set. The headers are ordered by name. @param headers The set of headers to sign @return The signing value from headers. Headers are separated with newline. Each header is formatted name:value with each header val...
java
private static String canonicalHeaders(Map<String, String> headers) { StringBuilder canonical = new StringBuilder(); for (Map.Entry<String, String> header : headers.entrySet()) { canonical.append(header.getKey()).append(':').append(header.getValue()).append('\n'); } return ca...
[ "private", "static", "String", "canonicalHeaders", "(", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "StringBuilder", "canonical", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ...
Create canonical header set. The headers are ordered by name. @param headers The set of headers to sign @return The signing value from headers. Headers are separated with newline. Each header is formatted name:value with each header value whitespace trimmed and minimized
[ "Create", "canonical", "header", "set", ".", "The", "headers", "are", "ordered", "by", "name", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4Request.java#L193-L199
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F2.applyOrElse
public R applyOrElse(P1 p1, P2 p2, F2<? super P1, ? super P2, ? extends R> fallback) { """ Applies this partial function to the given argument when it is contained in the function domain. Applies fallback function where this partial function is not defined. @param p1 the first param with type P1 @param p2 t...
java
public R applyOrElse(P1 p1, P2 p2, F2<? super P1, ? super P2, ? extends R> fallback) { try { return apply(p1, p2); } catch (RuntimeException e) { return fallback.apply(p1, p2); } }
[ "public", "R", "applyOrElse", "(", "P1", "p1", ",", "P2", "p2", ",", "F2", "<", "?", "super", "P1", ",", "?", "super", "P2", ",", "?", "extends", "R", ">", "fallback", ")", "{", "try", "{", "return", "apply", "(", "p1", ",", "p2", ")", ";", "...
Applies this partial function to the given argument when it is contained in the function domain. Applies fallback function where this partial function is not defined. @param p1 the first param with type P1 @param p2 the second param with type P2 @param fallback the function to be called when an {@link RuntimeException...
[ "Applies", "this", "partial", "function", "to", "the", "given", "argument", "when", "it", "is", "contained", "in", "the", "function", "domain", ".", "Applies", "fallback", "function", "where", "this", "partial", "function", "is", "not", "defined", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L945-L951
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_dedicated_serviceName_quota_GET
public ArrayList<String> cdn_dedicated_serviceName_quota_GET(String serviceName, OvhOrderQuotaEnum quota) throws IOException { """ Get allowed durations for 'quota' option REST: GET /order/cdn/dedicated/{serviceName}/quota @param quota [required] quota number in TB that will be added to the CDN service @param...
java
public ArrayList<String> cdn_dedicated_serviceName_quota_GET(String serviceName, OvhOrderQuotaEnum quota) throws IOException { String qPath = "/order/cdn/dedicated/{serviceName}/quota"; StringBuilder sb = path(qPath, serviceName); query(sb, "quota", quota); String resp = exec(qPath, "GET", sb.toString(), null);...
[ "public", "ArrayList", "<", "String", ">", "cdn_dedicated_serviceName_quota_GET", "(", "String", "serviceName", ",", "OvhOrderQuotaEnum", "quota", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/dedicated/{serviceName}/quota\"", ";", "StringBuilder"...
Get allowed durations for 'quota' option REST: GET /order/cdn/dedicated/{serviceName}/quota @param quota [required] quota number in TB that will be added to the CDN service @param serviceName [required] The internal name of your CDN offer
[ "Get", "allowed", "durations", "for", "quota", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5337-L5343
structr/structr
structr-core/src/main/java/org/structr/core/auth/HashHelper.java
HashHelper.getHash
public static String getHash(final String password, final String salt) { """ Calculate a SHA-512 hash of the given password string. If salt is given, use salt. @param password @param salt @return hash """ if (StringUtils.isEmpty(salt)) { return getSimpleHash(password); } return DigestUtils...
java
public static String getHash(final String password, final String salt) { if (StringUtils.isEmpty(salt)) { return getSimpleHash(password); } return DigestUtils.sha512Hex(DigestUtils.sha512Hex(password).concat(salt)); }
[ "public", "static", "String", "getHash", "(", "final", "String", "password", ",", "final", "String", "salt", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "salt", ")", ")", "{", "return", "getSimpleHash", "(", "password", ")", ";", "}", "retur...
Calculate a SHA-512 hash of the given password string. If salt is given, use salt. @param password @param salt @return hash
[ "Calculate", "a", "SHA", "-", "512", "hash", "of", "the", "given", "password", "string", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/core/auth/HashHelper.java#L38-L48
alibaba/otter
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java
ZkClientx.watchForChilds
public List<String> watchForChilds(final String path) { """ Installs a child watch for the given path. @param path @return the current children of the path or null if the zk node with the given path doesn't exist. """ if (_zookeeperEventThread != null && Thread.currentThread() == _zookeeperEventThr...
java
public List<String> watchForChilds(final String path) { if (_zookeeperEventThread != null && Thread.currentThread() == _zookeeperEventThread) { throw new IllegalArgumentException("Must not be done in the zookeeper event thread."); } return retryUntilConnected(new Callable<List<String...
[ "public", "List", "<", "String", ">", "watchForChilds", "(", "final", "String", "path", ")", "{", "if", "(", "_zookeeperEventThread", "!=", "null", "&&", "Thread", ".", "currentThread", "(", ")", "==", "_zookeeperEventThread", ")", "{", "throw", "new", "Ille...
Installs a child watch for the given path. @param path @return the current children of the path or null if the zk node with the given path doesn't exist.
[ "Installs", "a", "child", "watch", "for", "the", "given", "path", "." ]
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java#L934-L951
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java
PixelMath.boundImage
public static void boundImage( GrayF64 img , double min , double max ) { """ Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value. """ ImplPixelMath.boundImage(img,min,max); }
java
public static void boundImage( GrayF64 img , double min , double max ) { ImplPixelMath.boundImage(img,min,max); }
[ "public", "static", "void", "boundImage", "(", "GrayF64", "img", ",", "double", "min", ",", "double", "max", ")", "{", "ImplPixelMath", ".", "boundImage", "(", "img", ",", "min", ",", "max", ")", ";", "}" ]
Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value.
[ "Bounds", "image", "pixels", "to", "be", "between", "these", "two", "values" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java#L4515-L4517
virgo47/javasimon
core/src/main/java/org/javasimon/utils/bean/ClassUtils.java
ClassUtils.getField
static Field getField(Class<?> targetClass, String fieldName) { """ Get field with the specified name. @param targetClass class for which a field will be returned @param fieldName name of the field that should be returned @return field with the specified name if one exists, null otherwise """ while (targe...
java
static Field getField(Class<?> targetClass, String fieldName) { while (targetClass != null) { try { Field field = targetClass.getDeclaredField(fieldName); logger.debug("Found field {} in class {}", fieldName, targetClass.getName()); return field; } catch (NoSuchFieldException e) { logger.debug("...
[ "static", "Field", "getField", "(", "Class", "<", "?", ">", "targetClass", ",", "String", "fieldName", ")", "{", "while", "(", "targetClass", "!=", "null", ")", "{", "try", "{", "Field", "field", "=", "targetClass", ".", "getDeclaredField", "(", "fieldName...
Get field with the specified name. @param targetClass class for which a field will be returned @param fieldName name of the field that should be returned @return field with the specified name if one exists, null otherwise
[ "Get", "field", "with", "the", "specified", "name", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/bean/ClassUtils.java#L31-L44
jmxtrans/jmxtrans
jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/StackdriverWriter.java
StackdriverWriter.validateSetup
@Override public void validateSetup(Server server, Query query) throws ValidationException { """ Sets up the object and makes sure all the required parameters are available<br/> Minimally a Stackdriver API key must be provided using the token setting """ logger.info("Starting Stackdriver writer connected t...
java
@Override public void validateSetup(Server server, Query query) throws ValidationException { logger.info("Starting Stackdriver writer connected to '{}', proxy {} ...", gatewayUrl, proxy); }
[ "@", "Override", "public", "void", "validateSetup", "(", "Server", "server", ",", "Query", "query", ")", "throws", "ValidationException", "{", "logger", ".", "info", "(", "\"Starting Stackdriver writer connected to '{}', proxy {} ...\"", ",", "gatewayUrl", ",", "proxy",...
Sets up the object and makes sure all the required parameters are available<br/> Minimally a Stackdriver API key must be provided using the token setting
[ "Sets", "up", "the", "object", "and", "makes", "sure", "all", "the", "required", "parameters", "are", "available<br", "/", ">", "Minimally", "a", "Stackdriver", "API", "key", "must", "be", "provided", "using", "the", "token", "setting" ]
train
https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/StackdriverWriter.java#L216-L219
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java
CoreV1Api.readNamespacedPodLogAsync
public com.squareup.okhttp.Call readNamespacedPodLogAsync(String name, String namespace, String container, Boolean follow, Integer limitBytes, String pretty, Boolean previous, Integer sinceSeconds, Integer tailLines, Boolean timestamps, final ApiCallback<String> callback) throws ApiException { """ (asynchronously)...
java
public com.squareup.okhttp.Call readNamespacedPodLogAsync(String name, String namespace, String container, Boolean follow, Integer limitBytes, String pretty, Boolean previous, Integer sinceSeconds, Integer tailLines, Boolean timestamps, final ApiCallback<String> callback) throws ApiException { ProgressResponse...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "readNamespacedPodLogAsync", "(", "String", "name", ",", "String", "namespace", ",", "String", "container", ",", "Boolean", "follow", ",", "Integer", "limitBytes", ",", "String", "pretty", ",", "Boo...
(asynchronously) read log of the specified Pod @param name name of the Pod (required) @param namespace object name and auth scope, such as for teams and projects (required) @param container The container for which to stream logs. Defaults to only container if there is one container in the pod. (optional) @param follow ...
[ "(", "asynchronously", ")", "read", "log", "of", "the", "specified", "Pod" ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java#L25166-L25191
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addUnionExpression
public void addUnionExpression(final INodeReadTrx mTransaction) { """ Adds a union expression to the pipeline. @param mTransaction Transaction to operate with. """ assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 ...
java
public void addUnionExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
[ "public", "void", "addUnionExpression", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mOperand2", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")",...
Adds a union expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "union", "expression", "to", "the", "pipeline", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L401-L412
real-logic/agrona
agrona/src/main/java/org/agrona/concurrent/status/AtomicCounter.java
AtomicCounter.compareAndSet
public boolean compareAndSet(final long expectedValue, final long updateValue) { """ Compare the current value to expected and if true then set to the update value atomically. @param expectedValue for the counter. @param updateValue for the counter. @return true if successful otherwise false. """ ...
java
public boolean compareAndSet(final long expectedValue, final long updateValue) { return UnsafeAccess.UNSAFE.compareAndSwapLong(byteArray, addressOffset, expectedValue, updateValue); }
[ "public", "boolean", "compareAndSet", "(", "final", "long", "expectedValue", ",", "final", "long", "updateValue", ")", "{", "return", "UnsafeAccess", ".", "UNSAFE", ".", "compareAndSwapLong", "(", "byteArray", ",", "addressOffset", ",", "expectedValue", ",", "upda...
Compare the current value to expected and if true then set to the update value atomically. @param expectedValue for the counter. @param updateValue for the counter. @return true if successful otherwise false.
[ "Compare", "the", "current", "value", "to", "expected", "and", "if", "true", "then", "set", "to", "the", "update", "value", "atomically", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/concurrent/status/AtomicCounter.java#L185-L188
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java
MavenDependenciesRecorder.postBuild
@Override public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException { """ Sends the collected dependencies over to the master and record them. """ build.executeAsync(new BuildCallable<Void, IOException>() { ...
java
@Override public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException { build.executeAsync(new BuildCallable<Void, IOException>() { // record is transient, so needs to make a copy first private final S...
[ "@", "Override", "public", "boolean", "postBuild", "(", "MavenBuildProxy", "build", ",", "MavenProject", "pom", ",", "BuildListener", "listener", ")", "throws", "InterruptedException", ",", "IOException", "{", "build", ".", "executeAsync", "(", "new", "BuildCallable...
Sends the collected dependencies over to the master and record them.
[ "Sends", "the", "collected", "dependencies", "over", "to", "the", "master", "and", "record", "them", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java#L66-L82
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
Settings.getDouble
@CheckForNull public Double getDouble(String key) { """ Effective value as {@code Double}. @return the value as {@code Double}. If the property does not have value nor default value, then {@code null} is returned. @throws NumberFormatException if value is not empty and is not a parsable number """ Stri...
java
@CheckForNull public Double getDouble(String key) { String value = getString(key); if (StringUtils.isNotEmpty(value)) { try { return Double.valueOf(value); } catch (NumberFormatException e) { throw new IllegalStateException(String.format("The property '%s' is not a double value", k...
[ "@", "CheckForNull", "public", "Double", "getDouble", "(", "String", "key", ")", "{", "String", "value", "=", "getString", "(", "key", ")", ";", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "value", ")", ")", "{", "try", "{", "return", "Double", "...
Effective value as {@code Double}. @return the value as {@code Double}. If the property does not have value nor default value, then {@code null} is returned. @throws NumberFormatException if value is not empty and is not a parsable number
[ "Effective", "value", "as", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java#L249-L260
alkacon/opencms-core
src/org/opencms/db/generic/CmsProjectDriver.java
CmsProjectDriver.internalReadLogEntry
protected CmsLogEntry internalReadLogEntry(ResultSet res) throws SQLException { """ Creates a new {@link CmsLogEntry} object from the given result set entry.<p> @param res the result set @return the new {@link CmsLogEntry} object @throws SQLException if something goes wrong """ CmsUUID userId...
java
protected CmsLogEntry internalReadLogEntry(ResultSet res) throws SQLException { CmsUUID userId = new CmsUUID(res.getString(m_sqlManager.readQuery("C_LOG_USER_ID"))); long date = res.getLong(m_sqlManager.readQuery("C_LOG_DATE")); CmsUUID structureId = new CmsUUID(res.getString(m_sqlManager.readQ...
[ "protected", "CmsLogEntry", "internalReadLogEntry", "(", "ResultSet", "res", ")", "throws", "SQLException", "{", "CmsUUID", "userId", "=", "new", "CmsUUID", "(", "res", ".", "getString", "(", "m_sqlManager", ".", "readQuery", "(", "\"C_LOG_USER_ID\"", ")", ")", ...
Creates a new {@link CmsLogEntry} object from the given result set entry.<p> @param res the result set @return the new {@link CmsLogEntry} object @throws SQLException if something goes wrong
[ "Creates", "a", "new", "{", "@link", "CmsLogEntry", "}", "object", "from", "the", "given", "result", "set", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsProjectDriver.java#L3164-L3172
VoltDB/voltdb
src/frontend/org/voltdb/utils/CatalogUtil.java
CatalogUtil.getBuildInfoFromJar
public static String[] getBuildInfoFromJar(InMemoryJarfile jarfile) throws IOException { """ Get the catalog build info from the jar bytes. Performs sanity checks on the build info and version strings. @param jarfile in-memory catalog jar file @return build info lines @throws IOException If the c...
java
public static String[] getBuildInfoFromJar(InMemoryJarfile jarfile) throws IOException { // Read the raw build info bytes. byte[] buildInfoBytes = jarfile.get(CATALOG_BUILDINFO_FILENAME); if (buildInfoBytes == null) { throw new IOException("Catalog build information n...
[ "public", "static", "String", "[", "]", "getBuildInfoFromJar", "(", "InMemoryJarfile", "jarfile", ")", "throws", "IOException", "{", "// Read the raw build info bytes.", "byte", "[", "]", "buildInfoBytes", "=", "jarfile", ".", "get", "(", "CATALOG_BUILDINFO_FILENAME", ...
Get the catalog build info from the jar bytes. Performs sanity checks on the build info and version strings. @param jarfile in-memory catalog jar file @return build info lines @throws IOException If the catalog or the version string cannot be loaded.
[ "Get", "the", "catalog", "build", "info", "from", "the", "jar", "bytes", ".", "Performs", "sanity", "checks", "on", "the", "build", "info", "and", "version", "strings", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L298-L328
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.rotate
public static BufferedImage rotate(Image image, int degree) { """ 旋转图片为指定角度<br> 来自:http://blog.51cto.com/cping1982/130066 @param image 目标图像 @param degree 旋转角度 @return 旋转后的图片 @since 3.2.2 """ return Img.from(image).rotate(degree).getImg(); }
java
public static BufferedImage rotate(Image image, int degree) { return Img.from(image).rotate(degree).getImg(); }
[ "public", "static", "BufferedImage", "rotate", "(", "Image", "image", ",", "int", "degree", ")", "{", "return", "Img", ".", "from", "(", "image", ")", ".", "rotate", "(", "degree", ")", ".", "getImg", "(", ")", ";", "}" ]
旋转图片为指定角度<br> 来自:http://blog.51cto.com/cping1982/130066 @param image 目标图像 @param degree 旋转角度 @return 旋转后的图片 @since 3.2.2
[ "旋转图片为指定角度<br", ">", "来自:http", ":", "//", "blog", ".", "51cto", ".", "com", "/", "cping1982", "/", "130066" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1057-L1059
Wadpam/guja
guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java
GeneratedDContactDaoImpl.queryByLongitude
public Iterable<DContact> queryByLongitude(Object parent, java.lang.Float longitude) { """ query-by method for field longitude @param longitude the specified attribute @return an Iterable of DContacts for the specified longitude """ return queryByField(parent, DContactMapper.Field.LONGITUDE.getFieldName(...
java
public Iterable<DContact> queryByLongitude(Object parent, java.lang.Float longitude) { return queryByField(parent, DContactMapper.Field.LONGITUDE.getFieldName(), longitude); }
[ "public", "Iterable", "<", "DContact", ">", "queryByLongitude", "(", "Object", "parent", ",", "java", ".", "lang", ".", "Float", "longitude", ")", "{", "return", "queryByField", "(", "parent", ",", "DContactMapper", ".", "Field", ".", "LONGITUDE", ".", "getF...
query-by method for field longitude @param longitude the specified attribute @return an Iterable of DContacts for the specified longitude
[ "query", "-", "by", "method", "for", "field", "longitude" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java#L214-L216
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/validator/CacheValidator.java
CacheValidator.check
public static void check(LinkedHashMap<String, Object> nameExpectedValues, long timeout, String failMessagePrefix) throws QTasteTestFailException { """ Note that since nameExpectedValues is a map, it can only contain one expected value per name. """ CacheValidator validator = new CacheValidat...
java
public static void check(LinkedHashMap<String, Object> nameExpectedValues, long timeout, String failMessagePrefix) throws QTasteTestFailException { CacheValidator validator = new CacheValidator(nameExpectedValues, timeout); validator.validate(failMessagePrefix); }
[ "public", "static", "void", "check", "(", "LinkedHashMap", "<", "String", ",", "Object", ">", "nameExpectedValues", ",", "long", "timeout", ",", "String", "failMessagePrefix", ")", "throws", "QTasteTestFailException", "{", "CacheValidator", "validator", "=", "new", ...
Note that since nameExpectedValues is a map, it can only contain one expected value per name.
[ "Note", "that", "since", "nameExpectedValues", "is", "a", "map", "it", "can", "only", "contain", "one", "expected", "value", "per", "name", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/validator/CacheValidator.java#L66-L70
DavidPizarro/PinView
library/src/main/java/com/dpizarro/pinview/library/PinViewUtils.java
PinViewUtils.convertPixelToDp
public static float convertPixelToDp(Context context, float px) { """ This method converts device specific pixels to density independent pixels. @param px A value in px (pixels) unit. Which we need to convert into db @param context Context to get resources and device specific display metrics @return A fl...
java
public static float convertPixelToDp(Context context, float px) { Resources resources = context.getResources(); DisplayMetrics metrics = resources.getDisplayMetrics(); return px / (metrics.densityDpi / 160f); }
[ "public", "static", "float", "convertPixelToDp", "(", "Context", "context", ",", "float", "px", ")", "{", "Resources", "resources", "=", "context", ".", "getResources", "(", ")", ";", "DisplayMetrics", "metrics", "=", "resources", ".", "getDisplayMetrics", "(", ...
This method converts device specific pixels to density independent pixels. @param px A value in px (pixels) unit. Which we need to convert into db @param context Context to get resources and device specific display metrics @return A float value to represent dp equivalent to px value
[ "This", "method", "converts", "device", "specific", "pixels", "to", "density", "independent", "pixels", "." ]
train
https://github.com/DavidPizarro/PinView/blob/b171a89694921475b5442585810b8475ef1cfe35/library/src/main/java/com/dpizarro/pinview/library/PinViewUtils.java#L83-L87
box/box-java-sdk
src/main/java/com/box/sdk/BoxJSONObject.java
BoxJSONObject.addPendingChange
private void addPendingChange(String key, JsonValue value) { """ Adds a pending field change that needs to be sent to the API. It will be included in the JSON string the next time {@link #getPendingChanges} is called. @param key the name of the field. @param value the JsonValue of the field. """ i...
java
private void addPendingChange(String key, JsonValue value) { if (this.pendingChanges == null) { this.pendingChanges = new JsonObject(); } this.pendingChanges.set(key, value); }
[ "private", "void", "addPendingChange", "(", "String", "key", ",", "JsonValue", "value", ")", "{", "if", "(", "this", ".", "pendingChanges", "==", "null", ")", "{", "this", ".", "pendingChanges", "=", "new", "JsonObject", "(", ")", ";", "}", "this", ".", ...
Adds a pending field change that needs to be sent to the API. It will be included in the JSON string the next time {@link #getPendingChanges} is called. @param key the name of the field. @param value the JsonValue of the field.
[ "Adds", "a", "pending", "field", "change", "that", "needs", "to", "be", "sent", "to", "the", "API", ".", "It", "will", "be", "included", "in", "the", "JSON", "string", "the", "next", "time", "{" ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxJSONObject.java#L169-L175
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/MetaModelBuilder.java
MetaModelBuilder.processInternal
private AbstractManagedType<X> processInternal(Class<X> clazz, boolean isIdClass) { """ Process. @param clazz the clazz @return the abstract managed type """ if (managedTypes.get(clazz) == null) { return buildManagedType(clazz, isIdClass); } else { ...
java
private AbstractManagedType<X> processInternal(Class<X> clazz, boolean isIdClass) { if (managedTypes.get(clazz) == null) { return buildManagedType(clazz, isIdClass); } else { return (AbstractManagedType<X>) managedTypes.get(clazz); } }
[ "private", "AbstractManagedType", "<", "X", ">", "processInternal", "(", "Class", "<", "X", ">", "clazz", ",", "boolean", "isIdClass", ")", "{", "if", "(", "managedTypes", ".", "get", "(", "clazz", ")", "==", "null", ")", "{", "return", "buildManagedType",...
Process. @param clazz the clazz @return the abstract managed type
[ "Process", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/MetaModelBuilder.java#L817-L827
google/closure-compiler
src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java
FixedPointGraphTraversal.computeFixedPoint
public void computeFixedPoint(DiGraph<N, E> graph) { """ Compute a fixed point for the given graph. @param graph The graph to traverse. """ Set<N> nodes = new LinkedHashSet<>(); for (DiGraphNode<N, E> node : graph.getDirectedGraphNodes()) { nodes.add(node.getValue()); } computeFixedPoint...
java
public void computeFixedPoint(DiGraph<N, E> graph) { Set<N> nodes = new LinkedHashSet<>(); for (DiGraphNode<N, E> node : graph.getDirectedGraphNodes()) { nodes.add(node.getValue()); } computeFixedPoint(graph, nodes); }
[ "public", "void", "computeFixedPoint", "(", "DiGraph", "<", "N", ",", "E", ">", "graph", ")", "{", "Set", "<", "N", ">", "nodes", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "for", "(", "DiGraphNode", "<", "N", ",", "E", ">", "node", ":", "...
Compute a fixed point for the given graph. @param graph The graph to traverse.
[ "Compute", "a", "fixed", "point", "for", "the", "given", "graph", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java#L67-L73
mapcode-foundation/mapcode-java
src/main/java/com/mapcode/MapcodeCodec.java
MapcodeCodec.decodeToRectangle
@Nonnull public static Rectangle decodeToRectangle(@Nonnull final String mapcode, @Nullable final Territory defaultTerritoryContext) throws UnknownMapcodeException, IllegalArgumentException, UnknownPrecisionFormatException { """ Decode a mapcode to a Rectangle, which defines the valid zone for a ma...
java
@Nonnull public static Rectangle decodeToRectangle(@Nonnull final String mapcode, @Nullable final Territory defaultTerritoryContext) throws UnknownMapcodeException, IllegalArgumentException, UnknownPrecisionFormatException { checkNonnull("mapcode", mapcode); final MapcodeZone mapcodeZone...
[ "@", "Nonnull", "public", "static", "Rectangle", "decodeToRectangle", "(", "@", "Nonnull", "final", "String", "mapcode", ",", "@", "Nullable", "final", "Territory", "defaultTerritoryContext", ")", "throws", "UnknownMapcodeException", ",", "IllegalArgumentException", ","...
Decode a mapcode to a Rectangle, which defines the valid zone for a mapcode. The boundaries of the mapcode zone are inclusive for the South and West borders and exclusive for the North and East borders. This is essentially the same call as a 'decode', except it returns a rectangle, rather than its center point. @param...
[ "Decode", "a", "mapcode", "to", "a", "Rectangle", "which", "defines", "the", "valid", "zone", "for", "a", "mapcode", ".", "The", "boundaries", "of", "the", "mapcode", "zone", "are", "inclusive", "for", "the", "South", "and", "West", "borders", "and", "excl...
train
https://github.com/mapcode-foundation/mapcode-java/blob/f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8/src/main/java/com/mapcode/MapcodeCodec.java#L369-L379
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/NodeSchema.java
NodeSchema.resetTableName
public NodeSchema resetTableName(String tbName, String tbAlias) { """ Substitute table name only for all schema columns and map entries """ m_columns.forEach(sc -> sc.reset(tbName, tbAlias, sc.getColumnName(), sc.getColumnAlias())); m_columnsMapHelper.forEach((k, v) -> k...
java
public NodeSchema resetTableName(String tbName, String tbAlias) { m_columns.forEach(sc -> sc.reset(tbName, tbAlias, sc.getColumnName(), sc.getColumnAlias())); m_columnsMapHelper.forEach((k, v) -> k.reset(tbName, tbAlias, k.getColumnName(), k.getColumnAlias())); return this...
[ "public", "NodeSchema", "resetTableName", "(", "String", "tbName", ",", "String", "tbAlias", ")", "{", "m_columns", ".", "forEach", "(", "sc", "->", "sc", ".", "reset", "(", "tbName", ",", "tbAlias", ",", "sc", ".", "getColumnName", "(", ")", ",", "sc", ...
Substitute table name only for all schema columns and map entries
[ "Substitute", "table", "name", "only", "for", "all", "schema", "columns", "and", "map", "entries" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/NodeSchema.java#L74-L80
git-commit-id/maven-git-commit-id-plugin
src/main/java/pl/project13/maven/git/GitDirLocator.java
GitDirLocator.findProjectGitDirectory
@Nullable private File findProjectGitDirectory() { """ Search up all the maven parent project hierarchy until a .git directory is found. @return File which represents the location of the .git directory or NULL if none found. """ if (this.mavenProject == null) { return null; } File based...
java
@Nullable private File findProjectGitDirectory() { if (this.mavenProject == null) { return null; } File basedir = mavenProject.getBasedir(); while (basedir != null) { File gitdir = new File(basedir, Constants.DOT_GIT); if (gitdir.exists()) { if (gitdir.isDirectory()) { ...
[ "@", "Nullable", "private", "File", "findProjectGitDirectory", "(", ")", "{", "if", "(", "this", ".", "mavenProject", "==", "null", ")", "{", "return", "null", ";", "}", "File", "basedir", "=", "mavenProject", ".", "getBasedir", "(", ")", ";", "while", "...
Search up all the maven parent project hierarchy until a .git directory is found. @return File which represents the location of the .git directory or NULL if none found.
[ "Search", "up", "all", "the", "maven", "parent", "project", "hierarchy", "until", "a", ".", "git", "directory", "is", "found", "." ]
train
https://github.com/git-commit-id/maven-git-commit-id-plugin/blob/a276551fb043d1b7fc4c890603f6ea0c79dc729a/src/main/java/pl/project13/maven/git/GitDirLocator.java#L73-L94
googleapis/google-cloud-java
google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
SubscriptionAdminClient.modifyPushConfig
public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { """ Modifies the `PushConfig` for a specified subscription. <p>This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other ...
java
public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = ModifyPushConfigRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) .setPushConfig(pushConfig) .bu...
[ "public", "final", "void", "modifyPushConfig", "(", "ProjectSubscriptionName", "subscription", ",", "PushConfig", "pushConfig", ")", "{", "ModifyPushConfigRequest", "request", "=", "ModifyPushConfigRequest", ".", "newBuilder", "(", ")", ".", "setSubscription", "(", "sub...
Modifies the `PushConfig` for a specified subscription. <p>This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardl...
[ "Modifies", "the", "PushConfig", "for", "a", "specified", "subscription", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java#L1254-L1262
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java
ContinuousDistributions.gSer
private static double gSer(double x, double A) { """ Internal function used by gammaCdf @param x @param A @return """ // Good for X<A+1. double T9=1/A; double G=T9; double I=1; while (T9>G*0.00001) { T9=T9*x/(A+I); G=G+T9; ++I; ...
java
private static double gSer(double x, double A) { // Good for X<A+1. double T9=1/A; double G=T9; double I=1; while (T9>G*0.00001) { T9=T9*x/(A+I); G=G+T9; ++I; } G=G*Math.exp(A*Math.log(x)-x-logGamma(A)); return G; }
[ "private", "static", "double", "gSer", "(", "double", "x", ",", "double", "A", ")", "{", "// Good for X<A+1.", "double", "T9", "=", "1", "/", "A", ";", "double", "G", "=", "T9", ";", "double", "I", "=", "1", ";", "while", "(", "T9", ">", "G", "*"...
Internal function used by gammaCdf @param x @param A @return
[ "Internal", "function", "used", "by", "gammaCdf" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java#L299-L312
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java
BlockMetadataHeader.writeHeader
static void writeHeader(DataOutputStream out, DataChecksum checksum) throws IOException { """ Writes all the fields till the beginning of checksum. @param out @param checksum @throws IOException """ writeHeader(out, new BlockMetadataHeader(METADATA_VERSION, checksum)); }
java
static void writeHeader(DataOutputStream out, DataChecksum checksum) throws IOException { writeHeader(out, new BlockMetadataHeader(METADATA_VERSION, checksum)); }
[ "static", "void", "writeHeader", "(", "DataOutputStream", "out", ",", "DataChecksum", "checksum", ")", "throws", "IOException", "{", "writeHeader", "(", "out", ",", "new", "BlockMetadataHeader", "(", "METADATA_VERSION", ",", "checksum", ")", ")", ";", "}" ]
Writes all the fields till the beginning of checksum. @param out @param checksum @throws IOException
[ "Writes", "all", "the", "fields", "till", "the", "beginning", "of", "checksum", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java#L143-L146
aws/aws-sdk-java
aws-java-sdk-iot1clickprojects/src/main/java/com/amazonaws/services/iot1clickprojects/model/PlacementTemplate.java
PlacementTemplate.withDeviceTemplates
public PlacementTemplate withDeviceTemplates(java.util.Map<String, DeviceTemplate> deviceTemplates) { """ <p> An object specifying the <a>DeviceTemplate</a> for all placements using this (<a>PlacementTemplate</a>) template. </p> @param deviceTemplates An object specifying the <a>DeviceTemplate</a> for all pl...
java
public PlacementTemplate withDeviceTemplates(java.util.Map<String, DeviceTemplate> deviceTemplates) { setDeviceTemplates(deviceTemplates); return this; }
[ "public", "PlacementTemplate", "withDeviceTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "DeviceTemplate", ">", "deviceTemplates", ")", "{", "setDeviceTemplates", "(", "deviceTemplates", ")", ";", "return", "this", ";", "}" ]
<p> An object specifying the <a>DeviceTemplate</a> for all placements using this (<a>PlacementTemplate</a>) template. </p> @param deviceTemplates An object specifying the <a>DeviceTemplate</a> for all placements using this (<a>PlacementTemplate</a>) template. @return Returns a reference to this object so that method c...
[ "<p", ">", "An", "object", "specifying", "the", "<a", ">", "DeviceTemplate<", "/", "a", ">", "for", "all", "placements", "using", "this", "(", "<a", ">", "PlacementTemplate<", "/", "a", ">", ")", "template", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot1clickprojects/src/main/java/com/amazonaws/services/iot1clickprojects/model/PlacementTemplate.java#L143-L146
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java
ServiceTaskBase.sendReturnWave
@SuppressWarnings("unchecked") private void sendReturnWave(final T res) throws CoreException { """ Send a wave that will carry the service result. 2 Kinds of wave can be sent according to service configuration @param res the service result @throws CoreException if the wave generation has failed ""...
java
@SuppressWarnings("unchecked") private void sendReturnWave(final T res) throws CoreException { Wave returnWave = null; // Try to retrieve the return Wave type, could be null final WaveType responseWaveType = this.wave.waveType().returnWaveType(); final Class<? extends Command> res...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "sendReturnWave", "(", "final", "T", "res", ")", "throws", "CoreException", "{", "Wave", "returnWave", "=", "null", ";", "// Try to retrieve the return Wave type, could be null", "final", "WaveType",...
Send a wave that will carry the service result. 2 Kinds of wave can be sent according to service configuration @param res the service result @throws CoreException if the wave generation has failed
[ "Send", "a", "wave", "that", "will", "carry", "the", "service", "result", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/ServiceTaskBase.java#L239-L297
demidenko05/beigesoft-accounting
src/main/java/org/beigesoft/accounting/service/SrvLedger.java
SrvLedger.loadString
public final String loadString(final String pFileName) throws IOException { """ <p>Load string file (usually SQL query).</p> @param pFileName file name @return String usually SQL query @throws IOException - IO exception """ URL urlFile = SrvLedger.class .getResource(pFileName); if (url...
java
public final String loadString(final String pFileName) throws IOException { URL urlFile = SrvLedger.class .getResource(pFileName); if (urlFile != null) { InputStream inputStream = null; try { inputStream = SrvLedger.class.getResourceAsStream(pFileName); byte[] bArray = ...
[ "public", "final", "String", "loadString", "(", "final", "String", "pFileName", ")", "throws", "IOException", "{", "URL", "urlFile", "=", "SrvLedger", ".", "class", ".", "getResource", "(", "pFileName", ")", ";", "if", "(", "urlFile", "!=", "null", ")", "{...
<p>Load string file (usually SQL query).</p> @param pFileName file name @return String usually SQL query @throws IOException - IO exception
[ "<p", ">", "Load", "string", "file", "(", "usually", "SQL", "query", ")", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-accounting/blob/e6f423949008218ddd05953b078f1ea8805095c1/src/main/java/org/beigesoft/accounting/service/SrvLedger.java#L282-L300
lessthanoptimal/ddogleg
src/org/ddogleg/solver/impl/FindRealRootsSturm.java
FindRealRootsSturm.bisectionRoot
private void bisectionRoot( double l , double u , int index ) { """ Searches for a single real root inside the range. Only one root is assumed to be inside @param l lower value of search range @param u upper value of search range @param index """ // use bisection until there is an estimate within toler...
java
private void bisectionRoot( double l , double u , int index ) { // use bisection until there is an estimate within tolerance int iter = 0; while( u-l > boundTolerance*Math.abs(l) && iter++ < maxBoundIterations) { double m = (l+u)/2.0; int numRoots = sturm.countRealRoots(m,u); if( numRoots == 1 ) { l ...
[ "private", "void", "bisectionRoot", "(", "double", "l", ",", "double", "u", ",", "int", "index", ")", "{", "// use bisection until there is an estimate within tolerance", "int", "iter", "=", "0", ";", "while", "(", "u", "-", "l", ">", "boundTolerance", "*", "M...
Searches for a single real root inside the range. Only one root is assumed to be inside @param l lower value of search range @param u upper value of search range @param index
[ "Searches", "for", "a", "single", "real", "root", "inside", "the", "range", ".", "Only", "one", "root", "is", "assumed", "to", "be", "inside" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/solver/impl/FindRealRootsSturm.java#L204-L226
stevespringett/Alpine
alpine/src/main/java/alpine/crypto/KeyManager.java
KeyManager.loadKeyPair
private KeyPair loadKeyPair() throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { """ Loads a key pair. @return a KeyPair @throws IOException if the file cannot be read @throws NoSuchAlgorithmException if the algorithm cannot be found @throws InvalidKeySpecException if the algorithm's key s...
java
private KeyPair loadKeyPair() throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { // Read Private Key final File filePrivateKey = getKeyPath(KeyType.PRIVATE); // Read Public Key final File filePublicKey = getKeyPath(KeyType.PUBLIC); byte[] encodedPrivateKey;...
[ "private", "KeyPair", "loadKeyPair", "(", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", "{", "// Read Private Key", "final", "File", "filePrivateKey", "=", "getKeyPath", "(", "KeyType", ".", "PRIVATE", ")", ";", "// Rea...
Loads a key pair. @return a KeyPair @throws IOException if the file cannot be read @throws NoSuchAlgorithmException if the algorithm cannot be found @throws InvalidKeySpecException if the algorithm's key spec is incorrect
[ "Loads", "a", "key", "pair", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/crypto/KeyManager.java#L245-L273
line/armeria
core/src/main/java/com/linecorp/armeria/server/cors/CorsServiceBuilder.java
CorsServiceBuilder.preflightResponseHeader
public CorsServiceBuilder preflightResponseHeader(CharSequence name, Iterable<?> values) { """ Returns HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers...
java
public CorsServiceBuilder preflightResponseHeader(CharSequence name, Iterable<?> values) { firstPolicyBuilder.preflightResponseHeader(name, values); return this; }
[ "public", "CorsServiceBuilder", "preflightResponseHeader", "(", "CharSequence", "name", ",", "Iterable", "<", "?", ">", "values", ")", "{", "firstPolicyBuilder", ".", "preflightResponseHeader", "(", "name", ",", "values", ")", ";", "return", "this", ";", "}" ]
Returns HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. @param name the name of the HTTP header. @param values the values for the HTTP header. @...
[ "Returns", "HTTP", "response", "headers", "that", "should", "be", "added", "to", "a", "CORS", "preflight", "response", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/cors/CorsServiceBuilder.java#L316-L319
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
BeanUtil.toBean
public static <T> T toBean(Object source, Class<T> clazz) { """ 对象或Map转Bean @param source Bean对象或Map @param clazz 目标的Bean类型 @return Bean对象 @since 4.1.20 """ final T target = ReflectUtil.newInstance(clazz); copyProperties(source, target); return target; }
java
public static <T> T toBean(Object source, Class<T> clazz) { final T target = ReflectUtil.newInstance(clazz); copyProperties(source, target); return target; }
[ "public", "static", "<", "T", ">", "T", "toBean", "(", "Object", "source", ",", "Class", "<", "T", ">", "clazz", ")", "{", "final", "T", "target", "=", "ReflectUtil", ".", "newInstance", "(", "clazz", ")", ";", "copyProperties", "(", "source", ",", "...
对象或Map转Bean @param source Bean对象或Map @param clazz 目标的Bean类型 @return Bean对象 @since 4.1.20
[ "对象或Map转Bean" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L442-L446
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRRenderData.java
GVRRenderData.setMaterial
public void setMaterial(GVRMaterial material, int passIndex) { """ Set the {@link GVRMaterial material} this pass will be rendered with. @param material The {@link GVRMaterial material} for rendering. @param passIndex The rendering pass this material will be assigned to. """ if (passIndex < mRend...
java
public void setMaterial(GVRMaterial material, int passIndex) { if (passIndex < mRenderPassList.size()) { mRenderPassList.get(passIndex).setMaterial(material); } else { Log.e(TAG, "Trying to set material from invalid pass. Pass " + passIndex + " was not...
[ "public", "void", "setMaterial", "(", "GVRMaterial", "material", ",", "int", "passIndex", ")", "{", "if", "(", "passIndex", "<", "mRenderPassList", ".", "size", "(", ")", ")", "{", "mRenderPassList", ".", "get", "(", "passIndex", ")", ".", "setMaterial", "...
Set the {@link GVRMaterial material} this pass will be rendered with. @param material The {@link GVRMaterial material} for rendering. @param passIndex The rendering pass this material will be assigned to.
[ "Set", "the", "{", "@link", "GVRMaterial", "material", "}", "this", "pass", "will", "be", "rendered", "with", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRRenderData.java#L233-L243
geomajas/geomajas-project-server
plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/command/reporting/PrepareReportingCommand.java
PrepareReportingCommand.getFilter
private Filter getFilter(String layerFilter, String[] featureIds) throws GeomajasException { """ Build filter for the request. @param layerFilter layer filter @param featureIds features to include in report (null for all) @return filter @throws GeomajasException filter could not be parsed/created """ F...
java
private Filter getFilter(String layerFilter, String[] featureIds) throws GeomajasException { Filter filter = null; if (null != layerFilter) { filter = filterService.parseFilter(layerFilter); } if (null != featureIds) { Filter fidFilter = filterService.createFidFilter(featureIds); if (null == filter) { ...
[ "private", "Filter", "getFilter", "(", "String", "layerFilter", ",", "String", "[", "]", "featureIds", ")", "throws", "GeomajasException", "{", "Filter", "filter", "=", "null", ";", "if", "(", "null", "!=", "layerFilter", ")", "{", "filter", "=", "filterServ...
Build filter for the request. @param layerFilter layer filter @param featureIds features to include in report (null for all) @return filter @throws GeomajasException filter could not be parsed/created
[ "Build", "filter", "for", "the", "request", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/reporting/reporting/src/main/java/org/geomajas/plugin/reporting/command/reporting/PrepareReportingCommand.java#L190-L204
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPSpecificationOptionUtil.java
CPSpecificationOptionUtil.findByUUID_G
public static CPSpecificationOption findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.product.exception.NoSuchCPSpecificationOptionException { """ Returns the cp specification option where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPSpecificationOptionException} if it could not ...
java
public static CPSpecificationOption findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.product.exception.NoSuchCPSpecificationOptionException { return getPersistence().findByUUID_G(uuid, groupId); }
[ "public", "static", "CPSpecificationOption", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "exception", ".", "NoSuchCPSpecificationOptionException", "{", "return", "getPersi...
Returns the cp specification option where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPSpecificationOptionException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching cp specification option @throws NoSuchCPSpecificationOptionException if a matching cp speci...
[ "Returns", "the", "cp", "specification", "option", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPSpecificationOptionException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPSpecificationOptionUtil.java#L283-L286
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java
Img.getValue
public int getValue(int x, int y, final int boundaryMode) { """ Returns the value of this Img at the specified position. Bounds checks will be performed and positions outside of this image's dimensions will be handled according to the specified boundary mode. <p> <b><u>Boundary Modes</u></b><br> {@link #bound...
java
public int getValue(int x, int y, final int boundaryMode){ if(x < 0 || y < 0 || x >= this.width || y >= this.height){ switch (boundaryMode) { case boundary_mode_zero: return 0; case boundary_mode_repeat_edge: x = (x < 0 ? 0: (x >= this.width ? this.width-1:x)); y = (y < 0 ? 0: (y >= this.height ?...
[ "public", "int", "getValue", "(", "int", "x", ",", "int", "y", ",", "final", "int", "boundaryMode", ")", "{", "if", "(", "x", "<", "0", "||", "y", "<", "0", "||", "x", ">=", "this", ".", "width", "||", "y", ">=", "this", ".", "height", ")", "...
Returns the value of this Img at the specified position. Bounds checks will be performed and positions outside of this image's dimensions will be handled according to the specified boundary mode. <p> <b><u>Boundary Modes</u></b><br> {@link #boundary_mode_zero} <br> will return 0 for out of bounds positions. <br> -{@lin...
[ "Returns", "the", "value", "of", "this", "Img", "at", "the", "specified", "position", ".", "Bounds", "checks", "will", "be", "performed", "and", "positions", "outside", "of", "this", "image", "s", "dimensions", "will", "be", "handled", "according", "to", "th...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java#L283-L312
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java
CommonsOJBLockManager.mapLockLevelDependendOnIsolationLevel
int mapLockLevelDependendOnIsolationLevel(Integer isolationId, int lockLevel) { """ Helper method to map the specified common lock level (e.g like {@link #COMMON_READ_LOCK}, {@link #COMMON_UPGRADE_LOCK, ...}) based on the isolation level to the internal used lock level value by the {@link org.apache.commons.tra...
java
int mapLockLevelDependendOnIsolationLevel(Integer isolationId, int lockLevel) { int result = 0; switch(isolationId.intValue()) { case LockManager.IL_READ_UNCOMMITTED: result = ReadUncommittedLock.mapLockLevel(lockLevel); break; ...
[ "int", "mapLockLevelDependendOnIsolationLevel", "(", "Integer", "isolationId", ",", "int", "lockLevel", ")", "{", "int", "result", "=", "0", ";", "switch", "(", "isolationId", ".", "intValue", "(", ")", ")", "{", "case", "LockManager", ".", "IL_READ_UNCOMMITTED"...
Helper method to map the specified common lock level (e.g like {@link #COMMON_READ_LOCK}, {@link #COMMON_UPGRADE_LOCK, ...}) based on the isolation level to the internal used lock level value by the {@link org.apache.commons.transaction.locking.MultiLevelLock2} implementation. @param isolationId @param lockLevel @retu...
[ "Helper", "method", "to", "map", "the", "specified", "common", "lock", "level", "(", "e", ".", "g", "like", "{", "@link", "#COMMON_READ_LOCK", "}", "{", "@link", "#COMMON_UPGRADE_LOCK", "...", "}", ")", "based", "on", "the", "isolation", "level", "to", "th...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java#L228-L251
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildDeleteRequest
public HttpRequest buildDeleteRequest(GenericUrl url) throws IOException { """ Builds a {@code DELETE} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request """ return buildRequest(HttpMethods.DELETE, url, null); }
java
public HttpRequest buildDeleteRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.DELETE, url, null); }
[ "public", "HttpRequest", "buildDeleteRequest", "(", "GenericUrl", "url", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "DELETE", ",", "url", ",", "null", ")", ";", "}" ]
Builds a {@code DELETE} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "DELETE", "}", "request", "for", "the", "given", "URL", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L106-L108
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONNavi.java
JSONNavi.set
public JSONNavi<T> set(String key, int value) { """ write an value in the current object @param key key to access @param value new value @return this """ return set(key, Integer.valueOf(value)); }
java
public JSONNavi<T> set(String key, int value) { return set(key, Integer.valueOf(value)); }
[ "public", "JSONNavi", "<", "T", ">", "set", "(", "String", "key", ",", "int", "value", ")", "{", "return", "set", "(", "key", ",", "Integer", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
write an value in the current object @param key key to access @param value new value @return this
[ "write", "an", "value", "in", "the", "current", "object" ]
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONNavi.java#L252-L254
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java
RouteFiltersInner.beginCreateOrUpdate
public RouteFilterInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { """ Creates or updates a route filter in a specified resource group. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filt...
java
public RouteFilterInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, routeFilterParameters).toBlocking().single().body(); }
[ "public", "RouteFilterInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "RouteFilterInner", "routeFilterParameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeF...
Creates or updates a route filter in a specified resource group. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param routeFilterParameters Parameters supplied to the create or update route filter operation. @throws IllegalArgumentException thrown if para...
[ "Creates", "or", "updates", "a", "route", "filter", "in", "a", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java#L518-L520
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java
ObjectCacheTwoLevelImpl.afterCommit
public void afterCommit(PBStateEvent event) { """ After committing the transaction push the object from session cache ( 1st level cache) to the application cache (2d level cache). Finally, clear the session cache. """ if(log.isDebugEnabled()) log.debug("afterCommit() call, push objects to applicatio...
java
public void afterCommit(PBStateEvent event) { if(log.isDebugEnabled()) log.debug("afterCommit() call, push objects to application cache"); if(invokeCounter != 0) { log.error("** Please check method calls of ObjectCacheTwoLevelImpl#enableMaterialization and" + ...
[ "public", "void", "afterCommit", "(", "PBStateEvent", "event", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"afterCommit() call, push objects to application cache\"", ")", ";", "if", "(", "invokeCounter", "!=", "0...
After committing the transaction push the object from session cache ( 1st level cache) to the application cache (2d level cache). Finally, clear the session cache.
[ "After", "committing", "the", "transaction", "push", "the", "object", "from", "session", "cache", "(", "1st", "level", "cache", ")", "to", "the", "application", "cache", "(", "2d", "level", "cache", ")", ".", "Finally", "clear", "the", "session", "cache", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/cache/ObjectCacheTwoLevelImpl.java#L495-L512
dustin/java-memcached-client
src/main/java/net/spy/memcached/KetamaNodeKeyFormatter.java
KetamaNodeKeyFormatter.getKeyForNode
public String getKeyForNode(MemcachedNode node, int repetition) { """ Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm. @param node The MemcachedNode to use to form the unique identifier @param repetition The repetition number for the particular node in question (0 ...
java
public String getKeyForNode(MemcachedNode node, int repetition) { // Carrried over from the DefaultKetamaNodeLocatorConfiguration: // Internal Using the internal map retrieve the socket addresses // for given nodes. // I'm aware that this code is inherently thread-unsafe as // I'...
[ "public", "String", "getKeyForNode", "(", "MemcachedNode", "node", ",", "int", "repetition", ")", "{", "// Carrried over from the DefaultKetamaNodeLocatorConfiguration:", "// Internal Using the internal map retrieve the socket addresses", "// for given nodes.", "// I'm aware that this co...
Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm. @param node The MemcachedNode to use to form the unique identifier @param repetition The repetition number for the particular node in question (0 is the first repetition) @return The key that represents the specific repetition...
[ "Returns", "a", "uniquely", "identifying", "key", "suitable", "for", "hashing", "by", "the", "KetamaNodeLocator", "algorithm", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/KetamaNodeKeyFormatter.java#L105-L137
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java
EventServiceImpl.executeLocal
private void executeLocal(String serviceName, Object event, EventRegistration registration, int orderKey) { """ Processes the {@code event} on this node. If the event is not accepted to the executor in {@link #eventQueueTimeoutMs}, it will be rejected and not processed. This means that we increase the rejected c...
java
private void executeLocal(String serviceName, Object event, EventRegistration registration, int orderKey) { if (!nodeEngine.isRunning()) { return; } Registration reg = (Registration) registration; try { if (reg.getListener() != null) { eventExecut...
[ "private", "void", "executeLocal", "(", "String", "serviceName", ",", "Object", "event", ",", "EventRegistration", "registration", ",", "int", "orderKey", ")", "{", "if", "(", "!", "nodeEngine", ".", "isRunning", "(", ")", ")", "{", "return", ";", "}", "Re...
Processes the {@code event} on this node. If the event is not accepted to the executor in {@link #eventQueueTimeoutMs}, it will be rejected and not processed. This means that we increase the rejected count and log the failure. @param serviceName the name of the service responsible for this event @param event t...
[ "Processes", "the", "{", "@code", "event", "}", "on", "this", "node", ".", "If", "the", "event", "is", "not", "accepted", "to", "the", "executor", "in", "{", "@link", "#eventQueueTimeoutMs", "}", "it", "will", "be", "rejected", "and", "not", "processed", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java#L468-L489
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.dropRight
public static <T> T[] dropRight(T[] self, int num) { """ Drops the given number of elements from the tail of this array if they are available. <pre class="groovyTestCase"> String[] strings = [ 'a', 'b', 'c' ] assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ] as String[] assert strings.dropRight( 2 ) == [ 'a'...
java
public static <T> T[] dropRight(T[] self, int num) { if (self.length <= num) { return createSimilarArray(self, 0); } if (num <= 0) { T[] ret = createSimilarArray(self, self.length); System.arraycopy(self, 0, ret, 0, self.length); return ret; ...
[ "public", "static", "<", "T", ">", "T", "[", "]", "dropRight", "(", "T", "[", "]", "self", ",", "int", "num", ")", "{", "if", "(", "self", ".", "length", "<=", "num", ")", "{", "return", "createSimilarArray", "(", "self", ",", "0", ")", ";", "}...
Drops the given number of elements from the tail of this array if they are available. <pre class="groovyTestCase"> String[] strings = [ 'a', 'b', 'c' ] assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ] as String[] assert strings.dropRight( 2 ) == [ 'a' ] as String[] assert strings.dropRight( 5 ) == [] as String[] </pr...
[ "Drops", "the", "given", "number", "of", "elements", "from", "the", "tail", "of", "this", "array", "if", "they", "are", "available", ".", "<pre", "class", "=", "groovyTestCase", ">", "String", "[]", "strings", "=", "[", "a", "b", "c", "]", "assert", "s...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L10851-L10864
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_billingAccount_securityDeposit_GET
public OvhOrder telephony_billingAccount_securityDeposit_GET(String billingAccount, OvhSecurityDepositAmountsEnum amount) throws IOException { """ Get prices and contracts information REST: GET /order/telephony/{billingAccount}/securityDeposit @param amount [required] The amount, in euros, to credit to the cur...
java
public OvhOrder telephony_billingAccount_securityDeposit_GET(String billingAccount, OvhSecurityDepositAmountsEnum amount) throws IOException { String qPath = "/order/telephony/{billingAccount}/securityDeposit"; StringBuilder sb = path(qPath, billingAccount); query(sb, "amount", amount); String resp = exec(qPath...
[ "public", "OvhOrder", "telephony_billingAccount_securityDeposit_GET", "(", "String", "billingAccount", ",", "OvhSecurityDepositAmountsEnum", "amount", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/telephony/{billingAccount}/securityDeposit\"", ";", "StringB...
Get prices and contracts information REST: GET /order/telephony/{billingAccount}/securityDeposit @param amount [required] The amount, in euros, to credit to the current security deposit @param billingAccount [required] The name of your billingAccount
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6396-L6402
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/ItemsSketch.java
ItemsSketch.putMemory
public void putMemory(final WritableMemory dstMem, final ArrayOfItemsSerDe<T> serDe) { """ Puts the current sketch into the given Memory if there is sufficient space. Otherwise, throws an error. @param dstMem the given memory. @param serDe an instance of ArrayOfItemsSerDe """ final byte[] byteArr = to...
java
public void putMemory(final WritableMemory dstMem, final ArrayOfItemsSerDe<T> serDe) { final byte[] byteArr = toByteArray(serDe); final long memCap = dstMem.getCapacity(); if (memCap < byteArr.length) { throw new SketchesArgumentException( "Destination Memory not large enough: " + memCap + "...
[ "public", "void", "putMemory", "(", "final", "WritableMemory", "dstMem", ",", "final", "ArrayOfItemsSerDe", "<", "T", ">", "serDe", ")", "{", "final", "byte", "[", "]", "byteArr", "=", "toByteArray", "(", "serDe", ")", ";", "final", "long", "memCap", "=", ...
Puts the current sketch into the given Memory if there is sufficient space. Otherwise, throws an error. @param dstMem the given memory. @param serDe an instance of ArrayOfItemsSerDe
[ "Puts", "the", "current", "sketch", "into", "the", "given", "Memory", "if", "there", "is", "sufficient", "space", ".", "Otherwise", "throws", "an", "error", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/ItemsSketch.java#L663-L671