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
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/alias/AliasElasticsearchUpdater.java
AliasElasticsearchUpdater.createAlias
public static void createAlias(RestClient client, String alias, String index) throws Exception { """ Create an alias if needed @param client Client to use @param alias Alias name @param index Index name @throws Exception When alias can not be set """ logger.trace("createAlias({},{})", alias, index)...
java
public static void createAlias(RestClient client, String alias, String index) throws Exception { logger.trace("createAlias({},{})", alias, index); assert client != null; assert alias != null; assert index != null; Request request = new Request("POST", "/_aliases/"); req...
[ "public", "static", "void", "createAlias", "(", "RestClient", "client", ",", "String", "alias", ",", "String", "index", ")", "throws", "Exception", "{", "logger", ".", "trace", "(", "\"createAlias({},{})\"", ",", "alias", ",", "index", ")", ";", "assert", "c...
Create an alias if needed @param client Client to use @param alias Alias name @param index Index name @throws Exception When alias can not be set
[ "Create", "an", "alias", "if", "needed" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/alias/AliasElasticsearchUpdater.java#L56-L72
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableDictionary.java
MutableDictionary.setBlob
@NonNull @Override public MutableDictionary setBlob(@NonNull String key, Blob value) { """ Set a Blob object for the given key. @param key The key @param value The Blob object. @return The self object. """ return setValue(key, value); }
java
@NonNull @Override public MutableDictionary setBlob(@NonNull String key, Blob value) { return setValue(key, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableDictionary", "setBlob", "(", "@", "NonNull", "String", "key", ",", "Blob", "value", ")", "{", "return", "setValue", "(", "key", ",", "value", ")", ";", "}" ]
Set a Blob object for the given key. @param key The key @param value The Blob object. @return The self object.
[ "Set", "a", "Blob", "object", "for", "the", "given", "key", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDictionary.java#L208-L212
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/api/histogram/PercentileTimer.java
PercentileTimer.get
public static PercentileTimer get(Registry registry, Id id) { """ Creates a timer object that can be used for estimating percentiles. <b>Percentile timers are expensive compared to basic timers from the registry.</b> Be diligent with ensuring that any additional dimensions have a small bounded cardinality. It is...
java
public static PercentileTimer get(Registry registry, Id id) { return computeIfAbsent(registry, id, 0L, Long.MAX_VALUE); }
[ "public", "static", "PercentileTimer", "get", "(", "Registry", "registry", ",", "Id", "id", ")", "{", "return", "computeIfAbsent", "(", "registry", ",", "id", ",", "0L", ",", "Long", ".", "MAX_VALUE", ")", ";", "}" ]
Creates a timer object that can be used for estimating percentiles. <b>Percentile timers are expensive compared to basic timers from the registry.</b> Be diligent with ensuring that any additional dimensions have a small bounded cardinality. It is also highly recommended to explicitly set a range (see {@link Builder#wi...
[ "Creates", "a", "timer", "object", "that", "can", "be", "used", "for", "estimating", "percentiles", ".", "<b", ">", "Percentile", "timers", "are", "expensive", "compared", "to", "basic", "timers", "from", "the", "registry", ".", "<", "/", "b", ">", "Be", ...
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/api/histogram/PercentileTimer.java#L98-L100
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.readField
public static Object readField(final Object target, final String fieldName) throws IllegalAccessException { """ Reads the named {@code public} {@link Field}. Superclasses will be considered. @param target the object to reflect, must not be {@code null} @param fieldName the field name to obtain @return the v...
java
public static Object readField(final Object target, final String fieldName) throws IllegalAccessException { return readField(target, fieldName, false); }
[ "public", "static", "Object", "readField", "(", "final", "Object", "target", ",", "final", "String", "fieldName", ")", "throws", "IllegalAccessException", "{", "return", "readField", "(", "target", ",", "fieldName", ",", "false", ")", ";", "}" ]
Reads the named {@code public} {@link Field}. Superclasses will be considered. @param target the object to reflect, must not be {@code null} @param fieldName the field name to obtain @return the value of the field @throws IllegalArgumentException if the class is {@code null}, or the field name is blank or empty or cou...
[ "Reads", "the", "named", "{", "@code", "public", "}", "{", "@link", "Field", "}", ".", "Superclasses", "will", "be", "considered", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L445-L447
fcrepo4/fcrepo4
fcrepo-auth-webac/src/main/java/org/fcrepo/auth/webac/WebACRolesProvider.java
WebACRolesProvider.getEffectiveAcl
static Optional<ACLHandle> getEffectiveAcl(final FedoraResource resource, final boolean ancestorAcl, final SessionFactory sessionFactory) { """ Recursively find the effective ACL as a URI along with the FedoraResource that points to it. This way, if the effective AC...
java
static Optional<ACLHandle> getEffectiveAcl(final FedoraResource resource, final boolean ancestorAcl, final SessionFactory sessionFactory) { try { final FedoraResource aclResource = resource.getAcl(); if (aclResource != null) { ...
[ "static", "Optional", "<", "ACLHandle", ">", "getEffectiveAcl", "(", "final", "FedoraResource", "resource", ",", "final", "boolean", "ancestorAcl", ",", "final", "SessionFactory", "sessionFactory", ")", "{", "try", "{", "final", "FedoraResource", "aclResource", "=",...
Recursively find the effective ACL as a URI along with the FedoraResource that points to it. This way, if the effective ACL is pointed to from a parent resource, the child will inherit any permissions that correspond to access to that parent. This ACL resource may or may not exist, and it may be external to the fedora ...
[ "Recursively", "find", "the", "effective", "ACL", "as", "a", "URI", "along", "with", "the", "FedoraResource", "that", "points", "to", "it", ".", "This", "way", "if", "the", "effective", "ACL", "is", "pointed", "to", "from", "a", "parent", "resource", "the"...
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-auth-webac/src/main/java/org/fcrepo/auth/webac/WebACRolesProvider.java#L395-L421
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaServerConfig.java
JolokiaServerConfig.initConfigAndValidate
protected void initConfigAndValidate(Map<String,String> agentConfig) { """ Initialise and validate early in order to fail fast in case of an configuration error """ initContext(); initProtocol(agentConfig); initAddress(agentConfig); port = Integer.parseInt(agentConfig.get("port"...
java
protected void initConfigAndValidate(Map<String,String> agentConfig) { initContext(); initProtocol(agentConfig); initAddress(agentConfig); port = Integer.parseInt(agentConfig.get("port")); backlog = Integer.parseInt(agentConfig.get("backlog")); initExecutor(agentConfig); ...
[ "protected", "void", "initConfigAndValidate", "(", "Map", "<", "String", ",", "String", ">", "agentConfig", ")", "{", "initContext", "(", ")", ";", "initProtocol", "(", "agentConfig", ")", ";", "initAddress", "(", "agentConfig", ")", ";", "port", "=", "Integ...
Initialise and validate early in order to fail fast in case of an configuration error
[ "Initialise", "and", "validate", "early", "in", "order", "to", "fail", "fast", "in", "case", "of", "an", "configuration", "error" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaServerConfig.java#L354-L365
jenkinsci/jenkins
core/src/main/java/hudson/diagnosis/OldDataMonitor.java
OldDataMonitor.report
public static void report(UnmarshallingContext context, String version) { """ Inform monitor that some data in a deprecated format has been loaded, during XStream unmarshalling when the Saveable containing this object is not available. @param context XStream unmarshalling context @param version Hudson release w...
java
public static void report(UnmarshallingContext context, String version) { RobustReflectionConverter.addErrorInContext(context, new ReportException(version)); }
[ "public", "static", "void", "report", "(", "UnmarshallingContext", "context", ",", "String", "version", ")", "{", "RobustReflectionConverter", ".", "addErrorInContext", "(", "context", ",", "new", "ReportException", "(", "version", ")", ")", ";", "}" ]
Inform monitor that some data in a deprecated format has been loaded, during XStream unmarshalling when the Saveable containing this object is not available. @param context XStream unmarshalling context @param version Hudson release when the data structure changed.
[ "Inform", "monitor", "that", "some", "data", "in", "a", "deprecated", "format", "has", "been", "loaded", "during", "XStream", "unmarshalling", "when", "the", "Saveable", "containing", "this", "object", "is", "not", "available", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/diagnosis/OldDataMonitor.java#L191-L193
Red5/red5-server-common
src/main/java/org/red5/server/messaging/AbstractPipe.java
AbstractPipe.fireConsumerConnectionEvent
protected void fireConsumerConnectionEvent(IConsumer consumer, PipeConnectionEvent.EventType type, Map<String, Object> paramMap) { """ Broadcast consumer connection event @param consumer Consumer that has connected @param type Event type @param paramMap Parameters passed with connection """ fir...
java
protected void fireConsumerConnectionEvent(IConsumer consumer, PipeConnectionEvent.EventType type, Map<String, Object> paramMap) { firePipeConnectionEvent(PipeConnectionEvent.build(this, type, consumer, paramMap)); }
[ "protected", "void", "fireConsumerConnectionEvent", "(", "IConsumer", "consumer", ",", "PipeConnectionEvent", ".", "EventType", "type", ",", "Map", "<", "String", ",", "Object", ">", "paramMap", ")", "{", "firePipeConnectionEvent", "(", "PipeConnectionEvent", ".", "...
Broadcast consumer connection event @param consumer Consumer that has connected @param type Event type @param paramMap Parameters passed with connection
[ "Broadcast", "consumer", "connection", "event" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/messaging/AbstractPipe.java#L239-L241
apache/spark
common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java
JavaUtils.timeStringAs
public static long timeStringAs(String str, TimeUnit unit) { """ Convert a passed time string (e.g. 50s, 100ms, or 250us) to a time count in the given unit. The unit is also considered the default if the given string does not specify a unit. """ String lower = str.toLowerCase(Locale.ROOT).trim(); try...
java
public static long timeStringAs(String str, TimeUnit unit) { String lower = str.toLowerCase(Locale.ROOT).trim(); try { Matcher m = Pattern.compile("(-?[0-9]+)([a-z]+)?").matcher(lower); if (!m.matches()) { throw new NumberFormatException("Failed to parse time string: " + str); } ...
[ "public", "static", "long", "timeStringAs", "(", "String", "str", ",", "TimeUnit", "unit", ")", "{", "String", "lower", "=", "str", ".", "toLowerCase", "(", "Locale", ".", "ROOT", ")", ".", "trim", "(", ")", ";", "try", "{", "Matcher", "m", "=", "Pat...
Convert a passed time string (e.g. 50s, 100ms, or 250us) to a time count in the given unit. The unit is also considered the default if the given string does not specify a unit.
[ "Convert", "a", "passed", "time", "string", "(", "e", ".", "g", ".", "50s", "100ms", "or", "250us", ")", "to", "a", "time", "count", "in", "the", "given", "unit", ".", "The", "unit", "is", "also", "considered", "the", "default", "if", "the", "given",...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java#L228-L254
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/builder/FieldAccessor.java
FieldAccessor.getAnnotations
public <A extends Annotation> List<A> getAnnotations(final Class<A> annoClass) { """ アノテーションのタイプを指定してアノテーション一覧を取得します。 <p>繰り返しのアノテーションの場合、初めに見つかったものを返します。</p> @param <A> 取得対象のアノテーションのタイプ @param annoClass 取得対象のアノテーションのタイプ。 @return 指定したアノテーションが見つからない場合は、空のリスト返します。 @throws NullPointerException {@literal annoCla...
java
public <A extends Annotation> List<A> getAnnotations(final Class<A> annoClass) { Objects.requireNonNull(annoClass, "annoClass should not be null."); return getAnnotationsByType(expandedAnnos, annoClass); }
[ "public", "<", "A", "extends", "Annotation", ">", "List", "<", "A", ">", "getAnnotations", "(", "final", "Class", "<", "A", ">", "annoClass", ")", "{", "Objects", ".", "requireNonNull", "(", "annoClass", ",", "\"annoClass should not be null.\"", ")", ";", "r...
アノテーションのタイプを指定してアノテーション一覧を取得します。 <p>繰り返しのアノテーションの場合、初めに見つかったものを返します。</p> @param <A> 取得対象のアノテーションのタイプ @param annoClass 取得対象のアノテーションのタイプ。 @return 指定したアノテーションが見つからない場合は、空のリスト返します。 @throws NullPointerException {@literal annoClass is null.}
[ "アノテーションのタイプを指定してアノテーション一覧を取得します。", "<p", ">", "繰り返しのアノテーションの場合、初めに見つかったものを返します。<", "/", "p", ">" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/builder/FieldAccessor.java#L92-L96
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java
DoubleIntIndex.lessThan
private boolean lessThan(int i, int j) { """ Check if row indexed i is less than row indexed j @param i the first index @param j the second index @return true or false """ if (sortOnValues) { if (values[i] < values[j]) { return true; } } else { ...
java
private boolean lessThan(int i, int j) { if (sortOnValues) { if (values[i] < values[j]) { return true; } } else { if (keys[i] < keys[j]) { return true; } } return false; }
[ "private", "boolean", "lessThan", "(", "int", "i", ",", "int", "j", ")", "{", "if", "(", "sortOnValues", ")", "{", "if", "(", "values", "[", "i", "]", "<", "values", "[", "j", "]", ")", "{", "return", "true", ";", "}", "}", "else", "{", "if", ...
Check if row indexed i is less than row indexed j @param i the first index @param j the second index @return true or false
[ "Check", "if", "row", "indexed", "i", "is", "less", "than", "row", "indexed", "j" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L671-L684
Azure/azure-sdk-for-java
applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/EventsImpl.java
EventsImpl.getByTypeAsync
public Observable<EventsResults> getByTypeAsync(String appId, EventType eventType) { """ Execute OData query. Executes an OData query for events. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param eventType The type of events to query; eit...
java
public Observable<EventsResults> getByTypeAsync(String appId, EventType eventType) { return getByTypeWithServiceResponseAsync(appId, eventType).map(new Func1<ServiceResponse<EventsResults>, EventsResults>() { @Override public EventsResults call(ServiceResponse<EventsResults> response) { ...
[ "public", "Observable", "<", "EventsResults", ">", "getByTypeAsync", "(", "String", "appId", ",", "EventType", "eventType", ")", "{", "return", "getByTypeWithServiceResponseAsync", "(", "appId", ",", "eventType", ")", ".", "map", "(", "new", "Func1", "<", "Servi...
Execute OData query. Executes an OData query for events. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param eventType The type of events to query; either a standard event type (`traces`, `customEvents`, `pageViews`, `requests`, `dependencies`, `exc...
[ "Execute", "OData", "query", ".", "Executes", "an", "OData", "query", "for", "events", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/EventsImpl.java#L105-L112
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(JSONObject expected, JSONObject actual, boolean strict) throws JSONException { """ Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONObject @param actual JSONObject to...
java
public static void assertEquals(JSONObject expected, JSONObject actual, boolean strict) throws JSONException { assertEquals(expected, actual, strict ? JSONCompareMode.STRICT : JSONCompareMode.LENIENT); }
[ "public", "static", "void", "assertEquals", "(", "JSONObject", "expected", ",", "JSONObject", "actual", ",", "boolean", "strict", ")", "throws", "JSONException", "{", "assertEquals", "(", "expected", ",", "actual", ",", "strict", "?", "JSONCompareMode", ".", "ST...
Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONObject @param actual JSONObject to compare @param strict Enables strict checking @throws JSONException JSON parsing error
[ "Asserts", "that", "the", "JSONObject", "provided", "matches", "the", "expected", "JSONObject", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L527-L530
google/closure-templates
java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitorAssistantForMsgs.java
GenJsCodeVisitorAssistantForMsgs.generateMsgGroupVariable
private Expression generateMsgGroupVariable(MsgFallbackGroupNode node, String tmpVarName) { """ Returns a code chunk representing a variable declaration for an {@link MsgFallbackGroupNode} that contains fallback(s). """ checkState(node.numChildren() == 2); // Generate the goog.getMsg calls for all ch...
java
private Expression generateMsgGroupVariable(MsgFallbackGroupNode node, String tmpVarName) { checkState(node.numChildren() == 2); // Generate the goog.getMsg calls for all children. GoogMsgCodeGenInfo primaryCodeGenInfo = genGoogGetMsgCallHelper(buildGoogMsgVarNameHelper(node.getChild(0)), node.getC...
[ "private", "Expression", "generateMsgGroupVariable", "(", "MsgFallbackGroupNode", "node", ",", "String", "tmpVarName", ")", "{", "checkState", "(", "node", ".", "numChildren", "(", ")", "==", "2", ")", ";", "// Generate the goog.getMsg calls for all children.", "GoogMsg...
Returns a code chunk representing a variable declaration for an {@link MsgFallbackGroupNode} that contains fallback(s).
[ "Returns", "a", "code", "chunk", "representing", "a", "variable", "declaration", "for", "an", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitorAssistantForMsgs.java#L210-L262
dropwizard/dropwizard
dropwizard-jetty/src/main/java/io/dropwizard/jetty/setup/ServletEnvironment.java
ServletEnvironment.addFilter
public FilterRegistration.Dynamic addFilter(String name, Class<? extends Filter> klass) { """ Add a filter class. @param name the filter's name @param klass the filter class @return a {@link javax.servlet.FilterRegistration.Dynamic} instance allowing for further configuration """ return addFilter...
java
public FilterRegistration.Dynamic addFilter(String name, Class<? extends Filter> klass) { return addFilter(name, new FilterHolder(requireNonNull(klass))); }
[ "public", "FilterRegistration", ".", "Dynamic", "addFilter", "(", "String", "name", ",", "Class", "<", "?", "extends", "Filter", ">", "klass", ")", "{", "return", "addFilter", "(", "name", ",", "new", "FilterHolder", "(", "requireNonNull", "(", "klass", ")",...
Add a filter class. @param name the filter's name @param klass the filter class @return a {@link javax.servlet.FilterRegistration.Dynamic} instance allowing for further configuration
[ "Add", "a", "filter", "class", "." ]
train
https://github.com/dropwizard/dropwizard/blob/7ee09a410476b9681e8072ab684788bb440877bd/dropwizard-jetty/src/main/java/io/dropwizard/jetty/setup/ServletEnvironment.java#L93-L95
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/nodelet/NodeletParser.java
NodeletParser.addNodelet
public void addNodelet(String xpath, NodeletAdder nodeletAdder) { """ Adds the nodelet. @param xpath the xpath @param nodeletAdder the nodelet adder """ nodeletAdder.add(xpath, this); setXpath(xpath); }
java
public void addNodelet(String xpath, NodeletAdder nodeletAdder) { nodeletAdder.add(xpath, this); setXpath(xpath); }
[ "public", "void", "addNodelet", "(", "String", "xpath", ",", "NodeletAdder", "nodeletAdder", ")", "{", "nodeletAdder", ".", "add", "(", "xpath", ",", "this", ")", ";", "setXpath", "(", "xpath", ")", ";", "}" ]
Adds the nodelet. @param xpath the xpath @param nodeletAdder the nodelet adder
[ "Adds", "the", "nodelet", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/nodelet/NodeletParser.java#L142-L145
Alluxio/alluxio
core/common/src/main/java/alluxio/util/io/ByteIOUtils.java
ByteIOUtils.readShort
public static short readShort(byte[] buf, int pos) { """ Reads a specific short byte value (2 bytes) from the input byte array at the given offset. @param buf input byte buffer @param pos offset into the byte buffer to read @return the short value read """ checkBoundary(buf, pos, 2); return (short...
java
public static short readShort(byte[] buf, int pos) { checkBoundary(buf, pos, 2); return (short) (((short) (buf[pos] & 0xff) << 8) | ((short) (buf[pos + 1] & 0xff))); }
[ "public", "static", "short", "readShort", "(", "byte", "[", "]", "buf", ",", "int", "pos", ")", "{", "checkBoundary", "(", "buf", ",", "pos", ",", "2", ")", ";", "return", "(", "short", ")", "(", "(", "(", "short", ")", "(", "buf", "[", "pos", ...
Reads a specific short byte value (2 bytes) from the input byte array at the given offset. @param buf input byte buffer @param pos offset into the byte buffer to read @return the short value read
[ "Reads", "a", "specific", "short", "byte", "value", "(", "2", "bytes", ")", "from", "the", "input", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/ByteIOUtils.java#L58-L61
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/cache/TileCache.java
TileCache.calcBoundsForTileCode
protected Bbox calcBoundsForTileCode(TileCode tileCode) { """ Calculate the exact bounding box for a tile, given it's tile-code. @param tileCode tile code @return bbox for tile """ // Calculate tile width and height for tileLevel=tileCode.getTileLevel() double div = Math.pow(2, tileCode.getTileLevel()...
java
protected Bbox calcBoundsForTileCode(TileCode tileCode) { // Calculate tile width and height for tileLevel=tileCode.getTileLevel() double div = Math.pow(2, tileCode.getTileLevel()); double scale = layer.getMapModel().getMapView().getCurrentScale(); double tileWidth = Math.ceil((scale * layerBounds.getWidth()) /...
[ "protected", "Bbox", "calcBoundsForTileCode", "(", "TileCode", "tileCode", ")", "{", "// Calculate tile width and height for tileLevel=tileCode.getTileLevel()", "double", "div", "=", "Math", ".", "pow", "(", "2", ",", "tileCode", ".", "getTileLevel", "(", ")", ")", ";...
Calculate the exact bounding box for a tile, given it's tile-code. @param tileCode tile code @return bbox for tile
[ "Calculate", "the", "exact", "bounding", "box", "for", "a", "tile", "given", "it", "s", "tile", "-", "code", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/cache/TileCache.java#L296-L307
js-lib-com/commons
src/main/java/js/util/Types.java
Types.equalsAny
public static boolean equalsAny(Type t, Type... typesToMatch) throws IllegalArgumentException { """ Test if a requested type is identity equal with one from a given types list. If <code>type</code> is null return false. If a type to match happened to be null is considered no match. @param t type to search for,...
java
public static boolean equalsAny(Type t, Type... typesToMatch) throws IllegalArgumentException { Params.notNullOrEmpty(typesToMatch, "Types to match"); if(t == null) { return false; } for(Type typeToMatch : typesToMatch) { if(t.equals(typeToMatch)) { return true; } ...
[ "public", "static", "boolean", "equalsAny", "(", "Type", "t", ",", "Type", "...", "typesToMatch", ")", "throws", "IllegalArgumentException", "{", "Params", ".", "notNullOrEmpty", "(", "typesToMatch", ",", "\"Types to match\"", ")", ";", "if", "(", "t", "==", "...
Test if a requested type is identity equal with one from a given types list. If <code>type</code> is null return false. If a type to match happened to be null is considered no match. @param t type to search for, possible null, @param typesToMatch types list to compare with. @return true if requested type is one from g...
[ "Test", "if", "a", "requested", "type", "is", "identity", "equal", "with", "one", "from", "a", "given", "types", "list", ".", "If", "<code", ">", "type<", "/", "code", ">", "is", "null", "return", "false", ".", "If", "a", "type", "to", "match", "happ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Types.java#L58-L70
headius/invokebinder
src/main/java/com/headius/invokebinder/transform/Transform.java
Transform.buildClassArguments
protected static void buildClassArguments(StringBuilder builder, Class<?>[] types) { """ Build a list of argument type classes suitable for inserting into Java code. This will be an argument list of the form "pkg.Cls1.class, pkg.Cls2[].class, primtype.class, ..." @param builder the builder in which to build ...
java
protected static void buildClassArguments(StringBuilder builder, Class<?>[] types) { boolean second = false; for (Class cls : types) { if (second) builder.append(", "); second = true; buildClassArgument(builder, cls); } }
[ "protected", "static", "void", "buildClassArguments", "(", "StringBuilder", "builder", ",", "Class", "<", "?", ">", "[", "]", "types", ")", "{", "boolean", "second", "=", "false", ";", "for", "(", "Class", "cls", ":", "types", ")", "{", "if", "(", "sec...
Build a list of argument type classes suitable for inserting into Java code. This will be an argument list of the form "pkg.Cls1.class, pkg.Cls2[].class, primtype.class, ..." @param builder the builder in which to build the argument list @param types the classes from which to create the argument list
[ "Build", "a", "list", "of", "argument", "type", "classes", "suitable", "for", "inserting", "into", "Java", "code", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/transform/Transform.java#L65-L72
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.latlngMinDistDeg
@Reference(authors = "Erich Schubert, Arthur Zimek, Hans-Peter Kriegel", // title = "Geodetic Distance Queries on R-Trees for Indexing Geographic Data", // booktitle = "Int. Symp. Advances in Spatial and Temporal Databases (SSTD'2013)", // url = "https://doi.org/10.1007/978-3-642-40235-7_9", // ...
java
@Reference(authors = "Erich Schubert, Arthur Zimek, Hans-Peter Kriegel", // title = "Geodetic Distance Queries on R-Trees for Indexing Geographic Data", // booktitle = "Int. Symp. Advances in Spatial and Temporal Databases (SSTD'2013)", // url = "https://doi.org/10.1007/978-3-642-40235-7_9", // ...
[ "@", "Reference", "(", "authors", "=", "\"Erich Schubert, Arthur Zimek, Hans-Peter Kriegel\"", ",", "//", "title", "=", "\"Geodetic Distance Queries on R-Trees for Indexing Geographic Data\"", ",", "//", "booktitle", "=", "\"Int. Symp. Advances in Spatial and Temporal Databases (SSTD'2...
Point to rectangle minimum distance. <p> Complexity: <ul> <li>Trivial cases (on longitude slice): no trigonometric functions.</li> <li>Cross-track case: 10+2 trig</li> <li>Corner case: 10+3 trig, 1 sqrt</li> </ul> <p> Reference: <p> Erich Schubert, Arthur Zimek, Hans-Peter Kriegel<br> Geodetic Distance Queries on R-Tre...
[ "Point", "to", "rectangle", "minimum", "distance", ".", "<p", ">", "Complexity", ":", "<ul", ">", "<li", ">", "Trivial", "cases", "(", "on", "longitude", "slice", ")", ":", "no", "trigonometric", "functions", ".", "<", "/", "li", ">", "<li", ">", "Cros...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L648-L655
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxFolder.java
BoxFolder.createFromIdAndName
public static BoxFolder createFromIdAndName(String folderId, String name) { """ A convenience method to create an empty folder with just the id and type fields set. This allows the ability to interact with the content sdk in a more descriptive and type safe manner @param folderId the id of folder to create @p...
java
public static BoxFolder createFromIdAndName(String folderId, String name) { JsonObject object = new JsonObject(); object.add(BoxItem.FIELD_ID, folderId); object.add(BoxItem.FIELD_TYPE, BoxFolder.TYPE); if (!TextUtils.isEmpty(name)) { object.add(BoxItem.FIELD_NAME, name); ...
[ "public", "static", "BoxFolder", "createFromIdAndName", "(", "String", "folderId", ",", "String", "name", ")", "{", "JsonObject", "object", "=", "new", "JsonObject", "(", ")", ";", "object", ".", "add", "(", "BoxItem", ".", "FIELD_ID", ",", "folderId", ")", ...
A convenience method to create an empty folder with just the id and type fields set. This allows the ability to interact with the content sdk in a more descriptive and type safe manner @param folderId the id of folder to create @param name the name of the folder to create @return an empty BoxFolder object that only co...
[ "A", "convenience", "method", "to", "create", "an", "empty", "folder", "with", "just", "the", "id", "and", "type", "fields", "set", ".", "This", "allows", "the", "ability", "to", "interact", "with", "the", "content", "sdk", "in", "a", "more", "descriptive"...
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxFolder.java#L107-L115
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/AuthenticationCallback.java
AuthenticationCallback.parseAuthentication
private void parseAuthentication(Intent data) { """ Extracts the Authentication data from the intent data. @param data the intent received at the end of the login process. """ String idToken = data.getStringExtra(Constants.ID_TOKEN_EXTRA); String accessToken = data.getStringExtra(Constants.A...
java
private void parseAuthentication(Intent data) { String idToken = data.getStringExtra(Constants.ID_TOKEN_EXTRA); String accessToken = data.getStringExtra(Constants.ACCESS_TOKEN_EXTRA); String tokenType = data.getStringExtra(Constants.TOKEN_TYPE_EXTRA); String refreshToken = data.getString...
[ "private", "void", "parseAuthentication", "(", "Intent", "data", ")", "{", "String", "idToken", "=", "data", ".", "getStringExtra", "(", "Constants", ".", "ID_TOKEN_EXTRA", ")", ";", "String", "accessToken", "=", "data", ".", "getStringExtra", "(", "Constants", ...
Extracts the Authentication data from the intent data. @param data the intent received at the end of the login process.
[ "Extracts", "the", "Authentication", "data", "from", "the", "intent", "data", "." ]
train
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/AuthenticationCallback.java#L73-L83
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java
DefaultLmlParser.processArgument
private void processArgument() { """ Found an argument opening sign. Have to find argument's name and replace it in the template. """ final StringBuilder argumentBuilder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char argumentCharacter = templateReader....
java
private void processArgument() { final StringBuilder argumentBuilder = new StringBuilder(); while (templateReader.hasNextCharacter()) { final char argumentCharacter = templateReader.nextCharacter(); if (argumentCharacter == syntax.getArgumentClosing()) { final Str...
[ "private", "void", "processArgument", "(", ")", "{", "final", "StringBuilder", "argumentBuilder", "=", "new", "StringBuilder", "(", ")", ";", "while", "(", "templateReader", ".", "hasNextCharacter", "(", ")", ")", "{", "final", "char", "argumentCharacter", "=", ...
Found an argument opening sign. Have to find argument's name and replace it in the template.
[ "Found", "an", "argument", "opening", "sign", ".", "Have", "to", "find", "argument", "s", "name", "and", "replace", "it", "in", "the", "template", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlParser.java#L152-L172
JodaOrg/joda-time
src/main/java/org/joda/time/format/FormatUtils.java
FormatUtils.writeUnpaddedInteger
public static void writeUnpaddedInteger(Writer out, long value) throws IOException { """ Converts an integer to a string, and writes it to the given writer. <p>This method is optimized for converting small values to strings. @param out receives integer converted to a string @param value value to con...
java
public static void writeUnpaddedInteger(Writer out, long value) throws IOException { int intValue = (int)value; if (intValue == value) { writeUnpaddedInteger(out, intValue); } else { out.write(Long.toString(value)); } }
[ "public", "static", "void", "writeUnpaddedInteger", "(", "Writer", "out", ",", "long", "value", ")", "throws", "IOException", "{", "int", "intValue", "=", "(", "int", ")", "value", ";", "if", "(", "intValue", "==", "value", ")", "{", "writeUnpaddedInteger", ...
Converts an integer to a string, and writes it to the given writer. <p>This method is optimized for converting small values to strings. @param out receives integer converted to a string @param value value to convert to a string
[ "Converts", "an", "integer", "to", "a", "string", "and", "writes", "it", "to", "the", "given", "writer", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/FormatUtils.java#L391-L400
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/op/OpNegate.java
OpNegate.toExprBoolean
public static ExprBoolean toExprBoolean(Expression expr, Position start, Position end) { """ Create a String expression from a Expression @param left @param right @return String expression @throws TemplateException """ if (expr instanceof Literal) { Boolean b = ((Literal) expr).getBoolean(null); ...
java
public static ExprBoolean toExprBoolean(Expression expr, Position start, Position end) { if (expr instanceof Literal) { Boolean b = ((Literal) expr).getBoolean(null); if (b != null) { return expr.getFactory().createLitBoolean(!b.booleanValue(), start, end); } } return new OpNegate(expr, start, end);...
[ "public", "static", "ExprBoolean", "toExprBoolean", "(", "Expression", "expr", ",", "Position", "start", ",", "Position", "end", ")", "{", "if", "(", "expr", "instanceof", "Literal", ")", "{", "Boolean", "b", "=", "(", "(", "Literal", ")", "expr", ")", "...
Create a String expression from a Expression @param left @param right @return String expression @throws TemplateException
[ "Create", "a", "String", "expression", "from", "a", "Expression" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/op/OpNegate.java#L55-L63
jbundle/jbundle
base/model/src/main/java/org/jbundle/base/model/Utility.java
Utility.propertiesToURL
public static String propertiesToURL(String strURL, Map<String,Object> properties) { """ Add to this URL using all the properties in this property list. @param strURL The original URL string. @param properties The properties to add (key/value pairs). @return The new URL string. """ if (properties !=...
java
public static String propertiesToURL(String strURL, Map<String,Object> properties) { if (properties != null) { for (String strKey : properties.keySet()) { Object strValue = properties.get(strKey); strURL = Utility.addURLParam(strURL, strKey.toS...
[ "public", "static", "String", "propertiesToURL", "(", "String", "strURL", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "if", "(", "properties", "!=", "null", ")", "{", "for", "(", "String", "strKey", ":", "properties", ".", "key...
Add to this URL using all the properties in this property list. @param strURL The original URL string. @param properties The properties to add (key/value pairs). @return The new URL string.
[ "Add", "to", "this", "URL", "using", "all", "the", "properties", "in", "this", "property", "list", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Utility.java#L90-L101
luuuis/jcalendar
src/main/java/com/toedter/calendar/DateUtil.java
DateUtil.setSelectableDateRange
public void setSelectableDateRange(Date min, Date max) { """ Sets a valid date range for selectable dates. If max is before min, the default range with no limitation is set. @param min the minimum selectable date or null (then the minimum date is set to 01\01\0001) @param max the maximum selectable date or...
java
public void setSelectableDateRange(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(minSel...
[ "public", "void", "setSelectableDateRange", "(", "Date", "min", ",", "Date", "max", ")", "{", "if", "(", "min", "==", "null", ")", "{", "minSelectableDate", "=", "defaultMinSelectableDate", ";", "}", "else", "{", "minSelectableDate", "=", "min", ";", "}", ...
Sets a valid date range for selectable dates. If max is before min, the default range with no limitation is set. @param min the minimum selectable date or null (then the minimum date is set to 01\01\0001) @param max the maximum selectable date or null (then the maximum date is set to 01\01\9999)
[ "Sets", "a", "valid", "date", "range", "for", "selectable", "dates", ".", "If", "max", "is", "before", "min", "the", "default", "range", "with", "no", "limitation", "is", "set", "." ]
train
https://github.com/luuuis/jcalendar/blob/442e5bc319d92dee93400e6180ca74a5b6bd7775/src/main/java/com/toedter/calendar/DateUtil.java#L64-L79
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.cookieEquals
@Override public void cookieEquals(String cookieName, String expectedCookieValue) { """ Waits up to the default wait time (5 seconds unless changed) for a cookies with the provided name has a value equal to the expected value. This information will be logged and recorded, with a screenshot for traceability a...
java
@Override public void cookieEquals(String cookieName, String expectedCookieValue) { cookieEquals(defaultWait, cookieName, expectedCookieValue); }
[ "@", "Override", "public", "void", "cookieEquals", "(", "String", "cookieName", ",", "String", "expectedCookieValue", ")", "{", "cookieEquals", "(", "defaultWait", ",", "cookieName", ",", "expectedCookieValue", ")", ";", "}" ]
Waits up to the default wait time (5 seconds unless changed) for a cookies with the provided name has a value equal to the expected value. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param cookieName the name of the cookie @param expectedCooki...
[ "Waits", "up", "to", "the", "default", "wait", "time", "(", "5", "seconds", "unless", "changed", ")", "for", "a", "cookies", "with", "the", "provided", "name", "has", "a", "value", "equal", "to", "the", "expected", "value", ".", "This", "information", "w...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L318-L321
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/ElevationUtil.java
ElevationUtil.getVerticalShadowColor
private static int getVerticalShadowColor(final int elevation, @NonNull final Orientation orientation, final boolean parallelLight) { """ Returns the color of a shadow, which is located next to a corner of an elevated view ...
java
private static int getVerticalShadowColor(final int elevation, @NonNull final Orientation orientation, final boolean parallelLight) { switch (orientation) { case TOP_LEFT: case BOTTOM_LEFT: ...
[ "private", "static", "int", "getVerticalShadowColor", "(", "final", "int", "elevation", ",", "@", "NonNull", "final", "Orientation", "orientation", ",", "final", "boolean", "parallelLight", ")", "{", "switch", "(", "orientation", ")", "{", "case", "TOP_LEFT", ":...
Returns the color of a shadow, which is located next to a corner of an elevated view in vertical direction. @param elevation The elevation, which should be emulated, in dp as an {@link Integer} value. The elevation must be at least 0 and at maximum the value of the constant <code>MAX_ELEVATION</code> @param orientatio...
[ "Returns", "the", "color", "of", "a", "shadow", "which", "is", "located", "next", "to", "a", "corner", "of", "an", "elevated", "view", "in", "vertical", "direction", "." ]
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/ElevationUtil.java#L567-L580
TakahikoKawasaki/nv-websocket-client
src/main/java/com/neovisionaries/ws/client/WebSocket.java
WebSocket.sendClose
public WebSocket sendClose(int closeCode, String reason) { """ Send a close frame to the server. <p> This method is an alias of {@link #sendFrame(WebSocketFrame) sendFrame}{@code (WebSocketFrame.}{@link WebSocketFrame#createCloseFrame(int, String) createCloseFrame}{@code (closeCode, reason))}. </p> @par...
java
public WebSocket sendClose(int closeCode, String reason) { return sendFrame(WebSocketFrame.createCloseFrame(closeCode, reason)); }
[ "public", "WebSocket", "sendClose", "(", "int", "closeCode", ",", "String", "reason", ")", "{", "return", "sendFrame", "(", "WebSocketFrame", ".", "createCloseFrame", "(", "closeCode", ",", "reason", ")", ")", ";", "}" ]
Send a close frame to the server. <p> This method is an alias of {@link #sendFrame(WebSocketFrame) sendFrame}{@code (WebSocketFrame.}{@link WebSocketFrame#createCloseFrame(int, String) createCloseFrame}{@code (closeCode, reason))}. </p> @param closeCode The close code. @param reason The close reason. Note that a con...
[ "Send", "a", "close", "frame", "to", "the", "server", "." ]
train
https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/WebSocket.java#L3094-L3097
dnsjava/dnsjava
org/xbill/DNS/Message.java
Message.findRRset
public boolean findRRset(Name name, int type, int section) { """ Determines if an RRset with the given name and type is already present in the given section. @see RRset @see Section """ if (sections[section] == null) return false; for (int i = 0; i < sections[section].size(); i++) { Record r = (Record...
java
public boolean findRRset(Name name, int type, int section) { if (sections[section] == null) return false; for (int i = 0; i < sections[section].size(); i++) { Record r = (Record) sections[section].get(i); if (r.getType() == type && name.equals(r.getName())) return true; } return false; }
[ "public", "boolean", "findRRset", "(", "Name", "name", ",", "int", "type", ",", "int", "section", ")", "{", "if", "(", "sections", "[", "section", "]", "==", "null", ")", "return", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s...
Determines if an RRset with the given name and type is already present in the given section. @see RRset @see Section
[ "Determines", "if", "an", "RRset", "with", "the", "given", "name", "and", "type", "is", "already", "present", "in", "the", "given", "section", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Message.java#L234-L244
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java
TypeScriptCompilerMojo.getOutputFile
public File getOutputFile(File input, String ext) { """ Gets the output file for the given input and the given extension. @param input the input file @param ext the extension @return the output file, may not exist """ File source; File destination; if (input.getAbsolutePath().sta...
java
public File getOutputFile(File input, String ext) { File source; File destination; if (input.getAbsolutePath().startsWith(internalSources.getAbsolutePath())) { source = internalSources; destination = destinationForInternals; } else if (input.getAbsolutePath().star...
[ "public", "File", "getOutputFile", "(", "File", "input", ",", "String", "ext", ")", "{", "File", "source", ";", "File", "destination", ";", "if", "(", "input", ".", "getAbsolutePath", "(", ")", ".", "startsWith", "(", "internalSources", ".", "getAbsolutePath...
Gets the output file for the given input and the given extension. @param input the input file @param ext the extension @return the output file, may not exist
[ "Gets", "the", "output", "file", "for", "the", "given", "input", "and", "the", "given", "extension", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java#L263-L280
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/impl/FileDescriptorLimit.java
FileDescriptorLimit.getUlimit
@edu.umd.cs.findbugs.annotations.SuppressWarnings( { """ This method executes the command "bash -c ulimit -a" on the machine. """"DM_DEFAULT_ENCODING", "OS_OPEN_STREAM"}) private static void getUlimit(PrintWriter writer) throws IOException { // TODO should first check whether /bin/bash even exists ...
java
@edu.umd.cs.findbugs.annotations.SuppressWarnings({"DM_DEFAULT_ENCODING", "OS_OPEN_STREAM"}) private static void getUlimit(PrintWriter writer) throws IOException { // TODO should first check whether /bin/bash even exists InputStream is = new ProcessBuilder("bash", "-c", "ulimit -a").start().getInput...
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressWarnings", "(", "{", "\"DM_DEFAULT_ENCODING\"", ",", "\"OS_OPEN_STREAM\"", "}", ")", "private", "static", "void", "getUlimit", "(", "PrintWriter", "writer", ")", "throws", "I...
This method executes the command "bash -c ulimit -a" on the machine.
[ "This", "method", "executes", "the", "command", "bash", "-", "c", "ulimit", "-", "a", "on", "the", "machine", "." ]
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/impl/FileDescriptorLimit.java#L188-L202
wildfly/wildfly-core
domain-management/src/main/java/org/jboss/as/domain/management/security/PropertiesFileLoader.java
PropertiesFileLoader.persistProperties
public synchronized void persistProperties() throws IOException { """ Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file. @throws IOException """ beginPersistence(); // Read the properties file into memory // Shouldn't...
java
public synchronized void persistProperties() throws IOException { beginPersistence(); // Read the properties file into memory // Shouldn't be so bad - it's a small file List<String> content = readFile(propertiesFile); BufferedWriter bw = new BufferedWriter(new OutputStreamWrite...
[ "public", "synchronized", "void", "persistProperties", "(", ")", "throws", "IOException", "{", "beginPersistence", "(", ")", ";", "// Read the properties file into memory", "// Shouldn't be so bad - it's a small file", "List", "<", "String", ">", "content", "=", "readFile",...
Saves changes in properties file. It reads the property file into memory, modifies it and saves it back to the file. @throws IOException
[ "Saves", "changes", "in", "properties", "file", ".", "It", "reads", "the", "property", "file", "into", "memory", "modifies", "it", "and", "saves", "it", "back", "to", "the", "file", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/PropertiesFileLoader.java#L216-L252
openbase/jul
exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java
ExceptionPrinter.printHistory
public static <T extends Throwable> void printHistory(final T th, final Logger logger) { """ Print Exception messages without stack trace in non debug mode. Method prints recursive all messages of the given exception stack to get a history overview of the causes. In verbose mode (app -v) the stacktrace is printed...
java
public static <T extends Throwable> void printHistory(final T th, final Logger logger) { printHistory(th, logger, LogLevel.ERROR); }
[ "public", "static", "<", "T", "extends", "Throwable", ">", "void", "printHistory", "(", "final", "T", "th", ",", "final", "Logger", "logger", ")", "{", "printHistory", "(", "th", ",", "logger", ",", "LogLevel", ".", "ERROR", ")", ";", "}" ]
Print Exception messages without stack trace in non debug mode. Method prints recursive all messages of the given exception stack to get a history overview of the causes. In verbose mode (app -v) the stacktrace is printed in the end of history. The logging level is fixed to level "error". @param <T> Exception type @pa...
[ "Print", "Exception", "messages", "without", "stack", "trace", "in", "non", "debug", "mode", ".", "Method", "prints", "recursive", "all", "messages", "of", "the", "given", "exception", "stack", "to", "get", "a", "history", "overview", "of", "the", "causes", ...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java#L146-L148
dasein-cloud/dasein-cloud-azure
src/main/java/org/dasein/cloud/azure/network/AzureIpAddressSupport.java
AzureIpAddressSupport.listRulesForServer
@Override public @Nonnull Iterable<IpForwardingRule> listRulesForServer(@Nonnull String serverId) throws InternalException, CloudException { """ Lists the IP forwarding rules associated with the specified public IP address. This method is safe to call even when requested on a private IP address or when IP for...
java
@Override public @Nonnull Iterable<IpForwardingRule> listRulesForServer(@Nonnull String serverId) throws InternalException, CloudException { if(serverId == null) throw new InternalException("Parameter serverId cannot be null"); PersistentVMRoleModel persistentVMRoleModel = getVMRole(ser...
[ "@", "Override", "public", "@", "Nonnull", "Iterable", "<", "IpForwardingRule", ">", "listRulesForServer", "(", "@", "Nonnull", "String", "serverId", ")", "throws", "InternalException", ",", "CloudException", "{", "if", "(", "serverId", "==", "null", ")", "throw...
Lists the IP forwarding rules associated with the specified public IP address. This method is safe to call even when requested on a private IP address or when IP forwarding is not supported. In those situations, {@link java.util.Collections#emptyList()} will be returned. @param serverId the unique ID of the virtual ma...
[ "Lists", "the", "IP", "forwarding", "rules", "associated", "with", "the", "specified", "public", "IP", "address", ".", "This", "method", "is", "safe", "to", "call", "even", "when", "requested", "on", "a", "private", "IP", "address", "or", "when", "IP", "fo...
train
https://github.com/dasein-cloud/dasein-cloud-azure/blob/e2abb775c0f23f0d0f2509fba31128c7b2027d7c/src/main/java/org/dasein/cloud/azure/network/AzureIpAddressSupport.java#L404-L430
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AnnotationDto.java
AnnotationDto.transformToDto
public static AnnotationDto transformToDto(Annotation annotation) { """ Converts annotation entity to DTO. @param annotation The annotation entity. Cannot be null. @return The annotation DTO. @throws WebApplicationException If an error occurs. """ if (annotation == null) { t...
java
public static AnnotationDto transformToDto(Annotation annotation) { if (annotation == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } AnnotationDto result = createDtoObject(AnnotationDto.class, annot...
[ "public", "static", "AnnotationDto", "transformToDto", "(", "Annotation", "annotation", ")", "{", "if", "(", "annotation", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be converted to Dto object.\"", ",", "Status", ...
Converts annotation entity to DTO. @param annotation The annotation entity. Cannot be null. @return The annotation DTO. @throws WebApplicationException If an error occurs.
[ "Converts", "annotation", "entity", "to", "DTO", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AnnotationDto.java#L68-L76
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginJarExploder.java
ServerPluginJarExploder.explode
@Override public ExplodedPlugin explode(PluginInfo pluginInfo) { """ JAR files of directory extensions/plugins can be moved when server is up and plugins are uninstalled. For this reason these files must not be locked by classloaders. They are copied to the directory web/deploy/plugins in order to be loaded by...
java
@Override public ExplodedPlugin explode(PluginInfo pluginInfo) { File toDir = new File(fs.getDeployedPluginsDir(), pluginInfo.getKey()); try { forceMkdir(toDir); org.sonar.core.util.FileUtils.cleanDirectory(toDir); File jarSource = pluginInfo.getNonNullJarFile(); File jarTarget = new ...
[ "@", "Override", "public", "ExplodedPlugin", "explode", "(", "PluginInfo", "pluginInfo", ")", "{", "File", "toDir", "=", "new", "File", "(", "fs", ".", "getDeployedPluginsDir", "(", ")", ",", "pluginInfo", ".", "getKey", "(", ")", ")", ";", "try", "{", "...
JAR files of directory extensions/plugins can be moved when server is up and plugins are uninstalled. For this reason these files must not be locked by classloaders. They are copied to the directory web/deploy/plugins in order to be loaded by {@link org.sonar.core.platform.PluginLoader}.
[ "JAR", "files", "of", "directory", "extensions", "/", "plugins", "can", "be", "moved", "when", "server", "is", "up", "and", "plugins", "are", "uninstalled", ".", "For", "this", "reason", "these", "files", "must", "not", "be", "locked", "by", "classloaders", ...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginJarExploder.java#L48-L67
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/storage/SoftMethodStorage.java
SoftMethodStorage.storeArgs
private void storeArgs(Method method, Array methodArgs) { """ stores arguments of a method @param method @param methodArgs """ Class[] pmt = method.getParameterTypes(); Method[] args; synchronized (methodArgs) { Object o = methodArgs.get(pmt.length + 1, null); if (o == null) { args = new Me...
java
private void storeArgs(Method method, Array methodArgs) { Class[] pmt = method.getParameterTypes(); Method[] args; synchronized (methodArgs) { Object o = methodArgs.get(pmt.length + 1, null); if (o == null) { args = new Method[1]; methodArgs.setEL(pmt.length + 1, args); } else { Method[] m...
[ "private", "void", "storeArgs", "(", "Method", "method", ",", "Array", "methodArgs", ")", "{", "Class", "[", "]", "pmt", "=", "method", ".", "getParameterTypes", "(", ")", ";", "Method", "[", "]", "args", ";", "synchronized", "(", "methodArgs", ")", "{",...
stores arguments of a method @param method @param methodArgs
[ "stores", "arguments", "of", "a", "method" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/storage/SoftMethodStorage.java#L106-L126
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java
JPAGenericDAORulesBasedImpl.generateEntityValues
protected void generateEntityValues(Object entity, DAOMode mode, DAOValidatorEvaluationTime validationTime) { """ Méthode de generation des valeurs automatiques @param entity Entité cible de la generation @param mode Mode DAO @param validationTime Moment d'évaluation """ // Obtention de la classe de ...
java
protected void generateEntityValues(Object entity, DAOMode mode, DAOValidatorEvaluationTime validationTime) { // Obtention de la classe de l'entite Class<?> entityClass = entity.getClass(); // Obtention de la liste des champs de l'entite List<Field> fields = DAOValidatorHelper.getAllFields(entityCla...
[ "protected", "void", "generateEntityValues", "(", "Object", "entity", ",", "DAOMode", "mode", ",", "DAOValidatorEvaluationTime", "validationTime", ")", "{", "// Obtention de la classe de l'entite\r", "Class", "<", "?", ">", "entityClass", "=", "entity", ".", "getClass",...
Méthode de generation des valeurs automatiques @param entity Entité cible de la generation @param mode Mode DAO @param validationTime Moment d'évaluation
[ "Méthode", "de", "generation", "des", "valeurs", "automatiques" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java#L891-L938
apache/incubator-gobblin
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
AzkabanClient.executeFlowWithOptions
public AzkabanExecuteFlowStatus executeFlowWithOptions(String projectName, String flowName, Map<String, String> flowOptions, Map<String, String> flow...
java
public AzkabanExecuteFlowStatus executeFlowWithOptions(String projectName, String flowName, Map<String, String> flowOptions, Map<String, String> flow...
[ "public", "AzkabanExecuteFlowStatus", "executeFlowWithOptions", "(", "String", "projectName", ",", "String", "flowName", ",", "Map", "<", "String", ",", "String", ">", "flowOptions", ",", "Map", "<", "String", ",", "String", ">", "flowParameters", ")", "throws", ...
Execute a flow by providing flow parameters and options. The project and flow should be created first. @param projectName project name @param flowName flow name @param flowOptions flow options @param flowParameters flow parameters @return The status object which contains success status and execution id.
[ "Execute", "a", "flow", "by", "providing", "flow", "parameters", "and", "options", ".", "The", "project", "and", "flow", "should", "be", "created", "first", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java#L341-L355
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java
SntpClient.requestTime
public boolean requestTime(String host, int timeout) { """ Sends an SNTP request to the given host and processes the response. @param host host name of the server. @param timeout network timeout in milliseconds. @return true if the transaction was successful. """ DatagramSocket socket = null; ...
java
public boolean requestTime(String host, int timeout) { DatagramSocket socket = null; try { socket = new DatagramSocket(); socket.setSoTimeout(timeout); InetAddress address = InetAddress.getByName(host); byte[] buffer = new byte[NTP_PACKET_SIZE]; ...
[ "public", "boolean", "requestTime", "(", "String", "host", ",", "int", "timeout", ")", "{", "DatagramSocket", "socket", "=", "null", ";", "try", "{", "socket", "=", "new", "DatagramSocket", "(", ")", ";", "socket", ".", "setSoTimeout", "(", "timeout", ")",...
Sends an SNTP request to the given host and processes the response. @param host host name of the server. @param timeout network timeout in milliseconds. @return true if the transaction was successful.
[ "Sends", "an", "SNTP", "request", "to", "the", "given", "host", "and", "processes", "the", "response", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/time/SntpClient.java#L72-L130
Jasig/uPortal
uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java
GoogleAnalyticsController.isMember
private boolean isMember(IGroupMember groupMember, String groupName) { """ Check if the user is a member of the specified group name <p>Internal search, thus case sensitive. """ try { IEntityGroup group = GroupService.findGroup(groupName); if (group != null) { ...
java
private boolean isMember(IGroupMember groupMember, String groupName) { try { IEntityGroup group = GroupService.findGroup(groupName); if (group != null) { return groupMember.isDeepMemberOf(group); } final EntityIdentifier[] results = ...
[ "private", "boolean", "isMember", "(", "IGroupMember", "groupMember", ",", "String", "groupName", ")", "{", "try", "{", "IEntityGroup", "group", "=", "GroupService", ".", "findGroup", "(", "groupName", ")", ";", "if", "(", "group", "!=", "null", ")", "{", ...
Check if the user is a member of the specified group name <p>Internal search, thus case sensitive.
[ "Check", "if", "the", "user", "is", "a", "member", "of", "the", "specified", "group", "name" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/googleanalytics/GoogleAnalyticsController.java#L132-L166
jtmelton/appsensor
analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java
AggregateEventAnalysisEngine.getNotifications
protected LinkedList<Notification> getNotifications(Event triggerEvent, Rule rule) { """ Builds a queue of all {@link Notification}s from the events relating to the current {@link Rule}. The {@link Notification}s are ordered in the Queue by start time. @param triggerEvent the {@link Event} that triggered anal...
java
protected LinkedList<Notification> getNotifications(Event triggerEvent, Rule rule) { LinkedList<Notification> notificationQueue = new LinkedList<Notification>(); Collection<Event> events = getApplicableEvents(triggerEvent, rule); Collection<DetectionPoint> detectionPoints = rule.getAllDetectionPoints(); for (D...
[ "protected", "LinkedList", "<", "Notification", ">", "getNotifications", "(", "Event", "triggerEvent", ",", "Rule", "rule", ")", "{", "LinkedList", "<", "Notification", ">", "notificationQueue", "=", "new", "LinkedList", "<", "Notification", ">", "(", ")", ";", ...
Builds a queue of all {@link Notification}s from the events relating to the current {@link Rule}. The {@link Notification}s are ordered in the Queue by start time. @param triggerEvent the {@link Event} that triggered analysis @param rule the {@link Rule} being evaluated @return a queue of {@link TriggerEvents}
[ "Builds", "a", "queue", "of", "all", "{", "@link", "Notification", "}", "s", "from", "the", "events", "relating", "to", "the", "current", "{", "@link", "Rule", "}", ".", "The", "{", "@link", "Notification", "}", "s", "are", "ordered", "in", "the", "Que...
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java#L178-L208
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/component/ws/SuggestionsAction.java
SuggestionsAction.loadSuggestionsWithoutSearch
private SuggestionsWsResponse loadSuggestionsWithoutSearch(int skip, int limit, Set<String> recentlyBrowsedKeys, List<String> qualifiers) { """ we are generating suggestions, by using (1) favorites and (2) recently browsed components (without searchin in Elasticsearch) """ List<ComponentDto> favoriteDtos =...
java
private SuggestionsWsResponse loadSuggestionsWithoutSearch(int skip, int limit, Set<String> recentlyBrowsedKeys, List<String> qualifiers) { List<ComponentDto> favoriteDtos = favoriteFinder.list(); if (favoriteDtos.isEmpty() && recentlyBrowsedKeys.isEmpty()) { return newBuilder().build(); } try (Db...
[ "private", "SuggestionsWsResponse", "loadSuggestionsWithoutSearch", "(", "int", "skip", ",", "int", "limit", ",", "Set", "<", "String", ">", "recentlyBrowsedKeys", ",", "List", "<", "String", ">", "qualifiers", ")", "{", "List", "<", "ComponentDto", ">", "favori...
we are generating suggestions, by using (1) favorites and (2) recently browsed components (without searchin in Elasticsearch)
[ "we", "are", "generating", "suggestions", "by", "using", "(", "1", ")", "favorites", "and", "(", "2", ")", "recently", "browsed", "components", "(", "without", "searchin", "in", "Elasticsearch", ")" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/component/ws/SuggestionsAction.java#L175-L212
OpenLiberty/open-liberty
dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java
LifecycleCallbackHelper.invokeMethod
@SuppressWarnings( { """ Invokes the class method. The object instance can be null for the application main class. @param clazz the Class object @param methodName the Method name @param instance the instance object of the class. It can be null if the class is the application Main. """ "rawtypes", "uncheck...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public void invokeMethod(final Class clazz, final String methodName, final Object instance) { // instance can be null for the static application main method AccessController.doPrivileged(new PrivilegedAction() { @Override public ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "void", "invokeMethod", "(", "final", "Class", "clazz", ",", "final", "String", "methodName", ",", "final", "Object", "instance", ")", "{", "// instance can be null for th...
Invokes the class method. The object instance can be null for the application main class. @param clazz the Class object @param methodName the Method name @param instance the instance object of the class. It can be null if the class is the application Main.
[ "Invokes", "the", "class", "method", ".", "The", "object", "instance", "can", "be", "null", "for", "the", "application", "main", "class", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L186-L211
netty/netty
common/src/main/java/io/netty/util/NetUtil.java
NetUtil.bytesToIpAddress
public static String bytesToIpAddress(byte[] bytes, int offset, int length) { """ Converts 4-byte or 16-byte data into an IPv4 or IPv6 string respectively. @throws IllegalArgumentException if {@code length} is not {@code 4} nor {@code 16} """ switch (length) { case 4: { ...
java
public static String bytesToIpAddress(byte[] bytes, int offset, int length) { switch (length) { case 4: { return new StringBuilder(15) .append(bytes[offset] & 0xff) .append('.') .append(bytes[offset + 1] & 0xff) ...
[ "public", "static", "String", "bytesToIpAddress", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "length", ")", "{", "switch", "(", "length", ")", "{", "case", "4", ":", "{", "return", "new", "StringBuilder", "(", "15", ")", ".", "...
Converts 4-byte or 16-byte data into an IPv4 or IPv6 string respectively. @throws IllegalArgumentException if {@code length} is not {@code 4} nor {@code 16}
[ "Converts", "4", "-", "byte", "or", "16", "-", "byte", "data", "into", "an", "IPv4", "or", "IPv6", "string", "respectively", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/NetUtil.java#L447-L464
ingwarsw/arquillian-suite-extension
src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarDescriptorBuilder.java
EarDescriptorBuilder.addWeb
public EarDescriptorBuilder addWeb(String filename) { """ Adds WEB module to descriptor. Context will be generated automaticly, based on name of WAR name @param filename name of WAR to add @return this object """ String context; context = removeExtension(filename).replaceAll("[^a-z]", ""...
java
public EarDescriptorBuilder addWeb(String filename) { String context; context = removeExtension(filename).replaceAll("[^a-z]", ""); if (addRandom) { Random random = new Random(); context += "-" + random.nextInt(Integer.MAX_VALUE); } return addWeb(filename,...
[ "public", "EarDescriptorBuilder", "addWeb", "(", "String", "filename", ")", "{", "String", "context", ";", "context", "=", "removeExtension", "(", "filename", ")", ".", "replaceAll", "(", "\"[^a-z]\"", ",", "\"\"", ")", ";", "if", "(", "addRandom", ")", "{",...
Adds WEB module to descriptor. Context will be generated automaticly, based on name of WAR name @param filename name of WAR to add @return this object
[ "Adds", "WEB", "module", "to", "descriptor", "." ]
train
https://github.com/ingwarsw/arquillian-suite-extension/blob/93c9e542ead1d52f45e87b0632bb02ac11f693c8/src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarDescriptorBuilder.java#L95-L103
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsTool.java
CmsTool.groupHtml
public String groupHtml(CmsWorkplace wp) { """ Returns the necessary html code for the tool subgroups.<p> @param wp the jsp page to write the code to @return html code """ List<CmsTool> subTools = OpenCms.getWorkplaceManager().getToolManager().getToolsForPath( wp, getHand...
java
public String groupHtml(CmsWorkplace wp) { List<CmsTool> subTools = OpenCms.getWorkplaceManager().getToolManager().getToolsForPath( wp, getHandler().getPath(), false); Iterator<CmsTool> itSubTools = subTools.iterator(); m_container.clear(); while (itS...
[ "public", "String", "groupHtml", "(", "CmsWorkplace", "wp", ")", "{", "List", "<", "CmsTool", ">", "subTools", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getToolManager", "(", ")", ".", "getToolsForPath", "(", "wp", ",", "getHandler", "(", ...
Returns the necessary html code for the tool subgroups.<p> @param wp the jsp page to write the code to @return html code
[ "Returns", "the", "necessary", "html", "code", "for", "the", "tool", "subgroups", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsTool.java#L195-L230
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/PixelConvertingSpliterator.java
PixelConvertingSpliterator.getDoubletArrayElementSpliterator
public static PixelConvertingSpliterator<PixelBase, double[]> getDoubletArrayElementSpliterator( Spliterator<? extends PixelBase> pixelSpliterator) { """ Example implementation of a {@code PixelConvertingSpliterator<double[]>}. <p> The elements of the returned spliterator will be {@code double[]} of length 3 ...
java
public static PixelConvertingSpliterator<PixelBase, double[]> getDoubletArrayElementSpliterator( Spliterator<? extends PixelBase> pixelSpliterator){ PixelConvertingSpliterator<PixelBase, double[]> arraySpliterator = new PixelConvertingSpliterator<>( pixelSpliterator, getDoubleArrayConverter()); return arrayS...
[ "public", "static", "PixelConvertingSpliterator", "<", "PixelBase", ",", "double", "[", "]", ">", "getDoubletArrayElementSpliterator", "(", "Spliterator", "<", "?", "extends", "PixelBase", ">", "pixelSpliterator", ")", "{", "PixelConvertingSpliterator", "<", "PixelBase"...
Example implementation of a {@code PixelConvertingSpliterator<double[]>}. <p> The elements of the returned spliterator will be {@code double[]} of length 3 with normalized red, green and blue channels on index 0, 1 and 2. <p> <b>Code:</b> <pre> {@code Supplier<double[]> arrayAllocator = () -> { return new double[3]; };...
[ "Example", "implementation", "of", "a", "{", "@code", "PixelConvertingSpliterator<double", "[]", ">", "}", ".", "<p", ">", "The", "elements", "of", "the", "returned", "spliterator", "will", "be", "{", "@code", "double", "[]", "}", "of", "length", "3", "with"...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/PixelConvertingSpliterator.java#L200-L205
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.bytes
public BinaryResource bytes(URI anUri, AbstractContent someContent) throws IOException { """ POST to the URI and get the resource as binary resource. @param uri the uri to follow @return @throws IOException """ return doPOSTOrPUT(anUri, someContent, createBinaryResource()); }
java
public BinaryResource bytes(URI anUri, AbstractContent someContent) throws IOException { return doPOSTOrPUT(anUri, someContent, createBinaryResource()); }
[ "public", "BinaryResource", "bytes", "(", "URI", "anUri", ",", "AbstractContent", "someContent", ")", "throws", "IOException", "{", "return", "doPOSTOrPUT", "(", "anUri", ",", "someContent", ",", "createBinaryResource", "(", ")", ")", ";", "}" ]
POST to the URI and get the resource as binary resource. @param uri the uri to follow @return @throws IOException
[ "POST", "to", "the", "URI", "and", "get", "the", "resource", "as", "binary", "resource", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L379-L381
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java
StandardBullhornData.handleQueryForEntityEditHistory
protected <T extends EditHistoryEntity> EditHistoryListWrapper handleQueryForEntityEditHistory(Class<T> entityType, String where, Set<String> fieldSet, QueryParams params) { """ Makes the "query" api call for EditHistory <p> <p> HTTP Method: GET @param entityType the EditHistoryEntity type @param where ...
java
protected <T extends EditHistoryEntity> EditHistoryListWrapper handleQueryForEntityEditHistory(Class<T> entityType, String where, Set<String> fieldSet, QueryParams params) { Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForEditHistoryQuery(BullhornEntityInfo.getTypesRestEntityName(en...
[ "protected", "<", "T", "extends", "EditHistoryEntity", ">", "EditHistoryListWrapper", "handleQueryForEntityEditHistory", "(", "Class", "<", "T", ">", "entityType", ",", "String", "where", ",", "Set", "<", "String", ">", "fieldSet", ",", "QueryParams", "params", ")...
Makes the "query" api call for EditHistory <p> <p> HTTP Method: GET @param entityType the EditHistoryEntity type @param where a SQL type where clause @param fieldSet the fields to return, if null or emtpy will default to "*" all @param params optional QueryParams. @return a EditHistoryListWrapper containing...
[ "Makes", "the", "query", "api", "call", "for", "EditHistory", "<p", ">", "<p", ">", "HTTP", "Method", ":", "GET" ]
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java#L963-L969
phax/ph-web
ph-web/src/main/java/com/helger/web/multipart/MultipartStream.java
MultipartStream.readBoundary
public boolean readBoundary () throws MultipartMalformedStreamException { """ Skips a <code>boundary</code> token, and checks whether more <code>encapsulations</code> are contained in the stream. @return <code>true</code> if there are more encapsulations in this stream; <code>false</code> otherwise. @throws ...
java
public boolean readBoundary () throws MultipartMalformedStreamException { final byte [] marker = new byte [2]; boolean bNextChunk = false; m_nHead += m_nBoundaryLength; try { marker[0] = readByte (); if (marker[0] == LF) { // Work around IE5 Mac bug with input type=image...
[ "public", "boolean", "readBoundary", "(", ")", "throws", "MultipartMalformedStreamException", "{", "final", "byte", "[", "]", "marker", "=", "new", "byte", "[", "2", "]", ";", "boolean", "bNextChunk", "=", "false", ";", "m_nHead", "+=", "m_nBoundaryLength", ";...
Skips a <code>boundary</code> token, and checks whether more <code>encapsulations</code> are contained in the stream. @return <code>true</code> if there are more encapsulations in this stream; <code>false</code> otherwise. @throws MultipartMalformedStreamException if the stream ends unexpectedly or fails to follow req...
[ "Skips", "a", "<code", ">", "boundary<", "/", "code", ">", "token", "and", "checks", "whether", "more", "<code", ">", "encapsulations<", "/", "code", ">", "are", "contained", "in", "the", "stream", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/multipart/MultipartStream.java#L327-L361
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/EMatrixUtils.java
EMatrixUtils.shuffleRows
public static RealMatrix shuffleRows (RealMatrix matrix, RandomGenerator randomGenerator) { """ Shuffles rows of a matrix using the provided random number generator. @param matrix The matrix of which the rows will be shuffled. @param randomGenerator The random number generator to be used. @return The new shuf...
java
public static RealMatrix shuffleRows (RealMatrix matrix, RandomGenerator randomGenerator) { // Create an index vector to be shuffled: int[] index = MathArrays.sequence(matrix.getRowDimension(), 0, 1); MathArrays.shuffle(index, randomGenerator); // Create a new matrix: RealMatrix...
[ "public", "static", "RealMatrix", "shuffleRows", "(", "RealMatrix", "matrix", ",", "RandomGenerator", "randomGenerator", ")", "{", "// Create an index vector to be shuffled:", "int", "[", "]", "index", "=", "MathArrays", ".", "sequence", "(", "matrix", ".", "getRowDim...
Shuffles rows of a matrix using the provided random number generator. @param matrix The matrix of which the rows will be shuffled. @param randomGenerator The random number generator to be used. @return The new shuffled matrix.
[ "Shuffles", "rows", "of", "a", "matrix", "using", "the", "provided", "random", "number", "generator", "." ]
train
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/EMatrixUtils.java#L306-L321
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addAssignments
private void addAssignments(MpxjTreeNode parentNode, ProjectFile file) { """ Add assignments to the tree. @param parentNode parent tree node @param file assignments container """ for (ResourceAssignment assignment : file.getResourceAssignments()) { final ResourceAssignment a = assignme...
java
private void addAssignments(MpxjTreeNode parentNode, ProjectFile file) { for (ResourceAssignment assignment : file.getResourceAssignments()) { final ResourceAssignment a = assignment; MpxjTreeNode childNode = new MpxjTreeNode(a) { @Override public String toString() ...
[ "private", "void", "addAssignments", "(", "MpxjTreeNode", "parentNode", ",", "ProjectFile", "file", ")", "{", "for", "(", "ResourceAssignment", "assignment", ":", "file", ".", "getResourceAssignments", "(", ")", ")", "{", "final", "ResourceAssignment", "a", "=", ...
Add assignments to the tree. @param parentNode parent tree node @param file assignments container
[ "Add", "assignments", "to", "the", "tree", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L488-L506
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupsImpl.java
PersonGroupsImpl.listWithServiceResponseAsync
public Observable<ServiceResponse<List<PersonGroup>>> listWithServiceResponseAsync(ListPersonGroupsOptionalParameter listOptionalParameter) { """ List person groups and their information. @param listOptionalParameter the object representing the optional parameters to be set before calling this API @throws Ille...
java
public Observable<ServiceResponse<List<PersonGroup>>> listWithServiceResponseAsync(ListPersonGroupsOptionalParameter listOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null."); } ...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "PersonGroup", ">", ">", ">", "listWithServiceResponseAsync", "(", "ListPersonGroupsOptionalParameter", "listOptionalParameter", ")", "{", "if", "(", "this", ".", "client", ".", "azureRegion", "(", ")...
List person groups and their information. @param listOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;PersonGroup&gt; object
[ "List", "person", "groups", "and", "their", "information", "." ]
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/PersonGroupsImpl.java#L701-L709
actorapp/actor-platform
actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java
VerticalViewPager.canScroll
protected boolean canScroll(View v, boolean checkV, int dy, int x, int y) { """ Tests scrollability within child views of v given a delta of dx. @param v View to test for horizontal scrollability @param checkV Whether the view v passed should itself be checked for scrollability (true), or just its childr...
java
protected boolean canScroll(View v, boolean checkV, int dy, int x, int y) { if (v instanceof ViewGroup) { final ViewGroup group = (ViewGroup) v; final int scrollX = v.getScrollX(); final int scrollY = v.getScrollY(); final int count = group.getChildCount(); ...
[ "protected", "boolean", "canScroll", "(", "View", "v", ",", "boolean", "checkV", ",", "int", "dy", ",", "int", "x", ",", "int", "y", ")", "{", "if", "(", "v", "instanceof", "ViewGroup", ")", "{", "final", "ViewGroup", "group", "=", "(", "ViewGroup", ...
Tests scrollability within child views of v given a delta of dx. @param v View to test for horizontal scrollability @param checkV Whether the view v passed should itself be checked for scrollability (true), or just its children (false). @param dy Delta scrolled in pixels @param x X coordinate of the acti...
[ "Tests", "scrollability", "within", "child", "views", "of", "v", "given", "a", "delta", "of", "dx", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java#L2261-L2282
sebastiangraf/jSCSI
bundles/initiator/src/main/java/org/jscsi/initiator/connection/Session.java
Session.addOutstandingTask
public final void addOutstandingTask (final Connection connection, final ITask task) { """ Adds a Task to the outstandingTasks Hashmap. @param connection The Connection where the Task will be started @param task The Task which was started. """ outstandingTasks.put(task, connection); LOGGER...
java
public final void addOutstandingTask (final Connection connection, final ITask task) { outstandingTasks.put(task, connection); LOGGER.debug("Added a Task to the outstandingTasks Queue"); }
[ "public", "final", "void", "addOutstandingTask", "(", "final", "Connection", "connection", ",", "final", "ITask", "task", ")", "{", "outstandingTasks", ".", "put", "(", "task", ",", "connection", ")", ";", "LOGGER", ".", "debug", "(", "\"Added a Task to the outs...
Adds a Task to the outstandingTasks Hashmap. @param connection The Connection where the Task will be started @param task The Task which was started.
[ "Adds", "a", "Task", "to", "the", "outstandingTasks", "Hashmap", "." ]
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/Session.java#L596-L600
VoltDB/voltdb
src/frontend/org/voltdb/DefaultProcedureManager.java
DefaultProcedureManager.generateCrudUpsert
private static String generateCrudUpsert(Table table, Column partitioncolumn) { """ Create a statement like: Hack simple case of implementation SQL MERGE "upsert into <table> values (?, ?, ...);" """ StringBuilder sb = new StringBuilder(); sb.append("UPSERT INTO " + table.getTypeName() + " VA...
java
private static String generateCrudUpsert(Table table, Column partitioncolumn) { StringBuilder sb = new StringBuilder(); sb.append("UPSERT INTO " + table.getTypeName() + " VALUES "); generateCrudColumnList(table, sb); sb.append(";"); return sb.toString(); }
[ "private", "static", "String", "generateCrudUpsert", "(", "Table", "table", ",", "Column", "partitioncolumn", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"UPSERT INTO \"", "+", "table", ".", "getType...
Create a statement like: Hack simple case of implementation SQL MERGE "upsert into <table> values (?, ?, ...);"
[ "Create", "a", "statement", "like", ":", "Hack", "simple", "case", "of", "implementation", "SQL", "MERGE", "upsert", "into", "<table", ">", "values", "(", "?", "?", "...", ")", ";" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/DefaultProcedureManager.java#L385-L393
alkacon/opencms-core
src/org/opencms/db/CmsSelectQuery.java
CmsSelectQuery.addCondition
public void addCondition(String fragment, Object... params) { """ Adds a new condition to the query.<p> @param fragment the condition SQL @param params the condition parameters """ m_conditions.add(new CmsSimpleQueryFragment(fragment, params)); }
java
public void addCondition(String fragment, Object... params) { m_conditions.add(new CmsSimpleQueryFragment(fragment, params)); }
[ "public", "void", "addCondition", "(", "String", "fragment", ",", "Object", "...", "params", ")", "{", "m_conditions", ".", "add", "(", "new", "CmsSimpleQueryFragment", "(", "fragment", ",", "params", ")", ")", ";", "}" ]
Adds a new condition to the query.<p> @param fragment the condition SQL @param params the condition parameters
[ "Adds", "a", "new", "condition", "to", "the", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSelectQuery.java#L162-L165
virgo47/javasimon
console-embed/src/main/java/org/javasimon/console/ActionContext.java
ActionContext.getParameterAsBoolean
public boolean getParameterAsBoolean(String name, Boolean defaultValue) { """ Get request parameter as a Boolean. @param name Parameter name @param defaultValue Parameter default value """ return defaultValue(stringToBoolean(getParameter(name)), defaultValue); }
java
public boolean getParameterAsBoolean(String name, Boolean defaultValue) { return defaultValue(stringToBoolean(getParameter(name)), defaultValue); }
[ "public", "boolean", "getParameterAsBoolean", "(", "String", "name", ",", "Boolean", "defaultValue", ")", "{", "return", "defaultValue", "(", "stringToBoolean", "(", "getParameter", "(", "name", ")", ")", ",", "defaultValue", ")", ";", "}" ]
Get request parameter as a Boolean. @param name Parameter name @param defaultValue Parameter default value
[ "Get", "request", "parameter", "as", "a", "Boolean", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/console-embed/src/main/java/org/javasimon/console/ActionContext.java#L145-L147
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/WarsApi.java
WarsApi.getWarsWarId
public WarResponse getWarsWarId(Integer warId, String datasource, String ifNoneMatch) throws ApiException { """ Get war information Return details about a war --- This route is cached for up to 3600 seconds @param warId ID for a war (required) @param datasource The server name you would like data from (opti...
java
public WarResponse getWarsWarId(Integer warId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<WarResponse> resp = getWarsWarIdWithHttpInfo(warId, datasource, ifNoneMatch); return resp.getData(); }
[ "public", "WarResponse", "getWarsWarId", "(", "Integer", "warId", ",", "String", "datasource", ",", "String", "ifNoneMatch", ")", "throws", "ApiException", "{", "ApiResponse", "<", "WarResponse", ">", "resp", "=", "getWarsWarIdWithHttpInfo", "(", "warId", ",", "da...
Get war information Return details about a war --- This route is cached for up to 3600 seconds @param warId ID for a war (required) @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the c...
[ "Get", "war", "information", "Return", "details", "about", "a", "war", "---", "This", "route", "is", "cached", "for", "up", "to", "3600", "seconds" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/WarsApi.java#L282-L285
mgm-tp/jfunk
jfunk-data/src/main/java/com/mgmtp/jfunk/data/source/BaseDataSource.java
BaseDataSource.setFixedValue
@Override public void setFixedValue(final String dataSetKey, final String entryKey, final String value) { """ Sets a fixed value. @param dataSetKey The {@link DataSet} key. @param entryKey The entry key. @param value The fixed value. """ Map<String, String> map = fixedValues.get(dataSetKey); if...
java
@Override public void setFixedValue(final String dataSetKey, final String entryKey, final String value) { Map<String, String> map = fixedValues.get(dataSetKey); if (map == null) { map = Maps.newHashMap(); fixedValues.put(dataSetKey, map); } map.put(entryKey, value); DataSet dataSet = getCurre...
[ "@", "Override", "public", "void", "setFixedValue", "(", "final", "String", "dataSetKey", ",", "final", "String", "entryKey", ",", "final", "String", "value", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "fixedValues", ".", "get", "(", ...
Sets a fixed value. @param dataSetKey The {@link DataSet} key. @param entryKey The entry key. @param value The fixed value.
[ "Sets", "a", "fixed", "value", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data/src/main/java/com/mgmtp/jfunk/data/source/BaseDataSource.java#L204-L217
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/rest/ObjectMapperProvider.java
ObjectMapperProvider.writeFlowDetails
@SuppressWarnings("deprecation") public static void writeFlowDetails(JsonGenerator jsonGenerator, Flow aFlow, DetailLevel selectedSerialization, Predicate<String> includeFilter) throws JsonGenerationException, IOException { """ Writes out the flow object @param jsonGenerator @param aFlow @param ...
java
@SuppressWarnings("deprecation") public static void writeFlowDetails(JsonGenerator jsonGenerator, Flow aFlow, DetailLevel selectedSerialization, Predicate<String> includeFilter) throws JsonGenerationException, IOException { jsonGenerator.writeStartObject(); // serialize the FlowKey object filt...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "void", "writeFlowDetails", "(", "JsonGenerator", "jsonGenerator", ",", "Flow", "aFlow", ",", "DetailLevel", "selectedSerialization", ",", "Predicate", "<", "String", ">", "includeFilter", ")", ...
Writes out the flow object @param jsonGenerator @param aFlow @param selectedSerialization @param includeFilter @throws JsonGenerationException @throws IOException
[ "Writes", "out", "the", "flow", "object" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/rest/ObjectMapperProvider.java#L572-L621
VoltDB/voltdb
src/frontend/org/voltdb/TheHashinator.java
TheHashinator.getPartitionKeys
public static VoltTable getPartitionKeys(TheHashinator hashinator, VoltType type) { """ Get a VoltTable containing the partition keys for each partition that can be found for the given hashinator. May be missing some partitions during elastic rebalance when the partitions don't own enough of the ring to be probe...
java
public static VoltTable getPartitionKeys(TheHashinator hashinator, VoltType type) { // get partitionKeys response table so we can copy it final VoltTable partitionKeys; switch (type) { case INTEGER: partitionKeys = hashinator.m_integerPartitionKeys.get(); ...
[ "public", "static", "VoltTable", "getPartitionKeys", "(", "TheHashinator", "hashinator", ",", "VoltType", "type", ")", "{", "// get partitionKeys response table so we can copy it", "final", "VoltTable", "partitionKeys", ";", "switch", "(", "type", ")", "{", "case", "INT...
Get a VoltTable containing the partition keys for each partition that can be found for the given hashinator. May be missing some partitions during elastic rebalance when the partitions don't own enough of the ring to be probed If the type is not supported returns null @param hashinator a particular hashinator to get p...
[ "Get", "a", "VoltTable", "containing", "the", "partition", "keys", "for", "each", "partition", "that", "can", "be", "found", "for", "the", "given", "hashinator", ".", "May", "be", "missing", "some", "partitions", "during", "elastic", "rebalance", "when", "the"...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/TheHashinator.java#L529-L551
deephacks/confit
provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBaseBeanManager.java
HBaseBeanManager.delete
@Override public Collection<Bean> delete(String schemaName, Collection<String> instanceIds) throws AbortRuntimeException { """ This operation must validate the following things. 1) CFG302: No parents reference these beans. """ init(); Map<BeanId, Bean> deleted = list(schemaNa...
java
@Override public Collection<Bean> delete(String schemaName, Collection<String> instanceIds) throws AbortRuntimeException { init(); Map<BeanId, Bean> deleted = list(schemaName, instanceIds); Set<HBeanRow> rows = new HashSet<>(); for (String id : instanceIds) { ...
[ "@", "Override", "public", "Collection", "<", "Bean", ">", "delete", "(", "String", "schemaName", ",", "Collection", "<", "String", ">", "instanceIds", ")", "throws", "AbortRuntimeException", "{", "init", "(", ")", ";", "Map", "<", "BeanId", ",", "Bean", "...
This operation must validate the following things. 1) CFG302: No parents reference these beans.
[ "This", "operation", "must", "validate", "the", "following", "things", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBaseBeanManager.java#L400-L425
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/cellconverter/CellConverterFactorySupport.java
CellConverterFactorySupport.setupCellConverter
protected void setupCellConverter(final BaseCellConverter<T> cellConverter, final FieldAccessor field, final Configuration config) { """ 引数で指定したCellConverterに対して、トリムなどの共通の設定を行う。 @param cellConverter 設定を行うCellConverter @param field フィールド情報 @param config システム設定情報 """ final TextFormatter<T> textForm...
java
protected void setupCellConverter(final BaseCellConverter<T> cellConverter, final FieldAccessor field, final Configuration config) { final TextFormatter<T> textFormatter = createTextFormatter(field, config); cellConverter.setTextFormatter(textFormatter); // トリムの設定 final Optional<...
[ "protected", "void", "setupCellConverter", "(", "final", "BaseCellConverter", "<", "T", ">", "cellConverter", ",", "final", "FieldAccessor", "field", ",", "final", "Configuration", "config", ")", "{", "final", "TextFormatter", "<", "T", ">", "textFormatter", "=", ...
引数で指定したCellConverterに対して、トリムなどの共通の設定を行う。 @param cellConverter 設定を行うCellConverter @param field フィールド情報 @param config システム設定情報
[ "引数で指定したCellConverterに対して、トリムなどの共通の設定を行う。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/cellconverter/CellConverterFactorySupport.java#L35-L85
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/Content.java
Content.getIterable
Iterable<?> getIterable(Object scope, String propertyPath) throws TemplateException { """ Retrieve content array like instance as iterable. Delegates {@link #getValue(Object, String)} to obtain the requested value. If value is null warn the event and return empty list. I value is array like return it as iterable...
java
Iterable<?> getIterable(Object scope, String propertyPath) throws TemplateException { Object value = getValue(scope, propertyPath); if(value == null) { warn(scope.getClass(), propertyPath); return Collections.EMPTY_LIST; } if(!Types.isArrayLike(value)) { throw new TemplateExc...
[ "Iterable", "<", "?", ">", "getIterable", "(", "Object", "scope", ",", "String", "propertyPath", ")", "throws", "TemplateException", "{", "Object", "value", "=", "getValue", "(", "scope", ",", "propertyPath", ")", ";", "if", "(", "value", "==", "null", ")"...
Retrieve content array like instance as iterable. Delegates {@link #getValue(Object, String)} to obtain the requested value. If value is null warn the event and return empty list. I value is array like return it as iterable, otherwise throws content exception. @param scope scope object, @param propertyPath object prop...
[ "Retrieve", "content", "array", "like", "instance", "as", "iterable", ".", "Delegates", "{", "@link", "#getValue", "(", "Object", "String", ")", "}", "to", "obtain", "the", "requested", "value", ".", "If", "value", "is", "null", "warn", "the", "event", "an...
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/Content.java#L160-L171
Alluxio/alluxio
core/base/src/main/java/alluxio/AlluxioURI.java
AlluxioURI.getParent
@Nullable public AlluxioURI getParent() { """ Get the parent of this {@link AlluxioURI} or null if at root. @return the parent of this {@link AlluxioURI} or null if at root """ String path = mUri.getPath(); int lastSlash = path.lastIndexOf('/'); int start = hasWindowsDrive(path, true) ? 3 : 0;...
java
@Nullable public AlluxioURI getParent() { String path = mUri.getPath(); int lastSlash = path.lastIndexOf('/'); int start = hasWindowsDrive(path, true) ? 3 : 0; if ((path.length() == start) || // empty path (lastSlash == start && path.length() == start + 1)) { // at root return null; ...
[ "@", "Nullable", "public", "AlluxioURI", "getParent", "(", ")", "{", "String", "path", "=", "mUri", ".", "getPath", "(", ")", ";", "int", "lastSlash", "=", "path", ".", "lastIndexOf", "(", "'", "'", ")", ";", "int", "start", "=", "hasWindowsDrive", "("...
Get the parent of this {@link AlluxioURI} or null if at root. @return the parent of this {@link AlluxioURI} or null if at root
[ "Get", "the", "parent", "of", "this", "{", "@link", "AlluxioURI", "}", "or", "null", "if", "at", "root", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/base/src/main/java/alluxio/AlluxioURI.java#L247-L264
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/modules/CmsCloneModuleThread.java
CmsCloneModuleThread.transformResource
private void transformResource(CmsResource resource, Function<String, String> transformation) throws CmsException, UnsupportedEncodingException { """ Reads a file into a string, applies a transformation to the string, and writes the string back to the file.<p> @param resource the resource to transform @par...
java
private void transformResource(CmsResource resource, Function<String, String> transformation) throws CmsException, UnsupportedEncodingException { CmsFile file = getCms().readFile(resource); if (CmsResourceTypeXmlContent.isXmlContent(file)) { CmsXmlContent xmlContent = CmsXmlContentFacto...
[ "private", "void", "transformResource", "(", "CmsResource", "resource", ",", "Function", "<", "String", ",", "String", ">", "transformation", ")", "throws", "CmsException", ",", "UnsupportedEncodingException", "{", "CmsFile", "file", "=", "getCms", "(", ")", ".", ...
Reads a file into a string, applies a transformation to the string, and writes the string back to the file.<p> @param resource the resource to transform @param transformation the transformation to apply @throws CmsException if something goes wrong @throws UnsupportedEncodingException in case the encoding is not suppor...
[ "Reads", "a", "file", "into", "a", "string", "applies", "a", "transformation", "to", "the", "string", "and", "writes", "the", "string", "back", "to", "the", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/modules/CmsCloneModuleThread.java#L1049-L1065
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/util/Args.java
Args.checkNotNull
public static void checkNotNull(Object value, String message, Object... args) { """ Validates that an argument is not null. @param value The value to check. @param message An exception message. @param args Exception message arguments. """ if (value == null) { throw new NullPointerException(Strin...
java
public static void checkNotNull(Object value, String message, Object... args) { if (value == null) { throw new NullPointerException(String.format(message, args)); } }
[ "public", "static", "void", "checkNotNull", "(", "Object", "value", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "String", ".", "format", "(", "...
Validates that an argument is not null. @param value The value to check. @param message An exception message. @param args Exception message arguments.
[ "Validates", "that", "an", "argument", "is", "not", "null", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Args.java#L70-L74
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java
RpcWrapper.probeIps
private String[] probeIps() { """ Find possible IP addresses for communicating with the server. @return The array of addresses. """ Set<String> ips = new TreeSet<String>(); for (int i = 0; i < 32; ++i) { InetSocketAddress sa = new InetSocketAddress(_server, _port); ip...
java
private String[] probeIps() { Set<String> ips = new TreeSet<String>(); for (int i = 0; i < 32; ++i) { InetSocketAddress sa = new InetSocketAddress(_server, _port); ips.add(sa.getAddress().getHostAddress()); } if (LOG.isDebugEnabled()) { StringBuffer s...
[ "private", "String", "[", "]", "probeIps", "(", ")", "{", "Set", "<", "String", ">", "ips", "=", "new", "TreeSet", "<", "String", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "32", ";", "++", "i", ")", "{", "InetSocket...
Find possible IP addresses for communicating with the server. @return The array of addresses.
[ "Find", "possible", "IP", "addresses", "for", "communicating", "with", "the", "server", "." ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java#L319-L336
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
CertificateOperations.deleteCertificate
public void deleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException { """ Deletes the certificate from the Batch account. <p>The delete operation requests that the certificate be deleted. The request puts the certificate in the {@link com.microsoft.azure.batch.prot...
java
public void deleteCertificate(String thumbprintAlgorithm, String thumbprint) throws BatchErrorException, IOException { deleteCertificate(thumbprintAlgorithm, thumbprint, null); }
[ "public", "void", "deleteCertificate", "(", "String", "thumbprintAlgorithm", ",", "String", "thumbprint", ")", "throws", "BatchErrorException", ",", "IOException", "{", "deleteCertificate", "(", "thumbprintAlgorithm", ",", "thumbprint", ",", "null", ")", ";", "}" ]
Deletes the certificate from the Batch account. <p>The delete operation requests that the certificate be deleted. The request puts the certificate in the {@link com.microsoft.azure.batch.protocol.models.CertificateState#DELETING Deleting} state. The Batch service will perform the actual certificate deletion without any...
[ "Deletes", "the", "certificate", "from", "the", "Batch", "account", ".", "<p", ">", "The", "delete", "operation", "requests", "that", "the", "certificate", "be", "deleted", ".", "The", "request", "puts", "the", "certificate", "in", "the", "{", "@link", "com"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java#L205-L207
pressgang-ccms/PressGangCCMSDatasourceProviders
provider-commons/src/main/java/org/jboss/pressgang/ccms/provider/DataProviderFactory.java
DataProviderFactory.findClass
private static Class<?> findClass(String className, ClassLoader classLoader) throws ClassNotFoundException { """ Creates an instance of the specified class using the specified <code>ClassLoader</code> object. @throws ClassNotFoundException if the given class could not be found or could not be instantiated "...
java
private static Class<?> findClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { Class<?> spiClass; if (classLoader == null) { spiClass = Class.forName(className); } else { try { spiClass = ...
[ "private", "static", "Class", "<", "?", ">", "findClass", "(", "String", "className", ",", "ClassLoader", "classLoader", ")", "throws", "ClassNotFoundException", "{", "try", "{", "Class", "<", "?", ">", "spiClass", ";", "if", "(", "classLoader", "==", "null"...
Creates an instance of the specified class using the specified <code>ClassLoader</code> object. @throws ClassNotFoundException if the given class could not be found or could not be instantiated
[ "Creates", "an", "instance", "of", "the", "specified", "class", "using", "the", "specified", "<code", ">", "ClassLoader<", "/", "code", ">", "object", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSDatasourceProviders/blob/e47588adad0dcd55608b197b37825a512bc8fd25/provider-commons/src/main/java/org/jboss/pressgang/ccms/provider/DataProviderFactory.java#L149-L167
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.shiftComponentsHorizontally
private void shiftComponentsHorizontally(int columnIndex, boolean remove) { """ Shifts components horizontally, either to the right if a column has been inserted or to the left if a column has been removed. @param columnIndex index of the column to remove @param remove true for remove, false for insert @thro...
java
private void shiftComponentsHorizontally(int columnIndex, boolean remove) { final int offset = remove ? -1 : 1; for (Object element : constraintMap.entrySet()) { Map.Entry entry = (Map.Entry) element; CellConstraints constraints = (CellConstraints) entry.getValue(); i...
[ "private", "void", "shiftComponentsHorizontally", "(", "int", "columnIndex", ",", "boolean", "remove", ")", "{", "final", "int", "offset", "=", "remove", "?", "-", "1", ":", "1", ";", "for", "(", "Object", "element", ":", "constraintMap", ".", "entrySet", ...
Shifts components horizontally, either to the right if a column has been inserted or to the left if a column has been removed. @param columnIndex index of the column to remove @param remove true for remove, false for insert @throws IllegalStateException if a removed column contains components
[ "Shifts", "components", "horizontally", "either", "to", "the", "right", "if", "a", "column", "has", "been", "inserted", "or", "to", "the", "left", "if", "a", "column", "has", "been", "removed", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L652-L671
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.deleteHybridConnectionAsync
public Observable<Void> deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { """ Delete a Hybrid Connection in use in an App Service plan. Delete a Hybrid Connection in use in an App Service plan. @param resourceGroupName Name of the resource group to whi...
java
public Observable<Void> deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { return deleteHybridConnectionWithServiceResponseAsync(resourceGroupName, name, namespaceName, relayName).map(new Func1<ServiceResponse<Void>, Void>() { @Override ...
[ "public", "Observable", "<", "Void", ">", "deleteHybridConnectionAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "namespaceName", ",", "String", "relayName", ")", "{", "return", "deleteHybridConnectionWithServiceResponseAsync", "(", "re...
Delete a Hybrid Connection in use in an App Service plan. Delete a Hybrid Connection in use in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param namespaceName Name of the Service Bus namespace. @param relayName Name ...
[ "Delete", "a", "Hybrid", "Connection", "in", "use", "in", "an", "App", "Service", "plan", ".", "Delete", "a", "Hybrid", "Connection", "in", "use", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L1269-L1276
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parsePreventResponseSplit
private void parsePreventResponseSplit(Map<?, ?> props) { """ Check the configuration map for if we should prevent response splitting @ param props """ //PI45266 String value = (String) props.get(HttpConfigConstants.PROPNAME_PREVENT_RESPONSE_SPLIT); if (null != value) { t...
java
private void parsePreventResponseSplit(Map<?, ?> props) { //PI45266 String value = (String) props.get(HttpConfigConstants.PROPNAME_PREVENT_RESPONSE_SPLIT); if (null != value) { this.preventResponseSplit = convertBoolean(value); if ((TraceComponent.isAnyTracingEnabled()) &...
[ "private", "void", "parsePreventResponseSplit", "(", "Map", "<", "?", ",", "?", ">", "props", ")", "{", "//PI45266", "String", "value", "=", "(", "String", ")", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_PREVENT_RESPONSE_SPLIT", ")", ";", ...
Check the configuration map for if we should prevent response splitting @ param props
[ "Check", "the", "configuration", "map", "for", "if", "we", "should", "prevent", "response", "splitting" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1294-L1303
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/av/Texture2dProgram.java
Texture2dProgram.setKernel
public void setKernel(float[] values, float colorAdj) { """ Configures the convolution filter values. This only has an effect for programs that use the FRAGMENT_SHADER_EXT_FILT Fragment shader. @param values Normalized filter values; must be KERNEL_SIZE elements. """ if (values.length != KERNEL_SI...
java
public void setKernel(float[] values, float colorAdj) { if (values.length != KERNEL_SIZE) { throw new IllegalArgumentException("Kernel size is " + values.length + " vs. " + KERNEL_SIZE); } System.arraycopy(values, 0, mKernel, 0, KERNEL_SIZE); mColorAdjust ...
[ "public", "void", "setKernel", "(", "float", "[", "]", "values", ",", "float", "colorAdj", ")", "{", "if", "(", "values", ".", "length", "!=", "KERNEL_SIZE", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Kernel size is \"", "+", "values", "."...
Configures the convolution filter values. This only has an effect for programs that use the FRAGMENT_SHADER_EXT_FILT Fragment shader. @param values Normalized filter values; must be KERNEL_SIZE elements.
[ "Configures", "the", "convolution", "filter", "values", ".", "This", "only", "has", "an", "effect", "for", "programs", "that", "use", "the", "FRAGMENT_SHADER_EXT_FILT", "Fragment", "shader", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/av/Texture2dProgram.java#L491-L499
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.setDateReleased
public void setDateReleased(CmsRequestContext context, CmsResource resource, long dateReleased) throws CmsException, CmsSecurityException { """ Changes the "release" date of a resource.<p> @param context the current request context @param resource the resource to touch @param dateReleased the new release ...
java
public void setDateReleased(CmsRequestContext context, CmsResource resource, long dateReleased) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkPermissions(dbc, resource, CmsPermiss...
[ "public", "void", "setDateReleased", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ",", "long", "dateReleased", ")", "throws", "CmsException", ",", "CmsSecurityException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext",...
Changes the "release" date of a resource.<p> @param context the current request context @param resource the resource to touch @param dateReleased the new release date of the changed resource @throws CmsException if something goes wrong @throws CmsSecurityException if the user has insufficient permission for the given...
[ "Changes", "the", "release", "date", "of", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6019-L6037
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/UNode.java
UNode.addMapNode
public UNode addMapNode(String name, String tagName) { """ Create a new MAP node with the given name and tag name add it as a child of this node. This node must be a MAP or ARRAY. This is a convenience method that calls {@link UNode#createMapNode(String, String)} and then {@link #addChildNode(UNode)}. @param ...
java
public UNode addMapNode(String name, String tagName) { return addChildNode(UNode.createMapNode(name, tagName)); }
[ "public", "UNode", "addMapNode", "(", "String", "name", ",", "String", "tagName", ")", "{", "return", "addChildNode", "(", "UNode", ".", "createMapNode", "(", "name", ",", "tagName", ")", ")", ";", "}" ]
Create a new MAP node with the given name and tag name add it as a child of this node. This node must be a MAP or ARRAY. This is a convenience method that calls {@link UNode#createMapNode(String, String)} and then {@link #addChildNode(UNode)}. @param name Name of new MAP node. @param tagName Tag name of new MAP...
[ "Create", "a", "new", "MAP", "node", "with", "the", "given", "name", "and", "tag", "name", "add", "it", "as", "a", "child", "of", "this", "node", ".", "This", "node", "must", "be", "a", "MAP", "or", "ARRAY", ".", "This", "is", "a", "convenience", "...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L846-L848
lucee/Lucee
core/src/main/java/lucee/commons/lang/ClassUtil.java
ClassUtil.loadClass
public static Class loadClass(String className, String bundleName, String bundleVersion, Identification id) throws ClassException, BundleException { """ if no bundle is defined it is loaded the old way @param className @param bundleName @param bundleVersion @param id @return @throws ClassException @throws...
java
public static Class loadClass(String className, String bundleName, String bundleVersion, Identification id) throws ClassException, BundleException { if (StringUtil.isEmpty(bundleName)) return loadClass(className); return loadClassByBundle(className, bundleName, bundleVersion, id); }
[ "public", "static", "Class", "loadClass", "(", "String", "className", ",", "String", "bundleName", ",", "String", "bundleVersion", ",", "Identification", "id", ")", "throws", "ClassException", ",", "BundleException", "{", "if", "(", "StringUtil", ".", "isEmpty", ...
if no bundle is defined it is loaded the old way @param className @param bundleName @param bundleVersion @param id @return @throws ClassException @throws BundleException
[ "if", "no", "bundle", "is", "defined", "it", "is", "loaded", "the", "old", "way" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ClassUtil.java#L799-L802
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/RMItoIDL.java
RMItoIDL.getPropertyName
private static String getPropertyName(String methodName, int beginIndex) { """ Returns the OMG IDL property name for the specified java 'get', 'is', or 'set' method. <p> Basically, the OMG IDL property name is the same as the method name, with the 'get', 'is', or 'set' string stripped off the front, and the ...
java
private static String getPropertyName(String methodName, int beginIndex) { String propertyName; int secondIndex = beginIndex + 1; if (methodName.length() <= secondIndex || Character.isLowerCase(methodName.charAt(secondIndex))) { // no second letter, or second...
[ "private", "static", "String", "getPropertyName", "(", "String", "methodName", ",", "int", "beginIndex", ")", "{", "String", "propertyName", ";", "int", "secondIndex", "=", "beginIndex", "+", "1", ";", "if", "(", "methodName", ".", "length", "(", ")", "<=", ...
Returns the OMG IDL property name for the specified java 'get', 'is', or 'set' method. <p> Basically, the OMG IDL property name is the same as the method name, with the 'get', 'is', or 'set' string stripped off the front, and the first letter changed to lowercase, if the second letter is NOT uppercase. <p> Note that ...
[ "Returns", "the", "OMG", "IDL", "property", "name", "for", "the", "specified", "java", "get", "is", "or", "set", "method", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/RMItoIDL.java#L904-L926
LMAX-Exchange/disruptor
src/main/java/com/lmax/disruptor/dsl/Disruptor.java
Disruptor.publishEvent
public <A, B, C> void publishEvent(final EventTranslatorThreeArg<T, A, B, C> eventTranslator, final A arg0, final B arg1, final C arg2) { """ Publish an event to the ring buffer. @param eventTranslator the translator that will load data into the event. @param <A> Class of the user supplied argument. @param <B...
java
public <A, B, C> void publishEvent(final EventTranslatorThreeArg<T, A, B, C> eventTranslator, final A arg0, final B arg1, final C arg2) { ringBuffer.publishEvent(eventTranslator, arg0, arg1, arg2); }
[ "public", "<", "A", ",", "B", ",", "C", ">", "void", "publishEvent", "(", "final", "EventTranslatorThreeArg", "<", "T", ",", "A", ",", "B", ",", "C", ">", "eventTranslator", ",", "final", "A", "arg0", ",", "final", "B", "arg1", ",", "final", "C", "...
Publish an event to the ring buffer. @param eventTranslator the translator that will load data into the event. @param <A> Class of the user supplied argument. @param <B> Class of the user supplied argument. @param <C> Class of the user supplied argument. @param arg0 The first argument to load into the event...
[ "Publish", "an", "event", "to", "the", "ring", "buffer", "." ]
train
https://github.com/LMAX-Exchange/disruptor/blob/4266d00c5250190313446fdd7c8aa7a4edb5c818/src/main/java/com/lmax/disruptor/dsl/Disruptor.java#L383-L386
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractLinear.java
AbstractLinear.create_FRAME_Image
protected BufferedImage create_FRAME_Image(final int WIDTH, final int HEIGHT) { """ Returns the frame image with the currently active framedesign with the given with and height. @param WIDTH @param HEIGHT @return buffered image containing the frame in the active frame design """ return FRAME_FACTOR...
java
protected BufferedImage create_FRAME_Image(final int WIDTH, final int HEIGHT) { return FRAME_FACTORY.createLinearFrame(WIDTH, HEIGHT, getFrameDesign(), getCustomFrameDesign(), getFrameEffect()); }
[ "protected", "BufferedImage", "create_FRAME_Image", "(", "final", "int", "WIDTH", ",", "final", "int", "HEIGHT", ")", "{", "return", "FRAME_FACTORY", ".", "createLinearFrame", "(", "WIDTH", ",", "HEIGHT", ",", "getFrameDesign", "(", ")", ",", "getCustomFrameDesign...
Returns the frame image with the currently active framedesign with the given with and height. @param WIDTH @param HEIGHT @return buffered image containing the frame in the active frame design
[ "Returns", "the", "frame", "image", "with", "the", "currently", "active", "framedesign", "with", "the", "given", "with", "and", "height", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractLinear.java#L882-L884
alkacon/opencms-core
src/org/opencms/db/CmsSubscriptionManager.java
CmsSubscriptionManager.unsubscribeResourceForAll
public void unsubscribeResourceForAll(CmsObject cms, CmsResource resource) throws CmsException { """ Unsubscribes all groups and users from the resource.<p> @param cms the current users context @param resource the resource to unsubscribe all groups and users from @throws CmsException if something goes wrong...
java
public void unsubscribeResourceForAll(CmsObject cms, CmsResource resource) throws CmsException { if (!isEnabled()) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0)); } m_securityManager.unsubscribeResourceForAll(cms.getRequestCon...
[ "public", "void", "unsubscribeResourceForAll", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "if", "(", "!", "isEnabled", "(", ")", ")", "{", "throw", "new", "CmsRuntimeException", "(", "Messages", ".", "get", "("...
Unsubscribes all groups and users from the resource.<p> @param cms the current users context @param resource the resource to unsubscribe all groups and users from @throws CmsException if something goes wrong
[ "Unsubscribes", "all", "groups", "and", "users", "from", "the", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSubscriptionManager.java#L475-L481
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/IncidentUtil.java
IncidentUtil.generateIncidentV2WithException
public static Throwable generateIncidentV2WithException(SFSession session, Throwable exc, String jobId, String requestId) { """ Makes a V2 in...
java
public static Throwable generateIncidentV2WithException(SFSession session, Throwable exc, String jobId, String requestId) { new Incident(ses...
[ "public", "static", "Throwable", "generateIncidentV2WithException", "(", "SFSession", "session", ",", "Throwable", "exc", ",", "String", "jobId", ",", "String", "requestId", ")", "{", "new", "Incident", "(", "session", ",", "exc", ",", "jobId", ",", "requestId",...
Makes a V2 incident object and triggers ir, effectively reporting the given exception to GS and possibly to crashmanager @param session SFSession object to talk to GS through @param exc the Throwable we should report @param jobId jobId that failed @param requestId requestId that failed @return the given Th...
[ "Makes", "a", "V2", "incident", "object", "and", "triggers", "ir", "effectively", "reporting", "the", "given", "exception", "to", "GS", "and", "possibly", "to", "crashmanager" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/IncidentUtil.java#L279-L286
real-logic/agrona
agrona/src/main/java/org/agrona/concurrent/status/CountersManager.java
CountersManager.newCounter
public AtomicCounter newCounter(final String label, final int typeId) { """ Allocate a counter record and wrap it with a new {@link AtomicCounter} for use. @param label to describe the counter. @param typeId for the type of counter. @return a newly allocated {@link AtomicCounter} """ return new A...
java
public AtomicCounter newCounter(final String label, final int typeId) { return new AtomicCounter(valuesBuffer, allocate(label, typeId), this); }
[ "public", "AtomicCounter", "newCounter", "(", "final", "String", "label", ",", "final", "int", "typeId", ")", "{", "return", "new", "AtomicCounter", "(", "valuesBuffer", ",", "allocate", "(", "label", ",", "typeId", ")", ",", "this", ")", ";", "}" ]
Allocate a counter record and wrap it with a new {@link AtomicCounter} for use. @param label to describe the counter. @param typeId for the type of counter. @return a newly allocated {@link AtomicCounter}
[ "Allocate", "a", "counter", "record", "and", "wrap", "it", "with", "a", "new", "{", "@link", "AtomicCounter", "}", "for", "use", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/concurrent/status/CountersManager.java#L307-L310
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsSliderBar.java
CmsSliderBar.setLayerOpacity
public void setLayerOpacity(int alpha, int layer) { """ Set overlay's opacity.<p> @param alpha An opacity percentage, between 100 (fully opaque) and 0 (invisible). @param layer which bar to change opacity for, 1-4 """ if ((alpha >= 0) && (alpha <= 100) && isAttached()) { Element color...
java
public void setLayerOpacity(int alpha, int layer) { if ((alpha >= 0) && (alpha <= 100) && isAttached()) { Element colorbar; switch (layer) { case COLORBAR_A: colorbar = m_colorA.getElement(); break; case C...
[ "public", "void", "setLayerOpacity", "(", "int", "alpha", ",", "int", "layer", ")", "{", "if", "(", "(", "alpha", ">=", "0", ")", "&&", "(", "alpha", "<=", "100", ")", "&&", "isAttached", "(", ")", ")", "{", "Element", "colorbar", ";", "switch", "(...
Set overlay's opacity.<p> @param alpha An opacity percentage, between 100 (fully opaque) and 0 (invisible). @param layer which bar to change opacity for, 1-4
[ "Set", "overlay", "s", "opacity", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsSliderBar.java#L285-L309
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.childElement
public XNElement childElement(String name, String namespace) { """ Returns the first child element with the given name. @param name the child name @param namespace the namespace @return the XElement or null if not present """ for (XNElement e : children) { if (Objects.equals(e.name, name...
java
public XNElement childElement(String name, String namespace) { for (XNElement e : children) { if (Objects.equals(e.name, name) && Objects.equals(e.namespace, namespace)) { return e; } } return null; }
[ "public", "XNElement", "childElement", "(", "String", "name", ",", "String", "namespace", ")", "{", "for", "(", "XNElement", "e", ":", "children", ")", "{", "if", "(", "Objects", ".", "equals", "(", "e", ".", "name", ",", "name", ")", "&&", "Objects", ...
Returns the first child element with the given name. @param name the child name @param namespace the namespace @return the XElement or null if not present
[ "Returns", "the", "first", "child", "element", "with", "the", "given", "name", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L432-L439
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java
BoxApiFile.getCreateUploadSessionRequest
public BoxRequestsFile.CreateUploadSession getCreateUploadSessionRequest(File file, String folderId) throws FileNotFoundException { """ Gets a request that creates an upload session for uploading a new file @param file The file to be uploaded @param folderId Folder Id @return request to create an...
java
public BoxRequestsFile.CreateUploadSession getCreateUploadSessionRequest(File file, String folderId) throws FileNotFoundException { return new BoxRequestsFile.CreateUploadSession(file, folderId, getUploadSessionForNewFileUrl(), mSession); }
[ "public", "BoxRequestsFile", ".", "CreateUploadSession", "getCreateUploadSessionRequest", "(", "File", "file", ",", "String", "folderId", ")", "throws", "FileNotFoundException", "{", "return", "new", "BoxRequestsFile", ".", "CreateUploadSession", "(", "file", ",", "fold...
Gets a request that creates an upload session for uploading a new file @param file The file to be uploaded @param folderId Folder Id @return request to create an upload session for uploading a new file
[ "Gets", "a", "request", "that", "creates", "an", "upload", "session", "for", "uploading", "a", "new", "file" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java#L579-L582
beckchr/juel
modules/api/src/main/java/javax/el/CompositeELResolver.java
CompositeELResolver.isReadOnly
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { """ For a given base and property, attempts to determine whether a call to {@link #setValue(ELContext, Object, Object, Object)} will always fail. The result is obtained by querying all component resolvers. If this resolver h...
java
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { context.setPropertyResolved(false); for (int i = 0, l = resolvers.size(); i < l; i++) { boolean readOnly = resolvers.get(i).isReadOnly(context, base, property); if (context.isPropertyResolved()) { return readOnly...
[ "@", "Override", "public", "boolean", "isReadOnly", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ")", "{", "context", ".", "setPropertyResolved", "(", "false", ")", ";", "for", "(", "int", "i", "=", "0", ",", "l", "=", ...
For a given base and property, attempts to determine whether a call to {@link #setValue(ELContext, Object, Object, Object)} will always fail. The result is obtained by querying all component resolvers. If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must b...
[ "For", "a", "given", "base", "and", "property", "attempts", "to", "determine", "whether", "a", "call", "to", "{", "@link", "#setValue", "(", "ELContext", "Object", "Object", "Object", ")", "}", "will", "always", "fail", ".", "The", "result", "is", "obtaine...
train
https://github.com/beckchr/juel/blob/1a8fb366b7349ddae81f806dee1ab2de11b672c7/modules/api/src/main/java/javax/el/CompositeELResolver.java#L275-L285
scalecube/scalecube-services
services-api/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java
ServiceMessageCodec.decodeData
public static ServiceMessage decodeData(ServiceMessage message, Class<?> dataType) throws MessageCodecException { """ Decode message. @param message the original message (with {@link ByteBuf} data) @param dataType the type of the data. @return a new Service message that upon {@link ServiceMessage#data()...
java
public static ServiceMessage decodeData(ServiceMessage message, Class<?> dataType) throws MessageCodecException { if (dataType == null || !message.hasData(ByteBuf.class) || ((ByteBuf) message.data()).readableBytes() == 0) { return message; } Object data; Class<?> targetType ...
[ "public", "static", "ServiceMessage", "decodeData", "(", "ServiceMessage", "message", ",", "Class", "<", "?", ">", "dataType", ")", "throws", "MessageCodecException", "{", "if", "(", "dataType", "==", "null", "||", "!", "message", ".", "hasData", "(", "ByteBuf...
Decode message. @param message the original message (with {@link ByteBuf} data) @param dataType the type of the data. @return a new Service message that upon {@link ServiceMessage#data()} returns the actual data (of type data type) @throws MessageCodecException when decode fails
[ "Decode", "message", "." ]
train
https://github.com/scalecube/scalecube-services/blob/76c8de6019e5480a1436d12b37acf163f70eea47/services-api/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java#L107-L128
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.findExactMethod
public static JavaClassAndMethod findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException { """ Look up the method referenced by given InvokeInstruction. This method does <em>not</em> look for implementations in super or subclasses according to the virtual dispatch rules. @par...
java
public static JavaClassAndMethod findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg) throws ClassNotFoundException { return findExactMethod(inv, cpg, ANY_METHOD); }
[ "public", "static", "JavaClassAndMethod", "findExactMethod", "(", "InvokeInstruction", "inv", ",", "ConstantPoolGen", "cpg", ")", "throws", "ClassNotFoundException", "{", "return", "findExactMethod", "(", "inv", ",", "cpg", ",", "ANY_METHOD", ")", ";", "}" ]
Look up the method referenced by given InvokeInstruction. This method does <em>not</em> look for implementations in super or subclasses according to the virtual dispatch rules. @param inv the InvokeInstruction @param cpg the ConstantPoolGen used by the class the InvokeInstruction belongs to @return the JavaClassAndMet...
[ "Look", "up", "the", "method", "referenced", "by", "given", "InvokeInstruction", ".", "This", "method", "does", "<em", ">", "not<", "/", "em", ">", "look", "for", "implementations", "in", "super", "or", "subclasses", "according", "to", "the", "virtual", "dis...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L232-L234
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/HadoopDataStoreManager.java
HadoopDataStoreManager.createDataStoreWithUrl
private CloseableDataStore createDataStoreWithUrl(URI location, String apiKey, MetricRegistry metricRegistry) { """ Creates a DataStore using a URL (e.g: "https://emodb-ci.dev.us-east-1.nexus.bazaarvoice.com"). """ // Reuse the same base classes as when using host discovery, ignoring unused fields as n...
java
private CloseableDataStore createDataStoreWithUrl(URI location, String apiKey, MetricRegistry metricRegistry) { // Reuse the same base classes as when using host discovery, ignoring unused fields as needed. String ignore = "ignore"; MultiThreadedServiceFactory<AuthDataStore> secureDataStoreFacto...
[ "private", "CloseableDataStore", "createDataStoreWithUrl", "(", "URI", "location", ",", "String", "apiKey", ",", "MetricRegistry", "metricRegistry", ")", "{", "// Reuse the same base classes as when using host discovery, ignoring unused fields as needed.", "String", "ignore", "=", ...
Creates a DataStore using a URL (e.g: "https://emodb-ci.dev.us-east-1.nexus.bazaarvoice.com").
[ "Creates", "a", "DataStore", "using", "a", "URL", "(", "e", ".", "g", ":", "https", ":", "//", "emodb", "-", "ci", ".", "dev", ".", "us", "-", "east", "-", "1", ".", "nexus", ".", "bazaarvoice", ".", "com", ")", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/HadoopDataStoreManager.java#L140-L159
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkMandatoryField
@Conditioned @Lorsque("Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\.|\\?]") @Then("I check mandatory field '(.*)-(.*)' of type '(.*)'[\\.|\\?]") public void checkMandatoryField(String page, String fieldName, String type, List<GherkinStepCondition> conditions) throws TechnicalException, F...
java
@Conditioned @Lorsque("Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\.|\\?]") @Then("I check mandatory field '(.*)-(.*)' of type '(.*)'[\\.|\\?]") public void checkMandatoryField(String page, String fieldName, String type, List<GherkinStepCondition> conditions) throws TechnicalException, F...
[ "@", "Conditioned", "@", "Lorsque", "(", "\"Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "Then", "(", "\"I check mandatory field '(.*)-(.*)' of type '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "checkMandatoryField", "(", "String", "page...
Checks that mandatory field is no empty with conditions. @param page The concerned page of fieldName @param fieldName Name of the field to check (see .ini file) @param type Type of the field ('text', 'select'...). Only 'text' is implemented for the moment! @param conditions list of 'expected' values condition and 'act...
[ "Checks", "that", "mandatory", "field", "is", "no", "empty", "with", "conditions", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L653-L668
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/matchers/DefaultBondMatcher.java
DefaultBondMatcher.matches
@Override public boolean matches(IAtomContainer targetContainer, IBond targetBond) { """ {@inheritDoc} @param targetContainer target container @param targetBond target bond @return true if bonds match """ if (this.smartQueryBond != null && queryBond == null) { return smartQueryBond...
java
@Override public boolean matches(IAtomContainer targetContainer, IBond targetBond) { if (this.smartQueryBond != null && queryBond == null) { return smartQueryBond.matches(targetBond); } else { if (!isBondMatchFlag()) { return true; } if...
[ "@", "Override", "public", "boolean", "matches", "(", "IAtomContainer", "targetContainer", ",", "IBond", "targetBond", ")", "{", "if", "(", "this", ".", "smartQueryBond", "!=", "null", "&&", "queryBond", "==", "null", ")", "{", "return", "smartQueryBond", ".",...
{@inheritDoc} @param targetContainer target container @param targetBond target bond @return true if bonds match
[ "{", "@inheritDoc", "}" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/matchers/DefaultBondMatcher.java#L111-L127
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/deprecation/DeprecationUtils.java
DeprecationUtils.renameDeprecatedKeys
public static void renameDeprecatedKeys(State state, String currentKey, List<String> deprecatedKeys) { """ Sets an option in a {@link State} to the first available value of a list of deprecatedKeys. For example, if an option "optiona" was previously called "optionb" or "optionc", calling {@link #renameDeprecated...
java
public static void renameDeprecatedKeys(State state, String currentKey, List<String> deprecatedKeys) { if (state.contains(currentKey)) { return; } for (String oldKey : deprecatedKeys) { if (state.contains(oldKey)) { log.info("Copying the value of deprecated key " + oldKey + " into key " ...
[ "public", "static", "void", "renameDeprecatedKeys", "(", "State", "state", ",", "String", "currentKey", ",", "List", "<", "String", ">", "deprecatedKeys", ")", "{", "if", "(", "state", ".", "contains", "(", "currentKey", ")", ")", "{", "return", ";", "}", ...
Sets an option in a {@link State} to the first available value of a list of deprecatedKeys. For example, if an option "optiona" was previously called "optionb" or "optionc", calling {@link #renameDeprecatedKeys(State, String, List)} will search for the first available key-value pair with key optiona, optionb, or option...
[ "Sets", "an", "option", "in", "a", "{", "@link", "State", "}", "to", "the", "first", "available", "value", "of", "a", "list", "of", "deprecatedKeys", ".", "For", "example", "if", "an", "option", "optiona", "was", "previously", "called", "optionb", "or", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/deprecation/DeprecationUtils.java#L43-L54
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/RtpPacket.java
RtpPacket.wrap
public void wrap(boolean mark, int payloadType, int seqNumber, long timestamp, long ssrc, byte[] data, int offset, int len) { """ Encapsulates data into the packet for transmission via RTP. @param mark mark field @param payloadType payload type field. @param seqNumber sequence number field @param timestamp t...
java
public void wrap(boolean mark, int payloadType, int seqNumber, long timestamp, long ssrc, byte[] data, int offset, int len) { buffer.clear(); buffer.rewind(); //no extensions, paddings and cc buffer.put((byte)0x80); byte b = (byte) (payloadType); if (mark) { ...
[ "public", "void", "wrap", "(", "boolean", "mark", ",", "int", "payloadType", ",", "int", "seqNumber", ",", "long", "timestamp", ",", "long", "ssrc", ",", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "len", ")", "{", "buffer", ".", "cle...
Encapsulates data into the packet for transmission via RTP. @param mark mark field @param payloadType payload type field. @param seqNumber sequence number field @param timestamp timestamp field @param ssrc synchronization source field @param data data buffer @param offset offset in the data buffer @param len the numbe...
[ "Encapsulates", "data", "into", "the", "packet", "for", "transmission", "via", "RTP", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/RtpPacket.java#L331-L364
jmxtrans/embedded-jmxtrans
src/main/java/org/jmxtrans/embedded/Query.java
Query.addAttribute
@Nonnull public Query addAttribute(@Nonnull String attributeName) { """ Create a basic {@link QueryAttribute}, add it to the list attributes of this query and maintains the reverse relation (see {@link org.jmxtrans.embedded.QueryAttribute#getQuery()}). @param attributeName attribute to add @return this ...
java
@Nonnull public Query addAttribute(@Nonnull String attributeName) { return addAttribute(new QueryAttribute(attributeName, null, null)); }
[ "@", "Nonnull", "public", "Query", "addAttribute", "(", "@", "Nonnull", "String", "attributeName", ")", "{", "return", "addAttribute", "(", "new", "QueryAttribute", "(", "attributeName", ",", "null", ",", "null", ")", ")", ";", "}" ]
Create a basic {@link QueryAttribute}, add it to the list attributes of this query and maintains the reverse relation (see {@link org.jmxtrans.embedded.QueryAttribute#getQuery()}). @param attributeName attribute to add @return this
[ "Create", "a", "basic", "{", "@link", "QueryAttribute", "}", "add", "it", "to", "the", "list", "attributes", "of", "this", "query", "and", "maintains", "the", "reverse", "relation", "(", "see", "{", "@link", "org", ".", "jmxtrans", ".", "embedded", ".", ...
train
https://github.com/jmxtrans/embedded-jmxtrans/blob/17224389e7d8323284cabc2a5167fc03bed6d223/src/main/java/org/jmxtrans/embedded/Query.java#L276-L279