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
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetMethodResponseResult.java
GetMethodResponseResult.withResponseModels
public GetMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { """ <p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> @p...
java
public GetMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { setResponseModels(responseModels); return this; }
[ "public", "GetMethodResponseResult", "withResponseModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseModels", ")", "{", "setResponseModels", "(", "responseModels", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> @param responseModels Specifies the <a>Model</a> resources used for the response's content-type. Response models a...
[ "<p", ">", "Specifies", "the", "<a", ">", "Model<", "/", "a", ">", "resources", "used", "for", "the", "response", "s", "content", "-", "type", ".", "Response", "models", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetMethodResponseResult.java#L278-L281
alkacon/opencms-core
src/org/opencms/widgets/A_CmsHtmlWidget.java
A_CmsHtmlWidget.buildOpenCmsButtonRow
protected String buildOpenCmsButtonRow(int segment, I_CmsWidgetDialog widgetDialog) { """ Returns the start or end HTML for the OpenCms specific button row.<p> Use this method to generate the start and end html for the button row.<p> Overwrite the method if the integrated editor needs a specific layout for t...
java
protected String buildOpenCmsButtonRow(int segment, I_CmsWidgetDialog widgetDialog) { StringBuffer result = new StringBuffer(256); if (segment == CmsWorkplace.HTML_START) { // generate line and start row HTML result.append(widgetDialog.buttonBarHorizontalLine()); re...
[ "protected", "String", "buildOpenCmsButtonRow", "(", "int", "segment", ",", "I_CmsWidgetDialog", "widgetDialog", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "256", ")", ";", "if", "(", "segment", "==", "CmsWorkplace", ".", "HTML_START", ...
Returns the start or end HTML for the OpenCms specific button row.<p> Use this method to generate the start and end html for the button row.<p> Overwrite the method if the integrated editor needs a specific layout for the button row start or end html.<p> @param segment the HTML segment (START / END) @param widgetDia...
[ "Returns", "the", "start", "or", "end", "HTML", "for", "the", "OpenCms", "specific", "button", "row", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/A_CmsHtmlWidget.java#L215-L231
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/buffer/factory/CudaDataBufferFactory.java
CudaDataBufferFactory.createHalf
@Override public DataBuffer createHalf(long offset, byte[] data, boolean copy) { """ Creates a half-precision data buffer @param offset @param data the data to create the buffer from @param copy @return the new buffer """ return new CudaHalfDataBuffer(ArrayUtil.toFloatArray(data), copy, off...
java
@Override public DataBuffer createHalf(long offset, byte[] data, boolean copy) { return new CudaHalfDataBuffer(ArrayUtil.toFloatArray(data), copy, offset); }
[ "@", "Override", "public", "DataBuffer", "createHalf", "(", "long", "offset", ",", "byte", "[", "]", "data", ",", "boolean", "copy", ")", "{", "return", "new", "CudaHalfDataBuffer", "(", "ArrayUtil", ".", "toFloatArray", "(", "data", ")", ",", "copy", ",",...
Creates a half-precision data buffer @param offset @param data the data to create the buffer from @param copy @return the new buffer
[ "Creates", "a", "half", "-", "precision", "data", "buffer" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/buffer/factory/CudaDataBufferFactory.java#L717-L720
banq/jdonframework
src/main/java/com/jdon/container/pico/JdonPicoContainer.java
JdonPicoContainer.registerComponentImplementation
public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException { """ {@inheritDoc} The returned ComponentAdapter will be instantiated by the {@link ComponentAdapterFactory} passed to the container's construct...
java
public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException { ComponentAdapter componentAdapter = componentAdapterFactory.createComponentAdapter(componentKey, componentImplementation, parameters); register...
[ "public", "ComponentAdapter", "registerComponentImplementation", "(", "Object", "componentKey", ",", "Class", "componentImplementation", ",", "Parameter", "[", "]", "parameters", ")", "throws", "PicoRegistrationException", "{", "ComponentAdapter", "componentAdapter", "=", "...
{@inheritDoc} The returned ComponentAdapter will be instantiated by the {@link ComponentAdapterFactory} passed to the container's constructor.
[ "{" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/pico/JdonPicoContainer.java#L266-L271
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java
ProcessUtil.invokeProcess
public static int invokeProcess(String[] commandLine, Reader input, Consumer<String> consumer) throws IOException, InterruptedException { """ Runs the given set of command line arguments as a system process and returns the exit value of the spawned process. Additionally allows to supply an input strea...
java
public static int invokeProcess(String[] commandLine, Reader input, Consumer<String> consumer) throws IOException, InterruptedException { return invokeProcess(commandLine, input, new DelegatingConsumer(consumer)); }
[ "public", "static", "int", "invokeProcess", "(", "String", "[", "]", "commandLine", ",", "Reader", "input", ",", "Consumer", "<", "String", ">", "consumer", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "invokeProcess", "(", "commandL...
Runs the given set of command line arguments as a system process and returns the exit value of the spawned process. Additionally allows to supply an input stream to the invoked program. Outputs of the process (both normal and error) are passed to the {@code consumer}. @param commandLine the list of command line argume...
[ "Runs", "the", "given", "set", "of", "command", "line", "arguments", "as", "a", "system", "process", "and", "returns", "the", "exit", "value", "of", "the", "spawned", "process", ".", "Additionally", "allows", "to", "supply", "an", "input", "stream", "to", ...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java#L122-L125
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/internal/util/VelocityParser.java
VelocityParser.getVar
public int getVar(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) throws InvalidVelocityException { """ Get any valid Velocity starting with a <code>$</code>. @param array the source to parse @param currentIndex the current index in the <code>array</code> @pa...
java
public int getVar(char[] array, int currentIndex, StringBuffer velocityBlock, VelocityParserContext context) throws InvalidVelocityException { return getVar(array, currentIndex, null, velocityBlock, context); }
[ "public", "int", "getVar", "(", "char", "[", "]", "array", ",", "int", "currentIndex", ",", "StringBuffer", "velocityBlock", ",", "VelocityParserContext", "context", ")", "throws", "InvalidVelocityException", "{", "return", "getVar", "(", "array", ",", "currentInd...
Get any valid Velocity starting with a <code>$</code>. @param array the source to parse @param currentIndex the current index in the <code>array</code> @param velocityBlock the buffer where to append matched velocity block @param context the parser context to put some informations @return the index in the <code>array<...
[ "Get", "any", "valid", "Velocity", "starting", "with", "a", "<code", ">", "$<", "/", "code", ">", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/internal/util/VelocityParser.java#L356-L360
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.asFloat
public static float asFloat(Object value, float nullValue) { """ Return the value converted to a float or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value t...
java
public static float asFloat(Object value, float nullValue) { value=convert(Float.class,value); if (value!=null) { return ((Float)value).floatValue(); } else { return nullValue; } }
[ "public", "static", "float", "asFloat", "(", "Object", "value", ",", "float", "nullValue", ")", "{", "value", "=", "convert", "(", "Float", ".", "class", ",", "value", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "(", "(", "Float",...
Return the value converted to a float or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value to be converted @param nullValue The value to be returned if {@link value} is...
[ "Return", "the", "value", "converted", "to", "a", "float", "or", "the", "specified", "alternate", "value", "if", "the", "original", "value", "is", "null", ".", "Note", "this", "method", "still", "throws", "{", "@link", "IllegalArgumentException", "}", "if", ...
train
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L597-L605
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/upload/impl/CmsUploaderDefault.java
CmsUploaderDefault.addHiddenField
private void addHiddenField(Panel form, String fieldName, String fieldValue) { """ Creates a hidden input field with the given name and value and adds it to the form panel.<p> @param form the form panel @param fieldName the field name @param fieldValue the field value """ Hidden inputField = ne...
java
private void addHiddenField(Panel form, String fieldName, String fieldValue) { Hidden inputField = new Hidden(); inputField.setName(fieldName); inputField.setValue(fieldValue); form.add(inputField); }
[ "private", "void", "addHiddenField", "(", "Panel", "form", ",", "String", "fieldName", ",", "String", "fieldValue", ")", "{", "Hidden", "inputField", "=", "new", "Hidden", "(", ")", ";", "inputField", ".", "setName", "(", "fieldName", ")", ";", "inputField",...
Creates a hidden input field with the given name and value and adds it to the form panel.<p> @param form the form panel @param fieldName the field name @param fieldValue the field value
[ "Creates", "a", "hidden", "input", "field", "with", "the", "given", "name", "and", "value", "and", "adds", "it", "to", "the", "form", "panel", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/upload/impl/CmsUploaderDefault.java#L111-L117
GerdHolz/TOVAL
src/de/invation/code/toval/types/DynamicMatrix.java
DynamicMatrix.getValueAsString
public String getValueAsString(E row, E col, boolean withHeading) { """ Returns a String representation of the matrix entry specified by the given row and col keys (Matrix[row,col]). @param row Row-value of indexing type @param col Col-value of indexing type @return String representation of the value at matrix ...
java
public String getValueAsString(E row, E col, boolean withHeading) { if(withHeading) return String.format(valueFormatWithHeading, row, col, getValue(row, col)); // return String.format(valueFormat, row, col, getValue(row, col)); return String.format(valueFormat, getValue(row, col)); }
[ "public", "String", "getValueAsString", "(", "E", "row", ",", "E", "col", ",", "boolean", "withHeading", ")", "{", "if", "(", "withHeading", ")", "return", "String", ".", "format", "(", "valueFormatWithHeading", ",", "row", ",", "col", ",", "getValue", "("...
Returns a String representation of the matrix entry specified by the given row and col keys (Matrix[row,col]). @param row Row-value of indexing type @param col Col-value of indexing type @return String representation of the value at matrix position [row,col] @see #valueFormat @see #getValue(Object, Object)
[ "Returns", "a", "String", "representation", "of", "the", "matrix", "entry", "specified", "by", "the", "given", "row", "and", "col", "keys", "(", "Matrix", "[", "row", "col", "]", ")", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/types/DynamicMatrix.java#L84-L89
trello/RxLifecycle
rxlifecycle-android/src/main/java/com/trello/rxlifecycle3/android/RxLifecycleAndroid.java
RxLifecycleAndroid.bindFragment
@NonNull @CheckResult public static <T> LifecycleTransformer<T> bindFragment(@NonNull final Observable<FragmentEvent> lifecycle) { """ Binds the given source to a Fragment lifecycle. <p> This helper automatically determines (based on the lifecycle sequence itself) when the source should stop emitting it...
java
@NonNull @CheckResult public static <T> LifecycleTransformer<T> bindFragment(@NonNull final Observable<FragmentEvent> lifecycle) { return bind(lifecycle, FRAGMENT_LIFECYCLE); }
[ "@", "NonNull", "@", "CheckResult", "public", "static", "<", "T", ">", "LifecycleTransformer", "<", "T", ">", "bindFragment", "(", "@", "NonNull", "final", "Observable", "<", "FragmentEvent", ">", "lifecycle", ")", "{", "return", "bind", "(", "lifecycle", ",...
Binds the given source to a Fragment lifecycle. <p> This helper automatically determines (based on the lifecycle sequence itself) when the source should stop emitting items. In the case that the lifecycle sequence is in the creation phase (CREATE, START, etc) it will choose the equivalent destructive phase (DESTROY, ST...
[ "Binds", "the", "given", "source", "to", "a", "Fragment", "lifecycle", ".", "<p", ">", "This", "helper", "automatically", "determines", "(", "based", "on", "the", "lifecycle", "sequence", "itself", ")", "when", "the", "source", "should", "stop", "emitting", ...
train
https://github.com/trello/RxLifecycle/blob/b0a9eb54867f0d72b9614d24091c59dfd4b2d5c1/rxlifecycle-android/src/main/java/com/trello/rxlifecycle3/android/RxLifecycleAndroid.java#L72-L76
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/io/IOUtil.java
IOUtil.pump
public static CharArrayWriter2 pump(Reader reader, boolean closeReader) throws IOException { """ Reads data from <code>reader</code> and writes it into an instanceof {@link CharArrayWriter2}.<br> @param reader reader from which data is read @param closeReader close reader or not @return ...
java
public static CharArrayWriter2 pump(Reader reader, boolean closeReader) throws IOException{ return pump(reader, new CharArrayWriter2(), closeReader, true); }
[ "public", "static", "CharArrayWriter2", "pump", "(", "Reader", "reader", ",", "boolean", "closeReader", ")", "throws", "IOException", "{", "return", "pump", "(", "reader", ",", "new", "CharArrayWriter2", "(", ")", ",", "closeReader", ",", "true", ")", ";", "...
Reads data from <code>reader</code> and writes it into an instanceof {@link CharArrayWriter2}.<br> @param reader reader from which data is read @param closeReader close reader or not @return the instance of {@link CharArrayWriter2} into which data is written @throws IOException if an I/O error oc...
[ "Reads", "data", "from", "<code", ">", "reader<", "/", "code", ">", "and", "writes", "it", "into", "an", "instanceof", "{", "@link", "CharArrayWriter2", "}", ".", "<br", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/io/IOUtil.java#L157-L159
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.getEvseByIdentifier
private Evse getEvseByIdentifier(ChargingStationType chargingStationType, int identifier) { """ Gets a Evse by identifier. @param chargingStationType charging station type. @param identifier evse identifier. @return evse or null if not found. """ for (Evse evse:chargingStationType.g...
java
private Evse getEvseByIdentifier(ChargingStationType chargingStationType, int identifier) { for (Evse evse:chargingStationType.getEvses()) { if(identifier == evse.getIdentifier()) { return evse; } } return null; }
[ "private", "Evse", "getEvseByIdentifier", "(", "ChargingStationType", "chargingStationType", ",", "int", "identifier", ")", "{", "for", "(", "Evse", "evse", ":", "chargingStationType", ".", "getEvses", "(", ")", ")", "{", "if", "(", "identifier", "==", "evse", ...
Gets a Evse by identifier. @param chargingStationType charging station type. @param identifier evse identifier. @return evse or null if not found.
[ "Gets", "a", "Evse", "by", "identifier", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L445-L452
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_serviceInfos_PUT
public void service_serviceInfos_PUT(String service, net.minidev.ovh.api.services.OvhService body) throws IOException { """ Alter this object properties REST: PUT /email/pro/{service}/serviceInfos @param body [required] New object properties @param service [required] The internal name of your pro organization...
java
public void service_serviceInfos_PUT(String service, net.minidev.ovh.api.services.OvhService body) throws IOException { String qPath = "/email/pro/{service}/serviceInfos"; StringBuilder sb = path(qPath, service); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "service_serviceInfos_PUT", "(", "String", "service", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "services", ".", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/pro/{service}/serviceInfos\...
Alter this object properties REST: PUT /email/pro/{service}/serviceInfos @param body [required] New object properties @param service [required] The internal name of your pro organization API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L267-L271
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java
OrderNoteUrl.deleteReturnNoteUrl
public static MozuUrl deleteReturnNoteUrl(String noteId, String returnId) { """ Get Resource Url for DeleteReturnNote @param noteId Unique identifier of a particular note to retrieve. @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url """ UrlFormatt...
java
public static MozuUrl deleteReturnNoteUrl(String noteId, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("returnId", returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl...
[ "public", "static", "MozuUrl", "deleteReturnNoteUrl", "(", "String", "noteId", ",", "String", "returnId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/returns/{returnId}/notes/{noteId}\"", ")", ";", "formatter", ".", "formatUr...
Get Resource Url for DeleteReturnNote @param noteId Unique identifier of a particular note to retrieve. @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteReturnNote" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java#L80-L86
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java
ScriptContext.copyFormEntry
@Cmd public void copyFormEntry(final String srcDataSetKey, final String srcKey, final String destDataSetKey, final String destKey) { """ Copies a {@link DataSet} entry from one {@link DataSet} to another. @param srcDataSetKey the source data set key @param srcKey the source entry key @param destDataSetKey ...
java
@Cmd public void copyFormEntry(final String srcDataSetKey, final String srcKey, final String destDataSetKey, final String destKey) { Map<String, DataSet> currentDataSets = dataSourceProvider.get().getCurrentDataSets(); DataSet srcDataSet = currentDataSets.get(srcDataSetKey); DataSet destDataSet = currentDataSets...
[ "@", "Cmd", "public", "void", "copyFormEntry", "(", "final", "String", "srcDataSetKey", ",", "final", "String", "srcKey", ",", "final", "String", "destDataSetKey", ",", "final", "String", "destKey", ")", "{", "Map", "<", "String", ",", "DataSet", ">", "curre...
Copies a {@link DataSet} entry from one {@link DataSet} to another. @param srcDataSetKey the source data set key @param srcKey the source entry key @param destDataSetKey the destination data set key @param destKey the destination entry key
[ "Copies", "a", "{", "@link", "DataSet", "}", "entry", "from", "one", "{", "@link", "DataSet", "}", "to", "another", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptContext.java#L254-L260
denisneuling/apitrary.jar
apitrary-api-client/src/main/java/com/apitrary/api/client/util/ClassUtil.java
ClassUtil.getValueOf
public static <T> T getValueOf(String fieldName, Object reference, Class<?> referenceClazz, Class<T> valueType) { """ <p> getValueOf. </p> @param fieldName a {@link java.lang.String} object. @param referenceClazz a {@link java.lang.Class} object. @param valueType a {@link java.lang.Class} object. @param...
java
public static <T> T getValueOf(String fieldName, Object reference, Class<?> referenceClazz, Class<T> valueType) { try { Field field = referenceClazz.getDeclaredField(fieldName); field.setAccessible(true); @SuppressWarnings("unchecked") T toReturn = (T) field.get(reference); return toReturn; } catch ...
[ "public", "static", "<", "T", ">", "T", "getValueOf", "(", "String", "fieldName", ",", "Object", "reference", ",", "Class", "<", "?", ">", "referenceClazz", ",", "Class", "<", "T", ">", "valueType", ")", "{", "try", "{", "Field", "field", "=", "referen...
<p> getValueOf. </p> @param fieldName a {@link java.lang.String} object. @param referenceClazz a {@link java.lang.Class} object. @param valueType a {@link java.lang.Class} object. @param <T> a T object. @return a T object.
[ "<p", ">", "getValueOf", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/apitrary.jar/blob/b7f639a1e735c60ba2b1b62851926757f5de8628/apitrary-api-client/src/main/java/com/apitrary/api/client/util/ClassUtil.java#L215-L227
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
AbstractDatabaseEngine.setParameterValues
protected void setParameterValues(final PreparedStatement ps, final int index, final Object param) throws SQLException { """ Sets the value of a parameter in {@code index} to the value provided in {@code param}. @param ps The {@link PreparedStatement} to insert the association between index and the param. @...
java
protected void setParameterValues(final PreparedStatement ps, final int index, final Object param) throws SQLException { if (param instanceof byte[]) { ps.setBytes(index, (byte[]) param); } else { ps.setObject(index, param); } } }
[ "protected", "void", "setParameterValues", "(", "final", "PreparedStatement", "ps", ",", "final", "int", "index", ",", "final", "Object", "param", ")", "throws", "SQLException", "{", "if", "(", "param", "instanceof", "byte", "[", "]", ")", "{", "ps", ".", ...
Sets the value of a parameter in {@code index} to the value provided in {@code param}. @param ps The {@link PreparedStatement} to insert the association between index and the param. @param index The index to set the value to. @param param The value to be set at the provided index. @throws SQLException If something ...
[ "Sets", "the", "value", "of", "a", "parameter", "in", "{", "@code", "index", "}", "to", "the", "value", "provided", "in", "{", "@code", "param", "}", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L1953-L1960
aws/aws-sdk-java
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/model/EvaluationResult.java
EvaluationResult.withEvalDecisionDetails
public EvaluationResult withEvalDecisionDetails(java.util.Map<String, String> evalDecisionDetails) { """ <p> Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluatio...
java
public EvaluationResult withEvalDecisionDetails(java.util.Map<String, String> evalDecisionDetails) { setEvalDecisionDetails(evalDecisionDetails); return this; }
[ "public", "EvaluationResult", "withEvalDecisionDetails", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "evalDecisionDetails", ")", "{", "setEvalDecisionDetails", "(", "evalDecisionDetails", ")", ";", "return", "this", ";", "}" ]
<p> Additional details about the results of the evaluation decision. When there are both IAM policies and resource policies, this parameter explains how each set of policies contributes to the final evaluation decision. When simulating cross-account access to a resource, both the resource-based policy and the caller's ...
[ "<p", ">", "Additional", "details", "about", "the", "results", "of", "the", "evaluation", "decision", ".", "When", "there", "are", "both", "IAM", "policies", "and", "resource", "policies", "this", "parameter", "explains", "how", "each", "set", "of", "policies"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/model/EvaluationResult.java#L563-L566
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.distinct
public static <T> List<T> distinct(final T[] a) { """ Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferred for multiple phases operation. @param a @return """ if (N.isNullOrEmpty(a)) { return new ArrayLis...
java
public static <T> List<T> distinct(final T[] a) { if (N.isNullOrEmpty(a)) { return new ArrayList<>(); } return distinct(a, 0, a.length); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "distinct", "(", "final", "T", "[", "]", "a", ")", "{", "if", "(", "N", ".", "isNullOrEmpty", "(", "a", ")", ")", "{", "return", "new", "ArrayList", "<>", "(", ")", ";", "}", "return", ...
Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferred for multiple phases operation. @param a @return
[ "Mostly", "it", "s", "designed", "for", "one", "-", "step", "operation", "to", "complete", "the", "operation", "in", "one", "step", ".", "<code", ">", "java", ".", "util", ".", "stream", ".", "Stream<", "/", "code", ">", "is", "preferred", "for", "mult...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L17910-L17916
jenkinsci/jenkins
core/src/main/java/jenkins/util/JSONSignatureValidator.java
JSONSignatureValidator.verifySignature
private boolean verifySignature(Signature signature, String providedSignature) { """ Utility method supporting both possible signature formats: Base64 and Hex """ // We can only make one call to Signature#verify here. // Since we need to potentially check two values (one decoded from hex, the o...
java
private boolean verifySignature(Signature signature, String providedSignature) { // We can only make one call to Signature#verify here. // Since we need to potentially check two values (one decoded from hex, the other decoded from base64), // try hex first: It's almost certainly going to fail de...
[ "private", "boolean", "verifySignature", "(", "Signature", "signature", ",", "String", "providedSignature", ")", "{", "// We can only make one call to Signature#verify here.", "// Since we need to potentially check two values (one decoded from hex, the other decoded from base64),", "// try...
Utility method supporting both possible signature formats: Base64 and Hex
[ "Utility", "method", "supporting", "both", "possible", "signature", "formats", ":", "Base64", "and", "Hex" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/JSONSignatureValidator.java#L209-L233
threerings/narya
core/src/main/java/com/threerings/presents/server/InvocationManager.java
InvocationManager.registerProvider
public <T extends InvocationMarshaller<?>> T registerProvider ( InvocationProvider provider, Class<T> mclass) { """ Registers the supplied invocation service provider. @param provider the provider to be registered. @param mclass the class of the invocation marshaller generated for the service. """ ...
java
public <T extends InvocationMarshaller<?>> T registerProvider ( InvocationProvider provider, Class<T> mclass) { return registerProvider(provider, mclass, null); }
[ "public", "<", "T", "extends", "InvocationMarshaller", "<", "?", ">", ">", "T", "registerProvider", "(", "InvocationProvider", "provider", ",", "Class", "<", "T", ">", "mclass", ")", "{", "return", "registerProvider", "(", "provider", ",", "mclass", ",", "nu...
Registers the supplied invocation service provider. @param provider the provider to be registered. @param mclass the class of the invocation marshaller generated for the service.
[ "Registers", "the", "supplied", "invocation", "service", "provider", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/InvocationManager.java#L110-L114
alkacon/opencms-core
src/org/opencms/widgets/CmsPrincipalWidget.java
CmsPrincipalWidget.getButtonJs
public String getButtonJs(String id, String form) { """ Returns the needed java script for the search button.<p> @param id the id of the widget to generate the search button for @param form the id of the form where to which the widget belongs @return javascript code """ StringBuffer buttonJs = ...
java
public String getButtonJs(String id, String form) { StringBuffer buttonJs = new StringBuffer(8); buttonJs.append("javascript:openPrincipalWin('"); buttonJs.append(OpenCms.getSystemInfo().getOpenCmsContext()); buttonJs.append("/system/workplace/commons/principal_selection.jsp"); ...
[ "public", "String", "getButtonJs", "(", "String", "id", ",", "String", "form", ")", "{", "StringBuffer", "buttonJs", "=", "new", "StringBuffer", "(", "8", ")", ";", "buttonJs", ".", "append", "(", "\"javascript:openPrincipalWin('\"", ")", ";", "buttonJs", ".",...
Returns the needed java script for the search button.<p> @param id the id of the widget to generate the search button for @param form the id of the form where to which the widget belongs @return javascript code
[ "Returns", "the", "needed", "java", "script", "for", "the", "search", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsPrincipalWidget.java#L94-L111
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java
Operation.fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize) { """ This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corre...
java
public void fixupVariables(java.util.Vector vars, int globalsSize) { m_left.fixupVariables(vars, globalsSize); m_right.fixupVariables(vars, globalsSize); }
[ "public", "void", "fixupVariables", "(", "java", ".", "util", ".", "Vector", "vars", ",", "int", "globalsSize", ")", "{", "m_left", ".", "fixupVariables", "(", "vars", ",", "globalsSize", ")", ";", "m_right", ".", "fixupVariables", "(", "vars", ",", "globa...
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector f...
[ "This", "function", "is", "used", "to", "fixup", "variables", "from", "QNames", "to", "stack", "frame", "indexes", "at", "stylesheet", "build", "time", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java#L54-L58
docker-java/docker-java
src/main/java/com/github/dockerjava/core/KeystoreSSLConfig.java
KeystoreSSLConfig.getSSLContext
@Override public SSLContext getSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { """ Get the SSL Context out of the keystore. @return java SSLContext @throws KeyManagementException @throws UnrecoverableKeyException @throws NoS...
java
@Override public SSLContext getSSLContext() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { final SSLContext context = SSLContext.getInstance("TLS"); String httpProtocols = System.getProperty("https.protocols"); System.set...
[ "@", "Override", "public", "SSLContext", "getSSLContext", "(", ")", "throws", "KeyManagementException", ",", "UnrecoverableKeyException", ",", "NoSuchAlgorithmException", ",", "KeyStoreException", "{", "final", "SSLContext", "context", "=", "SSLContext", ".", "getInstance...
Get the SSL Context out of the keystore. @return java SSLContext @throws KeyManagementException @throws UnrecoverableKeyException @throws NoSuchAlgorithmException @throws KeyStoreException
[ "Get", "the", "SSL", "Context", "out", "of", "the", "keystore", "." ]
train
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/KeystoreSSLConfig.java#L75-L111
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.registerFactory
private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) { """ Registers a type information factory globally for a certain type. Every following type extraction operation will use the provided factory for this type. The factory will have highest precedence for this type. In a hierarc...
java
private static void registerFactory(Type t, Class<? extends TypeInfoFactory> factory) { Preconditions.checkNotNull(t, "Type parameter must not be null."); Preconditions.checkNotNull(factory, "Factory parameter must not be null."); if (!TypeInfoFactory.class.isAssignableFrom(factory)) { throw new IllegalArgume...
[ "private", "static", "void", "registerFactory", "(", "Type", "t", ",", "Class", "<", "?", "extends", "TypeInfoFactory", ">", "factory", ")", "{", "Preconditions", ".", "checkNotNull", "(", "t", ",", "\"Type parameter must not be null.\"", ")", ";", "Preconditions"...
Registers a type information factory globally for a certain type. Every following type extraction operation will use the provided factory for this type. The factory will have highest precedence for this type. In a hierarchy of types the registered factory has higher precedence than annotations at the same level but low...
[ "Registers", "a", "type", "information", "factory", "globally", "for", "a", "certain", "type", ".", "Every", "following", "type", "extraction", "operation", "will", "use", "the", "provided", "factory", "for", "this", "type", ".", "The", "factory", "will", "hav...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L149-L160
scalanlp/breeze
math/src/main/java/breeze/linalg/operators/DenseVectorSupportMethods.java
DenseVectorSupportMethods.smallDotProduct_Double
public static double smallDotProduct_Double(double[] a, double[] b, int length) { """ WARNING: only returns the right answer for vectors of length < MAX_SMALL_DOT_PRODUCT_LENGTH @param a @param b @param length @return """ double sumA = 0.0; double sumB = 0.0; switch (length) { ...
java
public static double smallDotProduct_Double(double[] a, double[] b, int length) { double sumA = 0.0; double sumB = 0.0; switch (length) { case 7: sumA = a[6] * b[6]; case 6: sumB = a[5] * b[5]; case 5: sumA += a[...
[ "public", "static", "double", "smallDotProduct_Double", "(", "double", "[", "]", "a", ",", "double", "[", "]", "b", ",", "int", "length", ")", "{", "double", "sumA", "=", "0.0", ";", "double", "sumB", "=", "0.0", ";", "switch", "(", "length", ")", "{...
WARNING: only returns the right answer for vectors of length < MAX_SMALL_DOT_PRODUCT_LENGTH @param a @param b @param length @return
[ "WARNING", ":", "only", "returns", "the", "right", "answer", "for", "vectors", "of", "length", "<", "MAX_SMALL_DOT_PRODUCT_LENGTH" ]
train
https://github.com/scalanlp/breeze/blob/aeb3360ce77d79490fe48bc5fe2bb40f18289908/math/src/main/java/breeze/linalg/operators/DenseVectorSupportMethods.java#L19-L41
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/XmlRpcDataMarshaller.java
XmlRpcDataMarshaller.checkErrors
private static void checkErrors(Object object) throws GreenPepperServerException { """ Checks if the message is an GreenPepper server tagged Exception. If so an GreenPepperServerException will be thrown with the error id found. </p> @param object the error id found. """ if (object instanceof Excepti...
java
private static void checkErrors(Object object) throws GreenPepperServerException { if (object instanceof Exception) { throw new GreenPepperServerException(GreenPepperServerErrorKey.CALL_FAILED, ((Exception)object).getMessage()); } if (object instanceof String) ...
[ "private", "static", "void", "checkErrors", "(", "Object", "object", ")", "throws", "GreenPepperServerException", "{", "if", "(", "object", "instanceof", "Exception", ")", "{", "throw", "new", "GreenPepperServerException", "(", "GreenPepperServerErrorKey", ".", "CALL_...
Checks if the message is an GreenPepper server tagged Exception. If so an GreenPepperServerException will be thrown with the error id found. </p> @param object the error id found.
[ "Checks", "if", "the", "message", "is", "an", "GreenPepper", "server", "tagged", "Exception", ".", "If", "so", "an", "GreenPepperServerException", "will", "be", "thrown", "with", "the", "error", "id", "found", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/XmlRpcDataMarshaller.java#L829-L846
aol/micro-server
micro-s3/src/main/java/com/oath/micro/server/s3/data/S3Utils.java
S3Utils.getInputStream
@Deprecated public InputStream getInputStream(String bucketName, String key) throws AmazonServiceException, AmazonClientException, InterruptedException, IOException { """ Method returns InputStream from S3Object. Multi-part download is used to get file. s3.tmp.dir property used to store temporary ...
java
@Deprecated public InputStream getInputStream(String bucketName, String key) throws AmazonServiceException, AmazonClientException, InterruptedException, IOException{ return readUtils.getInputStream(bucketName, key); }
[ "@", "Deprecated", "public", "InputStream", "getInputStream", "(", "String", "bucketName", ",", "String", "key", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", ",", "InterruptedException", ",", "IOException", "{", "return", "readUtils", ".", "g...
Method returns InputStream from S3Object. Multi-part download is used to get file. s3.tmp.dir property used to store temporary files. @param bucketName @param key @return @throws AmazonServiceException @throws AmazonClientException @throws InterruptedException @throws IOException @deprecated see ReadUtils
[ "Method", "returns", "InputStream", "from", "S3Object", ".", "Multi", "-", "part", "download", "is", "used", "to", "get", "file", ".", "s3", ".", "tmp", ".", "dir", "property", "used", "to", "store", "temporary", "files", "." ]
train
https://github.com/aol/micro-server/blob/5c7103c5b43d2f4d16350dbd2f9802af307c63f7/micro-s3/src/main/java/com/oath/micro/server/s3/data/S3Utils.java#L169-L173
js-lib-com/dom
src/main/java/js/dom/w3c/DocumentBuilderImpl.java
DocumentBuilderImpl.loadHTML
private static Document loadHTML(URL url, boolean useNamespace) { """ Helper method for HTML loading from URL. @param url HTML document hyper source, @param useNamespace flag true if loaded document instance should have name space support. @return newly created and loaded document instance. """ InputSt...
java
private static Document loadHTML(URL url, boolean useNamespace) { InputStream stream = null; try { stream = url.openConnection().getInputStream(); return loadHTML(new InputSource(stream), useNamespace); } catch (Exception e) { throw new DomException(e); } finally { close(stream); } }
[ "private", "static", "Document", "loadHTML", "(", "URL", "url", ",", "boolean", "useNamespace", ")", "{", "InputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "url", ".", "openConnection", "(", ")", ".", "getInputStream", "(", ")", ";", ...
Helper method for HTML loading from URL. @param url HTML document hyper source, @param useNamespace flag true if loaded document instance should have name space support. @return newly created and loaded document instance.
[ "Helper", "method", "for", "HTML", "loading", "from", "URL", "." ]
train
https://github.com/js-lib-com/dom/blob/8c7cd7c802977f210674dec7c2a8f61e8de05b63/src/main/java/js/dom/w3c/DocumentBuilderImpl.java#L372-L382
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
HtmlTree.SCRIPT
public static HtmlTree SCRIPT(String type, String src) { """ Generates a SCRIPT tag with the type and src attributes. @param type type of link @param src the path for the script @return an HtmlTree object for the SCRIPT tag """ HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT); htmltree.add...
java
public static HtmlTree SCRIPT(String type, String src) { HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT); htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type)); htmltree.addAttr(HtmlAttr.SRC, nullCheck(src)); return htmltree; }
[ "public", "static", "HtmlTree", "SCRIPT", "(", "String", "type", ",", "String", "src", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "SCRIPT", ")", ";", "htmltree", ".", "addAttr", "(", "HtmlAttr", ".", "TYPE", ",", "null...
Generates a SCRIPT tag with the type and src attributes. @param type type of link @param src the path for the script @return an HtmlTree object for the SCRIPT tag
[ "Generates", "a", "SCRIPT", "tag", "with", "the", "type", "and", "src", "attributes", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java#L567-L572
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java
Optimizer.createPreOptimizedPlan
public static List<DataSinkNode> createPreOptimizedPlan(Plan program) { """ This function performs only the first step to the compilation process - the creation of the optimizer representation of the plan. No estimations or enumerations of alternatives are done here. @param program The plan to generate the opt...
java
public static List<DataSinkNode> createPreOptimizedPlan(Plan program) { GraphCreatingVisitor graphCreator = new GraphCreatingVisitor(1, null); program.accept(graphCreator); return graphCreator.getSinks(); }
[ "public", "static", "List", "<", "DataSinkNode", ">", "createPreOptimizedPlan", "(", "Plan", "program", ")", "{", "GraphCreatingVisitor", "graphCreator", "=", "new", "GraphCreatingVisitor", "(", "1", ",", "null", ")", ";", "program", ".", "accept", "(", "graphCr...
This function performs only the first step to the compilation process - the creation of the optimizer representation of the plan. No estimations or enumerations of alternatives are done here. @param program The plan to generate the optimizer representation for. @return The optimizer representation of the plan, as a co...
[ "This", "function", "performs", "only", "the", "first", "step", "to", "the", "compilation", "process", "-", "the", "creation", "of", "the", "optimizer", "representation", "of", "the", "plan", ".", "No", "estimations", "or", "enumerations", "of", "alternatives", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java#L540-L544
voldemort/voldemort
src/java/voldemort/server/scheduler/slop/SlopPusherJob.java
SlopPusherJob.isSlopDead
protected boolean isSlopDead(Cluster cluster, Set<String> storeNames, Slop slop) { """ A slop is dead if the destination node or the store does not exist anymore on the cluster. @param slop @return """ // destination node , no longer exists if(!cluster.getNodeIds().contains(slop.getNodeId(...
java
protected boolean isSlopDead(Cluster cluster, Set<String> storeNames, Slop slop) { // destination node , no longer exists if(!cluster.getNodeIds().contains(slop.getNodeId())) { return true; } // destination store, no longer exists if(!storeNames.contains(slop.getStor...
[ "protected", "boolean", "isSlopDead", "(", "Cluster", "cluster", ",", "Set", "<", "String", ">", "storeNames", ",", "Slop", "slop", ")", "{", "// destination node , no longer exists", "if", "(", "!", "cluster", ".", "getNodeIds", "(", ")", ".", "contains", "("...
A slop is dead if the destination node or the store does not exist anymore on the cluster. @param slop @return
[ "A", "slop", "is", "dead", "if", "the", "destination", "node", "or", "the", "store", "does", "not", "exist", "anymore", "on", "the", "cluster", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/server/scheduler/slop/SlopPusherJob.java#L52-L65
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterInformation
public void getCharacterInformation(String API, String name, Callback<CharacterCore> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Character Core API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Core">here</a><br/> Get basic character information for the given ...
java
public void getCharacterInformation(String API, String name, Callback<CharacterCore> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterCore(name, API).enqueue(callback); }
[ "public", "void", "getCharacterInformation", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterCore", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(",...
For more info on Character Core API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Core">here</a><br/> Get basic character information for the given character name that is linked to given API key @param API API key @param name name of character @param callback callback that is going to be used ...
[ "For", "more", "info", "on", "Character", "Core", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Core", ">", "here<", "/", "a", ">", "<br", "/", ">", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L721-L724
gsi-upm/BeastTool
beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexConnector.java
JadexConnector.createAgent
public void createAgent(String agent_name, String path) { """ Creates a real agent in the platform @param agent_name The name that the agent is gonna have in the platform @param path The path of the description (xml) of the agent """ IComponentIdentifier agent = cmsService.createComponent(agent_n...
java
public void createAgent(String agent_name, String path) { IComponentIdentifier agent = cmsService.createComponent(agent_name, path, null, null).get(new ThreadSuspendable()); createdAgents.put(agent_name, agent); }
[ "public", "void", "createAgent", "(", "String", "agent_name", ",", "String", "path", ")", "{", "IComponentIdentifier", "agent", "=", "cmsService", ".", "createComponent", "(", "agent_name", ",", "path", ",", "null", ",", "null", ")", ".", "get", "(", "new", ...
Creates a real agent in the platform @param agent_name The name that the agent is gonna have in the platform @param path The path of the description (xml) of the agent
[ "Creates", "a", "real", "agent", "in", "the", "platform" ]
train
https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/platform/jadex/JadexConnector.java#L112-L116
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getCertificateIssuer
public IssuerBundle getCertificateIssuer(String vaultBaseUrl, String issuerName) { """ Lists the specified certificate issuer. The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permiss...
java
public IssuerBundle getCertificateIssuer(String vaultBaseUrl, String issuerName) { return getCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName).toBlocking().single().body(); }
[ "public", "IssuerBundle", "getCertificateIssuer", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ")", "{", "return", "getCertificateIssuerWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "issuerName", ")", ".", "toBlocking", "(", ")", ".", "single", "...
Lists the specified certificate issuer. The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault. This operation requires the certificates/manageissuers/getissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param...
[ "Lists", "the", "specified", "certificate", "issuer", ".", "The", "GetCertificateIssuer", "operation", "returns", "the", "specified", "certificate", "issuer", "resources", "in", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "certif...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6312-L6314
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContentFactory.java
CmsXmlContentFactory.createDocument
public static CmsXmlContent createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { """ Create a new instance of an XML content based on the given default content, hat will have all language nodes of the default content and ensures the presence of the given locale.<p> The given enco...
java
public static CmsXmlContent createDocument(CmsObject cms, Locale locale, String modelUri) throws CmsException { // create the XML content CmsXmlContent content = new CmsXmlContent(cms, locale, modelUri); // call prepare for use content handler and return the result return content.getCon...
[ "public", "static", "CmsXmlContent", "createDocument", "(", "CmsObject", "cms", ",", "Locale", "locale", ",", "String", "modelUri", ")", "throws", "CmsException", "{", "// create the XML content", "CmsXmlContent", "content", "=", "new", "CmsXmlContent", "(", "cms", ...
Create a new instance of an XML content based on the given default content, hat will have all language nodes of the default content and ensures the presence of the given locale.<p> The given encoding is used when marshalling the XML again later.<p> @param cms the current users OpenCms content @param locale the locale...
[ "Create", "a", "new", "instance", "of", "an", "XML", "content", "based", "on", "the", "given", "default", "content", "hat", "will", "have", "all", "language", "nodes", "of", "the", "default", "content", "and", "ensures", "the", "presence", "of", "the", "gi...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentFactory.java#L106-L112
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/ObjectWrapper.java
ObjectWrapper.setIndexedValue
public void setIndexedValue(Property property, int index, Object value) { """ Sets the value of the specified indexed property in the wrapped object. @param property the indexed property whose value is to be updated, cannot be {@code null} @param index the index position of the property value to be set @pa...
java
public void setIndexedValue(Property property, int index, Object value) { setIndexedValue(object, property, index, value, this); }
[ "public", "void", "setIndexedValue", "(", "Property", "property", ",", "int", "index", ",", "Object", "value", ")", "{", "setIndexedValue", "(", "object", ",", "property", ",", "index", ",", "value", ",", "this", ")", ";", "}" ]
Sets the value of the specified indexed property in the wrapped object. @param property the indexed property whose value is to be updated, cannot be {@code null} @param index the index position of the property value to be set @param value the indexed value to set, can be {@code null} @throws ReflectionException ...
[ "Sets", "the", "value", "of", "the", "specified", "indexed", "property", "in", "the", "wrapped", "object", "." ]
train
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/ObjectWrapper.java#L360-L362
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java
QrPose3DUtils.set3D
private void set3D(int row, int col, int N , Point3D_F64 location ) { """ Specifies 3D location of landmark in marker coordinate system @param row row in the QR code's grid coordinate system @param col column in the QR code's grid coordinate system @param N width of grid @param location (Output) location of fe...
java
private void set3D(int row, int col, int N , Point3D_F64 location ) { double _N = N; double gridX = 2.0*(col/_N-0.5); double gridY = 2.0*(0.5-row/_N); location.set(gridX,gridY,0); }
[ "private", "void", "set3D", "(", "int", "row", ",", "int", "col", ",", "int", "N", ",", "Point3D_F64", "location", ")", "{", "double", "_N", "=", "N", ";", "double", "gridX", "=", "2.0", "*", "(", "col", "/", "_N", "-", "0.5", ")", ";", "double",...
Specifies 3D location of landmark in marker coordinate system @param row row in the QR code's grid coordinate system @param col column in the QR code's grid coordinate system @param N width of grid @param location (Output) location of feature in marker reference frame
[ "Specifies", "3D", "location", "of", "landmark", "in", "marker", "coordinate", "system" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java#L161-L167
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java
XScreenField.printControlStartForm
public void printControlStartForm(PrintWriter out, int iPrintOptions) { """ Display the start form in input format. @param out The out stream. @param iPrintOptions The view specific attributes. """ out.println(Utility.startTag(XMLTags.CONTROLS)); }
java
public void printControlStartForm(PrintWriter out, int iPrintOptions) { out.println(Utility.startTag(XMLTags.CONTROLS)); }
[ "public", "void", "printControlStartForm", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "out", ".", "println", "(", "Utility", ".", "startTag", "(", "XMLTags", ".", "CONTROLS", ")", ")", ";", "}" ]
Display the start form in input format. @param out The out stream. @param iPrintOptions The view specific attributes.
[ "Display", "the", "start", "form", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java#L130-L133
DigitalPebble/TextClassification
src/main/java/com/digitalpebble/classification/Learner.java
Learner.createDocument
public Document createDocument(String[] tokenstring, String label) { """ Create a Document from an array of Strings and specify the label """ this.lexicon.incrementDocCount(); SimpleDocument doc = new SimpleDocument(tokenstring, this.lexicon, true); doc.setLabel(this.lexicon.getLabelIndex(label)); ...
java
public Document createDocument(String[] tokenstring, String label) { this.lexicon.incrementDocCount(); SimpleDocument doc = new SimpleDocument(tokenstring, this.lexicon, true); doc.setLabel(this.lexicon.getLabelIndex(label)); return doc; }
[ "public", "Document", "createDocument", "(", "String", "[", "]", "tokenstring", ",", "String", "label", ")", "{", "this", ".", "lexicon", ".", "incrementDocCount", "(", ")", ";", "SimpleDocument", "doc", "=", "new", "SimpleDocument", "(", "tokenstring", ",", ...
Create a Document from an array of Strings and specify the label
[ "Create", "a", "Document", "from", "an", "array", "of", "Strings", "and", "specify", "the", "label" ]
train
https://github.com/DigitalPebble/TextClassification/blob/c510719c31633841af2bf393a20707d4624f865d/src/main/java/com/digitalpebble/classification/Learner.java#L95-L100
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java
TaskManagerService.buildTaskRecord
private TaskRecord buildTaskRecord(String taskID, Iterator<DColumn> colIter) { """ Create a TaskRecord from a task status row read from the Tasks table. """ TaskRecord taskRecord = new TaskRecord(taskID); while (colIter.hasNext()) { DColumn col = colIter.next(); taskReco...
java
private TaskRecord buildTaskRecord(String taskID, Iterator<DColumn> colIter) { TaskRecord taskRecord = new TaskRecord(taskID); while (colIter.hasNext()) { DColumn col = colIter.next(); taskRecord.setProperty(col.getName(), col.getValue()); } return taskRecord; ...
[ "private", "TaskRecord", "buildTaskRecord", "(", "String", "taskID", ",", "Iterator", "<", "DColumn", ">", "colIter", ")", "{", "TaskRecord", "taskRecord", "=", "new", "TaskRecord", "(", "taskID", ")", ";", "while", "(", "colIter", ".", "hasNext", "(", ")", ...
Create a TaskRecord from a task status row read from the Tasks table.
[ "Create", "a", "TaskRecord", "from", "a", "task", "status", "row", "read", "from", "the", "Tasks", "table", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java#L474-L481
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java
ClassFinder.complete
private void complete(Symbol sym) throws CompletionFailure { """ Completion for classes to be loaded. Before a class is loaded we make sure its enclosing class (if any) is loaded. """ if (sym.kind == TYP) { try { ClassSymbol c = (ClassSymbol) sym; dependenci...
java
private void complete(Symbol sym) throws CompletionFailure { if (sym.kind == TYP) { try { ClassSymbol c = (ClassSymbol) sym; dependencies.push(c, CompletionCause.CLASS_READER); annotate.blockAnnotations(); c.members_field = new Scope.Er...
[ "private", "void", "complete", "(", "Symbol", "sym", ")", "throws", "CompletionFailure", "{", "if", "(", "sym", ".", "kind", "==", "TYP", ")", "{", "try", "{", "ClassSymbol", "c", "=", "(", "ClassSymbol", ")", "sym", ";", "dependencies", ".", "push", "...
Completion for classes to be loaded. Before a class is loaded we make sure its enclosing class (if any) is loaded.
[ "Completion", "for", "classes", "to", "be", "loaded", ".", "Before", "a", "class", "is", "loaded", "we", "make", "sure", "its", "enclosing", "class", "(", "if", "any", ")", "is", "loaded", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java#L276-L300
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.copy
public void copy(Node dest) throws NodeNotFoundException, CopyException { """ Copies this to dest. Overwrites existing file and adds to existing directories. @throws NodeNotFoundException if this does not exist """ try { if (isDirectory()) { dest.mkdirOpt(); ...
java
public void copy(Node dest) throws NodeNotFoundException, CopyException { try { if (isDirectory()) { dest.mkdirOpt(); copyDirectory(dest); } else { copyFile(dest); } } catch (FileNotFoundException | CopyException e) { ...
[ "public", "void", "copy", "(", "Node", "dest", ")", "throws", "NodeNotFoundException", ",", "CopyException", "{", "try", "{", "if", "(", "isDirectory", "(", ")", ")", "{", "dest", ".", "mkdirOpt", "(", ")", ";", "copyDirectory", "(", "dest", ")", ";", ...
Copies this to dest. Overwrites existing file and adds to existing directories. @throws NodeNotFoundException if this does not exist
[ "Copies", "this", "to", "dest", ".", "Overwrites", "existing", "file", "and", "adds", "to", "existing", "directories", "." ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L729-L742
tvesalainen/util
util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java
DoubleMatrix.getInstance
public static DoubleMatrix getInstance(int rows, double... values) { """ Returns new DoubleMatrix initialized to values. <p>E.g. 2x2 matrix has A00, A01, A10, A11 @param rows Number of rows @param values Values row by row @return """ if (rows < 1) { throw new IllegalArgumentE...
java
public static DoubleMatrix getInstance(int rows, double... values) { if (rows < 1) { throw new IllegalArgumentException("rows"); } if (values.length % rows != 0) { throw new IllegalArgumentException("not full rows"); } return ...
[ "public", "static", "DoubleMatrix", "getInstance", "(", "int", "rows", ",", "double", "...", "values", ")", "{", "if", "(", "rows", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"rows\"", ")", ";", "}", "if", "(", "values", ".", ...
Returns new DoubleMatrix initialized to values. <p>E.g. 2x2 matrix has A00, A01, A10, A11 @param rows Number of rows @param values Values row by row @return
[ "Returns", "new", "DoubleMatrix", "initialized", "to", "values", ".", "<p", ">", "E", ".", "g", ".", "2x2", "matrix", "has", "A00", "A01", "A10", "A11" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java#L638-L649
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlAgent agent, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param agent the agent. @param context the context. """ final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(agent); final PyAppendable appendable = createAppendable(j...
java
protected void _generate(SarlAgent agent, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(agent); final PyAppendable appendable = createAppendable(jvmType, context); final List<JvmTypeReference> superTypes; if (agent.getExtends() != null) { ...
[ "protected", "void", "_generate", "(", "SarlAgent", "agent", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "final", "JvmDeclaredType", "jvmType", "=", "getJvmModelAssociations", "(", ")", ".", "getInferredType", "(", "agent", ")", ";", "final", "PyAppe...
Generate the given object. @param agent the agent. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L769-L790
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.divide
public static void divide(double alpha , DMatrixD1 a , DMatrixD1 b) { """ <p> Performs an element by element scalar division with the scalar on top.<br> <br> b<sub>ij</sub> = &alpha;/a<sub>ij</sub> </p> @param alpha The numerator. @param a The matrix whose elements are the divisor. Not modified. @param b...
java
public static void divide(double alpha , DMatrixD1 a , DMatrixD1 b) { b.reshape(a.numRows,a.numCols); final int size = a.getNumElements(); for( int i = 0; i < size; i++ ) { b.data[i] = alpha/a.data[i]; } }
[ "public", "static", "void", "divide", "(", "double", "alpha", ",", "DMatrixD1", "a", ",", "DMatrixD1", "b", ")", "{", "b", ".", "reshape", "(", "a", ".", "numRows", ",", "a", ".", "numCols", ")", ";", "final", "int", "size", "=", "a", ".", "getNumE...
<p> Performs an element by element scalar division with the scalar on top.<br> <br> b<sub>ij</sub> = &alpha;/a<sub>ij</sub> </p> @param alpha The numerator. @param a The matrix whose elements are the divisor. Not modified. @param b Where the results are stored. Modified.
[ "<p", ">", "Performs", "an", "element", "by", "element", "scalar", "division", "with", "the", "scalar", "on", "top", ".", "<br", ">", "<br", ">", "b<sub", ">", "ij<", "/", "sub", ">", "=", "&alpha", ";", "/", "a<sub", ">", "ij<", "/", "sub", ">", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L2468-L2477
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/RuntimeModelIo.java
RuntimeModelIo.loadInstances
public static InstancesLoadResult loadInstances( File instancesFile, File rootDirectory, Graphs graph, String applicationName ) { """ Loads instances from a file. @param instancesFile the file definition of the instances (can have imports) @param rootDirectory the root directory that contains instance definition...
java
public static InstancesLoadResult loadInstances( File instancesFile, File rootDirectory, Graphs graph, String applicationName ) { InstancesLoadResult result = new InstancesLoadResult(); INST: { if( ! instancesFile.exists()) { RoboconfError error = new RoboconfError( ErrorCode.PROJ_MISSING_INSTANCE_EP ); ...
[ "public", "static", "InstancesLoadResult", "loadInstances", "(", "File", "instancesFile", ",", "File", "rootDirectory", ",", "Graphs", "graph", ",", "String", "applicationName", ")", "{", "InstancesLoadResult", "result", "=", "new", "InstancesLoadResult", "(", ")", ...
Loads instances from a file. @param instancesFile the file definition of the instances (can have imports) @param rootDirectory the root directory that contains instance definitions, used to resolve imports @param graph the graph to use to resolve instances @param applicationName the application name @return a non-null ...
[ "Loads", "instances", "from", "a", "file", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/RuntimeModelIo.java#L446-L475
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QrUpdate_DDRM.java
QrUpdate_DDRM.declareInternalData
public void declareInternalData(int maxRows, int maxCols) { """ Declares the internal data structures so that it can process matrices up to the specified size. @param maxRows @param maxCols """ this.maxRows = maxRows; this.maxCols = maxCols; U_tran = new DMatrixRMaj(maxRows,maxRows...
java
public void declareInternalData(int maxRows, int maxCols) { this.maxRows = maxRows; this.maxCols = maxCols; U_tran = new DMatrixRMaj(maxRows,maxRows); Qm = new DMatrixRMaj(maxRows,maxRows); r_row = new double[ maxCols ]; }
[ "public", "void", "declareInternalData", "(", "int", "maxRows", ",", "int", "maxCols", ")", "{", "this", ".", "maxRows", "=", "maxRows", ";", "this", ".", "maxCols", "=", "maxCols", ";", "U_tran", "=", "new", "DMatrixRMaj", "(", "maxRows", ",", "maxRows", ...
Declares the internal data structures so that it can process matrices up to the specified size. @param maxRows @param maxCols
[ "Declares", "the", "internal", "data", "structures", "so", "that", "it", "can", "process", "matrices", "up", "to", "the", "specified", "size", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QrUpdate_DDRM.java#L114-L122
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertIntoTable
void insertIntoTable(Session session, Result result) { """ Multi-row insert method. Used for CREATE TABLE AS ... queries. """ PersistentStore store = session.sessionData.getRowStore(this); RowSetNavigator nav = result.initialiseNavigator(); while (nav.hasNext()) { Object...
java
void insertIntoTable(Session session, Result result) { PersistentStore store = session.sessionData.getRowStore(this); RowSetNavigator nav = result.initialiseNavigator(); while (nav.hasNext()) { Object[] data = nav.getNext(); Object[] newData = (Object[...
[ "void", "insertIntoTable", "(", "Session", "session", ",", "Result", "result", ")", "{", "PersistentStore", "store", "=", "session", ".", "sessionData", ".", "getRowStore", "(", "this", ")", ";", "RowSetNavigator", "nav", "=", "result", ".", "initialiseNavigator...
Multi-row insert method. Used for CREATE TABLE AS ... queries.
[ "Multi", "-", "row", "insert", "method", ".", "Used", "for", "CREATE", "TABLE", "AS", "...", "queries", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2261-L2274
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.alternateCalls
public void alternateCalls( String connId, String heldConnId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { """ Alternate two calls so that you retrieve a call on hold and place the established call on hold instea...
java
public void alternateCalls( String connId, String heldConnId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidalternateData alternateData = new VoicecallsidalternateData(); ...
[ "public", "void", "alternateCalls", "(", "String", "connId", ",", "String", "heldConnId", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicecallsidalternateData", "alternateData", ...
Alternate two calls so that you retrieve a call on hold and place the established call on hold instead. This is a shortcut for doing `holdCall()` and `retrieveCall()` separately. @param connId The connection ID of the established call that should be placed on hold. @param heldConnId The connection ID of the held call t...
[ "Alternate", "two", "calls", "so", "that", "you", "retrieve", "a", "call", "on", "hold", "and", "place", "the", "established", "call", "on", "hold", "instead", ".", "This", "is", "a", "shortcut", "for", "doing", "holdCall", "()", "and", "retrieveCall", "()...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L880-L899
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPostCreateMultipart
protected URI doPostCreateMultipart(String path, InputStream inputStream) throws ClientException { """ Creates a resource specified as a multi-part form in an input stream. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param inputStream the multi-part form content. @ret...
java
protected URI doPostCreateMultipart(String path, InputStream inputStream) throws ClientException { return doPostCreateMultipart(path, inputStream, null); }
[ "protected", "URI", "doPostCreateMultipart", "(", "String", "path", ",", "InputStream", "inputStream", ")", "throws", "ClientException", "{", "return", "doPostCreateMultipart", "(", "path", ",", "inputStream", ",", "null", ")", ";", "}" ]
Creates a resource specified as a multi-part form in an input stream. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param inputStream the multi-part form content. @return the URI representing the created resource, for use in subsequent operations on the resource. @throws ClientEx...
[ "Creates", "a", "resource", "specified", "as", "a", "multi", "-", "part", "form", "in", "an", "input", "stream", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L784-L786
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceRegionUtil.java
CommerceRegionUtil.findByUUID_G
public static CommerceRegion findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchRegionException { """ Returns the commerce region where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchRegionException} if it could not be found. @param uuid the uuid @param groupId the...
java
public static CommerceRegion findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.exception.NoSuchRegionException { return getPersistence().findByUUID_G(uuid, groupId); }
[ "public", "static", "CommerceRegion", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "exception", ".", "NoSuchRegionException", "{", "return", "getPersistence", "(", ")", ".", "findByUUI...
Returns the commerce region where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchRegionException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce region @throws NoSuchRegionException if a matching commerce region could not be found
[ "Returns", "the", "commerce", "region", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchRegionException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceRegionUtil.java#L279-L282
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/remote/ErrorCodes.java
ErrorCodes.getExceptionType
public Class<? extends WebDriverException> getExceptionType(int statusCode) { """ Returns the exception type that corresponds to the given {@code statusCode}. All unrecognized status codes will be mapped to {@link WebDriverException WebDriverException.class}. @param statusCode The status code to convert. @ret...
java
public Class<? extends WebDriverException> getExceptionType(int statusCode) { if (SUCCESS == statusCode) { return null; } // We know that the tuple of (status code, exception) is distinct. Set<Class<? extends WebDriverException>> allPossibleExceptions = KNOWN_ERRORS.stream() .filter(knownEr...
[ "public", "Class", "<", "?", "extends", "WebDriverException", ">", "getExceptionType", "(", "int", "statusCode", ")", "{", "if", "(", "SUCCESS", "==", "statusCode", ")", "{", "return", "null", ";", "}", "// We know that the tuple of (status code, exception) is distinc...
Returns the exception type that corresponds to the given {@code statusCode}. All unrecognized status codes will be mapped to {@link WebDriverException WebDriverException.class}. @param statusCode The status code to convert. @return The exception type that corresponds to the provided status code or {@code null} if {@co...
[ "Returns", "the", "exception", "type", "that", "corresponds", "to", "the", "given", "{", "@code", "statusCode", "}", ".", "All", "unrecognized", "status", "codes", "will", "be", "mapped", "to", "{", "@link", "WebDriverException", "WebDriverException", ".", "clas...
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/ErrorCodes.java#L172-L184
wcm-io/wcm-io-tooling
commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/ContentPackage.java
ContentPackage.addContent
public void addContent(String path, ContentElement content) throws IOException { """ Add some JCR content structure directly to the package. @param path Full content path of content root node. @param content Hierarchy of content elements. @throws IOException I/O exception """ String fullPath = buildJcrP...
java
public void addContent(String path, ContentElement content) throws IOException { String fullPath = buildJcrPathForZip(path) + "/" + DOT_CONTENT_XML; Document doc = xmlContentBuilder.buildContent(content); writeXmlDocument(fullPath, doc); }
[ "public", "void", "addContent", "(", "String", "path", ",", "ContentElement", "content", ")", "throws", "IOException", "{", "String", "fullPath", "=", "buildJcrPathForZip", "(", "path", ")", "+", "\"/\"", "+", "DOT_CONTENT_XML", ";", "Document", "doc", "=", "x...
Add some JCR content structure directly to the package. @param path Full content path of content root node. @param content Hierarchy of content elements. @throws IOException I/O exception
[ "Add", "some", "JCR", "content", "structure", "directly", "to", "the", "package", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/ContentPackage.java#L151-L155
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java
ClassDocImpl.findConstructor
public ConstructorDoc findConstructor(String constrName, String[] paramTypes) { """ Find constructor in this class. @param constrName the unqualified name to search for. @param paramTypes the array of Strings for constructor parameters. @return the first ConstructorDo...
java
public ConstructorDoc findConstructor(String constrName, String[] paramTypes) { Names names = tsym.name.table.names; for (Scope.Entry e = tsym.members().lookup(names.fromString("<init>")); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH)...
[ "public", "ConstructorDoc", "findConstructor", "(", "String", "constrName", ",", "String", "[", "]", "paramTypes", ")", "{", "Names", "names", "=", "tsym", ".", "name", ".", "table", ".", "names", ";", "for", "(", "Scope", ".", "Entry", "e", "=", "tsym",...
Find constructor in this class. @param constrName the unqualified name to search for. @param paramTypes the array of Strings for constructor parameters. @return the first ConstructorDocImpl which matches, null if not found.
[ "Find", "constructor", "in", "this", "class", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java#L1001-L1021
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/http/HttpClient.java
HttpClient.disableStrictSSL
private void disableStrictSSL() { """ Helper method that allows this client to ignore SSL certificates when making API requests. """ // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { publ...
java
private void disableStrictSSL() { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } ...
[ "private", "void", "disableStrictSSL", "(", ")", "{", "// Create a trust manager that does not validate certificate chains", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustManager", "[", "]", "{", "new", "X509TrustManager", "(", ")", "{", "public", "X509Ce...
Helper method that allows this client to ignore SSL certificates when making API requests.
[ "Helper", "method", "that", "allows", "this", "client", "to", "ignore", "SSL", "certificates", "when", "making", "API", "requests", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/http/HttpClient.java#L360-L389
enasequence/sequencetools
src/main/java/uk/ac/ebi/embl/api/validation/helper/ByteBufferUtils.java
ByteBufferUtils.arrayCopy
public static void arrayCopy(ByteBuffer src, int srcPos, ByteBuffer dst, int dstPos, int length) { """ Transfer bytes from one ByteBuffer to another. This function acts as System.arrayCopy() but for ByteBuffers. @param src the source ByteBuffer @param srcPos starting position in the source ByteBuffer @param ...
java
public static void arrayCopy(ByteBuffer src, int srcPos, ByteBuffer dst, int dstPos, int length) { if (src.hasArray() && dst.hasArray()) { System.arraycopy(src.array(), src.arrayOffset() + srcPos, dst.array(), ...
[ "public", "static", "void", "arrayCopy", "(", "ByteBuffer", "src", ",", "int", "srcPos", ",", "ByteBuffer", "dst", ",", "int", "dstPos", ",", "int", "length", ")", "{", "if", "(", "src", ".", "hasArray", "(", ")", "&&", "dst", ".", "hasArray", "(", "...
Transfer bytes from one ByteBuffer to another. This function acts as System.arrayCopy() but for ByteBuffers. @param src the source ByteBuffer @param srcPos starting position in the source ByteBuffer @param dst the destination ByteBuffer @param dstPos starting position in the destination ByteBuffer @param length the nu...
[ "Transfer", "bytes", "from", "one", "ByteBuffer", "to", "another", ".", "This", "function", "acts", "as", "System", ".", "arrayCopy", "()", "but", "for", "ByteBuffers", "." ]
train
https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/api/validation/helper/ByteBufferUtils.java#L195-L214
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendPongBlocking
public static void sendPongBlocking(final ByteBuffer[] data, final WebSocketChannel wsChannel) throws IOException { """ Sends a complete pong message using blocking IO @param data The data to send @param wsChannel The web socket channel """ sendBlockingInternal(mergeBuffers(data), WebSocketFrameTyp...
java
public static void sendPongBlocking(final ByteBuffer[] data, final WebSocketChannel wsChannel) throws IOException { sendBlockingInternal(mergeBuffers(data), WebSocketFrameType.PONG, wsChannel); }
[ "public", "static", "void", "sendPongBlocking", "(", "final", "ByteBuffer", "[", "]", "data", ",", "final", "WebSocketChannel", "wsChannel", ")", "throws", "IOException", "{", "sendBlockingInternal", "(", "mergeBuffers", "(", "data", ")", ",", "WebSocketFrameType", ...
Sends a complete pong message using blocking IO @param data The data to send @param wsChannel The web socket channel
[ "Sends", "a", "complete", "pong", "message", "using", "blocking", "IO" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L567-L569
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java
UpdateAssertionForProxyIdpAction.setAssertionLookupStrategy
public void setAssertionLookupStrategy(final Function<ProfileRequestContext, Assertion> strategy) { """ Set the strategy used to locate the {@link Assertion} to operate on. @param strategy strategy used to locate the {@link Assertion} to operate on """ ComponentSupport.ifInitializedThrowUnmodifiabledCo...
java
public void setAssertionLookupStrategy(final Function<ProfileRequestContext, Assertion> strategy) { ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this); this.assertionLookupStrategy = Constraint.isNotNull(strategy, "Assertion lookup strategy cannot be null"); }
[ "public", "void", "setAssertionLookupStrategy", "(", "final", "Function", "<", "ProfileRequestContext", ",", "Assertion", ">", "strategy", ")", "{", "ComponentSupport", ".", "ifInitializedThrowUnmodifiabledComponentException", "(", "this", ")", ";", "this", ".", "assert...
Set the strategy used to locate the {@link Assertion} to operate on. @param strategy strategy used to locate the {@link Assertion} to operate on
[ "Set", "the", "strategy", "used", "to", "locate", "the", "{", "@link", "Assertion", "}", "to", "operate", "on", "." ]
train
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java#L132-L135
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java
AbstractFsCheckpointStorage.resolveCheckpointPointer
protected static CompletedCheckpointStorageLocation resolveCheckpointPointer(String checkpointPointer) throws IOException { """ Takes the given string (representing a pointer to a checkpoint) and resolves it to a file status for the checkpoint's metadata file. @param checkpointPointer The pointer to resolve. ...
java
protected static CompletedCheckpointStorageLocation resolveCheckpointPointer(String checkpointPointer) throws IOException { checkNotNull(checkpointPointer, "checkpointPointer"); checkArgument(!checkpointPointer.isEmpty(), "empty checkpoint pointer"); // check if the pointer is in fact a valid file path final P...
[ "protected", "static", "CompletedCheckpointStorageLocation", "resolveCheckpointPointer", "(", "String", "checkpointPointer", ")", "throws", "IOException", "{", "checkNotNull", "(", "checkpointPointer", ",", "\"checkpointPointer\"", ")", ";", "checkArgument", "(", "!", "chec...
Takes the given string (representing a pointer to a checkpoint) and resolves it to a file status for the checkpoint's metadata file. @param checkpointPointer The pointer to resolve. @return A state handle to checkpoint/savepoint's metadata. @throws IOException Thrown, if the pointer cannot be resolved, the file syste...
[ "Takes", "the", "given", "string", "(", "representing", "a", "pointer", "to", "a", "checkpoint", ")", "and", "resolves", "it", "to", "a", "file", "status", "for", "the", "checkpoint", "s", "metadata", "file", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFsCheckpointStorage.java#L211-L278
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java
SignatureUtil.scanBaseTypeSignature
private static int scanBaseTypeSignature(String string, int start) { """ Scans the given string for a base type signature starting at the given index and returns the index of the last character. <pre> BaseTypeSignature: <b>B</b> | <b>C</b> | <b>D</b> | <b>F</b> | <b>I</b> | <b>J</b> | <b>S</b> | <b>V</b> | <b...
java
private static int scanBaseTypeSignature(String string, int start) { // need a minimum 1 char if (start >= string.length()) { throw new IllegalArgumentException(); } char c = string.charAt(start); if ("BCDFIJSVZ".indexOf(c) >= 0) { //$NON-NLS-1$ return start; } else { throw new IllegalArgumentExcep...
[ "private", "static", "int", "scanBaseTypeSignature", "(", "String", "string", ",", "int", "start", ")", "{", "// need a minimum 1 char", "if", "(", "start", ">=", "string", ".", "length", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")"...
Scans the given string for a base type signature starting at the given index and returns the index of the last character. <pre> BaseTypeSignature: <b>B</b> | <b>C</b> | <b>D</b> | <b>F</b> | <b>I</b> | <b>J</b> | <b>S</b> | <b>V</b> | <b>Z</b> </pre> Note that although the base type "V" is only allowed in method return...
[ "Scans", "the", "given", "string", "for", "a", "base", "type", "signature", "starting", "at", "the", "given", "index", "and", "returns", "the", "index", "of", "the", "last", "character", ".", "<pre", ">", "BaseTypeSignature", ":", "<b", ">", "B<", "/", "...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java#L221-L232
antlrjavaparser/antlr-java-parser
src/main/java/com/github/antlrjavaparser/ASTHelper.java
ASTHelper.createFieldDeclaration
public static FieldDeclaration createFieldDeclaration(int modifiers, Type type, VariableDeclarator variable) { """ Creates a {@link FieldDeclaration}. @param modifiers modifiers @param type type @param variable variable declarator @return instance of {@link FieldDeclaration} """ List<VariableD...
java
public static FieldDeclaration createFieldDeclaration(int modifiers, Type type, VariableDeclarator variable) { List<VariableDeclarator> variables = new ArrayList<VariableDeclarator>(); variables.add(variable); FieldDeclaration ret = new FieldDeclaration(modifiers, type, variables); retur...
[ "public", "static", "FieldDeclaration", "createFieldDeclaration", "(", "int", "modifiers", ",", "Type", "type", ",", "VariableDeclarator", "variable", ")", "{", "List", "<", "VariableDeclarator", ">", "variables", "=", "new", "ArrayList", "<", "VariableDeclarator", ...
Creates a {@link FieldDeclaration}. @param modifiers modifiers @param type type @param variable variable declarator @return instance of {@link FieldDeclaration}
[ "Creates", "a", "{", "@link", "FieldDeclaration", "}", "." ]
train
https://github.com/antlrjavaparser/antlr-java-parser/blob/077160deb44d952c40c442800abd91af7e6fe006/src/main/java/com/github/antlrjavaparser/ASTHelper.java#L118-L123
OpenLiberty/open-liberty
dev/com.ibm.ws.security.registry/src/com/ibm/ws/security/registry/internal/CustomUserRegistryFactory.java
CustomUserRegistryFactory.unsetCustomUserRegistry
protected synchronized void unsetCustomUserRegistry(Map<String, Object> props) { """ Method will be called for each com.ibm.websphere.security.UserRegistry that is unregistered in the OSGi service registry. We must remove this instance from our internal set of listeners. @param ref Reference to an unregistere...
java
protected synchronized void unsetCustomUserRegistry(Map<String, Object> props) { String id = getId(props); customUserRegistries.remove(id); ServiceRegistration<UserRegistry> registration = registrynRegistrationsToUnregister.remove(id); if (registration != null) { registration...
[ "protected", "synchronized", "void", "unsetCustomUserRegistry", "(", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "String", "id", "=", "getId", "(", "props", ")", ";", "customUserRegistries", ".", "remove", "(", "id", ")", ";", "ServiceRegist...
Method will be called for each com.ibm.websphere.security.UserRegistry that is unregistered in the OSGi service registry. We must remove this instance from our internal set of listeners. @param ref Reference to an unregistered com.ibm.websphere.security.UserRegistry
[ "Method", "will", "be", "called", "for", "each", "com", ".", "ibm", ".", "websphere", ".", "security", ".", "UserRegistry", "that", "is", "unregistered", "in", "the", "OSGi", "service", "registry", ".", "We", "must", "remove", "this", "instance", "from", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.registry/src/com/ibm/ws/security/registry/internal/CustomUserRegistryFactory.java#L79-L86
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getPackageLink
public Content getPackageLink(PackageElement packageElement, CharSequence label) { """ Return the link to the given package. @param packageElement the package to link to. @param label the label for the link. @return a content tree for the package link. """ return getPackageLink(packageElement, new...
java
public Content getPackageLink(PackageElement packageElement, CharSequence label) { return getPackageLink(packageElement, new StringContent(label)); }
[ "public", "Content", "getPackageLink", "(", "PackageElement", "packageElement", ",", "CharSequence", "label", ")", "{", "return", "getPackageLink", "(", "packageElement", ",", "new", "StringContent", "(", "label", ")", ")", ";", "}" ]
Return the link to the given package. @param packageElement the package to link to. @param label the label for the link. @return a content tree for the package link.
[ "Return", "the", "link", "to", "the", "given", "package", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1096-L1098
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java
JMElasticsearchIndex.upsertData
public UpdateResponse upsertData(String jsonSource, String index, String type, String id) { """ Upsert data update response. @param jsonSource the json source @param index the index @param type the type @param id the id @return the update response """ return upsert...
java
public UpdateResponse upsertData(String jsonSource, String index, String type, String id) { return upsertQuery(buildPrepareUpsert(index, type, id, jsonSource)); }
[ "public", "UpdateResponse", "upsertData", "(", "String", "jsonSource", ",", "String", "index", ",", "String", "type", ",", "String", "id", ")", "{", "return", "upsertQuery", "(", "buildPrepareUpsert", "(", "index", ",", "type", ",", "id", ",", "jsonSource", ...
Upsert data update response. @param jsonSource the json source @param index the index @param type the type @param id the id @return the update response
[ "Upsert", "data", "update", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchIndex.java#L146-L149
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/curves/DiscountCurveInterpolation.java
DiscountCurveInterpolation.createDiscountCurveFromZeroRates
public static DiscountCurveInterpolation createDiscountCurveFromZeroRates( String name, LocalDate referenceDate, double[] times, double[] givenZeroRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { """ ...
java
public static DiscountCurveInterpolation createDiscountCurveFromZeroRates( String name, LocalDate referenceDate, double[] times, double[] givenZeroRates, boolean[] isParameter, InterpolationMethod interpolationMethod, ExtrapolationMethod extrapolationMethod, InterpolationEntity interpolationEntity) { double...
[ "public", "static", "DiscountCurveInterpolation", "createDiscountCurveFromZeroRates", "(", "String", "name", ",", "LocalDate", "referenceDate", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenZeroRates", ",", "boolean", "[", "]", "isParameter", ",",...
Create a discount curve from given times and given zero rates using given interpolation and extrapolation methods. The discount factor is determined by <code> givenDiscountFactors[timeIndex] = Math.exp(- givenZeroRates[timeIndex] * times[timeIndex]); </code> @param name The name of this discount curve. @param referenc...
[ "Create", "a", "discount", "curve", "from", "given", "times", "and", "given", "zero", "rates", "using", "given", "interpolation", "and", "extrapolation", "methods", ".", "The", "discount", "factor", "is", "determined", "by", "<code", ">", "givenDiscountFactors", ...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/DiscountCurveInterpolation.java#L183-L195
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.smoothQuadTo
public SVGPath smoothQuadTo(double x, double y) { """ Smooth quadratic Bezier line to the given coordinates. @param x new coordinates @param y new coordinates @return path object, for compact syntax. """ return append(PATH_SMOOTH_QUAD_TO).append(x).append(y); }
java
public SVGPath smoothQuadTo(double x, double y) { return append(PATH_SMOOTH_QUAD_TO).append(x).append(y); }
[ "public", "SVGPath", "smoothQuadTo", "(", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_SMOOTH_QUAD_TO", ")", ".", "append", "(", "x", ")", ".", "append", "(", "y", ")", ";", "}" ]
Smooth quadratic Bezier line to the given coordinates. @param x new coordinates @param y new coordinates @return path object, for compact syntax.
[ "Smooth", "quadratic", "Bezier", "line", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L503-L505
Wikidata/Wikidata-Toolkit
wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/StatementUpdate.java
StatementUpdate.isSameSnakSet
protected boolean isSameSnakSet(Iterator<Snak> snaks1, Iterator<Snak> snaks2) { """ Compares two sets of snaks, given by iterators. The method is optimised for short lists of snaks, as they are typically found in claims and references. @param snaks1 @param snaks2 @return true if the lists are equal """ ...
java
protected boolean isSameSnakSet(Iterator<Snak> snaks1, Iterator<Snak> snaks2) { ArrayList<Snak> snakList1 = new ArrayList<>(5); while (snaks1.hasNext()) { snakList1.add(snaks1.next()); } int snakCount2 = 0; while (snaks2.hasNext()) { snakCount2++; Snak snak2 = snaks2.next(); boolean found = false...
[ "protected", "boolean", "isSameSnakSet", "(", "Iterator", "<", "Snak", ">", "snaks1", ",", "Iterator", "<", "Snak", ">", "snaks2", ")", "{", "ArrayList", "<", "Snak", ">", "snakList1", "=", "new", "ArrayList", "<>", "(", "5", ")", ";", "while", "(", "s...
Compares two sets of snaks, given by iterators. The method is optimised for short lists of snaks, as they are typically found in claims and references. @param snaks1 @param snaks2 @return true if the lists are equal
[ "Compares", "two", "sets", "of", "snaks", "given", "by", "iterators", ".", "The", "method", "is", "optimised", "for", "short", "lists", "of", "snaks", "as", "they", "are", "typically", "found", "in", "claims", "and", "references", "." ]
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/StatementUpdate.java#L550-L574
prestodb/presto
presto-main/src/main/java/com/facebook/presto/sql/relational/RowExpressionTreeRewriter.java
RowExpressionTreeRewriter.defaultRewrite
@SuppressWarnings("unchecked") public <T extends RowExpression> T defaultRewrite(T node, C context) { """ Invoke the default rewrite logic explicitly. Specifically, it skips the invocation of the expression rewriter for the provided node. """ return (T) node.accept(visitor, new Context<>(context, t...
java
@SuppressWarnings("unchecked") public <T extends RowExpression> T defaultRewrite(T node, C context) { return (T) node.accept(visitor, new Context<>(context, true)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "RowExpression", ">", "T", "defaultRewrite", "(", "T", "node", ",", "C", "context", ")", "{", "return", "(", "T", ")", "node", ".", "accept", "(", "visitor", ",", "new", ...
Invoke the default rewrite logic explicitly. Specifically, it skips the invocation of the expression rewriter for the provided node.
[ "Invoke", "the", "default", "rewrite", "logic", "explicitly", ".", "Specifically", "it", "skips", "the", "invocation", "of", "the", "expression", "rewriter", "for", "the", "provided", "node", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/sql/relational/RowExpressionTreeRewriter.java#L71-L75
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getChampion
public Future<Champion> getChampion(int id, ChampData champData) { """ <p> Get information about the specified champion </p> This method does not count towards the rate limit and is not affected by the throttle @param id The id of the champion @param champData Additional information to retrieve @return The c...
java
public Future<Champion> getChampion(int id, ChampData champData) { return new DummyFuture<>(handler.getChampion(id, champData)); }
[ "public", "Future", "<", "Champion", ">", "getChampion", "(", "int", "id", ",", "ChampData", "champData", ")", "{", "return", "new", "DummyFuture", "<>", "(", "handler", ".", "getChampion", "(", "id", ",", "champData", ")", ")", ";", "}" ]
<p> Get information about the specified champion </p> This method does not count towards the rate limit and is not affected by the throttle @param id The id of the champion @param champData Additional information to retrieve @return The champion @see <a href=https://developer.riotgames.com/api/methods#!/649/2169>Offici...
[ "<p", ">", "Get", "information", "about", "the", "specified", "champion", "<", "/", "p", ">", "This", "method", "does", "not", "count", "towards", "the", "rate", "limit", "and", "is", "not", "affected", "by", "the", "throttle" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L423-L425
spring-projects/spring-retry
src/main/java/org/springframework/retry/policy/ExceptionClassifierRetryPolicy.java
ExceptionClassifierRetryPolicy.setPolicyMap
public void setPolicyMap(Map<Class<? extends Throwable>, RetryPolicy> policyMap) { """ Setter for policy map used to create a classifier. Either this property or the exception classifier directly should be set, but not both. @param policyMap a map of Throwable class to {@link RetryPolicy} that will be used to c...
java
public void setPolicyMap(Map<Class<? extends Throwable>, RetryPolicy> policyMap) { this.exceptionClassifier = new SubclassClassifier<Throwable, RetryPolicy>( policyMap, new NeverRetryPolicy()); }
[ "public", "void", "setPolicyMap", "(", "Map", "<", "Class", "<", "?", "extends", "Throwable", ">", ",", "RetryPolicy", ">", "policyMap", ")", "{", "this", ".", "exceptionClassifier", "=", "new", "SubclassClassifier", "<", "Throwable", ",", "RetryPolicy", ">", ...
Setter for policy map used to create a classifier. Either this property or the exception classifier directly should be set, but not both. @param policyMap a map of Throwable class to {@link RetryPolicy} that will be used to create a {@link Classifier} to locate a policy.
[ "Setter", "for", "policy", "map", "used", "to", "create", "a", "classifier", ".", "Either", "this", "property", "or", "the", "exception", "classifier", "directly", "should", "be", "set", "but", "not", "both", "." ]
train
https://github.com/spring-projects/spring-retry/blob/e2b0555f96594c2321990d0deeac45fc44d4f123/src/main/java/org/springframework/retry/policy/ExceptionClassifierRetryPolicy.java#L49-L52
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/LRUCache.java
LRUCache.putIfDifferent
public V putIfDifferent( final K key, final V value ) { """ If the specified key is not already associated with a value or if it's associated with a different value, associate it with the given value. This is equivalent to <pre> <code> if (map.get(key) == null || !map.get(key).equals(value)) return map.put(...
java
public V putIfDifferent( final K key, final V value ) { synchronized ( _map ) { final ManagedItem<V> item = _map.get( key ); if ( item == null || item._value == null || !item._value.equals( value ) ) { return put( key, value ); } else { return ...
[ "public", "V", "putIfDifferent", "(", "final", "K", "key", ",", "final", "V", "value", ")", "{", "synchronized", "(", "_map", ")", "{", "final", "ManagedItem", "<", "V", ">", "item", "=", "_map", ".", "get", "(", "key", ")", ";", "if", "(", "item",...
If the specified key is not already associated with a value or if it's associated with a different value, associate it with the given value. This is equivalent to <pre> <code> if (map.get(key) == null || !map.get(key).equals(value)) return map.put(key, value); else return map.get(key); </code> </pre> except that the ...
[ "If", "the", "specified", "key", "is", "not", "already", "associated", "with", "a", "value", "or", "if", "it", "s", "associated", "with", "a", "different", "value", "associate", "it", "with", "the", "given", "value", ".", "This", "is", "equivalent", "to" ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/LRUCache.java#L123-L132
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java
RegisterUtils.getLocalVariableEndRange
public static int getLocalVariableEndRange(LocalVariableTable lvt, int reg, int curPC) { """ returns the end pc of the visible range of this register at this pc @param lvt the local variable table for this method @param reg the register to examine @param curPC the pc of the current instruction @return the...
java
public static int getLocalVariableEndRange(LocalVariableTable lvt, int reg, int curPC) { int endRange = Integer.MAX_VALUE; if (lvt != null) { LocalVariable lv = lvt.getLocalVariable(reg, curPC); if (lv != null) { endRange = lv.getStartPC() + lv.getLength(); ...
[ "public", "static", "int", "getLocalVariableEndRange", "(", "LocalVariableTable", "lvt", ",", "int", "reg", ",", "int", "curPC", ")", "{", "int", "endRange", "=", "Integer", ".", "MAX_VALUE", ";", "if", "(", "lvt", "!=", "null", ")", "{", "LocalVariable", ...
returns the end pc of the visible range of this register at this pc @param lvt the local variable table for this method @param reg the register to examine @param curPC the pc of the current instruction @return the endpc
[ "returns", "the", "end", "pc", "of", "the", "visible", "range", "of", "this", "register", "at", "this", "pc" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/utils/RegisterUtils.java#L144-L153
OpenLiberty/open-liberty
dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java
RecoveryDirectorImpl.terminationComplete
@Override public void terminationComplete(RecoveryAgent recoveryAgent, FailureScope failureScope) throws InvalidFailureScopeException { """ <p> Invoked by a client service to indicate recovery processing for the identified FailureScope ceased. The client service supplies its RecoveryAgent reference to ident...
java
@Override public void terminationComplete(RecoveryAgent recoveryAgent, FailureScope failureScope) throws InvalidFailureScopeException { if (tc.isEntryEnabled()) Tr.entry(tc, "terminationComplete", new Object[] { recoveryAgent, failureScope, this }); final boolean removed = removeTermina...
[ "@", "Override", "public", "void", "terminationComplete", "(", "RecoveryAgent", "recoveryAgent", ",", "FailureScope", "failureScope", ")", "throws", "InvalidFailureScopeException", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", "("...
<p> Invoked by a client service to indicate recovery processing for the identified FailureScope ceased. The client service supplies its RecoveryAgent reference to identify itself. </p> <p> The RecoveryDirector will then pass the termination request on to other registered client services. </p> @param recoveryAgent The...
[ "<p", ">", "Invoked", "by", "a", "client", "service", "to", "indicate", "recovery", "processing", "for", "the", "identified", "FailureScope", "ceased", ".", "The", "client", "service", "supplies", "its", "RecoveryAgent", "reference", "to", "identify", "itself", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L550-L567
lamydev/Android-Notification
core/src/zemin/notification/NotificationEntry.java
NotificationEntry.addAction
public void addAction(int icon, CharSequence title, Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { """ Add a action to this notification. Actions are typically displayed as a button adjacent to ...
java
public void addAction(int icon, CharSequence title, Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { addAction(new Action(icon, title, listener, activity, service, broadcast, extra)); }
[ "public", "void", "addAction", "(", "int", "icon", ",", "CharSequence", "title", ",", "Action", ".", "OnActionListener", "listener", ",", "ComponentName", "activity", ",", "ComponentName", "service", ",", "String", "broadcast", ",", "Bundle", "extra", ")", "{", ...
Add a action to this notification. Actions are typically displayed as a button adjacent to the notification content. @see android.app.Notification#addAction @param icon @param title @param listener @param activity The activity to be started. @param service The service to be started. @param broadcast The broadcast to ...
[ "Add", "a", "action", "to", "this", "notification", ".", "Actions", "are", "typically", "displayed", "as", "a", "button", "adjacent", "to", "the", "notification", "content", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L557-L561
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.createCustomField
public CustomFields createCustomField(String accountId, CustomField customField, AccountsApi.CreateCustomFieldOptions options) throws ApiException { """ Creates an acount custom field. @param accountId The external account number (int) or account ID Guid. (required) @param customField (optional) @param optio...
java
public CustomFields createCustomField(String accountId, CustomField customField, AccountsApi.CreateCustomFieldOptions options) throws ApiException { Object localVarPostBody = customField; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, ...
[ "public", "CustomFields", "createCustomField", "(", "String", "accountId", ",", "CustomField", "customField", ",", "AccountsApi", ".", "CreateCustomFieldOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "customField", ";", "// v...
Creates an acount custom field. @param accountId The external account number (int) or account ID Guid. (required) @param customField (optional) @param options for modifying the method behavior. @return CustomFields @throws ApiException if fails to make API call
[ "Creates", "an", "acount", "custom", "field", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L212-L248
axibase/atsd-api-java
src/main/java/com/axibase/tsd/model/data/series/Sample.java
Sample.ofIsoText
public static Sample ofIsoText(String isoDate, String textValue) { """ Creates a new {@link Sample} with date in ISO 8061 format and text value specified @param isoDate date in ISO 8061 format according to <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> @param textValue the text value of ...
java
public static Sample ofIsoText(String isoDate, String textValue) { return new Sample(null, isoDate, null, textValue); }
[ "public", "static", "Sample", "ofIsoText", "(", "String", "isoDate", ",", "String", "textValue", ")", "{", "return", "new", "Sample", "(", "null", ",", "isoDate", ",", "null", ",", "textValue", ")", ";", "}" ]
Creates a new {@link Sample} with date in ISO 8061 format and text value specified @param isoDate date in ISO 8061 format according to <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> @param textValue the text value of the sample @return the Sample with specified fields
[ "Creates", "a", "new", "{", "@link", "Sample", "}", "with", "date", "in", "ISO", "8061", "format", "and", "text", "value", "specified" ]
train
https://github.com/axibase/atsd-api-java/blob/63a0767d08b202dad2ebef4372ff947d6fba0246/src/main/java/com/axibase/tsd/model/data/series/Sample.java#L130-L132
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.validateScriptType
private static void validateScriptType(ScriptWrapper script, String scriptType) throws IllegalArgumentException { """ Validates that the given {@code script} is of the given {@code scriptType}, throwing an {@code IllegalArgumentException} if not. @param script the script that will be checked, must not be {@cod...
java
private static void validateScriptType(ScriptWrapper script, String scriptType) throws IllegalArgumentException { if (!scriptType.equals(script.getTypeName())) { throw new IllegalArgumentException("Script " + script.getName() + " is not a '" + scriptType + "' script: " + script.getTypeName()); } }
[ "private", "static", "void", "validateScriptType", "(", "ScriptWrapper", "script", ",", "String", "scriptType", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "scriptType", ".", "equals", "(", "script", ".", "getTypeName", "(", ")", ")", ")", ...
Validates that the given {@code script} is of the given {@code scriptType}, throwing an {@code IllegalArgumentException} if not. @param script the script that will be checked, must not be {@code null} @param scriptType the expected type of the script, must not be {@code null} @throws IllegalArgumentException if the gi...
[ "Validates", "that", "the", "given", "{", "@code", "script", "}", "is", "of", "the", "given", "{", "@code", "scriptType", "}", "throwing", "an", "{", "@code", "IllegalArgumentException", "}", "if", "not", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1419-L1424
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setTime
@Override public void setTime(int parameterIndex, Time x) throws SQLException { """ Method setTime. @param parameterIndex @param x @throws SQLException @see java.sql.PreparedStatement#setTime(int, Time) """ internalStmt.setTime(parameterIndex, x); }
java
@Override public void setTime(int parameterIndex, Time x) throws SQLException { internalStmt.setTime(parameterIndex, x); }
[ "@", "Override", "public", "void", "setTime", "(", "int", "parameterIndex", ",", "Time", "x", ")", "throws", "SQLException", "{", "internalStmt", ".", "setTime", "(", "parameterIndex", ",", "x", ")", ";", "}" ]
Method setTime. @param parameterIndex @param x @throws SQLException @see java.sql.PreparedStatement#setTime(int, Time)
[ "Method", "setTime", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L1004-L1007
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java
ImportMatrixLoader.createProducts
protected void createProducts(ImportMatrix matrix, PCMContainer pcmContainer, Map<Integer, Feature> positionToFeature) { """ Detect and create products from the information contained in the matrix and the provided direction @param matrix matrix @param pcmContainer PCM container @param positionToFeature map betw...
java
protected void createProducts(ImportMatrix matrix, PCMContainer pcmContainer, Map<Integer, Feature> positionToFeature) { int featuresDepth = pcmContainer.getPcm().getFeaturesDepth(); for (int row = featuresDepth; row < matrix.getNumberOfRows(); row++) { Product product = factory.createProd...
[ "protected", "void", "createProducts", "(", "ImportMatrix", "matrix", ",", "PCMContainer", "pcmContainer", ",", "Map", "<", "Integer", ",", "Feature", ">", "positionToFeature", ")", "{", "int", "featuresDepth", "=", "pcmContainer", ".", "getPcm", "(", ")", ".", ...
Detect and create products from the information contained in the matrix and the provided direction @param matrix matrix @param pcmContainer PCM container @param positionToFeature map between positions and features
[ "Detect", "and", "create", "products", "from", "the", "information", "contained", "in", "the", "matrix", "and", "the", "provided", "direction" ]
train
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java#L270-L298
apache/groovy
src/main/java/org/codehaus/groovy/control/ErrorCollector.java
ErrorCollector.addError
public void addError(Message message, boolean fatal) throws CompilationFailedException { """ Adds an optionally-fatal error to the message set. The message is not required to have a source line and column specified, but it is best practice to try and include that information. @param fatal if true then then pro...
java
public void addError(Message message, boolean fatal) throws CompilationFailedException { if (fatal) { addFatalError(message); } else { addError(message); } }
[ "public", "void", "addError", "(", "Message", "message", ",", "boolean", "fatal", ")", "throws", "CompilationFailedException", "{", "if", "(", "fatal", ")", "{", "addFatalError", "(", "message", ")", ";", "}", "else", "{", "addError", "(", "message", ")", ...
Adds an optionally-fatal error to the message set. The message is not required to have a source line and column specified, but it is best practice to try and include that information. @param fatal if true then then processing will stop
[ "Adds", "an", "optionally", "-", "fatal", "error", "to", "the", "message", "set", ".", "The", "message", "is", "not", "required", "to", "have", "a", "source", "line", "and", "column", "specified", "but", "it", "is", "best", "practice", "to", "try", "and"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/control/ErrorCollector.java#L119-L126
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.overlap
public static double overlap(Range range, Range otherRange) { """ Percentage, from 0 to 1, of the first range that is contained by the second range. @param range the range to be contained by the second @param otherRange the range that has to contain the first @return from 0 (if there is no intersection) to 1...
java
public static double overlap(Range range, Range otherRange) { double minOverlap = Math.max(range.getMinimum().doubleValue(), otherRange.getMinimum().doubleValue()); double maxOverlap = Math.min(range.getMaximum().doubleValue(), otherRange.getMaximum().doubleValue()); double overlapWidth = maxOve...
[ "public", "static", "double", "overlap", "(", "Range", "range", ",", "Range", "otherRange", ")", "{", "double", "minOverlap", "=", "Math", ".", "max", "(", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", ",", "otherRange", ".", "getMi...
Percentage, from 0 to 1, of the first range that is contained by the second range. @param range the range to be contained by the second @param otherRange the range that has to contain the first @return from 0 (if there is no intersection) to 1 (if the ranges are the same)
[ "Percentage", "from", "0", "to", "1", "of", "the", "first", "range", "that", "is", "contained", "by", "the", "second", "range", "." ]
train
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L166-L173
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/MathUtils.java
MathUtils.lerp
static double lerp(double start_, double end_, double t) { """ Computes interpolation between two values, using the interpolation factor t. The interpolation formula is (end - start) * t + start. However, the computation ensures that t = 0 produces exactly start, and t = 1, produces exactly end. It also guarant...
java
static double lerp(double start_, double end_, double t) { // When end == start, we want result to be equal to start, for all t // values. At the same time, when end != start, we want the result to be // equal to start for t==0 and end for t == 1.0 // The regular formula end_ * t + (1.0 - t) * start_, when end_...
[ "static", "double", "lerp", "(", "double", "start_", ",", "double", "end_", ",", "double", "t", ")", "{", "// When end == start, we want result to be equal to start, for all t", "// values. At the same time, when end != start, we want the result to be", "// equal to start for t==0 an...
Computes interpolation between two values, using the interpolation factor t. The interpolation formula is (end - start) * t + start. However, the computation ensures that t = 0 produces exactly start, and t = 1, produces exactly end. It also guarantees that for 0 <= t <= 1, the interpolated value v is between start and...
[ "Computes", "interpolation", "between", "two", "values", "using", "the", "interpolation", "factor", "t", ".", "The", "interpolation", "formula", "is", "(", "end", "-", "start", ")", "*", "t", "+", "start", ".", "However", "the", "computation", "ensures", "th...
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MathUtils.java#L174-L188
google/closure-compiler
src/com/google/javascript/jscomp/RemoveUnusedCode.java
RemoveUnusedCode.markUnusedParameters
private void markUnusedParameters(Node paramList, Scope fparamScope) { """ Mark any remaining unused parameters as being unused so it can be used elsewhere. @param paramList list of function's parameters @param fparamScope """ for (Node param = paramList.getFirstChild(); param != null; param = param.ge...
java
private void markUnusedParameters(Node paramList, Scope fparamScope) { for (Node param = paramList.getFirstChild(); param != null; param = param.getNext()) { if (param.isUnusedParameter()) { continue; } Node lValue = nameOfParam(param); if (lValue == null) { continue; ...
[ "private", "void", "markUnusedParameters", "(", "Node", "paramList", ",", "Scope", "fparamScope", ")", "{", "for", "(", "Node", "param", "=", "paramList", ".", "getFirstChild", "(", ")", ";", "param", "!=", "null", ";", "param", "=", "param", ".", "getNext...
Mark any remaining unused parameters as being unused so it can be used elsewhere. @param paramList list of function's parameters @param fparamScope
[ "Mark", "any", "remaining", "unused", "parameters", "as", "being", "unused", "so", "it", "can", "be", "used", "elsewhere", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/RemoveUnusedCode.java#L1415-L1432
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/ConnectApi.java
ConnectApi.getEventLog
public ConnectLog getEventLog(String accountId, String logId, ConnectApi.GetEventLogOptions options) throws ApiException { """ Get the specified Connect log entry. Retrieves the specified Connect log entry for your account. ###### Note: The &#x60;enableLog&#x60; setting in the Connect configuration must be set t...
java
public ConnectLog getEventLog(String accountId, String logId, ConnectApi.GetEventLogOptions options) throws ApiException { Object localVarPostBody = "{}"; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException(400, "Missing the required parameter '...
[ "public", "ConnectLog", "getEventLog", "(", "String", "accountId", ",", "String", "logId", ",", "ConnectApi", ".", "GetEventLogOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "\"{}\"", ";", "// verify the required parameter 'a...
Get the specified Connect log entry. Retrieves the specified Connect log entry for your account. ###### Note: The &#x60;enableLog&#x60; setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded. @param accountId The external account number (...
[ "Get", "the", "specified", "Connect", "log", "entry", ".", "Retrieves", "the", "specified", "Connect", "log", "entry", "for", "your", "account", ".", "######", "Note", ":", "The", "&#x60", ";", "enableLog&#x60", ";", "setting", "in", "the", "Connect", "confi...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/ConnectApi.java#L362-L404
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/modules/CmsCloneModuleThread.java
CmsCloneModuleThread.adjustConfigs
private void adjustConfigs(CmsModule targetModule, Map<I_CmsResourceType, I_CmsResourceType> resTypeMap) throws CmsException, UnsupportedEncodingException { """ Adjusts the module configuration file and the formatter configurations.<p> @param targetModule the target module @param resTypeMap the resource ty...
java
private void adjustConfigs(CmsModule targetModule, Map<I_CmsResourceType, I_CmsResourceType> resTypeMap) throws CmsException, UnsupportedEncodingException { String modPath = CmsWorkplace.VFS_PATH_MODULES + targetModule.getName() + "/"; CmsObject cms = getCms(); if (((m_cloneInfo.getSourceNa...
[ "private", "void", "adjustConfigs", "(", "CmsModule", "targetModule", ",", "Map", "<", "I_CmsResourceType", ",", "I_CmsResourceType", ">", "resTypeMap", ")", "throws", "CmsException", ",", "UnsupportedEncodingException", "{", "String", "modPath", "=", "CmsWorkplace", ...
Adjusts the module configuration file and the formatter configurations.<p> @param targetModule the target module @param resTypeMap the resource type mapping @throws CmsException if something goes wrong @throws UnsupportedEncodingException if the file content could not be read with the determined encoding
[ "Adjusts", "the", "module", "configuration", "file", "and", "the", "formatter", "configurations", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/modules/CmsCloneModuleThread.java#L345-L393
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/modules/CmsExportpointsList.java
CmsExportpointsList.deleteExportpoint
private void deleteExportpoint(CmsModule module, String exportpoint) { """ Deletes a module exportpoint from a module.<p> @param module the module to delete the dependency from @param exportpoint the name of the exportpoint to delete """ List oldExportpoints = module.getExportPoints(); Lis...
java
private void deleteExportpoint(CmsModule module, String exportpoint) { List oldExportpoints = module.getExportPoints(); List newExportpoints = new ArrayList(); Iterator i = oldExportpoints.iterator(); while (i.hasNext()) { CmsExportPoint exp = (CmsExportPoint)i.next(); ...
[ "private", "void", "deleteExportpoint", "(", "CmsModule", "module", ",", "String", "exportpoint", ")", "{", "List", "oldExportpoints", "=", "module", ".", "getExportPoints", "(", ")", ";", "List", "newExportpoints", "=", "new", "ArrayList", "(", ")", ";", "Ite...
Deletes a module exportpoint from a module.<p> @param module the module to delete the dependency from @param exportpoint the name of the exportpoint to delete
[ "Deletes", "a", "module", "exportpoint", "from", "a", "module", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/modules/CmsExportpointsList.java#L379-L405
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/SerIteratorFactory.java
SerIteratorFactory.navigableMap
public static final SerIterable navigableMap(final Class<?> keyType, final Class<?> valueType, final List<Class<?>> valueTypeTypes) { """ Gets an iterable wrapper for {@code NavigableMap}. @param keyType the value type, not null @param valueType the value type, not null @param valueTypeTypes the generic pa...
java
public static final SerIterable navigableMap(final Class<?> keyType, final Class<?> valueType, final List<Class<?>> valueTypeTypes) { final NavigableMap<Object, Object> map = new TreeMap<>(); return map(keyType, valueType, valueTypeTypes, map); }
[ "public", "static", "final", "SerIterable", "navigableMap", "(", "final", "Class", "<", "?", ">", "keyType", ",", "final", "Class", "<", "?", ">", "valueType", ",", "final", "List", "<", "Class", "<", "?", ">", ">", "valueTypeTypes", ")", "{", "final", ...
Gets an iterable wrapper for {@code NavigableMap}. @param keyType the value type, not null @param valueType the value type, not null @param valueTypeTypes the generic parameters of the value type @return the iterable, not null
[ "Gets", "an", "iterable", "wrapper", "for", "{", "@code", "NavigableMap", "}", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/SerIteratorFactory.java#L562-L565
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.concatRows
public static DMatrixSparseCSC concatRows(DMatrixSparseCSC top , DMatrixSparseCSC bottom , @Nullable DMatrixSparseCSC out ) { """ Concats two matrices along their rows (vertical). @param top Matrix on the top @param bottom Matrix on the bototm @param out (Output) ...
java
public static DMatrixSparseCSC concatRows(DMatrixSparseCSC top , DMatrixSparseCSC bottom , @Nullable DMatrixSparseCSC out ) { if( top.numCols != bottom.numCols ) throw new MatrixDimensionException("Number of columns must match. "+stringShapes(top,bot...
[ "public", "static", "DMatrixSparseCSC", "concatRows", "(", "DMatrixSparseCSC", "top", ",", "DMatrixSparseCSC", "bottom", ",", "@", "Nullable", "DMatrixSparseCSC", "out", ")", "{", "if", "(", "top", ".", "numCols", "!=", "bottom", ".", "numCols", ")", "throw", ...
Concats two matrices along their rows (vertical). @param top Matrix on the top @param bottom Matrix on the bototm @param out (Output) (Optional) Storage for combined matrix. Resized. @return Combination of the two matrices
[ "Concats", "two", "matrices", "along", "their", "rows", "(", "vertical", ")", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1051-L1086
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventDimensions.java
EventDimensions.withMetrics
public EventDimensions withMetrics(java.util.Map<String, MetricDimension> metrics) { """ Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter. @param metrics Custom metrics that your app reports to Amazon Pinpoint. You can ...
java
public EventDimensions withMetrics(java.util.Map<String, MetricDimension> metrics) { setMetrics(metrics); return this; }
[ "public", "EventDimensions", "withMetrics", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "MetricDimension", ">", "metrics", ")", "{", "setMetrics", "(", "metrics", ")", ";", "return", "this", ";", "}" ]
Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter. @param metrics Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter. @return Returns a refe...
[ "Custom", "metrics", "that", "your", "app", "reports", "to", "Amazon", "Pinpoint", ".", "You", "can", "use", "these", "attributes", "as", "selection", "criteria", "when", "you", "create", "an", "event", "filter", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventDimensions.java#L181-L184
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
public static <T> List<T> getAt(List<T> self, EmptyRange range) { """ Support the range subscript operator for a List. <pre class="groovyTestCase"> def list = [true, 1, 3.4] {@code assert list[0..<0] == []} </pre> @param self a List @param range a Range indicating the items to get @return a new list inst...
java
public static <T> List<T> getAt(List<T> self, EmptyRange range) { return createSimilarList(self, 0); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "getAt", "(", "List", "<", "T", ">", "self", ",", "EmptyRange", "range", ")", "{", "return", "createSimilarList", "(", "self", ",", "0", ")", ";", "}" ]
Support the range subscript operator for a List. <pre class="groovyTestCase"> def list = [true, 1, 3.4] {@code assert list[0..<0] == []} </pre> @param self a List @param range a Range indicating the items to get @return a new list instance based on range borders @since 1.0
[ "Support", "the", "range", "subscript", "operator", "for", "a", "List", ".", "<pre", "class", "=", "groovyTestCase", ">", "def", "list", "=", "[", "true", "1", "3", ".", "4", "]", "{", "@code", "assert", "list", "[", "0", "..", "<0", "]", "==", "[]...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L7654-L7656
drewnoakes/metadata-extractor
Source/com/drew/tools/FileUtil.java
FileUtil.saveBytes
public static void saveBytes(@NotNull File file, @NotNull byte[] bytes) throws IOException { """ Saves the contents of a <code>byte[]</code> to the specified {@link File}. """ FileOutputStream stream = null; try { stream = new FileOutputStream(file); stream.write(bytes);...
java
public static void saveBytes(@NotNull File file, @NotNull byte[] bytes) throws IOException { FileOutputStream stream = null; try { stream = new FileOutputStream(file); stream.write(bytes); } finally { if (stream != null) { stream.close(); ...
[ "public", "static", "void", "saveBytes", "(", "@", "NotNull", "File", "file", ",", "@", "NotNull", "byte", "[", "]", "bytes", ")", "throws", "IOException", "{", "FileOutputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "new", "FileOutputSt...
Saves the contents of a <code>byte[]</code> to the specified {@link File}.
[ "Saves", "the", "contents", "of", "a", "<code", ">", "byte", "[]", "<", "/", "code", ">", "to", "the", "specified", "{" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/tools/FileUtil.java#L41-L52
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java
CodepointHelper.verify
public static void verify (@Nullable final String sStr, @Nonnull final ECodepointProfile eProfile) { """ Verifies a sequence of codepoints using the specified profile @param sStr String @param eProfile profile to use """ if (sStr != null) verify (new CodepointIteratorCharSequence (sStr), eProfi...
java
public static void verify (@Nullable final String sStr, @Nonnull final ECodepointProfile eProfile) { if (sStr != null) verify (new CodepointIteratorCharSequence (sStr), eProfile); }
[ "public", "static", "void", "verify", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nonnull", "final", "ECodepointProfile", "eProfile", ")", "{", "if", "(", "sStr", "!=", "null", ")", "verify", "(", "new", "CodepointIteratorCharSequence", "(", ...
Verifies a sequence of codepoints using the specified profile @param sStr String @param eProfile profile to use
[ "Verifies", "a", "sequence", "of", "codepoints", "using", "the", "specified", "profile" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java#L789-L793
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/LiveEventsInner.java
LiveEventsInner.beginStart
public void beginStart(String resourceGroupName, String accountName, String liveEventName) { """ Start Live Event. Starts an existing Live Event. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param liveEventName The...
java
public void beginStart(String resourceGroupName, String accountName, String liveEventName) { beginStartWithServiceResponseAsync(resourceGroupName, accountName, liveEventName).toBlocking().single().body(); }
[ "public", "void", "beginStart", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "liveEventName", ")", "{", "beginStartWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "liveEventName", ")", ".", "toBlocking", ...
Start Live Event. Starts an existing Live Event. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param liveEventName The name of the Live Event. @throws IllegalArgumentException thrown if parameters fail the validation @throws ...
[ "Start", "Live", "Event", ".", "Starts", "an", "existing", "Live", "Event", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/LiveEventsInner.java#L1197-L1199
alkacon/opencms-core
src-gwt/org/opencms/ui/client/CmsSitemapExtensionConnector.java
CmsSitemapExtensionConnector.openPageCopyDialog
public void openPageCopyDialog(String structureId, AsyncCallback<String> callback) { """ Opens the page copy dialog.<p> @param structureId the structure id of the resource for which to open the dialog @param callback the callback to call with the result when the dialog has finished """ String call...
java
public void openPageCopyDialog(String structureId, AsyncCallback<String> callback) { String callId = "" + CALL_COUNTER++; m_callbacks.put(callId, callback); getRpcProxy(I_CmsSitemapServerRpc.class).openPageCopyDialog(callId, "" + structureId); }
[ "public", "void", "openPageCopyDialog", "(", "String", "structureId", ",", "AsyncCallback", "<", "String", ">", "callback", ")", "{", "String", "callId", "=", "\"\"", "+", "CALL_COUNTER", "++", ";", "m_callbacks", ".", "put", "(", "callId", ",", "callback", ...
Opens the page copy dialog.<p> @param structureId the structure id of the resource for which to open the dialog @param callback the callback to call with the result when the dialog has finished
[ "Opens", "the", "page", "copy", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ui/client/CmsSitemapExtensionConnector.java#L111-L117
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java
PropPatchResponseEntity.removeProperty
private String removeProperty(Node node, HierarchicalProperty property) { """ Removes the property. @param node node @param property property @return status """ try { node.getProperty(property.getStringName()).remove(); node.save(); return WebDavConst.getStatu...
java
private String removeProperty(Node node, HierarchicalProperty property) { try { node.getProperty(property.getStringName()).remove(); node.save(); return WebDavConst.getStatusDescription(HTTPStatus.OK); } catch (AccessDeniedException e) { r...
[ "private", "String", "removeProperty", "(", "Node", "node", ",", "HierarchicalProperty", "property", ")", "{", "try", "{", "node", ".", "getProperty", "(", "property", ".", "getStringName", "(", ")", ")", ".", "remove", "(", ")", ";", "node", ".", "save", ...
Removes the property. @param node node @param property property @return status
[ "Removes", "the", "property", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/proppatch/PropPatchResponseEntity.java#L418-L444
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.skipLast
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable<T> skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { """ Returns a Flowable that drops items emitted by the source Publisher...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable<T> skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { ObjectHelper.requireNonNull(unit, "unit is null"); ObjectHel...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "UNBOUNDED_IN", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "final", "Flowable", "<", "T", ">", "skipLast", "(", "long", "time", ",", "Tim...
Returns a Flowable that drops items emitted by the source Publisher during a specified time window (defined on a specified scheduler) before the source completes. <p> <img width="640" height="340" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/skipLast.ts.png" alt=""> <p> Note: this action will c...
[ "Returns", "a", "Flowable", "that", "drops", "items", "emitted", "by", "the", "source", "Publisher", "during", "a", "specified", "time", "window", "(", "defined", "on", "a", "specified", "scheduler", ")", "before", "the", "source", "completes", ".", "<p", ">...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L14015-L14025
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/SerOptional.java
SerOptional.wrapValue
public static Object wrapValue(MetaProperty<?> metaProp, Class<?> beanType, Object value) { """ Wraps the value of a property if it is an optional. @param metaProp the property to query, not null @param beanType the type of the bean, not null @param value the value to wrap, may be null @return the value o...
java
public static Object wrapValue(MetaProperty<?> metaProp, Class<?> beanType, Object value) { Object[] helpers = OPTIONALS.get(metaProp.propertyType()); if (helpers != null) { try { if (value != null) { value = ((Method) helpers[0]).invoke(null, value); ...
[ "public", "static", "Object", "wrapValue", "(", "MetaProperty", "<", "?", ">", "metaProp", ",", "Class", "<", "?", ">", "beanType", ",", "Object", "value", ")", "{", "Object", "[", "]", "helpers", "=", "OPTIONALS", ".", "get", "(", "metaProp", ".", "pr...
Wraps the value of a property if it is an optional. @param metaProp the property to query, not null @param beanType the type of the bean, not null @param value the value to wrap, may be null @return the value of the property, with any optional wrapper added
[ "Wraps", "the", "value", "of", "a", "property", "if", "it", "is", "an", "optional", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/SerOptional.java#L151-L165
craftercms/profile
security-provider/src/main/java/org/craftercms/security/processors/impl/LogoutProcessor.java
LogoutProcessor.processRequest
public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception { """ Checks if the request URL matches the {@code logoutUrl} and the HTTP method matches the {@code logoutMethod}. If it does, it proceeds to logout the user, by invalidating the authentication throu...
java
public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception { if (isLogoutRequest(context.getRequest())) { logger.debug("Processing logout request"); Authentication auth = SecurityUtils.getAuthentication(context.getRequest()); ...
[ "public", "void", "processRequest", "(", "RequestContext", "context", ",", "RequestSecurityProcessorChain", "processorChain", ")", "throws", "Exception", "{", "if", "(", "isLogoutRequest", "(", "context", ".", "getRequest", "(", ")", ")", ")", "{", "logger", ".", ...
Checks if the request URL matches the {@code logoutUrl} and the HTTP method matches the {@code logoutMethod}. If it does, it proceeds to logout the user, by invalidating the authentication through {@link AuthenticationManager#invalidateAuthentication(Authentication)} @param context the context which holds the c...
[ "Checks", "if", "the", "request", "URL", "matches", "the", "{", "@code", "logoutUrl", "}", "and", "the", "HTTP", "method", "matches", "the", "{", "@code", "logoutMethod", "}", ".", "If", "it", "does", "it", "proceeds", "to", "logout", "the", "user", "by"...
train
https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/processors/impl/LogoutProcessor.java#L93-L106
crnk-project/crnk-framework
crnk-core/src/main/java/io/crnk/core/module/ModuleRegistry.java
ModuleRegistry.checkState
protected void checkState(InitializedState minState, InitializedState maxState) { """ Ensures the {@link ModuleRegistry#init(ObjectMapper)} has not yet been called. """ PreconditionUtil.verify(initializedState.ordinal() >= minState.ordinal(), "not yet initialized, cannot yet be called"); Preco...
java
protected void checkState(InitializedState minState, InitializedState maxState) { PreconditionUtil.verify(initializedState.ordinal() >= minState.ordinal(), "not yet initialized, cannot yet be called"); PreconditionUtil .verify(initializedState.ordinal() <= maxState.ordinal(), "already in...
[ "protected", "void", "checkState", "(", "InitializedState", "minState", ",", "InitializedState", "maxState", ")", "{", "PreconditionUtil", ".", "verify", "(", "initializedState", ".", "ordinal", "(", ")", ">=", "minState", ".", "ordinal", "(", ")", ",", "\"not y...
Ensures the {@link ModuleRegistry#init(ObjectMapper)} has not yet been called.
[ "Ensures", "the", "{" ]
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-core/src/main/java/io/crnk/core/module/ModuleRegistry.java#L251-L255