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
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.ofTree
@SuppressWarnings("unchecked") public static <T, TT extends T> StreamEx<T> ofTree(T root, Class<TT> collectionClass, Function<TT, Stream<T>> mapper) { """ Return a new {@link StreamEx} containing all the nodes of tree-like data structure in depth-first order. <p> The streams created by mapper may be autom...
java
@SuppressWarnings("unchecked") public static <T, TT extends T> StreamEx<T> ofTree(T root, Class<TT> collectionClass, Function<TT, Stream<T>> mapper) { return ofTree(root, t -> collectionClass.isInstance(t) ? mapper.apply((TT) t) : null); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "TT", "extends", "T", ">", "StreamEx", "<", "T", ">", "ofTree", "(", "T", "root", ",", "Class", "<", "TT", ">", "collectionClass", ",", "Function", "<", "TT", ",", ...
Return a new {@link StreamEx} containing all the nodes of tree-like data structure in depth-first order. <p> The streams created by mapper may be automatically {@link java.util.stream.BaseStream#close() closed} after its contents already consumed and unnecessary anymore. It's not guaranteed that all created streams wi...
[ "Return", "a", "new", "{", "@link", "StreamEx", "}", "containing", "all", "the", "nodes", "of", "tree", "-", "like", "data", "structure", "in", "depth", "-", "first", "order", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L2993-L2996
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getLastIndexOf
public static int getLastIndexOf (@Nullable final String sText, final char cSearch) { """ Get the last index of cSearch within sText. @param sText The text to search in. May be <code>null</code>. @param cSearch The character to search for. May be <code>null</code>. @return The last index of sSearch within s...
java
public static int getLastIndexOf (@Nullable final String sText, final char cSearch) { return sText != null && sText.length () >= 1 ? sText.lastIndexOf (cSearch) : STRING_NOT_FOUND; }
[ "public", "static", "int", "getLastIndexOf", "(", "@", "Nullable", "final", "String", "sText", ",", "final", "char", "cSearch", ")", "{", "return", "sText", "!=", "null", "&&", "sText", ".", "length", "(", ")", ">=", "1", "?", "sText", ".", "lastIndexOf"...
Get the last index of cSearch within sText. @param sText The text to search in. May be <code>null</code>. @param cSearch The character to search for. May be <code>null</code>. @return The last index of sSearch within sText or {@value #STRING_NOT_FOUND} if cSearch was not found or if any parameter was <code>null</code>...
[ "Get", "the", "last", "index", "of", "cSearch", "within", "sText", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L2790-L2793
box/box-java-sdk
src/main/java/com/box/sdk/BoxFileUploadSession.java
BoxFileUploadSession.listParts
public BoxFileUploadSessionPartList listParts(int offset, int limit) { """ Returns a list of all parts that have been uploaded to an upload session. @param offset paging marker for the list of parts. @param limit maximum number of parts to return. @return the list of parts. """ URL listPartsURL = th...
java
public BoxFileUploadSessionPartList listParts(int offset, int limit) { URL listPartsURL = this.sessionInfo.getSessionEndpoints().getListPartsEndpoint(); URLTemplate template = new URLTemplate(listPartsURL.toString()); QueryStringBuilder builder = new QueryStringBuilder(); builder.append...
[ "public", "BoxFileUploadSessionPartList", "listParts", "(", "int", "offset", ",", "int", "limit", ")", "{", "URL", "listPartsURL", "=", "this", ".", "sessionInfo", ".", "getSessionEndpoints", "(", ")", ".", "getListPartsEndpoint", "(", ")", ";", "URLTemplate", "...
Returns a list of all parts that have been uploaded to an upload session. @param offset paging marker for the list of parts. @param limit maximum number of parts to return. @return the list of parts.
[ "Returns", "a", "list", "of", "all", "parts", "that", "have", "been", "uploaded", "to", "an", "upload", "session", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFileUploadSession.java#L305-L321
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.takesArgument
public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, ElementMatcher<? super TypeDescription> matcher) { """ Matches {@link MethodDescription}s that define a type erasure as a parameter at the given index that matches the supplied matcher. @param index The index of th...
java
public static <T extends MethodDescription> ElementMatcher.Junction<T> takesArgument(int index, ElementMatcher<? super TypeDescription> matcher) { return takesGenericArgument(index, erasure(matcher)); }
[ "public", "static", "<", "T", "extends", "MethodDescription", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "takesArgument", "(", "int", "index", ",", "ElementMatcher", "<", "?", "super", "TypeDescription", ">", "matcher", ")", "{", "return", "takesGe...
Matches {@link MethodDescription}s that define a type erasure as a parameter at the given index that matches the supplied matcher. @param index The index of the parameter. @param matcher A matcher to apply to the argument at the specified index. @param <T> The type of the matched object. @return An element match...
[ "Matches", "{", "@link", "MethodDescription", "}", "s", "that", "define", "a", "type", "erasure", "as", "a", "parameter", "at", "the", "given", "index", "that", "matches", "the", "supplied", "matcher", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1266-L1268
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/MonitorService.java
MonitorService.list
public Collection<Monitor> list(String name, String type) { """ Returns the set of monitors with the given type and where the name contains the given (partial) name. <P> Defaults to page size of 20 monitors with 0 offset. @param name The name of the monitors to return. Can be a partial name. A null value returns...
java
public Collection<Monitor> list(String name, String type) { return list(name, type, 0, -1); }
[ "public", "Collection", "<", "Monitor", ">", "list", "(", "String", "name", ",", "String", "type", ")", "{", "return", "list", "(", "name", ",", "type", ",", "0", ",", "-", "1", ")", ";", "}" ]
Returns the set of monitors with the given type and where the name contains the given (partial) name. <P> Defaults to page size of 20 monitors with 0 offset. @param name The name of the monitors to return. Can be a partial name. A null value returns all monitors. @param type The type of the monitors to return. A null v...
[ "Returns", "the", "set", "of", "monitors", "with", "the", "given", "type", "and", "where", "the", "name", "contains", "the", "given", "(", "partial", ")", "name", ".", "<P", ">", "Defaults", "to", "page", "size", "of", "20", "monitors", "with", "0", "o...
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MonitorService.java#L108-L111
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.unsortedSegmentSqrtN
public SDVariable unsortedSegmentSqrtN(String name, SDVariable data, SDVariable segmentIds, int numSegments) { """ Unsorted segment sqrtN operation. Simply returns the sqrt of the count of the number of values in each segment<br> If data = [1, 3, 2, 6, 4, 9, 8]<br> segmentIds = [1, 0, 2, 0, 1, 1, 2]<br> th...
java
public SDVariable unsortedSegmentSqrtN(String name, SDVariable data, SDVariable segmentIds, int numSegments) { SDVariable ret = f().unsortedSegmentSqrtN(data, segmentIds, numSegments); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "unsortedSegmentSqrtN", "(", "String", "name", ",", "SDVariable", "data", ",", "SDVariable", "segmentIds", ",", "int", "numSegments", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "unsortedSegmentSqrtN", "(", "data", ",", "seg...
Unsorted segment sqrtN operation. Simply returns the sqrt of the count of the number of values in each segment<br> If data = [1, 3, 2, 6, 4, 9, 8]<br> segmentIds = [1, 0, 2, 0, 1, 1, 2]<br> then output = [1.414, 1.732, 1.414] = [sqrt(2), sqrtN(3), sqrtN(2)]<br> @param name Name of the output variable @param...
[ "Unsorted", "segment", "sqrtN", "operation", ".", "Simply", "returns", "the", "sqrt", "of", "the", "count", "of", "the", "number", "of", "values", "in", "each", "segment<br", ">", "If", "data", "=", "[", "1", "3", "2", "6", "4", "9", "8", "]", "<br",...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L2961-L2964
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory.java
SocketFactory.createSSLSocket
private Socket createSSLSocket(String host, int port, final String clientSSLConfigName) throws IOException { """ Create an SSL client socket using the IOR-encoded security characteristics. Setting want/need client auth on a client socket has no effect so all we can do is use the right host, port, ciphers @par...
java
private Socket createSSLSocket(String host, int port, final String clientSSLConfigName) throws IOException { final SSLSocketFactory factory = getSocketFactory(clientSSLConfigName); SSLSocket socket = (SSLSocket) factory.createSocket(host, port); socket.setSoTimeout(60 * 1000); // get a...
[ "private", "Socket", "createSSLSocket", "(", "String", "host", ",", "int", "port", ",", "final", "String", "clientSSLConfigName", ")", "throws", "IOException", "{", "final", "SSLSocketFactory", "factory", "=", "getSocketFactory", "(", "clientSSLConfigName", ")", ";"...
Create an SSL client socket using the IOR-encoded security characteristics. Setting want/need client auth on a client socket has no effect so all we can do is use the right host, port, ciphers @param host The target host name. @param port The target connection port. @param clientSSLConfigName name of the sslConfig use...
[ "Create", "an", "SSL", "client", "socket", "using", "the", "IOR", "-", "encoded", "security", "characteristics", ".", "Setting", "want", "/", "need", "client", "auth", "on", "a", "client", "socket", "has", "no", "effect", "so", "all", "we", "can", "do", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory.java#L410-L456
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getStorageAccountAsync
public ServiceFuture<StorageBundle> getStorageAccountAsync(String vaultBaseUrl, String storageAccountName, final ServiceCallback<StorageBundle> serviceCallback) { """ Gets information about a specified storage account. This operation requires the storage/get permission. @param vaultBaseUrl The vault name, for e...
java
public ServiceFuture<StorageBundle> getStorageAccountAsync(String vaultBaseUrl, String storageAccountName, final ServiceCallback<StorageBundle> serviceCallback) { return ServiceFuture.fromResponse(getStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName), serviceCallback); }
[ "public", "ServiceFuture", "<", "StorageBundle", ">", "getStorageAccountAsync", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "final", "ServiceCallback", "<", "StorageBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", ...
Gets information about a specified storage account. This operation requires the storage/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param serviceCallback the async ServiceCallback to handle successful and f...
[ "Gets", "information", "about", "a", "specified", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "get", "permission", "." ]
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#L9794-L9796
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.updateDocument
public String updateDocument(String index, Object id, Map params, String refreshOption, Boolean detect_noop, Boolean doc_as_upsert) throws ElasticSearchException { """ 根据路径更新文档 For Elasticsearch 7 and 7+ https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html @param index test/_doc/1 ...
java
public String updateDocument(String index, Object id, Map params, String refreshOption, Boolean detect_noop, Boolean doc_as_upsert) throws ElasticSearchException{ return updateDocument( index, (String)null, id, params, refreshOption, detect_noop, doc_as_upsert); }
[ "public", "String", "updateDocument", "(", "String", "index", ",", "Object", "id", ",", "Map", "params", ",", "String", "refreshOption", ",", "Boolean", "detect_noop", ",", "Boolean", "doc_as_upsert", ")", "throws", "ElasticSearchException", "{", "return", "update...
根据路径更新文档 For Elasticsearch 7 and 7+ https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html @param index test/_doc/1 test/_doc/1/_update @param id @param params @param refreshOption refresh=wait_for refresh=false refresh=true refresh Empty string or true Refresh the relevant primary and replica...
[ "根据路径更新文档", "For", "Elasticsearch", "7", "and", "7", "+", "https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "docs", "-", "update", ".", "html", "@param", "index",...
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L5160-L5162
undertow-io/undertow
core/src/main/java/io/undertow/util/FlexBase64.java
FlexBase64.createEncoderOutputStream
public static EncoderOutputStream createEncoderOutputStream(OutputStream target, int bufferSize, boolean wrap) { """ Creates an OutputStream wrapper which base64 encodes and writes to the passed OutputStream target. When this stream is closed base64 padding will be added if needed. Alternatively if this represent...
java
public static EncoderOutputStream createEncoderOutputStream(OutputStream target, int bufferSize, boolean wrap) { return new EncoderOutputStream(target, bufferSize, wrap); }
[ "public", "static", "EncoderOutputStream", "createEncoderOutputStream", "(", "OutputStream", "target", ",", "int", "bufferSize", ",", "boolean", "wrap", ")", "{", "return", "new", "EncoderOutputStream", "(", "target", ",", "bufferSize", ",", "wrap", ")", ";", "}" ...
Creates an OutputStream wrapper which base64 encodes and writes to the passed OutputStream target. When this stream is closed base64 padding will be added if needed. Alternatively if this represents an "inner stream", the {@link FlexBase64.EncoderOutputStream#complete()} method can be called to close out the inner str...
[ "Creates", "an", "OutputStream", "wrapper", "which", "base64", "encodes", "and", "writes", "to", "the", "passed", "OutputStream", "target", ".", "When", "this", "stream", "is", "closed", "base64", "padding", "will", "be", "added", "if", "needed", ".", "Alterna...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/FlexBase64.java#L481-L483
elvishew/xLog
sample/src/main/java/com/elvishew/xlogsample/MainActivity.java
MainActivity.showChangeTagDialog
private void showChangeTagDialog() { """ Show a dialog for user to change the tag, empty text is not allowed. """ View view = getLayoutInflater().inflate(R.layout.dialog_change_tag, null, false); final EditText tagEditText = (EditText) view.findViewById(R.id.tag); tagEditText.setText(tagView.getTex...
java
private void showChangeTagDialog() { View view = getLayoutInflater().inflate(R.layout.dialog_change_tag, null, false); final EditText tagEditText = (EditText) view.findViewById(R.id.tag); tagEditText.setText(tagView.getText()); new AlertDialog.Builder(this) .setTitle(R.string.change_tag) ...
[ "private", "void", "showChangeTagDialog", "(", ")", "{", "View", "view", "=", "getLayoutInflater", "(", ")", ".", "inflate", "(", "R", ".", "layout", ".", "dialog_change_tag", ",", "null", ",", "false", ")", ";", "final", "EditText", "tagEditText", "=", "(...
Show a dialog for user to change the tag, empty text is not allowed.
[ "Show", "a", "dialog", "for", "user", "to", "change", "the", "tag", "empty", "text", "is", "not", "allowed", "." ]
train
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/sample/src/main/java/com/elvishew/xlogsample/MainActivity.java#L223-L242
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/parser/destinations/RtfDestinationColorTable.java
RtfDestinationColorTable.processColor
private void processColor() { """ Processes the color triplet parsed from the document. Add it to the import mapping so colors can be mapped when encountered in the RTF import or conversion. """ if(red != -1 && green != -1 && blue != -1) { if(this.rtfParser.isImport()) { this.importHeader.importColo...
java
private void processColor() { if(red != -1 && green != -1 && blue != -1) { if(this.rtfParser.isImport()) { this.importHeader.importColor(Integer.toString(this.colorNr), new Color(this.red, this.green, this.blue)); } if(this.rtfParser.isConvert()) { colorMap.put(Integer.toString(this.colorNr), new ...
[ "private", "void", "processColor", "(", ")", "{", "if", "(", "red", "!=", "-", "1", "&&", "green", "!=", "-", "1", "&&", "blue", "!=", "-", "1", ")", "{", "if", "(", "this", ".", "rtfParser", ".", "isImport", "(", ")", ")", "{", "this", ".", ...
Processes the color triplet parsed from the document. Add it to the import mapping so colors can be mapped when encountered in the RTF import or conversion.
[ "Processes", "the", "color", "triplet", "parsed", "from", "the", "document", ".", "Add", "it", "to", "the", "import", "mapping", "so", "colors", "can", "be", "mapped", "when", "encountered", "in", "the", "RTF", "import", "or", "conversion", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/destinations/RtfDestinationColorTable.java#L233-L245
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/graph/LinkClustering.java
LinkClustering.getConnectionSimilarity
private <E extends Edge> double getConnectionSimilarity( Graph<E> graph, Edge e1, Edge e2) { """ Computes the connection similarity for the two edges, first calculating the impost and keystones nodes. If the edges are not connected, returns 0. @see #getConnectionSimilarity(Graph,int,int,int) ...
java
private <E extends Edge> double getConnectionSimilarity( Graph<E> graph, Edge e1, Edge e2) { int e1to = e1.to(); int e1from = e1.from(); int e2to = e2.to(); int e2from = e2.from(); if (e1to == e2to) return getConnectionSimilarity(graph, e1to, e1from, e2fro...
[ "private", "<", "E", "extends", "Edge", ">", "double", "getConnectionSimilarity", "(", "Graph", "<", "E", ">", "graph", ",", "Edge", "e1", ",", "Edge", "e2", ")", "{", "int", "e1to", "=", "e1", ".", "to", "(", ")", ";", "int", "e1from", "=", "e1", ...
Computes the connection similarity for the two edges, first calculating the impost and keystones nodes. If the edges are not connected, returns 0. @see #getConnectionSimilarity(Graph,int,int,int)
[ "Computes", "the", "connection", "similarity", "for", "the", "two", "edges", "first", "calculating", "the", "impost", "and", "keystones", "nodes", ".", "If", "the", "edges", "are", "not", "connected", "returns", "0", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/graph/LinkClustering.java#L967-L983
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.enableCheckpointing
@Deprecated @SuppressWarnings("deprecation") @PublicEvolving public StreamExecutionEnvironment enableCheckpointing(long interval, CheckpointingMode mode, boolean force) { """ Enables checkpointing for the streaming job. The distributed state of the streaming dataflow will be periodically snapshotted. In case o...
java
@Deprecated @SuppressWarnings("deprecation") @PublicEvolving public StreamExecutionEnvironment enableCheckpointing(long interval, CheckpointingMode mode, boolean force) { checkpointCfg.setCheckpointingMode(mode); checkpointCfg.setCheckpointInterval(interval); checkpointCfg.setForceCheckpointing(force); retur...
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "@", "PublicEvolving", "public", "StreamExecutionEnvironment", "enableCheckpointing", "(", "long", "interval", ",", "CheckpointingMode", "mode", ",", "boolean", "force", ")", "{", "checkpointCfg", ...
Enables checkpointing for the streaming job. The distributed state of the streaming dataflow will be periodically snapshotted. In case of a failure, the streaming dataflow will be restarted from the latest completed checkpoint. <p>The job draws checkpoints periodically, in the given interval. The state will be stored ...
[ "Enables", "checkpointing", "for", "the", "streaming", "job", ".", "The", "distributed", "state", "of", "the", "streaming", "dataflow", "will", "be", "periodically", "snapshotted", ".", "In", "case", "of", "a", "failure", "the", "streaming", "dataflow", "will", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L366-L374
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java
GrpcServerFactoryAutoConfiguration.nettyGrpcServerFactory
@ConditionalOnMissingBean @ConditionalOnClass(name = { """ Creates a GrpcServerFactory using the non-shaded netty. This is the fallback, if the shaded one is not present. @param properties The properties used to configure the server. @param serviceDiscoverer The discoverer used to identify the services tha...
java
@ConditionalOnMissingBean @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyServerBuilder"}) @Bean public NettyGrpcServerFactory nettyGrpcServerFactory(final GrpcServerProperties properties, final GrpcServiceDiscoverer serviceDiscoverer, final List<GrpcServerConfigurer>...
[ "@", "ConditionalOnMissingBean", "@", "ConditionalOnClass", "(", "name", "=", "{", "\"io.netty.channel.Channel\"", ",", "\"io.grpc.netty.NettyServerBuilder\"", "}", ")", "@", "Bean", "public", "NettyGrpcServerFactory", "nettyGrpcServerFactory", "(", "final", "GrpcServerProper...
Creates a GrpcServerFactory using the non-shaded netty. This is the fallback, if the shaded one is not present. @param properties The properties used to configure the server. @param serviceDiscoverer The discoverer used to identify the services that should be served. @param serverConfigurers The server configurers tha...
[ "Creates", "a", "GrpcServerFactory", "using", "the", "non", "-", "shaded", "netty", ".", "This", "is", "the", "fallback", "if", "the", "shaded", "one", "is", "not", "present", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java#L94-L104
google/allocation-instrumenter
src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java
AllocationMethodAdapter.newLocal
private int newLocal(Type type, String typeDesc, Label begin, Label end) { """ Helper method to allocate a new local variable and account for its scope. """ int newVar = lvs.newLocal(type); getLocalScopes().add(new VariableScope(newVar, begin, end, typeDesc)); return newVar; }
java
private int newLocal(Type type, String typeDesc, Label begin, Label end) { int newVar = lvs.newLocal(type); getLocalScopes().add(new VariableScope(newVar, begin, end, typeDesc)); return newVar; }
[ "private", "int", "newLocal", "(", "Type", "type", ",", "String", "typeDesc", ",", "Label", "begin", ",", "Label", "end", ")", "{", "int", "newVar", "=", "lvs", ".", "newLocal", "(", "type", ")", ";", "getLocalScopes", "(", ")", ".", "add", "(", "new...
Helper method to allocate a new local variable and account for its scope.
[ "Helper", "method", "to", "allocate", "a", "new", "local", "variable", "and", "account", "for", "its", "scope", "." ]
train
https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java#L478-L482
JosePaumard/streams-utils
src/main/java/org/paumard/streams/StreamsUtils.java
StreamsUtils.shiftingWindowAveragingInt
public static DoubleStream shiftingWindowAveragingInt(IntStream intStream, int rollingFactor) { """ <p>Generates a stream that is computed from a provided int stream by first rolling it in the same way as the <code>roll()</code> method does. The average is then computed on each substream, to form the final doubl...
java
public static DoubleStream shiftingWindowAveragingInt(IntStream intStream, int rollingFactor) { Objects.requireNonNull(intStream); RollingOfIntSpliterator ofIntSpliterator = RollingOfIntSpliterator.of(intStream.spliterator(), rollingFactor); return StreamSupport.stream(ofIntSpliterator, intStre...
[ "public", "static", "DoubleStream", "shiftingWindowAveragingInt", "(", "IntStream", "intStream", ",", "int", "rollingFactor", ")", "{", "Objects", ".", "requireNonNull", "(", "intStream", ")", ";", "RollingOfIntSpliterator", "ofIntSpliterator", "=", "RollingOfIntSpliterat...
<p>Generates a stream that is computed from a provided int stream by first rolling it in the same way as the <code>roll()</code> method does. The average is then computed on each substream, to form the final double stream. No boxing / unboxing is conducted in the process. <p>The resulting stream has the same number of ...
[ "<p", ">", "Generates", "a", "stream", "that", "is", "computed", "from", "a", "provided", "int", "stream", "by", "first", "rolling", "it", "in", "the", "same", "way", "as", "the", "<code", ">", "roll", "()", "<", "/", "code", ">", "method", "does", "...
train
https://github.com/JosePaumard/streams-utils/blob/56152574af0aca44c5f679761202a8f90984ab73/src/main/java/org/paumard/streams/StreamsUtils.java#L580-L587
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteHierarchicalEntityChild
public OperationStatus deleteHierarchicalEntityChild(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { """ Deletes a hierarchical entity extractor child from the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. ...
java
public OperationStatus deleteHierarchicalEntityChild(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { return deleteHierarchicalEntityChildWithServiceResponseAsync(appId, versionId, hEntityId, hChildId).toBlocking().single().body(); }
[ "public", "OperationStatus", "deleteHierarchicalEntityChild", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "UUID", "hChildId", ")", "{", "return", "deleteHierarchicalEntityChildWithServiceResponseAsync", "(", "appId", ",", "versionId", ...
Deletes a hierarchical entity extractor child from the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param hChildId The hierarchical entity extractor child ID. @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Deletes", "a", "hierarchical", "entity", "extractor", "child", "from", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L6546-L6548
johncarl81/transfuse
transfuse-api/src/main/java/org/androidtransfuse/util/InjectionUtil.java
InjectionUtil.getField
public static <T> T getField(Class<T> returnType, Class<?> targetClass, Object target, String field) { """ Returns the value of a field. @param returnType type of the field @param targetClass class represented by the target parameter @param target object containing the field @param field name of the field @...
java
public static <T> T getField(Class<T> returnType, Class<?> targetClass, Object target, String field) { try { Field declaredField = targetClass.getDeclaredField(field); return AccessController.doPrivileged( new GetFieldPrivilegedAction<T>(declaredField, target)); ...
[ "public", "static", "<", "T", ">", "T", "getField", "(", "Class", "<", "T", ">", "returnType", ",", "Class", "<", "?", ">", "targetClass", ",", "Object", "target", ",", "String", "field", ")", "{", "try", "{", "Field", "declaredField", "=", "targetClas...
Returns the value of a field. @param returnType type of the field @param targetClass class represented by the target parameter @param target object containing the field @param field name of the field @param <T> type parameter @return field value
[ "Returns", "the", "value", "of", "a", "field", "." ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-api/src/main/java/org/androidtransfuse/util/InjectionUtil.java#L52-L67
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java
AlternativeAlignment.getAlignedStructure
public Structure getAlignedStructure(Structure s1, Structure s2) { """ create an artifical Structure object that contains the two structures superimposed onto each other. Each structure is in a separate model. Model 1 is structure 1 and Model 2 is structure 2. @param s1 the first structure. its coordinates wi...
java
public Structure getAlignedStructure(Structure s1, Structure s2){ // do not change the original coords .. Structure s3 = s2.clone(); currentRotMatrix.print(3,3); Calc.rotate(s3, currentRotMatrix); Calc.shift( s3, currentTranMatrix); Structure newpdb = new StructureImpl(); newpdb.setPDBCode("Java"); n...
[ "public", "Structure", "getAlignedStructure", "(", "Structure", "s1", ",", "Structure", "s2", ")", "{", "// do not change the original coords ..", "Structure", "s3", "=", "s2", ".", "clone", "(", ")", ";", "currentRotMatrix", ".", "print", "(", "3", ",", "3", ...
create an artifical Structure object that contains the two structures superimposed onto each other. Each structure is in a separate model. Model 1 is structure 1 and Model 2 is structure 2. @param s1 the first structure. its coordinates will not be changed @param s2 the second structure, it will be cloned and the clon...
[ "create", "an", "artifical", "Structure", "object", "that", "contains", "the", "two", "structures", "superimposed", "onto", "each", "other", ".", "Each", "structure", "is", "in", "a", "separate", "model", ".", "Model", "1", "is", "structure", "1", "and", "Mo...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java#L849-L868
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java
DelegateView.setSize
@Override public void setSize(float width, float height) { """ Sets the view size. @param width the width @param height the height """ if (view != null) { view.setSize(width, height); } }
java
@Override public void setSize(float width, float height) { if (view != null) { view.setSize(width, height); } }
[ "@", "Override", "public", "void", "setSize", "(", "float", "width", ",", "float", "height", ")", "{", "if", "(", "view", "!=", "null", ")", "{", "view", ".", "setSize", "(", "width", ",", "height", ")", ";", "}", "}" ]
Sets the view size. @param width the width @param height the height
[ "Sets", "the", "view", "size", "." ]
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java#L523-L530
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/AccountManager.java
AccountManager.setName
@CheckReturnValue public AccountManager setName(String name, String currentPassword) { """ Sets the username for the currently logged in account @param name The new username @param currentPassword The current password for the represented account, this is only required for {@link net.dv8tion.jda.core.A...
java
@CheckReturnValue public AccountManager setName(String name, String currentPassword) { Checks.notBlank(name, "Name"); Checks.check(name.length() >= 2 && name.length() <= 32, "Name must be between 2-32 characters long"); this.currentPassword = currentPassword; this.name = name; ...
[ "@", "CheckReturnValue", "public", "AccountManager", "setName", "(", "String", "name", ",", "String", "currentPassword", ")", "{", "Checks", ".", "notBlank", "(", "name", ",", "\"Name\"", ")", ";", "Checks", ".", "check", "(", "name", ".", "length", "(", "...
Sets the username for the currently logged in account @param name The new username @param currentPassword The current password for the represented account, this is only required for {@link net.dv8tion.jda.core.AccountType#CLIENT AccountType.CLIENT} @throws IllegalArgumentException If this is action is performed on ...
[ "Sets", "the", "username", "for", "the", "currently", "logged", "in", "account" ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/AccountManager.java#L206-L215
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.missingRequired
public static XMLStreamException missingRequired(final XMLExtendedStreamReader reader, final String... required) { """ Get an exception reporting a missing, required XML attribute. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return the except...
java
public static XMLStreamException missingRequired(final XMLExtendedStreamReader reader, final String... required) { final StringBuilder b = new StringBuilder(); for (int i = 0; i < required.length; i++) { final String o = required[i]; b.append(o); if (required.length >...
[ "public", "static", "XMLStreamException", "missingRequired", "(", "final", "XMLExtendedStreamReader", "reader", ",", "final", "String", "...", "required", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i"...
Get an exception reporting a missing, required XML attribute. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return the exception
[ "Get", "an", "exception", "reporting", "a", "missing", "required", "XML", "attribute", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L225-L237
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java
ExpressionUtils.orderBy
public static Expression<?> orderBy(List<OrderSpecifier<?>> args) { """ Create an expression out of the given order specifiers @param args order @return expression for order """ return operation(Object.class, Ops.ORDER, ConstantImpl.create(args)); }
java
public static Expression<?> orderBy(List<OrderSpecifier<?>> args) { return operation(Object.class, Ops.ORDER, ConstantImpl.create(args)); }
[ "public", "static", "Expression", "<", "?", ">", "orderBy", "(", "List", "<", "OrderSpecifier", "<", "?", ">", ">", "args", ")", "{", "return", "operation", "(", "Object", ".", "class", ",", "Ops", ".", "ORDER", ",", "ConstantImpl", ".", "create", "(",...
Create an expression out of the given order specifiers @param args order @return expression for order
[ "Create", "an", "expression", "out", "of", "the", "given", "order", "specifiers" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/ExpressionUtils.java#L915-L917
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/BaseNeo4jDialect.java
BaseNeo4jDialect.isPartOfRegularEmbedded
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) { """ A regular embedded is an element that it is embedded but it is not a key or a collection. @param keyColumnNames the column names representing the identifier of the entity @param column the column we want to check @retu...
java
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) { return isPartOfEmbedded( column ) && !ArrayHelper.contains( keyColumnNames, column ); }
[ "public", "static", "boolean", "isPartOfRegularEmbedded", "(", "String", "[", "]", "keyColumnNames", ",", "String", "column", ")", "{", "return", "isPartOfEmbedded", "(", "column", ")", "&&", "!", "ArrayHelper", ".", "contains", "(", "keyColumnNames", ",", "colu...
A regular embedded is an element that it is embedded but it is not a key or a collection. @param keyColumnNames the column names representing the identifier of the entity @param column the column we want to check @return {@code true} if the column represent an attribute of a regular embedded element, {@code false} oth...
[ "A", "regular", "embedded", "is", "an", "element", "that", "it", "is", "embedded", "but", "it", "is", "not", "a", "key", "or", "a", "collection", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/BaseNeo4jDialect.java#L219-L221
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/Timecode.java
Timecode.getInstance
public static final Timecode getInstance(long frameNumber, boolean dropFrame, Timebase timebase) { """ @param frameNumber @param dropFrame set to true to indicate that the frame-rate excludes dropframes @param timebase @return a timecode representation of the given data, null when a timecode can not be gener...
java
public static final Timecode getInstance(long frameNumber, boolean dropFrame, Timebase timebase) { return TimecodeBuilder.fromFrames(frameNumber, timebase, dropFrame).build(); }
[ "public", "static", "final", "Timecode", "getInstance", "(", "long", "frameNumber", ",", "boolean", "dropFrame", ",", "Timebase", "timebase", ")", "{", "return", "TimecodeBuilder", ".", "fromFrames", "(", "frameNumber", ",", "timebase", ",", "dropFrame", ")", "....
@param frameNumber @param dropFrame set to true to indicate that the frame-rate excludes dropframes @param timebase @return a timecode representation of the given data, null when a timecode can not be generated (i.e. duration exceeds a day)
[ "@param", "frameNumber", "@param", "dropFrame", "set", "to", "true", "to", "indicate", "that", "the", "frame", "-", "rate", "excludes", "dropframes", "@param", "timebase" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/Timecode.java#L734-L737
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/utils/Assert.java
Assert.parametersNotNull
public static void parametersNotNull(final String names, final Object... objects) { """ Validates that all the parameters are not null @param names a comma separated String of parameter names @param objects the proposed parameter values """ String msgPrefix = "At least one of the parameters"; ...
java
public static void parametersNotNull(final String names, final Object... objects) { String msgPrefix = "At least one of the parameters"; if (objects != null) { if (objects.length == 1) { msgPrefix = "Parameter"; } for (final Object object : objects) ...
[ "public", "static", "void", "parametersNotNull", "(", "final", "String", "names", ",", "final", "Object", "...", "objects", ")", "{", "String", "msgPrefix", "=", "\"At least one of the parameters\"", ";", "if", "(", "objects", "!=", "null", ")", "{", "if", "("...
Validates that all the parameters are not null @param names a comma separated String of parameter names @param objects the proposed parameter values
[ "Validates", "that", "all", "the", "parameters", "are", "not", "null" ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/utils/Assert.java#L27-L41
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.getPolarizabilitiyFactorForAtom
public double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom) { """ Gets the polarizabilitiyFactorForAtom. @param atomContainer AtomContainer @param atom atom for which the factor should become known @return The polarizabilitiyFactorForAtom value """ IAtomCont...
java
public double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom) { IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); return getKJPolarizabilityFactor(acH, atom); }
[ "public", "double", "getPolarizabilitiyFactorForAtom", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "{", "IAtomContainer", "acH", "=", "atomContainer", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IAtomContainer", ".", "class", ",", ...
Gets the polarizabilitiyFactorForAtom. @param atomContainer AtomContainer @param atom atom for which the factor should become known @return The polarizabilitiyFactorForAtom value
[ "Gets", "the", "polarizabilitiyFactorForAtom", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L82-L86
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java
SeaGlassButtonUI.getRolloverIcon
private Icon getRolloverIcon(AbstractButton b, Icon defaultIcon) { """ DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME! """ ButtonModel model = b.getModel(); Icon icon; if (model.isSelected()) { icon = getIcon...
java
private Icon getRolloverIcon(AbstractButton b, Icon defaultIcon) { ButtonModel model = b.getModel(); Icon icon; if (model.isSelected()) { icon = getIcon(b, b.getRolloverSelectedIcon(), defaultIcon, SynthConstants.MOUSE_OVER | SynthConstants.SELECTED); } else { ...
[ "private", "Icon", "getRolloverIcon", "(", "AbstractButton", "b", ",", "Icon", "defaultIcon", ")", "{", "ButtonModel", "model", "=", "b", ".", "getModel", "(", ")", ";", "Icon", "icon", ";", "if", "(", "model", ".", "isSelected", "(", ")", ")", "{", "i...
DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L479-L490
lagom/lagom
service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/TransportErrorCode.java
TransportErrorCode.fromWebSocket
public static TransportErrorCode fromWebSocket(int code) { """ Get a transport error code from the given WebSocket close code. @param code The WebSocket close code, must be between 0 and 65535 inclusive. @return The transport error code. @throws IllegalArgumentException if the code is not an unsigned 2 byte i...
java
public static TransportErrorCode fromWebSocket(int code) { TransportErrorCode builtIn = WEBSOCKET_ERROR_CODE_MAP.get(code); if (builtIn == null) { if (code < 0 || code > 65535) { throw new IllegalArgumentException("Invalid WebSocket status code: " + code); } else ...
[ "public", "static", "TransportErrorCode", "fromWebSocket", "(", "int", "code", ")", "{", "TransportErrorCode", "builtIn", "=", "WEBSOCKET_ERROR_CODE_MAP", ".", "get", "(", "code", ")", ";", "if", "(", "builtIn", "==", "null", ")", "{", "if", "(", "code", "<"...
Get a transport error code from the given WebSocket close code. @param code The WebSocket close code, must be between 0 and 65535 inclusive. @return The transport error code. @throws IllegalArgumentException if the code is not an unsigned 2 byte integer.
[ "Get", "a", "transport", "error", "code", "from", "the", "given", "WebSocket", "close", "code", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/TransportErrorCode.java#L164-L177
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.sendReport
private void sendReport(HttpServletRequest req, HttpServletResponse resp, Map<String, Integer> errors) throws IOException { """ Send a multistatus element containing a complete error report to the client.<p> @param req the servlet request we are processing @param resp the servlet response we are processin...
java
private void sendReport(HttpServletRequest req, HttpServletResponse resp, Map<String, Integer> errors) throws IOException { resp.setStatus(CmsWebdavStatus.SC_MULTI_STATUS); String absoluteUri = req.getRequestURI(); String relativePath = getRelativePath(req); Document doc = Documen...
[ "private", "void", "sendReport", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ",", "Map", "<", "String", ",", "Integer", ">", "errors", ")", "throws", "IOException", "{", "resp", ".", "setStatus", "(", "CmsWebdavStatus", ".", "SC_MULTI_S...
Send a multistatus element containing a complete error report to the client.<p> @param req the servlet request we are processing @param resp the servlet response we are processing @param errors the errors to be displayed @throws IOException if errors while writing to response occurs
[ "Send", "a", "multistatus", "element", "containing", "a", "complete", "error", "report", "to", "the", "client", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L3584-L3615
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java
MinerAdapter.toStringSet
public Set<String> toStringSet(Set<ModificationFeature> set) { """ Sorts the modifications and gets them in a String. @param set modifications @return a String listing the modifications """ List<ModificationFeature> list = new ArrayList<ModificationFeature>(set); Collections.sort(list, new Comparator<Mo...
java
public Set<String> toStringSet(Set<ModificationFeature> set) { List<ModificationFeature> list = new ArrayList<ModificationFeature>(set); Collections.sort(list, new Comparator<ModificationFeature>() { @Override public int compare(ModificationFeature o1, ModificationFeature o2) { String t1 = getModif...
[ "public", "Set", "<", "String", ">", "toStringSet", "(", "Set", "<", "ModificationFeature", ">", "set", ")", "{", "List", "<", "ModificationFeature", ">", "list", "=", "new", "ArrayList", "<", "ModificationFeature", ">", "(", "set", ")", ";", "Collections", ...
Sorts the modifications and gets them in a String. @param set modifications @return a String listing the modifications
[ "Sorts", "the", "modifications", "and", "gets", "them", "in", "a", "String", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/MinerAdapter.java#L273-L297
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java
MapKeyLoader.updateLocalKeyLoadStatus
private void updateLocalKeyLoadStatus(Throwable t) { """ Notifies the record store of this map key loader that key loading has completed. @param t an exception that occurred during key loading or {@code null} if there was no exception """ Operation op = new KeyLoadStatusOperation(mapName, t); ...
java
private void updateLocalKeyLoadStatus(Throwable t) { Operation op = new KeyLoadStatusOperation(mapName, t); // This updates the local record store on the partition thread. // If invoked by the SENDER_BACKUP however it's the replica index has to be set to 1, otherwise // it will be a remo...
[ "private", "void", "updateLocalKeyLoadStatus", "(", "Throwable", "t", ")", "{", "Operation", "op", "=", "new", "KeyLoadStatusOperation", "(", "mapName", ",", "t", ")", ";", "// This updates the local record store on the partition thread.", "// If invoked by the SENDER_BACKUP ...
Notifies the record store of this map key loader that key loading has completed. @param t an exception that occurred during key loading or {@code null} if there was no exception
[ "Notifies", "the", "record", "store", "of", "this", "map", "key", "loader", "that", "key", "loading", "has", "completed", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java#L304-L314
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/config/dialplan/ExtensionsConfigFileReader.java
ExtensionsConfigFileReader.processQuotesAndSlashes
private static String processQuotesAndSlashes(String start, char find, char replace_with) { """ /* ast_process_quotes_and_slashes rewritten to be java friendly """ String dataPut = ""; int inEscape = 0; int inQuotes = 0; char[] startChars = start.toCharArray(); for (cha...
java
private static String processQuotesAndSlashes(String start, char find, char replace_with) { String dataPut = ""; int inEscape = 0; int inQuotes = 0; char[] startChars = start.toCharArray(); for (char startChar : startChars) { if (inEscape != 0) ...
[ "private", "static", "String", "processQuotesAndSlashes", "(", "String", "start", ",", "char", "find", ",", "char", "replace_with", ")", "{", "String", "dataPut", "=", "\"\"", ";", "int", "inEscape", "=", "0", ";", "int", "inQuotes", "=", "0", ";", "char",...
/* ast_process_quotes_and_slashes rewritten to be java friendly
[ "/", "*", "ast_process_quotes_and_slashes", "rewritten", "to", "be", "java", "friendly" ]
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/config/dialplan/ExtensionsConfigFileReader.java#L160-L192
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoComparator.java
PojoComparator.accessField
public final Object accessField(Field field, Object object) { """ This method is handling the IllegalAccess exceptions of Field.get() """ try { object = field.get(object); } catch (NullPointerException npex) { throw new NullKeyFieldException("Unable to access field "+field+" on object "+object); } ...
java
public final Object accessField(Field field, Object object) { try { object = field.get(object); } catch (NullPointerException npex) { throw new NullKeyFieldException("Unable to access field "+field+" on object "+object); } catch (IllegalAccessException iaex) { throw new RuntimeException("This should not ...
[ "public", "final", "Object", "accessField", "(", "Field", "field", ",", "Object", "object", ")", "{", "try", "{", "object", "=", "field", ".", "get", "(", "object", ")", ";", "}", "catch", "(", "NullPointerException", "npex", ")", "{", "throw", "new", ...
This method is handling the IllegalAccess exceptions of Field.get()
[ "This", "method", "is", "handling", "the", "IllegalAccess", "exceptions", "of", "Field", ".", "get", "()" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoComparator.java#L177-L187
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java
DevicesInner.getByResourceGroup
public DataBoxEdgeDeviceInner getByResourceGroup(String deviceName, String resourceGroupName) { """ Gets the properties of the data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the valid...
java
public DataBoxEdgeDeviceInner getByResourceGroup(String deviceName, String resourceGroupName) { return getByResourceGroupWithServiceResponseAsync(deviceName, resourceGroupName).toBlocking().single().body(); }
[ "public", "DataBoxEdgeDeviceInner", "getByResourceGroup", "(", "String", "deviceName", ",", "String", "resourceGroupName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroupName", ")", ".", "toBlocking", "(", ")", ".",...
Gets the properties of the data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other w...
[ "Gets", "the", "properties", "of", "the", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L616-L618
h2oai/h2o-3
h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java
Word2VecModel.cosineSimilarity
private float cosineSimilarity(float[] target, int pos, float[] vecs) { """ Basic calculation of cosine similarity @param target - a word vector @param pos - position in vecs @param vecs - learned word vectors @return cosine similarity between the two word vectors """ float dotProd = 0, tsqr = 0, csqr ...
java
private float cosineSimilarity(float[] target, int pos, float[] vecs) { float dotProd = 0, tsqr = 0, csqr = 0; for(int i = 0; i < target.length; i++) { dotProd += target[i] * vecs[pos + i]; tsqr += Math.pow(target[i], 2); csqr += Math.pow(vecs[pos + i], 2); } return (float) (dotProd / ...
[ "private", "float", "cosineSimilarity", "(", "float", "[", "]", "target", ",", "int", "pos", ",", "float", "[", "]", "vecs", ")", "{", "float", "dotProd", "=", "0", ",", "tsqr", "=", "0", ",", "csqr", "=", "0", ";", "for", "(", "int", "i", "=", ...
Basic calculation of cosine similarity @param target - a word vector @param pos - position in vecs @param vecs - learned word vectors @return cosine similarity between the two word vectors
[ "Basic", "calculation", "of", "cosine", "similarity" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/word2vec/Word2VecModel.java#L252-L260
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsToolManager.java
CmsToolManager.resolveAdminTool
public CmsTool resolveAdminTool(String rootKey, String toolPath) { """ Returns the admin tool corresponding to the given abstract path.<p> @param rootKey the tool root @param toolPath the path @return the corresponding tool, or <code>null</code> if not found """ return m_tools.getObject(rootKey...
java
public CmsTool resolveAdminTool(String rootKey, String toolPath) { return m_tools.getObject(rootKey + ROOT_SEPARATOR + toolPath); }
[ "public", "CmsTool", "resolveAdminTool", "(", "String", "rootKey", ",", "String", "toolPath", ")", "{", "return", "m_tools", ".", "getObject", "(", "rootKey", "+", "ROOT_SEPARATOR", "+", "toolPath", ")", ";", "}" ]
Returns the admin tool corresponding to the given abstract path.<p> @param rootKey the tool root @param toolPath the path @return the corresponding tool, or <code>null</code> if not found
[ "Returns", "the", "admin", "tool", "corresponding", "to", "the", "given", "abstract", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L524-L527
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java
ImgCompressUtils.encodeImg
private static BufferedImage encodeImg(BufferedImage desImg, Float quality) { """ 采用JPEG编码图片,并生成BufferedImage对象返回 @param desImg 编码源图片 @param quality 编码质量 @return 返回编码后的BufferedImage对象 """ ByteArrayOutputStream baos = null; ByteArrayInputStream bais = null; BufferedImage bufferedIm...
java
private static BufferedImage encodeImg(BufferedImage desImg, Float quality) { ByteArrayOutputStream baos = null; ByteArrayInputStream bais = null; BufferedImage bufferedImage = null; try { if (quality != null) { if (quality > 1.0 || quality < 0.0) { ...
[ "private", "static", "BufferedImage", "encodeImg", "(", "BufferedImage", "desImg", ",", "Float", "quality", ")", "{", "ByteArrayOutputStream", "baos", "=", "null", ";", "ByteArrayInputStream", "bais", "=", "null", ";", "BufferedImage", "bufferedImage", "=", "null", ...
采用JPEG编码图片,并生成BufferedImage对象返回 @param desImg 编码源图片 @param quality 编码质量 @return 返回编码后的BufferedImage对象
[ "采用JPEG编码图片,并生成BufferedImage对象返回" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java#L182-L217
RallyTools/RallyRestToolkitForJava
src/main/java/com/rallydev/rest/request/QueryRequest.java
QueryRequest.toUrl
@Override public String toUrl() { """ <p>Convert this request into a url compatible with the WSAPI.</p> The current criteria set on this request and any other parameters will be included. @return the url representing this request. """ List<NameValuePair> params = new ArrayList<NameValuePair>(ge...
java
@Override public String toUrl() { List<NameValuePair> params = new ArrayList<NameValuePair>(getParams()); params.add(new BasicNameValuePair("start", Integer.toString(getStart()))); params.add(new BasicNameValuePair("pagesize", Integer.toString(getPageSize()))); params.add(new BasicN...
[ "@", "Override", "public", "String", "toUrl", "(", ")", "{", "List", "<", "NameValuePair", ">", "params", "=", "new", "ArrayList", "<", "NameValuePair", ">", "(", "getParams", "(", ")", ")", ";", "params", ".", "add", "(", "new", "BasicNameValuePair", "(...
<p>Convert this request into a url compatible with the WSAPI.</p> The current criteria set on this request and any other parameters will be included. @return the url representing this request.
[ "<p", ">", "Convert", "this", "request", "into", "a", "url", "compatible", "with", "the", "WSAPI", ".", "<", "/", "p", ">", "The", "current", "criteria", "set", "on", "this", "request", "and", "any", "other", "parameters", "will", "be", "included", "." ]
train
https://github.com/RallyTools/RallyRestToolkitForJava/blob/542afa16ea44c9c64cebb0299500dcbbb50b6d7d/src/main/java/com/rallydev/rest/request/QueryRequest.java#L264-L296
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java
Pixel.setARGB
public void setARGB(int a, int r, int g, int b) { """ Sets an ARGB value at the position currently referenced by this Pixel. Each channel value is assumed to be 8bit and otherwise truncated. @param a alpha @param r red @param g green @param b blue @throws ArrayIndexOutOfBoundsException if this Pixel's index ...
java
public void setARGB(int a, int r, int g, int b){ setValue(Pixel.argb(a, r, g, b)); }
[ "public", "void", "setARGB", "(", "int", "a", ",", "int", "r", ",", "int", "g", ",", "int", "b", ")", "{", "setValue", "(", "Pixel", ".", "argb", "(", "a", ",", "r", ",", "g", ",", "b", ")", ")", ";", "}" ]
Sets an ARGB value at the position currently referenced by this Pixel. Each channel value is assumed to be 8bit and otherwise truncated. @param a alpha @param r red @param g green @param b blue @throws ArrayIndexOutOfBoundsException if this Pixel's index is not in range of the Img's data array. @see #setRGB(int, int, i...
[ "Sets", "an", "ARGB", "value", "at", "the", "position", "currently", "referenced", "by", "this", "Pixel", ".", "Each", "channel", "value", "is", "assumed", "to", "be", "8bit", "and", "otherwise", "truncated", "." ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java#L346-L348
james-hu/jabb-core
src/main/java/net/sf/jabb/camel/RegistryUtility.java
RegistryUtility.addEncoder
@SuppressWarnings("unchecked") static public void addEncoder(CamelContext context, String name, ChannelDownstreamHandler encoder) { """ Adds an Netty encoder to Registry.<br> 向Registry中增加一个给Netty用的encoder。 @param context The CamelContext must be based on CombinedRegistry, otherwise ClassCastException will be t...
java
@SuppressWarnings("unchecked") static public void addEncoder(CamelContext context, String name, ChannelDownstreamHandler encoder){ CombinedRegistry registry = getCombinedRegistry(context); addCodecOnly(registry, name, encoder); List<ChannelDownstreamHandler> encoders; Object o = registry.lookup(NAME_E...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "public", "void", "addEncoder", "(", "CamelContext", "context", ",", "String", "name", ",", "ChannelDownstreamHandler", "encoder", ")", "{", "CombinedRegistry", "registry", "=", "getCombinedRegistry", "(", ...
Adds an Netty encoder to Registry.<br> 向Registry中增加一个给Netty用的encoder。 @param context The CamelContext must be based on CombinedRegistry, otherwise ClassCastException will be thrown.<br> 这个context必须是采用CombinedRegistry类型的Registry的,否则会抛出格式转换异常。 @param name Name of the encoder in Registry.<br> encoder在Registry中的名字。 @param...
[ "Adds", "an", "Netty", "encoder", "to", "Registry", ".", "<br", ">", "向Registry中增加一个给Netty用的encoder。" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/camel/RegistryUtility.java#L76-L94
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
MultiIndex.recoveryIndexFromCoordinator
private boolean recoveryIndexFromCoordinator() throws IOException { """ Retrieves index from other node. @throws IOException if can't clean up directory after retrieving being failed """ File indexDirectory = new File(handler.getContext().getIndexDirectory()); try { IndexRecovery...
java
private boolean recoveryIndexFromCoordinator() throws IOException { File indexDirectory = new File(handler.getContext().getIndexDirectory()); try { IndexRecovery indexRecovery = handler.getContext().getIndexRecovery(); // check if index not ready if (!indexRecovery.check...
[ "private", "boolean", "recoveryIndexFromCoordinator", "(", ")", "throws", "IOException", "{", "File", "indexDirectory", "=", "new", "File", "(", "handler", ".", "getContext", "(", ")", ".", "getIndexDirectory", "(", ")", ")", ";", "try", "{", "IndexRecovery", ...
Retrieves index from other node. @throws IOException if can't clean up directory after retrieving being failed
[ "Retrieves", "index", "from", "other", "node", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java#L3872-L3928
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/FixDependencyChecker.java
FixDependencyChecker.isSupersededBy
private static boolean isSupersededBy(List<Problem> apars1, List<Problem> apars2) { """ Returns if the apars list apars1 is superseded by apars2. Apars1 is superseded by apars2 if all the apars in apars1 is also included in apars2 @param apars1 Fix to check @param apars2 @return Returns true if apars list apa...
java
private static boolean isSupersededBy(List<Problem> apars1, List<Problem> apars2) { boolean result = true; // Now iterate over the current list of problems, and see if the incoming IFixInfo contains all of the problems from this IfixInfo. // If it does then return true, to indicate that this I...
[ "private", "static", "boolean", "isSupersededBy", "(", "List", "<", "Problem", ">", "apars1", ",", "List", "<", "Problem", ">", "apars2", ")", "{", "boolean", "result", "=", "true", ";", "// Now iterate over the current list of problems, and see if the incoming IFixInfo...
Returns if the apars list apars1 is superseded by apars2. Apars1 is superseded by apars2 if all the apars in apars1 is also included in apars2 @param apars1 Fix to check @param apars2 @return Returns true if apars list apars1 is superseded by apars2. Else return false.
[ "Returns", "if", "the", "apars", "list", "apars1", "is", "superseded", "by", "apars2", ".", "Apars1", "is", "superseded", "by", "apars2", "if", "all", "the", "apars", "in", "apars1", "is", "also", "included", "in", "apars2" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/FixDependencyChecker.java#L165-L184
Coveros/selenified
src/main/java/com/coveros/selenified/Selenified.java
Selenified.getAdditionalDesiredCapabilities
private static DesiredCapabilities getAdditionalDesiredCapabilities(String clazz, ITestContext context) { """ Retrieves the additional desired capabilities set by the current class for the browsers @param clazz - the test suite class, used for making threadsafe storage of application, allowing suites to have...
java
private static DesiredCapabilities getAdditionalDesiredCapabilities(String clazz, ITestContext context) { return (DesiredCapabilities) context.getAttribute(clazz + DESIRED_CAPABILITIES); }
[ "private", "static", "DesiredCapabilities", "getAdditionalDesiredCapabilities", "(", "String", "clazz", ",", "ITestContext", "context", ")", "{", "return", "(", "DesiredCapabilities", ")", "context", ".", "getAttribute", "(", "clazz", "+", "DESIRED_CAPABILITIES", ")", ...
Retrieves the additional desired capabilities set by the current class for the browsers @param clazz - the test suite class, used for making threadsafe storage of application, allowing suites to have independent applications under test, run at the same time @param context - the TestNG context associated with the tes...
[ "Retrieves", "the", "additional", "desired", "capabilities", "set", "by", "the", "current", "class", "for", "the", "browsers" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Selenified.java#L228-L230
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/TraversalContext.java
TraversalContext.proceedFromRelationshipsTo
<T extends Entity<?, ?>> Builder<BE, T> proceedFromRelationshipsTo(Relationships.Direction direction, Class<T> entityType) { """ An opposite of {@link #proceedToRelationships(Relationships.Direction)}. @param direction the direction in whic...
java
<T extends Entity<?, ?>> Builder<BE, T> proceedFromRelationshipsTo(Relationships.Direction direction, Class<T> entityType) { return new Builder<>(this, hop(), Query.filter(), entityType) .hop(new SwitchElementType(direction, ...
[ "<", "T", "extends", "Entity", "<", "?", ",", "?", ">", ">", "Builder", "<", "BE", ",", "T", ">", "proceedFromRelationshipsTo", "(", "Relationships", ".", "Direction", "direction", ",", "Class", "<", "T", ">", "entityType", ")", "{", "return", "new", "...
An opposite of {@link #proceedToRelationships(Relationships.Direction)}. @param direction the direction in which to "leave" the relationships @param entityType the type of entities to "hop to" @param <T> the type of entities to "hop to" @return a context builder with the modified source path, select candidates...
[ "An", "opposite", "of", "{", "@link", "#proceedToRelationships", "(", "Relationships", ".", "Direction", ")", "}", "." ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/TraversalContext.java#L230-L234
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbMemberTagsHandler.java
OjbMemberTagsHandler.forAllMemberTagTokens
public void forAllMemberTagTokens(String template, Properties attributes) throws XDocletException { """ Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token. @param template The body of the block tag @param attributes The attributes...
java
public void forAllMemberTagTokens(String template, Properties attributes) throws XDocletException { if (getCurrentField() != null) { forAllMemberTagTokens(template, attributes, FOR_FIELD); } else if (getCurrentMethod() != null) { forAllMemberTagTokens(template, ...
[ "public", "void", "forAllMemberTagTokens", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "if", "(", "getCurrentField", "(", ")", "!=", "null", ")", "{", "forAllMemberTagTokens", "(", "template", ",", "attribute...
Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token. @param template The body of the block tag @param attributes The attributes of the template tag @exception XDocletException If an error occurs @doc.tag type="block" @...
[ "Iterates", "over", "all", "tokens", "in", "current", "member", "tag", "with", "the", "name", "tagName", "and", "evaluates", "the", "body", "for", "every", "token", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbMemberTagsHandler.java#L261-L269
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java
ParameterSerializer.parseMethods
protected ISFSObject parseMethods(ClassUnwrapper unwrapper, Object object) { """ Invoke getter method and add returned value to SFSObject @param unwrapper structure of java class @param object the java object @return the SFSObject """ return object2params(unwrapper, object, new SFSObje...
java
protected ISFSObject parseMethods(ClassUnwrapper unwrapper, Object object) { return object2params(unwrapper, object, new SFSObject()); }
[ "protected", "ISFSObject", "parseMethods", "(", "ClassUnwrapper", "unwrapper", ",", "Object", "object", ")", "{", "return", "object2params", "(", "unwrapper", ",", "object", ",", "new", "SFSObject", "(", ")", ")", ";", "}" ]
Invoke getter method and add returned value to SFSObject @param unwrapper structure of java class @param object the java object @return the SFSObject
[ "Invoke", "getter", "method", "and", "add", "returned", "value", "to", "SFSObject" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java#L80-L84
offbynull/coroutines
user/src/main/java/com/offbynull/coroutines/user/MethodState.java
MethodState.getIdentifyingFieldName
public static String getIdentifyingFieldName(int methodId, int continuationPointId) { """ Do not use -- for internal use only. <p> Get the name of the field that will be inserted into a class for some method id and version combination. @param methodId method id @param continuationPointId continuation point id ...
java
public static String getIdentifyingFieldName(int methodId, int continuationPointId) { if (continuationPointId < 0) { throw new IllegalArgumentException(); } String methodIdStr = Integer.toString(methodId).replace('-', 'N'); String continuationPointIdStr = Integer.toString(co...
[ "public", "static", "String", "getIdentifyingFieldName", "(", "int", "methodId", ",", "int", "continuationPointId", ")", "{", "if", "(", "continuationPointId", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "String", "methodI...
Do not use -- for internal use only. <p> Get the name of the field that will be inserted into a class for some method id and version combination. @param methodId method id @param continuationPointId continuation point id @return field name @throws IllegalArgumentException if {@code continuationPointId < 0}
[ "Do", "not", "use", "--", "for", "internal", "use", "only", ".", "<p", ">", "Get", "the", "name", "of", "the", "field", "that", "will", "be", "inserted", "into", "a", "class", "for", "some", "method", "id", "and", "version", "combination", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/user/src/main/java/com/offbynull/coroutines/user/MethodState.java#L249-L257
mozilla/rhino
src/org/mozilla/javascript/BaseFunction.java
BaseFunction.createObject
public Scriptable createObject(Context cx, Scriptable scope) { """ Creates new script object. The default implementation of {@link #construct} uses the method to to get the value for <tt>thisObj</tt> argument when invoking {@link #call}. The methos is allowed to return <tt>null</tt> to indicate that {@link #c...
java
public Scriptable createObject(Context cx, Scriptable scope) { Scriptable newInstance = new NativeObject(); newInstance.setPrototype(getClassPrototype()); newInstance.setParentScope(getParentScope()); return newInstance; }
[ "public", "Scriptable", "createObject", "(", "Context", "cx", ",", "Scriptable", "scope", ")", "{", "Scriptable", "newInstance", "=", "new", "NativeObject", "(", ")", ";", "newInstance", ".", "setPrototype", "(", "getClassPrototype", "(", ")", ")", ";", "newIn...
Creates new script object. The default implementation of {@link #construct} uses the method to to get the value for <tt>thisObj</tt> argument when invoking {@link #call}. The methos is allowed to return <tt>null</tt> to indicate that {@link #call} will create a new object itself. In this case {@link #construct} will se...
[ "Creates", "new", "script", "object", ".", "The", "default", "implementation", "of", "{" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/BaseFunction.java#L401-L407
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/binary/VisualizeBinaryData.java
VisualizeBinaryData.renderBinary
public static BufferedImage renderBinary(GrayU8 binaryImage, boolean invert, BufferedImage out) { """ Renders a binary image. 0 = black and 1 = white. @param binaryImage (Input) Input binary image. @param invert (Input) if true it will invert the image on output @param out (Output) optional storage for outpu...
java
public static BufferedImage renderBinary(GrayU8 binaryImage, boolean invert, BufferedImage out) { if( out == null || ( out.getWidth() != binaryImage.width || out.getHeight() != binaryImage.height) ) { out = new BufferedImage(binaryImage.getWidth(),binaryImage.getHeight(),BufferedImage.TYPE_BYTE_GRAY); } try ...
[ "public", "static", "BufferedImage", "renderBinary", "(", "GrayU8", "binaryImage", ",", "boolean", "invert", ",", "BufferedImage", "out", ")", "{", "if", "(", "out", "==", "null", "||", "(", "out", ".", "getWidth", "(", ")", "!=", "binaryImage", ".", "widt...
Renders a binary image. 0 = black and 1 = white. @param binaryImage (Input) Input binary image. @param invert (Input) if true it will invert the image on output @param out (Output) optional storage for output image @return Output rendered binary image
[ "Renders", "a", "binary", "image", ".", "0", "=", "black", "and", "1", "=", "white", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/binary/VisualizeBinaryData.java#L382-L404
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/reflect/TypeMatcher.java
TypeMatcher.matchType
public static boolean matchType(Object expectedType, Class<?> actualType) { """ Matches expected type to an actual type. The types can be specified as types, type names or TypeCode. @param expectedType an expected type to match. @param actualType an actual type to match. @return true if types are matching ...
java
public static boolean matchType(Object expectedType, Class<?> actualType) { if (expectedType == null) return true; if (actualType == null) throw new NullPointerException("Actual type cannot be null"); if (expectedType instanceof Class<?>) return ((Class<?>) expectedType).isAssignableFrom(actualType); ...
[ "public", "static", "boolean", "matchType", "(", "Object", "expectedType", ",", "Class", "<", "?", ">", "actualType", ")", "{", "if", "(", "expectedType", "==", "null", ")", "return", "true", ";", "if", "(", "actualType", "==", "null", ")", "throw", "new...
Matches expected type to an actual type. The types can be specified as types, type names or TypeCode. @param expectedType an expected type to match. @param actualType an actual type to match. @return true if types are matching and false if they don't. @see #matchTypeByName(String, Class)
[ "Matches", "expected", "type", "to", "an", "actual", "type", ".", "The", "types", "can", "be", "specified", "as", "types", "type", "names", "or", "TypeCode", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/reflect/TypeMatcher.java#L49-L65
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.findAllLocal
@Override public void findAllLocal(String sql, Result<Iterable<Cursor>> result, Object ...args) { """ Queries the database, returning an iterator of results. @param sql the select query for the search @param result callback for the result iterator @param args arguments to the sql """ _kraken.findAll...
java
@Override public void findAllLocal(String sql, Result<Iterable<Cursor>> result, Object ...args) { _kraken.findAllLocal(sql, args, result); }
[ "@", "Override", "public", "void", "findAllLocal", "(", "String", "sql", ",", "Result", "<", "Iterable", "<", "Cursor", ">", ">", "result", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "findAllLocal", "(", "sql", ",", "args", ",", "result", ...
Queries the database, returning an iterator of results. @param sql the select query for the search @param result callback for the result iterator @param args arguments to the sql
[ "Queries", "the", "database", "returning", "an", "iterator", "of", "results", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L144-L148
haifengl/smile
graph/src/main/java/smile/graph/AdjacencyMatrix.java
AdjacencyMatrix.dfsearch
private int dfsearch(int v, int[] pre, int[] ts, int count) { """ Depth-first search of graph. @param v the start vertex. @param pre the array to store the order that vertices will be visited. @param ts the array to store the reverse topological order. @param count the number of vertices have been visited befo...
java
private int dfsearch(int v, int[] pre, int[] ts, int count) { pre[v] = 0; for (int t = 0; t < n; t++) { if (graph[v][t] != 0.0 && pre[t] == -1) { count = dfsearch(t, pre, ts, count); } } ts[count++] = v; return count; }
[ "private", "int", "dfsearch", "(", "int", "v", ",", "int", "[", "]", "pre", ",", "int", "[", "]", "ts", ",", "int", "count", ")", "{", "pre", "[", "v", "]", "=", "0", ";", "for", "(", "int", "t", "=", "0", ";", "t", "<", "n", ";", "t", ...
Depth-first search of graph. @param v the start vertex. @param pre the array to store the order that vertices will be visited. @param ts the array to store the reverse topological order. @param count the number of vertices have been visited before this search. @return the number of vertices that have been visited after...
[ "Depth", "-", "first", "search", "of", "graph", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/graph/src/main/java/smile/graph/AdjacencyMatrix.java#L253-L264
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/doc/DocClient.java
DocClient.createDocument
public CreateDocumentResponse createDocument(File file, String title) { """ Create a Document. @param file The document . @param title The document title. @return A CreateDocumentResponse object containing the information returned by Document. """ CreateDocumentRequest request = new CreateDocu...
java
public CreateDocumentResponse createDocument(File file, String title) { CreateDocumentRequest request = new CreateDocumentRequest(); String format; String filename = file.getName(); if (filename.lastIndexOf(".") == -1) { throw new BceClientException("Cannot get file format fr...
[ "public", "CreateDocumentResponse", "createDocument", "(", "File", "file", ",", "String", "title", ")", "{", "CreateDocumentRequest", "request", "=", "new", "CreateDocumentRequest", "(", ")", ";", "String", "format", ";", "String", "filename", "=", "file", ".", ...
Create a Document. @param file The document . @param title The document title. @return A CreateDocumentResponse object containing the information returned by Document.
[ "Create", "a", "Document", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L159-L171
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/MessageBuilder.java
MessageBuilder.addFileAsSpoiler
public MessageBuilder addFileAsSpoiler(InputStream stream, String fileName) { """ Adds a file to the message and marks it as spoiler. @param stream The stream of the file. @param fileName The name of the file. @return The current instance in order to chain call methods. @see #addAttachment(InputStream, Strin...
java
public MessageBuilder addFileAsSpoiler(InputStream stream, String fileName) { delegate.addFile(stream, "SPOILER_" + fileName); return this; }
[ "public", "MessageBuilder", "addFileAsSpoiler", "(", "InputStream", "stream", ",", "String", "fileName", ")", "{", "delegate", ".", "addFile", "(", "stream", ",", "\"SPOILER_\"", "+", "fileName", ")", ";", "return", "this", ";", "}" ]
Adds a file to the message and marks it as spoiler. @param stream The stream of the file. @param fileName The name of the file. @return The current instance in order to chain call methods. @see #addAttachment(InputStream, String)
[ "Adds", "a", "file", "to", "the", "message", "and", "marks", "it", "as", "spoiler", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/MessageBuilder.java#L283-L286
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java
JSONCompareUtil.findUniqueKey
public static String findUniqueKey(JSONArray expected) throws JSONException { """ Searches for the unique key of the {@code expected} JSON array. @param expected the array to find the unique key of @return the unique key if there's any, otherwise null @throws JSONException JSON parsing error """ /...
java
public static String findUniqueKey(JSONArray expected) throws JSONException { // Find a unique key for the object (id, name, whatever) JSONObject o = (JSONObject) expected.get(0); // There's at least one at this point for (String candidate : getKeys(o)) { if (isUsableAsUniqueKey(cand...
[ "public", "static", "String", "findUniqueKey", "(", "JSONArray", "expected", ")", "throws", "JSONException", "{", "// Find a unique key for the object (id, name, whatever)", "JSONObject", "o", "=", "(", "JSONObject", ")", "expected", ".", "get", "(", "0", ")", ";", ...
Searches for the unique key of the {@code expected} JSON array. @param expected the array to find the unique key of @return the unique key if there's any, otherwise null @throws JSONException JSON parsing error
[ "Searches", "for", "the", "unique", "key", "of", "the", "{", "@code", "expected", "}", "JSON", "array", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java#L66-L74
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasUser.java
BaasUser.loginSync
public BaasResult<BaasUser> loginSync(String registrationId) { """ Synchronously logins the user with password and registrationId obtained through gcm. @param registrationId a registration id for gcm @return the result of the request """ BaasBox box = BaasBox.getDefault(); if (password == n...
java
public BaasResult<BaasUser> loginSync(String registrationId) { BaasBox box = BaasBox.getDefault(); if (password == null) throw new IllegalStateException("password cannot be null"); NetworkTask<BaasUser> task = new LoginRequest(box, this, registrationId, RequestOptions.DEFAULT, null); ret...
[ "public", "BaasResult", "<", "BaasUser", ">", "loginSync", "(", "String", "registrationId", ")", "{", "BaasBox", "box", "=", "BaasBox", ".", "getDefault", "(", ")", ";", "if", "(", "password", "==", "null", ")", "throw", "new", "IllegalStateException", "(", ...
Synchronously logins the user with password and registrationId obtained through gcm. @param registrationId a registration id for gcm @return the result of the request
[ "Synchronously", "logins", "the", "user", "with", "password", "and", "registrationId", "obtained", "through", "gcm", "." ]
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasUser.java#L819-L824
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Message.java
Message.create
public static Message create(final String to, final String from, final String text, final ReceiptRequest receiptRequest) throws Exception { """ Convenience factory method to send a message with receipt, given the to number, the from number and the text @param to the from number @param from the to number @param ...
java
public static Message create(final String to, final String from, final String text, final ReceiptRequest receiptRequest) throws Exception { final Map<String, Object> params = new HashMap<String, Object>(); params.put("to", to); params.put("from", from); params.put("text", text); ...
[ "public", "static", "Message", "create", "(", "final", "String", "to", ",", "final", "String", "from", ",", "final", "String", "text", ",", "final", "ReceiptRequest", "receiptRequest", ")", "throws", "Exception", "{", "final", "Map", "<", "String", ",", "Obj...
Convenience factory method to send a message with receipt, given the to number, the from number and the text @param to the from number @param from the to number @param text the text @param receiptRequest the receipt request option @return the message @throws IOException unexpected error
[ "Convenience", "factory", "method", "to", "send", "a", "message", "with", "receipt", "given", "the", "to", "number", "the", "from", "number", "and", "the", "text" ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Message.java#L120-L133
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/Variable.java
Variable.addMember
public Member addMember(String memberName, FunctionCall functionCall) { """ Add a fuzzy member to this variable. <p> @param memberName member name @param functionCall the function call @return the member """ if (haveMember(memberName)) { throw new FuzzerException(memberName + ": member already exist...
java
public Member addMember(String memberName, FunctionCall functionCall) { if (haveMember(memberName)) { throw new FuzzerException(memberName + ": member already exists of variable '" + name + "'"); } Member member = new Member(memberName, functionCall); members.add(member); return member; }
[ "public", "Member", "addMember", "(", "String", "memberName", ",", "FunctionCall", "functionCall", ")", "{", "if", "(", "haveMember", "(", "memberName", ")", ")", "{", "throw", "new", "FuzzerException", "(", "memberName", "+", "\": member already exists of variable ...
Add a fuzzy member to this variable. <p> @param memberName member name @param functionCall the function call @return the member
[ "Add", "a", "fuzzy", "member", "to", "this", "variable", ".", "<p", ">" ]
train
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/Variable.java#L226-L233
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/info/impl/XLogInfoImpl.java
XLogInfoImpl.registerAttributes
protected void registerAttributes(XAttributeInfoImpl attributeInfo, XAttributable attributable) { """ Registers all attributes of a given attributable, i.e. model type hierarchy element, in the given attribute info registry. @param attributeInfo Attribute info registry to use for registration. @param attribut...
java
protected void registerAttributes(XAttributeInfoImpl attributeInfo, XAttributable attributable) { if (attributable.hasAttributes()) { for(XAttribute attribute : attributable.getAttributes().values()) { // register attribute in appropriate map attributeInfo.register(attribute); // register meta-attribut...
[ "protected", "void", "registerAttributes", "(", "XAttributeInfoImpl", "attributeInfo", ",", "XAttributable", "attributable", ")", "{", "if", "(", "attributable", ".", "hasAttributes", "(", ")", ")", "{", "for", "(", "XAttribute", "attribute", ":", "attributable", ...
Registers all attributes of a given attributable, i.e. model type hierarchy element, in the given attribute info registry. @param attributeInfo Attribute info registry to use for registration. @param attributable Attributable whose attributes to register.
[ "Registers", "all", "attributes", "of", "a", "given", "attributable", "i", ".", "e", ".", "model", "type", "hierarchy", "element", "in", "the", "given", "attribute", "info", "registry", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/info/impl/XLogInfoImpl.java#L262-L271
oasp/oasp4j
modules/basic/src/main/java/io/oasp/module/basic/common/api/config/SimpleConfigProperties.java
SimpleConfigProperties.fromHierarchicalMap
@SuppressWarnings("unchecked") protected void fromHierarchicalMap(Map<String, Object> map) { """ @see SimpleConfigProperties#ofHierarchicalMap(String, Map) @param map the hierarchical {@link Map} of the configuration values. """ for (Entry<String, Object> entry : map.entrySet()) { SimpleConfigP...
java
@SuppressWarnings("unchecked") protected void fromHierarchicalMap(Map<String, Object> map) { for (Entry<String, Object> entry : map.entrySet()) { SimpleConfigProperties child = (SimpleConfigProperties) getChild(entry.getKey(), true); Object childObject = entry.getValue(); if (childObject instan...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "fromHierarchicalMap", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "for", "(", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "map", ".", "entrySet", ...
@see SimpleConfigProperties#ofHierarchicalMap(String, Map) @param map the hierarchical {@link Map} of the configuration values.
[ "@see", "SimpleConfigProperties#ofHierarchicalMap", "(", "String", "Map", ")" ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/basic/src/main/java/io/oasp/module/basic/common/api/config/SimpleConfigProperties.java#L271-L283
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_snmpmanager.java
br_snmpmanager.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_snmpmanager_responses result = (br_snmpmanager_responses) service.ge...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_snmpmanager_responses result = (br_snmpmanager_responses) service.get_payload_formatter().string_to_resource(br_snmpmanager_responses.class, response); if(result.errorcode != 0) { if (result.er...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_snmpmanager_responses", "result", "=", "(", "br_snmpmanager_responses", ")", "service", ".", "get_payload_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_snmpmanager.java#L199-L216
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/utility/PRJUtil.java
PRJUtil.isSRIDValid
public static boolean isSRIDValid(int srid, Connection connection) throws SQLException { """ This method checks if a SRID value is valid according a list of SRID's avalaible on spatial_ref table of the datababase. @param srid @param connection @return @throws java.sql.SQLException """ PreparedSt...
java
public static boolean isSRIDValid(int srid, Connection connection) throws SQLException { PreparedStatement ps = null; ResultSet rs = null; String queryCheck = "SELECT count(SRID) from PUBLIC.SPATIAL_REF_SYS WHERE SRID = ?"; try { ps = connection.prepareStatement(queryCheck); ...
[ "public", "static", "boolean", "isSRIDValid", "(", "int", "srid", ",", "Connection", "connection", ")", "throws", "SQLException", "{", "PreparedStatement", "ps", "=", "null", ";", "ResultSet", "rs", "=", "null", ";", "String", "queryCheck", "=", "\"SELECT count(...
This method checks if a SRID value is valid according a list of SRID's avalaible on spatial_ref table of the datababase. @param srid @param connection @return @throws java.sql.SQLException
[ "This", "method", "checks", "if", "a", "SRID", "value", "is", "valid", "according", "a", "list", "of", "SRID", "s", "avalaible", "on", "spatial_ref", "table", "of", "the", "datababase", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/utility/PRJUtil.java#L184-L204
structr/structr
structr-ui/src/main/java/org/structr/files/cmis/CMISAclService.java
CMISAclService.applyAcl
public Acl applyAcl(final String repositoryId, final String objectId, final Acl acl, final AclPropagation aclPropagation) { """ Applies the given Acl exclusively, i.e. removes all other permissions / grants first. @param repositoryId @param objectId @param acl @param aclPropagation @return the resulting A...
java
public Acl applyAcl(final String repositoryId, final String objectId, final Acl acl, final AclPropagation aclPropagation) { final App app = StructrApp.getInstance(securityContext); try (final Tx tx = app.tx()) { final AbstractNode node = app.get(AbstractNode.class, objectId); if (node != null) { node....
[ "public", "Acl", "applyAcl", "(", "final", "String", "repositoryId", ",", "final", "String", "objectId", ",", "final", "Acl", "acl", ",", "final", "AclPropagation", "aclPropagation", ")", "{", "final", "App", "app", "=", "StructrApp", ".", "getInstance", "(", ...
Applies the given Acl exclusively, i.e. removes all other permissions / grants first. @param repositoryId @param objectId @param acl @param aclPropagation @return the resulting Acl
[ "Applies", "the", "given", "Acl", "exclusively", "i", ".", "e", ".", "removes", "all", "other", "permissions", "/", "grants", "first", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/files/cmis/CMISAclService.java#L88-L115
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.removeSessionValue
public static void removeSessionValue(HttpServletRequest request, String key) { """ Removes an object from the session of the given http request.<p> A session will be initialized if the request does not currently have a session. As a result, the request will always have a session after this method has been cal...
java
public static void removeSessionValue(HttpServletRequest request, String key) { HttpSession session = request.getSession(true); session.removeAttribute(key); }
[ "public", "static", "void", "removeSessionValue", "(", "HttpServletRequest", "request", ",", "String", "key", ")", "{", "HttpSession", "session", "=", "request", ".", "getSession", "(", "true", ")", ";", "session", ".", "removeAttribute", "(", "key", ")", ";",...
Removes an object from the session of the given http request.<p> A session will be initialized if the request does not currently have a session. As a result, the request will always have a session after this method has been called.<p> @param request the request to get the session from @param key the key of the object...
[ "Removes", "an", "object", "from", "the", "session", "of", "the", "given", "http", "request", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L884-L888
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_game_ipOnGame_PUT
public void ip_game_ipOnGame_PUT(String ip, String ipOnGame, OvhGameMitigation body) throws IOException { """ Alter this object properties REST: PUT /ip/{ip}/game/{ipOnGame} @param body [required] New object properties @param ip [required] @param ipOnGame [required] """ String qPath = "/ip/{ip}/game/{i...
java
public void ip_game_ipOnGame_PUT(String ip, String ipOnGame, OvhGameMitigation body) throws IOException { String qPath = "/ip/{ip}/game/{ipOnGame}"; StringBuilder sb = path(qPath, ip, ipOnGame); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "ip_game_ipOnGame_PUT", "(", "String", "ip", ",", "String", "ipOnGame", ",", "OvhGameMitigation", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/game/{ipOnGame}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qP...
Alter this object properties REST: PUT /ip/{ip}/game/{ipOnGame} @param body [required] New object properties @param ip [required] @param ipOnGame [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L406-L410
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
IOUtil.toDebugString
public static String toDebugString(String name, ByteBuffer byteBuffer) { """ Creates a debug String for te given ByteBuffer. Useful when debugging IO. <p> Do not remove even if this method isn't used. @param name name of the ByteBuffer. @param byteBuffer the ByteBuffer @return the debug String """...
java
public static String toDebugString(String name, ByteBuffer byteBuffer) { return name + "(pos:" + byteBuffer.position() + " lim:" + byteBuffer.limit() + " remain:" + byteBuffer.remaining() + " cap:" + byteBuffer.capacity() + ")"; }
[ "public", "static", "String", "toDebugString", "(", "String", "name", ",", "ByteBuffer", "byteBuffer", ")", "{", "return", "name", "+", "\"(pos:\"", "+", "byteBuffer", ".", "position", "(", ")", "+", "\" lim:\"", "+", "byteBuffer", ".", "limit", "(", ")", ...
Creates a debug String for te given ByteBuffer. Useful when debugging IO. <p> Do not remove even if this method isn't used. @param name name of the ByteBuffer. @param byteBuffer the ByteBuffer @return the debug String
[ "Creates", "a", "debug", "String", "for", "te", "given", "ByteBuffer", ".", "Useful", "when", "debugging", "IO", ".", "<p", ">", "Do", "not", "remove", "even", "if", "this", "method", "isn", "t", "used", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java#L661-L664
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.pauseDomainStream
public PauseDomainStreamResponse pauseDomainStream(String domain, String app, String stream) { """ Get detail of stream in the live stream service. @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The reques...
java
public PauseDomainStreamResponse pauseDomainStream(String domain, String app, String stream) { PauseDomainStreamRequest request = new PauseDomainStreamRequest(); request.withDomain(domain).withApp(app).withStream(stream); return pauseDomainStream(request); }
[ "public", "PauseDomainStreamResponse", "pauseDomainStream", "(", "String", "domain", ",", "String", "app", ",", "String", "stream", ")", "{", "PauseDomainStreamRequest", "request", "=", "new", "PauseDomainStreamRequest", "(", ")", ";", "request", ".", "withDomain", ...
Get detail of stream in the live stream service. @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The requested stream to pause @return the response
[ "Get", "detail", "of", "stream", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1521-L1525
JodaOrg/joda-time
src/main/java/org/joda/time/DateTimeZone.java
DateTimeZone.getShortName
public String getShortName(long instant, Locale locale) { """ Gets the short name of this datetime zone suitable for display using the specified locale. <p> If the name is not available for the locale, then this method returns a string in the format <code>[+-]hh:mm</code>. @param instant milliseconds from ...
java
public String getShortName(long instant, Locale locale) { if (locale == null) { locale = Locale.getDefault(); } String nameKey = getNameKey(instant); if (nameKey == null) { return iID; } String name; NameProvider np = getNameProvider(); ...
[ "public", "String", "getShortName", "(", "long", "instant", ",", "Locale", "locale", ")", "{", "if", "(", "locale", "==", "null", ")", "{", "locale", "=", "Locale", ".", "getDefault", "(", ")", ";", "}", "String", "nameKey", "=", "getNameKey", "(", "in...
Gets the short name of this datetime zone suitable for display using the specified locale. <p> If the name is not available for the locale, then this method returns a string in the format <code>[+-]hh:mm</code>. @param instant milliseconds from 1970-01-01T00:00:00Z to get the name for @param locale the locale to get...
[ "Gets", "the", "short", "name", "of", "this", "datetime", "zone", "suitable", "for", "display", "using", "the", "specified", "locale", ".", "<p", ">", "If", "the", "name", "is", "not", "available", "for", "the", "locale", "then", "this", "method", "returns...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTimeZone.java#L756-L775
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.putShort
public final void putShort(Object parent, long offset, short value) { """ Puts the value at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value short to be put """ THE_UNSAFE.putShort(parent, offset, value); }
java
public final void putShort(Object parent, long offset, short value) { THE_UNSAFE.putShort(parent, offset, value); }
[ "public", "final", "void", "putShort", "(", "Object", "parent", ",", "long", "offset", ",", "short", "value", ")", "{", "THE_UNSAFE", ".", "putShort", "(", "parent", ",", "offset", ",", "value", ")", ";", "}" ]
Puts the value at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value short to be put
[ "Puts", "the", "value", "at", "the", "given", "offset", "of", "the", "supplied", "parent", "object" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L973-L975
hawkular/hawkular-agent
hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/inventory/InventoryIdUtil.java
InventoryIdUtil.generateResourceId
public static ID generateResourceId( String feedId, MonitoredEndpoint<? extends AbstractEndpointConfiguration> endpoint, String idPart) { """ Generates an ID for a resource. @param feedId the ID of the feed that owns the resource whose ID is to be generated @param endpoint t...
java
public static ID generateResourceId( String feedId, MonitoredEndpoint<? extends AbstractEndpointConfiguration> endpoint, String idPart) { ID id = new ID(String.format("%s~%s~%s", feedId, endpoint.getName(), idPart)); return id; }
[ "public", "static", "ID", "generateResourceId", "(", "String", "feedId", ",", "MonitoredEndpoint", "<", "?", "extends", "AbstractEndpointConfiguration", ">", "endpoint", ",", "String", "idPart", ")", "{", "ID", "id", "=", "new", "ID", "(", "String", ".", "form...
Generates an ID for a resource. @param feedId the ID of the feed that owns the resource whose ID is to be generated @param endpoint the endpoint where the resource is found @param idPart a unique string that identifies the resource within the managed server @return the resource ID
[ "Generates", "an", "ID", "for", "a", "resource", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-agent-core/src/main/java/org/hawkular/agent/monitor/inventory/InventoryIdUtil.java#L80-L86
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.one
public SDVariable one(String name, org.nd4j.linalg.api.buffer.DataType dataType, int... shape) { """ Create a new variable with the specified shape, with all values initialized to 1.0 @param name the name of the variable to create @param shape the shape of the array to be created @return the created variable...
java
public SDVariable one(String name, org.nd4j.linalg.api.buffer.DataType dataType, int... shape) { return var(name, new ConstantInitScheme('f', 1.0), dataType, ArrayUtil.toLongArray(shape)); }
[ "public", "SDVariable", "one", "(", "String", "name", ",", "org", ".", "nd4j", ".", "linalg", ".", "api", ".", "buffer", ".", "DataType", "dataType", ",", "int", "...", "shape", ")", "{", "return", "var", "(", "name", ",", "new", "ConstantInitScheme", ...
Create a new variable with the specified shape, with all values initialized to 1.0 @param name the name of the variable to create @param shape the shape of the array to be created @return the created variable
[ "Create", "a", "new", "variable", "with", "the", "specified", "shape", "with", "all", "values", "initialized", "to", "1", ".", "0" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L1946-L1948
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.getDouble
public double getDouble(String name, String namespace) { """ Returns the attribute as a double value. @param name the attribute name @param namespace the attribute namespace @return the value """ return Double.parseDouble(get(name, namespace)); }
java
public double getDouble(String name, String namespace) { return Double.parseDouble(get(name, namespace)); }
[ "public", "double", "getDouble", "(", "String", "name", ",", "String", "namespace", ")", "{", "return", "Double", ".", "parseDouble", "(", "get", "(", "name", ",", "namespace", ")", ")", ";", "}" ]
Returns the attribute as a double value. @param name the attribute name @param namespace the attribute namespace @return the value
[ "Returns", "the", "attribute", "as", "a", "double", "value", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L787-L789
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java
PathManagerService.addHardcodedAbsolutePath
protected final ServiceController<?> addHardcodedAbsolutePath(final ServiceTarget serviceTarget, final String pathName, final String path) { """ Add a {@code PathEntry} and install a {@code Service<String>} for one of the standard read-only paths that are determined from this process' environment. Not to be used ...
java
protected final ServiceController<?> addHardcodedAbsolutePath(final ServiceTarget serviceTarget, final String pathName, final String path) { ServiceController<?> controller = addAbsolutePathService(serviceTarget, pathName, path); addPathEntry(pathName, path, null, true); if (capabilityRegistry ...
[ "protected", "final", "ServiceController", "<", "?", ">", "addHardcodedAbsolutePath", "(", "final", "ServiceTarget", "serviceTarget", ",", "final", "String", "pathName", ",", "final", "String", "path", ")", "{", "ServiceController", "<", "?", ">", "controller", "=...
Add a {@code PathEntry} and install a {@code Service<String>} for one of the standard read-only paths that are determined from this process' environment. Not to be used for paths stored in the persistent configuration. @param serviceTarget service target to use for the service installation @param pathName the logical n...
[ "Add", "a", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L159-L168
OpenBEL/openbel-framework
org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java
PhaseApplication.markTime
protected void markTime(final StringBuilder b, long t1, long t2) { """ Appends {@code (#.### seconds)} to the builder, if {@link RuntimeConfiguration#isTime() runtime configuration timing} is set. @param b Non-null builder @param t1 Time at {@code t1} @param t2 Time at {@code t2} """ boolean tim...
java
protected void markTime(final StringBuilder b, long t1, long t2) { boolean time = getPhaseConfiguration().isTime(); if (time) { String seconds = timeFormat((t2 - t1)); b.append("("); b.append(seconds); b.append(" seconds) "); } }
[ "protected", "void", "markTime", "(", "final", "StringBuilder", "b", ",", "long", "t1", ",", "long", "t2", ")", "{", "boolean", "time", "=", "getPhaseConfiguration", "(", ")", ".", "isTime", "(", ")", ";", "if", "(", "time", ")", "{", "String", "second...
Appends {@code (#.### seconds)} to the builder, if {@link RuntimeConfiguration#isTime() runtime configuration timing} is set. @param b Non-null builder @param t1 Time at {@code t1} @param t2 Time at {@code t2}
[ "Appends", "{", "@code", "(", "#", ".", "###", "seconds", ")", "}", "to", "the", "builder", "if", "{", "@link", "RuntimeConfiguration#isTime", "()", "runtime", "configuration", "timing", "}", "is", "set", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L385-L393
di2e/Argo
Responder/ResponderDaemon/src/main/java/ws/argo/responder/Responder.java
Responder.initialize
public static Responder initialize(String[] args) throws ResponderConfigException { """ Create a new Responder given the command line arguments. @param args - command line arguments @return the new Responder instance or null if something wonky happened @throws ResponderConfigException if bad things happen wit...
java
public static Responder initialize(String[] args) throws ResponderConfigException { readVersionProperties(); LOGGER.info("Starting Argo Responder daemon process. Version " + ARGO_VERSION); ResponderConfiguration config = parseCommandLine(args); if (config == null) { LOGGER.error( "Invalid Respo...
[ "public", "static", "Responder", "initialize", "(", "String", "[", "]", "args", ")", "throws", "ResponderConfigException", "{", "readVersionProperties", "(", ")", ";", "LOGGER", ".", "info", "(", "\"Starting Argo Responder daemon process. Version \"", "+", "ARGO_VERSION...
Create a new Responder given the command line arguments. @param args - command line arguments @return the new Responder instance or null if something wonky happened @throws ResponderConfigException if bad things happen with the configuration files and the content of the files. For example if the classnames for the pro...
[ "Create", "a", "new", "Responder", "given", "the", "command", "line", "arguments", "." ]
train
https://github.com/di2e/Argo/blob/f537a03d2d25fdfecda7999ec10e1da67dc3b8f3/Responder/ResponderDaemon/src/main/java/ws/argo/responder/Responder.java#L510-L543
pravega/pravega
client/src/main/java/io/pravega/client/stream/impl/ModelHelper.java
ModelHelper.encode
public static final Transaction.PingStatus encode(final Controller.PingTxnStatus.Status status, final String logString) throws PingFailedException { """ Returns the status of Ping Transaction. @param status PingTxnStatus object instance. @param logString Description text to be logged when ping ...
java
public static final Transaction.PingStatus encode(final Controller.PingTxnStatus.Status status, final String logString) throws PingFailedException { Preconditions.checkNotNull(status, "status"); Exceptions.checkNotNullOrEmpty(logString, "logString"); Transaction.PingStatus result; ...
[ "public", "static", "final", "Transaction", ".", "PingStatus", "encode", "(", "final", "Controller", ".", "PingTxnStatus", ".", "Status", "status", ",", "final", "String", "logString", ")", "throws", "PingFailedException", "{", "Preconditions", ".", "checkNotNull", ...
Returns the status of Ping Transaction. @param status PingTxnStatus object instance. @param logString Description text to be logged when ping transaction status is invalid. @return Transaction.PingStatus @throws PingFailedException if status of Ping transaction operations is not successful.
[ "Returns", "the", "status", "of", "Ping", "Transaction", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/stream/impl/ModelHelper.java#L184-L203
morimekta/providence
providence-core/src/main/java-gen/net/morimekta/providence/util/Any.java
Any.unwrapMessage
public <M extends net.morimekta.providence.PMessage<M, F>, F extends net.morimekta.providence.descriptor.PField> M unwrapMessage(@javax.annotation.Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M,F> descriptor) { """ Unwrap a message from this wrapper message. This will use the default seriali...
java
public <M extends net.morimekta.providence.PMessage<M, F>, F extends net.morimekta.providence.descriptor.PField> M unwrapMessage(@javax.annotation.Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M,F> descriptor) { return unwrapMessage(descriptor, new net.morimekta.providence.serializer.Defaul...
[ "public", "<", "M", "extends", "net", ".", "morimekta", ".", "providence", ".", "PMessage", "<", "M", ",", "F", ">", ",", "F", "extends", "net", ".", "morimekta", ".", "providence", ".", "descriptor", ".", "PField", ">", "M", "unwrapMessage", "(", "@",...
Unwrap a message from this wrapper message. This will use the default serializer provider to find a suitable serializer to use to deserialize the wrapped message. If no serializer is available, or the message cannot be deserialized an unchecked IO exception is thrown. @param descriptor The message type to unpack from ...
[ "Unwrap", "a", "message", "from", "this", "wrapper", "message", ".", "This", "will", "use", "the", "default", "serializer", "provider", "to", "find", "a", "suitable", "serializer", "to", "use", "to", "deserialize", "the", "wrapped", "message", ".", "If", "no...
train
https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-core/src/main/java-gen/net/morimekta/providence/util/Any.java#L290-L293
vanilladb/vanillacore
src/main/java/org/vanilladb/core/query/planner/opt/SelingerLikeQueryPlanner.java
SelingerLikeQueryPlanner.createPlan
@Override public Plan createPlan(QueryData data, Transaction tx) { """ Creates a left-deep query plan using the Selinger optimization. Main idea is to find all permutation of table join order and to choose the cheapest plan. However, all permutation can be too much for us to go through all. So we use DP and l...
java
@Override public Plan createPlan(QueryData data, Transaction tx) { // Step 1: Create a TablePlanner object for each mentioned table/view int id = 0; for (String tbl : data.tables()) { String viewdef = VanillaDb.catalogMgr().getViewDef(tbl, tx); if (viewdef != null) views.add(VanillaDb.newPlanner...
[ "@", "Override", "public", "Plan", "createPlan", "(", "QueryData", "data", ",", "Transaction", "tx", ")", "{", "// Step 1: Create a TablePlanner object for each mentioned table/view\r", "int", "id", "=", "0", ";", "for", "(", "String", "tbl", ":", "data", ".", "ta...
Creates a left-deep query plan using the Selinger optimization. Main idea is to find all permutation of table join order and to choose the cheapest plan. However, all permutation can be too much for us to go through all. So we use DP and left-deep only to optimize this process.
[ "Creates", "a", "left", "-", "deep", "query", "plan", "using", "the", "Selinger", "optimization", ".", "Main", "idea", "is", "to", "find", "all", "permutation", "of", "table", "join", "order", "and", "to", "choose", "the", "cheapest", "plan", ".", "However...
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/query/planner/opt/SelingerLikeQueryPlanner.java#L48-L78
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/math/RoundHelper.java
RoundHelper.getRoundedUpFix
public static double getRoundedUpFix (final double dValue, @Nonnegative final int nScale) { """ Round using the {@link RoundingMode#HALF_UP} mode and fix representation @param dValue The value to be rounded @param nScale The precision scale @return the rounded value """ return getRounded (dValue, nS...
java
public static double getRoundedUpFix (final double dValue, @Nonnegative final int nScale) { return getRounded (dValue, nScale, RoundingMode.HALF_UP, EDecimalType.FIX); }
[ "public", "static", "double", "getRoundedUpFix", "(", "final", "double", "dValue", ",", "@", "Nonnegative", "final", "int", "nScale", ")", "{", "return", "getRounded", "(", "dValue", ",", "nScale", ",", "RoundingMode", ".", "HALF_UP", ",", "EDecimalType", ".",...
Round using the {@link RoundingMode#HALF_UP} mode and fix representation @param dValue The value to be rounded @param nScale The precision scale @return the rounded value
[ "Round", "using", "the", "{", "@link", "RoundingMode#HALF_UP", "}", "mode", "and", "fix", "representation" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/math/RoundHelper.java#L116-L119
fengwenyi/JavaLib
src/main/java/com/fengwenyi/javalib/util/MathUtil.java
MathUtil.randomNum
public static double randomNum(int x, int y) { """ 在[y, x]范围内产生一个随机数 @param x 最大值 @param y 最小值 @return [y, x]范围内的随机数 """ int max = x + 1; int min = y + 1; Random random = new Random(); int result = random.nextInt(max)%(max-min+1) + min; return result - 1; }
java
public static double randomNum(int x, int y) { int max = x + 1; int min = y + 1; Random random = new Random(); int result = random.nextInt(max)%(max-min+1) + min; return result - 1; }
[ "public", "static", "double", "randomNum", "(", "int", "x", ",", "int", "y", ")", "{", "int", "max", "=", "x", "+", "1", ";", "int", "min", "=", "y", "+", "1", ";", "Random", "random", "=", "new", "Random", "(", ")", ";", "int", "result", "=", ...
在[y, x]范围内产生一个随机数 @param x 最大值 @param y 最小值 @return [y, x]范围内的随机数
[ "在", "[", "y", "x", "]", "范围内产生一个随机数" ]
train
https://github.com/fengwenyi/JavaLib/blob/14838b13fb11c024e41be766aa3e13ead4be1703/src/main/java/com/fengwenyi/javalib/util/MathUtil.java#L26-L32
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ObjectUtils.java
ObjectUtils.returnValueOrThrowIfNull
public static <T> T returnValueOrThrowIfNull(T value, RuntimeException exception) { """ Returns the given {@code value} if not {@literal null} or throws the given {@link RuntimeException}. @param <T> {@link Class} type of the {@code value}. @param value {@link Object} value to evaluate. @param exception {@lin...
java
public static <T> T returnValueOrThrowIfNull(T value, RuntimeException exception) { Assert.notNull(exception, "RuntimeException must not be null"); return Optional.ofNullable(value).orElseThrow(() -> exception); }
[ "public", "static", "<", "T", ">", "T", "returnValueOrThrowIfNull", "(", "T", "value", ",", "RuntimeException", "exception", ")", "{", "Assert", ".", "notNull", "(", "exception", ",", "\"RuntimeException must not be null\"", ")", ";", "return", "Optional", ".", ...
Returns the given {@code value} if not {@literal null} or throws the given {@link RuntimeException}. @param <T> {@link Class} type of the {@code value}. @param value {@link Object} value to evaluate. @param exception {@link RuntimeException} to throw if {@code value} is {@literal null}. @return the given {@code value}...
[ "Returns", "the", "given", "{", "@code", "value", "}", "if", "not", "{", "@literal", "null", "}", "or", "throws", "the", "given", "{", "@link", "RuntimeException", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ObjectUtils.java#L231-L236
netty/netty
handler/src/main/java/io/netty/handler/ssl/OpenSslSessionContext.java
OpenSslSessionContext.setTicketKeys
@Deprecated public void setTicketKeys(byte[] keys) { """ Sets the SSL session ticket keys of this context. @deprecated use {@link #setTicketKeys(OpenSslSessionTicketKey...)}. """ if (keys.length % SessionTicketKey.TICKET_KEY_SIZE != 0) { throw new IllegalArgumentException("keys.length ...
java
@Deprecated public void setTicketKeys(byte[] keys) { if (keys.length % SessionTicketKey.TICKET_KEY_SIZE != 0) { throw new IllegalArgumentException("keys.length % " + SessionTicketKey.TICKET_KEY_SIZE + " != 0"); } SessionTicketKey[] tickets = new SessionTicketKey[keys.length / Se...
[ "@", "Deprecated", "public", "void", "setTicketKeys", "(", "byte", "[", "]", "keys", ")", "{", "if", "(", "keys", ".", "length", "%", "SessionTicketKey", ".", "TICKET_KEY_SIZE", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"keys.le...
Sets the SSL session ticket keys of this context. @deprecated use {@link #setTicketKeys(OpenSslSessionTicketKey...)}.
[ "Sets", "the", "SSL", "session", "ticket", "keys", "of", "this", "context", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/OpenSslSessionContext.java#L72-L95
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java
SqlPkStatement.appendWhereClause
protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException { """ Generate a sql where-clause for the array of fields @param fields array containing all columns used in WHERE clause """ stmt.append(" WHERE "); for(int i = 0; i < fields....
java
protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException { stmt.append(" WHERE "); for(int i = 0; i < fields.length; i++) { FieldDescriptor fmd = fields[i]; stmt.append(fmd.getColumnName()); ...
[ "protected", "void", "appendWhereClause", "(", "FieldDescriptor", "[", "]", "fields", ",", "StringBuffer", "stmt", ")", "throws", "PersistenceBrokerException", "{", "stmt", ".", "append", "(", "\" WHERE \"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "...
Generate a sql where-clause for the array of fields @param fields array containing all columns used in WHERE clause
[ "Generate", "a", "sql", "where", "-", "clause", "for", "the", "array", "of", "fields" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlPkStatement.java#L82-L97
linkedin/dexmaker
dexmaker/src/main/java/com/android/dx/Code.java
Code.newInstance
public <T> void newInstance(Local<T> target, MethodId<T, Void> constructor, Local<?>... args) { """ Calls the constructor {@code constructor} using {@code args} and assigns the new instance to {@code target}. """ if (target == null) { throw new IllegalArgumentException(); } ...
java
public <T> void newInstance(Local<T> target, MethodId<T, Void> constructor, Local<?>... args) { if (target == null) { throw new IllegalArgumentException(); } addInstruction(new ThrowingCstInsn(Rops.NEW_INSTANCE, sourcePosition, RegisterSpecList.EMPTY, catches, constru...
[ "public", "<", "T", ">", "void", "newInstance", "(", "Local", "<", "T", ">", "target", ",", "MethodId", "<", "T", ",", "Void", ">", "constructor", ",", "Local", "<", "?", ">", "...", "args", ")", "{", "if", "(", "target", "==", "null", ")", "{", ...
Calls the constructor {@code constructor} using {@code args} and assigns the new instance to {@code target}.
[ "Calls", "the", "constructor", "{" ]
train
https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker/src/main/java/com/android/dx/Code.java#L628-L636
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsAccountsApp.java
CmsAccountsApp.createUserTable
protected I_CmsFilterableTable createUserTable( String ou, CmsUUID groupID, I_CmsOuTreeType type, boolean showAll, CmsAccountsApp cmsAccountsApp) { """ Creates user table for a specific group or role.<p> @param ou the OU path @param groupID the group id @param type the ...
java
protected I_CmsFilterableTable createUserTable( String ou, CmsUUID groupID, I_CmsOuTreeType type, boolean showAll, CmsAccountsApp cmsAccountsApp) { return new CmsUserTable(ou, groupID, type, showAll, cmsAccountsApp); }
[ "protected", "I_CmsFilterableTable", "createUserTable", "(", "String", "ou", ",", "CmsUUID", "groupID", ",", "I_CmsOuTreeType", "type", ",", "boolean", "showAll", ",", "CmsAccountsApp", "cmsAccountsApp", ")", "{", "return", "new", "CmsUserTable", "(", "ou", ",", "...
Creates user table for a specific group or role.<p> @param ou the OU path @param groupID the group id @param type the tree type @param showAll true if all users should be shown @param cmsAccountsApp the app instance @return the user table
[ "Creates", "user", "table", "for", "a", "specific", "group", "or", "role", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsAccountsApp.java#L807-L815
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/DBFDriverFunction.java
DBFDriverFunction.dBaseHeaderFromMetaData
public static DbaseFileHeader dBaseHeaderFromMetaData(ResultSetMetaData metaData, List<Integer> retainedColumns) throws SQLException { """ Create a DBF header from the columns specified in parameter. @param metaData SQL ResultSetMetadata @param retainedColumns list of column indexes @return DbfaseFileHeader ins...
java
public static DbaseFileHeader dBaseHeaderFromMetaData(ResultSetMetaData metaData, List<Integer> retainedColumns) throws SQLException { DbaseFileHeader dbaseFileHeader = new DbaseFileHeader(); for(int fieldId= 1; fieldId <= metaData.getColumnCount(); fieldId++) { final String fieldTypeName = ...
[ "public", "static", "DbaseFileHeader", "dBaseHeaderFromMetaData", "(", "ResultSetMetaData", "metaData", ",", "List", "<", "Integer", ">", "retainedColumns", ")", "throws", "SQLException", "{", "DbaseFileHeader", "dbaseFileHeader", "=", "new", "DbaseFileHeader", "(", ")"...
Create a DBF header from the columns specified in parameter. @param metaData SQL ResultSetMetadata @param retainedColumns list of column indexes @return DbfaseFileHeader instance. @throws SQLException If one or more type are not supported by DBF
[ "Create", "a", "DBF", "header", "from", "the", "columns", "specified", "in", "parameter", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/dbf/DBFDriverFunction.java#L367-L383
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/HeapCache.java
HeapCache.refreshEntry
private void refreshEntry(final Entry<K, V> e) { """ Executed in loader thread. Load the entry again. After the load we copy the entry to the refresh hash and expire it in the main hash. The entry needs to stay in the main hash during the load, to block out concurrent reads. """ synchronized (e) { ...
java
private void refreshEntry(final Entry<K, V> e) { synchronized (e) { e.waitForProcessing(); if (e.isGone()) { return; } e.startProcessing(Entry.ProcessingState.REFRESH); } boolean _finished = false; try { load(e); _finished = true; } catch (CacheClosedExcep...
[ "private", "void", "refreshEntry", "(", "final", "Entry", "<", "K", ",", "V", ">", "e", ")", "{", "synchronized", "(", "e", ")", "{", "e", ".", "waitForProcessing", "(", ")", ";", "if", "(", "e", ".", "isGone", "(", ")", ")", "{", "return", ";", ...
Executed in loader thread. Load the entry again. After the load we copy the entry to the refresh hash and expire it in the main hash. The entry needs to stay in the main hash during the load, to block out concurrent reads.
[ "Executed", "in", "loader", "thread", ".", "Load", "the", "entry", "again", ".", "After", "the", "load", "we", "copy", "the", "entry", "to", "the", "refresh", "hash", "and", "expire", "it", "in", "the", "main", "hash", ".", "The", "entry", "needs", "to...
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/HeapCache.java#L1565-L1589
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java
ChatRoomClient.getAppChatRoomInfo
public ChatRoomListResult getAppChatRoomInfo(int start, int count) throws APIConnectionException, APIRequestException { """ Get application's chat room list @param start start index @param count list count @return {@link ChatRoomListResult} @throws APIConnectionException connect exception @throw...
java
public ChatRoomListResult getAppChatRoomInfo(int start, int count) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(start >= 0 && count > 0, "Illegal argument"); ResponseWrapper responseWrapper = _httpClient.sendGet(_baseUrl + mChatRoomPath + "?start=" + start...
[ "public", "ChatRoomListResult", "getAppChatRoomInfo", "(", "int", "start", ",", "int", "count", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "(", "start", ">=", "0", "&&", "count", ">", "0", ",", ...
Get application's chat room list @param start start index @param count list count @return {@link ChatRoomListResult} @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Get", "application", "s", "chat", "room", "list" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java#L100-L105
DependencyWatcher/agent
src/main/java/com/dependencywatcher/client/DependencyWatcherClient.java
DependencyWatcherClient.uploadRepository
public void uploadRepository(String name, File archive) throws ClientException { """ Creates or updates repository by the given name @param name Repository name @param archive Archive containing repository data @throws ClientException """ HttpPut putMethod = new HttpPut(baseUri + "/repository/" ...
java
public void uploadRepository(String name, File archive) throws ClientException { HttpPut putMethod = new HttpPut(baseUri + "/repository/" + encodeURIComponent(name)); HttpEntity httpEntity = MultipartEntityBuilder .create() .addBinaryBody("file", archive, ContentType.create("application/zip")...
[ "public", "void", "uploadRepository", "(", "String", "name", ",", "File", "archive", ")", "throws", "ClientException", "{", "HttpPut", "putMethod", "=", "new", "HttpPut", "(", "baseUri", "+", "\"/repository/\"", "+", "encodeURIComponent", "(", "name", ")", ")", ...
Creates or updates repository by the given name @param name Repository name @param archive Archive containing repository data @throws ClientException
[ "Creates", "or", "updates", "repository", "by", "the", "given", "name" ]
train
https://github.com/DependencyWatcher/agent/blob/6a082650275f9555993f5607d1f0bbe7aceceee1/src/main/java/com/dependencywatcher/client/DependencyWatcherClient.java#L76-L107
jmxtrans/embedded-jmxtrans
src/main/java/org/jmxtrans/embedded/util/json/PropertyPlaceholderResolver.java
PropertyPlaceholderResolver.resolvePlaceholder
@Nonnull protected String resolvePlaceholder(String property, @Nullable String defaultValue) throws EmbeddedJmxTransException { """ Search for the given placeholder in system properties then in environment variables. @param property property to resolve @param defaultValue Default value if the placehold...
java
@Nonnull protected String resolvePlaceholder(String property, @Nullable String defaultValue) throws EmbeddedJmxTransException { // "graphite.host" -> "GRAPHITE_HOST" String environmentVariableStyleProperty = property.toUpperCase(); environmentVariableStyleProperty = environmentVariableStyl...
[ "@", "Nonnull", "protected", "String", "resolvePlaceholder", "(", "String", "property", ",", "@", "Nullable", "String", "defaultValue", ")", "throws", "EmbeddedJmxTransException", "{", "// \"graphite.host\" -> \"GRAPHITE_HOST\"", "String", "environmentVariableStyleProperty", ...
Search for the given placeholder in system properties then in environment variables. @param property property to resolve @param defaultValue Default value if the placeholder is not found. <code>null</code> means not default value is defined and the placeholder must exist @return the resolved property or the defaul...
[ "Search", "for", "the", "given", "placeholder", "in", "system", "properties", "then", "in", "environment", "variables", "." ]
train
https://github.com/jmxtrans/embedded-jmxtrans/blob/17224389e7d8323284cabc2a5167fc03bed6d223/src/main/java/org/jmxtrans/embedded/util/json/PropertyPlaceholderResolver.java#L110-L132
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IteratorExtensions.java
IteratorExtensions.forEach
public static <T> void forEach(Iterator<T> iterator, Procedure2<? super T, ? super Integer> procedure) { """ Applies {@code procedure} for each element of the given iterator. The procedure takes the element and a loop counter. If the counter would overflow, {@link Integer#MAX_VALUE} is returned for all subsequen...
java
public static <T> void forEach(Iterator<T> iterator, Procedure2<? super T, ? super Integer> procedure) { if (procedure == null) throw new NullPointerException("procedure"); int i = 0; while(iterator.hasNext()) { procedure.apply(iterator.next(), i); if (i != Integer.MAX_VALUE) i++; } }
[ "public", "static", "<", "T", ">", "void", "forEach", "(", "Iterator", "<", "T", ">", "iterator", ",", "Procedure2", "<", "?", "super", "T", ",", "?", "super", "Integer", ">", "procedure", ")", "{", "if", "(", "procedure", "==", "null", ")", "throw",...
Applies {@code procedure} for each element of the given iterator. The procedure takes the element and a loop counter. If the counter would overflow, {@link Integer#MAX_VALUE} is returned for all subsequent elements. The first element is at index zero. @param iterator the iterator. May not be <code>null</code>. @param ...
[ "Applies", "{", "@code", "procedure", "}", "for", "each", "element", "of", "the", "given", "iterator", ".", "The", "procedure", "takes", "the", "element", "and", "a", "loop", "counter", ".", "If", "the", "counter", "would", "overflow", "{", "@link", "Integ...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IteratorExtensions.java#L440-L449
line/armeria
core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedValueResolver.java
AnnotatedValueResolver.ofBeanField
static Optional<AnnotatedValueResolver> ofBeanField(Field field, Set<String> pathParams, List<RequestObjectResolver> objectResolvers) { """ Returns a list of {@link AnnotatedValueResolver} which is constructed with the specified {@link Field}, {@code pathPar...
java
static Optional<AnnotatedValueResolver> ofBeanField(Field field, Set<String> pathParams, List<RequestObjectResolver> objectResolvers) { // 'Field' is only used for converting a bean. // So we always need to pass 'implicitRequestObjectAnnotation' as...
[ "static", "Optional", "<", "AnnotatedValueResolver", ">", "ofBeanField", "(", "Field", "field", ",", "Set", "<", "String", ">", "pathParams", ",", "List", "<", "RequestObjectResolver", ">", "objectResolvers", ")", "{", "// 'Field' is only used for converting a bean.", ...
Returns a list of {@link AnnotatedValueResolver} which is constructed with the specified {@link Field}, {@code pathParams} and {@code objectResolvers}.
[ "Returns", "a", "list", "of", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedValueResolver.java#L159-L164
anotheria/configureme
src/main/java/org/configureme/util/StringUtils.java
StringUtils.getStringBefore
public static String getStringBefore(final String src, final String toSearch, final int start) { """ Get {@link java.lang.String} before given search {@link java.lang.String} from given start search index. @param src source string @param toSearch search string @param start start search index @return {@lin...
java
public static String getStringBefore(final String src, final String toSearch, final int start) { final int ind = src.indexOf(toSearch, start); if (ind == -1) return ""; return src.substring(start, ind); }
[ "public", "static", "String", "getStringBefore", "(", "final", "String", "src", ",", "final", "String", "toSearch", ",", "final", "int", "start", ")", "{", "final", "int", "ind", "=", "src", ".", "indexOf", "(", "toSearch", ",", "start", ")", ";", "if", ...
Get {@link java.lang.String} before given search {@link java.lang.String} from given start search index. @param src source string @param toSearch search string @param start start search index @return {@link java.lang.String}
[ "Get", "{", "@link", "java", ".", "lang", ".", "String", "}", "before", "given", "search", "{", "@link", "java", ".", "lang", ".", "String", "}", "from", "given", "start", "search", "index", "." ]
train
https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/util/StringUtils.java#L107-L113
SeleniumJT/seleniumjt-core
src/main/java/com/jt/selenium/elements/JTEvent.java
JTEvent.dragAndDropWithPause
public void dragAndDropWithPause(String locator, String targetLocator, int pause) { """ /* Drags the element locator to the element targetLocator with a set pause after the event """ dragAndDropToObject(locator, targetLocator); jtCore.pause(pause); }
java
public void dragAndDropWithPause(String locator, String targetLocator, int pause) { dragAndDropToObject(locator, targetLocator); jtCore.pause(pause); }
[ "public", "void", "dragAndDropWithPause", "(", "String", "locator", ",", "String", "targetLocator", ",", "int", "pause", ")", "{", "dragAndDropToObject", "(", "locator", ",", "targetLocator", ")", ";", "jtCore", ".", "pause", "(", "pause", ")", ";", "}" ]
/* Drags the element locator to the element targetLocator with a set pause after the event
[ "/", "*", "Drags", "the", "element", "locator", "to", "the", "element", "targetLocator", "with", "a", "set", "pause", "after", "the", "event" ]
train
https://github.com/SeleniumJT/seleniumjt-core/blob/8e972f69adc4846a3f1d7b8ca9c3f8d953a2d0f3/src/main/java/com/jt/selenium/elements/JTEvent.java#L59-L63
gresrun/jesque
src/main/java/net/greghaines/jesque/worker/MapBasedJobFactory.java
MapBasedJobFactory.checkJobType
protected void checkJobType(final String jobName, final Class<?> jobType) { """ Determine if a job name and job type are valid. @param jobName the name of the job @param jobType the class of the job @throws IllegalArgumentException if the name or type are invalid """ if (jobName == null) { ...
java
protected void checkJobType(final String jobName, final Class<?> jobType) { if (jobName == null) { throw new IllegalArgumentException("jobName must not be null"); } if (jobType == null) { throw new IllegalArgumentException("jobType must not be null"); } if...
[ "protected", "void", "checkJobType", "(", "final", "String", "jobName", ",", "final", "Class", "<", "?", ">", "jobType", ")", "{", "if", "(", "jobName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"jobName must not be null\"", ")...
Determine if a job name and job type are valid. @param jobName the name of the job @param jobType the class of the job @throws IllegalArgumentException if the name or type are invalid
[ "Determine", "if", "a", "job", "name", "and", "job", "type", "are", "valid", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/worker/MapBasedJobFactory.java#L128-L140
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/IoUtils.java
IoUtils.copyStreamAndClose
public static void copyStreamAndClose(InputStream is, OutputStream os) throws IOException { """ Copy input stream to output stream and close them both @param is input stream @param os output stream @throws IOException for any error """ try { copyStream(is, os, DEFAULT_BUFFER_SIZE); ...
java
public static void copyStreamAndClose(InputStream is, OutputStream os) throws IOException { try { copyStream(is, os, DEFAULT_BUFFER_SIZE); // throw an exception if the close fails since some data might be lost is.close(); os.close(); } finally { ...
[ "public", "static", "void", "copyStreamAndClose", "(", "InputStream", "is", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "try", "{", "copyStream", "(", "is", ",", "os", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "// throw an exception if the close fails ...
Copy input stream to output stream and close them both @param is input stream @param os output stream @throws IOException for any error
[ "Copy", "input", "stream", "to", "output", "stream", "and", "close", "them", "both" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/IoUtils.java#L58-L70
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java
EditService.removeCustomOverride
public void removeCustomOverride(int path_id, String client_uuid) throws Exception { """ Remove custom overrides @param path_id ID of path containing custom override @param client_uuid UUID of the client @throws Exception exception """ updateRequestResponseTables("custom_response", "", getProfileI...
java
public void removeCustomOverride(int path_id, String client_uuid) throws Exception { updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id); }
[ "public", "void", "removeCustomOverride", "(", "int", "path_id", ",", "String", "client_uuid", ")", "throws", "Exception", "{", "updateRequestResponseTables", "(", "\"custom_response\"", ",", "\"\"", ",", "getProfileIdFromPathID", "(", "path_id", ")", ",", "client_uui...
Remove custom overrides @param path_id ID of path containing custom override @param client_uuid UUID of the client @throws Exception exception
[ "Remove", "custom", "overrides" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java#L320-L322
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.accessRestriction_backupCode_validate_POST
public OvhSOTPValidate accessRestriction_backupCode_validate_POST(String code) throws IOException { """ Validate your SOTP account REST: POST /me/accessRestriction/backupCode/validate @param code [required] OTP code given by the application """ String qPath = "/me/accessRestriction/backupCode/validate"; ...
java
public OvhSOTPValidate accessRestriction_backupCode_validate_POST(String code) throws IOException { String qPath = "/me/accessRestriction/backupCode/validate"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "code", code); String resp = exec(qPath, "POST", ...
[ "public", "OvhSOTPValidate", "accessRestriction_backupCode_validate_POST", "(", "String", "code", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/accessRestriction/backupCode/validate\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", ...
Validate your SOTP account REST: POST /me/accessRestriction/backupCode/validate @param code [required] OTP code given by the application
[ "Validate", "your", "SOTP", "account" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L4034-L4041