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
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.arg
public Groundy arg(String key, Bundle value) { """ Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return itself """ mArgs.putBundle(key, value...
java
public Groundy arg(String key, Bundle value) { mArgs.putBundle(key, value); return this; }
[ "public", "Groundy", "arg", "(", "String", "key", ",", "Bundle", "value", ")", "{", "mArgs", ".", "putBundle", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return itself
[ "Inserts", "a", "Bundle", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L730-L733
s1-platform/s1
s1-mongodb/src/java/org/s1/mongodb/MongoDBQueryHelper.java
MongoDBQueryHelper.get
public static Map<String, Object> get(CollectionId c, Map<String,Object> search) throws NotFoundException, MoreThanOneFoundException { """ Select exactly one record from collection @param c @param search @throws NotFoundException @throws MoreThanOneFoundException @return """ ensureOnlyOne(c,...
java
public static Map<String, Object> get(CollectionId c, Map<String,Object> search) throws NotFoundException, MoreThanOneFoundException { ensureOnlyOne(c, search); DBCollection coll = MongoDBConnectionHelper.getConnection(c.getDatabase()).getCollection(c.getCollection()); Map<String,Object> m ...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "get", "(", "CollectionId", "c", ",", "Map", "<", "String", ",", "Object", ">", "search", ")", "throws", "NotFoundException", ",", "MoreThanOneFoundException", "{", "ensureOnlyOne", "(", "c", ",",...
Select exactly one record from collection @param c @param search @throws NotFoundException @throws MoreThanOneFoundException @return
[ "Select", "exactly", "one", "record", "from", "collection" ]
train
https://github.com/s1-platform/s1/blob/370101c13fef01af524bc171bcc1a97e5acc76e8/s1-mongodb/src/java/org/s1/mongodb/MongoDBQueryHelper.java#L65-L74
mbrade/prefixedproperties
pp-spring/src/main/java/net/sf/prefixedproperties/spring/PrefixedPropertiesPersister.java
PrefixedPropertiesPersister.loadFromYAML
public void loadFromYAML(final Properties props, final InputStream is) throws IOException { """ Loads from json. @param props the props @param is the is @throws IOException Signals that an I/O exception has occurred. """ try { ((PrefixedProperties) props).loadFromYAML(is); } catch (final NoSuchM...
java
public void loadFromYAML(final Properties props, final InputStream is) throws IOException { try { ((PrefixedProperties) props).loadFromYAML(is); } catch (final NoSuchMethodError err) { throw new IOException( "Cannot load properties JSON file - not using PrefixedProperties: " + err.getMessage()); } }
[ "public", "void", "loadFromYAML", "(", "final", "Properties", "props", ",", "final", "InputStream", "is", ")", "throws", "IOException", "{", "try", "{", "(", "(", "PrefixedProperties", ")", "props", ")", ".", "loadFromYAML", "(", "is", ")", ";", "}", "catc...
Loads from json. @param props the props @param is the is @throws IOException Signals that an I/O exception has occurred.
[ "Loads", "from", "json", "." ]
train
https://github.com/mbrade/prefixedproperties/blob/ac430409ea37e244158002b3cf1504417835a0b2/pp-spring/src/main/java/net/sf/prefixedproperties/spring/PrefixedPropertiesPersister.java#L90-L97
audit4j/audit4j-core
src/main/java/org/audit4j/core/extra/scannotation/ClasspathUrlFinder.java
ClasspathUrlFinder.findClassBase
public static URL findClassBase(Class clazz) { """ Find the classpath for the particular class @param clazz @return """ String resource = clazz.getName().replace('.', '/') + ".class"; return findResourceBase(resource, clazz.getClassLoader()); }
java
public static URL findClassBase(Class clazz) { String resource = clazz.getName().replace('.', '/') + ".class"; return findResourceBase(resource, clazz.getClassLoader()); }
[ "public", "static", "URL", "findClassBase", "(", "Class", "clazz", ")", "{", "String", "resource", "=", "clazz", ".", "getName", "(", ")", ".", "replace", "(", "'", "'", ",", "'", "'", ")", "+", "\".class\"", ";", "return", "findResourceBase", "(", "re...
Find the classpath for the particular class @param clazz @return
[ "Find", "the", "classpath", "for", "the", "particular", "class" ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/extra/scannotation/ClasspathUrlFinder.java#L115-L119
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteQuery.java
SQLiteQuery.fillWindow
int fillWindow(CursorWindow window, int startPos, int requiredPos, boolean countAllRows) { """ Reads rows into a buffer. @param window The window to fill into @param startPos The start position for filling the window. @param requiredPos The position of a row that MUST be in the window. If it won't fit, then ...
java
int fillWindow(CursorWindow window, int startPos, int requiredPos, boolean countAllRows) { acquireReference(); try { window.acquireReference(); try { int numRows = getSession().executeForCursorWindow(getSql(), getBindArgs(), window, startPo...
[ "int", "fillWindow", "(", "CursorWindow", "window", ",", "int", "startPos", ",", "int", "requiredPos", ",", "boolean", "countAllRows", ")", "{", "acquireReference", "(", ")", ";", "try", "{", "window", ".", "acquireReference", "(", ")", ";", "try", "{", "i...
Reads rows into a buffer. @param window The window to fill into @param startPos The start position for filling the window. @param requiredPos The position of a row that MUST be in the window. If it won't fit, then the query should discard part of what it filled. @param countAllRows True to count all rows that the quer...
[ "Reads", "rows", "into", "a", "buffer", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteQuery.java#L61-L82
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.getDouble
public static final double getDouble(byte[] data, int offset) { """ This method reads an eight byte double from the input array. @param data the input array @param offset offset of double data in the array @return double value """ double result = Double.longBitsToDouble(getLong(data, offset)); ...
java
public static final double getDouble(byte[] data, int offset) { double result = Double.longBitsToDouble(getLong(data, offset)); if (Double.isNaN(result)) { result = 0; } return result; }
[ "public", "static", "final", "double", "getDouble", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "double", "result", "=", "Double", ".", "longBitsToDouble", "(", "getLong", "(", "data", ",", "offset", ")", ")", ";", "if", "(", "Double...
This method reads an eight byte double from the input array. @param data the input array @param offset offset of double data in the array @return double value
[ "This", "method", "reads", "an", "eight", "byte", "double", "from", "the", "input", "array", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L256-L264
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
ZKPaths.deleteChildren
public static void deleteChildren(ZooKeeper zookeeper, String path, boolean deleteSelf) throws InterruptedException, KeeperException { """ Recursively deletes children of a node. @param zookeeper the client @param path path of the node to delete @param deleteSelf flag that indicates that the node shoul...
java
public static void deleteChildren(ZooKeeper zookeeper, String path, boolean deleteSelf) throws InterruptedException, KeeperException { PathUtils.validatePath(path); List<String> children = zookeeper.getChildren(path, null); for ( String child : children ) { String fullPa...
[ "public", "static", "void", "deleteChildren", "(", "ZooKeeper", "zookeeper", ",", "String", "path", ",", "boolean", "deleteSelf", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "PathUtils", ".", "validatePath", "(", "path", ")", ";", "List", ...
Recursively deletes children of a node. @param zookeeper the client @param path path of the node to delete @param deleteSelf flag that indicates that the node should also get deleted @throws InterruptedException @throws KeeperException
[ "Recursively", "deletes", "children", "of", "a", "node", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java#L312-L339
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
QueryExecutorImpl.readFromCopy
synchronized void readFromCopy(CopyOperationImpl op, boolean block) throws SQLException { """ Wait for a row of data to be received from server on an active copy operation Connection gets unlocked by processCopyResults() at end of operation. @param op the copy operation presumably currently holding lock on thi...
java
synchronized void readFromCopy(CopyOperationImpl op, boolean block) throws SQLException { if (!hasLock(op)) { throw new PSQLException(GT.tr("Tried to read from inactive copy"), PSQLState.OBJECT_NOT_IN_STATE); } try { processCopyResults(op, block); // expect a call to handleCopydata() ...
[ "synchronized", "void", "readFromCopy", "(", "CopyOperationImpl", "op", ",", "boolean", "block", ")", "throws", "SQLException", "{", "if", "(", "!", "hasLock", "(", "op", ")", ")", "{", "throw", "new", "PSQLException", "(", "GT", ".", "tr", "(", "\"Tried t...
Wait for a row of data to be received from server on an active copy operation Connection gets unlocked by processCopyResults() at end of operation. @param op the copy operation presumably currently holding lock on this connection @param block whether to block waiting for input @throws SQLException on any failure
[ "Wait", "for", "a", "row", "of", "data", "to", "be", "received", "from", "server", "on", "an", "active", "copy", "operation", "Connection", "gets", "unlocked", "by", "processCopyResults", "()", "at", "end", "of", "operation", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java#L1056-L1068
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/groups/discuss/GroupDiscussInterface.java
GroupDiscussInterface.getReplyList
public ReplyObject getReplyList(String topicId, int perPage, int page) throws FlickrException { """ Get list of replies @param topicId Unique identifier of a topic for a given group {@link Topic}. @return A reply object @throws FlickrException @see <a href="http://www.flickr.com/services/api/flickr.groups.d...
java
public ReplyObject getReplyList(String topicId, int perPage, int page) throws FlickrException { ReplyList<Reply> reply = new ReplyList<Reply>(); TopicList<Topic> topic = new TopicList<Topic>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", M...
[ "public", "ReplyObject", "getReplyList", "(", "String", "topicId", ",", "int", "perPage", ",", "int", "page", ")", "throws", "FlickrException", "{", "ReplyList", "<", "Reply", ">", "reply", "=", "new", "ReplyList", "<", "Reply", ">", "(", ")", ";", "TopicL...
Get list of replies @param topicId Unique identifier of a topic for a given group {@link Topic}. @return A reply object @throws FlickrException @see <a href="http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html">API Documentation</a>
[ "Get", "list", "of", "replies" ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/groups/discuss/GroupDiscussInterface.java#L128-L167
LevelFourAB/commons
commons-io/src/main/java/se/l4/commons/io/BytesBuilder.java
BytesBuilder.createViaDataOutput
static Bytes createViaDataOutput(@NonNull IOConsumer<ExtendedDataOutput> creator, int expectedSize) throws IOException { """ Create an instance of {@link Bytes} that is created and stored in memory. @param creator the creator of byte data @param expectedSize the expected size of the created byte data, use...
java
static Bytes createViaDataOutput(@NonNull IOConsumer<ExtendedDataOutput> creator, int expectedSize) throws IOException { Objects.requireNonNull(creator); if(expectedSize <= 0) throw new IllegalArgumentException("expectedSize should be larger than 0"); ByteArrayOutputStream out = new ByteArrayOutputStream(expe...
[ "static", "Bytes", "createViaDataOutput", "(", "@", "NonNull", "IOConsumer", "<", "ExtendedDataOutput", ">", "creator", ",", "int", "expectedSize", ")", "throws", "IOException", "{", "Objects", ".", "requireNonNull", "(", "creator", ")", ";", "if", "(", "expecte...
Create an instance of {@link Bytes} that is created and stored in memory. @param creator the creator of byte data @param expectedSize the expected size of the created byte data, used to allocate memory for the data @return instance of bytes
[ "Create", "an", "instance", "of", "{", "@link", "Bytes", "}", "that", "is", "created", "and", "stored", "in", "memory", "." ]
train
https://github.com/LevelFourAB/commons/blob/aa121b3a5504b43d0c10450a1b984694fcd2b8ee/commons-io/src/main/java/se/l4/commons/io/BytesBuilder.java#L123-L135
yanzhenjie/AndServer
api/src/main/java/com/yanzhenjie/andserver/framework/view/ViewResolver.java
ViewResolver.resolve
public void resolve(@Nullable View view, @NonNull HttpRequest request, @NonNull HttpResponse response) { """ Solve the view and convert the view to http package content. @param view current view. @param request current request. @param response current response. """ if (view == null) return; ...
java
public void resolve(@Nullable View view, @NonNull HttpRequest request, @NonNull HttpResponse response) { if (view == null) return; Object output = view.output(); if (output == null) return; if (view.rest()) { resolveRest(output, request, response); } else { ...
[ "public", "void", "resolve", "(", "@", "Nullable", "View", "view", ",", "@", "NonNull", "HttpRequest", "request", ",", "@", "NonNull", "HttpResponse", "response", ")", "{", "if", "(", "view", "==", "null", ")", "return", ";", "Object", "output", "=", "vi...
Solve the view and convert the view to http package content. @param view current view. @param request current request. @param response current response.
[ "Solve", "the", "view", "and", "convert", "the", "view", "to", "http", "package", "content", "." ]
train
https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/framework/view/ViewResolver.java#L57-L68
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_backup_changeProperties_POST
public OvhTask serviceName_datacenter_datacenterId_backup_changeProperties_POST(String serviceName, Long datacenterId, Boolean backupDurationInReport, OvhOfferTypeEnum backupOffer, Boolean backupSizeInReport, Boolean diskSizeInReport, Boolean fullDayInReport, String mailAddress, Boolean restorePointInReport, Date sched...
java
public OvhTask serviceName_datacenter_datacenterId_backup_changeProperties_POST(String serviceName, Long datacenterId, Boolean backupDurationInReport, OvhOfferTypeEnum backupOffer, Boolean backupSizeInReport, Boolean diskSizeInReport, Boolean fullDayInReport, String mailAddress, Boolean restorePointInReport, Date sched...
[ "public", "OvhTask", "serviceName_datacenter_datacenterId_backup_changeProperties_POST", "(", "String", "serviceName", ",", "Long", "datacenterId", ",", "Boolean", "backupDurationInReport", ",", "OvhOfferTypeEnum", "backupOffer", ",", "Boolean", "backupSizeInReport", ",", "Bool...
Edit the backup on a Private Cloud REST: POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties @param scheduleHour [required] Schedule hour for start backup. UTC Timezone @param fullDayInReport [required] Full day on mail report @param mailAddress [required] Unique additional email addre...
[ "Edit", "the", "backup", "on", "a", "Private", "Cloud" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L2406-L2420
netty/netty
example/src/main/java/io/netty/example/http/upload/HttpUploadClient.java
HttpUploadClient.formget
private static List<Entry<String, String>> formget( Bootstrap bootstrap, String host, int port, String get, URI uriSimple) throws Exception { """ Standard usage of HTTP API in Netty without file Upload (get is not able to achieve File upload due to limitation on request size). @return the list of h...
java
private static List<Entry<String, String>> formget( Bootstrap bootstrap, String host, int port, String get, URI uriSimple) throws Exception { // XXX /formget // No use of HttpPostRequestEncoder since not a POST Channel channel = bootstrap.connect(host, port).sync().channel(); ...
[ "private", "static", "List", "<", "Entry", "<", "String", ",", "String", ">", ">", "formget", "(", "Bootstrap", "bootstrap", ",", "String", "host", ",", "int", "port", ",", "String", "get", ",", "URI", "uriSimple", ")", "throws", "Exception", "{", "// XX...
Standard usage of HTTP API in Netty without file Upload (get is not able to achieve File upload due to limitation on request size). @return the list of headers that will be used in every example after
[ "Standard", "usage", "of", "HTTP", "API", "in", "Netty", "without", "file", "Upload", "(", "get", "is", "not", "able", "to", "achieve", "File", "upload", "due", "to", "limitation", "on", "request", "size", ")", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/upload/HttpUploadClient.java#L149-L197
NessComputing/components-ness-event
core/src/main/java/com/nesscomputing/event/NessEvent.java
NessEvent.createEvent
public static NessEvent createEvent(@Nullable final UUID user, @Nullable final DateTime timestamp, @Nonnull final NessEventType type, @Nullable final Map<String, ? extends Object> payload) { """ ...
java
public static NessEvent createEvent(@Nullable final UUID user, @Nullable final DateTime timestamp, @Nonnull final NessEventType type, @Nullable final Map<String, ? extends Object> payload) { ...
[ "public", "static", "NessEvent", "createEvent", "(", "@", "Nullable", "final", "UUID", "user", ",", "@", "Nullable", "final", "DateTime", "timestamp", ",", "@", "Nonnull", "final", "NessEventType", "type", ",", "@", "Nullable", "final", "Map", "<", "String", ...
Create a new event. @param user User that the event happened for. Can be null for a system level event. @param timestamp The time when this event entered the system @param type The Event type. @param payload Arbitrary data describing the event.
[ "Create", "a", "new", "event", "." ]
train
https://github.com/NessComputing/components-ness-event/blob/6d41f9e7c810c3ffa6bb79e19bb8cfb1d1c12c33/core/src/main/java/com/nesscomputing/event/NessEvent.java#L81-L87
hal/core
gui/src/main/java/org/jboss/as/console/mbui/widgets/ComplexAttributeForm.java
ComplexAttributeForm.getSecurityContext
private SecurityContext getSecurityContext() { """ Simply delegates all auth decision to the parent context attribute scope represented by {@link #attributeName} @return """ return new SecurityContext() { @Override public AuthorisationDecision getReadPriviledge() { ...
java
private SecurityContext getSecurityContext() { return new SecurityContext() { @Override public AuthorisationDecision getReadPriviledge() { return securityContextDelegate.getReadPriviledge(); } @Override public AuthorisationDecision get...
[ "private", "SecurityContext", "getSecurityContext", "(", ")", "{", "return", "new", "SecurityContext", "(", ")", "{", "@", "Override", "public", "AuthorisationDecision", "getReadPriviledge", "(", ")", "{", "return", "securityContextDelegate", ".", "getReadPriviledge", ...
Simply delegates all auth decision to the parent context attribute scope represented by {@link #attributeName} @return
[ "Simply", "delegates", "all", "auth", "decision", "to", "the", "parent", "context", "attribute", "scope", "represented", "by", "{" ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/mbui/widgets/ComplexAttributeForm.java#L84-L146
googlemaps/google-maps-services-java
src/main/java/com/google/maps/RoadsApi.java
RoadsApi.speedLimits
public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context, LatLng... path) { """ Returns the posted speed limit for given road segments. The provided LatLngs will first be snapped to the most likely roads the vehicle was traveling along. <p>Note: The accuracy of speed limit data returned by t...
java
public static PendingResult<SpeedLimit[]> speedLimits(GeoApiContext context, LatLng... path) { return context.get(SPEEDS_API_CONFIG, SpeedsResponse.class, "path", join('|', path)); }
[ "public", "static", "PendingResult", "<", "SpeedLimit", "[", "]", ">", "speedLimits", "(", "GeoApiContext", "context", ",", "LatLng", "...", "path", ")", "{", "return", "context", ".", "get", "(", "SPEEDS_API_CONFIG", ",", "SpeedsResponse", ".", "class", ",", ...
Returns the posted speed limit for given road segments. The provided LatLngs will first be snapped to the most likely roads the vehicle was traveling along. <p>Note: The accuracy of speed limit data returned by the Google Maps Roads API cannot be guaranteed. Speed limit data provided is not real-time, and may be estim...
[ "Returns", "the", "posted", "speed", "limit", "for", "given", "road", "segments", ".", "The", "provided", "LatLngs", "will", "first", "be", "snapped", "to", "the", "most", "likely", "roads", "the", "vehicle", "was", "traveling", "along", "." ]
train
https://github.com/googlemaps/google-maps-services-java/blob/23d20d1930f80e310d856d2da51d72ee0db4476b/src/main/java/com/google/maps/RoadsApi.java#L111-L113
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/PrimaryKey.java
PrimaryKey.addComponent
public PrimaryKey addComponent(String keyAttributeName, Object keyAttributeValue) { """ Add a key component to this primary key. Note adding a key component with the same name as that of an existing one would overwrite and become a single key component instead of two. """ components.put(keyAttribut...
java
public PrimaryKey addComponent(String keyAttributeName, Object keyAttributeValue) { components.put(keyAttributeName, new KeyAttribute(keyAttributeName, keyAttributeValue)); return this; }
[ "public", "PrimaryKey", "addComponent", "(", "String", "keyAttributeName", ",", "Object", "keyAttributeValue", ")", "{", "components", ".", "put", "(", "keyAttributeName", ",", "new", "KeyAttribute", "(", "keyAttributeName", ",", "keyAttributeValue", ")", ")", ";", ...
Add a key component to this primary key. Note adding a key component with the same name as that of an existing one would overwrite and become a single key component instead of two.
[ "Add", "a", "key", "component", "to", "this", "primary", "key", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/PrimaryKey.java#L101-L105
bushidowallet/bushido-java-service
bushido-service-lib/src/main/java/com/bccapi/bitlib/util/CoinUtil.java
CoinUtil.valueString
public static String valueString(long value, Denomination denomination) { """ Get the given value in satoshis as a string on the form "10.12345" using the specified denomination. <p> This method only returns necessary decimal points to tell the exact value. If you wish to display all digits use {@link CoinUti...
java
public static String valueString(long value, Denomination denomination) { BigDecimal d = BigDecimal.valueOf(value); d = d.divide(denomination.getOneUnitInSatoshis()); return d.toPlainString(); }
[ "public", "static", "String", "valueString", "(", "long", "value", ",", "Denomination", "denomination", ")", "{", "BigDecimal", "d", "=", "BigDecimal", ".", "valueOf", "(", "value", ")", ";", "d", "=", "d", ".", "divide", "(", "denomination", ".", "getOneU...
Get the given value in satoshis as a string on the form "10.12345" using the specified denomination. <p> This method only returns necessary decimal points to tell the exact value. If you wish to display all digits use {@link CoinUtil#fullValueString(long, Denomination)} @param value The number of satoshis @param denom...
[ "Get", "the", "given", "value", "in", "satoshis", "as", "a", "string", "on", "the", "form", "10", ".", "12345", "using", "the", "specified", "denomination", ".", "<p", ">", "This", "method", "only", "returns", "necessary", "decimal", "points", "to", "tell"...
train
https://github.com/bushidowallet/bushido-java-service/blob/e1a0157527e57459b509718044d2df44084876a2/bushido-service-lib/src/main/java/com/bccapi/bitlib/util/CoinUtil.java#L118-L122
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/archive/ModuleId.java
ModuleId.fromString
public static ModuleId fromString(String moduleId) throws IllegalArgumentException { """ Parse a module id from a string. If a version identifier cannot be extracted, the version identifier will be set to "" (empty string). @param moduleId the id string @return the module identifier @throws IllegalArgumentE...
java
public static ModuleId fromString(String moduleId) throws IllegalArgumentException { if (moduleId == null) { throw new IllegalArgumentException("Module Id String is null"); } if (moduleId.length() == 0) { throw new IllegalArgumentException("Empty Module Id String"); ...
[ "public", "static", "ModuleId", "fromString", "(", "String", "moduleId", ")", "throws", "IllegalArgumentException", "{", "if", "(", "moduleId", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Module Id String is null\"", ")", ";", "}", ...
Parse a module id from a string. If a version identifier cannot be extracted, the version identifier will be set to "" (empty string). @param moduleId the id string @return the module identifier @throws IllegalArgumentException if the format of the module specification is invalid or it is {@code null}
[ "Parse", "a", "module", "id", "from", "a", "string", ".", "If", "a", "version", "identifier", "cannot", "be", "extracted", "the", "version", "identifier", "will", "be", "set", "to", "(", "empty", "string", ")", "." ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/archive/ModuleId.java#L122-L142
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/ImageImpl.java
ImageImpl.computeRenderingPoint
private void computeRenderingPoint(int width, int height) { """ Compute the rendering point. @param width The width to use. @param height The height to use. """ rx = (int) Math.floor(origin.getX(x, width)); ry = (int) Math.floor(origin.getY(y, height)); }
java
private void computeRenderingPoint(int width, int height) { rx = (int) Math.floor(origin.getX(x, width)); ry = (int) Math.floor(origin.getY(y, height)); }
[ "private", "void", "computeRenderingPoint", "(", "int", "width", ",", "int", "height", ")", "{", "rx", "=", "(", "int", ")", "Math", ".", "floor", "(", "origin", ".", "getX", "(", "x", ",", "width", ")", ")", ";", "ry", "=", "(", "int", ")", "Mat...
Compute the rendering point. @param width The width to use. @param height The height to use.
[ "Compute", "the", "rendering", "point", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/ImageImpl.java#L99-L103
PinaeOS/timon
src/main/java/org/pinae/timon/cache/CacheFactory.java
CacheFactory.createCache
public Cache createCache(String name, CacheConfiguration config, int type) throws CacheException { """ 生成缓存 @param name 缓存名称 @param config 缓存配置 @param type 缓存类别 @return 生成的缓存对象 @throws CacheException 缓存异常 """ if (config == null) { throw new CacheException("Cache configuration is null"); } ...
java
public Cache createCache(String name, CacheConfiguration config, int type) throws CacheException { if (config == null) { throw new CacheException("Cache configuration is null"); } Cache cache = null; switch (type) { case Cache.SYN_CACHE: cache = new SynchronizedCache(name, (SynchronizedCach...
[ "public", "Cache", "createCache", "(", "String", "name", ",", "CacheConfiguration", "config", ",", "int", "type", ")", "throws", "CacheException", "{", "if", "(", "config", "==", "null", ")", "{", "throw", "new", "CacheException", "(", "\"Cache configuration is ...
生成缓存 @param name 缓存名称 @param config 缓存配置 @param type 缓存类别 @return 生成的缓存对象 @throws CacheException 缓存异常
[ "生成缓存" ]
train
https://github.com/PinaeOS/timon/blob/b8c66868624e3eb1b36f6ecda3c556c456a30cd3/src/main/java/org/pinae/timon/cache/CacheFactory.java#L52-L75
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.lineNumber
public static InsnList lineNumber(int num) { """ Generates instructions for line numbers. This is useful for debugging. For example, you can put a line number of 99999 or some other special number to denote that the code being executed is instrumented code. Then if a stacktrace happens, you'll know that if instr...
java
public static InsnList lineNumber(int num) { Validate.isTrue(num >= 0); InsnList ret = new InsnList(); LabelNode labelNode = new LabelNode(); ret.add(labelNode); ret.add(new LineNumberNode(num, labelNode)); return ret; }
[ "public", "static", "InsnList", "lineNumber", "(", "int", "num", ")", "{", "Validate", ".", "isTrue", "(", "num", ">=", "0", ")", ";", "InsnList", "ret", "=", "new", "InsnList", "(", ")", ";", "LabelNode", "labelNode", "=", "new", "LabelNode", "(", ")"...
Generates instructions for line numbers. This is useful for debugging. For example, you can put a line number of 99999 or some other special number to denote that the code being executed is instrumented code. Then if a stacktrace happens, you'll know that if instrumented code was immediately involved. @param num line n...
[ "Generates", "instructions", "for", "line", "numbers", ".", "This", "is", "useful", "for", "debugging", ".", "For", "example", "you", "can", "put", "a", "line", "number", "of", "99999", "or", "some", "other", "special", "number", "to", "denote", "that", "t...
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L286-L296
codelibs/jcifs
src/main/java/jcifs/smb1/Config.java
Config.getInetAddress
public static InetAddress getInetAddress( String key, InetAddress def ) { """ Retrieve an <code>InetAddress</code>. If the address is not an IP address and cannot be resolved <code>null</code> will be returned. """ String addr = prp.getProperty( key ); if( addr != null ) { try { ...
java
public static InetAddress getInetAddress( String key, InetAddress def ) { String addr = prp.getProperty( key ); if( addr != null ) { try { def = InetAddress.getByName( addr ); } catch( UnknownHostException uhe ) { if( log.level > 0 ) { ...
[ "public", "static", "InetAddress", "getInetAddress", "(", "String", "key", ",", "InetAddress", "def", ")", "{", "String", "addr", "=", "prp", ".", "getProperty", "(", "key", ")", ";", "if", "(", "addr", "!=", "null", ")", "{", "try", "{", "def", "=", ...
Retrieve an <code>InetAddress</code>. If the address is not an IP address and cannot be resolved <code>null</code> will be returned.
[ "Retrieve", "an", "<code", ">", "InetAddress<", "/", "code", ">", ".", "If", "the", "address", "is", "not", "an", "IP", "address", "and", "cannot", "be", "resolved", "<code", ">", "null<", "/", "code", ">", "will", "be", "returned", "." ]
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/Config.java#L278-L291
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java
DockerAgentUtils.registerImage
private static void registerImage(String imageId, String imageTag, String targetRepo, ArrayListMultimap<String, String> artifactsProps, int buildInfoId) throws IOException { """ Registers an image to the images cache, so that it can be captured by the build-info proxy. @param imageId @param imageTa...
java
private static void registerImage(String imageId, String imageTag, String targetRepo, ArrayListMultimap<String, String> artifactsProps, int buildInfoId) throws IOException { DockerImage image = new DockerImage(imageId, imageTag, targetRepo, buildInfoId, artifactsProps); images.add(image); ...
[ "private", "static", "void", "registerImage", "(", "String", "imageId", ",", "String", "imageTag", ",", "String", "targetRepo", ",", "ArrayListMultimap", "<", "String", ",", "String", ">", "artifactsProps", ",", "int", "buildInfoId", ")", "throws", "IOException", ...
Registers an image to the images cache, so that it can be captured by the build-info proxy. @param imageId @param imageTag @param targetRepo @param buildInfoId @throws IOException
[ "Registers", "an", "image", "to", "the", "images", "cache", "so", "that", "it", "can", "be", "captured", "by", "the", "build", "-", "info", "proxy", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java#L74-L78
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.iterateCategoriesGetArticles
private void iterateCategoriesGetArticles(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { """ Methods computing stuff that have to iterate over all categories and access category articles can plug-in here. Recently plugin-in: numberOfCategorizedArticles distributionOfArticlesByCatego...
java
private void iterateCategoriesGetArticles(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { Map<Integer,Integer> localDegreeDistribution = new HashMap<Integer,Integer>(); Set<Integer> localCategorizedArticleSet = new HashSet<Integer>(); Set<Integer> categoryNodes = catG...
[ "private", "void", "iterateCategoriesGetArticles", "(", "Wikipedia", "pWiki", ",", "CategoryGraph", "catGraph", ")", "throws", "WikiPageNotFoundException", "{", "Map", "<", "Integer", ",", "Integer", ">", "localDegreeDistribution", "=", "new", "HashMap", "<", "Integer...
Methods computing stuff that have to iterate over all categories and access category articles can plug-in here. Recently plugin-in: numberOfCategorizedArticles distributionOfArticlesByCategory @param pWiki The wikipedia object. @param catGraph The category graph. @throws WikiPageNotFoundException
[ "Methods", "computing", "stuff", "that", "have", "to", "iterate", "over", "all", "categories", "and", "access", "category", "articles", "can", "plug", "-", "in", "here", ".", "Recently", "plugin", "-", "in", ":", "numberOfCategorizedArticles", "distributionOfArtic...
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L318-L357
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.validateFalse
@SuppressWarnings("all") public void validateFalse(boolean value, String name, String message) { """ Validates a given value to be false @param value The value to check @param name The name of the field to display the error message @param message A custom error message instead of the default one """ ...
java
@SuppressWarnings("all") public void validateFalse(boolean value, String name, String message) { if (value) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.FALSE_KEY.name(), name))); } }
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "public", "void", "validateFalse", "(", "boolean", "value", ",", "String", "name", ",", "String", "message", ")", "{", "if", "(", "value", ")", "{", "addError", "(", "name", ",", "Optional", ".", "ofNullable", ...
Validates a given value to be false @param value The value to check @param name The name of the field to display the error message @param message A custom error message instead of the default one
[ "Validates", "a", "given", "value", "to", "be", "false" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L452-L457
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/dsl/ParsingModelIo.java
ParsingModelIo.saveRelationsFile
public static void saveRelationsFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ) throws IOException { """ Saves the model into the original file. @param relationsFile the relations file @param writeComments true to write comments @param lineSeparator the line separator (if null...
java
public static void saveRelationsFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ) throws IOException { if( relationsFile.getEditedFile() == null ) throw new IOException( "Save operation could not be performed. The model was not loaded from a local file." ); saveRelationsFileInt...
[ "public", "static", "void", "saveRelationsFile", "(", "FileDefinition", "relationsFile", ",", "boolean", "writeComments", ",", "String", "lineSeparator", ")", "throws", "IOException", "{", "if", "(", "relationsFile", ".", "getEditedFile", "(", ")", "==", "null", "...
Saves the model into the original file. @param relationsFile the relations file @param writeComments true to write comments @param lineSeparator the line separator (if null, the OS' one is used) @throws IOException if the file could not be saved
[ "Saves", "the", "model", "into", "the", "original", "file", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/dsl/ParsingModelIo.java#L87-L94
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.escapeHtmlChars
private static String escapeHtmlChars(String s) { """ Given a string, escape all special html characters and return the result. @param s The string to check. @return the original string with all of the HTML characters escaped. """ for (int i = 0; i < s.length(); i++) { char ch = s.char...
java
private static String escapeHtmlChars(String s) { for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); switch (ch) { // only start building a new string if we need to case '<': case '>': case '&': StringBuilder sb = new StringB...
[ "private", "static", "String", "escapeHtmlChars", "(", "String", "s", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", ".", "length", "(", ")", ";", "i", "++", ")", "{", "char", "ch", "=", "s", ".", "charAt", "(", "i", ")", ";"...
Given a string, escape all special html characters and return the result. @param s The string to check. @return the original string with all of the HTML characters escaped.
[ "Given", "a", "string", "escape", "all", "special", "html", "characters", "and", "return", "the", "result", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L162-L182
landawn/AbacusUtil
src/com/landawn/abacus/util/DynamoDBExecutor.java
DynamoDBExecutor.putItem
PutItemResult putItem(final String tableName, final Object entity) { """ And it may cause error because the "Object" is ambiguous to any type. """ return putItem(tableName, toItem(entity)); }
java
PutItemResult putItem(final String tableName, final Object entity) { return putItem(tableName, toItem(entity)); }
[ "PutItemResult", "putItem", "(", "final", "String", "tableName", ",", "final", "Object", "entity", ")", "{", "return", "putItem", "(", "tableName", ",", "toItem", "(", "entity", ")", ")", ";", "}" ]
And it may cause error because the "Object" is ambiguous to any type.
[ "And", "it", "may", "cause", "error", "because", "the", "Object", "is", "ambiguous", "to", "any", "type", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DynamoDBExecutor.java#L946-L948
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/EvaluationUtils.java
EvaluationUtils.falseNegativeRate
public static double falseNegativeRate(long fnCount, long tpCount, double edgeCase) { """ Calculate the false negative rate from the false negative counts and true positive count @param fnCount False negative count @param tpCount True positive count @param edgeCase Edge case value to use to avoid 0/0 @retu...
java
public static double falseNegativeRate(long fnCount, long tpCount, double edgeCase) { //Edge case if (fnCount == 0 && tpCount == 0) { return edgeCase; } return fnCount / (double) (fnCount + tpCount); }
[ "public", "static", "double", "falseNegativeRate", "(", "long", "fnCount", ",", "long", "tpCount", ",", "double", "edgeCase", ")", "{", "//Edge case", "if", "(", "fnCount", "==", "0", "&&", "tpCount", "==", "0", ")", "{", "return", "edgeCase", ";", "}", ...
Calculate the false negative rate from the false negative counts and true positive count @param fnCount False negative count @param tpCount True positive count @param edgeCase Edge case value to use to avoid 0/0 @return False negative rate
[ "Calculate", "the", "false", "negative", "rate", "from", "the", "false", "negative", "counts", "and", "true", "positive", "count" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/EvaluationUtils.java#L91-L98
io7m/jcanephora
com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLTextureUpdates.java
JCGLTextureUpdates.newUpdateReplacingAll2D
public static JCGLTexture2DUpdateType newUpdateReplacingAll2D( final JCGLTexture2DUsableType t) { """ Create a new update that will replace the entirety of {@code t}. @param t The texture @return A new update """ NullCheck.notNull(t, "Texture"); return newUpdateReplacingArea2D(t, AreaSizesL.a...
java
public static JCGLTexture2DUpdateType newUpdateReplacingAll2D( final JCGLTexture2DUsableType t) { NullCheck.notNull(t, "Texture"); return newUpdateReplacingArea2D(t, AreaSizesL.area(t.size())); }
[ "public", "static", "JCGLTexture2DUpdateType", "newUpdateReplacingAll2D", "(", "final", "JCGLTexture2DUsableType", "t", ")", "{", "NullCheck", ".", "notNull", "(", "t", ",", "\"Texture\"", ")", ";", "return", "newUpdateReplacingArea2D", "(", "t", ",", "AreaSizesL", ...
Create a new update that will replace the entirety of {@code t}. @param t The texture @return A new update
[ "Create", "a", "new", "update", "that", "will", "replace", "the", "entirety", "of", "{", "@code", "t", "}", "." ]
train
https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLTextureUpdates.java#L109-L114
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendFieldCriteria
private void appendFieldCriteria(TableAlias alias, PathInfo pathInfo, FieldCriteria c, StringBuffer buf) { """ Answer the SQL-Clause for a FieldCriteria<br> The value of the FieldCriteria will be translated @param alias @param pathInfo @param c ColumnCriteria @param buf """ appendColName(alias,...
java
private void appendFieldCriteria(TableAlias alias, PathInfo pathInfo, FieldCriteria c, StringBuffer buf) { appendColName(alias, pathInfo, c.isTranslateAttribute(), buf); buf.append(c.getClause()); if (c.isTranslateField()) { appendColName((String) c.getValue(), false, c.ge...
[ "private", "void", "appendFieldCriteria", "(", "TableAlias", "alias", ",", "PathInfo", "pathInfo", ",", "FieldCriteria", "c", ",", "StringBuffer", "buf", ")", "{", "appendColName", "(", "alias", ",", "pathInfo", ",", "c", ".", "isTranslateAttribute", "(", ")", ...
Answer the SQL-Clause for a FieldCriteria<br> The value of the FieldCriteria will be translated @param alias @param pathInfo @param c ColumnCriteria @param buf
[ "Answer", "the", "SQL", "-", "Clause", "for", "a", "FieldCriteria<br", ">", "The", "value", "of", "the", "FieldCriteria", "will", "be", "translated" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L728-L741
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/ApplicationMetadata.java
ApplicationMetadata.addEntityMetadata
public void addEntityMetadata(String persistenceUnit, Class<?> clazz, EntityMetadata entityMetadata) { """ Adds the entity metadata. @param persistenceUnit the persistence unit @param clazz the clazz @param entityMetadata the entity metadata """ Metamodel metamodel = getMetamodelMap().get(pers...
java
public void addEntityMetadata(String persistenceUnit, Class<?> clazz, EntityMetadata entityMetadata) { Metamodel metamodel = getMetamodelMap().get(persistenceUnit); Map<String, EntityMetadata> entityClassToMetadataMap = ((MetamodelImpl) metamodel).getEntityMetadataMap(); if (entityClassT...
[ "public", "void", "addEntityMetadata", "(", "String", "persistenceUnit", ",", "Class", "<", "?", ">", "clazz", ",", "EntityMetadata", "entityMetadata", ")", "{", "Metamodel", "metamodel", "=", "getMetamodelMap", "(", ")", ".", "get", "(", "persistenceUnit", ")",...
Adds the entity metadata. @param persistenceUnit the persistence unit @param clazz the clazz @param entityMetadata the entity metadata
[ "Adds", "the", "entity", "metadata", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/ApplicationMetadata.java#L75-L89
aoindustries/ao-encoding
src/main/java/com/aoindustries/encoding/ChainWriter.java
ChainWriter.printTimeJS
@Deprecated public ChainWriter printTimeJS(long date, Sequence sequence, Appendable scriptOut) throws IOException { """ Writes a JavaScript script tag that a time in the user's locale. Prints <code>&amp;#160;</code> if the date is <code>-1</code>. Writes to the internal <code>PrintWriter</code>. @deprecated...
java
@Deprecated public ChainWriter printTimeJS(long date, Sequence sequence, Appendable scriptOut) throws IOException { return writeTimeJavaScript(date==-1 ? null : new Date(date), sequence, scriptOut); }
[ "@", "Deprecated", "public", "ChainWriter", "printTimeJS", "(", "long", "date", ",", "Sequence", "sequence", ",", "Appendable", "scriptOut", ")", "throws", "IOException", "{", "return", "writeTimeJavaScript", "(", "date", "==", "-", "1", "?", "null", ":", "new...
Writes a JavaScript script tag that a time in the user's locale. Prints <code>&amp;#160;</code> if the date is <code>-1</code>. Writes to the internal <code>PrintWriter</code>. @deprecated @see #writeTimeJavaScript(long)
[ "Writes", "a", "JavaScript", "script", "tag", "that", "a", "time", "in", "the", "user", "s", "locale", ".", "Prints", "<code", ">", "&amp", ";", "#160", ";", "<", "/", "code", ">", "if", "the", "date", "is", "<code", ">", "-", "1<", "/", "code", ...
train
https://github.com/aoindustries/ao-encoding/blob/54eeb8ff58ab7b44bb02549bbe2572625b449e4e/src/main/java/com/aoindustries/encoding/ChainWriter.java#L961-L964
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java
ApacheHTTPClient.createStringRequestContent
protected RequestEntity createStringRequestContent(HTTPRequest httpRequest) { """ This function creates a string type request entity and populates it with the data from the provided HTTP request. @param httpRequest The HTTP request @return The request entity """ RequestEntity requestEntity=nul...
java
protected RequestEntity createStringRequestContent(HTTPRequest httpRequest) { RequestEntity requestEntity=null; String contentString=httpRequest.getContentAsString(); if(contentString!=null) { try { requestEntity=new StringRequestEntity(content...
[ "protected", "RequestEntity", "createStringRequestContent", "(", "HTTPRequest", "httpRequest", ")", "{", "RequestEntity", "requestEntity", "=", "null", ";", "String", "contentString", "=", "httpRequest", ".", "getContentAsString", "(", ")", ";", "if", "(", "contentStr...
This function creates a string type request entity and populates it with the data from the provided HTTP request. @param httpRequest The HTTP request @return The request entity
[ "This", "function", "creates", "a", "string", "type", "request", "entity", "and", "populates", "it", "with", "the", "data", "from", "the", "provided", "HTTP", "request", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/ApacheHTTPClient.java#L282-L299
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.formatCurrency
public static String formatCurrency(final Number value) { """ <p> Smartly formats the given number as a monetary amount. </p> <p> For en_GB: <table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr> <th class="colFirst">Input</th> <th class="colLast">Output</th> </tr> <tr> <td>34</td> <td>...
java
public static String formatCurrency(final Number value) { DecimalFormat decf = context.get().getCurrencyFormat(); return stripZeros(decf, decf.format(value)); }
[ "public", "static", "String", "formatCurrency", "(", "final", "Number", "value", ")", "{", "DecimalFormat", "decf", "=", "context", ".", "get", "(", ")", ".", "getCurrencyFormat", "(", ")", ";", "return", "stripZeros", "(", "decf", ",", "decf", ".", "forma...
<p> Smartly formats the given number as a monetary amount. </p> <p> For en_GB: <table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr> <th class="colFirst">Input</th> <th class="colLast">Output</th> </tr> <tr> <td>34</td> <td>"£34"</td> </tr> <tr> <td>1000</td> <td>"£1,000"</td> </tr> <tr> <td>12.5</td> <...
[ "<p", ">", "Smartly", "formats", "the", "given", "number", "as", "a", "monetary", "amount", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L630-L634
apereo/cas
support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationConfiguration.java
WsFederationConfiguration.getAuthorizationUrl
public String getAuthorizationUrl(final String relyingPartyIdentifier, final String wctx) { """ Gets authorization url. @param relyingPartyIdentifier the relying party identifier @param wctx the wctx @return the authorization url """ return String.format(getIdentityProviderUrl() ...
java
public String getAuthorizationUrl(final String relyingPartyIdentifier, final String wctx) { return String.format(getIdentityProviderUrl() + QUERYSTRING, relyingPartyIdentifier, wctx); }
[ "public", "String", "getAuthorizationUrl", "(", "final", "String", "relyingPartyIdentifier", ",", "final", "String", "wctx", ")", "{", "return", "String", ".", "format", "(", "getIdentityProviderUrl", "(", ")", "+", "QUERYSTRING", ",", "relyingPartyIdentifier", ",",...
Gets authorization url. @param relyingPartyIdentifier the relying party identifier @param wctx the wctx @return the authorization url
[ "Gets", "authorization", "url", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/WsFederationConfiguration.java#L137-L139
reactor/reactor-netty
src/main/java/reactor/netty/udp/UdpServer.java
UdpServer.runOn
public final UdpServer runOn(LoopResources channelResources, InternetProtocolFamily family) { """ Run IO loops on a supplied {@link EventLoopGroup} from the {@link LoopResources} container. @param channelResources a {@link LoopResources} accepting native runtime expectation and returning an eventLoopGroup. @...
java
public final UdpServer runOn(LoopResources channelResources, InternetProtocolFamily family) { return new UdpServerRunOn(this, channelResources, false, family); }
[ "public", "final", "UdpServer", "runOn", "(", "LoopResources", "channelResources", ",", "InternetProtocolFamily", "family", ")", "{", "return", "new", "UdpServerRunOn", "(", "this", ",", "channelResources", ",", "false", ",", "family", ")", ";", "}" ]
Run IO loops on a supplied {@link EventLoopGroup} from the {@link LoopResources} container. @param channelResources a {@link LoopResources} accepting native runtime expectation and returning an eventLoopGroup. @param family a specific {@link InternetProtocolFamily} to run with @return a new {@link UdpServer}
[ "Run", "IO", "loops", "on", "a", "supplied", "{", "@link", "EventLoopGroup", "}", "from", "the", "{", "@link", "LoopResources", "}", "container", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/udp/UdpServer.java#L354-L356
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/FileInputFormat.java
FileInputFormat.addInputPath
public static void addInputPath(JobConf conf, Path path ) { """ Add a {@link Path} to the list of inputs for the map-reduce job. @param conf The configuration of the job @param path {@link Path} to be added to the list of inputs for the map-reduce job. """ if (!path.isAbsolute()) { FileSystem.Lo...
java
public static void addInputPath(JobConf conf, Path path ) { if (!path.isAbsolute()) { FileSystem.LogForCollect.info("set input path to relative path: " + path + " working directory: " + conf.getWorkingDirectory()); } path = new Path(conf.getWorkingDirectory(), path); String dirStr = Stri...
[ "public", "static", "void", "addInputPath", "(", "JobConf", "conf", ",", "Path", "path", ")", "{", "if", "(", "!", "path", ".", "isAbsolute", "(", ")", ")", "{", "FileSystem", ".", "LogForCollect", ".", "info", "(", "\"set input path to relative path: \"", "...
Add a {@link Path} to the list of inputs for the map-reduce job. @param conf The configuration of the job @param path {@link Path} to be added to the list of inputs for the map-reduce job.
[ "Add", "a", "{", "@link", "Path", "}", "to", "the", "list", "of", "inputs", "for", "the", "map", "-", "reduce", "job", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/FileInputFormat.java#L542-L552
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java
GISTreeSetUtil.classifies
@Pure public static int classifies(AbstractGISTreeSetNode<?, ?> node, GeoLocation location) { """ Replies the classificiation of the specified location. @param node the classification base. @param location the point to classify. @return the classificiation of the specified location inside to the node. ""...
java
@Pure public static int classifies(AbstractGISTreeSetNode<?, ?> node, GeoLocation location) { if (node.getZone() == IcosepQuadTreeZone.ICOSEP) { return classifiesIcocep(node.verticalSplit, node.horizontalSplit, location.toBounds2D()); } return classifiesNonIcocep(node.verticalSplit, node.horizontalSplit, loca...
[ "@", "Pure", "public", "static", "int", "classifies", "(", "AbstractGISTreeSetNode", "<", "?", ",", "?", ">", "node", ",", "GeoLocation", "location", ")", "{", "if", "(", "node", ".", "getZone", "(", ")", "==", "IcosepQuadTreeZone", ".", "ICOSEP", ")", "...
Replies the classificiation of the specified location. @param node the classification base. @param location the point to classify. @return the classificiation of the specified location inside to the node.
[ "Replies", "the", "classificiation", "of", "the", "specified", "location", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L62-L68
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.removeNode
public void removeNode(Node n) { """ Remove a node. @param n Node to be added @throws RuntimeException thrown if this NodeSet is not of a mutable type. """ if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeS...
java
public void removeNode(Node n) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); this.removeElement(n); }
[ "public", "void", "removeNode", "(", "Node", "n", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESET_NOT_MUTABLE", ",", "null", ")", ")", "...
Remove a node. @param n Node to be added @throws RuntimeException thrown if this NodeSet is not of a mutable type.
[ "Remove", "a", "node", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L413-L420
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.isProtectedAccessible
private boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) { """ Is given protected symbol accessible if it is selected from given site and the selection takes place in given class? @param sym The symbol with protected access @param c The class where the access takes place @s...
java
private boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) { Type newSite = site.hasTag(TYPEVAR) ? site.getUpperBound() : site; while (c != null && !(c.isSubClass(sym.owner, types) && (c.flags() & INTERFACE) == 0 && ...
[ "private", "boolean", "isProtectedAccessible", "(", "Symbol", "sym", ",", "ClassSymbol", "c", ",", "Type", "site", ")", "{", "Type", "newSite", "=", "site", ".", "hasTag", "(", "TYPEVAR", ")", "?", "site", ".", "getUpperBound", "(", ")", ":", "site", ";"...
Is given protected symbol accessible if it is selected from given site and the selection takes place in given class? @param sym The symbol with protected access @param c The class where the access takes place @site The type of the qualifier
[ "Is", "given", "protected", "symbol", "accessible", "if", "it", "is", "selected", "from", "given", "site", "and", "the", "selection", "takes", "place", "in", "given", "class?" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L467-L479
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java
JournalReader.readJournalEntry
protected ConsumerJournalEntry readJournalEntry(XMLEventReader reader) throws JournalException, XMLStreamException { """ Read a JournalEntry from the journal, to produce a <code>ConsumerJournalEntry</code> instance. Concrete sub-classes should insure that the XMLEventReader is positioned at the begin...
java
protected ConsumerJournalEntry readJournalEntry(XMLEventReader reader) throws JournalException, XMLStreamException { StartElement startTag = getJournalEntryStartTag(reader); String methodName = getRequiredAttributeValue(startTag, QNAME_ATTR_METHOD); JournalEntryConte...
[ "protected", "ConsumerJournalEntry", "readJournalEntry", "(", "XMLEventReader", "reader", ")", "throws", "JournalException", ",", "XMLStreamException", "{", "StartElement", "startTag", "=", "getJournalEntryStartTag", "(", "reader", ")", ";", "String", "methodName", "=", ...
Read a JournalEntry from the journal, to produce a <code>ConsumerJournalEntry</code> instance. Concrete sub-classes should insure that the XMLEventReader is positioned at the beginning of a JournalEntry before calling this method.
[ "Read", "a", "JournalEntry", "from", "the", "journal", "to", "produce", "a", "<code", ">", "ConsumerJournalEntry<", "/", "code", ">", "instance", ".", "Concrete", "sub", "-", "classes", "should", "insure", "that", "the", "XMLEventReader", "is", "positioned", "...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalReader.java#L199-L213
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java
ImageScaling.scaleFill
public static Bitmap scaleFill(Bitmap src, int w, int h) { """ Scaling bitmap to fill rect with centering. Method keep aspect ratio. @param src source bitmap @param w width of result @param h height of result @return scaled bitmap """ Bitmap res = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_...
java
public static Bitmap scaleFill(Bitmap src, int w, int h) { Bitmap res = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); scaleFill(src, res); return res; }
[ "public", "static", "Bitmap", "scaleFill", "(", "Bitmap", "src", ",", "int", "w", ",", "int", "h", ")", "{", "Bitmap", "res", "=", "Bitmap", ".", "createBitmap", "(", "w", ",", "h", ",", "Bitmap", ".", "Config", ".", "ARGB_8888", ")", ";", "scaleFill...
Scaling bitmap to fill rect with centering. Method keep aspect ratio. @param src source bitmap @param w width of result @param h height of result @return scaled bitmap
[ "Scaling", "bitmap", "to", "fill", "rect", "with", "centering", ".", "Method", "keep", "aspect", "ratio", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageScaling.java#L23-L27
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.INPUT
public static HtmlTree INPUT(String type, String id) { """ Generates a INPUT tag with some id. @param type the type of input @param id id for the tag @return an HtmlTree object for the INPUT tag """ HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT); htmltree.addAttr(HtmlAttr.TYPE, nullCheck(...
java
public static HtmlTree INPUT(String type, String id) { HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT); htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); htmltree.addAttr(HtmlAttr.VALUE, " "); htmltree.addAttr(HtmlAttr.DISABLED, "disa...
[ "public", "static", "HtmlTree", "INPUT", "(", "String", "type", ",", "String", "id", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "INPUT", ")", ";", "htmltree", ".", "addAttr", "(", "HtmlAttr", ".", "TYPE", ",", "nullChe...
Generates a INPUT tag with some id. @param type the type of input @param id id for the tag @return an HtmlTree object for the INPUT tag
[ "Generates", "a", "INPUT", "tag", "with", "some", "id", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L479-L486
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.println
public static void println(PrintStream self, Object value) { """ Print a value formatted Groovy style (followed by a newline) to the print stream. @param self any Object @param value the value to print @since 1.6.0 """ self.println(InvokerHelper.toString(value)); }
java
public static void println(PrintStream self, Object value) { self.println(InvokerHelper.toString(value)); }
[ "public", "static", "void", "println", "(", "PrintStream", "self", ",", "Object", "value", ")", "{", "self", ".", "println", "(", "InvokerHelper", ".", "toString", "(", "value", ")", ")", ";", "}" ]
Print a value formatted Groovy style (followed by a newline) to the print stream. @param self any Object @param value the value to print @since 1.6.0
[ "Print", "a", "value", "formatted", "Groovy", "style", "(", "followed", "by", "a", "newline", ")", "to", "the", "print", "stream", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L825-L827
GerdHolz/TOVAL
src/de/invation/code/toval/misc/SetUtils.java
SetUtils.getRandomSubsetMin
public static <T> Set<T> getRandomSubsetMin(Set<T> set, int minCount) { """ Generates a random subset of <code>set</code>, that contains at least <code>maxCount</code> elements. @param <T> Type of set elements @param set Basic set for operation @param minCount Minimum number of items @return A subset wit...
java
public static <T> Set<T> getRandomSubsetMin(Set<T> set, int minCount) { int count = RandomUtils.randomIntBetween(minCount, set.size()); return getRandomSubset(set, count); }
[ "public", "static", "<", "T", ">", "Set", "<", "T", ">", "getRandomSubsetMin", "(", "Set", "<", "T", ">", "set", ",", "int", "minCount", ")", "{", "int", "count", "=", "RandomUtils", ".", "randomIntBetween", "(", "minCount", ",", "set", ".", "size", ...
Generates a random subset of <code>set</code>, that contains at least <code>maxCount</code> elements. @param <T> Type of set elements @param set Basic set for operation @param minCount Minimum number of items @return A subset with at least <code>minCount</code> elements
[ "Generates", "a", "random", "subset", "of", "<code", ">", "set<", "/", "code", ">", "that", "contains", "at", "least", "<code", ">", "maxCount<", "/", "code", ">", "elements", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/SetUtils.java#L63-L66
hap-java/HAP-Java
src/main/java/io/github/hapjava/impl/pairing/HomekitSRP6ServerSession.java
HomekitSRP6ServerSession.mockStep1
public BigInteger mockStep1(final String userID, final BigInteger s, final BigInteger v) { """ Increments this SRP-6a authentication session to {@link State#STEP_1} indicating a non-existing user identity 'I' with mock (simulated) salt 's' and password verifier 'v' values. <p>This method can be used to avoid i...
java
public BigInteger mockStep1(final String userID, final BigInteger s, final BigInteger v) { noSuchUserIdentity = true; return step1(userID, s, v); }
[ "public", "BigInteger", "mockStep1", "(", "final", "String", "userID", ",", "final", "BigInteger", "s", ",", "final", "BigInteger", "v", ")", "{", "noSuchUserIdentity", "=", "true", ";", "return", "step1", "(", "userID", ",", "s", ",", "v", ")", ";", "}"...
Increments this SRP-6a authentication session to {@link State#STEP_1} indicating a non-existing user identity 'I' with mock (simulated) salt 's' and password verifier 'v' values. <p>This method can be used to avoid informing the client at step one that the user identity is bad and throw instead a guaranteed general "b...
[ "Increments", "this", "SRP", "-", "6a", "authentication", "session", "to", "{", "@link", "State#STEP_1", "}", "indicating", "a", "non", "-", "existing", "user", "identity", "I", "with", "mock", "(", "simulated", ")", "salt", "s", "and", "password", "verifier...
train
https://github.com/hap-java/HAP-Java/blob/d2b2f4f1579580a2b5958af3a192128345843db9/src/main/java/io/github/hapjava/impl/pairing/HomekitSRP6ServerSession.java#L191-L196
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/MachinetagsApi.java
MachinetagsApi.getPredicates
public Predicates getPredicates(String namespace, int perPage, int page, boolean sign) throws JinxException { """ Return a list of unique predicates, optionally limited by a given namespace. <br> This method does not require authentication. namespace (Optional) <br> per_page (Optional) Number of photos to re...
java
public Predicates getPredicates(String namespace, int perPage, int page, boolean sign) throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.machinetags.getPredicates"); if (!JinxUtils.isNullOrEmpty(namespace)) { params.put("namespace", namespace); } ...
[ "public", "Predicates", "getPredicates", "(", "String", "namespace", ",", "int", "perPage", ",", "int", "page", ",", "boolean", "sign", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", "<>", "(...
Return a list of unique predicates, optionally limited by a given namespace. <br> This method does not require authentication. namespace (Optional) <br> per_page (Optional) Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500. page (Optional) The page of...
[ "Return", "a", "list", "of", "unique", "predicates", "optionally", "limited", "by", "a", "given", "namespace", ".", "<br", ">", "This", "method", "does", "not", "require", "authentication", ".", "namespace", "(", "Optional", ")", "<br", ">", "per_page", "(",...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/MachinetagsApi.java#L123-L136
molgenis/molgenis
molgenis-data-import/src/main/java/org/molgenis/data/importer/emx/EmxDataProvider.java
EmxDataProvider.toEntity
private Entity toEntity(EntityType entityType, Entity emxEntity) { """ Create an entity from the EMX entity @param entityType entity meta data @param emxEntity EMX entity @return MOLGENIS entity """ Entity entity = entityManager.create(entityType, POPULATE); for (Attribute attr : entityType.getAto...
java
private Entity toEntity(EntityType entityType, Entity emxEntity) { Entity entity = entityManager.create(entityType, POPULATE); for (Attribute attr : entityType.getAtomicAttributes()) { if (attr.getExpression() == null && !attr.isMappedBy()) { String attrName = attr.getName(); Object emxVal...
[ "private", "Entity", "toEntity", "(", "EntityType", "entityType", ",", "Entity", "emxEntity", ")", "{", "Entity", "entity", "=", "entityManager", ".", "create", "(", "entityType", ",", "POPULATE", ")", ";", "for", "(", "Attribute", "attr", ":", "entityType", ...
Create an entity from the EMX entity @param entityType entity meta data @param emxEntity EMX entity @return MOLGENIS entity
[ "Create", "an", "entity", "from", "the", "EMX", "entity" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-import/src/main/java/org/molgenis/data/importer/emx/EmxDataProvider.java#L84-L141
esigate/esigate
esigate-core/src/main/java/org/esigate/Driver.java
Driver.logAction
private void logAction(String action, String onUrl, Renderer[] renderers) { """ Log current provider, page and renderers that will be applied. <p> This methods log at the INFO level. <p> You should only call this method if INFO level is enabled. <pre> if (LOG.isInfoEnabled()) { logAction(pageUrl, renderer...
java
private void logAction(String action, String onUrl, Renderer[] renderers) { if (LOG.isInfoEnabled()) { List<String> rendererNames = new ArrayList<>(renderers.length); for (Renderer renderer : renderers) { rendererNames.add(renderer.getClass().getName()); } ...
[ "private", "void", "logAction", "(", "String", "action", ",", "String", "onUrl", ",", "Renderer", "[", "]", "renderers", ")", "{", "if", "(", "LOG", ".", "isInfoEnabled", "(", ")", ")", "{", "List", "<", "String", ">", "rendererNames", "=", "new", "Arr...
Log current provider, page and renderers that will be applied. <p> This methods log at the INFO level. <p> You should only call this method if INFO level is enabled. <pre> if (LOG.isInfoEnabled()) { logAction(pageUrl, renderers); } </pre> @param action Action name (eg. "proxy" or "render") @param onUrl current page u...
[ "Log", "current", "provider", "page", "and", "renderers", "that", "will", "be", "applied", ".", "<p", ">", "This", "methods", "log", "at", "the", "INFO", "level", ".", "<p", ">", "You", "should", "only", "call", "this", "method", "if", "INFO", "level", ...
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/Driver.java#L243-L252
qiniu/java-sdk
src/main/java/com/qiniu/storage/BucketManager.java
BucketManager.deleteAfterDays
public Response deleteAfterDays(String bucket, String key, int days) throws QiniuException { """ 设置文件的存活时间 @param bucket 空间名称 @param key 文件名称 @param days 存活时间,单位:天 """ return rsPost(bucket, String.format("/deleteAfterDays/%s/%d", encodedEntry(bucket, key), days), null); }
java
public Response deleteAfterDays(String bucket, String key, int days) throws QiniuException { return rsPost(bucket, String.format("/deleteAfterDays/%s/%d", encodedEntry(bucket, key), days), null); }
[ "public", "Response", "deleteAfterDays", "(", "String", "bucket", ",", "String", "key", ",", "int", "days", ")", "throws", "QiniuException", "{", "return", "rsPost", "(", "bucket", ",", "String", ".", "format", "(", "\"/deleteAfterDays/%s/%d\"", ",", "encodedEnt...
设置文件的存活时间 @param bucket 空间名称 @param key 文件名称 @param days 存活时间,单位:天
[ "设置文件的存活时间" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/BucketManager.java#L594-L596
Netflix/governator
governator-core/src/main/java/com/netflix/governator/internal/PreDestroyMonitor.java
PreDestroyMonitor.addScopeBindings
public void addScopeBindings(Map<Class<? extends Annotation>, Scope> bindings) { """ allows late-binding of scopes to PreDestroyMonitor, useful if more than one Injector contributes scope bindings @param bindings additional annotation-to-scope bindings to add """ if (scopeCleaner.isRunning()) { ...
java
public void addScopeBindings(Map<Class<? extends Annotation>, Scope> bindings) { if (scopeCleaner.isRunning()) { scopeBindings.putAll(bindings); } }
[ "public", "void", "addScopeBindings", "(", "Map", "<", "Class", "<", "?", "extends", "Annotation", ">", ",", "Scope", ">", "bindings", ")", "{", "if", "(", "scopeCleaner", ".", "isRunning", "(", ")", ")", "{", "scopeBindings", ".", "putAll", "(", "bindin...
allows late-binding of scopes to PreDestroyMonitor, useful if more than one Injector contributes scope bindings @param bindings additional annotation-to-scope bindings to add
[ "allows", "late", "-", "binding", "of", "scopes", "to", "PreDestroyMonitor", "useful", "if", "more", "than", "one", "Injector", "contributes", "scope", "bindings" ]
train
https://github.com/Netflix/governator/blob/c1f4bb1518e759c61f2e9cad8a896ec6beba0294/governator-core/src/main/java/com/netflix/governator/internal/PreDestroyMonitor.java#L181-L185
amzn/ion-java
src/com/amazon/ion/impl/IonUTF8.java
IonUTF8.getScalarFromBytes
public final static int getScalarFromBytes(byte[] bytes, int offset, int maxLength) { """ this helper converts the bytes starting at offset from UTF8 to a Unicode scalar. This does not check for valid Unicode scalar ranges but simply handle the UTF8 decoding. getScalarReadLengthFromBytes can be used to determ...
java
public final static int getScalarFromBytes(byte[] bytes, int offset, int maxLength) { int src = offset; int end = offset + maxLength; if (src >= end) throw new ArrayIndexOutOfBoundsException(); int c = bytes[src++] & 0xff; int utf8length = getUTF8LengthFromFirstByte(c); ...
[ "public", "final", "static", "int", "getScalarFromBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "maxLength", ")", "{", "int", "src", "=", "offset", ";", "int", "end", "=", "offset", "+", "maxLength", ";", "if", "(", "src", ...
this helper converts the bytes starting at offset from UTF8 to a Unicode scalar. This does not check for valid Unicode scalar ranges but simply handle the UTF8 decoding. getScalarReadLengthFromBytes can be used to determine how many bytes would be converted (consumed) in this process if the same parameters are passed...
[ "this", "helper", "converts", "the", "bytes", "starting", "at", "offset", "from", "UTF8", "to", "a", "Unicode", "scalar", ".", "This", "does", "not", "check", "for", "valid", "Unicode", "scalar", "ranges", "but", "simply", "handle", "the", "UTF8", "decoding"...
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/IonUTF8.java#L346-L378
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeShapes.java
VisualizeShapes.drawPolygon
public static<T extends Point2D_I32> void drawPolygon( List<T> vertexes , boolean loop, Graphics2D g2 ) { """ Draws a polygon @param vertexes List of vertices in the polygon @param loop true if the end points are connected, forming a loop @param g2 Graphics object it's drawn to """ for( int i = 0; i < v...
java
public static<T extends Point2D_I32> void drawPolygon( List<T> vertexes , boolean loop, Graphics2D g2 ) { for( int i = 0; i < vertexes.size()-1; i++ ) { Point2D_I32 p0 = vertexes.get(i); Point2D_I32 p1 = vertexes.get(i+1); g2.drawLine(p0.x,p0.y,p1.x,p1.y); } if( loop && vertexes.size() > 0) { Point2D_...
[ "public", "static", "<", "T", "extends", "Point2D_I32", ">", "void", "drawPolygon", "(", "List", "<", "T", ">", "vertexes", ",", "boolean", "loop", ",", "Graphics2D", "g2", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "vertexes", ".", ...
Draws a polygon @param vertexes List of vertices in the polygon @param loop true if the end points are connected, forming a loop @param g2 Graphics object it's drawn to
[ "Draws", "a", "polygon" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/feature/VisualizeShapes.java#L166-L177
getlantern/kaleidoscope
src/main/java/org/kaleidoscope/LocalTrustGraph.java
LocalTrustGraph.addRoute
public void addRoute(final TrustGraphNodeId a, final TrustGraphNodeId b) { """ create a bidirectional trust link between the nodes with ids 'a' and 'b' @param a id of node that will form a trust link with 'b' @param b id of node that will form a trust link with 'a' """ addDirectedRoute(a,b); ...
java
public void addRoute(final TrustGraphNodeId a, final TrustGraphNodeId b) { addDirectedRoute(a,b); addDirectedRoute(b,a); }
[ "public", "void", "addRoute", "(", "final", "TrustGraphNodeId", "a", ",", "final", "TrustGraphNodeId", "b", ")", "{", "addDirectedRoute", "(", "a", ",", "b", ")", ";", "addDirectedRoute", "(", "b", ",", "a", ")", ";", "}" ]
create a bidirectional trust link between the nodes with ids 'a' and 'b' @param a id of node that will form a trust link with 'b' @param b id of node that will form a trust link with 'a'
[ "create", "a", "bidirectional", "trust", "link", "between", "the", "nodes", "with", "ids", "a", "and", "b" ]
train
https://github.com/getlantern/kaleidoscope/blob/7516f05724c8f54e5d535d23da9116817c08a09f/src/main/java/org/kaleidoscope/LocalTrustGraph.java#L260-L263
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Spies.java
Spies.spy1st
public static <R, T> Function<T, R> spy1st(Function<T, R> function, Box<T> param) { """ Proxies a function spying for parameter. @param <R> the function result type @param <T> the function parameter type @param function the function that will be spied @param param a box that will be containing spied paramete...
java
public static <R, T> Function<T, R> spy1st(Function<T, R> function, Box<T> param) { return spy(function, Box.<R>empty(), param); }
[ "public", "static", "<", "R", ",", "T", ">", "Function", "<", "T", ",", "R", ">", "spy1st", "(", "Function", "<", "T", ",", "R", ">", "function", ",", "Box", "<", "T", ">", "param", ")", "{", "return", "spy", "(", "function", ",", "Box", ".", ...
Proxies a function spying for parameter. @param <R> the function result type @param <T> the function parameter type @param function the function that will be spied @param param a box that will be containing spied parameter @return the proxied function
[ "Proxies", "a", "function", "spying", "for", "parameter", "." ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L307-L309
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.listFromJobScheduleAsync
public ServiceFuture<List<CloudJob>> listFromJobScheduleAsync(final String jobScheduleId, final JobListFromJobScheduleOptions jobListFromJobScheduleOptions, final ListOperationCallback<CloudJob> serviceCallback) { """ Lists the jobs that have been created under the specified job schedule. @param jobScheduleId T...
java
public ServiceFuture<List<CloudJob>> listFromJobScheduleAsync(final String jobScheduleId, final JobListFromJobScheduleOptions jobListFromJobScheduleOptions, final ListOperationCallback<CloudJob> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listFromJobScheduleSinglePageAsync(j...
[ "public", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "listFromJobScheduleAsync", "(", "final", "String", "jobScheduleId", ",", "final", "JobListFromJobScheduleOptions", "jobListFromJobScheduleOptions", ",", "final", "ListOperationCallback", "<", "CloudJob", ...
Lists the jobs that have been created under the specified job schedule. @param jobScheduleId The ID of the job schedule from which you want to get a list of jobs. @param jobListFromJobScheduleOptions Additional parameters for the operation @param serviceCallback the async ServiceCallback to handle successful and faile...
[ "Lists", "the", "jobs", "that", "have", "been", "created", "under", "the", "specified", "job", "schedule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L2661-L2678
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/UIManager.java
UIManager.findConfiguredRenderer
private Renderer findConfiguredRenderer(final WComponent component, final String rendererPackage) { """ Attempts to find the configured renderer for the given output format and component. @param component the component to find a manager for. @param rendererPackage the package containing the renderers. @return...
java
private Renderer findConfiguredRenderer(final WComponent component, final String rendererPackage) { Renderer renderer = null; // We loop for each WComponent in the class hierarchy, as the // Renderer may have been specified at a higher level. for (Class<?> c = component.getClass(); renderer == null && c != nul...
[ "private", "Renderer", "findConfiguredRenderer", "(", "final", "WComponent", "component", ",", "final", "String", "rendererPackage", ")", "{", "Renderer", "renderer", "=", "null", ";", "// We loop for each WComponent in the class hierarchy, as the", "// Renderer may have been s...
Attempts to find the configured renderer for the given output format and component. @param component the component to find a manager for. @param rendererPackage the package containing the renderers. @return the Renderer for the component, or null if there is no renderer defined.
[ "Attempts", "to", "find", "the", "configured", "renderer", "for", "the", "given", "output", "format", "and", "component", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/layout/UIManager.java#L253-L280
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java
BatchTask.instantiateUserCode
public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) { """ Instantiates a user code class from is definition in the task configuration. The class is instantiated without arguments using the null-ary constructor. Instantiation will fail if this constructor does n...
java
public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) { try { T stub = config.<T>getStubWrapper(cl).getUserCodeObject(superClass, cl); // check if the class is a subclass, if the check is required if (superClass != null && !superClass.isAssignableFrom(stub.ge...
[ "public", "static", "<", "T", ">", "T", "instantiateUserCode", "(", "TaskConfig", "config", ",", "ClassLoader", "cl", ",", "Class", "<", "?", "super", "T", ">", "superClass", ")", "{", "try", "{", "T", "stub", "=", "config", ".", "<", "T", ">", "getS...
Instantiates a user code class from is definition in the task configuration. The class is instantiated without arguments using the null-ary constructor. Instantiation will fail if this constructor does not exist or is not public. @param <T> The generic type of the user code class. @param config The task configuration ...
[ "Instantiates", "a", "user", "code", "class", "from", "is", "definition", "in", "the", "task", "configuration", ".", "The", "class", "is", "instantiated", "without", "arguments", "using", "the", "null", "-", "ary", "constructor", ".", "Instantiation", "will", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java#L1446-L1459
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/ClusterDistributionChannelWriter.java
ClusterDistributionChannelWriter.getIntent
static Intent getIntent(Collection<? extends RedisCommand<?, ?, ?>> commands) { """ Optimization: Determine command intents and optimize for bulk execution preferring one node. <p> If there is only one intent, then we take the intent derived from the commands. If there is more than one intent, then use {@link I...
java
static Intent getIntent(Collection<? extends RedisCommand<?, ?, ?>> commands) { boolean w = false; boolean r = false; Intent singleIntent = Intent.WRITE; for (RedisCommand<?, ?, ?> command : commands) { if (command instanceof ClusterCommand) { continue; ...
[ "static", "Intent", "getIntent", "(", "Collection", "<", "?", "extends", "RedisCommand", "<", "?", ",", "?", ",", "?", ">", ">", "commands", ")", "{", "boolean", "w", "=", "false", ";", "boolean", "r", "=", "false", ";", "Intent", "singleIntent", "=", ...
Optimization: Determine command intents and optimize for bulk execution preferring one node. <p> If there is only one intent, then we take the intent derived from the commands. If there is more than one intent, then use {@link Intent#WRITE}. @param commands {@link Collection} of {@link RedisCommand commands}. @return ...
[ "Optimization", ":", "Determine", "command", "intents", "and", "optimize", "for", "bulk", "execution", "preferring", "one", "node", ".", "<p", ">", "If", "there", "is", "only", "one", "intent", "then", "we", "take", "the", "intent", "derived", "from", "the",...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/ClusterDistributionChannelWriter.java#L269-L296
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.health/src/com/ibm/ws/microprofile/health/internal/AppTrackerImpl.java
AppTrackerImpl.setAppModuleNames
private AppModuleName setAppModuleNames(IServletContext isc) { """ /* collect all app and module names and save it for later use """ WebAppConfig webAppConfig = isc.getWebAppConfig(); if (webAppConfig.isSystemApp()) { Tr.debug(tc, "Detected system app so won't track for health che...
java
private AppModuleName setAppModuleNames(IServletContext isc) { WebAppConfig webAppConfig = isc.getWebAppConfig(); if (webAppConfig.isSystemApp()) { Tr.debug(tc, "Detected system app so won't track for health check; appName = ", webAppConfig.getApplicationName()); return null; ...
[ "private", "AppModuleName", "setAppModuleNames", "(", "IServletContext", "isc", ")", "{", "WebAppConfig", "webAppConfig", "=", "isc", ".", "getWebAppConfig", "(", ")", ";", "if", "(", "webAppConfig", ".", "isSystemApp", "(", ")", ")", "{", "Tr", ".", "debug", ...
/* collect all app and module names and save it for later use
[ "/", "*", "collect", "all", "app", "and", "module", "names", "and", "save", "it", "for", "later", "use" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.health/src/com/ibm/ws/microprofile/health/internal/AppTrackerImpl.java#L99-L117
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java
EvaluationCalibration.getReliabilityDiagram
public ReliabilityDiagram getReliabilityDiagram(int classIdx) { """ Get the reliability diagram for the specified class @param classIdx Index of the class to get the reliability diagram for """ INDArray totalCountBins = rDiagBinTotalCount.getColumn(classIdx); INDArray countPositiveBins = rD...
java
public ReliabilityDiagram getReliabilityDiagram(int classIdx) { INDArray totalCountBins = rDiagBinTotalCount.getColumn(classIdx); INDArray countPositiveBins = rDiagBinPosCount.getColumn(classIdx); double[] meanPredictionBins = rDiagBinSumPredictions.getColumn(classIdx).castTo(DataType.DOUBLE) ...
[ "public", "ReliabilityDiagram", "getReliabilityDiagram", "(", "int", "classIdx", ")", "{", "INDArray", "totalCountBins", "=", "rDiagBinTotalCount", ".", "getColumn", "(", "classIdx", ")", ";", "INDArray", "countPositiveBins", "=", "rDiagBinPosCount", ".", "getColumn", ...
Get the reliability diagram for the specified class @param classIdx Index of the class to get the reliability diagram for
[ "Get", "the", "reliability", "diagram", "for", "the", "specified", "class" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java#L371-L403
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/AbstractUpdateOperation.java
AbstractUpdateOperation.retrieveRemoteVersion
@Nullable private static String retrieveRemoteVersion(@Nonnull final URL url, @Nonnull final Charset charset) throws IOException { """ Reads the current User-Agent data version from <a href="http://data.udger.com">http://data.udger.com</a>. @param url a URL which the version information can be loaded @retur...
java
@Nullable private static String retrieveRemoteVersion(@Nonnull final URL url, @Nonnull final Charset charset) throws IOException { final InputStream stream = url.openStream(); final InputStreamReader reader = new InputStreamReader(stream, charset); final LineNumberReader lnr = new LineNumberReader(reader); fin...
[ "@", "Nullable", "private", "static", "String", "retrieveRemoteVersion", "(", "@", "Nonnull", "final", "URL", "url", ",", "@", "Nonnull", "final", "Charset", "charset", ")", "throws", "IOException", "{", "final", "InputStream", "stream", "=", "url", ".", "open...
Reads the current User-Agent data version from <a href="http://data.udger.com">http://data.udger.com</a>. @param url a URL which the version information can be loaded @return a version string or {@code null} @throws IOException if an I/O exception occurs
[ "Reads", "the", "current", "User", "-", "Agent", "data", "version", "from", "<a", "href", "=", "http", ":", "//", "data", ".", "udger", ".", "com", ">", "http", ":", "//", "data", ".", "udger", ".", "com<", "/", "a", ">", "." ]
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/AbstractUpdateOperation.java#L117-L127
undera/jmeter-plugins
plugins/csvars/src/main/java/kg/apc/jmeter/config/VariableFromCsvFileReader.java
VariableFromCsvFileReader.getDataAsMap
public Map<String, String> getDataAsMap(String prefix, String separator) { """ Parses (name, value) pairs from the input and returns the result as a Map. The name is taken from the first column and value from the second column. If an input line contains only one column its value is defaulted to an empty string. ...
java
public Map<String, String> getDataAsMap(String prefix, String separator) { return getDataAsMap(prefix, separator, 0); }
[ "public", "Map", "<", "String", ",", "String", ">", "getDataAsMap", "(", "String", "prefix", ",", "String", "separator", ")", "{", "return", "getDataAsMap", "(", "prefix", ",", "separator", ",", "0", ")", ";", "}" ]
Parses (name, value) pairs from the input and returns the result as a Map. The name is taken from the first column and value from the second column. If an input line contains only one column its value is defaulted to an empty string. Any extra columns are ignored. @param prefix a prefix to apply to the mapped variable...
[ "Parses", "(", "name", "value", ")", "pairs", "from", "the", "input", "and", "returns", "the", "result", "as", "a", "Map", ".", "The", "name", "is", "taken", "from", "the", "first", "column", "and", "value", "from", "the", "second", "column", ".", "If"...
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/plugins/csvars/src/main/java/kg/apc/jmeter/config/VariableFromCsvFileReader.java#L49-L51
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java
PropsCodeGen.importConfigProperty
protected void importConfigProperty(Definition def, Writer out) throws IOException { """ import ConfigProperty @param def definition @param out Writer @throws IOException IOException """ if (getConfigProps(def).size() > 0) { out.write("import javax.resource.spi.ConfigProperty;\n"); ...
java
protected void importConfigProperty(Definition def, Writer out) throws IOException { if (getConfigProps(def).size() > 0) { out.write("import javax.resource.spi.ConfigProperty;\n"); } }
[ "protected", "void", "importConfigProperty", "(", "Definition", "def", ",", "Writer", "out", ")", "throws", "IOException", "{", "if", "(", "getConfigProps", "(", "def", ")", ".", "size", "(", ")", ">", "0", ")", "{", "out", ".", "write", "(", "\"import j...
import ConfigProperty @param def definition @param out Writer @throws IOException IOException
[ "import", "ConfigProperty" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/PropsCodeGen.java#L243-L249
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.serviceName_pca_pcaServiceName_billing_billingId_GET
public OvhBilling serviceName_pca_pcaServiceName_billing_billingId_GET(String serviceName, String pcaServiceName, Long billingId) throws IOException { """ Get this object properties REST: GET /cloud/{serviceName}/pca/{pcaServiceName}/billing/{billingId} @param serviceName [required] The internal name of your p...
java
public OvhBilling serviceName_pca_pcaServiceName_billing_billingId_GET(String serviceName, String pcaServiceName, Long billingId) throws IOException { String qPath = "/cloud/{serviceName}/pca/{pcaServiceName}/billing/{billingId}"; StringBuilder sb = path(qPath, serviceName, pcaServiceName, billingId); String resp...
[ "public", "OvhBilling", "serviceName_pca_pcaServiceName_billing_billingId_GET", "(", "String", "serviceName", ",", "String", "pcaServiceName", ",", "Long", "billingId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/{serviceName}/pca/{pcaServiceName}/billi...
Get this object properties REST: GET /cloud/{serviceName}/pca/{pcaServiceName}/billing/{billingId} @param serviceName [required] The internal name of your public cloud passport @param pcaServiceName [required] The internal name of your PCA offer @param billingId [required] Billing id @deprecated
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2581-L2586
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java
ScenarioPortrayal.addDataToDataSerieInTimeChart
public void addDataToDataSerieInTimeChart(String chartID, String dataSerieID, double x, double y) throws ShanksException { """ Add a datum in the chart @param chartID @param dataSerieID @param x @param y @throws ShanksException """ if (this.containsDataSerieInTimeChart(chartID, dataSerieID)) { ...
java
public void addDataToDataSerieInTimeChart(String chartID, String dataSerieID, double x, double y) throws ShanksException { if (this.containsDataSerieInTimeChart(chartID, dataSerieID)) { this.timeChartData.get(chartID).get(dataSerieID).add(x, y, true); } else { try { ...
[ "public", "void", "addDataToDataSerieInTimeChart", "(", "String", "chartID", ",", "String", "dataSerieID", ",", "double", "x", ",", "double", "y", ")", "throws", "ShanksException", "{", "if", "(", "this", ".", "containsDataSerieInTimeChart", "(", "chartID", ",", ...
Add a datum in the chart @param chartID @param dataSerieID @param x @param y @throws ShanksException
[ "Add", "a", "datum", "in", "the", "chart" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java#L240-L251
OpenTSDB/opentsdb
src/core/Tags.java
Tags.resolveOrCreateAllAsync
static Deferred<ArrayList<byte[]>> resolveOrCreateAllAsync(final TSDB tsdb, final Map<String, String> tags) { """ Resolves (and creates, if necessary) all the tags (name=value) into the a sorted byte arrays. @param tsdb The TSDB to use for UniqueId lookups. @param tags The tags to resolve. If a new tag nam...
java
static Deferred<ArrayList<byte[]>> resolveOrCreateAllAsync(final TSDB tsdb, final Map<String, String> tags) { return resolveAllInternalAsync(tsdb, null, tags, true); }
[ "static", "Deferred", "<", "ArrayList", "<", "byte", "[", "]", ">", ">", "resolveOrCreateAllAsync", "(", "final", "TSDB", "tsdb", ",", "final", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "resolveAllInternalAsync", "(", "tsdb", ",...
Resolves (and creates, if necessary) all the tags (name=value) into the a sorted byte arrays. @param tsdb The TSDB to use for UniqueId lookups. @param tags The tags to resolve. If a new tag name or tag value is seen, it will be assigned an ID. @return an array of sorted tags (tag id, tag name). @since 2.0
[ "Resolves", "(", "and", "creates", "if", "necessary", ")", "all", "the", "tags", "(", "name", "=", "value", ")", "into", "the", "a", "sorted", "byte", "arrays", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/Tags.java#L648-L651
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMultiRolePoolInstanceMetricsWithServiceResponseAsync
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { """ Get metrics for a specific instance of a multi-role pool of an App Service Environment. Get ...
java
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listMultiRolePoolInstanceMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { return listMultiRolePoolInstanceMetricsSinglePageAsync(resourceGroupName, name, instance, deta...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ResourceMetricInner", ">", ">", ">", "listMultiRolePoolInstanceMetricsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "inst...
Get metrics for a specific instance of a multi-role pool of an App Service Environment. Get metrics for a specific instance of a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param inst...
[ "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "multi", "-", "role", "pool", "of", "an", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L2891-L2903
groupon/monsoon
intf/src/main/java/com/groupon/lex/metrics/resolver/NamedResolverMap.java
NamedResolverMap.getGroupName
public GroupName getGroupName(@NonNull SimpleGroupPath prefixPath, @NonNull Map<String, MetricValue> extraTags) { """ Create a GroupName from this NamedResolverMap. @param prefixPath Additional path elements to put in front of the returned path. @param extraTags Additional tags to put in the tag set. The extr...
java
public GroupName getGroupName(@NonNull SimpleGroupPath prefixPath, @NonNull Map<String, MetricValue> extraTags) { return getGroupName(prefixPath.getPath(), extraTags); }
[ "public", "GroupName", "getGroupName", "(", "@", "NonNull", "SimpleGroupPath", "prefixPath", ",", "@", "NonNull", "Map", "<", "String", ",", "MetricValue", ">", "extraTags", ")", "{", "return", "getGroupName", "(", "prefixPath", ".", "getPath", "(", ")", ",", ...
Create a GroupName from this NamedResolverMap. @param prefixPath Additional path elements to put in front of the returned path. @param extraTags Additional tags to put in the tag set. The extraTags argument will override any values present in the NamedResolverMap. @return A group name derived from this NamedResolverMa...
[ "Create", "a", "GroupName", "from", "this", "NamedResolverMap", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/intf/src/main/java/com/groupon/lex/metrics/resolver/NamedResolverMap.java#L265-L267
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/XmlUtils.java
XmlUtils.xmlToHtml
public static String xmlToHtml(String payload, File xsltFile) throws AlipayApiException { """ Transforms the XML content to XHTML/HTML format string with the XSL. @param payload the XML payload to convert @param xsltFile the XML stylesheet file @return the transformed XHTML/HTML format string @throws ApiExc...
java
public static String xmlToHtml(String payload, File xsltFile) throws AlipayApiException { String result = null; try { Source template = new StreamSource(xsltFile); Transformer transformer = TransformerFactory.newInstance() .newTransformer(template); ...
[ "public", "static", "String", "xmlToHtml", "(", "String", "payload", ",", "File", "xsltFile", ")", "throws", "AlipayApiException", "{", "String", "result", "=", "null", ";", "try", "{", "Source", "template", "=", "new", "StreamSource", "(", "xsltFile", ")", ...
Transforms the XML content to XHTML/HTML format string with the XSL. @param payload the XML payload to convert @param xsltFile the XML stylesheet file @return the transformed XHTML/HTML format string @throws ApiException problem converting XML to HTML
[ "Transforms", "the", "XML", "content", "to", "XHTML", "/", "HTML", "format", "string", "with", "the", "XSL", "." ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L568-L591
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ProxySelectorImpl.java
ProxySelectorImpl.isNonProxyHost
private boolean isNonProxyHost(String host, String nonProxyHosts) { """ Returns true if the {@code nonProxyHosts} system property pattern exists and matches {@code host}. """ if (host == null || nonProxyHosts == null) { return false; } // construct pattern StringBu...
java
private boolean isNonProxyHost(String host, String nonProxyHosts) { if (host == null || nonProxyHosts == null) { return false; } // construct pattern StringBuilder patternBuilder = new StringBuilder(); for (int i = 0; i < nonProxyHosts.length(); i++) { ch...
[ "private", "boolean", "isNonProxyHost", "(", "String", "host", ",", "String", "nonProxyHosts", ")", "{", "if", "(", "host", "==", "null", "||", "nonProxyHosts", "==", "null", ")", "{", "return", "false", ";", "}", "// construct pattern", "StringBuilder", "patt...
Returns true if the {@code nonProxyHosts} system property pattern exists and matches {@code host}.
[ "Returns", "true", "if", "the", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ProxySelectorImpl.java#L119-L142
google/auto
common/src/main/java/com/google/auto/common/MoreTypes.java
MoreTypes.isTypeOf
public static boolean isTypeOf(final Class<?> clazz, TypeMirror type) { """ Returns true if the raw type underlying the given {@link TypeMirror} represents the same raw type as the given {@link Class} and throws an IllegalArgumentException if the {@link TypeMirror} does not represent a type that can be reference...
java
public static boolean isTypeOf(final Class<?> clazz, TypeMirror type) { checkNotNull(clazz); return type.accept(new IsTypeOf(clazz), null); }
[ "public", "static", "boolean", "isTypeOf", "(", "final", "Class", "<", "?", ">", "clazz", ",", "TypeMirror", "type", ")", "{", "checkNotNull", "(", "clazz", ")", ";", "return", "type", ".", "accept", "(", "new", "IsTypeOf", "(", "clazz", ")", ",", "nul...
Returns true if the raw type underlying the given {@link TypeMirror} represents the same raw type as the given {@link Class} and throws an IllegalArgumentException if the {@link TypeMirror} does not represent a type that can be referenced by a {@link Class}
[ "Returns", "true", "if", "the", "raw", "type", "underlying", "the", "given", "{" ]
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/common/src/main/java/com/google/auto/common/MoreTypes.java#L811-L814
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.parseDuration
public static final long parseDuration(String durationStr, long defaultValue) { """ Parses a duration and returns the corresponding number of milliseconds. Durations consist of a space-separated list of components of the form {number}{time unit}, for example 1d 5m. The available units are d (days), h (hours), ...
java
public static final long parseDuration(String durationStr, long defaultValue) { durationStr = durationStr.toLowerCase().trim(); Matcher matcher = DURATION_NUMBER_AND_UNIT_PATTERN.matcher(durationStr); long millis = 0; boolean matched = false; while (matcher.find()) { ...
[ "public", "static", "final", "long", "parseDuration", "(", "String", "durationStr", ",", "long", "defaultValue", ")", "{", "durationStr", "=", "durationStr", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "Matcher", "matcher", "=", "DURATION_NUMBER_...
Parses a duration and returns the corresponding number of milliseconds. Durations consist of a space-separated list of components of the form {number}{time unit}, for example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p> @param durationStr the duration string @para...
[ "Parses", "a", "duration", "and", "returns", "the", "corresponding", "number", "of", "milliseconds", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L1366-L1393
samskivert/samskivert
src/main/java/com/samskivert/util/RandomUtil.java
RandomUtil.pickRandom
public static <T> T pickRandom (Iterator<T> iter, int count, T skip) { """ Picks a random object from the supplied iterator (which must iterate over exactly <code>count</code> objects. The specified skip object will be skipped when selecting a random value. The skipped object must exist exactly once in the set o...
java
public static <T> T pickRandom (Iterator<T> iter, int count, T skip) { if (count < 2) { throw new IllegalArgumentException( "Must have at least two elements [count=" + count + "]"); } int index = getInt(count-1); T value = null; do { v...
[ "public", "static", "<", "T", ">", "T", "pickRandom", "(", "Iterator", "<", "T", ">", "iter", ",", "int", "count", ",", "T", "skip", ")", "{", "if", "(", "count", "<", "2", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Must have at leas...
Picks a random object from the supplied iterator (which must iterate over exactly <code>count</code> objects. The specified skip object will be skipped when selecting a random value. The skipped object must exist exactly once in the set of objects returned by the iterator. @return a randomly selected item. @exception...
[ "Picks", "a", "random", "object", "from", "the", "supplied", "iterator", "(", "which", "must", "iterate", "over", "exactly", "<code", ">", "count<", "/", "code", ">", "objects", ".", "The", "specified", "skip", "object", "will", "be", "skipped", "when", "s...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/RandomUtil.java#L430-L446
adamfisk/littleshoot-commons-id
src/main/java/org/apache/commons/id/serial/TimeBasedAlphanumericIdentifierGenerator.java
TimeBasedAlphanumericIdentifierGenerator.getMillisecondsFromId
public long getMillisecondsFromId(final Object id, final long offset) { """ Retrieve the number of milliseconds since 1st Jan 1970 that were the base for the given id. @param id the id to use @param offset the offset used to create the id @return the number of milliseconds @throws IllegalArgumentException if...
java
public long getMillisecondsFromId(final Object id, final long offset) { if (id instanceof String && id.toString().length() >= MAX_LONG_ALPHANUMERIC_VALUE_LENGTH) { final char[] buffer = new char[MAX_LONG_ALPHANUMERIC_VALUE_LENGTH]; System.arraycopy( id.toString().toCh...
[ "public", "long", "getMillisecondsFromId", "(", "final", "Object", "id", ",", "final", "long", "offset", ")", "{", "if", "(", "id", "instanceof", "String", "&&", "id", ".", "toString", "(", ")", ".", "length", "(", ")", ">=", "MAX_LONG_ALPHANUMERIC_VALUE_LEN...
Retrieve the number of milliseconds since 1st Jan 1970 that were the base for the given id. @param id the id to use @param offset the offset used to create the id @return the number of milliseconds @throws IllegalArgumentException if <code>id</code> is not a valid id from this type of generator
[ "Retrieve", "the", "number", "of", "milliseconds", "since", "1st", "Jan", "1970", "that", "were", "the", "base", "for", "the", "given", "id", "." ]
train
https://github.com/adamfisk/littleshoot-commons-id/blob/49a8f5f2b10831c509876ca463bf1a87e1e49ae9/src/main/java/org/apache/commons/id/serial/TimeBasedAlphanumericIdentifierGenerator.java#L192-L208
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs.java
FindBugs.processCommandLine
public static void processCommandLine(TextUICommandLine commandLine, String[] argv, IFindBugsEngine findBugs) throws IOException, FilterException { """ Process the command line. @param commandLine the TextUICommandLine object which will parse the command line @param argv the command line argument...
java
public static void processCommandLine(TextUICommandLine commandLine, String[] argv, IFindBugsEngine findBugs) throws IOException, FilterException { // Expand option files in command line. // An argument beginning with "@" is treated as specifying // the name of an option file. ...
[ "public", "static", "void", "processCommandLine", "(", "TextUICommandLine", "commandLine", ",", "String", "[", "]", "argv", ",", "IFindBugsEngine", "findBugs", ")", "throws", "IOException", ",", "FilterException", "{", "// Expand option files in command line.", "// An arg...
Process the command line. @param commandLine the TextUICommandLine object which will parse the command line @param argv the command line arguments @param findBugs the IFindBugsEngine to configure @throws IOException @throws FilterException
[ "Process", "the", "command", "line", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs.java#L328-L365
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java
JmesPathCodeGenVisitor.visit
@Override public String visit(final JmesPathLiteral literal, final Void aVoid) { """ Generates the code for a new JmesPathLiteral. @param literal JmesPath literal type @param aVoid void @return String that represents a call to the new literal expression """ return "new JmesPathLiteral(\"" +...
java
@Override public String visit(final JmesPathLiteral literal, final Void aVoid) { return "new JmesPathLiteral(\"" + StringEscapeUtils .escapeJava(literal.getValue().toString()) + "\")"; }
[ "@", "Override", "public", "String", "visit", "(", "final", "JmesPathLiteral", "literal", ",", "final", "Void", "aVoid", ")", "{", "return", "\"new JmesPathLiteral(\\\"\"", "+", "StringEscapeUtils", ".", "escapeJava", "(", "literal", ".", "getValue", "(", ")", "...
Generates the code for a new JmesPathLiteral. @param literal JmesPath literal type @param aVoid void @return String that represents a call to the new literal expression
[ "Generates", "the", "code", "for", "a", "new", "JmesPathLiteral", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/JmesPathCodeGenVisitor.java#L143-L148
jenkinsci/jenkins
core/src/main/java/hudson/util/CopyOnWriteMap.java
CopyOnWriteMap.replaceBy
public void replaceBy(Map<? extends K, ? extends V> data) { """ Atomically replaces the entire map by the copy of the specified map. """ Map<K, V> d = copy(); d.clear(); d.putAll(data); update(d); }
java
public void replaceBy(Map<? extends K, ? extends V> data) { Map<K, V> d = copy(); d.clear(); d.putAll(data); update(d); }
[ "public", "void", "replaceBy", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "data", ")", "{", "Map", "<", "K", ",", "V", ">", "d", "=", "copy", "(", ")", ";", "d", ".", "clear", "(", ")", ";", "d", ".", "putAll", "("...
Atomically replaces the entire map by the copy of the specified map.
[ "Atomically", "replaces", "the", "entire", "map", "by", "the", "copy", "of", "the", "specified", "map", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/CopyOnWriteMap.java#L75-L80
bmelnychuk/AndroidTreeView
library/src/main/java/com/unnamed/b/atv/view/TwoDScrollView.java
TwoDScrollView.fullScroll
public boolean fullScroll(int direction, boolean horizontal) { """ <p>Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus,...
java
public boolean fullScroll(int direction, boolean horizontal) { if (!horizontal) { boolean down = direction == View.FOCUS_DOWN; int height = getHeight(); mTempRect.top = 0; mTempRect.bottom = height; if (down) { int count = getChildCount...
[ "public", "boolean", "fullScroll", "(", "int", "direction", ",", "boolean", "horizontal", ")", "{", "if", "(", "!", "horizontal", ")", "{", "boolean", "down", "=", "direction", "==", "View", ".", "FOCUS_DOWN", ";", "int", "height", "=", "getHeight", "(", ...
<p>Handles scrolling in response to a "home/end" shortcut press. This method will scroll the view to the top or bottom and give the focus to the topmost/bottommost component in the new visible area. If no component is a good candidate for focus, this scrollview reclaims the focus.</p> @param direction the scroll direc...
[ "<p", ">", "Handles", "scrolling", "in", "response", "to", "a", "home", "/", "end", "shortcut", "press", ".", "This", "method", "will", "scroll", "the", "view", "to", "the", "top", "or", "bottom", "and", "give", "the", "focus", "to", "the", "topmost", ...
train
https://github.com/bmelnychuk/AndroidTreeView/blob/d051ce75f5c9bd5206481808f6133b51f581c8f1/library/src/main/java/com/unnamed/b/atv/view/TwoDScrollView.java#L575-L605
petergeneric/stdlib
guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/HibernateModule.java
HibernateModule.validateHibernateProperties
private void validateHibernateProperties(final GuiceConfig configuration, final Properties hibernateProperties) { """ Checks whether hbm2ddl is set to a prohibited value, throwing an exception if it is @param configuration the global app config @param hibernateProperties the hibernate-specific config @thr...
java
private void validateHibernateProperties(final GuiceConfig configuration, final Properties hibernateProperties) { final boolean allowCreateSchema = configuration.getBoolean(GuiceProperties.HIBERNATE_ALLOW_HBM2DDL_CREATE, false); if (!allowCreateSchema) { // Check that hbm2ddl is not set to a prohibited value...
[ "private", "void", "validateHibernateProperties", "(", "final", "GuiceConfig", "configuration", ",", "final", "Properties", "hibernateProperties", ")", "{", "final", "boolean", "allowCreateSchema", "=", "configuration", ".", "getBoolean", "(", "GuiceProperties", ".", "H...
Checks whether hbm2ddl is set to a prohibited value, throwing an exception if it is @param configuration the global app config @param hibernateProperties the hibernate-specific config @throws IllegalArgumentException if the hibernate.hbm2ddl.auto property is set to a prohibited value
[ "Checks", "whether", "hbm2ddl", "is", "set", "to", "a", "prohibited", "value", "throwing", "an", "exception", "if", "it", "is" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/HibernateModule.java#L171-L189
real-logic/simple-binary-encoding
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java
XmlSchemaParser.handleWarning
public static void handleWarning(final Node node, final String msg) { """ Handle a warning condition as a consequence of parsing. @param node as the context for the warning. @param msg associated with the warning. """ final ErrorHandler handler = (ErrorHandler)node.getOwnerDocument().getUserData(E...
java
public static void handleWarning(final Node node, final String msg) { final ErrorHandler handler = (ErrorHandler)node.getOwnerDocument().getUserData(ERROR_HANDLER_KEY); if (handler == null) { throw new IllegalStateException("WARNING: " + formatLocationInfo(node) + msg); ...
[ "public", "static", "void", "handleWarning", "(", "final", "Node", "node", ",", "final", "String", "msg", ")", "{", "final", "ErrorHandler", "handler", "=", "(", "ErrorHandler", ")", "node", ".", "getOwnerDocument", "(", ")", ".", "getUserData", "(", "ERROR_...
Handle a warning condition as a consequence of parsing. @param node as the context for the warning. @param msg associated with the warning.
[ "Handle", "a", "warning", "condition", "as", "a", "consequence", "of", "parsing", "." ]
train
https://github.com/real-logic/simple-binary-encoding/blob/9a7be490c86d98f0e430e4189bc6c8c4fbef658b/sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java#L258-L270
real-logic/agrona
agrona/src/main/java/org/agrona/concurrent/MappedResizeableBuffer.java
MappedResizeableBuffer.wrap
public void wrap(final long offset, final long length) { """ Remap the buffer using the existing file based on a new offset and length @param offset the offset of the file to start the mapping @param length of the buffer from the given address """ if (offset == addressOffset && length == capacity) ...
java
public void wrap(final long offset, final long length) { if (offset == addressOffset && length == capacity) { return; } wrap(fileChannel, offset, length); }
[ "public", "void", "wrap", "(", "final", "long", "offset", ",", "final", "long", "length", ")", "{", "if", "(", "offset", "==", "addressOffset", "&&", "length", "==", "capacity", ")", "{", "return", ";", "}", "wrap", "(", "fileChannel", ",", "offset", "...
Remap the buffer using the existing file based on a new offset and length @param offset the offset of the file to start the mapping @param length of the buffer from the given address
[ "Remap", "the", "buffer", "using", "the", "existing", "file", "based", "on", "a", "new", "offset", "and", "length" ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/concurrent/MappedResizeableBuffer.java#L100-L108
Harium/keel
src/main/java/com/harium/keel/effect/rotate/RotateOperation.java
RotateOperation.fillColor
public RotateOperation fillColor(int red, int green, int blue) { """ Set Fill color. @param red Red channel's value. @param green Green channel's value. @param blue Blue channel's value. """ this.fillRed = red; this.fillGreen = green; this.fillBlue = blue; return this; ...
java
public RotateOperation fillColor(int red, int green, int blue) { this.fillRed = red; this.fillGreen = green; this.fillBlue = blue; return this; }
[ "public", "RotateOperation", "fillColor", "(", "int", "red", ",", "int", "green", ",", "int", "blue", ")", "{", "this", ".", "fillRed", "=", "red", ";", "this", ".", "fillGreen", "=", "green", ";", "this", ".", "fillBlue", "=", "blue", ";", "return", ...
Set Fill color. @param red Red channel's value. @param green Green channel's value. @param blue Blue channel's value.
[ "Set", "Fill", "color", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/effect/rotate/RotateOperation.java#L70-L75
jenkinsci/jenkins
core/src/main/java/hudson/security/csrf/CrumbIssuer.java
CrumbIssuer.validateCrumb
public boolean validateCrumb(ServletRequest request) { """ Get a crumb from a request parameter and validate it against other data in the current request. The salt and request parameter that is used is defined by the current configuration. @param request """ CrumbIssuerDescriptor<CrumbIssuer> desc...
java
public boolean validateCrumb(ServletRequest request) { CrumbIssuerDescriptor<CrumbIssuer> desc = getDescriptor(); String crumbField = desc.getCrumbRequestField(); String crumbSalt = desc.getCrumbSalt(); return validateCrumb(request, crumbSalt, request.getParameter(crumbField)); }
[ "public", "boolean", "validateCrumb", "(", "ServletRequest", "request", ")", "{", "CrumbIssuerDescriptor", "<", "CrumbIssuer", ">", "desc", "=", "getDescriptor", "(", ")", ";", "String", "crumbField", "=", "desc", ".", "getCrumbRequestField", "(", ")", ";", "Str...
Get a crumb from a request parameter and validate it against other data in the current request. The salt and request parameter that is used is defined by the current configuration. @param request
[ "Get", "a", "crumb", "from", "a", "request", "parameter", "and", "validate", "it", "against", "other", "data", "in", "the", "current", "request", ".", "The", "salt", "and", "request", "parameter", "that", "is", "used", "is", "defined", "by", "the", "curren...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/csrf/CrumbIssuer.java#L115-L121
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.addClass
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException { """ Add an individual class to the map file. @param loader jar file class loader @param jarEntry jar file entry @param wr...
java
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException { String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", "."); writer.writeStartElement("cla...
[ "private", "void", "addClass", "(", "URLClassLoader", "loader", ",", "JarEntry", "jarEntry", ",", "XMLStreamWriter", "writer", ",", "boolean", "mapClassMethods", ")", "throws", "ClassNotFoundException", ",", "XMLStreamException", ",", "IntrospectionException", "{", "Str...
Add an individual class to the map file. @param loader jar file class loader @param jarEntry jar file entry @param writer XML stream writer @param mapClassMethods true if we want to produce .Net style class method names @throws ClassNotFoundException @throws XMLStreamException @throws IntrospectionException
[ "Add", "an", "individual", "class", "to", "the", "map", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L178-L194
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/InputSplitManager.java
InputSplitManager.unregisterJob
public void unregisterJob(final ExecutionGraph executionGraph) { """ Unregisters the given job represented by its {@link ExecutionGraph} with the input split manager. @param executionGraph the job to be unregistered """ final Iterator<ExecutionGroupVertex> it = new ExecutionGroupVertexIterator(execution...
java
public void unregisterJob(final ExecutionGraph executionGraph) { final Iterator<ExecutionGroupVertex> it = new ExecutionGroupVertexIterator(executionGraph, true, -1); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); final InputSplit[] inputSplits = groupVertex.getInputSplits(); ...
[ "public", "void", "unregisterJob", "(", "final", "ExecutionGraph", "executionGraph", ")", "{", "final", "Iterator", "<", "ExecutionGroupVertex", ">", "it", "=", "new", "ExecutionGroupVertexIterator", "(", "executionGraph", ",", "true", ",", "-", "1", ")", ";", "...
Unregisters the given job represented by its {@link ExecutionGraph} with the input split manager. @param executionGraph the job to be unregistered
[ "Unregisters", "the", "given", "job", "represented", "by", "its", "{", "@link", "ExecutionGraph", "}", "with", "the", "input", "split", "manager", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/InputSplitManager.java#L133-L161
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java
GuiceUtil.getDependencies
public Collection<Dependency> getDependencies(Key<?> typeKey, MethodLiteral<?, ?> method) { """ Collects and returns all keys required to inject the given method. @param typeKey the key that depends on injecting the arguments of method @param method method for which required keys are calculated @return requir...
java
public Collection<Dependency> getDependencies(Key<?> typeKey, MethodLiteral<?, ?> method) { String context; if (method.isConstructor()) { context = "@Inject constructor of " + method.getDeclaringType(); } else if (typeKey == Dependency.GINJECTOR) { context = "Member injector " + method; } e...
[ "public", "Collection", "<", "Dependency", ">", "getDependencies", "(", "Key", "<", "?", ">", "typeKey", ",", "MethodLiteral", "<", "?", ",", "?", ">", "method", ")", "{", "String", "context", ";", "if", "(", "method", ".", "isConstructor", "(", ")", "...
Collects and returns all keys required to inject the given method. @param typeKey the key that depends on injecting the arguments of method @param method method for which required keys are calculated @return required keys
[ "Collects", "and", "returns", "all", "keys", "required", "to", "inject", "the", "given", "method", "." ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java#L156-L172
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/security/support/AbstractSecurityController.java
AbstractSecurityController.doPostProcessorAction
protected void doPostProcessorAction(String actionId, Object controlledObject, boolean authorized) { """ Post-process a controlled object after its authorization state has been updated. Subclasses that override this method MUST ensure that this method is called id they do not process the given action id. @par...
java
protected void doPostProcessorAction(String actionId, Object controlledObject, boolean authorized) { if( VISIBLE_TRACKS_AUTHORIZED_ACTION.equals( actionId ) ) { setVisibilityOnControlledObject( controlledObject, authorized ); } }
[ "protected", "void", "doPostProcessorAction", "(", "String", "actionId", ",", "Object", "controlledObject", ",", "boolean", "authorized", ")", "{", "if", "(", "VISIBLE_TRACKS_AUTHORIZED_ACTION", ".", "equals", "(", "actionId", ")", ")", "{", "setVisibilityOnControlled...
Post-process a controlled object after its authorization state has been updated. Subclasses that override this method MUST ensure that this method is called id they do not process the given action id. @param actionId Id of the post-processor action to run @param controlledObject Object being controlled @param authoriz...
[ "Post", "-", "process", "a", "controlled", "object", "after", "its", "authorization", "state", "has", "been", "updated", ".", "Subclasses", "that", "override", "this", "method", "MUST", "ensure", "that", "this", "method", "is", "called", "id", "they", "do", ...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/security/support/AbstractSecurityController.java#L208-L212
looly/hutool
hutool-core/src/main/java/cn/hutool/core/math/Arrangement.java
Arrangement.count
public static long count(int n, int m) { """ 计算排列数,即A(n, m) = n!/(n-m)! @param n 总数 @param m 选择的个数 @return 排列数 """ if(n == m) { return NumberUtil.factorial(n); } return (n > m) ? NumberUtil.factorial(n, n - m) : 0; }
java
public static long count(int n, int m) { if(n == m) { return NumberUtil.factorial(n); } return (n > m) ? NumberUtil.factorial(n, n - m) : 0; }
[ "public", "static", "long", "count", "(", "int", "n", ",", "int", "m", ")", "{", "if", "(", "n", "==", "m", ")", "{", "return", "NumberUtil", ".", "factorial", "(", "n", ")", ";", "}", "return", "(", "n", ">", "m", ")", "?", "NumberUtil", ".", ...
计算排列数,即A(n, m) = n!/(n-m)! @param n 总数 @param m 选择的个数 @return 排列数
[ "计算排列数,即A", "(", "n", "m", ")", "=", "n!", "/", "(", "n", "-", "m", ")", "!" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/math/Arrangement.java#L46-L51
twitter/cloudhopper-commons
ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/GsmUtil.java
GsmUtil.getShortMessageUserDataHeader
static public byte[] getShortMessageUserDataHeader(byte[] shortMessage) throws IllegalArgumentException { """ Gets the "User Data Header" part of a short message byte array. Only call this method if the short message contains a user data header. This method will take the value of the first byte ("N") as the leng...
java
static public byte[] getShortMessageUserDataHeader(byte[] shortMessage) throws IllegalArgumentException { if (shortMessage == null) { return null; } if (shortMessage.length == 0) { return shortMessage; } // the entire length of UDH is the first byte + th...
[ "static", "public", "byte", "[", "]", "getShortMessageUserDataHeader", "(", "byte", "[", "]", "shortMessage", ")", "throws", "IllegalArgumentException", "{", "if", "(", "shortMessage", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "shortMessag...
Gets the "User Data Header" part of a short message byte array. Only call this method if the short message contains a user data header. This method will take the value of the first byte ("N") as the length of the user data header and return the first ("N+1") bytes from the the short message. @param shortMessage The byt...
[ "Gets", "the", "User", "Data", "Header", "part", "of", "a", "short", "message", "byte", "array", ".", "Only", "call", "this", "method", "if", "the", "short", "message", "contains", "a", "user", "data", "header", ".", "This", "method", "will", "take", "th...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/GsmUtil.java#L211-L238
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/util/TextUtils.java
TextUtils.endsWith
public static boolean endsWith(final boolean caseSensitive, final CharSequence text, final char[] suffix) { """ <p> Checks whether a text ends with a specified suffix. </p> @param caseSensitive whether the comparison must be done in a case-sensitive or case-insensitive way. @param text the text to be checked...
java
public static boolean endsWith(final boolean caseSensitive, final CharSequence text, final char[] suffix) { return endsWith(caseSensitive, text, 0, text.length(), suffix, 0, suffix.length); }
[ "public", "static", "boolean", "endsWith", "(", "final", "boolean", "caseSensitive", ",", "final", "CharSequence", "text", ",", "final", "char", "[", "]", "suffix", ")", "{", "return", "endsWith", "(", "caseSensitive", ",", "text", ",", "0", ",", "text", "...
<p> Checks whether a text ends with a specified suffix. </p> @param caseSensitive whether the comparison must be done in a case-sensitive or case-insensitive way. @param text the text to be checked for suffixes. @param suffix the suffix to be searched. @return whether the text ends with the suffix or not.
[ "<p", ">", "Checks", "whether", "a", "text", "ends", "with", "a", "specified", "suffix", ".", "<", "/", "p", ">" ]
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/util/TextUtils.java#L708-L710
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java
LayoutRefiner.restoreCoords
private void restoreCoords(IntStack stack, Point2d[] src) { """ Restore the coordinates of atoms (idxs) in the stack to the provided source. @param stack atom indexes to backup @param src source of coordinates """ for (int i = 0; i < stack.len; i++) { int v = stack.xs[i]; ...
java
private void restoreCoords(IntStack stack, Point2d[] src) { for (int i = 0; i < stack.len; i++) { int v = stack.xs[i]; atoms[v].getPoint2d().x = src[v].x; atoms[v].getPoint2d().y = src[v].y; } }
[ "private", "void", "restoreCoords", "(", "IntStack", "stack", ",", "Point2d", "[", "]", "src", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "stack", ".", "len", ";", "i", "++", ")", "{", "int", "v", "=", "stack", ".", "xs", "[", ...
Restore the coordinates of atoms (idxs) in the stack to the provided source. @param stack atom indexes to backup @param src source of coordinates
[ "Restore", "the", "coordinates", "of", "atoms", "(", "idxs", ")", "in", "the", "stack", "to", "the", "provided", "source", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java#L850-L856
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPUtils.java
RTMPUtils.writeReverseInt
public static void writeReverseInt(IoBuffer out, int value) { """ Writes reversed integer to buffer. @param out Buffer @param value Integer to write """ out.put((byte) (0xFF & value)); out.put((byte) (0xFF & (value >> 8))); out.put((byte) (0xFF & (value >> 16))); out.p...
java
public static void writeReverseInt(IoBuffer out, int value) { out.put((byte) (0xFF & value)); out.put((byte) (0xFF & (value >> 8))); out.put((byte) (0xFF & (value >> 16))); out.put((byte) (0xFF & (value >> 24))); }
[ "public", "static", "void", "writeReverseInt", "(", "IoBuffer", "out", ",", "int", "value", ")", "{", "out", ".", "put", "(", "(", "byte", ")", "(", "0xFF", "&", "value", ")", ")", ";", "out", ".", "put", "(", "(", "byte", ")", "(", "0xFF", "&", ...
Writes reversed integer to buffer. @param out Buffer @param value Integer to write
[ "Writes", "reversed", "integer", "to", "buffer", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPUtils.java#L41-L46
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManagers.java
PropertiesManagers.newManager
public static <T extends Enum<T> & Defaultable> PropertiesManager<T> newManager(File file, Class<T> keyType, Evaluator evaluator, ...
java
public static <T extends Enum<T> & Defaultable> PropertiesManager<T> newManager(File file, Class<T> keyType, Evaluator evaluator, ...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", "&", "Defaultable", ">", "PropertiesManager", "<", "T", ">", "newManager", "(", "File", "file", ",", "Class", "<", "T", ">", "keyType", ",", "Evaluator", "evaluator", ",", "ExecutorService", ...
Build a new manager for the given properties file. @param <T> the type of key used for the new manager @param file the file system location of the properties represented here @param keyType the enumeration of keys in the properties file @param evaluator the evaluator to convert nested property references into fully e...
[ "Build", "a", "new", "manager", "for", "the", "given", "properties", "file", "." ]
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManagers.java#L329-L349
citrusframework/citrus
modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/message/KubernetesMessageConverter.java
KubernetesMessageConverter.getCommand
private KubernetesCommand<?> getCommand(Message message, KubernetesEndpointConfiguration endpointConfiguration) { """ Reads Citrus internal mail message model object from message payload. Either payload is actually a mail message object or XML payload String is unmarshalled to mail message object. @param messa...
java
private KubernetesCommand<?> getCommand(Message message, KubernetesEndpointConfiguration endpointConfiguration) { Object payload = message.getPayload(); KubernetesCommand<?> command; if (message instanceof KubernetesMessage) { command = createCommandFromRequest(message.getPayload(Ku...
[ "private", "KubernetesCommand", "<", "?", ">", "getCommand", "(", "Message", "message", ",", "KubernetesEndpointConfiguration", "endpointConfiguration", ")", "{", "Object", "payload", "=", "message", ".", "getPayload", "(", ")", ";", "KubernetesCommand", "<", "?", ...
Reads Citrus internal mail message model object from message payload. Either payload is actually a mail message object or XML payload String is unmarshalled to mail message object. @param message @param endpointConfiguration @return
[ "Reads", "Citrus", "internal", "mail", "message", "model", "object", "from", "message", "payload", ".", "Either", "payload", "is", "actually", "a", "mail", "message", "object", "or", "XML", "payload", "String", "is", "unmarshalled", "to", "mail", "message", "o...
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-kubernetes/src/main/java/com/consol/citrus/kubernetes/message/KubernetesMessageConverter.java#L161-L187
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxApiAuthentication.java
BoxApiAuthentication.revokeOAuth
BoxRevokeAuthRequest revokeOAuth(String token, String clientId, String clientSecret) { """ Revoke OAuth, to be called when you need to logout a user/revoke authentication. """ BoxRevokeAuthRequest request = new BoxRevokeAuthRequest(mSession, getTokenRevokeUrl(), token, clientId, clientSecret); ...
java
BoxRevokeAuthRequest revokeOAuth(String token, String clientId, String clientSecret) { BoxRevokeAuthRequest request = new BoxRevokeAuthRequest(mSession, getTokenRevokeUrl(), token, clientId, clientSecret); request.setRequestHandler(new BoxRequest.BoxRequestHandler(request){ @Override ...
[ "BoxRevokeAuthRequest", "revokeOAuth", "(", "String", "token", ",", "String", "clientId", ",", "String", "clientSecret", ")", "{", "BoxRevokeAuthRequest", "request", "=", "new", "BoxRevokeAuthRequest", "(", "mSession", ",", "getTokenRevokeUrl", "(", ")", ",", "token...
Revoke OAuth, to be called when you need to logout a user/revoke authentication.
[ "Revoke", "OAuth", "to", "be", "called", "when", "you", "need", "to", "logout", "a", "user", "/", "revoke", "authentication", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxApiAuthentication.java#L66-L77
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/ByteArrayObjectDataInput.java
ByteArrayObjectDataInput.readUTF
@Override public final String readUTF() throws IOException { """ See the general contract of the {@code readUTF} method of {@code DataInput}. <p> Bytes for this operation are read from the contained input stream. @return a Unicode string. @throws java.io.EOFException if this input stream reache...
java
@Override public final String readUTF() throws IOException { int charCount = readInt(); if (charCount == NULL_ARRAY_LENGTH) { return null; } if (charBuffer == null || charCount > charBuffer.length) { charBuffer = new char[charCount]; } byte b; ...
[ "@", "Override", "public", "final", "String", "readUTF", "(", ")", "throws", "IOException", "{", "int", "charCount", "=", "readInt", "(", ")", ";", "if", "(", "charCount", "==", "NULL_ARRAY_LENGTH", ")", "{", "return", "null", ";", "}", "if", "(", "charB...
See the general contract of the {@code readUTF} method of {@code DataInput}. <p> Bytes for this operation are read from the contained input stream. @return a Unicode string. @throws java.io.EOFException if this input stream reaches the end before reading all the bytes @throws java.io.IOException i...
[ "See", "the", "general", "contract", "of", "the", "{", "@code", "readUTF", "}", "method", "of", "{", "@code", "DataInput", "}", ".", "<p", ">", "Bytes", "for", "this", "operation", "are", "read", "from", "the", "contained", "input", "stream", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/ByteArrayObjectDataInput.java#L551-L570
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/VersionServiceImpl.java
VersionServiceImpl.createContainer
private Container createContainer(final FedoraSession session, final String path) { """ /* Creates a minimal container node for further population elsewhere """ try { final Node node = findOrCreateNode(session, path, NT_FOLDER); if (node.canAddMixin(FEDORA_RESOURCE)) { ...
java
private Container createContainer(final FedoraSession session, final String path) { try { final Node node = findOrCreateNode(session, path, NT_FOLDER); if (node.canAddMixin(FEDORA_RESOURCE)) { node.addMixin(FEDORA_RESOURCE); node.addMixin(FEDORA_CONTAINER...
[ "private", "Container", "createContainer", "(", "final", "FedoraSession", "session", ",", "final", "String", "path", ")", "{", "try", "{", "final", "Node", "node", "=", "findOrCreateNode", "(", "session", ",", "path", ",", "NT_FOLDER", ")", ";", "if", "(", ...
/* Creates a minimal container node for further population elsewhere
[ "/", "*", "Creates", "a", "minimal", "container", "node", "for", "further", "population", "elsewhere" ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/VersionServiceImpl.java#L186-L199