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
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/ThriftClient.java
ThriftClient.onPersist
@Override protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) { """ Persists a {@link Node} to database. @param entityMetadata the entity metadata @param entity the entity @param id the id @param rlHolders the rl holders """ Co...
java
@Override protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) { Connection conn = getConnection(); try { // if entity is embeddable...call cql translator to get cql string! // use thrift client to execu...
[ "@", "Override", "protected", "void", "onPersist", "(", "EntityMetadata", "entityMetadata", ",", "Object", "entity", ",", "Object", "id", ",", "List", "<", "RelationHolder", ">", "rlHolders", ")", "{", "Connection", "conn", "=", "getConnection", "(", ")", ";",...
Persists a {@link Node} to database. @param entityMetadata the entity metadata @param entity the entity @param id the id @param rlHolders the rl holders
[ "Persists", "a", "{", "@link", "Node", "}", "to", "database", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/ThriftClient.java#L182-L232
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/AbstractDocumentationMojo.java
AbstractDocumentationMojo.toPackageFolder
protected static File toPackageFolder(String packageName) { """ Convert a a package name for therelative file. @param packageName the name. @return the file. """ File file = null; for (final String element : packageName.split("[.]")) { //$NON-NLS-1$ if (file == null) { file = new File(element); ...
java
protected static File toPackageFolder(String packageName) { File file = null; for (final String element : packageName.split("[.]")) { //$NON-NLS-1$ if (file == null) { file = new File(element); } else { file = new File(file, element); } } return file; }
[ "protected", "static", "File", "toPackageFolder", "(", "String", "packageName", ")", "{", "File", "file", "=", "null", ";", "for", "(", "final", "String", "element", ":", "packageName", ".", "split", "(", "\"[.]\"", ")", ")", "{", "//$NON-NLS-1$", "if", "(...
Convert a a package name for therelative file. @param packageName the name. @return the file.
[ "Convert", "a", "a", "package", "name", "for", "therelative", "file", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/AbstractDocumentationMojo.java#L519-L529
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/EsIndex.java
EsIndex.putValues
private void putValues(EsRequest doc, EsIndexColumn column, Object[] value) { """ Appends specified values for the given column and related pseudo columns into list of properties. @param doc list of properties in json format @param column colum definition @param value column's value. """ Object[]...
java
private void putValues(EsRequest doc, EsIndexColumn column, Object[] value) { Object[] columnValue = column.columnValues(value); int[] ln = new int[columnValue.length]; String[] lc = new String[columnValue.length]; String[] uc = new String[columnValue.length]; for (int i = 0; i ...
[ "private", "void", "putValues", "(", "EsRequest", "doc", ",", "EsIndexColumn", "column", ",", "Object", "[", "]", "value", ")", "{", "Object", "[", "]", "columnValue", "=", "column", ".", "columnValues", "(", "value", ")", ";", "int", "[", "]", "ln", "...
Appends specified values for the given column and related pseudo columns into list of properties. @param doc list of properties in json format @param column colum definition @param value column's value.
[ "Appends", "specified", "values", "for", "the", "given", "column", "and", "related", "pseudo", "columns", "into", "list", "of", "properties", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/EsIndex.java#L228-L245
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cp/internal/raftop/metadata/TriggerDestroyRaftGroupOp.java
TriggerDestroyRaftGroupOp.run
@Override public Object run(MetadataRaftGroupManager metadataGroupManager, long commitIndex) { """ Please note that targetGroupId is the Raft group that is being queried """ metadataGroupManager.triggerDestroyRaftGroup(targetGroupId); return targetGroupId; }
java
@Override public Object run(MetadataRaftGroupManager metadataGroupManager, long commitIndex) { metadataGroupManager.triggerDestroyRaftGroup(targetGroupId); return targetGroupId; }
[ "@", "Override", "public", "Object", "run", "(", "MetadataRaftGroupManager", "metadataGroupManager", ",", "long", "commitIndex", ")", "{", "metadataGroupManager", ".", "triggerDestroyRaftGroup", "(", "targetGroupId", ")", ";", "return", "targetGroupId", ";", "}" ]
Please note that targetGroupId is the Raft group that is being queried
[ "Please", "note", "that", "targetGroupId", "is", "the", "Raft", "group", "that", "is", "being", "queried" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/raftop/metadata/TriggerDestroyRaftGroupOp.java#L47-L51
Azure/azure-sdk-for-java
datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/FilesInner.java
FilesInner.read
public FileStorageInfoInner read(String groupName, String serviceName, String projectName, String fileName) { """ Request storage information for downloading the file content. This method is used for requesting storage information using which contents of the file can be downloaded. @param groupName Name of the...
java
public FileStorageInfoInner read(String groupName, String serviceName, String projectName, String fileName) { return readWithServiceResponseAsync(groupName, serviceName, projectName, fileName).toBlocking().single().body(); }
[ "public", "FileStorageInfoInner", "read", "(", "String", "groupName", ",", "String", "serviceName", ",", "String", "projectName", ",", "String", "fileName", ")", "{", "return", "readWithServiceResponseAsync", "(", "groupName", ",", "serviceName", ",", "projectName", ...
Request storage information for downloading the file content. This method is used for requesting storage information using which contents of the file can be downloaded. @param groupName Name of the resource group @param serviceName Name of the service @param projectName Name of the project @param fileName Name of the ...
[ "Request", "storage", "information", "for", "downloading", "the", "file", "content", ".", "This", "method", "is", "used", "for", "requesting", "storage", "information", "using", "which", "contents", "of", "the", "file", "can", "be", "downloaded", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/FilesInner.java#L682-L684
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getEventsBatch
public OneLoginResponse<Event> getEventsBatch(HashMap<String, String> queryParameters, int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Get a batch of Events. @param queryParameters Query parameters of the Resource @param batchSize Size of the B...
java
public OneLoginResponse<Event> getEventsBatch(HashMap<String, String> queryParameters, int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { ExtractionContext context = extractResourceBatch(queryParameters, batchSize, afterCursor, Constants.GET_EVENTS_URL); L...
[ "public", "OneLoginResponse", "<", "Event", ">", "getEventsBatch", "(", "HashMap", "<", "String", ",", "String", ">", "queryParameters", ",", "int", "batchSize", ",", "String", "afterCursor", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", ...
Get a batch of Events. @param queryParameters Query parameters of the Resource @param batchSize Size of the Batch @param afterCursor Reference to continue collecting items of next page @return OneLoginResponse of Event (Batch) @throws OAuthSystemException - if there is a IOException reading parameters of the httpURL...
[ "Get", "a", "batch", "of", "Events", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2025-L2031
tobato/FastDFS_Client
src/main/java/com/github/tobato/fastdfs/domain/proto/mapper/BytesUtil.java
BytesUtil.buff2long
public static long buff2long(byte[] bs, int offset) { """ buff convert to long @param bs the buffer (big-endian) @param offset the start position based 0 @return long number """ return (((long) (bs[offset] >= 0 ? bs[offset] : 256 + bs[offset])) << 56) | (((long) (bs[offset + 1]...
java
public static long buff2long(byte[] bs, int offset) { return (((long) (bs[offset] >= 0 ? bs[offset] : 256 + bs[offset])) << 56) | (((long) (bs[offset + 1] >= 0 ? bs[offset + 1] : 256 + bs[offset + 1])) << 48) | (((long) (bs[offset + 2] >= 0 ? bs[offset + 2] : 256 + bs[offset + 2]...
[ "public", "static", "long", "buff2long", "(", "byte", "[", "]", "bs", ",", "int", "offset", ")", "{", "return", "(", "(", "(", "long", ")", "(", "bs", "[", "offset", "]", ">=", "0", "?", "bs", "[", "offset", "]", ":", "256", "+", "bs", "[", "...
buff convert to long @param bs the buffer (big-endian) @param offset the start position based 0 @return long number
[ "buff", "convert", "to", "long" ]
train
https://github.com/tobato/FastDFS_Client/blob/8e3bfe712f1739028beed7f3a6b2cc4579a231e4/src/main/java/com/github/tobato/fastdfs/domain/proto/mapper/BytesUtil.java#L42-L51
jeppetto/jeppetto
jeppetto-enhance/src/main/java/org/iternine/jeppetto/enhance/ClassLoadingUtil.java
ClassLoadingUtil.toClass
public static <T> Class<T> toClass(CtClass ctClass) throws CannotCompileException { """ Installs the given {@code CtClass} into the current class-loader and returns it as a new class. @param ctClass class to load @param <T> class type @return new class @throws CannotCompileException if the class cannot be c...
java
public static <T> Class<T> toClass(CtClass ctClass) throws CannotCompileException { return toClass(ctClass, ClassLoadingUtil.class.getClassLoader(), null); }
[ "public", "static", "<", "T", ">", "Class", "<", "T", ">", "toClass", "(", "CtClass", "ctClass", ")", "throws", "CannotCompileException", "{", "return", "toClass", "(", "ctClass", ",", "ClassLoadingUtil", ".", "class", ".", "getClassLoader", "(", ")", ",", ...
Installs the given {@code CtClass} into the current class-loader and returns it as a new class. @param ctClass class to load @param <T> class type @return new class @throws CannotCompileException if the class cannot be compiled
[ "Installs", "the", "given", "{", "@code", "CtClass", "}", "into", "the", "current", "class", "-", "loader", "and", "returns", "it", "as", "a", "new", "class", "." ]
train
https://github.com/jeppetto/jeppetto/blob/bd2796dcf53376052f590e727931990a2902a933/jeppetto-enhance/src/main/java/org/iternine/jeppetto/enhance/ClassLoadingUtil.java#L118-L120
lucee/Lucee
core/src/main/java/lucee/runtime/db/Executer.java
Executer.getValue
private Object getValue(PageContext pc, SQL sql, Query querySource, int row, Collection.Key key, Object value) throws PageException { """ return value @param sql @param querySource @param row @param key @param value @return value @throws PageException """ if (value instanceof ZSelectItem) return exec...
java
private Object getValue(PageContext pc, SQL sql, Query querySource, int row, Collection.Key key, Object value) throws PageException { if (value instanceof ZSelectItem) return executeExp(pc, sql, querySource, ((ZSelectItem) value).getExpression(), row); return querySource.getAt(key, row); }
[ "private", "Object", "getValue", "(", "PageContext", "pc", ",", "SQL", "sql", ",", "Query", "querySource", ",", "int", "row", ",", "Collection", ".", "Key", "key", ",", "Object", "value", ")", "throws", "PageException", "{", "if", "(", "value", "instanceof...
return value @param sql @param querySource @param row @param key @param value @return value @throws PageException
[ "return", "value" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/db/Executer.java#L215-L218
netty/netty
common/src/main/java/io/netty/util/internal/StringUtil.java
StringUtil.validateCsvFormat
private static void validateCsvFormat(CharSequence value) { """ Validate if {@code value} is a valid csv field without double-quotes. @throws IllegalArgumentException if {@code value} needs to be encoded with double-quotes. """ int length = value.length(); for (int i = 0; i < length; i++) { ...
java
private static void validateCsvFormat(CharSequence value) { int length = value.length(); for (int i = 0; i < length; i++) { switch (value.charAt(i)) { case DOUBLE_QUOTE: case LINE_FEED: case CARRIAGE_RETURN: case COMMA: ...
[ "private", "static", "void", "validateCsvFormat", "(", "CharSequence", "value", ")", "{", "int", "length", "=", "value", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "switch", "(...
Validate if {@code value} is a valid csv field without double-quotes. @throws IllegalArgumentException if {@code value} needs to be encoded with double-quotes.
[ "Validate", "if", "{", "@code", "value", "}", "is", "a", "valid", "csv", "field", "without", "double", "-", "quotes", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/StringUtil.java#L506-L519
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java
DifferenceEngine.unequalNotNull
private boolean unequalNotNull(Object expected, Object actual) { """ Test two non-null values for inequality @param expected @param actual @return TRUE if the values are not equals() equal (taking whitespace into account if necessary) """ if ((XMLUnit.getIgnoreWhitespace() || XMLUnit.getNormalizeWh...
java
private boolean unequalNotNull(Object expected, Object actual) { if ((XMLUnit.getIgnoreWhitespace() || XMLUnit.getNormalizeWhitespace()) && expected instanceof String && actual instanceof String) { String expectedString = ((String) expected).trim(); String actualString = ((St...
[ "private", "boolean", "unequalNotNull", "(", "Object", "expected", ",", "Object", "actual", ")", "{", "if", "(", "(", "XMLUnit", ".", "getIgnoreWhitespace", "(", ")", "||", "XMLUnit", ".", "getNormalizeWhitespace", "(", ")", ")", "&&", "expected", "instanceof"...
Test two non-null values for inequality @param expected @param actual @return TRUE if the values are not equals() equal (taking whitespace into account if necessary)
[ "Test", "two", "non", "-", "null", "values", "for", "inequality" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/DifferenceEngine.java#L908-L920
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
FSDataset.registerMBean
void registerMBean(final String storageId) { """ Register the FSDataset MBean using the name "hadoop:service=DataNode,name=FSDatasetState-<storageid>" """ // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for ...
java
void registerMBean(final String storageId) { // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; String storageName; if (storageId == null || storageId.equals("")...
[ "void", "registerMBean", "(", "final", "String", "storageId", ")", "{", "// We wrap to bypass standard mbean naming convetion.", "// This wraping can be removed in java 6 as it is more flexible in", "// package naming for mbeans and their impl.", "StandardMBean", "bean", ";", "String", ...
Register the FSDataset MBean using the name "hadoop:service=DataNode,name=FSDatasetState-<storageid>"
[ "Register", "the", "FSDataset", "MBean", "using", "the", "name", "hadoop", ":", "service", "=", "DataNode", "name", "=", "FSDatasetState", "-", "<storageid", ">" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java#L2943-L2963
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.reimageComputeNode
public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is...
java
public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { ComputeNodeReimageOptions options = new ComputeNodeReimageOptions(); BehaviorManager bhMgr = new BehaviorM...
[ "public", "void", "reimageComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "ComputeNodeReimageOption", "nodeReimageOption", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException...
Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#RUNNING Running} state.</p> @param poolId The ID of t...
[ "Reinstalls", "the", "operating", "system", "on", "the", "specified", "compute", "node", ".", "<p", ">", "You", "can", "reimage", "a", "compute", "node", "only", "when", "it", "is", "in", "the", "{", "@link", "com", ".", "microsoft", ".", "azure", ".", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L352-L358
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java
JAXBMarshallerHelper.setEncoding
public static void setEncoding (@Nonnull final Marshaller aMarshaller, @Nullable final String sEncoding) { """ Set the standard property for the encoding charset. @param aMarshaller The marshaller to set the property. May not be <code>null</code>. @param sEncoding the value to be set """ _setProperty...
java
public static void setEncoding (@Nonnull final Marshaller aMarshaller, @Nullable final String sEncoding) { _setProperty (aMarshaller, Marshaller.JAXB_ENCODING, sEncoding); }
[ "public", "static", "void", "setEncoding", "(", "@", "Nonnull", "final", "Marshaller", "aMarshaller", ",", "@", "Nullable", "final", "String", "sEncoding", ")", "{", "_setProperty", "(", "aMarshaller", ",", "Marshaller", ".", "JAXB_ENCODING", ",", "sEncoding", "...
Set the standard property for the encoding charset. @param aMarshaller The marshaller to set the property. May not be <code>null</code>. @param sEncoding the value to be set
[ "Set", "the", "standard", "property", "for", "the", "encoding", "charset", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java#L111-L114
Azure/azure-sdk-for-java
applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/EventsImpl.java
EventsImpl.getByTypeAsync
public Observable<EventsResults> getByTypeAsync(String appId, EventType eventType, String timespan, String filter, String search, String orderby, String select, Integer skip, Integer top, String format, Boolean count, String apply) { """ Execute OData query. Executes an OData query for events. @param appId ID ...
java
public Observable<EventsResults> getByTypeAsync(String appId, EventType eventType, String timespan, String filter, String search, String orderby, String select, Integer skip, Integer top, String format, Boolean count, String apply) { return getByTypeWithServiceResponseAsync(appId, eventType, timespan, filter, s...
[ "public", "Observable", "<", "EventsResults", ">", "getByTypeAsync", "(", "String", "appId", ",", "EventType", "eventType", ",", "String", "timespan", ",", "String", "filter", ",", "String", "search", ",", "String", "orderby", ",", "String", "select", ",", "In...
Execute OData query. Executes an OData query for events. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param eventType The type of events to query; either a standard event type (`traces`, `customEvents`, `pageViews`, `requests`, `dependencies`, `exc...
[ "Execute", "OData", "query", ".", "Executes", "an", "OData", "query", "for", "events", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/EventsImpl.java#L222-L229
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/ParseDateExtensions.java
ParseDateExtensions.parseToDate
public static Date parseToDate(final String datum, final String[] formats, final Locale locale) { """ Returns a date-object if the array with the formats are valid otherwise null. @param datum The date as string which to parse to a date-object. @param formats The string-array with the date-patterns. @param ...
java
public static Date parseToDate(final String datum, final String[] formats, final Locale locale) { for (final String format : formats) { final SimpleDateFormat sdf = new SimpleDateFormat(format, locale); try { return sdf.parse(datum); } catch (final ParseException e) { // Do nothing... ...
[ "public", "static", "Date", "parseToDate", "(", "final", "String", "datum", ",", "final", "String", "[", "]", "formats", ",", "final", "Locale", "locale", ")", "{", "for", "(", "final", "String", "format", ":", "formats", ")", "{", "final", "SimpleDateForm...
Returns a date-object if the array with the formats are valid otherwise null. @param datum The date as string which to parse to a date-object. @param formats The string-array with the date-patterns. @param locale THe Locale for the SimpleDateFormat. @return A date-object if the array with the formats are valid otherwi...
[ "Returns", "a", "date", "-", "object", "if", "the", "array", "with", "the", "formats", "are", "valid", "otherwise", "null", "." ]
train
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/ParseDateExtensions.java#L103-L118
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java
Security.setProperty
public static void setProperty(String key, String datum) { """ Sets a security property value. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a <code>java.security.SecurityPermission("setProperty."+key)</code> permission to see if it's ok to set the specified...
java
public static void setProperty(String key, String datum) { check("setProperty."+key); props.put(key, datum); increaseVersion(); invalidateSMCache(key); /* See below. */ }
[ "public", "static", "void", "setProperty", "(", "String", "key", ",", "String", "datum", ")", "{", "check", "(", "\"setProperty.\"", "+", "key", ")", ";", "props", ".", "put", "(", "key", ",", "datum", ")", ";", "increaseVersion", "(", ")", ";", "inval...
Sets a security property value. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a <code>java.security.SecurityPermission("setProperty."+key)</code> permission to see if it's ok to set the specified security property value. @param key the name of the property to be set....
[ "Sets", "a", "security", "property", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java#L670-L675
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/registry/RemoteRegionRegistry.java
RemoteRegionRegistry.storeFullRegistry
public boolean storeFullRegistry() { """ Gets the full registry information from the eureka server and stores it locally. @return the full registry information. """ long currentGeneration = fetchRegistryGeneration.get(); Applications apps = fetchRemoteRegistry(false); if (apps == nu...
java
public boolean storeFullRegistry() { long currentGeneration = fetchRegistryGeneration.get(); Applications apps = fetchRemoteRegistry(false); if (apps == null) { logger.error("The application is null for some reason. Not storing this information"); } else if (fetchRegistryGene...
[ "public", "boolean", "storeFullRegistry", "(", ")", "{", "long", "currentGeneration", "=", "fetchRegistryGeneration", ".", "get", "(", ")", ";", "Applications", "apps", "=", "fetchRemoteRegistry", "(", "false", ")", ";", "if", "(", "apps", "==", "null", ")", ...
Gets the full registry information from the eureka server and stores it locally. @return the full registry information.
[ "Gets", "the", "full", "registry", "information", "from", "the", "eureka", "server", "and", "stores", "it", "locally", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/registry/RemoteRegionRegistry.java#L360-L374
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java
AbstractRectangularShape2ifx.maxXProperty
@Pure public IntegerProperty maxXProperty() { """ Replies the property that is the maximum x coordinate of the box. @return the maxX property. """ if (this.maxX == null) { this.maxX = new SimpleIntegerProperty(this, MathFXAttributeNames.MAXIMUM_X) { @Override protected void invalidated() { ...
java
@Pure public IntegerProperty maxXProperty() { if (this.maxX == null) { this.maxX = new SimpleIntegerProperty(this, MathFXAttributeNames.MAXIMUM_X) { @Override protected void invalidated() { final int currentMax = get(); final int currentMin = getMinX(); if (currentMax < currentMin) { ...
[ "@", "Pure", "public", "IntegerProperty", "maxXProperty", "(", ")", "{", "if", "(", "this", ".", "maxX", "==", "null", ")", "{", "this", ".", "maxX", "=", "new", "SimpleIntegerProperty", "(", "this", ",", "MathFXAttributeNames", ".", "MAXIMUM_X", ")", "{",...
Replies the property that is the maximum x coordinate of the box. @return the maxX property.
[ "Replies", "the", "property", "that", "is", "the", "maximum", "x", "coordinate", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java#L174-L190
apache/incubator-druid
server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java
LookupCoordinatorManager.getLookup
@Nullable public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName) { """ Try to find a lookupName spec for the specified lookupName. @param lookupName The lookupName to look for @return The lookupName spec if found or null if not found or if no lookups at all are foun...
java
@Nullable public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName) { final Map<String, Map<String, LookupExtractorFactoryMapContainer>> prior = getKnownLookups(); if (prior == null) { LOG.warn("Requested tier [%s] lookupName [%s]. But no lookups exist!", tier, lo...
[ "@", "Nullable", "public", "LookupExtractorFactoryMapContainer", "getLookup", "(", "final", "String", "tier", ",", "final", "String", "lookupName", ")", "{", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "LookupExtractorFactoryMapContainer", ">", ...
Try to find a lookupName spec for the specified lookupName. @param lookupName The lookupName to look for @return The lookupName spec if found or null if not found or if no lookups at all are found
[ "Try", "to", "find", "a", "lookupName", "spec", "for", "the", "specified", "lookupName", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L322-L336
hsiafan/apk-parser
src/main/java/net/dongliu/apk/parser/utils/Buffers.java
Buffers.sliceAndSkip
public static ByteBuffer sliceAndSkip(ByteBuffer buffer, int size) { """ Return one new ByteBuffer from current position, with size, the byte order of new buffer will be set to little endian; And advance the original buffer with size. """ ByteBuffer buf = buffer.slice().order(ByteOrder.LITTLE_ENDIAN);...
java
public static ByteBuffer sliceAndSkip(ByteBuffer buffer, int size) { ByteBuffer buf = buffer.slice().order(ByteOrder.LITTLE_ENDIAN); ByteBuffer slice = (ByteBuffer) ((Buffer) buf).limit(buf.position() + size); skip(buffer, size); return slice; }
[ "public", "static", "ByteBuffer", "sliceAndSkip", "(", "ByteBuffer", "buffer", ",", "int", "size", ")", "{", "ByteBuffer", "buf", "=", "buffer", ".", "slice", "(", ")", ".", "order", "(", "ByteOrder", ".", "LITTLE_ENDIAN", ")", ";", "ByteBuffer", "slice", ...
Return one new ByteBuffer from current position, with size, the byte order of new buffer will be set to little endian; And advance the original buffer with size.
[ "Return", "one", "new", "ByteBuffer", "from", "current", "position", "with", "size", "the", "byte", "order", "of", "new", "buffer", "will", "be", "set", "to", "little", "endian", ";", "And", "advance", "the", "original", "buffer", "with", "size", "." ]
train
https://github.com/hsiafan/apk-parser/blob/8993ddd52017b37b8f2e784ae0a15417d9ede932/src/main/java/net/dongliu/apk/parser/utils/Buffers.java#L122-L127
rey5137/material
material/src/main/java/com/rey/material/app/ThemeManager.java
ThemeManager.getStyle
public int getStyle(int styleId, int theme) { """ Get a specific style of a styleId. @param styleId The styleId. @param theme The theme. @return The specific style. """ int[] styles = getStyleList(styleId); return styles == null ? 0 : styles[theme]; }
java
public int getStyle(int styleId, int theme){ int[] styles = getStyleList(styleId); return styles == null ? 0 : styles[theme]; }
[ "public", "int", "getStyle", "(", "int", "styleId", ",", "int", "theme", ")", "{", "int", "[", "]", "styles", "=", "getStyleList", "(", "styleId", ")", ";", "return", "styles", "==", "null", "?", "0", ":", "styles", "[", "theme", "]", ";", "}" ]
Get a specific style of a styleId. @param styleId The styleId. @param theme The theme. @return The specific style.
[ "Get", "a", "specific", "style", "of", "a", "styleId", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/app/ThemeManager.java#L184-L187
alkacon/opencms-core
src/org/opencms/i18n/CmsEncoder.java
CmsEncoder.escape
public static String escape(String source, String encoding) { """ Encodes a String in a way similar to the JavaScript "encodeURIcomponent" function.<p> JavaScript "decodeURIcomponent" can decode Strings that have been encoded using this method, provided "UTF-8" has been used as encoding.<p> <b>Directly expo...
java
public static String escape(String source, String encoding) { // the blank is encoded into "+" not "%20" when using standard encode call return CmsStringUtil.substitute(encode(source, encoding), "+", "%20"); }
[ "public", "static", "String", "escape", "(", "String", "source", ",", "String", "encoding", ")", "{", "// the blank is encoded into \"+\" not \"%20\" when using standard encode call", "return", "CmsStringUtil", ".", "substitute", "(", "encode", "(", "source", ",", "encodi...
Encodes a String in a way similar to the JavaScript "encodeURIcomponent" function.<p> JavaScript "decodeURIcomponent" can decode Strings that have been encoded using this method, provided "UTF-8" has been used as encoding.<p> <b>Directly exposed for JSP EL<b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions...
[ "Encodes", "a", "String", "in", "a", "way", "similar", "to", "the", "JavaScript", "encodeURIcomponent", "function", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsEncoder.java#L575-L579
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/render/AbstractRenderer.java
AbstractRenderer.createLabel
public Label createLabel(BaseComponent parent, Object value, String prefix, String style, boolean asFirst) { """ Creates a label for a string value. @param parent BaseComponent that will be the parent of the label. @param value Value to be used as label text. @param prefix Value to be used as a prefix for the...
java
public Label createLabel(BaseComponent parent, Object value, String prefix, String style, boolean asFirst) { Label label = new Label(createLabelText(value, prefix)); label.setStyles(style); parent.addChild(label, asFirst ? 0 : -1); return label; }
[ "public", "Label", "createLabel", "(", "BaseComponent", "parent", ",", "Object", "value", ",", "String", "prefix", ",", "String", "style", ",", "boolean", "asFirst", ")", "{", "Label", "label", "=", "new", "Label", "(", "createLabelText", "(", "value", ",", ...
Creates a label for a string value. @param parent BaseComponent that will be the parent of the label. @param value Value to be used as label text. @param prefix Value to be used as a prefix for the label text. @param style Style to be applied to the label. @param asFirst If true, the label is prepended to the parent. ...
[ "Creates", "a", "label", "for", "a", "string", "value", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/render/AbstractRenderer.java#L114-L119
spring-projects/spring-flex
spring-flex-core/src/main/java/org/springframework/flex/core/io/SpringPropertyProxy.java
SpringPropertyProxy.setValue
@Override public void setValue(Object instance, String propertyName, Object value) { """ {@inheritDoc} Delegates to the configured {@link ConversionService} to potentially convert the value to the actual type of the property. """ if (!isWriteIgnored(instance, propertyName)) { Propert...
java
@Override public void setValue(Object instance, String propertyName, Object value) { if (!isWriteIgnored(instance, propertyName)) { PropertyProxyUtils.getPropertyAccessor(this.conversionService, this.useDirectFieldAccess, instance).setPropertyValue(propertyName, value); } }
[ "@", "Override", "public", "void", "setValue", "(", "Object", "instance", ",", "String", "propertyName", ",", "Object", "value", ")", "{", "if", "(", "!", "isWriteIgnored", "(", "instance", ",", "propertyName", ")", ")", "{", "PropertyProxyUtils", ".", "getP...
{@inheritDoc} Delegates to the configured {@link ConversionService} to potentially convert the value to the actual type of the property.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/spring-projects/spring-flex/blob/85f2bff300d74e2d77d565f97a09d12d18e19adc/spring-flex-core/src/main/java/org/springframework/flex/core/io/SpringPropertyProxy.java#L180-L185
jnr/jnr-x86asm
src/main/java/jnr/x86asm/Asm.java
Asm.tword_ptr
public static final Mem tword_ptr(Label label, Register index, int shift, long disp) { """ Create tword (10 Bytes) pointer operand (used for 80 bit floating points). """ return _ptr_build(label, index, shift, disp, SIZE_TWORD); }
java
public static final Mem tword_ptr(Label label, Register index, int shift, long disp) { return _ptr_build(label, index, shift, disp, SIZE_TWORD); }
[ "public", "static", "final", "Mem", "tword_ptr", "(", "Label", "label", ",", "Register", "index", ",", "int", "shift", ",", "long", "disp", ")", "{", "return", "_ptr_build", "(", "label", ",", "index", ",", "shift", ",", "disp", ",", "SIZE_TWORD", ")", ...
Create tword (10 Bytes) pointer operand (used for 80 bit floating points).
[ "Create", "tword", "(", "10", "Bytes", ")", "pointer", "operand", "(", "used", "for", "80", "bit", "floating", "points", ")", "." ]
train
https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/Asm.java#L372-L374
google/closure-compiler
src/com/google/javascript/jscomp/Strings.java
Strings.truncateAtMaxLength
static String truncateAtMaxLength(String source, int maxLength, boolean addEllipsis) { """ If this given string is of length {@code maxLength} or less, it will be returned as-is. Otherwise, it will be truncated to {@code maxLength}, regardless of whether there are any space characters in the String. If an...
java
static String truncateAtMaxLength(String source, int maxLength, boolean addEllipsis) { if (source.length() <= maxLength) { return source; } if (addEllipsis && maxLength > 3) { return unicodePreservingSubstring(source, 0, maxLength - 3) + "..."; } return unicodePreservingSubstring(...
[ "static", "String", "truncateAtMaxLength", "(", "String", "source", ",", "int", "maxLength", ",", "boolean", "addEllipsis", ")", "{", "if", "(", "source", ".", "length", "(", ")", "<=", "maxLength", ")", "{", "return", "source", ";", "}", "if", "(", "add...
If this given string is of length {@code maxLength} or less, it will be returned as-is. Otherwise, it will be truncated to {@code maxLength}, regardless of whether there are any space characters in the String. If an ellipsis is requested to be appended to the truncated String, the String will be truncated so that the e...
[ "If", "this", "given", "string", "is", "of", "length", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Strings.java#L45-L55
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.removeByUUID_G
@Override public CommerceCountry removeByUUID_G(String uuid, long groupId) throws NoSuchCountryException { """ Removes the commerce country where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce country that was removed """ Comm...
java
@Override public CommerceCountry removeByUUID_G(String uuid, long groupId) throws NoSuchCountryException { CommerceCountry commerceCountry = findByUUID_G(uuid, groupId); return remove(commerceCountry); }
[ "@", "Override", "public", "CommerceCountry", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCountryException", "{", "CommerceCountry", "commerceCountry", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "return", ...
Removes the commerce country where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce country that was removed
[ "Removes", "the", "commerce", "country", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L812-L818
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpression.java
RAExpression.crossJoin
public static RAExpression crossJoin(RAExpression re1, RAExpression re2, TermFactory termFactory) throws IllegalJoinException { """ CROSS JOIN (also denoted by , in SQL) @param re1 a {@link RAExpression} @param re2 a {@link RAExpression} @return a {@link RAExpression} @throws IllegalJoinException if the same...
java
public static RAExpression crossJoin(RAExpression re1, RAExpression re2, TermFactory termFactory) throws IllegalJoinException { RAExpressionAttributes attributes = RAExpressionAttributes.crossJoin(re1.attributes, re2.attributes); return new RAExpression(union(re1.dataAtoms, re2.dataAto...
[ "public", "static", "RAExpression", "crossJoin", "(", "RAExpression", "re1", ",", "RAExpression", "re2", ",", "TermFactory", "termFactory", ")", "throws", "IllegalJoinException", "{", "RAExpressionAttributes", "attributes", "=", "RAExpressionAttributes", ".", "crossJoin",...
CROSS JOIN (also denoted by , in SQL) @param re1 a {@link RAExpression} @param re2 a {@link RAExpression} @return a {@link RAExpression} @throws IllegalJoinException if the same alias occurs in both arguments
[ "CROSS", "JOIN", "(", "also", "denoted", "by", "in", "SQL", ")" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpression.java#L64-L71
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONNavi.java
JSONNavi.set
public JSONNavi<T> set(String key, float value) { """ write an value in the current object @param key key to access @param value new value @return this """ return set(key, Float.valueOf(value)); }
java
public JSONNavi<T> set(String key, float value) { return set(key, Float.valueOf(value)); }
[ "public", "JSONNavi", "<", "T", ">", "set", "(", "String", "key", ",", "float", "value", ")", "{", "return", "set", "(", "key", ",", "Float", ".", "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#L278-L280
pravega/pravega
common/src/main/java/io/pravega/common/io/serialization/VersionedSerializer.java
VersionedSerializer.ensureCondition
void ensureCondition(boolean condition, String messageFormat, Object... args) throws SerializationException { """ Verifies that the given condition is true. If not, throws a SerializationException. """ if (!condition) { throw new SerializationException(String.format(messageFormat, args)); ...
java
void ensureCondition(boolean condition, String messageFormat, Object... args) throws SerializationException { if (!condition) { throw new SerializationException(String.format(messageFormat, args)); } }
[ "void", "ensureCondition", "(", "boolean", "condition", ",", "String", "messageFormat", ",", "Object", "...", "args", ")", "throws", "SerializationException", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "SerializationException", "(", "String", "....
Verifies that the given condition is true. If not, throws a SerializationException.
[ "Verifies", "that", "the", "given", "condition", "is", "true", ".", "If", "not", "throws", "a", "SerializationException", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/io/serialization/VersionedSerializer.java#L160-L164
aws/aws-sdk-java
aws-java-sdk-resourcegroupstaggingapi/src/main/java/com/amazonaws/services/resourcegroupstaggingapi/model/UntagResourcesResult.java
UntagResourcesResult.withFailedResourcesMap
public UntagResourcesResult withFailedResourcesMap(java.util.Map<String, FailureInfo> failedResourcesMap) { """ <p> Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item. </p> @param failedResourcesMap Details of resources that could...
java
public UntagResourcesResult withFailedResourcesMap(java.util.Map<String, FailureInfo> failedResourcesMap) { setFailedResourcesMap(failedResourcesMap); return this; }
[ "public", "UntagResourcesResult", "withFailedResourcesMap", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "FailureInfo", ">", "failedResourcesMap", ")", "{", "setFailedResourcesMap", "(", "failedResourcesMap", ")", ";", "return", "this", ";", "}" ]
<p> Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item. </p> @param failedResourcesMap Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item. @return Returns a refere...
[ "<p", ">", "Details", "of", "resources", "that", "could", "not", "be", "untagged", ".", "An", "error", "code", "status", "code", "and", "error", "message", "are", "returned", "for", "each", "failed", "item", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-resourcegroupstaggingapi/src/main/java/com/amazonaws/services/resourcegroupstaggingapi/model/UntagResourcesResult.java#L75-L78
fnklabs/draenei
src/main/java/com/fnklabs/draenei/CassandraClient.java
CassandraClient.executeAsync
public ResultSetFuture executeAsync(@NotNull String keyspace, @NotNull String query) { """ Execute cql query asynchronously @param query CQL query @return ResultSetFuture """ Timer time = getMetricsFactory().getTimer(MetricsType.CASSANDRA_EXECUTE_ASYNC.name()); getMetricsFactory().getCou...
java
public ResultSetFuture executeAsync(@NotNull String keyspace, @NotNull String query) { Timer time = getMetricsFactory().getTimer(MetricsType.CASSANDRA_EXECUTE_ASYNC.name()); getMetricsFactory().getCounter(MetricsType.CASSANDRA_PROCESSING_QUERIES.name()).inc(); ResultSetFuture resultSetFuture =...
[ "public", "ResultSetFuture", "executeAsync", "(", "@", "NotNull", "String", "keyspace", ",", "@", "NotNull", "String", "query", ")", "{", "Timer", "time", "=", "getMetricsFactory", "(", ")", ".", "getTimer", "(", "MetricsType", ".", "CASSANDRA_EXECUTE_ASYNC", "....
Execute cql query asynchronously @param query CQL query @return ResultSetFuture
[ "Execute", "cql", "query", "asynchronously" ]
train
https://github.com/fnklabs/draenei/blob/0a8cac54f1f635be3e2950375a23291d38453ae8/src/main/java/com/fnklabs/draenei/CassandraClient.java#L274-L286
alkacon/opencms-core
src/org/opencms/ui/dialogs/history/diff/CmsValueDiff.java
CmsValueDiff.buildValueComparisonTable
private Table buildValueComparisonTable( CmsObject cms, final Component parent, CmsFile file1, CmsFile file2, CmsMacroResolver macroResolver) throws CmsException { """ Builds the table for the content value comparisons.<p> @param cms the CMS context @param parent the...
java
private Table buildValueComparisonTable( CmsObject cms, final Component parent, CmsFile file1, CmsFile file2, CmsMacroResolver macroResolver) throws CmsException { CmsXmlDocumentComparison comp = new CmsXmlDocumentComparison(cms, file1, file2); CmsBeanTableBu...
[ "private", "Table", "buildValueComparisonTable", "(", "CmsObject", "cms", ",", "final", "Component", "parent", ",", "CmsFile", "file1", ",", "CmsFile", "file2", ",", "CmsMacroResolver", "macroResolver", ")", "throws", "CmsException", "{", "CmsXmlDocumentComparison", "...
Builds the table for the content value comparisons.<p> @param cms the CMS context @param parent the parent widget for the table (does not need to be the direct parent) @param file1 the first file @param file2 the second file @param macroResolver the macro resolver to use for building the table @return the table with ...
[ "Builds", "the", "table", "for", "the", "content", "value", "comparisons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/history/diff/CmsValueDiff.java#L141-L185
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.zip
public static Map zip(Iterator keys, Iterator values, boolean includeNull) { """ Creates a map where the object at index N from the first Iterator is the key for the object at index N of the second Iterator. If either Iterator is shorter than the other, the resulting Map will have only as many keys as are in the...
java
public static Map zip(Iterator keys, Iterator values, boolean includeNull) { HashMap hm = new HashMap(); while (keys.hasNext() && values.hasNext()) { Object o = keys.next(); Object p = values.next(); if (includeNull || o != null && p != null) { hm.put(...
[ "public", "static", "Map", "zip", "(", "Iterator", "keys", ",", "Iterator", "values", ",", "boolean", "includeNull", ")", "{", "HashMap", "hm", "=", "new", "HashMap", "(", ")", ";", "while", "(", "keys", ".", "hasNext", "(", ")", "&&", "values", ".", ...
Creates a map where the object at index N from the first Iterator is the key for the object at index N of the second Iterator. If either Iterator is shorter than the other, the resulting Map will have only as many keys as are in the smallest of the two Iterator. <br> If includeNull is true, both keys and values of null...
[ "Creates", "a", "map", "where", "the", "object", "at", "index", "N", "from", "the", "first", "Iterator", "is", "the", "key", "for", "the", "object", "at", "index", "N", "of", "the", "second", "Iterator", ".", "If", "either", "Iterator", "is", "shorter", ...
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L246-L256
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java
SQLiteDatabase.updateWithOnConflict
public int updateWithOnConflict(String table, ContentValues values, String whereClause, String[] whereArgs, int conflictAlgorithm) { """ Convenience method for updating rows in the database. @param table the table to update in @param values a map from column names to new column values. null is a v...
java
public int updateWithOnConflict(String table, ContentValues values, String whereClause, String[] whereArgs, int conflictAlgorithm) { if (values == null || values.size() == 0) { throw new IllegalArgumentException("Empty values"); } acquireReference(); try { ...
[ "public", "int", "updateWithOnConflict", "(", "String", "table", ",", "ContentValues", "values", ",", "String", "whereClause", ",", "String", "[", "]", "whereArgs", ",", "int", "conflictAlgorithm", ")", "{", "if", "(", "values", "==", "null", "||", "values", ...
Convenience method for updating rows in the database. @param table the table to update in @param values a map from column names to new column values. null is a valid value that will be translated to NULL. @param whereClause the optional WHERE clause to apply when updating. Passing null will update all rows. @param whe...
[ "Convenience", "method", "for", "updating", "rows", "in", "the", "database", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L1544-L1588
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java
GeoJsonReaderDriver.parseGeometryCollection
private GeometryCollection parseGeometryCollection(JsonParser jp) throws IOException, SQLException { """ Each element in the geometries array of a GeometryCollection is one of the geometry objects described above: { "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [100.0, 0.0] }...
java
private GeometryCollection parseGeometryCollection(JsonParser jp) throws IOException, SQLException { jp.nextToken(); // FIELD_NAME geometries String coordinatesField = jp.getText(); if (coordinatesField.equalsIgnoreCase(GeoJsonField.GEOMETRIES)) { jp.nextToken();//START array...
[ "private", "GeometryCollection", "parseGeometryCollection", "(", "JsonParser", "jp", ")", "throws", "IOException", ",", "SQLException", "{", "jp", ".", "nextToken", "(", ")", ";", "// FIELD_NAME geometries ", "String", "coordinatesField", "=", "jp", ".", "getTe...
Each element in the geometries array of a GeometryCollection is one of the geometry objects described above: { "type": "GeometryCollection", "geometries": [ { "type": "Point", "coordinates": [100.0, 0.0] }, { "type": "LineString", "coordinates": [ [101.0, 0.0], [102.0, 1.0] ] } ] @param jp @throws IOException @throw...
[ "Each", "element", "in", "the", "geometries", "array", "of", "a", "GeometryCollection", "is", "one", "of", "the", "geometry", "objects", "described", "above", ":" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1164-L1184
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/completer/XmlFileCompleter.java
XmlFileCompleter.validateFileDoesNotExist
public void validateFileDoesNotExist(UIInput<String> directory, UIInput<String> fileName, UIValidationContext validator) { """ Validates that the given selected directory and fileName are valid and that the file doesn't already exist """ String resourcePath = CamelXmlHelper.createFileName(directory, fi...
java
public void validateFileDoesNotExist(UIInput<String> directory, UIInput<String> fileName, UIValidationContext validator) { String resourcePath = CamelXmlHelper.createFileName(directory, fileName); if (files.contains(resourcePath)) { validator.addValidationError(fileName, "A file with that na...
[ "public", "void", "validateFileDoesNotExist", "(", "UIInput", "<", "String", ">", "directory", ",", "UIInput", "<", "String", ">", "fileName", ",", "UIValidationContext", "validator", ")", "{", "String", "resourcePath", "=", "CamelXmlHelper", ".", "createFileName", ...
Validates that the given selected directory and fileName are valid and that the file doesn't already exist
[ "Validates", "that", "the", "given", "selected", "directory", "and", "fileName", "are", "valid", "and", "that", "the", "file", "doesn", "t", "already", "exist" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/completer/XmlFileCompleter.java#L78-L83
JOML-CI/JOML
src/org/joml/AABBf.java
AABBf.setMin
public AABBf setMin(float minX, float minY, float minZ) { """ Set the minimum corner coordinates. @param minX the x coordinate of the minimum corner @param minY the y coordinate of the minimum corner @param minZ the z coordinate of the minimum corner @return this """ this.minX = minX; ...
java
public AABBf setMin(float minX, float minY, float minZ) { this.minX = minX; this.minY = minY; this.minZ = minZ; return this; }
[ "public", "AABBf", "setMin", "(", "float", "minX", ",", "float", "minY", ",", "float", "minZ", ")", "{", "this", ".", "minX", "=", "minX", ";", "this", ".", "minY", "=", "minY", ";", "this", ".", "minZ", "=", "minZ", ";", "return", "this", ";", "...
Set the minimum corner coordinates. @param minX the x coordinate of the minimum corner @param minY the y coordinate of the minimum corner @param minZ the z coordinate of the minimum corner @return this
[ "Set", "the", "minimum", "corner", "coordinates", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/AABBf.java#L117-L122
grpc/grpc-java
netty/src/main/java/io/grpc/netty/GrpcSslContexts.java
GrpcSslContexts.forServer
public static SslContextBuilder forServer(File keyCertChainFile, File keyFile) { """ Creates a SslContextBuilder with ciphers and APN appropriate for gRPC. @see SslContextBuilder#forServer(File, File) @see #configure(SslContextBuilder) """ return configure(SslContextBuilder.forServer(keyCertChainFile, ...
java
public static SslContextBuilder forServer(File keyCertChainFile, File keyFile) { return configure(SslContextBuilder.forServer(keyCertChainFile, keyFile)); }
[ "public", "static", "SslContextBuilder", "forServer", "(", "File", "keyCertChainFile", ",", "File", "keyFile", ")", "{", "return", "configure", "(", "SslContextBuilder", ".", "forServer", "(", "keyCertChainFile", ",", "keyFile", ")", ")", ";", "}" ]
Creates a SslContextBuilder with ciphers and APN appropriate for gRPC. @see SslContextBuilder#forServer(File, File) @see #configure(SslContextBuilder)
[ "Creates", "a", "SslContextBuilder", "with", "ciphers", "and", "APN", "appropriate", "for", "gRPC", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/GrpcSslContexts.java#L129-L131
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java
PathBuilder.get
@SuppressWarnings("unchecked") public <A extends Comparable<?>> DateTimePath<A> get(DateTimePath<A> path) { """ Create a new DateTime path @param <A> @param path existing path @return property path """ DateTimePath<A> newPath = getDateTime(toString(path), (Class<A>) path.getType()); re...
java
@SuppressWarnings("unchecked") public <A extends Comparable<?>> DateTimePath<A> get(DateTimePath<A> path) { DateTimePath<A> newPath = getDateTime(toString(path), (Class<A>) path.getType()); return addMetadataOf(newPath, path); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "A", "extends", "Comparable", "<", "?", ">", ">", "DateTimePath", "<", "A", ">", "get", "(", "DateTimePath", "<", "A", ">", "path", ")", "{", "DateTimePath", "<", "A", ">", "newPath", "...
Create a new DateTime path @param <A> @param path existing path @return property path
[ "Create", "a", "new", "DateTime", "path" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L287-L291
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/ringsearch/AllRingsFinder.java
AllRingsFinder.findAllRingsInIsolatedRingSystem
public IRingSet findAllRingsInIsolatedRingSystem(IAtomContainer atomContainer, int maxRingSize) throws CDKException { """ Compute all rings up to an including the {@literal maxRingSize}. No pre-processing is done on the container. @param atomContainer the molecule to be searched for rings @param maxRingSize ...
java
public IRingSet findAllRingsInIsolatedRingSystem(IAtomContainer atomContainer, int maxRingSize) throws CDKException { final EdgeToBondMap edges = EdgeToBondMap.withSpaceFor(atomContainer); final int[][] graph = GraphUtil.toAdjList(atomContainer, edges); AllCycles ac = new AllCycles(graph, maxR...
[ "public", "IRingSet", "findAllRingsInIsolatedRingSystem", "(", "IAtomContainer", "atomContainer", ",", "int", "maxRingSize", ")", "throws", "CDKException", "{", "final", "EdgeToBondMap", "edges", "=", "EdgeToBondMap", ".", "withSpaceFor", "(", "atomContainer", ")", ";",...
Compute all rings up to an including the {@literal maxRingSize}. No pre-processing is done on the container. @param atomContainer the molecule to be searched for rings @param maxRingSize Maximum ring size to consider. Provides a possible breakout from recursion for complex compounds. @return a RingSet containing the...
[ "Compute", "all", "rings", "up", "to", "an", "including", "the", "{", "@literal", "maxRingSize", "}", ".", "No", "pre", "-", "processing", "is", "done", "on", "the", "container", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/ringsearch/AllRingsFinder.java#L183-L199
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Debug.java
Debug.getInstance
public static Debug getInstance(String option, String prefix) { """ Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be prefix. """ if (isOn(option)) { Debug d = new Debug(prefix); return d; } else { return null; ...
java
public static Debug getInstance(String option, String prefix) { if (isOn(option)) { Debug d = new Debug(prefix); return d; } else { return null; } }
[ "public", "static", "Debug", "getInstance", "(", "String", "option", ",", "String", "prefix", ")", "{", "if", "(", "isOn", "(", "option", ")", ")", "{", "Debug", "d", "=", "new", "Debug", "(", "prefix", ")", ";", "return", "d", ";", "}", "else", "{...
Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be prefix.
[ "Get", "a", "Debug", "object", "corresponding", "to", "whether", "or", "not", "the", "given", "option", "is", "set", ".", "Set", "the", "prefix", "to", "be", "prefix", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/Debug.java#L117-L125
Multifarious/MacroManager
src/main/java/com/fasterxml/mama/Cluster.java
Cluster.stopAndWait
public void stopAndWait(final long waitTime, final AtomicBoolean stopFlag) { """ For handling problematic nodes - drains workers and does not claim work for waitTime seconds """ if (!waitInProgress.getAndSet(true)) { stopFlag.set(true); rejoinExecutor.submit(new Runnable() { ...
java
public void stopAndWait(final long waitTime, final AtomicBoolean stopFlag) { if (!waitInProgress.getAndSet(true)) { stopFlag.set(true); rejoinExecutor.submit(new Runnable() { @Override public void run() { balancingPolicy.drainToCount(0,...
[ "public", "void", "stopAndWait", "(", "final", "long", "waitTime", ",", "final", "AtomicBoolean", "stopFlag", ")", "{", "if", "(", "!", "waitInProgress", ".", "getAndSet", "(", "true", ")", ")", "{", "stopFlag", ".", "set", "(", "true", ")", ";", "rejoin...
For handling problematic nodes - drains workers and does not claim work for waitTime seconds
[ "For", "handling", "problematic", "nodes", "-", "drains", "workers", "and", "does", "not", "claim", "work", "for", "waitTime", "seconds" ]
train
https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/Cluster.java#L421-L439
tobykurien/Xtendroid
Xtendroid/src/asia/sonix/android/orm/AbatisService.java
AbatisService.executeForMap
public Map<String, Object> executeForMap(int sqlId, Map<String, ? extends Object> bindParams) { """ 指定したSQLIDにparameterをmappingして、クエリする。結果mapを返却。 <p> mappingの時、parameterが足りない場合はnullを返す。 また、結果がない場合nullを返す。 </p> @param sqlId SQLID @param bindParams sql parameter @return Map<String, Object> result "...
java
public Map<String, Object> executeForMap(int sqlId, Map<String, ? extends Object> bindParams) { String sql = context.getResources().getString(sqlId); return executeForMap(sql, bindParams); }
[ "public", "Map", "<", "String", ",", "Object", ">", "executeForMap", "(", "int", "sqlId", ",", "Map", "<", "String", ",", "?", "extends", "Object", ">", "bindParams", ")", "{", "String", "sql", "=", "context", ".", "getResources", "(", ")", ".", "getSt...
指定したSQLIDにparameterをmappingして、クエリする。結果mapを返却。 <p> mappingの時、parameterが足りない場合はnullを返す。 また、結果がない場合nullを返す。 </p> @param sqlId SQLID @param bindParams sql parameter @return Map<String, Object> result
[ "指定したSQLIDにparameterをmappingして、クエリする。結果mapを返却。" ]
train
https://github.com/tobykurien/Xtendroid/blob/758bf1d06f4cf3b64f9c10632fe9c6fb30bcebd4/Xtendroid/src/asia/sonix/android/orm/AbatisService.java#L194-L197
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.setScalarizationValue
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { """ Sets the scalarization value of a solution. Used for for simplified static access. @param solution The solution whose scalarization value is set. @param scalarizationValue The scalarization...
java
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { solution.setAttribute(new ScalarizationValue<S>().getAttributeIdentifier(), scalarizationValue); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "setScalarizationValue", "(", "S", "solution", ",", "double", "scalarizationValue", ")", "{", "solution", ".", "setAttribute", "(", "new", "ScalarizationValue", "<", "S", ">", ...
Sets the scalarization value of a solution. Used for for simplified static access. @param solution The solution whose scalarization value is set. @param scalarizationValue The scalarization value of the solution.
[ "Sets", "the", "scalarization", "value", "of", "a", "solution", ".", "Used", "for", "for", "simplified", "static", "access", "." ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L30-L32
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, ForwardCurveInterface forwardCurve) { """ Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classic...
java
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, ForwardCurveInterface forwardCurve) { return getSwapAnnuity(new RegularSchedule(tenor), forwardCurve); }
[ "public", "static", "RandomVariable", "getSwapAnnuity", "(", "TimeDiscretization", "tenor", ",", "ForwardCurveInterface", "forwardCurve", ")", "{", "return", "getSwapAnnuity", "(", "new", "RegularSchedule", "(", "tenor", ")", ",", "forwardCurve", ")", ";", "}" ]
Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classical single curve interpretations of forwards and a default period length. The may be a crude approximation. @param ten...
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "single", "curve", "swap", "annuity", "for", "a", "given", "schedule", "and", "forward", "curve", ".", "The", "discount", "curve", "used", "to", "calculate", "the", "annuity", "is", "calculated", "f...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java#L72-L74
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetConnectorDefinitionResult.java
GetConnectorDefinitionResult.withTags
public GetConnectorDefinitionResult withTags(java.util.Map<String, String> tags) { """ The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public GetConnectorDefinitionResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "GetConnectorDefinitionResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "tags", "for", "the", "definition", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetConnectorDefinitionResult.java#L310-L313
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/AtomicGrowingSparseHashMatrix.java
AtomicGrowingSparseHashMatrix.getRowVector
private SparseDoubleVector getRowVector(int row, boolean shouldLock) { """ Returns the row vector, locking the data if {@code shouldLock} is {@code true}. """ int c = cols.get(); if (shouldLock) lockRow(row, c); // Ensure that the column data is up to date while (l...
java
private SparseDoubleVector getRowVector(int row, boolean shouldLock) { int c = cols.get(); if (shouldLock) lockRow(row, c); // Ensure that the column data is up to date while (lastVectorCacheUpdate.get() != modifications.get()) updateVectorCache(); int[]...
[ "private", "SparseDoubleVector", "getRowVector", "(", "int", "row", ",", "boolean", "shouldLock", ")", "{", "int", "c", "=", "cols", ".", "get", "(", ")", ";", "if", "(", "shouldLock", ")", "lockRow", "(", "row", ",", "c", ")", ";", "// Ensure that the c...
Returns the row vector, locking the data if {@code shouldLock} is {@code true}.
[ "Returns", "the", "row", "vector", "locking", "the", "data", "if", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/AtomicGrowingSparseHashMatrix.java#L332-L346
biojava/biojava
biojava-genome/src/main/java/org/biojava/nbio/genome/util/ChromosomeMappingTools.java
ChromosomeMappingTools.getCDSPosForChromosomeCoordinate
public static int getCDSPosForChromosomeCoordinate(int coordinate, GeneChromosomePosition chromosomePosition) { """ I have a genomic coordinate, where is it on the mRNA @param coordinate @param chromosomePosition @return """ if ( chromosomePosition.getOrientation() == '+') return getCDSPosForward(co...
java
public static int getCDSPosForChromosomeCoordinate(int coordinate, GeneChromosomePosition chromosomePosition) { if ( chromosomePosition.getOrientation() == '+') return getCDSPosForward(coordinate, chromosomePosition.getExonStarts(), chromosomePosition.getExonEnds(), chromosomePosition.getCdsStart()...
[ "public", "static", "int", "getCDSPosForChromosomeCoordinate", "(", "int", "coordinate", ",", "GeneChromosomePosition", "chromosomePosition", ")", "{", "if", "(", "chromosomePosition", ".", "getOrientation", "(", ")", "==", "'", "'", ")", "return", "getCDSPosForward",...
I have a genomic coordinate, where is it on the mRNA @param coordinate @param chromosomePosition @return
[ "I", "have", "a", "genomic", "coordinate", "where", "is", "it", "on", "the", "mRNA" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/util/ChromosomeMappingTools.java#L779-L793
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.getLinkedObjects
@SuppressWarnings("unchecked") public <P extends ParaObject> List<P> getLinkedObjects(ParaObject obj, String type2, Pager... pager) { """ Returns all objects linked to the given one. Only applicable to many-to-many relationships. @param <P> type of linked objects @param type2 type of linked objects to search fo...
java
@SuppressWarnings("unchecked") public <P extends ParaObject> List<P> getLinkedObjects(ParaObject obj, String type2, Pager... pager) { if (obj == null || obj.getId() == null || type2 == null) { return Collections.emptyList(); } String url = Utils.formatMessage("{0}/links/{1}", obj.getObjectURI(), type2); ret...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "getLinkedObjects", "(", "ParaObject", "obj", ",", "String", "type2", ",", "Pager", "...", "pager", ")", "{", "if", "(", "obj", "...
Returns all objects linked to the given one. Only applicable to many-to-many relationships. @param <P> type of linked objects @param type2 type of linked objects to search for @param obj the object to execute this method on @param pager a {@link com.erudika.para.utils.Pager} @return a list of linked objects
[ "Returns", "all", "objects", "linked", "to", "the", "given", "one", ".", "Only", "applicable", "to", "many", "-", "to", "-", "many", "relationships", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L958-L965
alkacon/opencms-core
src/org/opencms/ui/components/CmsResourceIcon.java
CmsResourceIcon.getSmallTypeIconHTML
private static String getSmallTypeIconHTML(String type, boolean isPageOverlay) { """ Returns the URI of the small resource type icon for the given type.<p> @param type the resource type name @param isPageOverlay <code>true</code> in case this is a page overlay and not a folder overlay @return the icon URI ...
java
private static String getSmallTypeIconHTML(String type, boolean isPageOverlay) { CmsExplorerTypeSettings typeSettings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type); if ((typeSettings == null) && LOG.isWarnEnabled()) { LOG.warn("Could not read explorer type settings for " + ty...
[ "private", "static", "String", "getSmallTypeIconHTML", "(", "String", "type", ",", "boolean", "isPageOverlay", ")", "{", "CmsExplorerTypeSettings", "typeSettings", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getExplorerTypeSetting", "(", "type", ")", ...
Returns the URI of the small resource type icon for the given type.<p> @param type the resource type name @param isPageOverlay <code>true</code> in case this is a page overlay and not a folder overlay @return the icon URI
[ "Returns", "the", "URI", "of", "the", "small", "resource", "type", "icon", "for", "the", "given", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsResourceIcon.java#L443-L473
Terracotta-OSS/offheap-store
src/main/java/org/terracotta/offheapstore/paging/OffHeapStorageArea.java
OffHeapStorageArea.readBuffer
public ByteBuffer readBuffer(long address, int length) { """ Read the given range and return the data as a single read-only {@code ByteBuffer}. @param address address to read from @param length number of bytes to read @return a read-only buffer """ ByteBuffer[] buffers = readBuffers(address, length); ...
java
public ByteBuffer readBuffer(long address, int length) { ByteBuffer[] buffers = readBuffers(address, length); if (buffers.length == 1) { return buffers[0]; } else { ByteBuffer copy = ByteBuffer.allocate(length); for (ByteBuffer b : buffers) { copy.put(b); } return ((Byt...
[ "public", "ByteBuffer", "readBuffer", "(", "long", "address", ",", "int", "length", ")", "{", "ByteBuffer", "[", "]", "buffers", "=", "readBuffers", "(", "address", ",", "length", ")", ";", "if", "(", "buffers", ".", "length", "==", "1", ")", "{", "ret...
Read the given range and return the data as a single read-only {@code ByteBuffer}. @param address address to read from @param length number of bytes to read @return a read-only buffer
[ "Read", "the", "given", "range", "and", "return", "the", "data", "as", "a", "single", "read", "-", "only", "{", "@code", "ByteBuffer", "}", "." ]
train
https://github.com/Terracotta-OSS/offheap-store/blob/600486cddb33c0247025c0cb69eff289eb6d7d93/src/main/java/org/terracotta/offheapstore/paging/OffHeapStorageArea.java#L214-L225
threerings/narya
core/src/main/java/com/threerings/presents/server/net/PresentsConnectionManager.java
PresentsConnectionManager.writeDatagram
protected boolean writeDatagram (PresentsConnection conn, byte[] data) { """ Sends a datagram to the specified connection. @return true if the datagram was sent, false if we failed to send for any reason. """ InetSocketAddress target = conn.getDatagramAddress(); if (target == null) { ...
java
protected boolean writeDatagram (PresentsConnection conn, byte[] data) { InetSocketAddress target = conn.getDatagramAddress(); if (target == null) { log.warning("No address to send datagram", "conn", conn); return false; } _databuf.clear(); _databuf.p...
[ "protected", "boolean", "writeDatagram", "(", "PresentsConnection", "conn", ",", "byte", "[", "]", "data", ")", "{", "InetSocketAddress", "target", "=", "conn", ".", "getDatagramAddress", "(", ")", ";", "if", "(", "target", "==", "null", ")", "{", "log", "...
Sends a datagram to the specified connection. @return true if the datagram was sent, false if we failed to send for any reason.
[ "Sends", "a", "datagram", "to", "the", "specified", "connection", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/net/PresentsConnectionManager.java#L556-L572
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java
ResolvableType.forMethodParameter
public static ResolvableType forMethodParameter(Method method, int parameterIndex) { """ Return a {@link ResolvableType} for the specified {@link Method} parameter. @param method the source method (must not be {@code null}) @param parameterIndex the parameter index @return a {@link ResolvableType} for the spe...
java
public static ResolvableType forMethodParameter(Method method, int parameterIndex) { LettuceAssert.notNull(method, "Method must not be null"); return forMethodParameter(new MethodParameter(method, parameterIndex)); }
[ "public", "static", "ResolvableType", "forMethodParameter", "(", "Method", "method", ",", "int", "parameterIndex", ")", "{", "LettuceAssert", ".", "notNull", "(", "method", ",", "\"Method must not be null\"", ")", ";", "return", "forMethodParameter", "(", "new", "Me...
Return a {@link ResolvableType} for the specified {@link Method} parameter. @param method the source method (must not be {@code null}) @param parameterIndex the parameter index @return a {@link ResolvableType} for the specified method parameter @see #forMethodParameter(Method, int, Class) @see #forMethodParameter(Meth...
[ "Return", "a", "{", "@link", "ResolvableType", "}", "for", "the", "specified", "{", "@link", "Method", "}", "parameter", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/support/ResolvableType.java#L949-L952
JodaOrg/joda-beans
src/main/java/org/joda/beans/impl/light/LightMetaBean.java
LightMetaBean.build
@Deprecated private T build(Constructor<T> constructor, Object[] args) { """ Creates an instance of the bean. @param constructor the constructor @param args the arguments @return the created instance @deprecated Use method handles version of this method """ try { return construc...
java
@Deprecated private T build(Constructor<T> constructor, Object[] args) { try { return constructor.newInstance(args); } catch (IllegalArgumentException | IllegalAccessException | InstantiationException ex) { throw new IllegalArgumentException( "Bean cannot...
[ "@", "Deprecated", "private", "T", "build", "(", "Constructor", "<", "T", ">", "constructor", ",", "Object", "[", "]", "args", ")", "{", "try", "{", "return", "constructor", ".", "newInstance", "(", "args", ")", ";", "}", "catch", "(", "IllegalArgumentEx...
Creates an instance of the bean. @param constructor the constructor @param args the arguments @return the created instance @deprecated Use method handles version of this method
[ "Creates", "an", "instance", "of", "the", "bean", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/impl/light/LightMetaBean.java#L197-L211
Coveros/selenified
src/main/java/com/coveros/selenified/element/Element.java
Element.cantScroll
private void cantScroll(Exception e, String action, String expected) { """ Generates and logs an error (with a screenshot), stating that the element was unable to be scrolled to @param e - the exception that was thrown @param action - what is the action occurring @param expected - what is the expect...
java
private void cantScroll(Exception e, String action, String expected) { log.warn(e); reporter.fail(action, expected, CANT_SCROLL + prettyOutputEnd() + e.getMessage()); }
[ "private", "void", "cantScroll", "(", "Exception", "e", ",", "String", "action", ",", "String", "expected", ")", "{", "log", ".", "warn", "(", "e", ")", ";", "reporter", ".", "fail", "(", "action", ",", "expected", ",", "CANT_SCROLL", "+", "prettyOutputE...
Generates and logs an error (with a screenshot), stating that the element was unable to be scrolled to @param e - the exception that was thrown @param action - what is the action occurring @param expected - what is the expected outcome of said action
[ "Generates", "and", "logs", "an", "error", "(", "with", "a", "screenshot", ")", "stating", "that", "the", "element", "was", "unable", "to", "be", "scrolled", "to" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L1100-L1103
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.voltConvertBinaryIntegerLiteral
private boolean voltConvertBinaryIntegerLiteral(Session session, Expression lhs, Expression rhs) { """ If one child is an integer, and the other is a VARBINARY literal, try to convert the literal to an integer. """ Expression nonIntegralExpr; int whichChild; if (lhs.dataType.isIntegral...
java
private boolean voltConvertBinaryIntegerLiteral(Session session, Expression lhs, Expression rhs) { Expression nonIntegralExpr; int whichChild; if (lhs.dataType.isIntegralType()) { nonIntegralExpr = rhs; whichChild = RIGHT; } else if (rhs.dataType.isIntegra...
[ "private", "boolean", "voltConvertBinaryIntegerLiteral", "(", "Session", "session", ",", "Expression", "lhs", ",", "Expression", "rhs", ")", "{", "Expression", "nonIntegralExpr", ";", "int", "whichChild", ";", "if", "(", "lhs", ".", "dataType", ".", "isIntegralTyp...
If one child is an integer, and the other is a VARBINARY literal, try to convert the literal to an integer.
[ "If", "one", "child", "is", "an", "integer", "and", "the", "other", "is", "a", "VARBINARY", "literal", "try", "to", "convert", "the", "literal", "to", "an", "integer", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L1739-L1754
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/ClientBuilder.java
ClientBuilder.iamApiKey
public ClientBuilder iamApiKey(String iamApiKey, String iamServerClientId, String iamServerClientSecret) { """ Sets the <a href="https://console.bluemix.net/docs/services/Cloudant/guides/iam.html#ibm-cloud-identity-and-access-management" target="_blank">IAM</a> API key for the ...
java
public ClientBuilder iamApiKey(String iamApiKey, String iamServerClientId, String iamServerClientSecret) { this.iamApiKey = iamApiKey; this.iamServerClientId = iamServerClientId; this.iamServerClientSecret = iamServerClientSecret; return this; }
[ "public", "ClientBuilder", "iamApiKey", "(", "String", "iamApiKey", ",", "String", "iamServerClientId", ",", "String", "iamServerClientSecret", ")", "{", "this", ".", "iamApiKey", "=", "iamApiKey", ";", "this", ".", "iamServerClientId", "=", "iamServerClientId", ";"...
Sets the <a href="https://console.bluemix.net/docs/services/Cloudant/guides/iam.html#ibm-cloud-identity-and-access-management" target="_blank">IAM</a> API key for the client connection. Also allows a client ID and secret to be specified for use when authenticating with the IAM token server. <P> Example creating a {@lin...
[ "Sets", "the", "<a", "href", "=", "https", ":", "//", "console", ".", "bluemix", ".", "net", "/", "docs", "/", "services", "/", "Cloudant", "/", "guides", "/", "iam", ".", "html#ibm", "-", "cloud", "-", "identity", "-", "and", "-", "access", "-", "...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/ClientBuilder.java#L837-L843
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getIntent
public IntentClassifier getIntent(UUID appId, String versionId, UUID intentId) { """ Gets information about the intent model. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier ID. @throws IllegalArgumentException thrown if parameters fail the validation ...
java
public IntentClassifier getIntent(UUID appId, String versionId, UUID intentId) { return getIntentWithServiceResponseAsync(appId, versionId, intentId).toBlocking().single().body(); }
[ "public", "IntentClassifier", "getIntent", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "intentId", ")", "{", "return", "getIntentWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "intentId", ")", ".", "toBlocking", "(", ")", ".",...
Gets information about the intent model. @param appId The application ID. @param versionId The version ID. @param intentId The intent classifier ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeExcept...
[ "Gets", "information", "about", "the", "intent", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2818-L2820
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/discrim/SingleDiscriminatorAlgorithm.java
SingleDiscriminatorAlgorithm.discriminate
public int discriminate(VirtualConnection vc, Object discrimData, ConnectionLink prevChannelLink) { """ Use a VirtualConnection rather than a InboundVirtualConnection for discrimination """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "discriminate: " + vc...
java
public int discriminate(VirtualConnection vc, Object discrimData, ConnectionLink prevChannelLink) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "discriminate: " + vc); } ConnectionLink nextChannelLink = nextChannel.getConnectionLink(vc); pr...
[ "public", "int", "discriminate", "(", "VirtualConnection", "vc", ",", "Object", "discrimData", ",", "ConnectionLink", "prevChannelLink", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")"...
Use a VirtualConnection rather than a InboundVirtualConnection for discrimination
[ "Use", "a", "VirtualConnection", "rather", "than", "a", "InboundVirtualConnection", "for", "discrimination" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/discrim/SingleDiscriminatorAlgorithm.java#L57-L65
xiaolongzuo/niubi-job
niubi-job-framework/niubi-job-scheduler/src/main/java/com/zuoxiaolong/niubi/job/scheduler/JobEnvironmentCache.java
JobEnvironmentCache.findScheduleJobDescriptor
public ScheduleJobDescriptor findScheduleJobDescriptor(String jarFilePath, String group, String name) { """ 查找可调度的任务描述符 @param jarFilePath jar包路径 @param group 组名 @param name 名称 @return 若找到则返回一个ScheduleJobDescriptor实例,否则抛出异常 """ List<JobDescriptor> jobDescriptorList = jobDescriptorListMap.get(jarF...
java
public ScheduleJobDescriptor findScheduleJobDescriptor(String jarFilePath, String group, String name) { List<JobDescriptor> jobDescriptorList = jobDescriptorListMap.get(jarFilePath); if (jobDescriptorList == null) { throw new NiubiException(new IllegalStateException("job descriptor list can'...
[ "public", "ScheduleJobDescriptor", "findScheduleJobDescriptor", "(", "String", "jarFilePath", ",", "String", "group", ",", "String", "name", ")", "{", "List", "<", "JobDescriptor", ">", "jobDescriptorList", "=", "jobDescriptorListMap", ".", "get", "(", "jarFilePath", ...
查找可调度的任务描述符 @param jarFilePath jar包路径 @param group 组名 @param name 名称 @return 若找到则返回一个ScheduleJobDescriptor实例,否则抛出异常
[ "查找可调度的任务描述符" ]
train
https://github.com/xiaolongzuo/niubi-job/blob/ed21d5b80f8b16c8b3a0b2fbc688442b878edbe4/niubi-job-framework/niubi-job-scheduler/src/main/java/com/zuoxiaolong/niubi/job/scheduler/JobEnvironmentCache.java#L85-L96
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIPath
public static String modifyURIPath(String uri, String newPath) { """ Helper method for modiffying the URI path @param uri @param newPath @return """ try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPath(uriObj, newPath)); } catch (URISynta...
java
public static String modifyURIPath(String uri, String newPath) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPath(uriObj, newPath)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyUR...
[ "public", "static", "String", "modifyURIPath", "(", "String", "uri", ",", "String", "newPath", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "return", "uriToString", "(", "URLUtils", ".", "modifyURIPath", "(", "uriObj", ...
Helper method for modiffying the URI path @param uri @param newPath @return
[ "Helper", "method", "for", "modiffying", "the", "URI", "path" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L356-L369
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriPathSegment
public static String escapeUriPathSegment(final String text, final String encoding) { """ <p> Perform am URI path segment <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> The following are the only allowed chars in an URI path segment (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0...
java
public static String escapeUriPathSegment(final String text, final String encoding) { if (encoding == null) { throw new IllegalArgumentException("Argument 'encoding' cannot be null"); } return UriEscapeUtil.escape(text, UriEscapeUtil.UriEscapeType.PATH_SEGMENT, encoding); }
[ "public", "static", "String", "escapeUriPathSegment", "(", "final", "String", "text", ",", "final", "String", "encoding", ")", "{", "if", "(", "encoding", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'encoding' cannot be null\...
<p> Perform am URI path segment <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> The following are the only allowed chars in an URI path segment (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></li> <li><tt>- . _ ~</tt></li> <li><tt>! $ &amp; ' ( ) * + , ; =</tt></li> <li><tt>: @</tt></li...
[ "<p", ">", "Perform", "am", "URI", "path", "segment", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "The", "following", "are", "the", "only...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L252-L257
awltech/org.parallelj
parallelj-legacy-launching-parent/parallelj-legacy-launching-api/src/main/java/org/parallelj/launching/quartz/Launcher.java
Launcher.newLaunch
public synchronized Launch newLaunch(final Class<?> jobClass, ExecutorService executorService) throws LaunchException { """ Create a new instance of Launch. @param jobClass The Program Adapter class. @param executorService The ExecutorService instance to use. @return An instance of Launch. @throws LaunchEx...
java
public synchronized Launch newLaunch(final Class<?> jobClass, ExecutorService executorService) throws LaunchException { return new Launch(jobClass, executorService); }
[ "public", "synchronized", "Launch", "newLaunch", "(", "final", "Class", "<", "?", ">", "jobClass", ",", "ExecutorService", "executorService", ")", "throws", "LaunchException", "{", "return", "new", "Launch", "(", "jobClass", ",", "executorService", ")", ";", "}"...
Create a new instance of Launch. @param jobClass The Program Adapter class. @param executorService The ExecutorService instance to use. @return An instance of Launch. @throws LaunchException
[ "Create", "a", "new", "instance", "of", "Launch", "." ]
train
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-legacy-launching-parent/parallelj-legacy-launching-api/src/main/java/org/parallelj/launching/quartz/Launcher.java#L82-L84
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/StoredBlock.java
StoredBlock.deserializeCompact
public static StoredBlock deserializeCompact(NetworkParameters params, ByteBuffer buffer) throws ProtocolException { """ De-serializes the stored block from a custom packed format. Used by {@link CheckpointManager}. """ byte[] chainWorkBytes = new byte[StoredBlock.CHAIN_WORK_BYTES]; buffer.get(...
java
public static StoredBlock deserializeCompact(NetworkParameters params, ByteBuffer buffer) throws ProtocolException { byte[] chainWorkBytes = new byte[StoredBlock.CHAIN_WORK_BYTES]; buffer.get(chainWorkBytes); BigInteger chainWork = new BigInteger(1, chainWorkBytes); int height = buffer.g...
[ "public", "static", "StoredBlock", "deserializeCompact", "(", "NetworkParameters", "params", ",", "ByteBuffer", "buffer", ")", "throws", "ProtocolException", "{", "byte", "[", "]", "chainWorkBytes", "=", "new", "byte", "[", "StoredBlock", ".", "CHAIN_WORK_BYTES", "]...
De-serializes the stored block from a custom packed format. Used by {@link CheckpointManager}.
[ "De", "-", "serializes", "the", "stored", "block", "from", "a", "custom", "packed", "format", ".", "Used", "by", "{" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/StoredBlock.java#L135-L143
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.escapeHtml4Xml
public static void escapeHtml4Xml(final String text, final Writer writer) throws IOException { """ <p> Perform an HTML 4 level 1 (XML-style) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only esc...
java
public static void escapeHtml4Xml(final String text, final Writer writer) throws IOException { escapeHtml(text, writer, HtmlEscapeType.HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL, HtmlEscapeLevel.LEVEL_1_ONLY_MARKUP_SIGNIFICANT); }
[ "public", "static", "void", "escapeHtml4Xml", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeHtml", "(", "text", ",", "writer", ",", "HtmlEscapeType", ".", "HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL", ",",...
<p> Perform an HTML 4 level 1 (XML-style) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only escape the five markup-significant characters: <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&amp;</tt>, <tt>&quot;</tt> and <tt>&#39;</...
[ "<p", ">", "Perform", "an", "HTML", "4", "level", "1", "(", "XML", "-", "style", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L539-L543
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.findInt
public static final int findInt(CharSequence cs, int radix, int beginIndex, int endIndex) { """ Parses next int @param cs @param radix @param beginIndex @param endIndex @return """ IntPredicate predicate = null; switch (radix) { case 8: predicate = ...
java
public static final int findInt(CharSequence cs, int radix, int beginIndex, int endIndex) { IntPredicate predicate = null; switch (radix) { case 8: predicate = Primitives::isOctalDigit; break; case 10: predicate...
[ "public", "static", "final", "int", "findInt", "(", "CharSequence", "cs", ",", "int", "radix", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "IntPredicate", "predicate", "=", "null", ";", "switch", "(", "radix", ")", "{", "case", "8", ":", ...
Parses next int @param cs @param radix @param beginIndex @param endIndex @return
[ "Parses", "next", "int" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1563-L1583
Stratio/bdt
src/main/java/com/stratio/qa/utils/GosecSSOUtils.java
GosecSSOUtils.ssoTokenGenerator
public HashMap<String, String> ssoTokenGenerator() throws Exception { """ This method provide dcos and sso token to be used to generate client cookie @return cookieToken list of token generated @throws Exception exception """ String protocol = "https://"; HashMap<String, String> cookieToken =...
java
public HashMap<String, String> ssoTokenGenerator() throws Exception { String protocol = "https://"; HashMap<String, String> cookieToken = new HashMap<>(); SSLContext sslContext = SSLContext.getInstance("SSL"); // set up a TrustManager that trusts everything sslContext.init(null,...
[ "public", "HashMap", "<", "String", ",", "String", ">", "ssoTokenGenerator", "(", ")", "throws", "Exception", "{", "String", "protocol", "=", "\"https://\"", ";", "HashMap", "<", "String", ",", "String", ">", "cookieToken", "=", "new", "HashMap", "<>", "(", ...
This method provide dcos and sso token to be used to generate client cookie @return cookieToken list of token generated @throws Exception exception
[ "This", "method", "provide", "dcos", "and", "sso", "token", "to", "be", "used", "to", "generate", "client", "cookie" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/utils/GosecSSOUtils.java#L72-L132
microfocus-idol/java-content-parameter-api
src/main/java/com/hp/autonomy/aci/content/identifier/stateid/StateId.java
StateId.forRange
public StateId forRange(final StateRange range) { """ Convenience method for creating a StateId that has the same token as {@code this} but with the specified range. If {@code this} already has the correct range it will just be returned. @param range The index range @return A {@code StateId} with the specifie...
java
public StateId forRange(final StateRange range) { if (getRange().equals(range)) { return this; } return new StateId(stateToken, range); }
[ "public", "StateId", "forRange", "(", "final", "StateRange", "range", ")", "{", "if", "(", "getRange", "(", ")", ".", "equals", "(", "range", ")", ")", "{", "return", "this", ";", "}", "return", "new", "StateId", "(", "stateToken", ",", "range", ")", ...
Convenience method for creating a StateId that has the same token as {@code this} but with the specified range. If {@code this} already has the correct range it will just be returned. @param range The index range @return A {@code StateId} with the specified range
[ "Convenience", "method", "for", "creating", "a", "StateId", "that", "has", "the", "same", "token", "as", "{", "@code", "this", "}", "but", "with", "the", "specified", "range", ".", "If", "{", "@code", "this", "}", "already", "has", "the", "correct", "ran...
train
https://github.com/microfocus-idol/java-content-parameter-api/blob/8d33dc633f8df2a470a571ac7694e423e7004ad0/src/main/java/com/hp/autonomy/aci/content/identifier/stateid/StateId.java#L145-L151
jhy/jsoup
src/main/java/org/jsoup/nodes/DataNode.java
DataNode.createFromEncoded
public static DataNode createFromEncoded(String encodedData, String baseUri) { """ Create a new DataNode from HTML encoded data. @param encodedData encoded data @param baseUri bass URI @return new DataNode """ String data = Entities.unescape(encodedData); return new DataNode(data); }
java
public static DataNode createFromEncoded(String encodedData, String baseUri) { String data = Entities.unescape(encodedData); return new DataNode(data); }
[ "public", "static", "DataNode", "createFromEncoded", "(", "String", "encodedData", ",", "String", "baseUri", ")", "{", "String", "data", "=", "Entities", ".", "unescape", "(", "encodedData", ")", ";", "return", "new", "DataNode", "(", "data", ")", ";", "}" ]
Create a new DataNode from HTML encoded data. @param encodedData encoded data @param baseUri bass URI @return new DataNode
[ "Create", "a", "new", "DataNode", "from", "HTML", "encoded", "data", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/DataNode.java#L68-L71
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementBase.java
ElementBase.notifyChildren
public void notifyChildren(String eventName, Object eventData, boolean recurse) { """ Allows a parent element to notify its children of an event of interest. @param eventName Name of the event. @param eventData Data associated with the event. @param recurse If true, recurse over all child levels. """ ...
java
public void notifyChildren(String eventName, Object eventData, boolean recurse) { notifyChildren(this, eventName, eventData, recurse); }
[ "public", "void", "notifyChildren", "(", "String", "eventName", ",", "Object", "eventData", ",", "boolean", "recurse", ")", "{", "notifyChildren", "(", "this", ",", "eventName", ",", "eventData", ",", "recurse", ")", ";", "}" ]
Allows a parent element to notify its children of an event of interest. @param eventName Name of the event. @param eventData Data associated with the event. @param recurse If true, recurse over all child levels.
[ "Allows", "a", "parent", "element", "to", "notify", "its", "children", "of", "an", "event", "of", "interest", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementBase.java#L1012-L1014
floragunncom/search-guard
src/main/java/com/floragunn/searchguard/support/WildcardMatcher.java
WildcardMatcher.matchAny
public static boolean matchAny(final String pattern, final String[] candidate, boolean ignoreCase) { """ return true if at least one candidate matches the given pattern @param pattern @param candidate @param ignoreCase @return """ for (int i = 0; i < candidate.length; i++) { final St...
java
public static boolean matchAny(final String pattern, final String[] candidate, boolean ignoreCase) { for (int i = 0; i < candidate.length; i++) { final String string = candidate[i]; if (match(pattern, string, ignoreCase)) { return true; } } r...
[ "public", "static", "boolean", "matchAny", "(", "final", "String", "pattern", ",", "final", "String", "[", "]", "candidate", ",", "boolean", "ignoreCase", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "candidate", ".", "length", ";", "i", ...
return true if at least one candidate matches the given pattern @param pattern @param candidate @param ignoreCase @return
[ "return", "true", "if", "at", "least", "one", "candidate", "matches", "the", "given", "pattern" ]
train
https://github.com/floragunncom/search-guard/blob/f9828004e11dc0e4b6da4dead1fafcf3be8f7f6d/src/main/java/com/floragunn/searchguard/support/WildcardMatcher.java#L168-L178
FasterXML/woodstox
src/main/java/com/ctc/wstx/sw/RepairingNsStreamWriter.java
RepairingNsStreamWriter.findElemPrefix
protected final String findElemPrefix(String nsURI, SimpleOutputElement elem) throws XMLStreamException { """ Method called to find an existing prefix for the given namespace, if any exists in the scope. If one is found, it's returned (including "" for the current default namespace); if not, null is retu...
java
protected final String findElemPrefix(String nsURI, SimpleOutputElement elem) throws XMLStreamException { /* Special case: empty NS URI can only be bound to the empty * prefix... */ if (nsURI == null || nsURI.length() == 0) { String currDefNsURI = elem.getDefaul...
[ "protected", "final", "String", "findElemPrefix", "(", "String", "nsURI", ",", "SimpleOutputElement", "elem", ")", "throws", "XMLStreamException", "{", "/* Special case: empty NS URI can only be bound to the empty\n * prefix...\n */", "if", "(", "nsURI", "==", "...
Method called to find an existing prefix for the given namespace, if any exists in the scope. If one is found, it's returned (including "" for the current default namespace); if not, null is returned. @param nsURI URI of namespace for which we need a prefix
[ "Method", "called", "to", "find", "an", "existing", "prefix", "for", "the", "given", "namespace", "if", "any", "exists", "in", "the", "scope", ".", "If", "one", "is", "found", "it", "s", "returned", "(", "including", "for", "the", "current", "default", "...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sw/RepairingNsStreamWriter.java#L475-L490
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/Scenario2DPortrayal.java
Scenario2DPortrayal.situateDevice
public void situateDevice(Device d, double x, double y) { """ To place a device in the simulation @param d @param x @param y """ devices.setObjectLocation(d, new Double2D(x, y)); }
java
public void situateDevice(Device d, double x, double y) { devices.setObjectLocation(d, new Double2D(x, y)); }
[ "public", "void", "situateDevice", "(", "Device", "d", ",", "double", "x", ",", "double", "y", ")", "{", "devices", ".", "setObjectLocation", "(", "d", ",", "new", "Double2D", "(", "x", ",", "y", ")", ")", ";", "}" ]
To place a device in the simulation @param d @param x @param y
[ "To", "place", "a", "device", "in", "the", "simulation" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/Scenario2DPortrayal.java#L181-L183
bohnman/squiggly-java
src/main/java/com/github/bohnman/squiggly/util/SquigglyUtils.java
SquigglyUtils.stringify
public static String stringify(ObjectMapper mapper, Object object) { """ Takes an object and converts it to a string. @param mapper the object mapper @param object the object to convert @return json string """ try { return mapper.writeValueAsString(object); } catch (JsonProcess...
java
public static String stringify(ObjectMapper mapper, Object object) { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new IllegalArgumentException(e); } }
[ "public", "static", "String", "stringify", "(", "ObjectMapper", "mapper", ",", "Object", "object", ")", "{", "try", "{", "return", "mapper", ".", "writeValueAsString", "(", "object", ")", ";", "}", "catch", "(", "JsonProcessingException", "e", ")", "{", "thr...
Takes an object and converts it to a string. @param mapper the object mapper @param object the object to convert @return json string
[ "Takes", "an", "object", "and", "converts", "it", "to", "a", "string", "." ]
train
https://github.com/bohnman/squiggly-java/blob/ba0c0b924ab718225d1ad180273ee63ea6c4f55a/src/main/java/com/github/bohnman/squiggly/util/SquigglyUtils.java#L241-L247
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getMapInfo
public void getMapInfo(int[] ids, Callback<List<MapOverview>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on map API go <a href="https://wiki.guildwars2.com/wiki/API:2/mailcarriers">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Call...
java
public void getMapInfo(int[] ids, Callback<List<MapOverview>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getMapInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getMapInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "MapOverview", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids",...
For more info on map API go <a href="https://wiki.guildwars2.com/wiki/API:2/mailcarriers">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of map id @param callback callback that is goi...
[ "For", "more", "info", "on", "map", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "mailcarriers", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1805-L1808
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java
MapperConstructorAccessor.searchConfig
protected ChooseConfig searchConfig(ChooseConfig cc, XML xml) { """ This method finds the configuration location, returns null if don't finds it @param cc configuration chosen @param xml xml object @return configuration found """ ChooseConfig config = searchXmlConfig(cc, xml); if(isN...
java
protected ChooseConfig searchConfig(ChooseConfig cc, XML xml){ ChooseConfig config = searchXmlConfig(cc, xml); if(isNull(config))config = searchAnnotatedConfig(cc); return config; }
[ "protected", "ChooseConfig", "searchConfig", "(", "ChooseConfig", "cc", ",", "XML", "xml", ")", "{", "ChooseConfig", "config", "=", "searchXmlConfig", "(", "cc", ",", "xml", ")", ";", "if", "(", "isNull", "(", "config", ")", ")", "config", "=", "searchAnno...
This method finds the configuration location, returns null if don't finds it @param cc configuration chosen @param xml xml object @return configuration found
[ "This", "method", "finds", "the", "configuration", "location", "returns", "null", "if", "don", "t", "finds", "it" ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructorAccessor.java#L88-L93
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.centerMovedTo
public void centerMovedTo(double lat, double lon) { """ called when the user has moved the map. the coordinates are EPSG:4326 (WGS) values. The arguments are double primitives and no Double objects. @param lat new latitude value @param lon new longitude value """ final Coordinate newCenter =...
java
public void centerMovedTo(double lat, double lon) { final Coordinate newCenter = new Coordinate(lat, lon); if (logger.isTraceEnabled()) { logger.trace("JS reports center value {}", newCenter); } lastCoordinateFromMap.set(newCenter); setCenter(n...
[ "public", "void", "centerMovedTo", "(", "double", "lat", ",", "double", "lon", ")", "{", "final", "Coordinate", "newCenter", "=", "new", "Coordinate", "(", "lat", ",", "lon", ")", ";", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "lo...
called when the user has moved the map. the coordinates are EPSG:4326 (WGS) values. The arguments are double primitives and no Double objects. @param lat new latitude value @param lon new longitude value
[ "called", "when", "the", "user", "has", "moved", "the", "map", ".", "the", "coordinates", "are", "EPSG", ":", "4326", "(", "WGS", ")", "values", ".", "The", "arguments", "are", "double", "primitives", "and", "no", "Double", "objects", "." ]
train
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1300-L1307
revelytix/spark
spark-http-client/src/main/java/spark/protocol/parser/XMLResultsParser.java
XMLResultsParser.nameIs
static final boolean nameIs(XMLStreamReader rdr, Element elt) { """ Convenience method to test if the current local name is the same as an expected element. @param rdr The XMLStreamReader to get the current state from. @param elt The element to test against. @return <code>true</code> iff the current local name ...
java
static final boolean nameIs(XMLStreamReader rdr, Element elt) { return rdr.getLocalName().equalsIgnoreCase(elt.name()); }
[ "static", "final", "boolean", "nameIs", "(", "XMLStreamReader", "rdr", ",", "Element", "elt", ")", "{", "return", "rdr", ".", "getLocalName", "(", ")", ".", "equalsIgnoreCase", "(", "elt", ".", "name", "(", ")", ")", ";", "}" ]
Convenience method to test if the current local name is the same as an expected element. @param rdr The XMLStreamReader to get the current state from. @param elt The element to test against. @return <code>true</code> iff the current local name is the same as the element name.
[ "Convenience", "method", "to", "test", "if", "the", "current", "local", "name", "is", "the", "same", "as", "an", "expected", "element", "." ]
train
https://github.com/revelytix/spark/blob/d777d40c962bc66fdc04b7c3a66d20b777ff6fb4/spark-http-client/src/main/java/spark/protocol/parser/XMLResultsParser.java#L271-L273
structr/structr
structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java
HtmlServlet.findNodeByUuid
private AbstractNode findNodeByUuid(final SecurityContext securityContext, final String uuid) throws FrameworkException { """ Find node by uuid @param securityContext @param request @param uuid @return node @throws FrameworkException """ if (!uuid.isEmpty()) { logger.debug("Requested id: {}", uui...
java
private AbstractNode findNodeByUuid(final SecurityContext securityContext, final String uuid) throws FrameworkException { if (!uuid.isEmpty()) { logger.debug("Requested id: {}", uuid); return (AbstractNode) StructrApp.getInstance(securityContext).getNodeById(uuid); } return null; }
[ "private", "AbstractNode", "findNodeByUuid", "(", "final", "SecurityContext", "securityContext", ",", "final", "String", "uuid", ")", "throws", "FrameworkException", "{", "if", "(", "!", "uuid", ".", "isEmpty", "(", ")", ")", "{", "logger", ".", "debug", "(", ...
Find node by uuid @param securityContext @param request @param uuid @return node @throws FrameworkException
[ "Find", "node", "by", "uuid" ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java#L1004-L1014
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java
ChineseCalendar.handleComputeMonthStart
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) { """ Return the Julian day number of day before the first day of the given month in the given extended year. <p>Note: This method reads the IS_LEAP_MONTH field to determine whether the given month is a leap month. @param eyear the...
java
protected int handleComputeMonthStart(int eyear, int month, boolean useMonth) { // If the month is out of range, adjust it into range, and // modify the extended year value accordingly. if (month < 0 || month > 11) { int[] rem = new int[1]; eyear += floorDivide(month, 12...
[ "protected", "int", "handleComputeMonthStart", "(", "int", "eyear", ",", "int", "month", ",", "boolean", "useMonth", ")", "{", "// If the month is out of range, adjust it into range, and", "// modify the extended year value accordingly.", "if", "(", "month", "<", "0", "||",...
Return the Julian day number of day before the first day of the given month in the given extended year. <p>Note: This method reads the IS_LEAP_MONTH field to determine whether the given month is a leap month. @param eyear the extended year @param month the zero-based month. The month is also determined by reading the...
[ "Return", "the", "Julian", "day", "number", "of", "day", "before", "the", "first", "day", "of", "the", "given", "month", "in", "the", "given", "extended", "year", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L954-L993
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeReviewEvaluatorLegacy.java
CodeReviewEvaluatorLegacy.getErrorResponse
protected CodeReviewAuditResponse getErrorResponse(CollectorItem repoItem, String scmBranch, String scmUrl) { """ Return an empty response in error situation @param repoItem the repo item @param scmBranch the scrm branch @param scmUrl the scm url @return code review audit response """ CodeRev...
java
protected CodeReviewAuditResponse getErrorResponse(CollectorItem repoItem, String scmBranch, String scmUrl) { CodeReviewAuditResponse noPRsCodeReviewAuditResponse = new CodeReviewAuditResponse(); noPRsCodeReviewAuditResponse.addAuditStatus(COLLECTOR_ITEM_ERROR); noPRsCodeReviewAuditResponse.set...
[ "protected", "CodeReviewAuditResponse", "getErrorResponse", "(", "CollectorItem", "repoItem", ",", "String", "scmBranch", ",", "String", "scmUrl", ")", "{", "CodeReviewAuditResponse", "noPRsCodeReviewAuditResponse", "=", "new", "CodeReviewAuditResponse", "(", ")", ";", "n...
Return an empty response in error situation @param repoItem the repo item @param scmBranch the scrm branch @param scmUrl the scm url @return code review audit response
[ "Return", "an", "empty", "response", "in", "error", "situation" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeReviewEvaluatorLegacy.java#L69-L78
liferay/com-liferay-commerce
commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java
CommerceCurrencyPersistenceImpl.findByG_P_A
@Override public List<CommerceCurrency> findByG_P_A(long groupId, boolean primary, boolean active, int start, int end) { """ Returns a range of all the commerce currencies where groupId = &#63; and primary = &#63; and active = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start...
java
@Override public List<CommerceCurrency> findByG_P_A(long groupId, boolean primary, boolean active, int start, int end) { return findByG_P_A(groupId, primary, active, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceCurrency", ">", "findByG_P_A", "(", "long", "groupId", ",", "boolean", "primary", ",", "boolean", "active", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_P_A", "(", "groupId", ",", "pr...
Returns a range of all the commerce currencies where groupId = &#63; and primary = &#63; and active = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "currencies", "where", "groupId", "=", "&#63", ";", "and", "primary", "=", "&#63", ";", "and", "active", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L3391-L3395
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/resources/uac/RoleResource1.java
RoleResource1.updateRole
@PUT @Path(" { """ RESTful endpoint for updating a role. Note that all attributes of the role will be updated to match the provided object. """group}/{id}") @Consumes(MediaType.APPLICATION_JSON) public SuccessResponse updateRole(@PathParam("group") String group, @PathParam("id") String id, ...
java
@PUT @Path("{group}/{id}") @Consumes(MediaType.APPLICATION_JSON) public SuccessResponse updateRole(@PathParam("group") String group, @PathParam("id") String id, EmoRole role, final @Authenticated Subject subject) { checkArgument(role.getId().equals(new EmoRoleKe...
[ "@", "PUT", "@", "Path", "(", "\"{group}/{id}\"", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "public", "SuccessResponse", "updateRole", "(", "@", "PathParam", "(", "\"group\"", ")", "String", "group", ",", "@", "PathParam", "(", "\...
RESTful endpoint for updating a role. Note that all attributes of the role will be updated to match the provided object.
[ "RESTful", "endpoint", "for", "updating", "a", "role", ".", "Note", "that", "all", "attributes", "of", "the", "role", "will", "be", "updated", "to", "match", "the", "provided", "object", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/resources/uac/RoleResource1.java#L116-L131
HeidelTime/heideltime
src/jmaxent/Dictionary.java
Dictionary.addDict
public void addDict(int cp, int label, int count) { """ Adds the dict. @param cp the cp @param label the label @param count the count """ Element elem = (Element)dict.get(new Integer(cp)); if (elem == null) { // if the context predicate is not found elem = new Element(); elem.count = co...
java
public void addDict(int cp, int label, int count) { Element elem = (Element)dict.get(new Integer(cp)); if (elem == null) { // if the context predicate is not found elem = new Element(); elem.count = count; CountFIdx cntFIdx = new CountFIdx(count, -1); elem.lbCntFidxes.put(new Integer(...
[ "public", "void", "addDict", "(", "int", "cp", ",", "int", "label", ",", "int", "count", ")", "{", "Element", "elem", "=", "(", "Element", ")", "dict", ".", "get", "(", "new", "Integer", "(", "cp", ")", ")", ";", "if", "(", "elem", "==", "null", ...
Adds the dict. @param cp the cp @param label the label @param count the count
[ "Adds", "the", "dict", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jmaxent/Dictionary.java#L202-L231
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeGeneralizedTime
public static int encodeGeneralizedTime(Date date, ByteBuffer buf) { """ Encode an ASN.1 GeneralizedTime. @param date the date value @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data """ if (date == null) { ...
java
public static int encodeGeneralizedTime(Date date, ByteBuffer buf) { if (date == null) { throw new IllegalArgumentException(); } int pos = buf.position(); SimpleDateFormat format = new SimpleDateFormat(GENERALIZED_TIME_FORMAT); format.setTimeZone(TimeZone.getTimeZone...
[ "public", "static", "int", "encodeGeneralizedTime", "(", "Date", "date", ",", "ByteBuffer", "buf", ")", "{", "if", "(", "date", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "pos", "=", "buf", ".", "positi...
Encode an ASN.1 GeneralizedTime. @param date the date value @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "GeneralizedTime", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L279-L297
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/Medias.java
Medias.getFilesByExtensionRecursive
private static void getFilesByExtensionRecursive(Collection<Media> filesList, Media path, String extension) { """ Get all files existing in the path considering the extension. @param filesList The files list. @param path The path to check. @param extension The extension (without dot; eg: png). """ ...
java
private static void getFilesByExtensionRecursive(Collection<Media> filesList, Media path, String extension) { for (final Media content : path.getMedias()) { if (extension.equals(UtilFile.getExtension(content.getPath()))) { filesList.add(content); ...
[ "private", "static", "void", "getFilesByExtensionRecursive", "(", "Collection", "<", "Media", ">", "filesList", ",", "Media", "path", ",", "String", "extension", ")", "{", "for", "(", "final", "Media", "content", ":", "path", ".", "getMedias", "(", ")", ")",...
Get all files existing in the path considering the extension. @param filesList The files list. @param path The path to check. @param extension The extension (without dot; eg: png).
[ "Get", "all", "files", "existing", "in", "the", "path", "considering", "the", "extension", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/Medias.java#L312-L321
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Scanners.java
Scanners.nestableBlockComment
public static Parser<Void> nestableBlockComment( Parser<?> begin, Parser<?> end, Parser<?> commented) { """ A scanner for a nestable block comment that starts with {@code begin} and ends with {@code end}. @param begin starts a block comment @param end ends a block comment @param commented the commented...
java
public static Parser<Void> nestableBlockComment( Parser<?> begin, Parser<?> end, Parser<?> commented) { return new NestableBlockCommentScanner(begin, end, commented); }
[ "public", "static", "Parser", "<", "Void", ">", "nestableBlockComment", "(", "Parser", "<", "?", ">", "begin", ",", "Parser", "<", "?", ">", "end", ",", "Parser", "<", "?", ">", "commented", ")", "{", "return", "new", "NestableBlockCommentScanner", "(", ...
A scanner for a nestable block comment that starts with {@code begin} and ends with {@code end}. @param begin starts a block comment @param end ends a block comment @param commented the commented pattern except for nested comments. @return the block comment scanner.
[ "A", "scanner", "for", "a", "nestable", "block", "comment", "that", "starts", "with", "{", "@code", "begin", "}", "and", "ends", "with", "{", "@code", "end", "}", "." ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Scanners.java#L499-L502
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/layout/LayoutFactory.java
LayoutFactory.mixInHash
private long mixInHash(long hash, StorableProperty<?> property, int multiplier) { """ Creates a long hash code that attempts to mix in all relevant layout elements. """ hash = mixInHash(hash, property.getName(), multiplier); hash = mixInHash(hash, property.getType().getName(), multiplier); ...
java
private long mixInHash(long hash, StorableProperty<?> property, int multiplier) { hash = mixInHash(hash, property.getName(), multiplier); hash = mixInHash(hash, property.getType().getName(), multiplier); hash = hash * multiplier + (property.isNullable() ? 1 : 2); hash = hash * multip...
[ "private", "long", "mixInHash", "(", "long", "hash", ",", "StorableProperty", "<", "?", ">", "property", ",", "int", "multiplier", ")", "{", "hash", "=", "mixInHash", "(", "hash", ",", "property", ".", "getName", "(", ")", ",", "multiplier", ")", ";", ...
Creates a long hash code that attempts to mix in all relevant layout elements.
[ "Creates", "a", "long", "hash", "code", "that", "attempts", "to", "mix", "in", "all", "relevant", "layout", "elements", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/LayoutFactory.java#L500-L527
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/LongTermRetentionBackupsInner.java
LongTermRetentionBackupsInner.listByDatabaseAsync
public Observable<Page<LongTermRetentionBackupInner>> listByDatabaseAsync(final String locationName, final String longTermRetentionServerName, final String longTermRetentionDatabaseName) { """ Lists all long term retention backups for a database. @param locationName The location of the database @param longTerm...
java
public Observable<Page<LongTermRetentionBackupInner>> listByDatabaseAsync(final String locationName, final String longTermRetentionServerName, final String longTermRetentionDatabaseName) { return listByDatabaseWithServiceResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName) ...
[ "public", "Observable", "<", "Page", "<", "LongTermRetentionBackupInner", ">", ">", "listByDatabaseAsync", "(", "final", "String", "locationName", ",", "final", "String", "longTermRetentionServerName", ",", "final", "String", "longTermRetentionDatabaseName", ")", "{", "...
Lists all long term retention backups for a database. @param locationName The location of the database @param longTermRetentionServerName the String value @param longTermRetentionDatabaseName the String value @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedL...
[ "Lists", "all", "long", "term", "retention", "backups", "for", "a", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/LongTermRetentionBackupsInner.java#L434-L442
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.trimRight
public UTF8String trimRight(UTF8String trimString) { """ Based on the given trim string, trim this string starting from right end This method searches each character in the source string starting from the right end, removes the character if it is in the trim string, stops at the first character which is not in ...
java
public UTF8String trimRight(UTF8String trimString) { if (trimString == null) return null; int charIdx = 0; // number of characters from the source string int numChars = 0; // array of character length for the source string int[] stringCharLen = new int[numBytes]; // array of the first byte p...
[ "public", "UTF8String", "trimRight", "(", "UTF8String", "trimString", ")", "{", "if", "(", "trimString", "==", "null", ")", "return", "null", ";", "int", "charIdx", "=", "0", ";", "// number of characters from the source string", "int", "numChars", "=", "0", ";"...
Based on the given trim string, trim this string starting from right end This method searches each character in the source string starting from the right end, removes the character if it is in the trim string, stops at the first character which is not in the trim string, returns the new string. @param trimString the tr...
[ "Based", "on", "the", "given", "trim", "string", "trim", "this", "string", "starting", "from", "right", "end", "This", "method", "searches", "each", "character", "in", "the", "source", "string", "starting", "from", "the", "right", "end", "removes", "the", "c...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L629-L667
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/concurrency/BoofConcurrency.java
BoofConcurrency.min
public static Number min(int start , int endExclusive , Class type, IntProducerNumber producer ) { """ Computes the maximum value @param start First index, inclusive @param endExclusive Last index, exclusive @param type Primtive data type, e.g. int.class, float.class, double.class @param producer Given an in...
java
public static Number min(int start , int endExclusive , Class type, IntProducerNumber producer ) { try { return pool.submit(new IntOperatorTask.Min(start,endExclusive,type,producer)).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } }
[ "public", "static", "Number", "min", "(", "int", "start", ",", "int", "endExclusive", ",", "Class", "type", ",", "IntProducerNumber", "producer", ")", "{", "try", "{", "return", "pool", ".", "submit", "(", "new", "IntOperatorTask", ".", "Min", "(", "start"...
Computes the maximum value @param start First index, inclusive @param endExclusive Last index, exclusive @param type Primtive data type, e.g. int.class, float.class, double.class @param producer Given an integer input produce a Number output @return The sum
[ "Computes", "the", "maximum", "value" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/concurrency/BoofConcurrency.java#L200-L206
ingwarsw/arquillian-suite-extension
src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarDescriptorBuilder.java
EarDescriptorBuilder.writeWebModule
private void writeWebModule(String filename, String context) { """ Writes WEB part to application.xml. @param filename name of module @param context context """ Element element = writeModule(); Element web = doc.createElement("web"); element.appendChild(web); Element webUri ...
java
private void writeWebModule(String filename, String context) { Element element = writeModule(); Element web = doc.createElement("web"); element.appendChild(web); Element webUri = doc.createElement("web-uri"); Element contextRoot = doc.createElement("context-root"); web.ap...
[ "private", "void", "writeWebModule", "(", "String", "filename", ",", "String", "context", ")", "{", "Element", "element", "=", "writeModule", "(", ")", ";", "Element", "web", "=", "doc", ".", "createElement", "(", "\"web\"", ")", ";", "element", ".", "appe...
Writes WEB part to application.xml. @param filename name of module @param context context
[ "Writes", "WEB", "part", "to", "application", ".", "xml", "." ]
train
https://github.com/ingwarsw/arquillian-suite-extension/blob/93c9e542ead1d52f45e87b0632bb02ac11f693c8/src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarDescriptorBuilder.java#L191-L201
treelogic-swe/aws-mock
example/java/full/client-usage/DescribeImagesExample.java
DescribeImagesExample.describeAllImages
public static List<Image> describeAllImages() { """ Describe all available AMIs within aws-mock. @return a list of AMIs """ // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazon...
java
public static List<Image> describeAllImages() { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); // the mock endpoint for ec2 whic...
[ "public", "static", "List", "<", "Image", ">", "describeAllImages", "(", ")", "{", "// pass any credentials as aws-mock does not authenticate them at all", "AWSCredentials", "credentials", "=", "new", "BasicAWSCredentials", "(", "\"foo\"", ",", "\"bar\"", ")", ";", "Amazo...
Describe all available AMIs within aws-mock. @return a list of AMIs
[ "Describe", "all", "available", "AMIs", "within", "aws", "-", "mock", "." ]
train
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/example/java/full/client-usage/DescribeImagesExample.java#L30-L43
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.getFromComputeNodeAsync
public Observable<InputStream> getFromComputeNodeAsync(String poolId, String nodeId, String filePath) { """ Returns the content of the specified compute node file. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node that contains the file. @param filePath ...
java
public Observable<InputStream> getFromComputeNodeAsync(String poolId, String nodeId, String filePath) { return getFromComputeNodeWithServiceResponseAsync(poolId, nodeId, filePath).map(new Func1<ServiceResponseWithHeaders<InputStream, FileGetFromComputeNodeHeaders>, InputStream>() { @Override ...
[ "public", "Observable", "<", "InputStream", ">", "getFromComputeNodeAsync", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "filePath", ")", "{", "return", "getFromComputeNodeWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ",", "filePath", ...
Returns the content of the specified compute node file. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node that contains the file. @param filePath The path to the compute node file that you want to get the content of. @throws IllegalArgumentException thrown if par...
[ "Returns", "the", "content", "of", "the", "specified", "compute", "node", "file", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L1135-L1142
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/RepositoryResourceImpl.java
RepositoryResourceImpl.copyFieldsFrom
protected void copyFieldsFrom(RepositoryResourceImpl fromResource, boolean includeAttachmentInfo) { """ Resources should override this method to copy fields that should be used as part of an update @param fromResource """ setName(fromResource.getName()); // part of the identification so locked ...
java
protected void copyFieldsFrom(RepositoryResourceImpl fromResource, boolean includeAttachmentInfo) { setName(fromResource.getName()); // part of the identification so locked setDescription(fromResource.getDescription()); setShortDescription(fromResource.getShortDescription()); setProvider...
[ "protected", "void", "copyFieldsFrom", "(", "RepositoryResourceImpl", "fromResource", ",", "boolean", "includeAttachmentInfo", ")", "{", "setName", "(", "fromResource", ".", "getName", "(", ")", ")", ";", "// part of the identification so locked", "setDescription", "(", ...
Resources should override this method to copy fields that should be used as part of an update @param fromResource
[ "Resources", "should", "override", "this", "method", "to", "copy", "fields", "that", "should", "be", "used", "as", "part", "of", "an", "update" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/RepositoryResourceImpl.java#L1053-L1075
qiujuer/Genius-Android
caprice/ui/src/main/java/net/qiujuer/genius/ui/Ui.java
Ui.dipToPx
public static float dipToPx(Resources resources, float dp) { """ Change Dip to PX @param resources Resources @param dp Dip @return PX """ DisplayMetrics metrics = resources.getDisplayMetrics(); return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, metrics); }
java
public static float dipToPx(Resources resources, float dp) { DisplayMetrics metrics = resources.getDisplayMetrics(); return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, metrics); }
[ "public", "static", "float", "dipToPx", "(", "Resources", "resources", ",", "float", "dp", ")", "{", "DisplayMetrics", "metrics", "=", "resources", ".", "getDisplayMetrics", "(", ")", ";", "return", "TypedValue", ".", "applyDimension", "(", "TypedValue", ".", ...
Change Dip to PX @param resources Resources @param dp Dip @return PX
[ "Change", "Dip", "to", "PX" ]
train
https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/ui/src/main/java/net/qiujuer/genius/ui/Ui.java#L70-L73
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/trees/TreeUtils.java
TreeUtils.removeChild
public static <T extends MutableTreeNode<T>> void removeChild(T parent, T child) { """ Removes the given child from the given parent node. @param parent the parent node @param child the child node """ checkArgNotNull(parent, "parent"); int index = parent.getChildren().indexOf(child); ...
java
public static <T extends MutableTreeNode<T>> void removeChild(T parent, T child) { checkArgNotNull(parent, "parent"); int index = parent.getChildren().indexOf(child); checkElementIndex(index, parent.getChildren().size()); parent.removeChild(index); }
[ "public", "static", "<", "T", "extends", "MutableTreeNode", "<", "T", ">", ">", "void", "removeChild", "(", "T", "parent", ",", "T", "child", ")", "{", "checkArgNotNull", "(", "parent", ",", "\"parent\"", ")", ";", "int", "index", "=", "parent", ".", "...
Removes the given child from the given parent node. @param parent the parent node @param child the child node
[ "Removes", "the", "given", "child", "from", "the", "given", "parent", "node", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/trees/TreeUtils.java#L57-L62
arakelian/more-commons
src/main/java/com/arakelian/core/utils/MoreStringUtils.java
MoreStringUtils.maskExcept
public static String maskExcept(final String s, final int unmaskedLength, final char maskChar) { """ Returns a masked string, leaving only the given number of characters unmasked. @param s string that requires masking @param unmaskedLength number of characters to leave unmasked; if positive, the unmasked cha...
java
public static String maskExcept(final String s, final int unmaskedLength, final char maskChar) { if (s == null) { return null; } final boolean maskLeading = unmaskedLength > 0; final int length = s.length(); final int maskedLength = Math.max(0, length - Math.abs(unmas...
[ "public", "static", "String", "maskExcept", "(", "final", "String", "s", ",", "final", "int", "unmaskedLength", ",", "final", "char", "maskChar", ")", "{", "if", "(", "s", "==", "null", ")", "{", "return", "null", ";", "}", "final", "boolean", "maskLeadi...
Returns a masked string, leaving only the given number of characters unmasked. @param s string that requires masking @param unmaskedLength number of characters to leave unmasked; if positive, the unmasked characters are at the end of the string, otherwise the unmasked characters are at the start of the string. @param ...
[ "Returns", "a", "masked", "string", "leaving", "only", "the", "given", "number", "of", "characters", "unmasked", "." ]
train
https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/MoreStringUtils.java#L179-L194