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
Metatavu/edelphi
edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/resources/GoogleDocumentDAO.java
GoogleDocumentDAO.updateName
public GoogleDocument updateName(GoogleDocument googleDocument, String name, String urlName) { """ Updates GoogleDocument name. This method does not update lastModifier and lastModified fields and thus should be called only by system operations (e.g. scheduler) @param googleDocument GoogleDocument entity @par...
java
public GoogleDocument updateName(GoogleDocument googleDocument, String name, String urlName) { googleDocument.setName(name); googleDocument.setUrlName(urlName); getEntityManager().persist(googleDocument); return googleDocument; }
[ "public", "GoogleDocument", "updateName", "(", "GoogleDocument", "googleDocument", ",", "String", "name", ",", "String", "urlName", ")", "{", "googleDocument", ".", "setName", "(", "name", ")", ";", "googleDocument", ".", "setUrlName", "(", "urlName", ")", ";", ...
Updates GoogleDocument name. This method does not update lastModifier and lastModified fields and thus should be called only by system operations (e.g. scheduler) @param googleDocument GoogleDocument entity @param name new resource name @param urlName new resource urlName @return Updated GoogleDocument
[ "Updates", "GoogleDocument", "name", ".", "This", "method", "does", "not", "update", "lastModifier", "and", "lastModified", "fields", "and", "thus", "should", "be", "called", "only", "by", "system", "operations", "(", "e", ".", "g", ".", "scheduler", ")" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/resources/GoogleDocumentDAO.java#L72-L77
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/Forward.java
Forward.initializeRelativePath
public void initializeRelativePath(ServletRequest request, String relativeTo) { """ If this is a local path, change it so it's relative to the given path prefix, and remember that we did it in a flag (_outsidePageFlowDirectory). This is a framework-invoked method that should not normally be called directly. ...
java
public void initializeRelativePath(ServletRequest request, String relativeTo) { if ( relativeTo == null ) { relativeTo = _relativeTo; } if ( relativeTo == null ) return; assert ! relativeTo.endsWith("/") : relativeTo; String path = getPath(); ...
[ "public", "void", "initializeRelativePath", "(", "ServletRequest", "request", ",", "String", "relativeTo", ")", "{", "if", "(", "relativeTo", "==", "null", ")", "{", "relativeTo", "=", "_relativeTo", ";", "}", "if", "(", "relativeTo", "==", "null", ")", "ret...
If this is a local path, change it so it's relative to the given path prefix, and remember that we did it in a flag (_outsidePageFlowDirectory). This is a framework-invoked method that should not normally be called directly.
[ "If", "this", "is", "a", "local", "path", "change", "it", "so", "it", "s", "relative", "to", "the", "given", "path", "prefix", "and", "remember", "that", "we", "did", "it", "in", "a", "flag", "(", "_outsidePageFlowDirectory", ")", ".", "This", "is", "a...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/Forward.java#L1096-L1122
Netflix/servo
servo-core/src/main/java/com/netflix/servo/monitor/Monitors.java
Monitors.newCacheMonitor
public static CompositeMonitor<?> newCacheMonitor(String id, Cache<?, ?> cache) { """ Creates a new monitor for a cache with standard metrics for the hits, misses, and loads. @param id id to differentiate metrics for this cache from others. @param cache cache instance to monitor. @return composite monitor ...
java
public static CompositeMonitor<?> newCacheMonitor(String id, Cache<?, ?> cache) { return newObjectMonitor(id, new MonitoredCache(cache)); }
[ "public", "static", "CompositeMonitor", "<", "?", ">", "newCacheMonitor", "(", "String", "id", ",", "Cache", "<", "?", ",", "?", ">", "cache", ")", "{", "return", "newObjectMonitor", "(", "id", ",", "new", "MonitoredCache", "(", "cache", ")", ")", ";", ...
Creates a new monitor for a cache with standard metrics for the hits, misses, and loads. @param id id to differentiate metrics for this cache from others. @param cache cache instance to monitor. @return composite monitor based on stats provided for the cache
[ "Creates", "a", "new", "monitor", "for", "a", "cache", "with", "standard", "metrics", "for", "the", "hits", "misses", "and", "loads", "." ]
train
https://github.com/Netflix/servo/blob/d67b5afce8c50bd9e9e31c288dbf4b78fb2ac815/servo-core/src/main/java/com/netflix/servo/monitor/Monitors.java#L179-L181
mangstadt/biweekly
src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java
ICalPropertyScribe.parseXml
public final T parseXml(Element element, ICalParameters parameters, ParseContext context) { """ Unmarshals a property's value from an XML document (xCal). @param element the property's XML element @param parameters the property's parameters @param context the context @return the unmarshalled property @throws ...
java
public final T parseXml(Element element, ICalParameters parameters, ParseContext context) { T property = _parseXml(new XCalElement(element), parameters, context); property.setParameters(parameters); return property; }
[ "public", "final", "T", "parseXml", "(", "Element", "element", ",", "ICalParameters", "parameters", ",", "ParseContext", "context", ")", "{", "T", "property", "=", "_parseXml", "(", "new", "XCalElement", "(", "element", ")", ",", "parameters", ",", "context", ...
Unmarshals a property's value from an XML document (xCal). @param element the property's XML element @param parameters the property's parameters @param context the context @return the unmarshalled property @throws CannotParseException if the scribe could not parse the property's value @throws SkipMeException if the pro...
[ "Unmarshals", "a", "property", "s", "value", "from", "an", "XML", "document", "(", "xCal", ")", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java#L261-L265
killbill/killbill
util/src/main/java/org/killbill/billing/util/entity/dao/EntitySqlDaoWrapperInvocationHandler.java
EntitySqlDaoWrapperInvocationHandler.errorDuringTransaction
private void errorDuringTransaction(final Throwable t, final Method method, final String extraErrorMessage) throws Throwable { """ Nice method name to ease debugging while looking at log files """ final StringBuilder errorMessageBuilder = new StringBuilder("Error during transaction for sql entity {} an...
java
private void errorDuringTransaction(final Throwable t, final Method method, final String extraErrorMessage) throws Throwable { final StringBuilder errorMessageBuilder = new StringBuilder("Error during transaction for sql entity {} and method {}"); if (t instanceof SQLException) { final SQLEx...
[ "private", "void", "errorDuringTransaction", "(", "final", "Throwable", "t", ",", "final", "Method", "method", ",", "final", "String", "extraErrorMessage", ")", "throws", "Throwable", "{", "final", "StringBuilder", "errorMessageBuilder", "=", "new", "StringBuilder", ...
Nice method name to ease debugging while looking at log files
[ "Nice", "method", "name", "to", "ease", "debugging", "while", "looking", "at", "log", "files" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/entity/dao/EntitySqlDaoWrapperInvocationHandler.java#L162-L184
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/ParameterValue.java
ParameterValue.toCollection
@SuppressWarnings("unchecked") public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) { """ Converts a string value(s) to the target collection type. You may optionally specify a string pattern to assist in the type conversion. @pa...
java
@SuppressWarnings("unchecked") public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) { if (collectionClass == null || classOfT == null) { return null; } try { // reflectively instantiate the...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "X", "extends", "Collection", "<", "T", ">", ",", "T", ">", "X", "toCollection", "(", "Class", "<", "?", "extends", "Collection", ">", "collectionClass", ",", "Class", "<", "T", ">", "cla...
Converts a string value(s) to the target collection type. You may optionally specify a string pattern to assist in the type conversion. @param collectionClass @param classOfT @param pattern optional pattern for interpreting the underlying request string value. (used for date & time conversions) @return a collection o...
[ "Converts", "a", "string", "value", "(", "s", ")", "to", "the", "target", "collection", "type", ".", "You", "may", "optionally", "specify", "a", "string", "pattern", "to", "assist", "in", "the", "type", "conversion", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/ParameterValue.java#L443-L469
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java
OSMTablesFactory.createWayTable
public static PreparedStatement createWayTable(Connection connection, String wayTableName, boolean isH2) throws SQLException { """ Create the ways table that will be used to import OSM ways Example : <way id="26659127" user="Masch" uid="55988" visible="true" version="5" changeset="4142606" timestamp="2010-03-16...
java
public static PreparedStatement createWayTable(Connection connection, String wayTableName, boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(wayTableName); sb.append("(ID_...
[ "public", "static", "PreparedStatement", "createWayTable", "(", "Connection", "connection", ",", "String", "wayTableName", ",", "boolean", "isH2", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "createStatement", "(", ...
Create the ways table that will be used to import OSM ways Example : <way id="26659127" user="Masch" uid="55988" visible="true" version="5" changeset="4142606" timestamp="2010-03-16T11:47:08Z"> @param connection @param wayTableName @return @throws SQLException
[ "Create", "the", "ways", "table", "that", "will", "be", "used", "to", "import", "OSM", "ways", "Example", ":", "<way", "id", "=", "26659127", "user", "=", "Masch", "uid", "=", "55988", "visible", "=", "true", "version", "=", "5", "changeset", "=", "414...
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/osm/OSMTablesFactory.java#L162-L170
drewnoakes/metadata-extractor
Source/com/drew/lang/Rational.java
Rational.toSimpleString
@NotNull public String toSimpleString(boolean allowDecimal) { """ Returns the simplest representation of this {@link Rational}'s value possible. """ if (_denominator == 0 && _numerator != 0) { return toString(); } else if (isInteger()) { return Integer.toString(intVa...
java
@NotNull public String toSimpleString(boolean allowDecimal) { if (_denominator == 0 && _numerator != 0) { return toString(); } else if (isInteger()) { return Integer.toString(intValue()); } else if (_numerator != 1 && _denominator % _numerator == 0) { ...
[ "@", "NotNull", "public", "String", "toSimpleString", "(", "boolean", "allowDecimal", ")", "{", "if", "(", "_denominator", "==", "0", "&&", "_numerator", "!=", "0", ")", "{", "return", "toString", "(", ")", ";", "}", "else", "if", "(", "isInteger", "(", ...
Returns the simplest representation of this {@link Rational}'s value possible.
[ "Returns", "the", "simplest", "representation", "of", "this", "{" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/Rational.java#L197-L218
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/AbstractSetVisible.java
AbstractSetVisible.applyAction
@Override protected void applyAction(final SubordinateTarget target, final Object value) { """ Apply the action against the target. @param target the target of the action @param value is the evaluated value. """ if (value instanceof Boolean) { boolean visible = ((Boolean) value); target.setValidat...
java
@Override protected void applyAction(final SubordinateTarget target, final Object value) { if (value instanceof Boolean) { boolean visible = ((Boolean) value); target.setValidate(visible); ((AbstractWComponent) target).setHidden(!visible); } }
[ "@", "Override", "protected", "void", "applyAction", "(", "final", "SubordinateTarget", "target", ",", "final", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Boolean", ")", "{", "boolean", "visible", "=", "(", "(", "Boolean", ")", "value", ...
Apply the action against the target. @param target the target of the action @param value is the evaluated value.
[ "Apply", "the", "action", "against", "the", "target", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/AbstractSetVisible.java#L33-L40
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyServerHandler.java
NettyServerHandler.returnProcessedBytes
void returnProcessedBytes(Http2Stream http2Stream, int bytes) { """ Returns the given processed bytes back to inbound flow control. """ try { decoder().flowController().consumeBytes(http2Stream, bytes); } catch (Http2Exception e) { throw new RuntimeException(e); } }
java
void returnProcessedBytes(Http2Stream http2Stream, int bytes) { try { decoder().flowController().consumeBytes(http2Stream, bytes); } catch (Http2Exception e) { throw new RuntimeException(e); } }
[ "void", "returnProcessedBytes", "(", "Http2Stream", "http2Stream", ",", "int", "bytes", ")", "{", "try", "{", "decoder", "(", ")", ".", "flowController", "(", ")", ".", "consumeBytes", "(", "http2Stream", ",", "bytes", ")", ";", "}", "catch", "(", "Http2Ex...
Returns the given processed bytes back to inbound flow control.
[ "Returns", "the", "given", "processed", "bytes", "back", "to", "inbound", "flow", "control", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyServerHandler.java#L603-L609
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableArray.java
MutableArray.insertDate
@NonNull @Override public MutableArray insertDate(int index, Date value) { """ Inserts a Date object at the given index. @param index the index. This value must not exceed the bounds of the array. @param value the Date object @return The self object """ return insertValue(index, value); ...
java
@NonNull @Override public MutableArray insertDate(int index, Date value) { return insertValue(index, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableArray", "insertDate", "(", "int", "index", ",", "Date", "value", ")", "{", "return", "insertValue", "(", "index", ",", "value", ")", ";", "}" ]
Inserts a Date object at the given index. @param index the index. This value must not exceed the bounds of the array. @param value the Date object @return The self object
[ "Inserts", "a", "Date", "object", "at", "the", "given", "index", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableArray.java#L527-L531
aerogear/aerogear-unifiedpush-server
common/src/main/java/org/jboss/aerogear/unifiedpush/system/ConfigurationUtils.java
ConfigurationUtils.tryGetProperty
private static String tryGetProperty(String key, String defaultValue) { """ Try to retrieve a system property and returns the defaultValue if SecurityManager blocks it. @param key Name of the system property to get the string for. @param defaultValue Value to be returned on unsuccessful operation or if the pro...
java
private static String tryGetProperty(String key, String defaultValue) { try { return System.getProperty(key, defaultValue); } catch (SecurityException e) { logger.error("Could not get value of property {} due to SecurityManager. Using default value.", key); return nul...
[ "private", "static", "String", "tryGetProperty", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "try", "{", "return", "System", ".", "getProperty", "(", "key", ",", "defaultValue", ")", ";", "}", "catch", "(", "SecurityException", "e", ")", ...
Try to retrieve a system property and returns the defaultValue if SecurityManager blocks it. @param key Name of the system property to get the string for. @param defaultValue Value to be returned on unsuccessful operation or if the propety is not set. @return the value of the System property
[ "Try", "to", "retrieve", "a", "system", "property", "and", "returns", "the", "defaultValue", "if", "SecurityManager", "blocks", "it", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/common/src/main/java/org/jboss/aerogear/unifiedpush/system/ConfigurationUtils.java#L37-L44
glyptodon/guacamole-client
extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java
RadiusConnectionService.sendChallengeResponse
public RadiusPacket sendChallengeResponse(String username, String response, byte[] state) throws GuacamoleException { """ Send a challenge response to the RADIUS server by validating the input and then sending it along to the authenticate method. @param username The username to send to the RADIUS ...
java
public RadiusPacket sendChallengeResponse(String username, String response, byte[] state) throws GuacamoleException { if (username == null || username.isEmpty()) { logger.error("Challenge/response to RADIUS requires a username."); return null; } if (state ==...
[ "public", "RadiusPacket", "sendChallengeResponse", "(", "String", "username", ",", "String", "response", ",", "byte", "[", "]", "state", ")", "throws", "GuacamoleException", "{", "if", "(", "username", "==", "null", "||", "username", ".", "isEmpty", "(", ")", ...
Send a challenge response to the RADIUS server by validating the input and then sending it along to the authenticate method. @param username The username to send to the RADIUS server for authentication. @param response The response phrase to send to the RADIUS server in response to the challenge previously provided. ...
[ "Send", "a", "challenge", "response", "to", "the", "RADIUS", "server", "by", "validating", "the", "input", "and", "then", "sending", "it", "along", "to", "the", "authenticate", "method", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/RadiusConnectionService.java#L285-L305
google/closure-compiler
src/com/google/javascript/jscomp/CrossChunkMethodMotion.java
CrossChunkMethodMotion.movePrototypeDotMethodAssignment
private void movePrototypeDotMethodAssignment(Node destParent, Node functionNode) { """ Move a property defined by assignment to `.prototype` or `.prototype.propName`. <pre><code> Foo.prototype.propName = function() {}; </code></pre> """ checkState(functionNode.isFunction(), functionNode); Node as...
java
private void movePrototypeDotMethodAssignment(Node destParent, Node functionNode) { checkState(functionNode.isFunction(), functionNode); Node assignNode = functionNode.getParent(); checkState(assignNode.isAssign() && functionNode.isSecondChildOf(assignNode), assignNode); Node definitionStatement = assig...
[ "private", "void", "movePrototypeDotMethodAssignment", "(", "Node", "destParent", ",", "Node", "functionNode", ")", "{", "checkState", "(", "functionNode", ".", "isFunction", "(", ")", ",", "functionNode", ")", ";", "Node", "assignNode", "=", "functionNode", ".", ...
Move a property defined by assignment to `.prototype` or `.prototype.propName`. <pre><code> Foo.prototype.propName = function() {}; </code></pre>
[ "Move", "a", "property", "defined", "by", "assignment", "to", ".", "prototype", "or", ".", "prototype", ".", "propName", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CrossChunkMethodMotion.java#L272-L315
jhunters/jprotobuf
jprotobuf-precompile-plugin/src/main/java/com/baidu/jprotobuf/mojo/AbstractExecMojo.java
AbstractExecMojo.collectProjectArtifactsAndClasspath
@SuppressWarnings( "unchecked" ) protected void collectProjectArtifactsAndClasspath( List<Artifact> artifacts, List<File> theClasspathFiles ) { """ Collects the project artifacts in the specified List and the project specific classpath (build output and build test output) Files in the specified List, dependin...
java
@SuppressWarnings( "unchecked" ) protected void collectProjectArtifactsAndClasspath( List<Artifact> artifacts, List<File> theClasspathFiles ) { if ( "compile".equals( classpathScope ) ) { artifacts.addAll( project.getCompileArtifacts() ); theClasspathFiles.add( new File(...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "collectProjectArtifactsAndClasspath", "(", "List", "<", "Artifact", ">", "artifacts", ",", "List", "<", "File", ">", "theClasspathFiles", ")", "{", "if", "(", "\"compile\"", ".", "equals", ...
Collects the project artifacts in the specified List and the project specific classpath (build output and build test output) Files in the specified List, depending on the plugin classpathScope value. @param artifacts the list where to collect the scope specific artifacts @param theClasspathFiles the list where to coll...
[ "Collects", "the", "project", "artifacts", "in", "the", "specified", "List", "and", "the", "project", "specific", "classpath", "(", "build", "output", "and", "build", "test", "output", ")", "Files", "in", "the", "specified", "List", "depending", "on", "the", ...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/jprotobuf-precompile-plugin/src/main/java/com/baidu/jprotobuf/mojo/AbstractExecMojo.java#L93-L124
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ItemResponse.java
ItemResponse.withEventsItemResponse
public ItemResponse withEventsItemResponse(java.util.Map<String, EventItemResponse> eventsItemResponse) { """ A multipart response object that contains a key and value for each event ID in the request. In each object, the event ID is the key, and an EventItemResponse object is the value. @param eventsItemRespo...
java
public ItemResponse withEventsItemResponse(java.util.Map<String, EventItemResponse> eventsItemResponse) { setEventsItemResponse(eventsItemResponse); return this; }
[ "public", "ItemResponse", "withEventsItemResponse", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "EventItemResponse", ">", "eventsItemResponse", ")", "{", "setEventsItemResponse", "(", "eventsItemResponse", ")", ";", "return", "this", ";", "}" ]
A multipart response object that contains a key and value for each event ID in the request. In each object, the event ID is the key, and an EventItemResponse object is the value. @param eventsItemResponse A multipart response object that contains a key and value for each event ID in the request. In each object, the ev...
[ "A", "multipart", "response", "object", "that", "contains", "a", "key", "and", "value", "for", "each", "event", "ID", "in", "the", "request", ".", "In", "each", "object", "the", "event", "ID", "is", "the", "key", "and", "an", "EventItemResponse", "object",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ItemResponse.java#L106-L109
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeLong.java
RedBlackTreeLong.searchNearestHigher
public Node<T> searchNearestHigher(long value, boolean acceptEquals) { """ Returns the node containing the lowest value strictly higher than the given one. """ if (root == null) return null; return searchNearestHigher(root, value, acceptEquals); }
java
public Node<T> searchNearestHigher(long value, boolean acceptEquals) { if (root == null) return null; return searchNearestHigher(root, value, acceptEquals); }
[ "public", "Node", "<", "T", ">", "searchNearestHigher", "(", "long", "value", ",", "boolean", "acceptEquals", ")", "{", "if", "(", "root", "==", "null", ")", "return", "null", ";", "return", "searchNearestHigher", "(", "root", ",", "value", ",", "acceptEqu...
Returns the node containing the lowest value strictly higher than the given one.
[ "Returns", "the", "node", "containing", "the", "lowest", "value", "strictly", "higher", "than", "the", "given", "one", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeLong.java#L310-L313
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java
P2sVpnGatewaysInner.beginGenerateVpnProfileAsync
public Observable<VpnProfileResponseInner> beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName) { """ Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName The name of the P2SV...
java
public Observable<VpnProfileResponseInner> beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName) { return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1<ServiceResponse<VpnProfileResponseInner>, VpnProfileResponseInner>() { @Overrid...
[ "public", "Observable", "<", "VpnProfileResponseInner", ">", "beginGenerateVpnProfileAsync", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ")", "{", "return", "beginGenerateVpnProfileWithServiceResponseAsync", "(", "resourceGroupName", ",", "gatewayName", ...
Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName The name of the P2SVpnGateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VpnProfileRespons...
[ "Generates", "VPN", "profile", "for", "P2S", "client", "of", "the", "P2SVpnGateway", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java#L1241-L1248
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getSAMLAssertion
public SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain, String ipAddress) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Generates a SAML Assertion. @param usernameOrEmail username or email of the OneLogin user accessin...
java
public SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain, String ipAddress) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_SAML_ASSERTI...
[ "public", "SAMLEndpointResponse", "getSAMLAssertion", "(", "String", "usernameOrEmail", ",", "String", "password", ",", "String", "appId", ",", "String", "subdomain", ",", "String", "ipAddress", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", ...
Generates a SAML Assertion. @param usernameOrEmail username or email of the OneLogin user accessing the app @param password Password of the OneLogin user accessing the app @param appId App ID of the app for which you want to generate a SAML token @param subdomain subdomain of the OneLogin account related to the user/a...
[ "Generates", "a", "SAML", "Assertion", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2387-L2430
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/JBossRuleCreator.java
JBossRuleCreator.visit
@Override public void visit(SliceDefinition def) throws ProtempaException { """ Translates a slice definition into rules. @param def a {@link SliceDefinition}. Cannot be <code>null</code>. @throws KnowledgeSourceReadException if an error occurs accessing the knowledge source during rule creation. """ ...
java
@Override public void visit(SliceDefinition def) throws ProtempaException { LOGGER.log(Level.FINER, "Creating rule for {0}", def); try { Set<TemporalExtendedPropositionDefinition> epdsC = def .getTemporalExtendedPropositionDefinitions(); if (!epdsC.isEmpty...
[ "@", "Override", "public", "void", "visit", "(", "SliceDefinition", "def", ")", "throws", "ProtempaException", "{", "LOGGER", ".", "log", "(", "Level", ".", "FINER", ",", "\"Creating rule for {0}\"", ",", "def", ")", ";", "try", "{", "Set", "<", "TemporalExt...
Translates a slice definition into rules. @param def a {@link SliceDefinition}. Cannot be <code>null</code>. @throws KnowledgeSourceReadException if an error occurs accessing the knowledge source during rule creation.
[ "Translates", "a", "slice", "definition", "into", "rules", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/JBossRuleCreator.java#L299-L342
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
BinaryString.keyValue
public BinaryString keyValue(byte split1, byte split2, BinaryString keyName) { """ Parse target string as key-value string and return the value matches key name. If accept any null arguments, return null. example: keyvalue('k1=v1;k2=v2', ';', '=', 'k2') = 'v2' keyvalue('k1:v1,k2:v2', ',', ':', 'k3') = NULL ...
java
public BinaryString keyValue(byte split1, byte split2, BinaryString keyName) { ensureMaterialized(); if (keyName == null || keyName.getSizeInBytes() == 0) { return null; } if (inFirstSegment() && keyName.inFirstSegment()) { // position in byte int byteIdx = 0; // position of last split1 int lastS...
[ "public", "BinaryString", "keyValue", "(", "byte", "split1", ",", "byte", "split2", ",", "BinaryString", "keyName", ")", "{", "ensureMaterialized", "(", ")", ";", "if", "(", "keyName", "==", "null", "||", "keyName", ".", "getSizeInBytes", "(", ")", "==", "...
Parse target string as key-value string and return the value matches key name. If accept any null arguments, return null. example: keyvalue('k1=v1;k2=v2', ';', '=', 'k2') = 'v2' keyvalue('k1:v1,k2:v2', ',', ':', 'k3') = NULL @param split1 separator between key-value tuple. @param split2 separator between key and val...
[ "Parse", "target", "string", "as", "key", "-", "value", "string", "and", "return", "the", "value", "matches", "key", "name", ".", "If", "accept", "any", "null", "arguments", "return", "null", ".", "example", ":", "keyvalue", "(", "k1", "=", "v1", ";", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L936-L965
threerings/narya
core/src/main/java/com/threerings/presents/server/LocalDObjectMgr.java
LocalDObjectMgr.getClientDObjectMgr
public DObjectManager getClientDObjectMgr (final int clientOid) { """ Creates a {@link DObjectManager} that posts directly to this local object manager, but first sets the source oid of all events to properly identify them with the supplied client oid. Normally this oid setting happens when an event is received ...
java
public DObjectManager getClientDObjectMgr (final int clientOid) { return new DObjectManager() { public boolean isManager (DObject object) { return LocalDObjectMgr.this.isManager(object); } public <T extends DObject> void subscribeToObject (int oid, Subscri...
[ "public", "DObjectManager", "getClientDObjectMgr", "(", "final", "int", "clientOid", ")", "{", "return", "new", "DObjectManager", "(", ")", "{", "public", "boolean", "isManager", "(", "DObject", "object", ")", "{", "return", "LocalDObjectMgr", ".", "this", ".", ...
Creates a {@link DObjectManager} that posts directly to this local object manager, but first sets the source oid of all events to properly identify them with the supplied client oid. Normally this oid setting happens when an event is received on the server over the network, but in local mode we have to do it by hand.
[ "Creates", "a", "{" ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/LocalDObjectMgr.java#L56-L76
google/closure-compiler
src/com/google/javascript/jscomp/DiagnosticType.java
DiagnosticType.make
public static DiagnosticType make(String name, CheckLevel level, String descriptionFormat) { """ Create a DiagnosticType at a given CheckLevel. @param name An identifier @param level Either CheckLevel.ERROR or CheckLevel.WARNING @param descriptionFormat A format string @re...
java
public static DiagnosticType make(String name, CheckLevel level, String descriptionFormat) { return new DiagnosticType(name, level, new MessageFormat(descriptionFormat)); }
[ "public", "static", "DiagnosticType", "make", "(", "String", "name", ",", "CheckLevel", "level", ",", "String", "descriptionFormat", ")", "{", "return", "new", "DiagnosticType", "(", "name", ",", "level", ",", "new", "MessageFormat", "(", "descriptionFormat", ")...
Create a DiagnosticType at a given CheckLevel. @param name An identifier @param level Either CheckLevel.ERROR or CheckLevel.WARNING @param descriptionFormat A format string @return A new DiagnosticType
[ "Create", "a", "DiagnosticType", "at", "a", "given", "CheckLevel", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DiagnosticType.java#L84-L88
unbescape/unbescape
src/main/java/org/unbescape/css/CssEscape.java
CssEscape.escapeCssString
public static void escapeCssString(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform a CSS String level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 2</em> means th...
java
public static void escapeCssString(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapeCssString(text, offset, len, writer, CssStringEscapeType.BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA, CssStringEscapeLevel.LEVEL_2_ALL_...
[ "public", "static", "void", "escapeCssString", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeCssString", "(", "text", ",", "off...
<p> Perform a CSS String level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The CSS String basic escape set: <ul> <li>The <em>Backslash Escapes</em>: <tt>&#92;&quot;</tt> (<tt>U+0022</tt>) and <...
[ "<p", ">", "Perform", "a", "CSS", "String", "level", "2", "(", "basic", "set", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/css/CssEscape.java#L725-L730
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ResourceClaim.java
ResourceClaim.releaseTicket
static void releaseTicket(ZooKeeper zookeeper, String lockNode, String ticket) throws KeeperException, InterruptedException { """ Release an acquired lock. @param zookeeper ZooKeeper connection to use. @param lockNode Path to the znode representing the locking queue. @param ticket Name of the firs...
java
static void releaseTicket(ZooKeeper zookeeper, String lockNode, String ticket) throws KeeperException, InterruptedException { logger.debug("Releasing ticket {}.", ticket); try { zookeeper.delete(lockNode + "/" + ticket, -1); } catch (KeeperException e) { if (...
[ "static", "void", "releaseTicket", "(", "ZooKeeper", "zookeeper", ",", "String", "lockNode", ",", "String", "ticket", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "logger", ".", "debug", "(", "\"Releasing ticket {}.\"", ",", "ticket", ")", "...
Release an acquired lock. @param zookeeper ZooKeeper connection to use. @param lockNode Path to the znode representing the locking queue. @param ticket Name of the first node in the queue.
[ "Release", "an", "acquired", "lock", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ResourceClaim.java#L203-L215
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/spout/AmBaseSpout.java
AmBaseSpout.emitWithNoKeyIdAndStream
protected void emitWithNoKeyIdAndStream(StreamMessage message, String streamId) { """ Not use this class's key history function, and not use MessageId(Id identify by storm).<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>Not use this class's key history function.<...
java
protected void emitWithNoKeyIdAndStream(StreamMessage message, String streamId) { this.getCollector().emit(streamId, new Values("", message)); }
[ "protected", "void", "emitWithNoKeyIdAndStream", "(", "StreamMessage", "message", ",", "String", "streamId", ")", "{", "this", ".", "getCollector", "(", ")", ".", "emit", "(", "streamId", ",", "new", "Values", "(", "\"\"", ",", "message", ")", ")", ";", "}...
Not use this class's key history function, and not use MessageId(Id identify by storm).<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>Not use this class's key history function.</li> <li>Not use storm's fault detect function.</li> </ol> @param message sending message @par...
[ "Not", "use", "this", "class", "s", "key", "history", "function", "and", "not", "use", "MessageId", "(", "Id", "identify", "by", "storm", ")", ".", "<br", ">", "Send", "message", "to", "downstream", "component", "with", "streamId", ".", "<br", ">", "Use"...
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/spout/AmBaseSpout.java#L389-L392
kazocsaba/matrix
src/main/java/hu/kazocsaba/math/matrix/MatrixFactory.java
MatrixFactory.createMatrix
public static Matrix createMatrix(int rowCount, int colCount) { """ Creates a new matrix with all elements initialized to 0. @param rowCount the number of rows @param colCount the number of columns @return a new matrix of the specified size @throws IllegalArgumentException if either argument is non-positive ...
java
public static Matrix createMatrix(int rowCount, int colCount) { if (rowCount<=0 || colCount<=0) throw new IllegalArgumentException(); if (colCount==1) return createVector(rowCount); else if (rowCount==2 && colCount==2) return createMatrix2(); else if (rowCount==3 && colCount==3) return createMatrix3();...
[ "public", "static", "Matrix", "createMatrix", "(", "int", "rowCount", ",", "int", "colCount", ")", "{", "if", "(", "rowCount", "<=", "0", "||", "colCount", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "if", "(", "colCount", ...
Creates a new matrix with all elements initialized to 0. @param rowCount the number of rows @param colCount the number of columns @return a new matrix of the specified size @throws IllegalArgumentException if either argument is non-positive
[ "Creates", "a", "new", "matrix", "with", "all", "elements", "initialized", "to", "0", "." ]
train
https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/MatrixFactory.java#L89-L99
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.getAsync
public Observable<Person> getAsync(String personGroupId, UUID personId) { """ Retrieve a person's information, including registered persisted faces, name and userData. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @throws IllegalArgumentExce...
java
public Observable<Person> getAsync(String personGroupId, UUID personId) { return getWithServiceResponseAsync(personGroupId, personId).map(new Func1<ServiceResponse<Person>, Person>() { @Override public Person call(ServiceResponse<Person> response) { return response.body()...
[ "public", "Observable", "<", "Person", ">", "getAsync", "(", "String", "personGroupId", ",", "UUID", "personId", ")", "{", "return", "getWithServiceResponseAsync", "(", "personGroupId", ",", "personId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponse...
Retrieve a person's information, including registered persisted faces, name and userData. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Person obj...
[ "Retrieve", "a", "person", "s", "information", "including", "registered", "persisted", "faces", "name", "and", "userData", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L560-L567
oasp/oasp4j
modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java
RestServiceExceptionFacade.createResponse
protected Response createResponse(Status status, NlsRuntimeException error, Map<String, List<String>> errorsMap) { """ Create a response message as a JSON-String from the given parts. @param status is the HTTP {@link Status}. @param error is the catched or wrapped {@link NlsRuntimeException}. @param errorsMap...
java
protected Response createResponse(Status status, NlsRuntimeException error, Map<String, List<String>> errorsMap) { String message; if (this.exposeInternalErrorDetails) { message = getExposedErrorDetails(error); } else { message = error.getLocalizedMessage(); } return createResponse(stat...
[ "protected", "Response", "createResponse", "(", "Status", "status", ",", "NlsRuntimeException", "error", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "errorsMap", ")", "{", "String", "message", ";", "if", "(", "this", ".", "exposeInternal...
Create a response message as a JSON-String from the given parts. @param status is the HTTP {@link Status}. @param error is the catched or wrapped {@link NlsRuntimeException}. @param errorsMap is a map with all validation errors @return the corresponding {@link Response}.
[ "Create", "a", "response", "message", "as", "a", "JSON", "-", "String", "from", "the", "given", "parts", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java#L406-L415
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java
BitcoinSerializer.makeTransaction
@Override public Transaction makeTransaction(byte[] payloadBytes, int offset, int length, byte[] hashFromHeader) throws ProtocolException { """ Make a transaction from the payload. Extension point for alternative serialization format support. """ return new Transaction(params, payloadB...
java
@Override public Transaction makeTransaction(byte[] payloadBytes, int offset, int length, byte[] hashFromHeader) throws ProtocolException { return new Transaction(params, payloadBytes, offset, null, this, length, hashFromHeader); }
[ "@", "Override", "public", "Transaction", "makeTransaction", "(", "byte", "[", "]", "payloadBytes", ",", "int", "offset", ",", "int", "length", ",", "byte", "[", "]", "hashFromHeader", ")", "throws", "ProtocolException", "{", "return", "new", "Transaction", "(...
Make a transaction from the payload. Extension point for alternative serialization format support.
[ "Make", "a", "transaction", "from", "the", "payload", ".", "Extension", "point", "for", "alternative", "serialization", "format", "support", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java#L308-L312
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java
Configuration.setIfUnset
public void setIfUnset(String name, String value) { """ Sets a property if it is currently unset. @param name the property name @param value the new value """ if (get(name) == null) { set(name, value); } }
java
public void setIfUnset(String name, String value) { if (get(name) == null) { set(name, value); } }
[ "public", "void", "setIfUnset", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "get", "(", "name", ")", "==", "null", ")", "{", "set", "(", "name", ",", "value", ")", ";", "}", "}" ]
Sets a property if it is currently unset. @param name the property name @param value the new value
[ "Sets", "a", "property", "if", "it", "is", "currently", "unset", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java#L437-L441
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/HsqlDateTime.java
HsqlDateTime.getDateTimePart
public static int getDateTimePart(long m, int part) { """ Returns the indicated part of the given <code>java.util.Date</code> object. @param m the millisecond time value from which to extract the indicated part @param part an integer code corresponding to the desired date part @return the indicated part of the ...
java
public static int getDateTimePart(long m, int part) { synchronized (tempCalGMT) { tempCalGMT.setTimeInMillis(m); return tempCalGMT.get(part); } }
[ "public", "static", "int", "getDateTimePart", "(", "long", "m", ",", "int", "part", ")", "{", "synchronized", "(", "tempCalGMT", ")", "{", "tempCalGMT", ".", "setTimeInMillis", "(", "m", ")", ";", "return", "tempCalGMT", ".", "get", "(", "part", ")", ";"...
Returns the indicated part of the given <code>java.util.Date</code> object. @param m the millisecond time value from which to extract the indicated part @param part an integer code corresponding to the desired date part @return the indicated part of the given <code>java.util.Date</code> object
[ "Returns", "the", "indicated", "part", "of", "the", "given", "<code", ">", "java", ".", "util", ".", "Date<", "/", "code", ">", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HsqlDateTime.java#L311-L318
janvanbesien/java-ipv6
src/main/java/com/googlecode/ipv6/IPv6AddressHelpers.java
IPv6AddressHelpers.rewriteIPv4MappedNotation
static String rewriteIPv4MappedNotation(String string) { """ Replaces a w.x.y.z substring at the end of the given string with corresponding hexadecimal notation. This is useful in case the string was using IPv4-Mapped address notation. """ if (!string.contains(".")) { return string...
java
static String rewriteIPv4MappedNotation(String string) { if (!string.contains(".")) { return string; } else { int lastColon = string.lastIndexOf(":"); String firstPart = string.substring(0, lastColon + 1); String mappedIPv4Part ...
[ "static", "String", "rewriteIPv4MappedNotation", "(", "String", "string", ")", "{", "if", "(", "!", "string", ".", "contains", "(", "\".\"", ")", ")", "{", "return", "string", ";", "}", "else", "{", "int", "lastColon", "=", "string", ".", "lastIndexOf", ...
Replaces a w.x.y.z substring at the end of the given string with corresponding hexadecimal notation. This is useful in case the string was using IPv4-Mapped address notation.
[ "Replaces", "a", "w", ".", "x", ".", "y", ".", "z", "substring", "at", "the", "end", "of", "the", "given", "string", "with", "corresponding", "hexadecimal", "notation", ".", "This", "is", "useful", "in", "case", "the", "string", "was", "using", "IPv4", ...
train
https://github.com/janvanbesien/java-ipv6/blob/9af15b4a6c0074f9fa23dfa030027c631b9c2f78/src/main/java/com/googlecode/ipv6/IPv6AddressHelpers.java#L100-L138
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointUnionAxiomImpl_CustomFieldSerializer.java
OWLDisjointUnionAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointUnionAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.goog...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointUnionAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDisjointUnionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointUnionAxiomImpl_CustomFieldSerializer.java#L98-L101
fuinorg/units4j
src/main/java/org/fuin/units4j/AssertCoverage.java
AssertCoverage.isInclude
static boolean isInclude(final Class<?> clasz, final ClassFilter classFilter) { """ Determines if the class meets the following conditions. <br> <ul> <li>Class filter returns TRUE</li> <li>Not an annotation</li> <li>Not an enumeration</li> <li>Not an interface</li> <li>Not abstract</li> </ul> @param clas...
java
static boolean isInclude(final Class<?> clasz, final ClassFilter classFilter) { final int modifiers = clasz.getModifiers(); return classFilter.isIncludeClass(clasz) && !clasz.isAnnotation() && !clasz.isEnum() && !clasz.isInterface() && !Modifier.isAbstract(modifiers); }
[ "static", "boolean", "isInclude", "(", "final", "Class", "<", "?", ">", "clasz", ",", "final", "ClassFilter", "classFilter", ")", "{", "final", "int", "modifiers", "=", "clasz", ".", "getModifiers", "(", ")", ";", "return", "classFilter", ".", "isIncludeClas...
Determines if the class meets the following conditions. <br> <ul> <li>Class filter returns TRUE</li> <li>Not an annotation</li> <li>Not an enumeration</li> <li>Not an interface</li> <li>Not abstract</li> </ul> @param clasz Class to check. @param classFilter Additional filter to use. @return If the class meets the con...
[ "Determines", "if", "the", "class", "meets", "the", "following", "conditions", ".", "<br", ">", "<ul", ">", "<li", ">", "Class", "filter", "returns", "TRUE<", "/", "li", ">", "<li", ">", "Not", "an", "annotation<", "/", "li", ">", "<li", ">", "Not", ...
train
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/AssertCoverage.java#L218-L222
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchAll
public CMAArray<CMAContentType> fetchAll(Map<String, String> query) { """ Fetch all Content Types from the configured space and environment, using default query parameter. <p> This fetch uses the default parameter defined in {@link DefaultQueryParameter#FETCH} @param query to specify to narrow down results. ...
java
public CMAArray<CMAContentType> fetchAll(Map<String, String> query) { return fetchAll(spaceId, environmentId, query); }
[ "public", "CMAArray", "<", "CMAContentType", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "return", "fetchAll", "(", "spaceId", ",", "environmentId", ",", "query", ")", ";", "}" ]
Fetch all Content Types from the configured space and environment, using default query parameter. <p> This fetch uses the default parameter defined in {@link DefaultQueryParameter#FETCH} @param query to specify to narrow down results. @return {@link CMAArray} result instance @throws IllegalArgumentException if spaceId...
[ "Fetch", "all", "Content", "Types", "from", "the", "configured", "space", "and", "environment", "using", "default", "query", "parameter", ".", "<p", ">", "This", "fetch", "uses", "the", "default", "parameter", "defined", "in", "{", "@link", "DefaultQueryParamete...
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L168-L170
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java
DynamicJasperHelper.generateJasperReport
public static JasperReport generateJasperReport(DynamicReport dr, LayoutManager layoutManager, Map generatedParams) throws JRException { """ Compiles the report and applies the layout. <b>generatedParams</b> MUST NOT BE NULL All the key objects from the generatedParams map that are String, will be registered as p...
java
public static JasperReport generateJasperReport(DynamicReport dr, LayoutManager layoutManager, Map generatedParams) throws JRException { log.info("generating JasperReport (DynamicReport dr, LayoutManager layoutManager, Map generatedParams)"); return generateJasperReport(dr, layoutManager, generatedParam...
[ "public", "static", "JasperReport", "generateJasperReport", "(", "DynamicReport", "dr", ",", "LayoutManager", "layoutManager", ",", "Map", "generatedParams", ")", "throws", "JRException", "{", "log", ".", "info", "(", "\"generating JasperReport (DynamicReport dr, LayoutMana...
Compiles the report and applies the layout. <b>generatedParams</b> MUST NOT BE NULL All the key objects from the generatedParams map that are String, will be registered as parameters of the report. @param dr @param layoutManager @param generatedParams @return @throws JRException
[ "Compiles", "the", "report", "and", "applies", "the", "layout", ".", "<b", ">", "generatedParams<", "/", "b", ">", "MUST", "NOT", "BE", "NULL", "All", "the", "key", "objects", "from", "the", "generatedParams", "map", "that", "are", "String", "will", "be", ...
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java#L504-L507
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwpolicy_stats.java
appfwpolicy_stats.get
public static appfwpolicy_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of appfwpolicy_stats resource of given name . """ appfwpolicy_stats obj = new appfwpolicy_stats(); obj.set_name(name); appfwpolicy_stats response = (appfwpolicy_stats) obj.stat_...
java
public static appfwpolicy_stats get(nitro_service service, String name) throws Exception{ appfwpolicy_stats obj = new appfwpolicy_stats(); obj.set_name(name); appfwpolicy_stats response = (appfwpolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "appfwpolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwpolicy_stats", "obj", "=", "new", "appfwpolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", ...
Use this API to fetch statistics of appfwpolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "appfwpolicy_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwpolicy_stats.java#L169-L174
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Snappy.java
Snappy.calculateChecksum
static int calculateChecksum(ByteBuf data, int offset, int length) { """ Computes the CRC32C checksum of the supplied data and performs the "mask" operation on the computed checksum @param data The input data to calculate the CRC32C checksum of """ Crc32c crc32 = new Crc32c(); try { ...
java
static int calculateChecksum(ByteBuf data, int offset, int length) { Crc32c crc32 = new Crc32c(); try { crc32.update(data, offset, length); return maskChecksum((int) crc32.getValue()); } finally { crc32.reset(); } }
[ "static", "int", "calculateChecksum", "(", "ByteBuf", "data", ",", "int", "offset", ",", "int", "length", ")", "{", "Crc32c", "crc32", "=", "new", "Crc32c", "(", ")", ";", "try", "{", "crc32", ".", "update", "(", "data", ",", "offset", ",", "length", ...
Computes the CRC32C checksum of the supplied data and performs the "mask" operation on the computed checksum @param data The input data to calculate the CRC32C checksum of
[ "Computes", "the", "CRC32C", "checksum", "of", "the", "supplied", "data", "and", "performs", "the", "mask", "operation", "on", "the", "computed", "checksum" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Snappy.java#L606-L614
opengeospatial/teamengine
teamengine-spi/src/main/java/com/occamlab/te/spi/util/HtmlReport.java
HtmlReport.getHtmlResultZip
public static File getHtmlResultZip (String outputDirectory) throws FileNotFoundException { """ This method will return the HTML result with zip file. @param outputDirectory @return @throws FileNotFoundException """ File htmlResult = earlHtmlReport(outputDirectory); File htmlResultFile = new File(ou...
java
public static File getHtmlResultZip (String outputDirectory) throws FileNotFoundException{ File htmlResult = earlHtmlReport(outputDirectory); File htmlResultFile = new File(outputDirectory, "result.zip"); try { zipDir(htmlResultFile, htmlResult); } catch (Exception e) { LOGR.log( Leve...
[ "public", "static", "File", "getHtmlResultZip", "(", "String", "outputDirectory", ")", "throws", "FileNotFoundException", "{", "File", "htmlResult", "=", "earlHtmlReport", "(", "outputDirectory", ")", ";", "File", "htmlResultFile", "=", "new", "File", "(", "outputDi...
This method will return the HTML result with zip file. @param outputDirectory @return @throws FileNotFoundException
[ "This", "method", "will", "return", "the", "HTML", "result", "with", "zip", "file", ".", "@param", "outputDirectory" ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-spi/src/main/java/com/occamlab/te/spi/util/HtmlReport.java#L55-L65
rnorth/visible-assertions
src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java
VisibleAssertions.assertRoughlyEquals
public static void assertRoughlyEquals(String message, Double expected, Double actual, Double epsilon) { """ Assert that an actual value is approximately equal to an expected value - determined by whether the difference between the two values is less than a provided epsilon value. <p> If the assertion passes, a...
java
public static void assertRoughlyEquals(String message, Double expected, Double actual, Double epsilon) { String expectedInQuotes = inQuotesIfNotNull(expected); String actualInQuotes = inQuotesIfNotNull(actual); if (areBothNull(expected, actual)) { pass(message); } else if (...
[ "public", "static", "void", "assertRoughlyEquals", "(", "String", "message", ",", "Double", "expected", ",", "Double", "actual", ",", "Double", "epsilon", ")", "{", "String", "expectedInQuotes", "=", "inQuotesIfNotNull", "(", "expected", ")", ";", "String", "act...
Assert that an actual value is approximately equal to an expected value - determined by whether the difference between the two values is less than a provided epsilon value. <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be shown. @param message message to display alo...
[ "Assert", "that", "an", "actual", "value", "is", "approximately", "equal", "to", "an", "expected", "value", "-", "determined", "by", "whether", "the", "difference", "between", "the", "two", "values", "is", "less", "than", "a", "provided", "epsilon", "value", ...
train
https://github.com/rnorth/visible-assertions/blob/6d7a7724db40ac0e9f87279553f814b790310b3b/src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java#L212-L224
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java
ClusterComputeResourceService.getClusterConfiguration
private ClusterConfigInfoEx getClusterConfiguration(ConnectionResources connectionResources, ManagedObjectReference clusterMor, String clusterName) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg { """ Das method gets the current cluster configurations. ...
java
private ClusterConfigInfoEx getClusterConfiguration(ConnectionResources connectionResources, ManagedObjectReference clusterMor, String clusterName) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg { ObjectContent[] objectContents = GetObjectProperties....
[ "private", "ClusterConfigInfoEx", "getClusterConfiguration", "(", "ConnectionResources", "connectionResources", ",", "ManagedObjectReference", "clusterMor", ",", "String", "clusterName", ")", "throws", "RuntimeFaultFaultMsg", ",", "InvalidPropertyFaultMsg", "{", "ObjectContent", ...
Das method gets the current cluster configurations. @param connectionResources @param clusterMor @param clusterName @return @throws RuntimeFaultFaultMsg @throws InvalidPropertyFaultMsg
[ "Das", "method", "gets", "the", "current", "cluster", "configurations", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java#L483-L493
LearnLib/learnlib
algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/adt/ADT.java
ADT.extendLeaf
public ADTNode<S, I, O> extendLeaf(final ADTNode<S, I, O> nodeToSplit, final Word<I> distinguishingSuffix, final Word<O> oldOutput, final Word<O> newOutput) { """ Splitting a leaf node by extending ...
java
public ADTNode<S, I, O> extendLeaf(final ADTNode<S, I, O> nodeToSplit, final Word<I> distinguishingSuffix, final Word<O> oldOutput, final Word<O> newOutput) { if (!ADTUtil.isLeafNode(nodeToSplit...
[ "public", "ADTNode", "<", "S", ",", "I", ",", "O", ">", "extendLeaf", "(", "final", "ADTNode", "<", "S", ",", "I", ",", "O", ">", "nodeToSplit", ",", "final", "Word", "<", "I", ">", "distinguishingSuffix", ",", "final", "Word", "<", "O", ">", "oldO...
Splitting a leaf node by extending the trace leading into the node to split. @param nodeToSplit the leaf node to extends @param distinguishingSuffix the input sequence that splits the hypothesis state of the leaf to split and the new node. The current trace leading into the node to split must be a prefix of this word....
[ "Splitting", "a", "leaf", "node", "by", "extending", "the", "trace", "leading", "into", "the", "node", "to", "split", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/adt/ADT.java#L146-L166
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.doIsNull
private ZealotKhala doIsNull(String prefix, String field, boolean match, boolean positive) { """ 执行生成" IS NULL "SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param match 是否匹配 @param positive true则表示是 IS NULL,否则是IS NOT NULL @return ZealotKhala实例的当前实例 """ if (match) { // 判断是"IS NULL"还是"...
java
private ZealotKhala doIsNull(String prefix, String field, boolean match, boolean positive) { if (match) { // 判断是"IS NULL"还是"IS NOT NULL"来设置source实例. this.source = this.source.setPrefix(prefix) .setSuffix(positive ? ZealotConst.IS_NULL_SUFFIX : ZealotConst.IS_NOT_NULL_...
[ "private", "ZealotKhala", "doIsNull", "(", "String", "prefix", ",", "String", "field", ",", "boolean", "match", ",", "boolean", "positive", ")", "{", "if", "(", "match", ")", "{", "// 判断是\"IS NULL\"还是\"IS NOT NULL\"来设置source实例.", "this", ".", "source", "=", "thi...
执行生成" IS NULL "SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param match 是否匹配 @param positive true则表示是 IS NULL,否则是IS NOT NULL @return ZealotKhala实例的当前实例
[ "执行生成", "IS", "NULL", "SQL片段的方法", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L505-L514
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/BaiduMessage.java
BaiduMessage.withData
public BaiduMessage withData(java.util.Map<String, String> data) { """ The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' o...
java
public BaiduMessage withData(java.util.Map<String, String> data) { setData(data); return this; }
[ "public", "BaiduMessage", "withData", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "setData", "(", "data", ")", ";", "return", "this", ";", "}" ]
The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @return Returns a reference to this object so that method calls can be chai...
[ "The", "data", "payload", "used", "for", "a", "silent", "push", ".", "This", "payload", "is", "added", "to", "the", "notifications", "data", ".", "pinpoint", ".", "jsonBody", "object" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/BaiduMessage.java#L231-L234
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java
CsvFiles.getCsvDataListMap
public static List<Map<String, String>> getCsvDataListMap(String fileName, boolean headerPresent) throws IOException { """ Returns a {@code List<Map<String, String>>} that contains all rows with a field mapping defined by the header. If no header is present, then each field is the 0-indexed column number. ...
java
public static List<Map<String, String>> getCsvDataListMap(String fileName, boolean headerPresent) throws IOException { final List<Map<String, String>> result = Lists.newArrayList(); new CsvReader(fileName, headerPresent) .processReader( (headers, line, lineNumber) -> { Ma...
[ "public", "static", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "getCsvDataListMap", "(", "String", "fileName", ",", "boolean", "headerPresent", ")", "throws", "IOException", "{", "final", "List", "<", "Map", "<", "String", ",", "String", "...
Returns a {@code List<Map<String, String>>} that contains all rows with a field mapping defined by the header. If no header is present, then each field is the 0-indexed column number. @param fileName the CSV file to load @param headerPresent {@code true} if the first line is the header @return a {@code List<Map<String...
[ "Returns", "a", "{", "@code", "List<Map<String", "String", ">>", "}", "that", "contains", "all", "rows", "with", "a", "field", "mapping", "defined", "by", "the", "header", ".", "If", "no", "header", "is", "present", "then", "each", "field", "is", "the", ...
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java#L121-L138
leadware/jpersistence-tools
jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java
RestrictionsContainer.addLike
public RestrictionsContainer addLike(String property, String value) { """ Methode d'ajout de la restriction Like @param property Nom de la Propriete @param value Valeur de la propriete @return Conteneur """ // Ajout de la restriction restrictions.add(new Like(property, value)); // On retour...
java
public RestrictionsContainer addLike(String property, String value) { // Ajout de la restriction restrictions.add(new Like(property, value)); // On retourne le conteneur return this; }
[ "public", "RestrictionsContainer", "addLike", "(", "String", "property", ",", "String", "value", ")", "{", "// Ajout de la restriction\r", "restrictions", ".", "add", "(", "new", "Like", "(", "property", ",", "value", ")", ")", ";", "// On retourne le conteneur\r", ...
Methode d'ajout de la restriction Like @param property Nom de la Propriete @param value Valeur de la propriete @return Conteneur
[ "Methode", "d", "ajout", "de", "la", "restriction", "Like" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L168-L175
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPUtility.java
MPPUtility.getPercentage
public static final Double getPercentage(byte[] data, int offset) { """ Utility method to read a percentage value. @param data data block @param offset offset into data block @return percentage value """ int value = MPPUtility.getShort(data, offset); Double result = null; if (value >= 0 ...
java
public static final Double getPercentage(byte[] data, int offset) { int value = MPPUtility.getShort(data, offset); Double result = null; if (value >= 0 && value <= 100) { result = NumberHelper.getDouble(value); } return result; }
[ "public", "static", "final", "Double", "getPercentage", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "int", "value", "=", "MPPUtility", ".", "getShort", "(", "data", ",", "offset", ")", ";", "Double", "result", "=", "null", ";", "if",...
Utility method to read a percentage value. @param data data block @param offset offset into data block @return percentage value
[ "Utility", "method", "to", "read", "a", "percentage", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L923-L932
AdeptInternet/auth-java
saml/src/main/java/org/adeptnet/auth/saml/SAMLClient.java
SAMLClient.validateResponsePOST
public AttributeSet validateResponsePOST(final String _authnResponse) throws SAMLException { """ Check an authnResponse and return the subject if validation succeeds. The NameID from the subject in the first valid assertion is returned along with the attributes. @param _authnResponse a base64-encoded AuthnRes...
java
public AttributeSet validateResponsePOST(final String _authnResponse) throws SAMLException { final byte[] decoded = DatatypeConverter.parseBase64Binary(_authnResponse); final String authnResponse; try { authnResponse = new String(decoded, "UTF-8"); if (LOG.isTraceEnabled(...
[ "public", "AttributeSet", "validateResponsePOST", "(", "final", "String", "_authnResponse", ")", "throws", "SAMLException", "{", "final", "byte", "[", "]", "decoded", "=", "DatatypeConverter", ".", "parseBase64Binary", "(", "_authnResponse", ")", ";", "final", "Stri...
Check an authnResponse and return the subject if validation succeeds. The NameID from the subject in the first valid assertion is returned along with the attributes. @param _authnResponse a base64-encoded AuthnResponse from the SP @throws SAMLException if validation failed. @return the authenticated subject/attributes...
[ "Check", "an", "authnResponse", "and", "return", "the", "subject", "if", "validation", "succeeds", ".", "The", "NameID", "from", "the", "subject", "in", "the", "first", "valid", "assertion", "is", "returned", "along", "with", "the", "attributes", "." ]
train
https://github.com/AdeptInternet/auth-java/blob/644116ed1f50bf899b9cecc5e3682bac7abf7007/saml/src/main/java/org/adeptnet/auth/saml/SAMLClient.java#L520-L541
aerogear/aerogear-crypto-java
src/main/java/org/jboss/aerogear/crypto/Util.java
Util.formatter
public static String formatter(Algorithm algorithm, Mode mode) { """ Utility method to format algorithms name in Java like way @param algorithm @param mode @return string name with the formatted algorithm """ return String.format("%s/%s", algorithm, mode); }
java
public static String formatter(Algorithm algorithm, Mode mode) { return String.format("%s/%s", algorithm, mode); }
[ "public", "static", "String", "formatter", "(", "Algorithm", "algorithm", ",", "Mode", "mode", ")", "{", "return", "String", ".", "format", "(", "\"%s/%s\"", ",", "algorithm", ",", "mode", ")", ";", "}" ]
Utility method to format algorithms name in Java like way @param algorithm @param mode @return string name with the formatted algorithm
[ "Utility", "method", "to", "format", "algorithms", "name", "in", "Java", "like", "way" ]
train
https://github.com/aerogear/aerogear-crypto-java/blob/3a371780f7deff603f5a7a1dd3de1eeb5e147202/src/main/java/org/jboss/aerogear/crypto/Util.java#L80-L82
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java
UtilWavelet.borderInverseUpper
public static int borderInverseUpper( WlBorderCoef<?> desc , BorderIndex1D border, int dataLength ) { """ Returns the upper border (offset from image edge) for an inverse wavelet transform. """ WlCoef inner = desc.getInnerCoefficients(); int borderSize = borderForwardUpper(inner,dataLength); borderSize ...
java
public static int borderInverseUpper( WlBorderCoef<?> desc , BorderIndex1D border, int dataLength ) { WlCoef inner = desc.getInnerCoefficients(); int borderSize = borderForwardUpper(inner,dataLength); borderSize += borderSize%2; WlCoef uu = borderSize > 0 ? inner : null; WlCoef ul = uu; WlCoef ll = inner;...
[ "public", "static", "int", "borderInverseUpper", "(", "WlBorderCoef", "<", "?", ">", "desc", ",", "BorderIndex1D", "border", ",", "int", "dataLength", ")", "{", "WlCoef", "inner", "=", "desc", ".", "getInnerCoefficients", "(", ")", ";", "int", "borderSize", ...
Returns the upper border (offset from image edge) for an inverse wavelet transform.
[ "Returns", "the", "upper", "border", "(", "offset", "from", "image", "edge", ")", "for", "an", "inverse", "wavelet", "transform", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java#L247-L274
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java
MetadataService.addRepo
public CompletableFuture<Revision> addRepo(Author author, String projectName, String repoName) { """ Adds a {@link RepositoryMetadata} of the specified {@code repoName} to the specified {@code projectName} with a default {@link PerRolePermissions}. """ return addRepo(author, projectName, repoName, Per...
java
public CompletableFuture<Revision> addRepo(Author author, String projectName, String repoName) { return addRepo(author, projectName, repoName, PerRolePermissions.DEFAULT); }
[ "public", "CompletableFuture", "<", "Revision", ">", "addRepo", "(", "Author", "author", ",", "String", "projectName", ",", "String", "repoName", ")", "{", "return", "addRepo", "(", "author", ",", "projectName", ",", "repoName", ",", "PerRolePermissions", ".", ...
Adds a {@link RepositoryMetadata} of the specified {@code repoName} to the specified {@code projectName} with a default {@link PerRolePermissions}.
[ "Adds", "a", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java#L225-L227
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/util/FileUtils.java
FileUtils.getFileResource
public static Resource getFileResource(String filePath, TestContext context) { """ Reads file resource from path with variable replacement support. @param filePath @param context @return """ if (filePath.contains(FILE_PATH_CHARSET_PARAMETER)) { return new PathMatchingResourcePatternResol...
java
public static Resource getFileResource(String filePath, TestContext context) { if (filePath.contains(FILE_PATH_CHARSET_PARAMETER)) { return new PathMatchingResourcePatternResolver().getResource( context.replaceDynamicContentInString(filePath.substring(0, filePath.indexOf(FileUtil...
[ "public", "static", "Resource", "getFileResource", "(", "String", "filePath", ",", "TestContext", "context", ")", "{", "if", "(", "filePath", ".", "contains", "(", "FILE_PATH_CHARSET_PARAMETER", ")", ")", "{", "return", "new", "PathMatchingResourcePatternResolver", ...
Reads file resource from path with variable replacement support. @param filePath @param context @return
[ "Reads", "file", "resource", "from", "path", "with", "variable", "replacement", "support", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/FileUtils.java#L243-L251
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.readExcel2List
public List<List<String>> readExcel2List(InputStream is, int offsetLine) throws IOException, InvalidFormatException { """ 读取Excel表格数据,返回{@code List[List[String]]}类型的数据集合 @param is 待读取Excel的数据流 @param offsetLine Excel表头行(默认是0) @return 返回{@code List<List<String>>}类型的数据集合 @throws IOException...
java
public List<List<String>> readExcel2List(InputStream is, int offsetLine) throws IOException, InvalidFormatException { try (Workbook workbook = WorkbookFactory.create(is)) { return readExcel2ObjectsHandler(workbook, offsetLine, Integer.MAX_VALUE, 0); } }
[ "public", "List", "<", "List", "<", "String", ">", ">", "readExcel2List", "(", "InputStream", "is", ",", "int", "offsetLine", ")", "throws", "IOException", ",", "InvalidFormatException", "{", "try", "(", "Workbook", "workbook", "=", "WorkbookFactory", ".", "cr...
读取Excel表格数据,返回{@code List[List[String]]}类型的数据集合 @param is 待读取Excel的数据流 @param offsetLine Excel表头行(默认是0) @return 返回{@code List<List<String>>}类型的数据集合 @throws IOException 异常 @throws InvalidFormatException 异常 @author Crab2Died
[ "读取Excel表格数据", "返回", "{", "@code", "List", "[", "List", "[", "String", "]]", "}", "类型的数据集合" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L375-L381
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java
CookieHelper.createCookie
@Nonnull public static Cookie createCookie (@Nonnull final String sName, @Nullable final String sValue, final String sPath, final boolean bExpireWhenBrowserIsClosed) { """ Create a cookie that is bound ...
java
@Nonnull public static Cookie createCookie (@Nonnull final String sName, @Nullable final String sValue, final String sPath, final boolean bExpireWhenBrowserIsClosed) { final Cookie aCookie = new Cookie...
[ "@", "Nonnull", "public", "static", "Cookie", "createCookie", "(", "@", "Nonnull", "final", "String", "sName", ",", "@", "Nullable", "final", "String", "sValue", ",", "final", "String", "sPath", ",", "final", "boolean", "bExpireWhenBrowserIsClosed", ")", "{", ...
Create a cookie that is bound on a certain path within the local web server. @param sName The cookie name. @param sValue The cookie value. @param sPath The path the cookie is valid for. @param bExpireWhenBrowserIsClosed <code>true</code> if this is a browser session cookie @return The created cookie object.
[ "Create", "a", "cookie", "that", "is", "bound", "on", "a", "certain", "path", "within", "the", "local", "web", "server", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java#L99-L112
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/EthiopicChronology.java
EthiopicChronology.dateYearDay
@Override public EthiopicDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { """ Obtains a local date in Ethiopic calendar system from the era, year-of-era and day-of-year fields. @param era the Ethiopic era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the...
java
@Override public EthiopicDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "@", "Override", "public", "EthiopicDate", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "return", "dateYearDay", "(", "prolepticYear", "(", "era", ",", "yearOfEra", ")", ",", "dayOfYear", ")", ";", "}" ]
Obtains a local date in Ethiopic calendar system from the era, year-of-era and day-of-year fields. @param era the Ethiopic era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the Ethiopic local date, not null @throws DateTimeException if unable to create the date @throws ClassCas...
[ "Obtains", "a", "local", "date", "in", "Ethiopic", "calendar", "system", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L183-L186
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.fileCopy
public final void fileCopy(File in, File out) throws IOException { """ Copy a file. @param in input file. @param out output file. @throws IOException on error. """ assert in != null; assert out != null; getLog().debug("Copying file: " + in.toString() + " into " + out.toString()); //$NON-NLS-1$ //$NO...
java
public final void fileCopy(File in, File out) throws IOException { assert in != null; assert out != null; getLog().debug("Copying file: " + in.toString() + " into " + out.toString()); //$NON-NLS-1$ //$NON-NLS-2$ try (FileInputStream fis = new FileInputStream(in)) { try (FileChannel inChannel = fis.getChannel...
[ "public", "final", "void", "fileCopy", "(", "File", "in", ",", "File", "out", ")", "throws", "IOException", "{", "assert", "in", "!=", "null", ";", "assert", "out", "!=", "null", ";", "getLog", "(", ")", ".", "debug", "(", "\"Copying file: \"", "+", "i...
Copy a file. @param in input file. @param out output file. @throws IOException on error.
[ "Copy", "a", "file", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L332-L347
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_MEASURED_VALUE_Image
protected BufferedImage create_MEASURED_VALUE_Image(final int WIDTH, final Color COLOR, final double ROTATION_OFFSET) { """ Returns the image of the MinMeasuredValue and MaxMeasuredValue dependend @param WIDTH @param COLOR @param ROTATION_OFFSET @return the image of the min or max measured value """ ...
java
protected BufferedImage create_MEASURED_VALUE_Image(final int WIDTH, final Color COLOR, final double ROTATION_OFFSET) { if (WIDTH <= 36) // 36 is needed otherwise the image size could be smaller than 1 { return UTIL.createImage(1, 1, Transparency.TRANSLUCENT); } final int IM...
[ "protected", "BufferedImage", "create_MEASURED_VALUE_Image", "(", "final", "int", "WIDTH", ",", "final", "Color", "COLOR", ",", "final", "double", "ROTATION_OFFSET", ")", "{", "if", "(", "WIDTH", "<=", "36", ")", "// 36 is needed otherwise the image size could be smalle...
Returns the image of the MinMeasuredValue and MaxMeasuredValue dependend @param WIDTH @param COLOR @param ROTATION_OFFSET @return the image of the min or max measured value
[ "Returns", "the", "image", "of", "the", "MinMeasuredValue", "and", "MaxMeasuredValue", "dependend" ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L2923-L2951
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseWebIdentitySessionContext
private WebIdentitySessionContext parseWebIdentitySessionContext(SessionContext sessionContext) throws IOException { """ Parses the {@link WebIdentitySessionContext} object. @param sessionContext {@link SessionContext} @return the web identity session context @throws IOException """ if (jsonParser...
java
private WebIdentitySessionContext parseWebIdentitySessionContext(SessionContext sessionContext) throws IOException { if (jsonParser.nextToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a WebIdentitySessionContext object", jsonParser.getCurrentLocation()); } Web...
[ "private", "WebIdentitySessionContext", "parseWebIdentitySessionContext", "(", "SessionContext", "sessionContext", ")", "throws", "IOException", "{", "if", "(", "jsonParser", ".", "nextToken", "(", ")", "!=", "JsonToken", ".", "START_OBJECT", ")", "{", "throw", "new",...
Parses the {@link WebIdentitySessionContext} object. @param sessionContext {@link SessionContext} @return the web identity session context @throws IOException
[ "Parses", "the", "{", "@link", "WebIdentitySessionContext", "}", "object", "." ]
train
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L311-L335
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/widget/OverviewMap.java
OverviewMap.movePov
public void movePov(double deltaX, double deltaY) { """ Move the Point of view (rectangle or reticle) to a new location. This does not update the target map! @param deltaX horizontal amount the pov should be moved from current location: screen view coordinate! @param deltaY vertical amount the pov should be ...
java
public void movePov(double deltaX, double deltaY) { if (null != targetRectangle) { targetRectangle.getBounds().translate(deltaX, deltaY); render(targetRectangle, RenderGroup.SCREEN, RenderStatus.UPDATE); } else if (null != targetReticle) { targetReticle.getBounds().translate(deltaX, deltaY); render(tar...
[ "public", "void", "movePov", "(", "double", "deltaX", ",", "double", "deltaY", ")", "{", "if", "(", "null", "!=", "targetRectangle", ")", "{", "targetRectangle", ".", "getBounds", "(", ")", ".", "translate", "(", "deltaX", ",", "deltaY", ")", ";", "rende...
Move the Point of view (rectangle or reticle) to a new location. This does not update the target map! @param deltaX horizontal amount the pov should be moved from current location: screen view coordinate! @param deltaY vertical amount the pov should be moved from current location: screen view coordinate!
[ "Move", "the", "Point", "of", "view", "(", "rectangle", "or", "reticle", ")", "to", "a", "new", "location", ".", "This", "does", "not", "update", "the", "target", "map!" ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/OverviewMap.java#L192-L202
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlInterface interf, PyAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param interf the interface. @param it the target for the generated content. @param context the context. """ generateTypeDeclaration( this.qualifiedNameProvider.ge...
java
protected void _generate(SarlInterface interf, PyAppendable it, IExtraLanguageGeneratorContext context) { generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(interf).toString(), interf.getName(), true, interf.getExtends(), getTypeBuilder().getDocumentation(interf), true, inte...
[ "protected", "void", "_generate", "(", "SarlInterface", "interf", ",", "PyAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "generateTypeDeclaration", "(", "this", ".", "qualifiedNameProvider", ".", "getFullyQualifiedName", "(", "interf", ")...
Generate the given object. @param interf the interface. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L898-L905
trellis-ldp/trellis
components/app/src/main/java/org/trellisldp/app/config/TrellisConfiguration.java
TrellisConfiguration.setAdditionalConfig
@JsonAnySetter public TrellisConfiguration setAdditionalConfig(final String name, final Object value) { """ Set an extra configuration value. @param name the name of this config value @param value the value to set @return this config for chaining """ extras.put(name, value); return this;...
java
@JsonAnySetter public TrellisConfiguration setAdditionalConfig(final String name, final Object value) { extras.put(name, value); return this; }
[ "@", "JsonAnySetter", "public", "TrellisConfiguration", "setAdditionalConfig", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "extras", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Set an extra configuration value. @param name the name of this config value @param value the value to set @return this config for chaining
[ "Set", "an", "extra", "configuration", "value", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/app/src/main/java/org/trellisldp/app/config/TrellisConfiguration.java#L139-L143
TNG/JGiven
jgiven-core/src/main/java/com/tngtech/jgiven/report/json/JsonModelTraverser.java
JsonModelTraverser.traverseModels
public void traverseModels( File sourceDirectory, ReportModelFileHandler handler ) { """ Reads all JSON files from {@code sourceDirectory} and invokes for each found file the {@link ReportModelFileHandler#handleReportModel} method of the given {@code handler}. @param sourceDirectory the directory that contains...
java
public void traverseModels( File sourceDirectory, ReportModelFileHandler handler ) { for( ReportModelFile f : Files.fileTreeTraverser().breadthFirstTraversal( sourceDirectory ) .filter( FilePredicates.endsWith( ".json" ) ) .transform( new ReportModelFileReader() ) ) { handler...
[ "public", "void", "traverseModels", "(", "File", "sourceDirectory", ",", "ReportModelFileHandler", "handler", ")", "{", "for", "(", "ReportModelFile", "f", ":", "Files", ".", "fileTreeTraverser", "(", ")", ".", "breadthFirstTraversal", "(", "sourceDirectory", ")", ...
Reads all JSON files from {@code sourceDirectory} and invokes for each found file the {@link ReportModelFileHandler#handleReportModel} method of the given {@code handler}. @param sourceDirectory the directory that contains the JSON files @param handler the handler to be invoked for each file
[ "Reads", "all", "JSON", "files", "from", "{", "@code", "sourceDirectory", "}", "and", "invokes", "for", "each", "found", "file", "the", "{", "@link", "ReportModelFileHandler#handleReportModel", "}", "method", "of", "the", "given", "{", "@code", "handler", "}", ...
train
https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/json/JsonModelTraverser.java#L18-L24
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionManager.java
SessionManager.releaseSession
@Override public void releaseSession(Object sessionObject, SessionAffinityContext affinityContext) { """ Method releaseSession <p> @param sessionObject @param affinityContext associated with a given request. """ ISession session = (ISession) sessionObject; if (com.ibm.ejs.ras.TraceCom...
java
@Override public void releaseSession(Object sessionObject, SessionAffinityContext affinityContext) { ISession session = (ISession) sessionObject; if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGG...
[ "@", "Override", "public", "void", "releaseSession", "(", "Object", "sessionObject", ",", "SessionAffinityContext", "affinityContext", ")", "{", "ISession", "session", "=", "(", "ISession", ")", "sessionObject", ";", "if", "(", "com", ".", "ibm", ".", "ejs", "...
Method releaseSession <p> @param sessionObject @param affinityContext associated with a given request.
[ "Method", "releaseSession", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionManager.java#L480-L507
apereo/cas
support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/BaseWSFederationRequestController.java
BaseWSFederationRequestController.findAndValidateFederationRequestForRegisteredService
protected WSFederationRegisteredService findAndValidateFederationRequestForRegisteredService(final Service targetService, final WSFederationRequest fedRequest) { """ Gets ws federation registered service. @param tar...
java
protected WSFederationRegisteredService findAndValidateFederationRequestForRegisteredService(final Service targetService, final WSFederationRequest fedRequest) { val svc = getWsFederationRegisteredService(targetServ...
[ "protected", "WSFederationRegisteredService", "findAndValidateFederationRequestForRegisteredService", "(", "final", "Service", "targetService", ",", "final", "WSFederationRequest", "fedRequest", ")", "{", "val", "svc", "=", "getWsFederationRegisteredService", "(", "targetService"...
Gets ws federation registered service. @param targetService the target service @param fedRequest the fed request @return the ws federation registered service
[ "Gets", "ws", "federation", "registered", "service", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/BaseWSFederationRequestController.java#L160-L175
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/cdn/CdnClient.java
CdnClient.setDomainCacheTTL
public SetDomainCacheTTLResponse setDomainCacheTTL(SetDomainCacheTTLRequest request) { """ Update cache policies of specified domain acceleration. @param request The request containing all of the options related to the update request. @return Result of the setDomainCacheTTL operation returned by the service. ...
java
public SetDomainCacheTTLResponse setDomainCacheTTL(SetDomainCacheTTLRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(request, HttpMethodName.PUT, DOMAIN, request.getDomain(), "config"); internalRequest.addParam...
[ "public", "SetDomainCacheTTLResponse", "setDomainCacheTTL", "(", "SetDomainCacheTTLRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "...
Update cache policies of specified domain acceleration. @param request The request containing all of the options related to the update request. @return Result of the setDomainCacheTTL operation returned by the service.
[ "Update", "cache", "policies", "of", "specified", "domain", "acceleration", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/cdn/CdnClient.java#L356-L362
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/ext/ExtensionLoaderFactory.java
ExtensionLoaderFactory.getExtensionLoader
public static <T> ExtensionLoader<T> getExtensionLoader(Class<T> clazz) { """ Get extension loader by extensible class without listener @param clazz Extensible class @param <T> Class @return ExtensionLoader of this class """ return getExtensionLoader(clazz, null); }
java
public static <T> ExtensionLoader<T> getExtensionLoader(Class<T> clazz) { return getExtensionLoader(clazz, null); }
[ "public", "static", "<", "T", ">", "ExtensionLoader", "<", "T", ">", "getExtensionLoader", "(", "Class", "<", "T", ">", "clazz", ")", "{", "return", "getExtensionLoader", "(", "clazz", ",", "null", ")", ";", "}" ]
Get extension loader by extensible class without listener @param clazz Extensible class @param <T> Class @return ExtensionLoader of this class
[ "Get", "extension", "loader", "by", "extensible", "class", "without", "listener" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/ext/ExtensionLoaderFactory.java#L65-L67
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toPolygon
public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes) { """ Convert a list of {@link LatLng} and list of hole list {@link LatLng} to a {@link Polygon} @param latLngs lat lngs @param holes list of holes @return polygon """ return toPolygon(latLngs, holes, false, false); }
java
public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes) { return toPolygon(latLngs, holes, false, false); }
[ "public", "Polygon", "toPolygon", "(", "List", "<", "LatLng", ">", "latLngs", ",", "List", "<", "List", "<", "LatLng", ">", ">", "holes", ")", "{", "return", "toPolygon", "(", "latLngs", ",", "holes", ",", "false", ",", "false", ")", ";", "}" ]
Convert a list of {@link LatLng} and list of hole list {@link LatLng} to a {@link Polygon} @param latLngs lat lngs @param holes list of holes @return polygon
[ "Convert", "a", "list", "of", "{", "@link", "LatLng", "}", "and", "list", "of", "hole", "list", "{", "@link", "LatLng", "}", "to", "a", "{", "@link", "Polygon", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L647-L649
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java
DateRangeParam.setUpperBoundInclusive
public DateRangeParam setUpperBoundInclusive(Date theUpperBound) { """ Sets the upper bound to be greaterthan or equal to the given date """ validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
java
public DateRangeParam setUpperBoundInclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
[ "public", "DateRangeParam", "setUpperBoundInclusive", "(", "Date", "theUpperBound", ")", "{", "validateAndSet", "(", "myLowerBound", ",", "new", "DateParam", "(", "ParamPrefixEnum", ".", "LESSTHAN_OR_EQUALS", ",", "theUpperBound", ")", ")", ";", "return", "this", ";...
Sets the upper bound to be greaterthan or equal to the given date
[ "Sets", "the", "upper", "bound", "to", "be", "greaterthan", "or", "equal", "to", "the", "given", "date" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L235-L238
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.removeByU_LtC
@Override public void removeByU_LtC(long userId, Date createDate) { """ Removes all the commerce wish lists where userId = &#63; and createDate &lt; &#63; from the database. @param userId the user ID @param createDate the create date """ for (CommerceWishList commerceWishList : findByU_LtC(userId, c...
java
@Override public void removeByU_LtC(long userId, Date createDate) { for (CommerceWishList commerceWishList : findByU_LtC(userId, createDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishList); } }
[ "@", "Override", "public", "void", "removeByU_LtC", "(", "long", "userId", ",", "Date", "createDate", ")", "{", "for", "(", "CommerceWishList", "commerceWishList", ":", "findByU_LtC", "(", "userId", ",", "createDate", ",", "QueryUtil", ".", "ALL_POS", ",", "Qu...
Removes all the commerce wish lists where userId = &#63; and createDate &lt; &#63; from the database. @param userId the user ID @param createDate the create date
[ "Removes", "all", "the", "commerce", "wish", "lists", "where", "userId", "=", "&#63", ";", "and", "createDate", "&lt", ";", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L3535-L3541
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java
ASpatialDb.createSpatialIndex
public void createSpatialIndex( String tableName, String geomColumnName ) throws Exception { """ Create a spatial index. @param tableName the table name. @param geomColumnName the geometry column name. @throws Exception """ if (geomColumnName == null) { geomColumnName = "the_geom"; ...
java
public void createSpatialIndex( String tableName, String geomColumnName ) throws Exception { if (geomColumnName == null) { geomColumnName = "the_geom"; } String realColumnName = getProperColumnNameCase(tableName, geomColumnName); String realTableName = getProperTableNameCase(...
[ "public", "void", "createSpatialIndex", "(", "String", "tableName", ",", "String", "geomColumnName", ")", "throws", "Exception", "{", "if", "(", "geomColumnName", "==", "null", ")", "{", "geomColumnName", "=", "\"the_geom\"", ";", "}", "String", "realColumnName", ...
Create a spatial index. @param tableName the table name. @param geomColumnName the geometry column name. @throws Exception
[ "Create", "a", "spatial", "index", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java#L165-L180
kmi/iserve
iserve-discovery-api/src/main/java/uk/ac/open/kmi/iserve/discovery/api/impl/AbstractMatcher.java
AbstractMatcher.listMatchesAtLeastOfType
@Override public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) { """ Obtains all the matching resources that have a MatchType with the URI of {@code origin} of the type provided (inclusive) or more. @param origin URI to match @param minType the minimum MatchType we want to ...
java
@Override public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) { return listMatchesWithinRange(origin, minType, this.matchTypesSupported.getHighest()); }
[ "@", "Override", "public", "Map", "<", "URI", ",", "MatchResult", ">", "listMatchesAtLeastOfType", "(", "URI", "origin", ",", "MatchType", "minType", ")", "{", "return", "listMatchesWithinRange", "(", "origin", ",", "minType", ",", "this", ".", "matchTypesSuppor...
Obtains all the matching resources that have a MatchType with the URI of {@code origin} of the type provided (inclusive) or more. @param origin URI to match @param minType the minimum MatchType we want to obtain @return a Map containing indexed by the URI of the matching resource and containing the particular {@code ...
[ "Obtains", "all", "the", "matching", "resources", "that", "have", "a", "MatchType", "with", "the", "URI", "of", "{", "@code", "origin", "}", "of", "the", "type", "provided", "(", "inclusive", ")", "or", "more", "." ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-discovery-api/src/main/java/uk/ac/open/kmi/iserve/discovery/api/impl/AbstractMatcher.java#L98-L101
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/f/EpipolarMinimizeGeometricError.java
EpipolarMinimizeGeometricError.process
public boolean process(DMatrixRMaj F21 , double x1 , double y1, double x2, double y2, Point2D_F64 p1 , Point2D_F64 p2 ) { """ Minimizes the geometric error @param F21 (Input) Fundamental matrix x2 * F21 * x1 == 0 @param x1 (Input) Point 1 x-coordinate. Pixels @param y1 (Input) Point 1 y-coor...
java
public boolean process(DMatrixRMaj F21 , double x1 , double y1, double x2, double y2, Point2D_F64 p1 , Point2D_F64 p2 ) { // translations used to move points to the origin assignTinv(T1,x1,y1); assignTinv(T2,x2,y2); // take F to the new coordinate system // F1 = T2'*F*T1 PerspectiveOps.m...
[ "public", "boolean", "process", "(", "DMatrixRMaj", "F21", ",", "double", "x1", ",", "double", "y1", ",", "double", "x2", ",", "double", "y2", ",", "Point2D_F64", "p1", ",", "Point2D_F64", "p2", ")", "{", "// translations used to move points to the origin", "ass...
Minimizes the geometric error @param F21 (Input) Fundamental matrix x2 * F21 * x1 == 0 @param x1 (Input) Point 1 x-coordinate. Pixels @param y1 (Input) Point 1 y-coordinate. Pixels @param x2 (Input) Point 2 x-coordinate. Pixels @param y2 (Input) Point 2 y-coordinate. Pixels @param p1 (Output) Point 1. Pixels @param p2...
[ "Minimizes", "the", "geometric", "error" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/f/EpipolarMinimizeGeometricError.java#L87-L140
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.threePointsAngle
private static double threePointsAngle(Point vertex, Point A, Point B) { """ calculate the point a's angle of rectangle consist of point a,point b, point c; @param vertex @param A @param B @return """ double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a...
java
private static double threePointsAngle(Point vertex, Point A, Point B) { double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a = pointsDistance(B, vertex); return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b))); }
[ "private", "static", "double", "threePointsAngle", "(", "Point", "vertex", ",", "Point", "A", ",", "Point", "B", ")", "{", "double", "b", "=", "pointsDistance", "(", "vertex", ",", "A", ")", ";", "double", "c", "=", "pointsDistance", "(", "A", ",", "B"...
calculate the point a's angle of rectangle consist of point a,point b, point c; @param vertex @param A @param B @return
[ "calculate", "the", "point", "a", "s", "angle", "of", "rectangle", "consist", "of", "point", "a", "point", "b", "point", "c", ";" ]
train
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L226-L233
joniles/mpxj
src/main/java/net/sf/mpxj/planner/PlannerWriter.java
PlannerWriter.writeResource
private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plannerResource) { """ This method writes data for a single resource to a Planner file. @param mpxjResource MPXJ Resource instance @param plannerResource Planner Resource instance """ ProjectCalendar resourceCalenda...
java
private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plannerResource) { ProjectCalendar resourceCalendar = mpxjResource.getResourceCalendar(); if (resourceCalendar != null) { plannerResource.setCalendar(getIntegerString(resourceCalendar.getUniqueID())); ...
[ "private", "void", "writeResource", "(", "Resource", "mpxjResource", ",", "net", ".", "sf", ".", "mpxj", ".", "planner", ".", "schema", ".", "Resource", "plannerResource", ")", "{", "ProjectCalendar", "resourceCalendar", "=", "mpxjResource", ".", "getResourceCalen...
This method writes data for a single resource to a Planner file. @param mpxjResource MPXJ Resource instance @param plannerResource Planner Resource instance
[ "This", "method", "writes", "data", "for", "a", "single", "resource", "to", "a", "Planner", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L394-L413
elki-project/elki
elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/query/range/LinearScanPrimitiveDistanceRangeQuery.java
LinearScanPrimitiveDistanceRangeQuery.linearScan
private void linearScan(Relation<? extends O> relation, DBIDIter iter, O obj, double range, ModifiableDoubleDBIDList result) { """ Main loop for linear scan, @param relation Data relation @param iter Iterator @param obj Query object @param range Query radius @param result Output data structure """ f...
java
private void linearScan(Relation<? extends O> relation, DBIDIter iter, O obj, double range, ModifiableDoubleDBIDList result) { final PrimitiveDistanceFunction<? super O> rawdist = this.rawdist; while(iter.valid()) { final double distance = rawdist.distance(obj, relation.get(iter)); if(distance <= ra...
[ "private", "void", "linearScan", "(", "Relation", "<", "?", "extends", "O", ">", "relation", ",", "DBIDIter", "iter", ",", "O", "obj", ",", "double", "range", ",", "ModifiableDoubleDBIDList", "result", ")", "{", "final", "PrimitiveDistanceFunction", "<", "?", ...
Main loop for linear scan, @param relation Data relation @param iter Iterator @param obj Query object @param range Query radius @param result Output data structure
[ "Main", "loop", "for", "linear", "scan" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/query/range/LinearScanPrimitiveDistanceRangeQuery.java#L102-L111
alkacon/opencms-core
src/org/opencms/search/solr/CmsSolrIndex.java
CmsSolrIndex.isDebug
private boolean isDebug(CmsObject cms, CmsSolrQuery query) { """ Checks if the query should be executed using the debug mode where the security restrictions do not apply. @param cms the current context. @param query the query to execute. @return a flag, indicating, if the query should be performed in debug mode...
java
private boolean isDebug(CmsObject cms, CmsSolrQuery query) { String[] debugSecretValues = query.remove(REQUEST_PARAM_DEBUG_SECRET); String debugSecret = (debugSecretValues == null) || (debugSecretValues.length < 1) ? null : debugSecretValues[0]; if ((null != debugSecret) &...
[ "private", "boolean", "isDebug", "(", "CmsObject", "cms", ",", "CmsSolrQuery", "query", ")", "{", "String", "[", "]", "debugSecretValues", "=", "query", ".", "remove", "(", "REQUEST_PARAM_DEBUG_SECRET", ")", ";", "String", "debugSecret", "=", "(", "debugSecretVa...
Checks if the query should be executed using the debug mode where the security restrictions do not apply. @param cms the current context. @param query the query to execute. @return a flag, indicating, if the query should be performed in debug mode.
[ "Checks", "if", "the", "query", "should", "be", "executed", "using", "the", "debug", "mode", "where", "the", "security", "restrictions", "do", "not", "apply", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrIndex.java#L1595-L1616
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/jasperreport/JasperReportCompiler.java
JasperReportCompiler.compileJasperReport
private void compileJasperReport(final Instance _instSource, final Instance _instCompiled) throws EFapsException { """ Method to compile one JasperReport. @param _instSource instance of the source @param _instCompiled instance of the compiled source @throws EFapsEx...
java
private void compileJasperReport(final Instance _instSource, final Instance _instCompiled) throws EFapsException { // make the classPath final String sep = System.getProperty("os.name").startsWith("Windows") ? ";" : ":"; final StringBuilder classP...
[ "private", "void", "compileJasperReport", "(", "final", "Instance", "_instSource", ",", "final", "Instance", "_instCompiled", ")", "throws", "EFapsException", "{", "// make the classPath", "final", "String", "sep", "=", "System", ".", "getProperty", "(", "\"os.name\""...
Method to compile one JasperReport. @param _instSource instance of the source @param _instCompiled instance of the compiled source @throws EFapsException on error
[ "Method", "to", "compile", "one", "JasperReport", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/jasperreport/JasperReportCompiler.java#L117-L154
ansell/csvstream
src/main/java/com/github/ansell/csv/stream/CSVStream.java
CSVStream.newCSVWriter
public static SequenceWriter newCSVWriter(final Writer writer, List<String> headers) throws IOException { """ Returns a Jackson {@link SequenceWriter} which will write CSV lines to the given {@link Writer} using the headers provided. @param writer The writer which will receive the CSV file. @param headers T...
java
public static SequenceWriter newCSVWriter(final Writer writer, List<String> headers) throws IOException { return newCSVWriter(writer, buildSchema(headers)); }
[ "public", "static", "SequenceWriter", "newCSVWriter", "(", "final", "Writer", "writer", ",", "List", "<", "String", ">", "headers", ")", "throws", "IOException", "{", "return", "newCSVWriter", "(", "writer", ",", "buildSchema", "(", "headers", ")", ")", ";", ...
Returns a Jackson {@link SequenceWriter} which will write CSV lines to the given {@link Writer} using the headers provided. @param writer The writer which will receive the CSV file. @param headers The column headers that will be used by the returned Jackson {@link SequenceWriter}. @return A Jackson {@link SequenceWrit...
[ "Returns", "a", "Jackson", "{", "@link", "SequenceWriter", "}", "which", "will", "write", "CSV", "lines", "to", "the", "given", "{", "@link", "Writer", "}", "using", "the", "headers", "provided", "." ]
train
https://github.com/ansell/csvstream/blob/9468bfbd6997fbc4237eafc990ba811cd5905dc1/src/main/java/com/github/ansell/csv/stream/CSVStream.java#L518-L520
threerings/nenya
core/src/main/java/com/threerings/openal/StreamDecoder.java
StreamDecoder.registerExtension
public static void registerExtension (String extension, Class<? extends StreamDecoder> clazz) { """ Registers a class of {@link StreamDecoder} for the specified file extension. """ _extensions.put(extension, clazz); }
java
public static void registerExtension (String extension, Class<? extends StreamDecoder> clazz) { _extensions.put(extension, clazz); }
[ "public", "static", "void", "registerExtension", "(", "String", "extension", ",", "Class", "<", "?", "extends", "StreamDecoder", ">", "clazz", ")", "{", "_extensions", ".", "put", "(", "extension", ",", "clazz", ")", ";", "}" ]
Registers a class of {@link StreamDecoder} for the specified file extension.
[ "Registers", "a", "class", "of", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/StreamDecoder.java#L44-L47
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java
FileUtilsV2_2.contentEquals
public static boolean contentEquals(File file1, File file2) throws IOException { """ Compares the contents of two files to determine if they are equal or not. <p> This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of t...
java
public static boolean contentEquals(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // two not existing files are equal return true; } if (file1.isDirectory() || file2....
[ "public", "static", "boolean", "contentEquals", "(", "File", "file1", ",", "File", "file2", ")", "throws", "IOException", "{", "boolean", "file1Exists", "=", "file1", ".", "exists", "(", ")", ";", "if", "(", "file1Exists", "!=", "file2", ".", "exists", "("...
Compares the contents of two files to determine if they are equal or not. <p> This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of the contents. <p> Code origin: Avalon @param file1 the first file @param file2 the second fi...
[ "Compares", "the", "contents", "of", "two", "files", "to", "determine", "if", "they", "are", "equal", "or", "not", ".", "<p", ">", "This", "method", "checks", "to", "see", "if", "the", "two", "files", "are", "different", "lengths", "or", "if", "they", ...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/commons/FileUtilsV2_2.java#L230-L267
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_adduser.java
br_adduser.adduser
public static br_adduser adduser(nitro_service client, br_adduser resource) throws Exception { """ <pre> Use this operation to add user and assign privilege on Repeater Instances. </pre> """ return ((br_adduser[]) resource.perform_operation(client, "adduser"))[0]; }
java
public static br_adduser adduser(nitro_service client, br_adduser resource) throws Exception { return ((br_adduser[]) resource.perform_operation(client, "adduser"))[0]; }
[ "public", "static", "br_adduser", "adduser", "(", "nitro_service", "client", ",", "br_adduser", "resource", ")", "throws", "Exception", "{", "return", "(", "(", "br_adduser", "[", "]", ")", "resource", ".", "perform_operation", "(", "client", ",", "\"adduser\"",...
<pre> Use this operation to add user and assign privilege on Repeater Instances. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "add", "user", "and", "assign", "privilege", "on", "Repeater", "Instances", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_adduser.java#L147-L150
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java
PluginRepositoryUtil.parseXmlPluginDefinition
public static PluginDefinition parseXmlPluginDefinition(final ClassLoader cl, final InputStream in) throws PluginConfigurationException { """ Loads the definition of a single plugin from an XML file. @param cl The classloader to be used to instantiate the plugin class @param in The stream to the XML file @r...
java
public static PluginDefinition parseXmlPluginDefinition(final ClassLoader cl, final InputStream in) throws PluginConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); Document document; try { DocumentBuilder loader = factory.newDocumentBui...
[ "public", "static", "PluginDefinition", "parseXmlPluginDefinition", "(", "final", "ClassLoader", "cl", ",", "final", "InputStream", "in", ")", "throws", "PluginConfigurationException", "{", "DocumentBuilderFactory", "factory", "=", "DocumentBuilderFactory", ".", "newInstanc...
Loads the definition of a single plugin from an XML file. @param cl The classloader to be used to instantiate the plugin class @param in The stream to the XML file @return The plugin definition @throws PluginConfigurationException if an error occurs parsing the plugin definition
[ "Loads", "the", "definition", "of", "a", "single", "plugin", "from", "an", "XML", "file", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java#L125-L145
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.cut
public static void cut(Image srcImage, OutputStream out, Rectangle rectangle) throws IORuntimeException { """ 图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param out 切片后的图像输出流 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0 @throws IORuntimeException IO异常 """ cut(srcImage, getImageOutpu...
java
public static void cut(Image srcImage, OutputStream out, Rectangle rectangle) throws IORuntimeException { cut(srcImage, getImageOutputStream(out), rectangle); }
[ "public", "static", "void", "cut", "(", "Image", "srcImage", ",", "OutputStream", "out", ",", "Rectangle", "rectangle", ")", "throws", "IORuntimeException", "{", "cut", "(", "srcImage", ",", "getImageOutputStream", "(", "out", ")", ",", "rectangle", ")", ";", ...
图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param out 切片后的图像输出流 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0 @throws IORuntimeException IO异常
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")", ",此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L306-L308
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/builder/BeanMappingFactory.java
BeanMappingFactory.buildHeaderMapper
protected <T> void buildHeaderMapper(final BeanMapping<T> beanMapping, final CsvBean beanAnno) { """ ヘッダーのマッピングの処理や設定を組み立てます。 @param <T> Beanのタイプ @param beanMapping Beanのマッピング情報 @param beanAnno アノテーション{@literal @CsvBean}のインタンス """ final HeaderMapper headerMapper = (HeaderMapper) configu...
java
protected <T> void buildHeaderMapper(final BeanMapping<T> beanMapping, final CsvBean beanAnno) { final HeaderMapper headerMapper = (HeaderMapper) configuration.getBeanFactory().create(beanAnno.headerMapper()); beanMapping.setHeaderMapper(headerMapper); beanMapping.setHeade...
[ "protected", "<", "T", ">", "void", "buildHeaderMapper", "(", "final", "BeanMapping", "<", "T", ">", "beanMapping", ",", "final", "CsvBean", "beanAnno", ")", "{", "final", "HeaderMapper", "headerMapper", "=", "(", "HeaderMapper", ")", "configuration", ".", "ge...
ヘッダーのマッピングの処理や設定を組み立てます。 @param <T> Beanのタイプ @param beanMapping Beanのマッピング情報 @param beanAnno アノテーション{@literal @CsvBean}のインタンス
[ "ヘッダーのマッピングの処理や設定を組み立てます。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/builder/BeanMappingFactory.java#L95-L103
alkacon/opencms-core
src/org/opencms/workflow/CmsDefaultWorkflowManager.java
CmsDefaultWorkflowManager.actionForcePublish
protected CmsWorkflowResponse actionForcePublish( CmsObject userCms, CmsPublishOptions options, List<CmsResource> resources) throws CmsException { """ The implementation of the "forcepublish" workflow action.<p> @param userCms the user CMS context @param resources the resources ...
java
protected CmsWorkflowResponse actionForcePublish( CmsObject userCms, CmsPublishOptions options, List<CmsResource> resources) throws CmsException { CmsPublish publish = new CmsPublish(userCms, options.getParameters()); publish.publishResources(resources); CmsW...
[ "protected", "CmsWorkflowResponse", "actionForcePublish", "(", "CmsObject", "userCms", ",", "CmsPublishOptions", "options", ",", "List", "<", "CmsResource", ">", "resources", ")", "throws", "CmsException", "{", "CmsPublish", "publish", "=", "new", "CmsPublish", "(", ...
The implementation of the "forcepublish" workflow action.<p> @param userCms the user CMS context @param resources the resources which the action should process @param options the publish options to use @return the workflow response @throws CmsException if something goes wrong
[ "The", "implementation", "of", "the", "forcepublish", "workflow", "action", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/CmsDefaultWorkflowManager.java#L364-L379
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/DescribeRepositoryResource.java
DescribeRepositoryResource.describe
@Path("/") @GET public Response describe(@QueryParam("xml") @DefaultValue("false") boolean xml) throws ServletException, IOException { """ <p> Process Fedora Access Request. Parse and validate the servlet input parameters and then execute th...
java
@Path("/") @GET public Response describe(@QueryParam("xml") @DefaultValue("false") boolean xml) throws ServletException, IOException { Context context = getContext(); try { return describeRepository(context, xml); ...
[ "@", "Path", "(", "\"/\"", ")", "@", "GET", "public", "Response", "describe", "(", "@", "QueryParam", "(", "\"xml\"", ")", "@", "DefaultValue", "(", "\"false\"", ")", "boolean", "xml", ")", "throws", "ServletException", ",", "IOException", "{", "Context", ...
<p> Process Fedora Access Request. Parse and validate the servlet input parameters and then execute the specified request. </p> @param xml whether the request is for xml or html. @throws ServletException If an error occurs that effects the servlet's basic operation. @throws IOException If an error occurs with an input...
[ "<p", ">", "Process", "Fedora", "Access", "Request", ".", "Parse", "and", "validate", "the", "servlet", "input", "parameters", "and", "then", "execute", "the", "specified", "request", ".", "<", "/", "p", ">" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DescribeRepositoryResource.java#L99-L113
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/delegated/zos/NativeMethodHelper.java
NativeMethodHelper.registerNatives
public static long registerNatives(Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) { """ Register native methods from the core DLL for the specified class and drive the registration hooks. @param clazz the class to link native methods for @param nativeDescriptorName the name of the exported {...
java
public static long registerNatives(Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) { if (!initialized) { if (loadFailure != null) { Error e = new UnsatisfiedLinkError(); e.initCause(loadFailure); throw e; } else { ...
[ "public", "static", "long", "registerNatives", "(", "Class", "<", "?", ">", "clazz", ",", "String", "nativeDescriptorName", ",", "Object", "[", "]", "extraInfo", ")", "{", "if", "(", "!", "initialized", ")", "{", "if", "(", "loadFailure", "!=", "null", "...
Register native methods from the core DLL for the specified class and drive the registration hooks. @param clazz the class to link native methods for @param nativeDescriptorName the name of the exported {@code NativeMethodDescriptor} structure @param extra information provided to the registration callback by the calle...
[ "Register", "native", "methods", "from", "the", "core", "DLL", "for", "the", "specified", "class", "and", "drive", "the", "registration", "hooks", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/delegated/zos/NativeMethodHelper.java#L58-L70
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/common/StringUtils.java
StringUtils.rpad
public static String rpad(String base, Integer len, String pad) { """ Returns the string right-padded with the string pad to a length of len characters. If str is longer than len, the return value is shortened to len characters. @param base The base string to be padded @param len The length of padded string ...
java
public static String rpad(String base, Integer len, String pad) { if (len < 0) { return null; } else if (len == 0) { return ""; } char[] data = new char[len]; int pos = 0; // Copy the base for ( ; pos < base.length() && pos < len; pos++) { data[pos] = base.charAt(pos);...
[ "public", "static", "String", "rpad", "(", "String", "base", ",", "Integer", "len", ",", "String", "pad", ")", "{", "if", "(", "len", "<", "0", ")", "{", "return", "null", ";", "}", "else", "if", "(", "len", "==", "0", ")", "{", "return", "\"\"",...
Returns the string right-padded with the string pad to a length of len characters. If str is longer than len, the return value is shortened to len characters. @param base The base string to be padded @param len The length of padded string @param pad The pad string @return the string right-padded with pad to a length o...
[ "Returns", "the", "string", "right", "-", "padded", "with", "the", "string", "pad", "to", "a", "length", "of", "len", "characters", ".", "If", "str", "is", "longer", "than", "len", "the", "return", "value", "is", "shortened", "to", "len", "characters", "...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/StringUtils.java#L463-L488
respoke/respoke-sdk-android
respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java
RespokeClient.joinGroups
public void joinGroups(final ArrayList<String> groupIDList, final JoinGroupCompletionListener completionListener) { """ Join a list of Groups and begin keeping track of them. @param groupIDList An array of IDs of the groups to join @param completionListener A listener to receive a notification of the ...
java
public void joinGroups(final ArrayList<String> groupIDList, final JoinGroupCompletionListener completionListener) { if (isConnected()) { if ((groupIDList != null) && (groupIDList.size() > 0)) { String urlEndpoint = "/v1/groups"; JSONArray groupList = new JSONArray(gr...
[ "public", "void", "joinGroups", "(", "final", "ArrayList", "<", "String", ">", "groupIDList", ",", "final", "JoinGroupCompletionListener", "completionListener", ")", "{", "if", "(", "isConnected", "(", ")", ")", "{", "if", "(", "(", "groupIDList", "!=", "null"...
Join a list of Groups and begin keeping track of them. @param groupIDList An array of IDs of the groups to join @param completionListener A listener to receive a notification of the success or failure of the asynchronous operation
[ "Join", "a", "list", "of", "Groups", "and", "begin", "keeping", "track", "of", "them", "." ]
train
https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L399-L443
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java
TaskTracker.reserveSlots
public void reserveSlots(TaskType taskType, JobInProgress job, int numSlots) { """ Reserve specified number of slots for a given <code>job</code>. @param taskType {@link TaskType} of the task @param job the job for which slots on this <code>TaskTracker</code> are to be reserved @param numSlots number of slots ...
java
public void reserveSlots(TaskType taskType, JobInProgress job, int numSlots) { JobID jobId = job.getJobID(); if (taskType == TaskType.MAP) { if (jobForFallowMapSlot != null && !jobForFallowMapSlot.getJobID().equals(jobId)) { throw new RuntimeException(trackerName + " already has " + ...
[ "public", "void", "reserveSlots", "(", "TaskType", "taskType", ",", "JobInProgress", "job", ",", "int", "numSlots", ")", "{", "JobID", "jobId", "=", "job", ".", "getJobID", "(", ")", ";", "if", "(", "taskType", "==", "TaskType", ".", "MAP", ")", "{", "...
Reserve specified number of slots for a given <code>job</code>. @param taskType {@link TaskType} of the task @param job the job for which slots on this <code>TaskTracker</code> are to be reserved @param numSlots number of slots to be reserved
[ "Reserve", "specified", "number", "of", "slots", "for", "a", "given", "<code", ">", "job<", "/", "code", ">", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/TaskTracker.java#L120-L149
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/bolt/AmBaseBolt.java
AmBaseBolt.emitWithNoAnchorKeyAndStream
protected void emitWithNoAnchorKeyAndStream(StreamMessage message, String streamId) { """ Not use this class's key history function, and not use anchor function(child message failed. notify fail to parent message.).<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>N...
java
protected void emitWithNoAnchorKeyAndStream(StreamMessage message, String streamId) { getCollector().emit(streamId, new Values("", message)); }
[ "protected", "void", "emitWithNoAnchorKeyAndStream", "(", "StreamMessage", "message", ",", "String", "streamId", ")", "{", "getCollector", "(", ")", ".", "emit", "(", "streamId", ",", "new", "Values", "(", "\"\"", ",", "message", ")", ")", ";", "}" ]
Not use this class's key history function, and not use anchor function(child message failed. notify fail to parent message.).<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>Not use this class's key history function.</li> <li>Not use storm's fault detect function.</li> </ol...
[ "Not", "use", "this", "class", "s", "key", "history", "function", "and", "not", "use", "anchor", "function", "(", "child", "message", "failed", ".", "notify", "fail", "to", "parent", "message", ".", ")", ".", "<br", ">", "Send", "message", "to", "downstr...
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/AmBaseBolt.java#L513-L516
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/formula/MolecularFormulaGenerator.java
MolecularFormulaGenerator.isIllPosed
private static boolean isIllPosed(double minMass, double maxMass, MolecularFormulaRange mfRange) { """ Decides wheter to use the round robin algorithm or full enumeration algorithm. The round robin implementation here is optimized for chemical elements in organic compounds. It gets slow if - the mass of the sma...
java
private static boolean isIllPosed(double minMass, double maxMass, MolecularFormulaRange mfRange) { // when the number of integers to decompose is incredible large // we have to adjust the internal settings (e.g. precision!) // instead we simply fallback to the full enumeration method if ...
[ "private", "static", "boolean", "isIllPosed", "(", "double", "minMass", ",", "double", "maxMass", ",", "MolecularFormulaRange", "mfRange", ")", "{", "// when the number of integers to decompose is incredible large", "// we have to adjust the internal settings (e.g. precision!)", "/...
Decides wheter to use the round robin algorithm or full enumeration algorithm. The round robin implementation here is optimized for chemical elements in organic compounds. It gets slow if - the mass of the smallest element is very large (i.e. hydrogen is not allowed) - the maximal mass to decompose is too large (round ...
[ "Decides", "wheter", "to", "use", "the", "round", "robin", "algorithm", "or", "full", "enumeration", "algorithm", ".", "The", "round", "robin", "implementation", "here", "is", "optimized", "for", "chemical", "elements", "in", "organic", "compounds", ".", "It", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/formula/MolecularFormulaGenerator.java#L94-L114
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java
PrimitiveUtils.readCharacter
public static Character readCharacter(String value, Character defaultValue) { """ Read character. @param value the value @param defaultValue the default value @return the character """ if (!StringUtils.hasText(value)) return defaultValue; return Character.valueOf((char)Integer.parseInt(value)); }
java
public static Character readCharacter(String value, Character defaultValue) { if (!StringUtils.hasText(value)) return defaultValue; return Character.valueOf((char)Integer.parseInt(value)); }
[ "public", "static", "Character", "readCharacter", "(", "String", "value", ",", "Character", "defaultValue", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "value", ")", ")", "return", "defaultValue", ";", "return", "Character", ".", "valueOf", ...
Read character. @param value the value @param defaultValue the default value @return the character
[ "Read", "character", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/PrimitiveUtils.java#L80-L84
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.closeKeyboard
public static void closeKeyboard(Context context, View field) { """ Go away keyboard, nobody likes you. @param context The current Context or Activity that this method is called from. @param field field that holds the keyboard focus. """ try { InputMethodManager imm = (InputMethodMana...
java
public static void closeKeyboard(Context context, View field) { try { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(field.getWindowToken(), 0); } catch (Exception ex) { Log.e("Caffeine...
[ "public", "static", "void", "closeKeyboard", "(", "Context", "context", ",", "View", "field", ")", "{", "try", "{", "InputMethodManager", "imm", "=", "(", "InputMethodManager", ")", "context", ".", "getSystemService", "(", "Context", ".", "INPUT_METHOD_SERVICE", ...
Go away keyboard, nobody likes you. @param context The current Context or Activity that this method is called from. @param field field that holds the keyboard focus.
[ "Go", "away", "keyboard", "nobody", "likes", "you", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L141-L148
james-hu/jabb-core
src/main/java/net/sf/jabb/camel/XmlSocketUtility.java
XmlSocketUtility.addServer
static public void addServer(CamelContext camelContext, final String serverUri, final boolean syncFlag, final String toUri, String topLevelTagName, Charset messageCharset, int maxMessageBytes) throws Exception { """ Creates a XML protocol based socket server in Camel.<br> 在Camel中,创建一个基于XML的Socket接口服务器。 @p...
java
static public void addServer(CamelContext camelContext, final String serverUri, final boolean syncFlag, final String toUri, String topLevelTagName, Charset messageCharset, int maxMessageBytes) throws Exception { // Netty 用的encoder/decoder XmlDecoder xmlDecoder = new XmlDecoder(maxMessageBytes, topLevelTagNam...
[ "static", "public", "void", "addServer", "(", "CamelContext", "camelContext", ",", "final", "String", "serverUri", ",", "final", "boolean", "syncFlag", ",", "final", "String", "toUri", ",", "String", "topLevelTagName", ",", "Charset", "messageCharset", ",", "int",...
Creates a XML protocol based socket server in Camel.<br> 在Camel中,创建一个基于XML的Socket接口服务器。 @param camelContext CamelContext which must be based on CombinedRegistry, because additional entries must be added to the Registry.<br> Camel的Context,它必须用的是CombinedRegistry,因为要往Registry里放东西。 @param serverUri URI of the socket se...
[ "Creates", "a", "XML", "protocol", "based", "socket", "server", "in", "Camel", ".", "<br", ">", "在Camel中,创建一个基于XML的Socket接口服务器。" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/camel/XmlSocketUtility.java#L67-L95
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/AbstractDefinitionDeployer.java
AbstractDefinitionDeployer.getDiagramResourceForDefinition
protected String getDiagramResourceForDefinition(DeploymentEntity deployment, String resourceName, DefinitionEntity definition, Map<String, ResourceEntity> resources) { """ Returns the default name of the image resource for a certain definition. It will first look for an image resource which matches the definit...
java
protected String getDiagramResourceForDefinition(DeploymentEntity deployment, String resourceName, DefinitionEntity definition, Map<String, ResourceEntity> resources) { for (String diagramSuffix: getDiagramSuffixes()) { String definitionDiagramResource = getDefinitionDiagramResourceName(resourceName, definiti...
[ "protected", "String", "getDiagramResourceForDefinition", "(", "DeploymentEntity", "deployment", ",", "String", "resourceName", ",", "DefinitionEntity", "definition", ",", "Map", "<", "String", ",", "ResourceEntity", ">", "resources", ")", "{", "for", "(", "String", ...
Returns the default name of the image resource for a certain definition. It will first look for an image resource which matches the definition specifically, before resorting to an image resource which matches the file containing the definition. Example: if the deployment contains a BPMN 2.0 xml resource called 'abc.b...
[ "Returns", "the", "default", "name", "of", "the", "image", "resource", "for", "a", "certain", "definition", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/AbstractDefinitionDeployer.java#L144-L156
tango-controls/JTango
server/src/main/java/org/tango/server/events/EventImpl.java
EventImpl.pushAttributeDataReadyEvent
protected void pushAttributeDataReadyEvent(final int counter, ZMQ.Socket eventSocket) throws DevFailed { """ Send a data ready event @param counter a counter value @param eventSocket @throws DevFailed """ xlogger.entry(); try { final AttDataReady dataReady = new At...
java
protected void pushAttributeDataReadyEvent(final int counter, ZMQ.Socket eventSocket) throws DevFailed { xlogger.entry(); try { final AttDataReady dataReady = new AttDataReady(attribute.getName(), attribute.getTangoType(), counter); synchronized (eventSocket) { ...
[ "protected", "void", "pushAttributeDataReadyEvent", "(", "final", "int", "counter", ",", "ZMQ", ".", "Socket", "eventSocket", ")", "throws", "DevFailed", "{", "xlogger", ".", "entry", "(", ")", ";", "try", "{", "final", "AttDataReady", "dataReady", "=", "new",...
Send a data ready event @param counter a counter value @param eventSocket @throws DevFailed
[ "Send", "a", "data", "ready", "event" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventImpl.java#L183-L196
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java
Serializer.registerDefault
public Serializer registerDefault(Class<?> baseType, TypeSerializerFactory factory) { """ Registers a default type serializer for the given base type. <p> Default serializers are used to serialize types for which no specific {@link TypeSerializer} is provided. When a serializable type is {@link #register(Class)...
java
public Serializer registerDefault(Class<?> baseType, TypeSerializerFactory factory) { registry.registerDefault(baseType, factory); return this; }
[ "public", "Serializer", "registerDefault", "(", "Class", "<", "?", ">", "baseType", ",", "TypeSerializerFactory", "factory", ")", "{", "registry", ".", "registerDefault", "(", "baseType", ",", "factory", ")", ";", "return", "this", ";", "}" ]
Registers a default type serializer for the given base type. <p> Default serializers are used to serialize types for which no specific {@link TypeSerializer} is provided. When a serializable type is {@link #register(Class) registered} without a {@link TypeSerializer}, the first default serializer found for the given ty...
[ "Registers", "a", "default", "type", "serializer", "for", "the", "given", "base", "type", ".", "<p", ">", "Default", "serializers", "are", "used", "to", "serialize", "types", "for", "which", "no", "specific", "{", "@link", "TypeSerializer", "}", "is", "provi...
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java#L641-L644
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.setBucketLifeCycle
public void setBucketLifeCycle(String bucketName, String lifeCycle) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException,InvalidArgume...
java
public void setBucketLifeCycle(String bucketName, String lifeCycle) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException,InvalidArgume...
[ "public", "void", "setBucketLifeCycle", "(", "String", "bucketName", ",", "String", "lifeCycle", ")", "throws", "InvalidBucketNameException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "InvalidKeyException", ",", "NoResponseE...
Set XML string of LifeCycle on a given bucket. Delete the lifecycle of bucket in case a null is passed as lifeCycle. @param bucketName Bucket name. @param lifeCycle Bucket policy XML string. </p><b>Example:</b><br> <pre>{@code String lifecycle = "<LifecycleConfiguration><Rule><ID>expire-bucket</ID><Prefix></Pref...
[ "Set", "XML", "string", "of", "LifeCycle", "on", "a", "given", "bucket", ".", "Delete", "the", "lifecycle", "of", "bucket", "in", "case", "a", "null", "is", "passed", "as", "lifeCycle", ".", "@param", "bucketName", "Bucket", "name", ".", "@param", "lifeCyc...
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L4273-L4286