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
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java
Dtd.getDtdSchema
public void getDtdSchema(final LmlParser parser, final Appendable builder) throws IOException { """ Creates DTD schema file containing all possible tags and their attributes. Any problems with the generation will be logged. This is a relatively heavy operation and should be done only during development. @param...
java
public void getDtdSchema(final LmlParser parser, final Appendable builder) throws IOException { appendActorTags(builder, parser); appendActorAttributes(parser, builder); appendMacroTags(builder, parser); appendMacroAttributes(parser, builder); }
[ "public", "void", "getDtdSchema", "(", "final", "LmlParser", "parser", ",", "final", "Appendable", "builder", ")", "throws", "IOException", "{", "appendActorTags", "(", "builder", ",", "parser", ")", ";", "appendActorAttributes", "(", "parser", ",", "builder", "...
Creates DTD schema file containing all possible tags and their attributes. Any problems with the generation will be logged. This is a relatively heavy operation and should be done only during development. @param parser contains parsing data. Used to create mock-up actors. The skin MUST be fully loaded and contain all ...
[ "Creates", "DTD", "schema", "file", "containing", "all", "possible", "tags", "and", "their", "attributes", ".", "Any", "problems", "with", "the", "generation", "will", "be", "logged", ".", "This", "is", "a", "relatively", "heavy", "operation", "and", "should",...
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/tag/Dtd.java#L108-L113
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.frustumLH
public Matrix4f frustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) { """ Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result in <cod...
java
public Matrix4f frustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setFrustumLH(left, right, bottom, top, zNear, zFar, zZeroToOne); return frustumLHGeneric(left, righ...
[ "public", "Matrix4f", "frustumLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "float", "zNear", ",", "float", "zFar", ",", "boolean", "zZeroToOne", ",", "Matrix4f", "dest", ")", "{", "if", "(", "(", "...
Apply an arbitrary perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>F</code> the frustum matrix, then the new matrix will be <code>M * F</cod...
[ "Apply", "an", "arbitrary", "perspective", "projection", "frustum", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "the", "given", "NDC", "z", "range", "to", "this", "matrix", "and", "store", "the", "result", "in", "<code...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L10618-L10622
pawelprazak/java-extended
guava/src/main/java/com/bluecatcode/common/contract/Checks.java
Checks.checkIsInstance
@Beta public static <T> T checkIsInstance(Class<T> class_, Object reference) { """ Performs a runtime check if the reference is an instance of the provided class @param class_ the class to use @param reference reference to check @param <T> the reference type @see Checks#checkIsInstance(Class, Ob...
java
@Beta public static <T> T checkIsInstance(Class<T> class_, Object reference) { return checkIsInstance(class_, reference, "Expected reference to be instance of %s, got %s", class_ == null ? "null" : class_.getName(), reference == null ? "null" : reference.getClass().getName()); }
[ "@", "Beta", "public", "static", "<", "T", ">", "T", "checkIsInstance", "(", "Class", "<", "T", ">", "class_", ",", "Object", "reference", ")", "{", "return", "checkIsInstance", "(", "class_", ",", "reference", ",", "\"Expected reference to be instance of %s, go...
Performs a runtime check if the reference is an instance of the provided class @param class_ the class to use @param reference reference to check @param <T> the reference type @see Checks#checkIsInstance(Class, Object, String, Object...)
[ "Performs", "a", "runtime", "check", "if", "the", "reference", "is", "an", "instance", "of", "the", "provided", "class" ]
train
https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/contract/Checks.java#L415-L419
kaazing/java.client
ws/ws/src/main/java/org/kaazing/gateway/client/impl/util/WebSocketUtil.java
WebSocketUtil.encodeLength
public static void encodeLength(ByteArrayOutputStream out, int length) { """ /* Length-bytes are written out in order from most to least significant, but are computed most efficiently (using bit shifts) from least to most significant. An integer serves as a temporary storage, which is then written out in reverse...
java
public static void encodeLength(ByteArrayOutputStream out, int length) { LOG.entering(CLASS_NAME, "encodeLength", new Object[] { out, length }); int byteCount = 0; long encodedLength = 0; do { // left shift one byte to make room for new data encodedLength <<= 8; ...
[ "public", "static", "void", "encodeLength", "(", "ByteArrayOutputStream", "out", ",", "int", "length", ")", "{", "LOG", ".", "entering", "(", "CLASS_NAME", ",", "\"encodeLength\"", ",", "new", "Object", "[", "]", "{", "out", ",", "length", "}", ")", ";", ...
/* Length-bytes are written out in order from most to least significant, but are computed most efficiently (using bit shifts) from least to most significant. An integer serves as a temporary storage, which is then written out in reversed order.
[ "/", "*", "Length", "-", "bytes", "are", "written", "out", "in", "order", "from", "most", "to", "least", "significant", "but", "are", "computed", "most", "efficiently", "(", "using", "bit", "shifts", ")", "from", "least", "to", "most", "significant", ".", ...
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/impl/util/WebSocketUtil.java#L38-L71
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/MapboxOfflineRouter.java
MapboxOfflineRouter.removeTiles
public void removeTiles(String version, BoundingBox boundingBox, OnOfflineTilesRemovedCallback callback) { """ Removes tiles within / intersected by a bounding box <p> Note that calling {@link MapboxOfflineRouter#findRoute(OfflineRoute, OnOfflineRouteFoundCallback)} while {@link MapboxOfflineRouter#removeTiles(...
java
public void removeTiles(String version, BoundingBox boundingBox, OnOfflineTilesRemovedCallback callback) { offlineNavigator.removeTiles(new File(tilePath, version).getAbsolutePath(), boundingBox.southwest(), boundingBox.northeast(), callback); }
[ "public", "void", "removeTiles", "(", "String", "version", ",", "BoundingBox", "boundingBox", ",", "OnOfflineTilesRemovedCallback", "callback", ")", "{", "offlineNavigator", ".", "removeTiles", "(", "new", "File", "(", "tilePath", ",", "version", ")", ".", "getAbs...
Removes tiles within / intersected by a bounding box <p> Note that calling {@link MapboxOfflineRouter#findRoute(OfflineRoute, OnOfflineRouteFoundCallback)} while {@link MapboxOfflineRouter#removeTiles(String, BoundingBox, OnOfflineTilesRemovedCallback)} could lead to undefine behavior </p> @param version version o...
[ "Removes", "tiles", "within", "/", "intersected", "by", "a", "bounding", "box", "<p", ">", "Note", "that", "calling", "{", "@link", "MapboxOfflineRouter#findRoute", "(", "OfflineRoute", "OnOfflineRouteFoundCallback", ")", "}", "while", "{", "@link", "MapboxOfflineRo...
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/MapboxOfflineRouter.java#L104-L107
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java
HCRenderer.getAsHTMLStringWithoutNamespaces
@Nonnull public static String getAsHTMLStringWithoutNamespaces (@Nonnull final IHCNode aHCNode) { """ Convert the passed HC node to an HTML string without namespaces. Indent and align status is determined from {@link GlobalDebug#isDebugMode()} @param aHCNode The node to be converted. May not be <code>null</...
java
@Nonnull public static String getAsHTMLStringWithoutNamespaces (@Nonnull final IHCNode aHCNode) { return getAsHTMLString (aHCNode, HCSettings.getConversionSettingsWithoutNamespaces ()); }
[ "@", "Nonnull", "public", "static", "String", "getAsHTMLStringWithoutNamespaces", "(", "@", "Nonnull", "final", "IHCNode", "aHCNode", ")", "{", "return", "getAsHTMLString", "(", "aHCNode", ",", "HCSettings", ".", "getConversionSettingsWithoutNamespaces", "(", ")", ")"...
Convert the passed HC node to an HTML string without namespaces. Indent and align status is determined from {@link GlobalDebug#isDebugMode()} @param aHCNode The node to be converted. May not be <code>null</code>. @return The node as XML with or without indentation.
[ "Convert", "the", "passed", "HC", "node", "to", "an", "HTML", "string", "without", "namespaces", ".", "Indent", "and", "align", "status", "is", "determined", "from", "{", "@link", "GlobalDebug#isDebugMode", "()", "}" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java#L291-L295
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.populateBar
private void populateBar(Row row, Task task) { """ Uses data from a bar to populate a task. @param row bar data @param task task to populate """ Integer calendarID = row.getInteger("CALENDAU"); ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID); //PROJID task.se...
java
private void populateBar(Row row, Task task) { Integer calendarID = row.getInteger("CALENDAU"); ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID); //PROJID task.setUniqueID(row.getInteger("BARID")); task.setStart(row.getDate("STARV")); task.setFinish(row.getD...
[ "private", "void", "populateBar", "(", "Row", "row", ",", "Task", "task", ")", "{", "Integer", "calendarID", "=", "row", ".", "getInteger", "(", "\"CALENDAU\"", ")", ";", "ProjectCalendar", "calendar", "=", "m_project", ".", "getCalendarByUniqueID", "(", "cale...
Uses data from a bar to populate a task. @param row bar data @param task task to populate
[ "Uses", "data", "from", "a", "bar", "to", "populate", "a", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L489-L520
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/common/NumberGenerator.java
NumberGenerator.setVal
public void setVal(final String _value) throws EFapsException { """ Set the value for the numberGenerator. The next call of {@link #getNextVal()} or {@link #getNextVal()} normally will return the value + 1. @param _value value for the sequence @throws EFapsException on error """ Connectio...
java
public void setVal(final String _value) throws EFapsException { Connection con = null; try { con = Context.getConnection(); Context.getDbType().setSequence(con, getDBName(), Long.parseLong(_value)); con.commit(); } catch (final SQLException e) { ...
[ "public", "void", "setVal", "(", "final", "String", "_value", ")", "throws", "EFapsException", "{", "Connection", "con", "=", "null", ";", "try", "{", "con", "=", "Context", ".", "getConnection", "(", ")", ";", "Context", ".", "getDbType", "(", ")", ".",...
Set the value for the numberGenerator. The next call of {@link #getNextVal()} or {@link #getNextVal()} normally will return the value + 1. @param _value value for the sequence @throws EFapsException on error
[ "Set", "the", "value", "for", "the", "numberGenerator", ".", "The", "next", "call", "of", "{", "@link", "#getNextVal", "()", "}", "or", "{", "@link", "#getNextVal", "()", "}", "normally", "will", "return", "the", "value", "+", "1", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/common/NumberGenerator.java#L244-L263
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/ApplicationVersion.java
ApplicationVersion.addIgnoredStep
@CallMethod(pattern = "install/version/lifecyle/ignore") public void addIgnoredStep(@CallParam(pattern = "install/version/lifecyle/ignore", attributeName = "step") final String _step) { """ Appends a step which is ignored within the installation of this version. @param _step ...
java
@CallMethod(pattern = "install/version/lifecyle/ignore") public void addIgnoredStep(@CallParam(pattern = "install/version/lifecyle/ignore", attributeName = "step") final String _step) { this.ignoredSteps.add(UpdateLifecycle.valueOf(_step.toUpperCase())); }
[ "@", "CallMethod", "(", "pattern", "=", "\"install/version/lifecyle/ignore\"", ")", "public", "void", "addIgnoredStep", "(", "@", "CallParam", "(", "pattern", "=", "\"install/version/lifecyle/ignore\"", ",", "attributeName", "=", "\"step\"", ")", "final", "String", "_...
Appends a step which is ignored within the installation of this version. @param _step ignored step @see #ignoredSteps
[ "Appends", "a", "step", "which", "is", "ignored", "within", "the", "installation", "of", "this", "version", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/ApplicationVersion.java#L250-L255
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicatedCloud_serviceName_vdi_GET
public OvhOrder dedicatedCloud_serviceName_vdi_GET(String serviceName, Long datacenterId, String firstPublicIpAddress, String secondPublicIpAddress) throws IOException { """ Get prices and contracts information REST: GET /order/dedicatedCloud/{serviceName}/vdi @param secondPublicIpAddress [required] Another av...
java
public OvhOrder dedicatedCloud_serviceName_vdi_GET(String serviceName, Long datacenterId, String firstPublicIpAddress, String secondPublicIpAddress) throws IOException { String qPath = "/order/dedicatedCloud/{serviceName}/vdi"; StringBuilder sb = path(qPath, serviceName); query(sb, "datacenterId", datacenterId); ...
[ "public", "OvhOrder", "dedicatedCloud_serviceName_vdi_GET", "(", "String", "serviceName", ",", "Long", "datacenterId", ",", "String", "firstPublicIpAddress", ",", "String", "secondPublicIpAddress", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedic...
Get prices and contracts information REST: GET /order/dedicatedCloud/{serviceName}/vdi @param secondPublicIpAddress [required] Another avaiable ip from one of your Private Cloud public IP blocks @param firstPublicIpAddress [required] An avaiable ip from one of your Private Cloud public IP blocks @param datacenterId [r...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5875-L5883
m-m-m/util
pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/PojoMethodIntrospectorImpl.java
PojoMethodIntrospectorImpl.collectInterfaces
private static void collectInterfaces(Class<?> type, Set<Class<?>> interfaceSet, Set<Class<?>> excludeSet) { """ Recursively collects all {@link Class#getInterfaces() interfaces} starting from the given {@code type}. @param type is the {@link Class} for which all {@link Class#getInterfaces() interfaces} shall b...
java
private static void collectInterfaces(Class<?> type, Set<Class<?>> interfaceSet, Set<Class<?>> excludeSet) { for (Class<?> interfaceClass : type.getInterfaces()) { if ((excludeSet == null) || (!excludeSet.contains(interfaceClass))) { interfaceSet.add(interfaceClass); } collectInterfaces(i...
[ "private", "static", "void", "collectInterfaces", "(", "Class", "<", "?", ">", "type", ",", "Set", "<", "Class", "<", "?", ">", ">", "interfaceSet", ",", "Set", "<", "Class", "<", "?", ">", ">", "excludeSet", ")", "{", "for", "(", "Class", "<", "?"...
Recursively collects all {@link Class#getInterfaces() interfaces} starting from the given {@code type}. @param type is the {@link Class} for which all {@link Class#getInterfaces() interfaces} shall be collected. @param interfaceSet is the {@link Set} where the {@link Class#getInterfaces() interfaces} will be {@link Se...
[ "Recursively", "collects", "all", "{", "@link", "Class#getInterfaces", "()", "interfaces", "}", "starting", "from", "the", "given", "{", "@code", "type", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/PojoMethodIntrospectorImpl.java#L57-L65
joniles/mpxj
src/main/java/net/sf/mpxj/RecurringData.java
RecurringData.getYearlyDates
private void getYearlyDates(Calendar calendar, List<Date> dates) { """ Calculate start dates for a yearly recurrence. @param calendar current date @param dates array of start dates """ if (m_relative) { getYearlyRelativeDates(calendar, dates); } else { getYea...
java
private void getYearlyDates(Calendar calendar, List<Date> dates) { if (m_relative) { getYearlyRelativeDates(calendar, dates); } else { getYearlyAbsoluteDates(calendar, dates); } }
[ "private", "void", "getYearlyDates", "(", "Calendar", "calendar", ",", "List", "<", "Date", ">", "dates", ")", "{", "if", "(", "m_relative", ")", "{", "getYearlyRelativeDates", "(", "calendar", ",", "dates", ")", ";", "}", "else", "{", "getYearlyAbsoluteDate...
Calculate start dates for a yearly recurrence. @param calendar current date @param dates array of start dates
[ "Calculate", "start", "dates", "for", "a", "yearly", "recurrence", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L551-L561
crnk-project/crnk-framework
crnk-core/src/main/java/io/crnk/core/engine/internal/utils/PreconditionUtil.java
PreconditionUtil.assertEquals
public static void assertEquals(String message, Object expected, Object actual) { """ Asserts that two objects are equal. If they are not, an {@link AssertionError} is thrown with the given message. If <code>expected</code> and <code>actual</code> are <code>null</code>, they are considered equal. @param mess...
java
public static void assertEquals(String message, Object expected, Object actual) { verifyEquals(expected, actual, message); }
[ "public", "static", "void", "assertEquals", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "verifyEquals", "(", "expected", ",", "actual", ",", "message", ")", ";", "}" ]
Asserts that two objects are equal. If they are not, an {@link AssertionError} is thrown with the given message. If <code>expected</code> and <code>actual</code> are <code>null</code>, they are considered equal. @param message the identifying message for the {@link AssertionError} ( <code>null</code> okay) @param exp...
[ "Asserts", "that", "two", "objects", "are", "equal", ".", "If", "they", "are", "not", "an", "{", "@link", "AssertionError", "}", "is", "thrown", "with", "the", "given", "message", ".", "If", "<code", ">", "expected<", "/", "code", ">", "and", "<code", ...
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-core/src/main/java/io/crnk/core/engine/internal/utils/PreconditionUtil.java#L22-L24
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/models/RetryStrategy.java
RetryStrategy.doWait
private void doWait( int currentTries, long optDuration_ms ) { """ Sleeps before retry ; default implementation is exponential back-off, or the specified duration @param currentTries 1 after first fail, then 2, 3 ... up to nbTriesMax-1. @param optDuration_ms if positive, the delay to apply """ if (...
java
private void doWait( int currentTries, long optDuration_ms ) { if ( optDuration_ms < 0 ) { optDuration_ms = ( long ) ( firstSleep_ms * ( Math.random() + 0.5 ) * ( 1L << ( currentTries - 1 ) ) ); } LOGGER.debug( "Will retry request after {} millis", optDuration_ms ); try...
[ "private", "void", "doWait", "(", "int", "currentTries", ",", "long", "optDuration_ms", ")", "{", "if", "(", "optDuration_ms", "<", "0", ")", "{", "optDuration_ms", "=", "(", "long", ")", "(", "firstSleep_ms", "*", "(", "Math", ".", "random", "(", ")", ...
Sleeps before retry ; default implementation is exponential back-off, or the specified duration @param currentTries 1 after first fail, then 2, 3 ... up to nbTriesMax-1. @param optDuration_ms if positive, the delay to apply
[ "Sleeps", "before", "retry", ";", "default", "implementation", "is", "exponential", "back", "-", "off", "or", "the", "specified", "duration" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/models/RetryStrategy.java#L93-L106
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.invalidTrueValue
@Pure @Inline(value = "AssertMessages.invalidTrueValue(0, $1)", imported = { """ The value of first Parameter must be <code>false</code>. @param functionName the name of the function that should reply <code>false</code>. @return the error message. """AssertMessages.class}) public static String invalidTru...
java
@Pure @Inline(value = "AssertMessages.invalidTrueValue(0, $1)", imported = {AssertMessages.class}) public static String invalidTrueValue(String functionName) { return invalidTrueValue(0, functionName); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"AssertMessages.invalidTrueValue(0, $1)\"", ",", "imported", "=", "{", "AssertMessages", ".", "class", "}", ")", "public", "static", "String", "invalidTrueValue", "(", "String", "functionName", ")", "{", "return", ...
The value of first Parameter must be <code>false</code>. @param functionName the name of the function that should reply <code>false</code>. @return the error message.
[ "The", "value", "of", "first", "Parameter", "must", "be", "<code", ">", "false<", "/", "code", ">", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L93-L97
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayPosition
public static Expression arrayPosition(String expression, Expression value) { """ Returned expression results in the first position of value within the array, or -1. Array position is zero-based, i.e. the first position is 0. """ return arrayPosition(x(expression), value); }
java
public static Expression arrayPosition(String expression, Expression value) { return arrayPosition(x(expression), value); }
[ "public", "static", "Expression", "arrayPosition", "(", "String", "expression", ",", "Expression", "value", ")", "{", "return", "arrayPosition", "(", "x", "(", "expression", ")", ",", "value", ")", ";", "}" ]
Returned expression results in the first position of value within the array, or -1. Array position is zero-based, i.e. the first position is 0.
[ "Returned", "expression", "results", "in", "the", "first", "position", "of", "value", "within", "the", "array", "or", "-", "1", ".", "Array", "position", "is", "zero", "-", "based", "i", ".", "e", ".", "the", "first", "position", "is", "0", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L267-L269
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.createColumnFamilies
private void createColumnFamilies(List<TableInfo> tableInfos, KsDef ksDef) throws Exception { """ Creates the column families. @param tableInfos the table infos @param ksDef the ks def @throws Exception the exception """ for (TableInfo tableInfo : tableInfos) { if (isCql3Ena...
java
private void createColumnFamilies(List<TableInfo> tableInfos, KsDef ksDef) throws Exception { for (TableInfo tableInfo : tableInfos) { if (isCql3Enabled(tableInfo)) { createOrUpdateUsingCQL3(tableInfo, ksDef); createIndexUsingCql(tableInfo); ...
[ "private", "void", "createColumnFamilies", "(", "List", "<", "TableInfo", ">", "tableInfos", ",", "KsDef", "ksDef", ")", "throws", "Exception", "{", "for", "(", "TableInfo", "tableInfo", ":", "tableInfos", ")", "{", "if", "(", "isCql3Enabled", "(", "tableInfo"...
Creates the column families. @param tableInfos the table infos @param ksDef the ks def @throws Exception the exception
[ "Creates", "the", "column", "families", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L425-L442
CubeEngine/Dirigent
src/main/java/org/cubeengine/dirigent/builder/MessageBuilder.java
MessageBuilder.buildResolved
protected final void buildResolved(ResolvedMacro c, BuilderT builder, Context context) { """ Appends a {@link ResolvedMacro} Component to the builder @param c the found formatter @param builder the builder @param context the context """ Component processed = c.getFormatter().process(c.getInput(), ...
java
protected final void buildResolved(ResolvedMacro c, BuilderT builder, Context context) { Component processed = c.getFormatter().process(c.getInput(), context, c.getArguments()); buildAny(processed, builder, context); }
[ "protected", "final", "void", "buildResolved", "(", "ResolvedMacro", "c", ",", "BuilderT", "builder", ",", "Context", "context", ")", "{", "Component", "processed", "=", "c", ".", "getFormatter", "(", ")", ".", "process", "(", "c", ".", "getInput", "(", ")...
Appends a {@link ResolvedMacro} Component to the builder @param c the found formatter @param builder the builder @param context the context
[ "Appends", "a", "{", "@link", "ResolvedMacro", "}", "Component", "to", "the", "builder" ]
train
https://github.com/CubeEngine/Dirigent/blob/68587a8202754a6a6b629cc15e14c516806badaa/src/main/java/org/cubeengine/dirigent/builder/MessageBuilder.java#L120-L124
jenkinsci/jenkins
core/src/main/java/hudson/util/KeyedDataStorage.java
KeyedDataStorage.getOrCreate
public @Nonnull T getOrCreate(String key, P createParams) throws IOException { """ Atomically gets the existing data object if any, or if it doesn't exist {@link #create(String,Object) create} it and return it. @return Item with the specified {@code key}. @param createParams Additional parameters needed to ...
java
public @Nonnull T getOrCreate(String key, P createParams) throws IOException { return get(key,true,createParams); }
[ "public", "@", "Nonnull", "T", "getOrCreate", "(", "String", "key", ",", "P", "createParams", ")", "throws", "IOException", "{", "return", "get", "(", "key", ",", "true", ",", "createParams", ")", ";", "}" ]
Atomically gets the existing data object if any, or if it doesn't exist {@link #create(String,Object) create} it and return it. @return Item with the specified {@code key}. @param createParams Additional parameters needed to create a new data object. Can be null. @throws IOException Loading error
[ "Atomically", "gets", "the", "existing", "data", "object", "if", "any", "or", "if", "it", "doesn", "t", "exist", "{", "@link", "#create", "(", "String", "Object", ")", "create", "}", "it", "and", "return", "it", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/KeyedDataStorage.java#L110-L112
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/Collections.java
Collections.arrayIn
public static WhenBuilder arrayIn(Expression arrayExpression, String variable, Expression expression) { """ Create an ARRAY comprehension with a first IN range. The ARRAY operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand exp...
java
public static WhenBuilder arrayIn(Expression arrayExpression, String variable, Expression expression) { return new WhenBuilder(x("ARRAY " + arrayExpression.toString() + " FOR"), variable, expression, true); }
[ "public", "static", "WhenBuilder", "arrayIn", "(", "Expression", "arrayExpression", ",", "String", "variable", ",", "Expression", "expression", ")", "{", "return", "new", "WhenBuilder", "(", "x", "(", "\"ARRAY \"", "+", "arrayExpression", ".", "toString", "(", "...
Create an ARRAY comprehension with a first IN range. The ARRAY operator lets you map and filter the elements or attributes of a collection, object, or objects. It evaluates to an array of the operand expression, that satisfies the WHEN clause, if provided. For elements, IN ranges in the direct elements of its array e...
[ "Create", "an", "ARRAY", "comprehension", "with", "a", "first", "IN", "range", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/Collections.java#L226-L229
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/SpecTopic.java
SpecTopic.getClosestTopic
public SpecTopic getClosestTopic(final SpecTopic topic, final boolean checkParentNode) { """ Finds the closest node in the contents of a level @param topic The node we need to find the closest match for @return """ /* * Check this topic to see if it is the topic we are looking for ...
java
public SpecTopic getClosestTopic(final SpecTopic topic, final boolean checkParentNode) { /* * Check this topic to see if it is the topic we are looking for */ if (this == topic || getId().equals(topic.getId())) return this; /* * If we still haven't found the closest n...
[ "public", "SpecTopic", "getClosestTopic", "(", "final", "SpecTopic", "topic", ",", "final", "boolean", "checkParentNode", ")", "{", "/*\n * Check this topic to see if it is the topic we are looking for\n */", "if", "(", "this", "==", "topic", "||", "getId", ...
Finds the closest node in the contents of a level @param topic The node we need to find the closest match for @return
[ "Finds", "the", "closest", "node", "in", "the", "contents", "of", "a", "level" ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecTopic.java#L529-L547
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientImpl.java
ClientImpl.callProcedure
@Override public final ClientResponse callProcedure(String procName, Object... parameters) throws IOException, NoConnectionsException, ProcCallException { """ Synchronously invoke a procedure call blocking until a result is available. @param procName class name (not qualified by package) of the pr...
java
@Override public final ClientResponse callProcedure(String procName, Object... parameters) throws IOException, NoConnectionsException, ProcCallException { return callProcedureWithClientTimeout(BatchTimeoutOverrideType.NO_TIMEOUT, false, procName, Distributer.USE_DEFAULT_CLIEN...
[ "@", "Override", "public", "final", "ClientResponse", "callProcedure", "(", "String", "procName", ",", "Object", "...", "parameters", ")", "throws", "IOException", ",", "NoConnectionsException", ",", "ProcCallException", "{", "return", "callProcedureWithClientTimeout", ...
Synchronously invoke a procedure call blocking until a result is available. @param procName class name (not qualified by package) of the procedure to execute. @param parameters vararg list of procedure's parameter values. @return array of VoltTable results. @throws org.voltdb.client.ProcCallException @throws NoConnecti...
[ "Synchronously", "invoke", "a", "procedure", "call", "blocking", "until", "a", "result", "is", "available", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientImpl.java#L256-L262
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.getDocumentTabs
public Tabs getDocumentTabs(String accountId, String templateId, String documentId) throws ApiException { """ Returns tabs on the document. @param accountId The external account number (int) or account ID Guid. (required) @param templateId The ID of the template being accessed. (required) @param documentId Th...
java
public Tabs getDocumentTabs(String accountId, String templateId, String documentId) throws ApiException { return getDocumentTabs(accountId, templateId, documentId, null); }
[ "public", "Tabs", "getDocumentTabs", "(", "String", "accountId", ",", "String", "templateId", ",", "String", "documentId", ")", "throws", "ApiException", "{", "return", "getDocumentTabs", "(", "accountId", ",", "templateId", ",", "documentId", ",", "null", ")", ...
Returns tabs on the document. @param accountId The external account number (int) or account ID Guid. (required) @param templateId The ID of the template being accessed. (required) @param documentId The ID of the document being accessed. (required) @return Tabs
[ "Returns", "tabs", "on", "the", "document", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L1468-L1470
Azure/azure-sdk-for-java
sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ManagedInstanceVulnerabilityAssessmentsInner.java
ManagedInstanceVulnerabilityAssessmentsInner.createOrUpdate
public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String managedInstanceName, ManagedInstanceVulnerabilityAssessmentInner parameters) { """ Creates or updates the managed instance's vulnerability assessment. @param resourceGroupName The name of the resource group that c...
java
public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String managedInstanceName, ManagedInstanceVulnerabilityAssessmentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, parameters).toBlocking().single().body(); }
[ "public", "ManagedInstanceVulnerabilityAssessmentInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "ManagedInstanceVulnerabilityAssessmentInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", ...
Creates or updates the managed instance's vulnerability assessment. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance for which the vulnerability as...
[ "Creates", "or", "updates", "the", "managed", "instance", "s", "vulnerability", "assessment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ManagedInstanceVulnerabilityAssessmentsInner.java#L185-L187
apache/flink
flink-core/src/main/java/org/apache/flink/util/Preconditions.java
Preconditions.checkElementIndex
public static void checkElementIndex(int index, int size, @Nullable String errorMessage) { """ Ensures that the given index is valid for an array, list or string of the given size. @param index index to check @param size size of the array, list or string @param errorMessage The message for the {@code IndexOut...
java
public static void checkElementIndex(int index, int size, @Nullable String errorMessage) { checkArgument(size >= 0, "Size was negative."); if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(String.valueOf(errorMessage) + " Index: " + index + ", Size: " + size); } }
[ "public", "static", "void", "checkElementIndex", "(", "int", "index", ",", "int", "size", ",", "@", "Nullable", "String", "errorMessage", ")", "{", "checkArgument", "(", "size", ">=", "0", ",", "\"Size was negative.\"", ")", ";", "if", "(", "index", "<", "...
Ensures that the given index is valid for an array, list or string of the given size. @param index index to check @param size size of the array, list or string @param errorMessage The message for the {@code IndexOutOfBoundsException} that is thrown if the check fails. @throws IllegalArgumentException Thrown, if size ...
[ "Ensures", "that", "the", "given", "index", "is", "valid", "for", "an", "array", "list", "or", "string", "of", "the", "given", "size", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/Preconditions.java#L247-L252
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java
SQLiteDatabase.openDatabase
public static SQLiteDatabase openDatabase(String path, CursorFactory factory, int flags) { """ Open the database according to the flags {@link #OPEN_READWRITE} {@link #OPEN_READONLY} {@link #CREATE_IF_NECESSARY} and/or {@link #NO_LOCALIZED_COLLATORS}. <p>Sets the locale of the database to the the system's cur...
java
public static SQLiteDatabase openDatabase(String path, CursorFactory factory, int flags) { return openDatabase(path, factory, flags, null); }
[ "public", "static", "SQLiteDatabase", "openDatabase", "(", "String", "path", ",", "CursorFactory", "factory", ",", "int", "flags", ")", "{", "return", "openDatabase", "(", "path", ",", "factory", ",", "flags", ",", "null", ")", ";", "}" ]
Open the database according to the flags {@link #OPEN_READWRITE} {@link #OPEN_READONLY} {@link #CREATE_IF_NECESSARY} and/or {@link #NO_LOCALIZED_COLLATORS}. <p>Sets the locale of the database to the the system's current locale. Call {@link #setLocale} if you would like something else.</p> @param path to database fil...
[ "Open", "the", "database", "according", "to", "the", "flags", "{", "@link", "#OPEN_READWRITE", "}", "{", "@link", "#OPEN_READONLY", "}", "{", "@link", "#CREATE_IF_NECESSARY", "}", "and", "/", "or", "{", "@link", "#NO_LOCALIZED_COLLATORS", "}", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L672-L674
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/job_catalog/FSJobCatalog.java
FSJobCatalog.materializedJobSpec
synchronized void materializedJobSpec(Path jobSpecPath, JobSpec jobSpec, FileSystem fs) throws IOException, JobSpecNotFoundException { """ Used for shadow copying in the process of updating a existing job configuration file, which requires deletion of the pre-existed copy of file and create a new one with t...
java
synchronized void materializedJobSpec(Path jobSpecPath, JobSpec jobSpec, FileSystem fs) throws IOException, JobSpecNotFoundException { Path shadowDirectoryPath = new Path("/tmp"); Path shadowFilePath = new Path(shadowDirectoryPath, UUID.randomUUID().toString()); /* If previously existed, should delete...
[ "synchronized", "void", "materializedJobSpec", "(", "Path", "jobSpecPath", ",", "JobSpec", "jobSpec", ",", "FileSystem", "fs", ")", "throws", "IOException", ",", "JobSpecNotFoundException", "{", "Path", "shadowDirectoryPath", "=", "new", "Path", "(", "\"/tmp\"", ")"...
Used for shadow copying in the process of updating a existing job configuration file, which requires deletion of the pre-existed copy of file and create a new one with the same name. Steps: Create a new one in /tmp. Safely deletion of old one. copy the newly created configuration file to jobConfigDir. Delete the shadow...
[ "Used", "for", "shadow", "copying", "in", "the", "process", "of", "updating", "a", "existing", "job", "configuration", "file", "which", "requires", "deletion", "of", "the", "pre", "-", "existed", "copy", "of", "file", "and", "create", "a", "new", "one", "w...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/job_catalog/FSJobCatalog.java#L184-L218
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.beginExportAsync
public Observable<ImportExportResponseInner> beginExportAsync(String resourceGroupName, String serverName, String databaseName, ExportRequest parameters) { """ Exports a database to a bacpac. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the A...
java
public Observable<ImportExportResponseInner> beginExportAsync(String resourceGroupName, String serverName, String databaseName, ExportRequest parameters) { return beginExportWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceResponse<ImportExportResponseInner>...
[ "public", "Observable", "<", "ImportExportResponseInner", ">", "beginExportAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "ExportRequest", "parameters", ")", "{", "return", "beginExportWithServiceResponseAsync", ...
Exports a database to a bacpac. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database to be exported. @param parameters The r...
[ "Exports", "a", "database", "to", "a", "bacpac", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L2211-L2218
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util._indexOf
private static int _indexOf(@Nonnull String s, char ch) { """ Works like {@link String#indexOf(int)} but 'not found' is returned as s.length(), not -1. This enables more straight-forward comparison. """ int idx = s.indexOf(ch); if (idx<0) return s.length(); return idx; }
java
private static int _indexOf(@Nonnull String s, char ch) { int idx = s.indexOf(ch); if (idx<0) return s.length(); return idx; }
[ "private", "static", "int", "_indexOf", "(", "@", "Nonnull", "String", "s", ",", "char", "ch", ")", "{", "int", "idx", "=", "s", ".", "indexOf", "(", "ch", ")", ";", "if", "(", "idx", "<", "0", ")", "return", "s", ".", "length", "(", ")", ";", ...
Works like {@link String#indexOf(int)} but 'not found' is returned as s.length(), not -1. This enables more straight-forward comparison.
[ "Works", "like", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L1420-L1424
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/concurrent/SimpleThreadFactory.java
SimpleThreadFactory.newThread
public Thread newThread(String name, Runnable task) { """ Constructs and initializes a new {@link Thread}. @param name name given to the new {@link Thread}. @param task {@link Runnable} task for the {@link Thread} to execute. @return a new {@link Thread} initialized by this factory. @throws IllegalArgumentEx...
java
public Thread newThread(String name, Runnable task) { Assert.hasText(name, "Thread name must be specified"); Assert.notNull(task, "Thread task must not be null"); Thread thread = new Thread(getThreadGroup(), task, name); thread.setContextClassLoader(getContextClassLoader()); thread.setDaemon(isDae...
[ "public", "Thread", "newThread", "(", "String", "name", ",", "Runnable", "task", ")", "{", "Assert", ".", "hasText", "(", "name", ",", "\"Thread name must be specified\"", ")", ";", "Assert", ".", "notNull", "(", "task", ",", "\"Thread task must not be null\"", ...
Constructs and initializes a new {@link Thread}. @param name name given to the new {@link Thread}. @param task {@link Runnable} task for the {@link Thread} to execute. @return a new {@link Thread} initialized by this factory. @throws IllegalArgumentException if {@code name} is unspecified or {@link Runnable} task is {...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "Thread", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/concurrent/SimpleThreadFactory.java#L119-L131
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java
SingleContextSource.doWithSingleContext
public static <T> T doWithSingleContext(ContextSource contextSource, LdapOperationsCallback<T> callback) { """ Construct a SingleContextSource and execute the LdapOperationsCallback using the created instance. This makes sure the same connection will be used for all operations inside the LdapOperationsCallback, ...
java
public static <T> T doWithSingleContext(ContextSource contextSource, LdapOperationsCallback<T> callback) { return doWithSingleContext(contextSource, callback, DONT_USE_READ_ONLY, DONT_IGNORE_PARTIAL_RESULT, DONT_IGNORE_NAME_NOT_FOUND); }
[ "public", "static", "<", "T", ">", "T", "doWithSingleContext", "(", "ContextSource", "contextSource", ",", "LdapOperationsCallback", "<", "T", ">", "callback", ")", "{", "return", "doWithSingleContext", "(", "contextSource", ",", "callback", ",", "DONT_USE_READ_ONLY...
Construct a SingleContextSource and execute the LdapOperationsCallback using the created instance. This makes sure the same connection will be used for all operations inside the LdapOperationsCallback, which is particularly useful when working with e.g. Paged Results as these typically require the exact same connection...
[ "Construct", "a", "SingleContextSource", "and", "execute", "the", "LdapOperationsCallback", "using", "the", "created", "instance", ".", "This", "makes", "sure", "the", "same", "connection", "will", "be", "used", "for", "all", "operations", "inside", "the", "LdapOp...
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/core/support/SingleContextSource.java#L114-L117
demidenko05/beigesoft-bcommon
src/main/java/org/beigesoft/service/UtlReflection.java
UtlReflection.retrieveGetterForField
@Override public final Method retrieveGetterForField(final Class<?> pClazz, final String pFieldName) throws Exception { """ <p>Retrieve getter from given class by field name.</p> @param pClazz - class @param pFieldName - field name @return Method getter. @throws Exception if method not exist """ ...
java
@Override public final Method retrieveGetterForField(final Class<?> pClazz, final String pFieldName) throws Exception { String getterName = "get" + pFieldName.substring(0, 1).toUpperCase() + pFieldName.substring(1); return retrieveMethod(pClazz, getterName); }
[ "@", "Override", "public", "final", "Method", "retrieveGetterForField", "(", "final", "Class", "<", "?", ">", "pClazz", ",", "final", "String", "pFieldName", ")", "throws", "Exception", "{", "String", "getterName", "=", "\"get\"", "+", "pFieldName", ".", "subs...
<p>Retrieve getter from given class by field name.</p> @param pClazz - class @param pFieldName - field name @return Method getter. @throws Exception if method not exist
[ "<p", ">", "Retrieve", "getter", "from", "given", "class", "by", "field", "name", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-bcommon/blob/bb446822b4fc9b5a6a8cd3cc98d0b3d83d718daf/src/main/java/org/beigesoft/service/UtlReflection.java#L140-L146
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asInteger
public static Integer asInteger(String expression, Node node, XPath xpath) throws XPathExpressionException { """ Same as {@link #asInteger(String, Node)} but allows an xpath to be passed in explicitly for reuse. """ String intString = evaluateAsString(expression, node, xpath); retu...
java
public static Integer asInteger(String expression, Node node, XPath xpath) throws XPathExpressionException { String intString = evaluateAsString(expression, node, xpath); return (isEmptyString(intString)) ? null : Integer.parseInt(intString); }
[ "public", "static", "Integer", "asInteger", "(", "String", "expression", ",", "Node", "node", ",", "XPath", "xpath", ")", "throws", "XPathExpressionException", "{", "String", "intString", "=", "evaluateAsString", "(", "expression", ",", "node", ",", "xpath", ")"...
Same as {@link #asInteger(String, Node)} but allows an xpath to be passed in explicitly for reuse.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L286-L290
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/AbstractEntityReader.java
AbstractEntityReader.setRelationToEntity
private void setRelationToEntity(Object entity, Object relationEntity, Relation relation) { """ After successfully parsing set relational entity object within entity object. @param entity @param relationEntity @param relation """ if (relation.getTargetEntity().isAssignableFrom(getEntity(relationE...
java
private void setRelationToEntity(Object entity, Object relationEntity, Relation relation) { if (relation.getTargetEntity().isAssignableFrom(getEntity(relationEntity).getClass())) { if (relation.isUnary()) { PropertyAccessorHelper.set(entity, relation.getPrope...
[ "private", "void", "setRelationToEntity", "(", "Object", "entity", ",", "Object", "relationEntity", ",", "Relation", "relation", ")", "{", "if", "(", "relation", ".", "getTargetEntity", "(", ")", ".", "isAssignableFrom", "(", "getEntity", "(", "relationEntity", ...
After successfully parsing set relational entity object within entity object. @param entity @param relationEntity @param relation
[ "After", "successfully", "parsing", "set", "relational", "entity", "object", "within", "entity", "object", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/AbstractEntityReader.java#L276-L297
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java
CountersTable.appendBtoFList
void appendBtoFList(NodeSetDTM flist, NodeSetDTM blist) { """ Add a list of counted nodes that were built in backwards document order, or a list of counted nodes that are in forwards document order. @param flist Vector of nodes built in forwards document order @param blist Vector of nodes built in backwards ...
java
void appendBtoFList(NodeSetDTM flist, NodeSetDTM blist) { int n = blist.size(); for (int i = (n - 1); i >= 0; i--) { flist.addElement(blist.item(i)); } }
[ "void", "appendBtoFList", "(", "NodeSetDTM", "flist", ",", "NodeSetDTM", "blist", ")", "{", "int", "n", "=", "blist", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "(", "n", "-", "1", ")", ";", "i", ">=", "0", ";", "i", "--", ")", ...
Add a list of counted nodes that were built in backwards document order, or a list of counted nodes that are in forwards document order. @param flist Vector of nodes built in forwards document order @param blist Vector of nodes built in backwards document order
[ "Add", "a", "list", "of", "counted", "nodes", "that", "were", "built", "in", "backwards", "document", "order", "or", "a", "list", "of", "counted", "nodes", "that", "are", "in", "forwards", "document", "order", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java#L98-L107
cdk/cdk
display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java
AbstractAWTDrawVisitor.getTextBounds
protected Rectangle2D getTextBounds(String text, double xCoord, double yCoord, Graphics2D graphics) { """ Calculates the boundaries of a text string in screen coordinates. @param text the text string @param xCoord the world x-coordinate of where the text should be placed @param yCoord the world y-coor...
java
protected Rectangle2D getTextBounds(String text, double xCoord, double yCoord, Graphics2D graphics) { FontMetrics fontMetrics = graphics.getFontMetrics(); Rectangle2D bounds = fontMetrics.getStringBounds(text, graphics); double widthPad = 3; double heightPad = 1; double width =...
[ "protected", "Rectangle2D", "getTextBounds", "(", "String", "text", ",", "double", "xCoord", ",", "double", "yCoord", ",", "Graphics2D", "graphics", ")", "{", "FontMetrics", "fontMetrics", "=", "graphics", ".", "getFontMetrics", "(", ")", ";", "Rectangle2D", "bo...
Calculates the boundaries of a text string in screen coordinates. @param text the text string @param xCoord the world x-coordinate of where the text should be placed @param yCoord the world y-coordinate of where the text should be placed @param graphics the graphics to which the text is provided as output @ret...
[ "Calculates", "the", "boundaries", "of", "a", "text", "string", "in", "screen", "coordinates", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderawt/src/main/java/org/openscience/cdk/renderer/visitor/AbstractAWTDrawVisitor.java#L73-L84
AzureAD/azure-activedirectory-library-for-java
src/main/java/com/microsoft/aad/adal4j/AuthenticationContext.java
AuthenticationContext.acquireToken
public Future<AuthenticationResult> acquireToken(final String resource, final UserAssertion userAssertion, final ClientCredential credential, final AuthenticationCallback callback) { """ Acquires an access token from the authority on behalf of a user. It requires using a user token previ...
java
public Future<AuthenticationResult> acquireToken(final String resource, final UserAssertion userAssertion, final ClientCredential credential, final AuthenticationCallback callback) { this.validateOnBehalfOfRequestInput(resource, userAssertion, credential, true); final Clien...
[ "public", "Future", "<", "AuthenticationResult", ">", "acquireToken", "(", "final", "String", "resource", ",", "final", "UserAssertion", "userAssertion", ",", "final", "ClientCredential", "credential", ",", "final", "AuthenticationCallback", "callback", ")", "{", "thi...
Acquires an access token from the authority on behalf of a user. It requires using a user token previously received. @param resource Identifier of the target resource that is the recipient of the requested token. @param userAssertion userAssertion to use as Authorization grant @param credential The client credential t...
[ "Acquires", "an", "access", "token", "from", "the", "authority", "on", "behalf", "of", "a", "user", ".", "It", "requires", "using", "a", "user", "token", "previously", "received", "." ]
train
https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/7f0004fee6faee5818e75623113993a267ceb1c4/src/main/java/com/microsoft/aad/adal4j/AuthenticationContext.java#L266-L275
mgormley/prim
src/main/java/edu/jhu/prim/sample/Sample.java
Sample.sampleWithoutReplacement
public static int[] sampleWithoutReplacement(int sampleSize, int n) { """ Samples a set of sampleSize integers without replacement from the range [0,...,n-1]. @param sampleSize The number of integers to return. @param n The number of integers from which to sample. @return The sample as an unsorted integer array...
java
public static int[] sampleWithoutReplacement(int sampleSize, int n) { // This implements a modified form of the genshuf() function from // Programming Pearls pg. 129. // TODO: Design a faster method that only generates min(m, n-m) integers. int[] array = IntSort.getInde...
[ "public", "static", "int", "[", "]", "sampleWithoutReplacement", "(", "int", "sampleSize", ",", "int", "n", ")", "{", "// This implements a modified form of the genshuf() function from", "// Programming Pearls pg. 129.", "// TODO: Design a faster method that only generates min(m, n-m...
Samples a set of sampleSize integers without replacement from the range [0,...,n-1]. @param sampleSize The number of integers to return. @param n The number of integers from which to sample. @return The sample as an unsorted integer array.
[ "Samples", "a", "set", "of", "sampleSize", "integers", "without", "replacement", "from", "the", "range", "[", "0", "...", "n", "-", "1", "]", "." ]
train
https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/sample/Sample.java#L21-L36
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MHtmlWriter.java
MHtmlWriter.writeHtml
protected void writeHtml(final MBasicTable table, final OutputStream outputStream, final boolean isSelection) throws IOException { """ Exporte une JTable dans un fichier au format html. @param table MBasicTable @param outputStream OutputStream @param isSelection boolean @throws IOException Erreur dis...
java
protected void writeHtml(final MBasicTable table, final OutputStream outputStream, final boolean isSelection) throws IOException { final Writer out = new OutputStreamWriter(outputStream, "UTF-8"); final String eol = isSelection ? "\n" : System.getProperty("line.separator"); // eol = "\n" si sélection, "\...
[ "protected", "void", "writeHtml", "(", "final", "MBasicTable", "table", ",", "final", "OutputStream", "outputStream", ",", "final", "boolean", "isSelection", ")", "throws", "IOException", "{", "final", "Writer", "out", "=", "new", "OutputStreamWriter", "(", "outpu...
Exporte une JTable dans un fichier au format html. @param table MBasicTable @param outputStream OutputStream @param isSelection boolean @throws IOException Erreur disque
[ "Exporte", "une", "JTable", "dans", "un", "fichier", "au", "format", "html", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MHtmlWriter.java#L93-L127
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
Stanza.removeExtension
public ExtensionElement removeExtension(String elementName, String namespace) { """ Remove the stanza extension with the given elementName and namespace. @param elementName @param namespace @return the removed stanza extension or null. """ String key = XmppStringUtils.generateKey(elementName, name...
java
public ExtensionElement removeExtension(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); synchronized (packetExtensions) { return packetExtensions.remove(key); } }
[ "public", "ExtensionElement", "removeExtension", "(", "String", "elementName", ",", "String", "namespace", ")", "{", "String", "key", "=", "XmppStringUtils", ".", "generateKey", "(", "elementName", ",", "namespace", ")", ";", "synchronized", "(", "packetExtensions",...
Remove the stanza extension with the given elementName and namespace. @param elementName @param namespace @return the removed stanza extension or null.
[ "Remove", "the", "stanza", "extension", "with", "the", "given", "elementName", "and", "namespace", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java#L462-L467
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Discovery.java
S3Discovery.writeToFile
private void writeToFile(List<DomainControllerData> data, String domainName) throws IOException { """ Write the domain controller data to an S3 file. @param data the domain controller data @param domainName the name of the directory in the bucket to write the S3 file to @throws IOException """ if(...
java
private void writeToFile(List<DomainControllerData> data, String domainName) throws IOException { if(domainName == null || data == null) { return; } if (conn == null) { init(); } try { String key = S3Util.sanitize(domainName) + "/" + S3Util.s...
[ "private", "void", "writeToFile", "(", "List", "<", "DomainControllerData", ">", "data", ",", "String", "domainName", ")", "throws", "IOException", "{", "if", "(", "domainName", "==", "null", "||", "data", "==", "null", ")", "{", "return", ";", "}", "if", ...
Write the domain controller data to an S3 file. @param data the domain controller data @param domainName the name of the directory in the bucket to write the S3 file to @throws IOException
[ "Write", "the", "domain", "controller", "data", "to", "an", "S3", "file", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Discovery.java#L293-L319
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java
OffsetDateTime.compareInstant
private static int compareInstant(OffsetDateTime datetime1, OffsetDateTime datetime2) { """ Compares this {@code OffsetDateTime} to another date-time. The comparison is based on the instant. @param datetime1 the first date-time to compare, not null @param datetime2 the other date-time to compare to, not nul...
java
private static int compareInstant(OffsetDateTime datetime1, OffsetDateTime datetime2) { if (datetime1.getOffset().equals(datetime2.getOffset())) { return datetime1.toLocalDateTime().compareTo(datetime2.toLocalDateTime()); } int cmp = Long.compare(datetime1.toEpochSecond(), datetime2....
[ "private", "static", "int", "compareInstant", "(", "OffsetDateTime", "datetime1", ",", "OffsetDateTime", "datetime2", ")", "{", "if", "(", "datetime1", ".", "getOffset", "(", ")", ".", "equals", "(", "datetime2", ".", "getOffset", "(", ")", ")", ")", "{", ...
Compares this {@code OffsetDateTime} to another date-time. The comparison is based on the instant. @param datetime1 the first date-time to compare, not null @param datetime2 the other date-time to compare to, not null @return the comparator value, negative if less, positive if greater
[ "Compares", "this", "{", "@code", "OffsetDateTime", "}", "to", "another", "date", "-", "time", ".", "The", "comparison", "is", "based", "on", "the", "instant", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java#L167-L176
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java
ShardConsumer.getRecords
private GetRecordsResult getRecords(String shardItr, int maxNumberOfRecords) throws Exception { """ Calls {@link KinesisProxyInterface#getRecords(String, int)}, while also handling unexpected AWS {@link ExpiredIteratorException}s to assure that we get results and don't just fail on such occasions. The returned s...
java
private GetRecordsResult getRecords(String shardItr, int maxNumberOfRecords) throws Exception { GetRecordsResult getRecordsResult = null; while (getRecordsResult == null) { try { getRecordsResult = kinesis.getRecords(shardItr, maxNumberOfRecords); // Update millis behind latest so it gets reported by th...
[ "private", "GetRecordsResult", "getRecords", "(", "String", "shardItr", ",", "int", "maxNumberOfRecords", ")", "throws", "Exception", "{", "GetRecordsResult", "getRecordsResult", "=", "null", ";", "while", "(", "getRecordsResult", "==", "null", ")", "{", "try", "{...
Calls {@link KinesisProxyInterface#getRecords(String, int)}, while also handling unexpected AWS {@link ExpiredIteratorException}s to assure that we get results and don't just fail on such occasions. The returned shard iterator within the successful {@link GetRecordsResult} should be used for the next call to this metho...
[ "Calls", "{", "@link", "KinesisProxyInterface#getRecords", "(", "String", "int", ")", "}", "while", "also", "handling", "unexpected", "AWS", "{", "@link", "ExpiredIteratorException", "}", "s", "to", "assure", "that", "we", "get", "results", "and", "don", "t", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java#L396-L420
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java
AbstractCasWebflowConfigurer.getSpringExpressionParser
public SpringELExpressionParser getSpringExpressionParser() { """ Gets spring expression parser. @return the spring expression parser """ val configuration = new SpelParserConfiguration(); val spelExpressionParser = new SpelExpressionParser(configuration); val parser = new SpringELEx...
java
public SpringELExpressionParser getSpringExpressionParser() { val configuration = new SpelParserConfiguration(); val spelExpressionParser = new SpelExpressionParser(configuration); val parser = new SpringELExpressionParser(spelExpressionParser, this.flowBuilderServices.getConversionService()); ...
[ "public", "SpringELExpressionParser", "getSpringExpressionParser", "(", ")", "{", "val", "configuration", "=", "new", "SpelParserConfiguration", "(", ")", ";", "val", "spelExpressionParser", "=", "new", "SpelExpressionParser", "(", "configuration", ")", ";", "val", "p...
Gets spring expression parser. @return the spring expression parser
[ "Gets", "spring", "expression", "parser", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L383-L399
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountAssembliesInner.java
IntegrationAccountAssembliesInner.createOrUpdate
public AssemblyDefinitionInner createOrUpdate(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact) { """ Create or update an assembly for an integration account. @param resourceGroupName The resource group name. @param integrationAccoun...
java
public AssemblyDefinitionInner createOrUpdate(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact).toBlock...
[ "public", "AssemblyDefinitionInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "assemblyArtifactName", ",", "AssemblyDefinitionInner", "assemblyArtifact", ")", "{", "return", "createOrUpdateWithServiceResponseAsy...
Create or update an assembly for an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param assemblyArtifactName The assembly artifact name. @param assemblyArtifact The assembly artifact. @throws IllegalArgumentException thrown if parame...
[ "Create", "or", "update", "an", "assembly", "for", "an", "integration", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountAssembliesInner.java#L278-L280
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/message/IdManager.java
IdManager.makeSureMsgId
public static boolean makeSureMsgId(Map<String, Object> map) { """ map与MsgIdHolder内的$msgId同步,如果二者都没有$msgId,那么为他们初始化一个 @return newMsgIdGenerated 若初始化了一个新的$msgId,那么返回true @deprecated We use message context to transmit the msg id now, "$" var in map is deprecated. """ boolean newMsgIdGenerated = false...
java
public static boolean makeSureMsgId(Map<String, Object> map) { boolean newMsgIdGenerated = false; if (StringUtil.isEmpty(map.get("$msgId"))) { if (MsgIdHolder.get() == null) { MsgIdHolder.init(); newMsgIdGenerated = true; LOG.debug("没有提供$msgId,...
[ "public", "static", "boolean", "makeSureMsgId", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "boolean", "newMsgIdGenerated", "=", "false", ";", "if", "(", "StringUtil", ".", "isEmpty", "(", "map", ".", "get", "(", "\"$msgId\"", ")", ")...
map与MsgIdHolder内的$msgId同步,如果二者都没有$msgId,那么为他们初始化一个 @return newMsgIdGenerated 若初始化了一个新的$msgId,那么返回true @deprecated We use message context to transmit the msg id now, "$" var in map is deprecated.
[ "map与MsgIdHolder内的$msgId同步,如果二者都没有$msgId,那么为他们初始化一个" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/message/IdManager.java#L103-L116
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMapMessageImpl.java
JsJmsMapMessageImpl.setLong
public void setLong(String name, long value) throws UnsupportedEncodingException { """ /* Set a long value with the given name, into the Map. Javadoc description supplied by JsJmsMessage interface. """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setLong", Lon...
java
public void setLong(String name, long value) throws UnsupportedEncodingException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setLong", Long.valueOf(value)); getBodyMap().put(name, Long.valueOf(value)); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnable...
[ "public", "void", "setLong", "(", "String", "name", ",", "long", "value", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "...
/* Set a long value with the given name, into the Map. Javadoc description supplied by JsJmsMessage interface.
[ "/", "*", "Set", "a", "long", "value", "with", "the", "given", "name", "into", "the", "Map", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMapMessageImpl.java#L330-L334
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/AbstractDsAssignmentStrategy.java
AbstractDsAssignmentStrategy.overrideObsoleteUpdateActions
protected List<Long> overrideObsoleteUpdateActions(final Collection<Long> targetsIds) { """ Cancels {@link Action}s that are no longer necessary and sends cancellations to the controller. @param targetsIds to override {@link Action}s """ // Figure out if there are potential target/action combinat...
java
protected List<Long> overrideObsoleteUpdateActions(final Collection<Long> targetsIds) { // Figure out if there are potential target/action combinations that // need to be considered for cancellation final List<JpaAction> activeActions = actionRepository .findByActiveAndTargetIdI...
[ "protected", "List", "<", "Long", ">", "overrideObsoleteUpdateActions", "(", "final", "Collection", "<", "Long", ">", "targetsIds", ")", "{", "// Figure out if there are potential target/action combinations that", "// need to be considered for cancellation", "final", "List", "<...
Cancels {@link Action}s that are no longer necessary and sends cancellations to the controller. @param targetsIds to override {@link Action}s
[ "Cancels", "{", "@link", "Action", "}", "s", "that", "are", "no", "longer", "necessary", "and", "sends", "cancellations", "to", "the", "controller", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/AbstractDsAssignmentStrategy.java#L156-L177
dita-ot/dita-ot
src/main/java/org/dita/dost/reader/MergeTopicParser.java
MergeTopicParser.handleLocalHref
private URI handleLocalHref(final URI attValue) { """ Rewrite local non-DITA href value. @param attValue href attribute value @return rewritten href value """ final URI current = new File(dirPath, filePath).toURI().normalize(); final URI reference = current.resolve(attValue); final ...
java
private URI handleLocalHref(final URI attValue) { final URI current = new File(dirPath, filePath).toURI().normalize(); final URI reference = current.resolve(attValue); final URI merge = output.toURI(); return getRelativePath(merge, reference); }
[ "private", "URI", "handleLocalHref", "(", "final", "URI", "attValue", ")", "{", "final", "URI", "current", "=", "new", "File", "(", "dirPath", ",", "filePath", ")", ".", "toURI", "(", ")", ".", "normalize", "(", ")", ";", "final", "URI", "reference", "...
Rewrite local non-DITA href value. @param attValue href attribute value @return rewritten href value
[ "Rewrite", "local", "non", "-", "DITA", "href", "value", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/MergeTopicParser.java#L259-L264
JodaOrg/joda-convert
src/main/java/org/joda/convert/RenameHandler.java
RenameHandler.renamedType
public void renamedType(String oldName, Class<?> currentValue) { """ Register the fact that a type was renamed. <p> This handles the use case where a class is renamed. @param oldName the old name of the type including the package name, not null @param currentValue the current type, not null """ ...
java
public void renamedType(String oldName, Class<?> currentValue) { if (oldName == null) { throw new IllegalArgumentException("oldName must not be null"); } if (currentValue == null) { throw new IllegalArgumentException("currentValue must not be null"); } if ...
[ "public", "void", "renamedType", "(", "String", "oldName", ",", "Class", "<", "?", ">", "currentValue", ")", "{", "if", "(", "oldName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"oldName must not be null\"", ")", ";", "}", "i...
Register the fact that a type was renamed. <p> This handles the use case where a class is renamed. @param oldName the old name of the type including the package name, not null @param currentValue the current type, not null
[ "Register", "the", "fact", "that", "a", "type", "was", "renamed", ".", "<p", ">", "This", "handles", "the", "use", "case", "where", "a", "class", "is", "renamed", "." ]
train
https://github.com/JodaOrg/joda-convert/blob/266bd825f4550590d5dafdf4225c548559e0633b/src/main/java/org/joda/convert/RenameHandler.java#L159-L171
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java
SQLTemplates.serialize
public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) { """ template method for SELECT serialization @param metadata @param forCountRow @param context """ context.serializeForQuery(metadata, forCountRow); if (!metadata.getFlags().isEmpty()) { ...
java
public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) { context.serializeForQuery(metadata, forCountRow); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
[ "public", "void", "serialize", "(", "QueryMetadata", "metadata", ",", "boolean", "forCountRow", ",", "SQLSerializer", "context", ")", "{", "context", ".", "serializeForQuery", "(", "metadata", ",", "forCountRow", ")", ";", "if", "(", "!", "metadata", ".", "get...
template method for SELECT serialization @param metadata @param forCountRow @param context
[ "template", "method", "for", "SELECT", "serialization" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/SQLTemplates.java#L854-L860
OpenLiberty/open-liberty
dev/com.ibm.websphere.security/src/com/ibm/wsspi/security/registry/RegistryHelper.java
RegistryHelper.getUserRegistry
public static UserRegistry getUserRegistry(String realmName) throws WSSecurityException { """ Gets the UserRegistry object for the given realm. If the realm name is null returns the active registry. If the realm is not valid, or security is not enabled, or no registry is configured, returns null. @param realm...
java
public static UserRegistry getUserRegistry(String realmName) throws WSSecurityException { try { WSSecurityService ss = wsSecurityServiceRef.getService(); if (ss == null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, ...
[ "public", "static", "UserRegistry", "getUserRegistry", "(", "String", "realmName", ")", "throws", "WSSecurityException", "{", "try", "{", "WSSecurityService", "ss", "=", "wsSecurityServiceRef", ".", "getService", "(", ")", ";", "if", "(", "ss", "==", "null", ")"...
Gets the UserRegistry object for the given realm. If the realm name is null returns the active registry. If the realm is not valid, or security is not enabled, or no registry is configured, returns null. @param realmName @return UserRegistry object @throws WSSecurityException if there is an internal error
[ "Gets", "the", "UserRegistry", "object", "for", "the", "given", "realm", ".", "If", "the", "realm", "name", "is", "null", "returns", "the", "active", "registry", ".", "If", "the", "realm", "is", "not", "valid", "or", "security", "is", "not", "enabled", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/wsspi/security/registry/RegistryHelper.java#L63-L81
revapi/revapi
revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java
CheckBase.visitMethod
@Override public final void visitMethod(@Nullable JavaMethodElement oldMethod, @Nullable JavaMethodElement newMethod) { """ Please override the {@link #doVisitMethod(JavaMethodElement, JavaMethodElement)} instead. @see Check#visitMethod(JavaMethodElement, JavaMethodElement) """ depth++; ...
java
@Override public final void visitMethod(@Nullable JavaMethodElement oldMethod, @Nullable JavaMethodElement newMethod) { depth++; doVisitMethod(oldMethod, newMethod); }
[ "@", "Override", "public", "final", "void", "visitMethod", "(", "@", "Nullable", "JavaMethodElement", "oldMethod", ",", "@", "Nullable", "JavaMethodElement", "newMethod", ")", "{", "depth", "++", ";", "doVisitMethod", "(", "oldMethod", ",", "newMethod", ")", ";"...
Please override the {@link #doVisitMethod(JavaMethodElement, JavaMethodElement)} instead. @see Check#visitMethod(JavaMethodElement, JavaMethodElement)
[ "Please", "override", "the", "{", "@link", "#doVisitMethod", "(", "JavaMethodElement", "JavaMethodElement", ")", "}", "instead", "." ]
train
https://github.com/revapi/revapi/blob/e070b136d977441ab96fdce067a13e7e0423295b/revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java#L270-L274
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java
InvocationDecoder.normalizeUriEscape
private static String normalizeUriEscape(byte []rawUri, int i, int len, String encoding) throws IOException { """ Converts the escaped URI to a string. @param rawUri the escaped URI @param i index into the URI @param len the length of the uri @param encoding the...
java
private static String normalizeUriEscape(byte []rawUri, int i, int len, String encoding) throws IOException { ByteToChar converter = allocateConverter(); // XXX: make this configurable if (encoding == null) { encoding = "utf-8"; } try { ...
[ "private", "static", "String", "normalizeUriEscape", "(", "byte", "[", "]", "rawUri", ",", "int", "i", ",", "int", "len", ",", "String", "encoding", ")", "throws", "IOException", "{", "ByteToChar", "converter", "=", "allocateConverter", "(", ")", ";", "// XX...
Converts the escaped URI to a string. @param rawUri the escaped URI @param i index into the URI @param len the length of the uri @param encoding the character encoding to handle %xx @return the converted URI
[ "Converts", "the", "escaped", "URI", "to", "a", "string", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L310-L345
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/KeyArea.java
KeyArea.addSortParams
public String addSortParams(boolean bIncludeFileName, boolean bForceUniqueKey) { """ Setup the SQL Sort String. @param bIncludeFileName If true, include the filename with the fieldname in the string. @param bForceUniqueKey If params must be unique, if they aren't, add the unique key to the end. @return The SQL ...
java
public String addSortParams(boolean bIncludeFileName, boolean bForceUniqueKey) { String strSort = DBConstants.BLANK; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { ...
[ "public", "String", "addSortParams", "(", "boolean", "bIncludeFileName", ",", "boolean", "bForceUniqueKey", ")", "{", "String", "strSort", "=", "DBConstants", ".", "BLANK", ";", "int", "iKeyFieldCount", "=", "this", ".", "getKeyFields", "(", "bForceUniqueKey", ","...
Setup the SQL Sort String. @param bIncludeFileName If true, include the filename with the fieldname in the string. @param bForceUniqueKey If params must be unique, if they aren't, add the unique key to the end. @return The SQL sort string.
[ "Setup", "the", "SQL", "Sort", "String", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/KeyArea.java#L236-L253
astrapi69/jaulp-wicket
jaulp-wicket-dialogs/src/main/java/de/alpharogroup/wicket/dialogs/ajax/modal/BaseModalPanel.java
BaseModalPanel.newCancelButton
protected AjaxButton newCancelButton(final String id) { """ Factory method for creating the new cancel {@link AjaxButton}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new cancel {@link AjaxButton}. @param id the id @ret...
java
protected AjaxButton newCancelButton(final String id) { final AjaxButton close = new AjaxButton(id) { /** * The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override protected void onError(final AjaxRequestTarget target, ...
[ "protected", "AjaxButton", "newCancelButton", "(", "final", "String", "id", ")", "{", "final", "AjaxButton", "close", "=", "new", "AjaxButton", "(", "id", ")", "{", "/**\r\n\t\t\t * The serialVersionUID.\r\n\t\t\t */", "private", "static", "final", "long", "serialVers...
Factory method for creating the new cancel {@link AjaxButton}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new cancel {@link AjaxButton}. @param id the id @return the new cancel {@link AjaxButton}
[ "Factory", "method", "for", "creating", "the", "new", "cancel", "{", "@link", "AjaxButton", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", ...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-dialogs/src/main/java/de/alpharogroup/wicket/dialogs/ajax/modal/BaseModalPanel.java#L83-L113
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ActivitysInner.java
ActivitysInner.get
public ActivityInner get(String resourceGroupName, String automationAccountName, String moduleName, String activityName) { """ Retrieve the activity in the module identified by module name and activity name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the ...
java
public ActivityInner get(String resourceGroupName, String automationAccountName, String moduleName, String activityName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName, activityName).toBlocking().single().body(); }
[ "public", "ActivityInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "moduleName", ",", "String", "activityName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountNa...
Retrieve the activity in the module identified by module name and activity name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName The name of module. @param activityName The name of activity. @throws IllegalArgumentException th...
[ "Retrieve", "the", "activity", "in", "the", "module", "identified", "by", "module", "name", "and", "activity", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ActivitysInner.java#L86-L88
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/LayoutHelpers.java
LayoutHelpers.calculateAngularWidth
public static float calculateAngularWidth(final float segment, double radius) { """ Calculates the "width", in degrees, of a {@code segment} from a distance of {@code radius} units. This is also referred to as the "angular diameter" or the "visual angle". This is useful in determining the layout of objects in a...
java
public static float calculateAngularWidth(final float segment, double radius) { // The item is perpendicular to the center of the origin at *its* // center, like a "T". The triangle, then, is between the origin, // the item's center, and the "edge" of the item's bounding box. The // leng...
[ "public", "static", "float", "calculateAngularWidth", "(", "final", "float", "segment", ",", "double", "radius", ")", "{", "// The item is perpendicular to the center of the origin at *its*", "// center, like a \"T\". The triangle, then, is between the origin,", "// the item's center, ...
Calculates the "width", in degrees, of a {@code segment} from a distance of {@code radius} units. This is also referred to as the "angular diameter" or the "visual angle". This is useful in determining the layout of objects in a circle or ring. <p> It is assumed that the {@code segment} is oriented perpendicularly to t...
[ "Calculates", "the", "width", "in", "degrees", "of", "a", "{", "@code", "segment", "}", "from", "a", "distance", "of", "{", "@code", "radius", "}", "units", ".", "This", "is", "also", "referred", "to", "as", "the", "angular", "diameter", "or", "the", "...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/LayoutHelpers.java#L34-L49
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/permission/PermissionTemplateService.java
PermissionTemplateService.applyAndCommit
public void applyAndCommit(DbSession dbSession, PermissionTemplateDto template, Collection<ComponentDto> projects) { """ Apply a permission template to a set of projects. Authorization to administrate these projects is not verified. The projects must exist, so the "project creator" permissions defined in the tem...
java
public void applyAndCommit(DbSession dbSession, PermissionTemplateDto template, Collection<ComponentDto> projects) { if (projects.isEmpty()) { return; } for (ComponentDto project : projects) { copyPermissions(dbSession, template, project, null); } projectIndexers.commitAndIndex(dbSessio...
[ "public", "void", "applyAndCommit", "(", "DbSession", "dbSession", ",", "PermissionTemplateDto", "template", ",", "Collection", "<", "ComponentDto", ">", "projects", ")", "{", "if", "(", "projects", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "fo...
Apply a permission template to a set of projects. Authorization to administrate these projects is not verified. The projects must exist, so the "project creator" permissions defined in the template are ignored.
[ "Apply", "a", "permission", "template", "to", "a", "set", "of", "projects", ".", "Authorization", "to", "administrate", "these", "projects", "is", "not", "verified", ".", "The", "projects", "must", "exist", "so", "the", "project", "creator", "permissions", "de...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/permission/PermissionTemplateService.java#L92-L101
aoindustries/aocode-public
src/main/java/com/aoindustries/util/EncodingUtils.java
EncodingUtils.encodeHtml
@Deprecated public static void encodeHtml(CharSequence S, int start, int end, Appendable out) throws IOException { """ Escapes for use in a (X)HTML document and writes to the provided <code>Appendable</code>. In addition to the standard XML Body encoding, it turns newlines into &lt;br /&gt; and spaces to &amp;#1...
java
@Deprecated public static void encodeHtml(CharSequence S, int start, int end, Appendable out) throws IOException { encodeHtml(S, start, end, true, true, out); }
[ "@", "Deprecated", "public", "static", "void", "encodeHtml", "(", "CharSequence", "S", ",", "int", "start", ",", "int", "end", ",", "Appendable", "out", ")", "throws", "IOException", "{", "encodeHtml", "(", "S", ",", "start", ",", "end", ",", "true", ","...
Escapes for use in a (X)HTML document and writes to the provided <code>Appendable</code>. In addition to the standard XML Body encoding, it turns newlines into &lt;br /&gt; and spaces to &amp;#160; @param S the string to be escaped. If S is <code>null</code>, nothing is written. @deprecated the effects of makeBr an...
[ "Escapes", "for", "use", "in", "a", "(", "X", ")", "HTML", "document", "and", "writes", "to", "the", "provided", "<code", ">", "Appendable<", "/", "code", ">", ".", "In", "addition", "to", "the", "standard", "XML", "Body", "encoding", "it", "turns", "n...
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/util/EncodingUtils.java#L112-L115
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java
ChallengeCallbackAPI.registerCallback
public void registerCallback(String challenge, ChallengeCallbackPlugin plugin, HttpMessage attack) { """ Registers a new ZAP API challenge. @param challenge the challenge @param plugin the plugin that will be notified if the challenge is requested @param attack the message that contains the attack that reprod...
java
public void registerCallback(String challenge, ChallengeCallbackPlugin plugin, HttpMessage attack) { // Maybe we'va a lot of dirty entries cleanExpiredCallbacks(); // Already synchronized (no need for a monitor) regCallbacks.put(challenge, new RegisteredCallback(plugin, attack))...
[ "public", "void", "registerCallback", "(", "String", "challenge", ",", "ChallengeCallbackPlugin", "plugin", ",", "HttpMessage", "attack", ")", "{", "// Maybe we'va a lot of dirty entries", "cleanExpiredCallbacks", "(", ")", ";", "// Already synchronized (no need for a monitor)"...
Registers a new ZAP API challenge. @param challenge the challenge @param plugin the plugin that will be notified if the challenge is requested @param attack the message that contains the attack that reproduces the issue
[ "Registers", "a", "new", "ZAP", "API", "challenge", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/ChallengeCallbackAPI.java#L172-L178
irmen/Pyrolite
java/src/main/java/net/razorvine/pickle/Pickler.java
Pickler.dump
public void dump(Object o, OutputStream stream) throws IOException, PickleException { """ Pickle a given object graph, writing the result to the output stream. """ out = stream; recurse = 0; if(useMemo) memo = new HashMap<Integer, Memo>(); out.write(Opcodes.PROTO); out.write(PROTOCOL); save(o); ...
java
public void dump(Object o, OutputStream stream) throws IOException, PickleException { out = stream; recurse = 0; if(useMemo) memo = new HashMap<Integer, Memo>(); out.write(Opcodes.PROTO); out.write(PROTOCOL); save(o); memo = null; // get rid of the memo table out.write(Opcodes.STOP); out.flush(); ...
[ "public", "void", "dump", "(", "Object", "o", ",", "OutputStream", "stream", ")", "throws", "IOException", ",", "PickleException", "{", "out", "=", "stream", ";", "recurse", "=", "0", ";", "if", "(", "useMemo", ")", "memo", "=", "new", "HashMap", "<", ...
Pickle a given object graph, writing the result to the output stream.
[ "Pickle", "a", "given", "object", "graph", "writing", "the", "result", "to", "the", "output", "stream", "." ]
train
https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pickle/Pickler.java#L156-L169
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.canUpload
public void canUpload(String name, long fileSize) { """ Checks if the file can be successfully uploaded by using the preflight check. @param name the name to give the uploaded file. @param fileSize the size of the file used for account capacity calculations. """ URL url = UPLOAD_FILE_URL.build(...
java
public void canUpload(String name, long fileSize) { URL url = UPLOAD_FILE_URL.build(this.getAPI().getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "OPTIONS"); JsonObject parent = new JsonObject(); parent.add("id", this.getID()); JsonObject prefligh...
[ "public", "void", "canUpload", "(", "String", "name", ",", "long", "fileSize", ")", "{", "URL", "url", "=", "UPLOAD_FILE_URL", ".", "build", "(", "this", ".", "getAPI", "(", ")", ".", "getBaseURL", "(", ")", ")", ";", "BoxJSONRequest", "request", "=", ...
Checks if the file can be successfully uploaded by using the preflight check. @param name the name to give the uploaded file. @param fileSize the size of the file used for account capacity calculations.
[ "Checks", "if", "the", "file", "can", "be", "successfully", "uploaded", "by", "using", "the", "preflight", "check", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L427-L443
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.unregisterServiceInstance
public void unregisterServiceInstance(String serviceName, String instanceId) { """ Unregister the ServiceInstance. @param serviceName the service name. @param instanceId the instanceId. """ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.UnregisterServiceInstance...
java
public void unregisterServiceInstance(String serviceName, String instanceId){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.UnregisterServiceInstance); UnregisterServiceInstanceProtocol p = new UnregisterServiceInstanceProtocol(serviceName, instanceId); conne...
[ "public", "void", "unregisterServiceInstance", "(", "String", "serviceName", ",", "String", "instanceId", ")", "{", "ProtocolHeader", "header", "=", "new", "ProtocolHeader", "(", ")", ";", "header", ".", "setType", "(", "ProtocolType", ".", "UnregisterServiceInstanc...
Unregister the ServiceInstance. @param serviceName the service name. @param instanceId the instanceId.
[ "Unregister", "the", "ServiceInstance", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L639-L645
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java
JBBPTextWriter.Obj
public JBBPTextWriter Obj(final int objId, final Object[] array, int off, int len) throws IOException { """ Print objects from array. @param objId object id which will be provided to a converter as extra info @param array array of objects, must not be null @param off offset to the first element to be printe...
java
public JBBPTextWriter Obj(final int objId, final Object[] array, int off, int len) throws IOException { while (len-- > 0) { this.Obj(objId, array[off++]); } return this; }
[ "public", "JBBPTextWriter", "Obj", "(", "final", "int", "objId", ",", "final", "Object", "[", "]", "array", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "while", "(", "len", "--", ">", "0", ")", "{", "this", ".", "Obj", ...
Print objects from array. @param objId object id which will be provided to a converter as extra info @param array array of objects, must not be null @param off offset to the first element to be printed @param len number of elements to be printed @return the context @throws IOException it will be thrown for transpo...
[ "Print", "objects", "from", "array", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java#L1305-L1310
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/util/GraphSerialization.java
GraphSerialization.saveGraph
public static void saveGraph(DirectedGraph<Integer, DefaultEdge> graph, String location) throws IOException { """ Serializes the given {@link DirectedGraph} object to the given location. @param graph Must not be {@code null}. @param location Must not be {@code null} and a valid file path. @throws IOException ...
java
public static void saveGraph(DirectedGraph<Integer, DefaultEdge> graph, String location) throws IOException { File file = new File(location); file.createNewFile(); if (!file.canWrite()) { throw new IOException("Cannot write to file " + location); } GraphSerialization.saveGraph(graph, file); }
[ "public", "static", "void", "saveGraph", "(", "DirectedGraph", "<", "Integer", ",", "DefaultEdge", ">", "graph", ",", "String", "location", ")", "throws", "IOException", "{", "File", "file", "=", "new", "File", "(", "location", ")", ";", "file", ".", "crea...
Serializes the given {@link DirectedGraph} object to the given location. @param graph Must not be {@code null}. @param location Must not be {@code null} and a valid file path. @throws IOException Thrown if errors occurred on the IO level.
[ "Serializes", "the", "given", "{", "@link", "DirectedGraph", "}", "object", "to", "the", "given", "location", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/util/GraphSerialization.java#L52-L59
MenoData/Time4J
base/src/main/java/net/time4j/MachineTime.java
MachineTime.ofSISeconds
public static MachineTime<SI> ofSISeconds(double seconds) { """ /*[deutsch] <p>Erzeugt eine Dauer als Maschinenzeit auf der UTC-Skala. </p> @param seconds decimal SI-seconds @return new machine time duration @throws ArithmeticException in case of numerical overflow @throws IllegalArgumentException ...
java
public static MachineTime<SI> ofSISeconds(double seconds) { if (Double.isInfinite(seconds) || Double.isNaN(seconds)) { throw new IllegalArgumentException("Invalid value: " + seconds); } long secs = (long) Math.floor(seconds); int fraction = (int) ((seconds - secs) * MRD); ...
[ "public", "static", "MachineTime", "<", "SI", ">", "ofSISeconds", "(", "double", "seconds", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "seconds", ")", "||", "Double", ".", "isNaN", "(", "seconds", ")", ")", "{", "throw", "new", "IllegalArgume...
/*[deutsch] <p>Erzeugt eine Dauer als Maschinenzeit auf der UTC-Skala. </p> @param seconds decimal SI-seconds @return new machine time duration @throws ArithmeticException in case of numerical overflow @throws IllegalArgumentException if the argument is infinite or NaN @since 2.0
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "eine", "Dauer", "als", "Maschinenzeit", "auf", "der", "UTC", "-", "Skala", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/MachineTime.java#L388-L398
alkacon/opencms-core
src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java
CmsQueuedTable.filterTable
public void filterTable(String search) { """ Filters the table according to given search string.<p> @param search string to be looked for. """ m_container.removeAllContainerFilters(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(search)) { m_container.addContainerFilter( ...
java
public void filterTable(String search) { m_container.removeAllContainerFilters(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(search)) { m_container.addContainerFilter( new Or( new SimpleStringFilter(PROP_USER, search, true, false), n...
[ "public", "void", "filterTable", "(", "String", "search", ")", "{", "m_container", ".", "removeAllContainerFilters", "(", ")", ";", "if", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "search", ")", ")", "{", "m_container", ".", "addContainerFilter...
Filters the table according to given search string.<p> @param search string to be looked for.
[ "Filters", "the", "table", "according", "to", "given", "search", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java#L437-L447
FINRAOS/DataGenerator
dg-core/src/main/java/org/finra/datagenerator/writer/XmlWriter.java
XmlWriter.getXmlFormatted
public String getXmlFormatted(Map<String, String> dataMap) { """ Given an array of variable names, returns an Xml String of values. @param dataMap an map containing variable names and their corresponding values names. @param dataMap @return values in Xml format """ StringBuilder sb = new String...
java
public String getXmlFormatted(Map<String, String> dataMap) { StringBuilder sb = new StringBuilder(); for (String var : outTemplate) { sb.append(appendXmlStartTag(var)); sb.append(dataMap.get(var)); sb.append(appendXmlEndingTag(var)); } return sb...
[ "public", "String", "getXmlFormatted", "(", "Map", "<", "String", ",", "String", ">", "dataMap", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "var", ":", "outTemplate", ")", "{", "sb", ".", "append", ...
Given an array of variable names, returns an Xml String of values. @param dataMap an map containing variable names and their corresponding values names. @param dataMap @return values in Xml format
[ "Given", "an", "array", "of", "variable", "names", "returns", "an", "Xml", "String", "of", "values", "." ]
train
https://github.com/FINRAOS/DataGenerator/blob/1f69f949401cbed4db4f553c3eb8350832c4d45a/dg-core/src/main/java/org/finra/datagenerator/writer/XmlWriter.java#L91-L99
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/impl/DerivativeLaplacian_Inner_MT.java
DerivativeLaplacian_Inner_MT.process
public static void process(GrayU8 orig, GrayS16 deriv) { """ Computes the Laplacian of input image. @param orig Input image. Not modified. @param deriv Where the Laplacian is written to. Modified. """ final byte[] data = orig.data; final short[] out = deriv.data; final int width = orig.getWidth();...
java
public static void process(GrayU8 orig, GrayS16 deriv) { final byte[] data = orig.data; final short[] out = deriv.data; final int width = orig.getWidth(); final int height = orig.getHeight() - 1; final int stride = orig.stride; BoofConcurrency.loopFor(1,height,y->{ int index = orig.startIndex + stride ...
[ "public", "static", "void", "process", "(", "GrayU8", "orig", ",", "GrayS16", "deriv", ")", "{", "final", "byte", "[", "]", "data", "=", "orig", ".", "data", ";", "final", "short", "[", "]", "out", "=", "deriv", ".", "data", ";", "final", "int", "w...
Computes the Laplacian of input image. @param orig Input image. Not modified. @param deriv Where the Laplacian is written to. Modified.
[ "Computes", "the", "Laplacian", "of", "input", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/impl/DerivativeLaplacian_Inner_MT.java#L41-L65
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointUnionAxiomImpl_CustomFieldSerializer.java
OWLDisjointUnionAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDisjointUnionAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.g...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDisjointUnionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDisjointUnionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointUnionAxiomImpl_CustomFieldSerializer.java#L76-L79
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.relativeLineTo
public SVGPath relativeLineTo(double x, double y) { """ Draw a line to the given relative coordinates. @param x relative coordinates @param y relative coordinates @return path object, for compact syntax. """ return append(PATH_LINE_TO_RELATIVE).append(x).append(y); }
java
public SVGPath relativeLineTo(double x, double y) { return append(PATH_LINE_TO_RELATIVE).append(x).append(y); }
[ "public", "SVGPath", "relativeLineTo", "(", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_LINE_TO_RELATIVE", ")", ".", "append", "(", "x", ")", ".", "append", "(", "y", ")", ";", "}" ]
Draw a line to the given relative coordinates. @param x relative coordinates @param y relative coordinates @return path object, for compact syntax.
[ "Draw", "a", "line", "to", "the", "given", "relative", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L250-L252
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getAllWvWMatchOverview
public AllWvWMatchOverview getAllWvWMatchOverview() throws GuildWars2Exception { """ For more info on v1 wvw matches API go <a href="https://wiki.guildwars2.com/wiki/API:1/wvw/matches">here</a><br/> @return simple wvw matches info @throws GuildWars2Exception see {@link ErrorCode} for detail @see AllWvWMatchOv...
java
public AllWvWMatchOverview getAllWvWMatchOverview() throws GuildWars2Exception { try { Response<AllWvWMatchOverview> response = gw2API.getAllWvWMatchOverview().execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody()); return response.body(); } catch (IOException e) { th...
[ "public", "AllWvWMatchOverview", "getAllWvWMatchOverview", "(", ")", "throws", "GuildWars2Exception", "{", "try", "{", "Response", "<", "AllWvWMatchOverview", ">", "response", "=", "gw2API", ".", "getAllWvWMatchOverview", "(", ")", ".", "execute", "(", ")", ";", "...
For more info on v1 wvw matches API go <a href="https://wiki.guildwars2.com/wiki/API:1/wvw/matches">here</a><br/> @return simple wvw matches info @throws GuildWars2Exception see {@link ErrorCode} for detail @see AllWvWMatchOverview wvw matches
[ "For", "more", "info", "on", "v1", "wvw", "matches", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "1", "/", "wvw", "/", "matches", ">", "here<", "/", "a", ">", "<br", "...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L137-L145
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getEndpointHealthWithServiceResponseAsync
public Observable<ServiceResponse<Page<EndpointHealthDataInner>>> getEndpointHealthWithServiceResponseAsync(final String resourceGroupName, final String iotHubName) { """ Get the health for routing endpoints. Get the health for routing endpoints. @param resourceGroupName the String value @param iotHubName the...
java
public Observable<ServiceResponse<Page<EndpointHealthDataInner>>> getEndpointHealthWithServiceResponseAsync(final String resourceGroupName, final String iotHubName) { return getEndpointHealthSinglePageAsync(resourceGroupName, iotHubName) .concatMap(new Func1<ServiceResponse<Page<EndpointHealthDataIn...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "EndpointHealthDataInner", ">", ">", ">", "getEndpointHealthWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "iotHubName", ")", "{", "return", "getEndpointHe...
Get the health for routing endpoints. Get the health for routing endpoints. @param resourceGroupName the String value @param iotHubName the String value @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;EndpointHealthDataInner&gt; object
[ "Get", "the", "health", "for", "routing", "endpoints", ".", "Get", "the", "health", "for", "routing", "endpoints", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L2492-L2504
UrielCh/ovh-java-sdk
ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java
ApiOvhStore.partner_partnerId_DELETE
public String partner_partnerId_DELETE(String partnerId) throws IOException { """ Delete partner REST: DELETE /store/partner/{partnerId} @param partnerId [required] Id of the object to fetch API beta """ String qPath = "/store/partner/{partnerId}"; StringBuilder sb = path(qPath, partnerId); String...
java
public String partner_partnerId_DELETE(String partnerId) throws IOException { String qPath = "/store/partner/{partnerId}"; StringBuilder sb = path(qPath, partnerId); String resp = exec(qPath, "DELETE", sb.toString(), null); return convertTo(resp, String.class); }
[ "public", "String", "partner_partnerId_DELETE", "(", "String", "partnerId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/store/partner/{partnerId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "partnerId", ")", ";", "String", "r...
Delete partner REST: DELETE /store/partner/{partnerId} @param partnerId [required] Id of the object to fetch API beta
[ "Delete", "partner" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java#L404-L409
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java
CreateIssueParams.notifiedUserIds
public CreateIssueParams notifiedUserIds(List notifiedUserIds) { """ Sets the issue notified users. @param notifiedUserIds notified user identifiers @return CreateIssueParams instance """ for (Object notifiedUserId : notifiedUserIds) { parameters.add(new NameValuePair("notifiedUserId[]"...
java
public CreateIssueParams notifiedUserIds(List notifiedUserIds) { for (Object notifiedUserId : notifiedUserIds) { parameters.add(new NameValuePair("notifiedUserId[]", notifiedUserId.toString())); } return this; }
[ "public", "CreateIssueParams", "notifiedUserIds", "(", "List", "notifiedUserIds", ")", "{", "for", "(", "Object", "notifiedUserId", ":", "notifiedUserIds", ")", "{", "parameters", ".", "add", "(", "new", "NameValuePair", "(", "\"notifiedUserId[]\"", ",", "notifiedUs...
Sets the issue notified users. @param notifiedUserIds notified user identifiers @return CreateIssueParams instance
[ "Sets", "the", "issue", "notified", "users", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java#L187-L193
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/values/IcalParseUtil.java
IcalParseUtil.parsePeriodValue
public static PeriodValue parsePeriodValue(String s, TimeZone tzid) throws ParseException { """ parse a period value of the form &lt;start&gt;/&lt;end&gt;, converting from the given timezone to UTC. This does not yet recognize the &lt;start&gt;/&lt;duration&gt; form. """ int sep = s.index...
java
public static PeriodValue parsePeriodValue(String s, TimeZone tzid) throws ParseException { int sep = s.indexOf('/'); if (sep < 0) { throw new ParseException(s, s.length()); } DateValue start = parseDateValue(s.substring(0, sep), tzid), end = parse...
[ "public", "static", "PeriodValue", "parsePeriodValue", "(", "String", "s", ",", "TimeZone", "tzid", ")", "throws", "ParseException", "{", "int", "sep", "=", "s", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "sep", "<", "0", ")", "{", "throw", ...
parse a period value of the form &lt;start&gt;/&lt;end&gt;, converting from the given timezone to UTC. This does not yet recognize the &lt;start&gt;/&lt;duration&gt; form.
[ "parse", "a", "period", "value", "of", "the", "form", "&lt", ";", "start&gt", ";", "/", "&lt", ";", "end&gt", ";", "converting", "from", "the", "given", "timezone", "to", "UTC", ".", "This", "does", "not", "yet", "recognize", "the", "&lt", ";", "start&...
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/values/IcalParseUtil.java#L90-L106
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/Content.java
Content.getContentObject
private Object getContentObject(Object object, String property) throws TemplateException { """ Return object property value using content getter. By convention accessor name is <code>get</code> concatenated with title case property name. If content has not such method throws content exception. @param object co...
java
private Object getContentObject(Object object, String property) throws TemplateException { String getterName = Strings.getMethodAccessor("get", property); try { Method getter = this.getClass().getDeclaredMethod(getterName, object.getClass()); getter.setAccessible(true); return getter.i...
[ "private", "Object", "getContentObject", "(", "Object", "object", ",", "String", "property", ")", "throws", "TemplateException", "{", "String", "getterName", "=", "Strings", ".", "getMethodAccessor", "(", "\"get\"", ",", "property", ")", ";", "try", "{", "Method...
Return object property value using content getter. By convention accessor name is <code>get</code> concatenated with title case property name. If content has not such method throws content exception. @param object content scope object, @param property the name of property to retrieve. @return property value. @throws T...
[ "Return", "object", "property", "value", "using", "content", "getter", ".", "By", "convention", "accessor", "name", "is", "<code", ">", "get<", "/", "code", ">", "concatenated", "with", "title", "case", "property", "name", ".", "If", "content", "has", "not",...
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/Content.java#L404-L418
lucmoreau/ProvToolbox
prov-interop/src/main/java/org/openprovenance/prov/interop/InteropFramework.java
InteropFramework.readDocument
public Document readDocument(InputStream is, ProvFormat format, String baseuri) { """ Reads a Document from an input stream, using the parser specified by the format argument. @param is an input stream @param format one of the input formats supported by ProvToolbox @param baseuri a base uri for the input stream...
java
public Document readDocument(InputStream is, ProvFormat format, String baseuri) { return readDocument(is, format, pFactory, baseuri); }
[ "public", "Document", "readDocument", "(", "InputStream", "is", ",", "ProvFormat", "format", ",", "String", "baseuri", ")", "{", "return", "readDocument", "(", "is", ",", "format", ",", "pFactory", ",", "baseuri", ")", ";", "}" ]
Reads a Document from an input stream, using the parser specified by the format argument. @param is an input stream @param format one of the input formats supported by ProvToolbox @param baseuri a base uri for the input stream document @return a Document
[ "Reads", "a", "Document", "from", "an", "input", "stream", "using", "the", "parser", "specified", "by", "the", "format", "argument", "." ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-interop/src/main/java/org/openprovenance/prov/interop/InteropFramework.java#L551-L553
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java
AipImageClassify.logoDeleteBySign
public JSONObject logoDeleteBySign(String contSign, HashMap<String, String> options) { """ logo商标识别—删除接口 使用删除接口请先在[控制台](https://console.bce.baidu.com/ai/#/ai/imagerecognition/overview/index)创建应用并申请建库,建库成功后先调用入库接口完成logo图片入库,删除接口用户在已入库的logo图片中删除图片。 @param contSign - 图片签名(和image二选一,image优先级更高) @param options - 可...
java
public JSONObject logoDeleteBySign(String contSign, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("cont_sign", contSign); if (options != null) { request.addBody(options); } request.set...
[ "public", "JSONObject", "logoDeleteBySign", "(", "String", "contSign", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "reques...
logo商标识别—删除接口 使用删除接口请先在[控制台](https://console.bce.baidu.com/ai/#/ai/imagerecognition/overview/index)创建应用并申请建库,建库成功后先调用入库接口完成logo图片入库,删除接口用户在已入库的logo图片中删除图片。 @param contSign - 图片签名(和image二选一,image优先级更高) @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject
[ "logo商标识别—删除接口", "使用删除接口请先在", "[", "控制台", "]", "(", "https", ":", "//", "console", ".", "bce", ".", "baidu", ".", "com", "/", "ai", "/", "#", "/", "ai", "/", "imagerecognition", "/", "overview", "/", "index", ")", "创建应用并申请建库,建库成功后先调用入库接口完成logo图片入库,删除接口用户在已入库...
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java#L311-L322
Alluxio/alluxio
core/common/src/main/java/alluxio/util/network/NettyUtils.java
NettyUtils.getChannelType
private static ChannelType getChannelType(PropertyKey key, AlluxioConfiguration conf) { """ Get the proper channel type. Always returns {@link ChannelType} NIO if EPOLL is not available. @param key the property key for looking up the configured channel type @return the channel type to use """ if (!isNe...
java
private static ChannelType getChannelType(PropertyKey key, AlluxioConfiguration conf) { if (!isNettyEpollAvailable()) { return ChannelType.NIO; } return conf.getEnum(key, ChannelType.class); }
[ "private", "static", "ChannelType", "getChannelType", "(", "PropertyKey", "key", ",", "AlluxioConfiguration", "conf", ")", "{", "if", "(", "!", "isNettyEpollAvailable", "(", ")", ")", "{", "return", "ChannelType", ".", "NIO", ";", "}", "return", "conf", ".", ...
Get the proper channel type. Always returns {@link ChannelType} NIO if EPOLL is not available. @param key the property key for looking up the configured channel type @return the channel type to use
[ "Get", "the", "proper", "channel", "type", ".", "Always", "returns", "{", "@link", "ChannelType", "}", "NIO", "if", "EPOLL", "is", "not", "available", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/network/NettyUtils.java#L220-L225
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java
CommerceWarehousePersistenceImpl.findAll
@Override public List<CommerceWarehouse> findAll() { """ Returns all the commerce warehouses. @return the commerce warehouses """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceWarehouse> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceWarehouse", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce warehouses. @return the commerce warehouses
[ "Returns", "all", "the", "commerce", "warehouses", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java#L5397-L5400
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/processor/CommentProcessorRegistry.java
CommentProcessorRegistry.runProcessorsOnParagraphComment
private <T> void runProcessorsOnParagraphComment(final WordprocessingMLPackage document, final Map<BigInteger, CommentWrapper> comments, ProxyBuilder<T> proxyBuilder, ParagraphCoordinates paragraphCoordinates) { ""...
java
private <T> void runProcessorsOnParagraphComment(final WordprocessingMLPackage document, final Map<BigInteger, CommentWrapper> comments, ProxyBuilder<T> proxyBuilder, ParagraphCoordinates paragraphCoordinates) { Co...
[ "private", "<", "T", ">", "void", "runProcessorsOnParagraphComment", "(", "final", "WordprocessingMLPackage", "document", ",", "final", "Map", "<", "BigInteger", ",", "CommentWrapper", ">", "comments", ",", "ProxyBuilder", "<", "T", ">", "proxyBuilder", ",", "Para...
Takes the first comment on the specified paragraph and tries to evaluate the string within the comment against all registered {@link ICommentProcessor}s. @param document the word document. @param comments the comments within the document. @param proxyBuilder a builder for a proxy aroun...
[ "Takes", "the", "first", "comment", "on", "the", "specified", "paragraph", "and", "tries", "to", "evaluate", "the", "string", "within", "the", "comment", "against", "all", "registered", "{", "@link", "ICommentProcessor", "}", "s", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/processor/CommentProcessorRegistry.java#L162-L202
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphExtractSubgraphByEdge
public static int nvgraphExtractSubgraphByEdge( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subedges, long numedges) { """ create a new graph by extracting a subgraph given a list of edges """ return checkResult(nvgrap...
java
public static int nvgraphExtractSubgraphByEdge( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subedges, long numedges) { return checkResult(nvgraphExtractSubgraphByEdgeNative(handle, descrG, subdescrG, subedges, numedges)); ...
[ "public", "static", "int", "nvgraphExtractSubgraphByEdge", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "nvgraphGraphDescr", "subdescrG", ",", "Pointer", "subedges", ",", "long", "numedges", ")", "{", "return", "checkResult", "(", "nvgraphE...
create a new graph by extracting a subgraph given a list of edges
[ "create", "a", "new", "graph", "by", "extracting", "a", "subgraph", "given", "a", "list", "of", "edges" ]
train
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L402-L410
looly/hulu
src/main/java/com/xiaoleilu/hulu/Response.java
Response.addCookie
public final static void addCookie(String name, String value, int maxAgeInSeconds) { """ 设定返回给客户端的Cookie<br> Path: "/"<br> No Domain @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. n>0 : Cookie存在的秒数. """ addCookie(name, value, maxAgeInSeconds, "/", nu...
java
public final static void addCookie(String name, String value, int maxAgeInSeconds) { addCookie(name, value, maxAgeInSeconds, "/", null); }
[ "public", "final", "static", "void", "addCookie", "(", "String", "name", ",", "String", "value", ",", "int", "maxAgeInSeconds", ")", "{", "addCookie", "(", "name", ",", "value", ",", "maxAgeInSeconds", ",", "\"/\"", ",", "null", ")", ";", "}" ]
设定返回给客户端的Cookie<br> Path: "/"<br> No Domain @param name cookie名 @param value cookie值 @param maxAgeInSeconds -1: 关闭浏览器清除Cookie. 0: 立即清除Cookie. n>0 : Cookie存在的秒数.
[ "设定返回给客户端的Cookie<br", ">", "Path", ":", "/", "<br", ">", "No", "Domain" ]
train
https://github.com/looly/hulu/blob/4072de684e2e2f28ac8a3a44c0d5a690b289ef28/src/main/java/com/xiaoleilu/hulu/Response.java#L226-L228
VoltDB/voltdb
src/frontend/org/voltdb/DRConsumerDrIdTracker.java
DRConsumerDrIdTracker.addRange
public void addRange(long startDrId, long endDrId, long spUniqueId, long mpUniqueId) { """ Add a range to the tracker. @param startDrId @param endDrId @param spUniqueId @param mpUniqueId """ // Note that any given range or tracker could have either sp or mp sentinel values m_lastSpUniqueId ...
java
public void addRange(long startDrId, long endDrId, long spUniqueId, long mpUniqueId) { // Note that any given range or tracker could have either sp or mp sentinel values m_lastSpUniqueId = Math.max(m_lastSpUniqueId, spUniqueId); m_lastMpUniqueId = Math.max(m_lastMpUniqueId, mpUniqueId); ...
[ "public", "void", "addRange", "(", "long", "startDrId", ",", "long", "endDrId", ",", "long", "spUniqueId", ",", "long", "mpUniqueId", ")", "{", "// Note that any given range or tracker could have either sp or mp sentinel values", "m_lastSpUniqueId", "=", "Math", ".", "max...
Add a range to the tracker. @param startDrId @param endDrId @param spUniqueId @param mpUniqueId
[ "Add", "a", "range", "to", "the", "tracker", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/DRConsumerDrIdTracker.java#L313-L318
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/handlers/FileStatusHostStatusHandler.java
FileStatusHostStatusHandler.taskHostStatus
private void taskHostStatus(RESTRequest request, RESTResponse response) { """ Returns a JSON array of CommandResult serialization, representing the steps taken in that host [ { "timestamp" : String, "status" : String, "description" : String, "returnCode" : int, "StdOut" : String, "StdErr" : String }* ]...
java
private void taskHostStatus(RESTRequest request, RESTResponse response) { String taskID = RESTHelper.getRequiredParam(request, APIConstants.PARAM_TASK_ID); String host = RESTHelper.getRequiredParam(request, APIConstants.PARAM_HOST); String taskHostStatusJson = getMultipleRoutingHelper().getHost...
[ "private", "void", "taskHostStatus", "(", "RESTRequest", "request", ",", "RESTResponse", "response", ")", "{", "String", "taskID", "=", "RESTHelper", ".", "getRequiredParam", "(", "request", ",", "APIConstants", ".", "PARAM_TASK_ID", ")", ";", "String", "host", ...
Returns a JSON array of CommandResult serialization, representing the steps taken in that host [ { "timestamp" : String, "status" : String, "description" : String, "returnCode" : int, "StdOut" : String, "StdErr" : String }* ]
[ "Returns", "a", "JSON", "array", "of", "CommandResult", "serialization", "representing", "the", "steps", "taken", "in", "that", "host" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/handlers/FileStatusHostStatusHandler.java#L110-L116
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.extractColumn
public static void extractColumn(DMatrixRMaj P, int col, GeoTuple3D_F64 a) { """ Extracts a column from the camera matrix and puts it into the geometric 3-tuple. """ a.x = P.unsafe_get(0,col); a.y = P.unsafe_get(1,col); a.z = P.unsafe_get(2,col); }
java
public static void extractColumn(DMatrixRMaj P, int col, GeoTuple3D_F64 a) { a.x = P.unsafe_get(0,col); a.y = P.unsafe_get(1,col); a.z = P.unsafe_get(2,col); }
[ "public", "static", "void", "extractColumn", "(", "DMatrixRMaj", "P", ",", "int", "col", ",", "GeoTuple3D_F64", "a", ")", "{", "a", ".", "x", "=", "P", ".", "unsafe_get", "(", "0", ",", "col", ")", ";", "a", ".", "y", "=", "P", ".", "unsafe_get", ...
Extracts a column from the camera matrix and puts it into the geometric 3-tuple.
[ "Extracts", "a", "column", "from", "the", "camera", "matrix", "and", "puts", "it", "into", "the", "geometric", "3", "-", "tuple", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L766-L770
spockframework/spock
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java
GroovyRuntimeUtil.getterMethodToPropertyName
@Nullable public static String getterMethodToPropertyName(String methodName, List<Class<?>> parameterTypes, Class<?> returnType) { """ Checks if the given method is a getter method according to Groovy rules. If yes, the corresponding property name is returned. Otherwise, null is returned. This method differs ...
java
@Nullable public static String getterMethodToPropertyName(String methodName, List<Class<?>> parameterTypes, Class<?> returnType) { if (!parameterTypes.isEmpty()) return null; if (returnType == void.class) return null; // Void.class is allowed if (methodName.startsWith("get")) return getPropertyName...
[ "@", "Nullable", "public", "static", "String", "getterMethodToPropertyName", "(", "String", "methodName", ",", "List", "<", "Class", "<", "?", ">", ">", "parameterTypes", ",", "Class", "<", "?", ">", "returnType", ")", "{", "if", "(", "!", "parameterTypes", ...
Checks if the given method is a getter method according to Groovy rules. If yes, the corresponding property name is returned. Otherwise, null is returned. This method differs from Groovy 1.6.8 in that the latter doesn't support the "is" prefix for static boolean properties; however, that seems more like a bug. See http...
[ "Checks", "if", "the", "given", "method", "is", "a", "getter", "method", "according", "to", "Groovy", "rules", ".", "If", "yes", "the", "corresponding", "property", "name", "is", "returned", ".", "Otherwise", "null", "is", "returned", ".", "This", "method", ...
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java#L110-L123
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_configurations_optin_PUT
public ArrayList<net.minidev.ovh.api.domain.configurations.OvhOptin> serviceName_configurations_optin_PUT(String serviceName, net.minidev.ovh.api.domain.configurations.OvhOptin[] optin) throws IOException { """ Save a new optin configuration REST: PUT /domain/{serviceName}/configurations/optin @param optin [re...
java
public ArrayList<net.minidev.ovh.api.domain.configurations.OvhOptin> serviceName_configurations_optin_PUT(String serviceName, net.minidev.ovh.api.domain.configurations.OvhOptin[] optin) throws IOException { String qPath = "/domain/{serviceName}/configurations/optin"; StringBuilder sb = path(qPath, serviceName); H...
[ "public", "ArrayList", "<", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "domain", ".", "configurations", ".", "OvhOptin", ">", "serviceName_configurations_optin_PUT", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", "...
Save a new optin configuration REST: PUT /domain/{serviceName}/configurations/optin @param optin [required] New configuration about optin @param serviceName [required] The internal name of your domain
[ "Save", "a", "new", "optin", "configuration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1561-L1568
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AccountFiltersInner.java
AccountFiltersInner.updateAsync
public Observable<AccountFilterInner> updateAsync(String resourceGroupName, String accountName, String filterName, AccountFilterInner parameters) { """ Update an Account Filter. Updates an existing Account Filter in the Media Services account. @param resourceGroupName The name of the resource group within the ...
java
public Observable<AccountFilterInner> updateAsync(String resourceGroupName, String accountName, String filterName, AccountFilterInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, filterName, parameters).map(new Func1<ServiceResponse<AccountFilterInner>, AccountFilterInner>...
[ "public", "Observable", "<", "AccountFilterInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "filterName", ",", "AccountFilterInner", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "res...
Update an Account Filter. Updates an existing Account Filter in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param filterName The Account Filter name @param parameters The request parameters @thro...
[ "Update", "an", "Account", "Filter", ".", "Updates", "an", "existing", "Account", "Filter", "in", "the", "Media", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AccountFiltersInner.java#L564-L571
JetBrains/xodus
vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java
VirtualFileSystem.writeFile
public OutputStream writeFile(@NotNull final Transaction txn, final long fileDescriptor) { """ Returns {@linkplain OutputStream} to write the contents of the specified file from the beginning. Writing to the returned stream doesn't change the {@linkplain File}'s last modified time. @param txn {@link...
java
public OutputStream writeFile(@NotNull final Transaction txn, final long fileDescriptor) { return new VfsOutputStream(this, txn, fileDescriptor, null); }
[ "public", "OutputStream", "writeFile", "(", "@", "NotNull", "final", "Transaction", "txn", ",", "final", "long", "fileDescriptor", ")", "{", "return", "new", "VfsOutputStream", "(", "this", ",", "txn", ",", "fileDescriptor", ",", "null", ")", ";", "}" ]
Returns {@linkplain OutputStream} to write the contents of the specified file from the beginning. Writing to the returned stream doesn't change the {@linkplain File}'s last modified time. @param txn {@linkplain Transaction} instance @param fileDescriptor file descriptor @return {@linkplain OutputStream} to ...
[ "Returns", "{", "@linkplain", "OutputStream", "}", "to", "write", "the", "contents", "of", "the", "specified", "file", "from", "the", "beginning", ".", "Writing", "to", "the", "returned", "stream", "doesn", "t", "change", "the", "{", "@linkplain", "File", "}...
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java#L540-L542
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/props/WarningPropertySet.java
WarningPropertySet.checkProperty
public boolean checkProperty(T prop, Object value) { """ Check whether or not the given WarningProperty has the given attribute value. @param prop the WarningProperty @param value the attribute value @return true if the set contains the WarningProperty and has an attribute equal to the one given, false ot...
java
public boolean checkProperty(T prop, Object value) { Object attribute = getProperty(prop); return (attribute != null && attribute.equals(value)); }
[ "public", "boolean", "checkProperty", "(", "T", "prop", ",", "Object", "value", ")", "{", "Object", "attribute", "=", "getProperty", "(", "prop", ")", ";", "return", "(", "attribute", "!=", "null", "&&", "attribute", ".", "equals", "(", "value", ")", ")"...
Check whether or not the given WarningProperty has the given attribute value. @param prop the WarningProperty @param value the attribute value @return true if the set contains the WarningProperty and has an attribute equal to the one given, false otherwise
[ "Check", "whether", "or", "not", "the", "given", "WarningProperty", "has", "the", "given", "attribute", "value", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/props/WarningPropertySet.java#L149-L152
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.reactivateAsync
public Observable<Void> reactivateAsync(String jobId, String taskId) { """ Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer ...
java
public Observable<Void> reactivateAsync(String jobId, String taskId) { return reactivateWithServiceResponseAsync(jobId, taskId).map(new Func1<ServiceResponseWithHeaders<Void, TaskReactivateHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, TaskReactivateHeade...
[ "public", "Observable", "<", "Void", ">", "reactivateAsync", "(", "String", "jobId", ",", "String", "taskId", ")", "{", "return", "reactivateWithServiceResponseAsync", "(", "jobId", ",", "taskId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponseWithHe...
Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longe...
[ "Reactivates", "a", "task", "allowing", "it", "to", "run", "again", "even", "if", "its", "retry", "count", "has", "been", "exhausted", ".", "Reactivation", "makes", "a", "task", "eligible", "to", "be", "retried", "again", "up", "to", "its", "maximum", "ret...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L2107-L2114
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/Dater.java
Dater.of
public static Dater of(String date, DateStyle dateStyle) { """ Returns a new Dater instance with the given date and date style @param date @return """ return from(date).with(dateStyle); }
java
public static Dater of(String date, DateStyle dateStyle) { return from(date).with(dateStyle); }
[ "public", "static", "Dater", "of", "(", "String", "date", ",", "DateStyle", "dateStyle", ")", "{", "return", "from", "(", "date", ")", ".", "with", "(", "dateStyle", ")", ";", "}" ]
Returns a new Dater instance with the given date and date style @param date @return
[ "Returns", "a", "new", "Dater", "instance", "with", "the", "given", "date", "and", "date", "style" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/Dater.java#L234-L236
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkNotNull
public static void checkNotNull(Object object, String errorMessage) { """ This method checks if the object is null or empty. @param object input of type {@link Object} @param errorMessage The exception message use if the object is empty or null @throws com.netflix.conductor.core.execution.ApplicationExceptio...
java
public static void checkNotNull(Object object, String errorMessage){ try { Preconditions.checkNotNull(object, errorMessage); } catch (NullPointerException exception) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
[ "public", "static", "void", "checkNotNull", "(", "Object", "object", ",", "String", "errorMessage", ")", "{", "try", "{", "Preconditions", ".", "checkNotNull", "(", "object", ",", "errorMessage", ")", ";", "}", "catch", "(", "NullPointerException", "exception", ...
This method checks if the object is null or empty. @param object input of type {@link Object} @param errorMessage The exception message use if the object is empty or null @throws com.netflix.conductor.core.execution.ApplicationException if input object is not valid
[ "This", "method", "checks", "if", "the", "object", "is", "null", "or", "empty", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L102-L108
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/provisioning/UsersApi.java
UsersApi.addUser
public Person addUser(User user) throws ProvisioningApiException { """ Creates a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the given attributes. @param user The user to be created. (required) @throws ProvisioningApiException if the call is unsuccessful. ...
java
public Person addUser(User user) throws ProvisioningApiException { try { CreateUserSuccessResponse resp = usersApi.addUser(new AddUserData().data(Converters.convertUserToAddUserDataData(user))); if (!resp.getStatus().getCode().equals(0)) { throw new ProvisioningApiException("Error adding user. Code: "...
[ "public", "Person", "addUser", "(", "User", "user", ")", "throws", "ProvisioningApiException", "{", "try", "{", "CreateUserSuccessResponse", "resp", "=", "usersApi", ".", "addUser", "(", "new", "AddUserData", "(", ")", ".", "data", "(", "Converters", ".", "con...
Creates a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the given attributes. @param user The user to be created. (required) @throws ProvisioningApiException if the call is unsuccessful. @return Person a Person object with info on the user created.
[ "Creates", "a", "user", "(", "[", "CfgPerson", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", "/", "Documentation", "/", "PSDK", "/", "latest", "/", "ConfigLayerRef", "/", "CfgPerson", "))", "with", "the", "given", "attributes", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/UsersApi.java#L33-L45
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/LoadedFieldSet.java
LoadedFieldSet.addLoad
public void addLoad(InstructionHandle handle, XField field) { """ Add a load of given field at given instruction. @param handle the instruction @param field the field """ getLoadStoreCount(field).loadCount++; handleToFieldMap.put(handle, field); loadHandleSet.set(handle.getPositio...
java
public void addLoad(InstructionHandle handle, XField field) { getLoadStoreCount(field).loadCount++; handleToFieldMap.put(handle, field); loadHandleSet.set(handle.getPosition()); }
[ "public", "void", "addLoad", "(", "InstructionHandle", "handle", ",", "XField", "field", ")", "{", "getLoadStoreCount", "(", "field", ")", ".", "loadCount", "++", ";", "handleToFieldMap", ".", "put", "(", "handle", ",", "field", ")", ";", "loadHandleSet", "....
Add a load of given field at given instruction. @param handle the instruction @param field the field
[ "Add", "a", "load", "of", "given", "field", "at", "given", "instruction", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/LoadedFieldSet.java#L104-L108
jbundle/jbundle
base/db/mapped/src/main/java/org/jbundle/base/db/mapped/ZDatabase.java
ZDatabase.makeNewPTable
public PTable makeNewPTable(FieldList record, Object key) { """ Create a raw data table for this table. @param table The table to create a raw data table for. @param key The lookup key that will be passed (on initialization) to the new raw data table. @return The new raw data table. """ ZTable xTabl...
java
public PTable makeNewPTable(FieldList record, Object key) { ZTable xTable = new ZTable(this, record, key); // New empty table return xTable; }
[ "public", "PTable", "makeNewPTable", "(", "FieldList", "record", ",", "Object", "key", ")", "{", "ZTable", "xTable", "=", "new", "ZTable", "(", "this", ",", "record", ",", "key", ")", ";", "// New empty table", "return", "xTable", ";", "}" ]
Create a raw data table for this table. @param table The table to create a raw data table for. @param key The lookup key that will be passed (on initialization) to the new raw data table. @return The new raw data table.
[ "Create", "a", "raw", "data", "table", "for", "this", "table", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/mapped/src/main/java/org/jbundle/base/db/mapped/ZDatabase.java#L51-L55
lodborg/interval-tree
src/main/java/com/lodborg/intervaltree/Interval.java
Interval.isLeftOf
public boolean isLeftOf(Interval<T> other) { """ This method checks, if this current interval is entirely to the left of another interval with no common points. More formally, the method will return true, if for every point {@code x} from the current interval and for every point {@code y} from the {@code other} ...
java
public boolean isLeftOf(Interval<T> other){ if (other == null || other.isEmpty()) return false; return isLeftOf(other.start, other.isStartInclusive()); }
[ "public", "boolean", "isLeftOf", "(", "Interval", "<", "T", ">", "other", ")", "{", "if", "(", "other", "==", "null", "||", "other", ".", "isEmpty", "(", ")", ")", "return", "false", ";", "return", "isLeftOf", "(", "other", ".", "start", ",", "other"...
This method checks, if this current interval is entirely to the left of another interval with no common points. More formally, the method will return true, if for every point {@code x} from the current interval and for every point {@code y} from the {@code other} interval the inequality {@code x} &lt; {@code y} holds. ...
[ "This", "method", "checks", "if", "this", "current", "interval", "is", "entirely", "to", "the", "left", "of", "another", "interval", "with", "no", "common", "points", ".", "More", "formally", "the", "method", "will", "return", "true", "if", "for", "every", ...
train
https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L470-L474