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
stapler/stapler
core/src/main/java/org/kohsuke/stapler/export/TypeUtil.java
TypeUtil.getBaseClass
public static Type getBaseClass(Type type, Class baseType) { """ Gets the parameterization of the given base type. <p> For example, given the following <pre>{@code interface Foo<T> extends List<List<T>> {} interface Bar extends Foo<String> {} }</pre> This method works like this: <pre>{@code getBaseClass...
java
public static Type getBaseClass(Type type, Class baseType) { return baseClassFinder.visit(type,baseType); }
[ "public", "static", "Type", "getBaseClass", "(", "Type", "type", ",", "Class", "baseType", ")", "{", "return", "baseClassFinder", ".", "visit", "(", "type", ",", "baseType", ")", ";", "}" ]
Gets the parameterization of the given base type. <p> For example, given the following <pre>{@code interface Foo<T> extends List<List<T>> {} interface Bar extends Foo<String> {} }</pre> This method works like this: <pre>{@code getBaseClass( Bar, List ) = List<List<String> getBaseClass( Bar, Foo ) = Foo<String> getBas...
[ "Gets", "the", "parameterization", "of", "the", "given", "base", "type", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/export/TypeUtil.java#L296-L298
amzn/ion-java
src/com/amazon/ion/util/IonTextUtils.java
IonTextUtils.printStringCodePoint
public static void printStringCodePoint(Appendable out, int codePoint) throws IOException { """ Prints a single Unicode code point for use in an ASCII-safe Ion string. @param out the stream to receive the data. @param codePoint a Unicode code point. """ printCodePoint(out, codePoint, Escape...
java
public static void printStringCodePoint(Appendable out, int codePoint) throws IOException { printCodePoint(out, codePoint, EscapeMode.ION_STRING); }
[ "public", "static", "void", "printStringCodePoint", "(", "Appendable", "out", ",", "int", "codePoint", ")", "throws", "IOException", "{", "printCodePoint", "(", "out", ",", "codePoint", ",", "EscapeMode", ".", "ION_STRING", ")", ";", "}" ]
Prints a single Unicode code point for use in an ASCII-safe Ion string. @param out the stream to receive the data. @param codePoint a Unicode code point.
[ "Prints", "a", "single", "Unicode", "code", "point", "for", "use", "in", "an", "ASCII", "-", "safe", "Ion", "string", "." ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L200-L204
Netflix/servo
servo-core/src/main/java/com/netflix/servo/monitor/TimedInterface.java
TimedInterface.newProxy
@SuppressWarnings("unchecked") public static <T> T newProxy(Class<T> ctype, T concrete, String id) { """ Creates a new TimedInterface for a given interface <code>ctype</code> with a concrete class <code>concrete</code> and a specific id. The id can be used to distinguish among multiple objects with the same co...
java
@SuppressWarnings("unchecked") public static <T> T newProxy(Class<T> ctype, T concrete, String id) { final InvocationHandler handler = new TimedHandler<>(ctype, concrete, id); final Class<?>[] types = new Class[]{ctype, CompositeMonitor.class}; return (T) Proxy.newProxyInstance(ctype.getClassLoader(), typ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "newProxy", "(", "Class", "<", "T", ">", "ctype", ",", "T", "concrete", ",", "String", "id", ")", "{", "final", "InvocationHandler", "handler", "=", "new", "Timed...
Creates a new TimedInterface for a given interface <code>ctype</code> with a concrete class <code>concrete</code> and a specific id. The id can be used to distinguish among multiple objects with the same concrete class.
[ "Creates", "a", "new", "TimedInterface", "for", "a", "given", "interface", "<code", ">", "ctype<", "/", "code", ">", "with", "a", "concrete", "class", "<code", ">", "concrete<", "/", "code", ">", "and", "a", "specific", "id", ".", "The", "id", "can", "...
train
https://github.com/Netflix/servo/blob/d67b5afce8c50bd9e9e31c288dbf4b78fb2ac815/servo-core/src/main/java/com/netflix/servo/monitor/TimedInterface.java#L135-L140
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.resourceOriginalPath
public String resourceOriginalPath(CmsRequestContext context, CmsResource resource) throws CmsException { """ Returns the original path of given resource, that is the online path for the resource.<p> If it differs from the offline path, the resource has been moved.<p> @param context the current request conte...
java
public String resourceOriginalPath(CmsRequestContext context, CmsResource resource) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); String result = null; try { checkOfflineProject(dbc); result = m_driverManager.getVfsDriver( ...
[ "public", "String", "resourceOriginalPath", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "String", "result", ...
Returns the original path of given resource, that is the online path for the resource.<p> If it differs from the offline path, the resource has been moved.<p> @param context the current request context @param resource the resource to get the path for @return the online path @throws CmsException if something goes wr...
[ "Returns", "the", "original", "path", "of", "given", "resource", "that", "is", "the", "online", "path", "for", "the", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L5782-L5801
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/i18n/Messages.java
Messages.get
public String get(String key, Object... arguments) { """ Returns a localized value for a given key stored in messages_xx.properties and passing the given arguments @param key The key to look up the localized value @param arguments The arguments to use @return The localized value or null value if the given ke...
java
public String get(String key, Object... arguments) { if (this.bundle.containsKey(key)) { return MessageFormat.format(this.bundle.getString(key), arguments); } else if (this.defaults.containsKey(key)) { return MessageFormat.format(this.defaults.get(key), arguments); } else...
[ "public", "String", "get", "(", "String", "key", ",", "Object", "...", "arguments", ")", "{", "if", "(", "this", ".", "bundle", ".", "containsKey", "(", "key", ")", ")", "{", "return", "MessageFormat", ".", "format", "(", "this", ".", "bundle", ".", ...
Returns a localized value for a given key stored in messages_xx.properties and passing the given arguments @param key The key to look up the localized value @param arguments The arguments to use @return The localized value or null value if the given key is not configured
[ "Returns", "a", "localized", "value", "for", "a", "given", "key", "stored", "in", "messages_xx", ".", "properties", "and", "passing", "the", "given", "arguments" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/i18n/Messages.java#L54-L64
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java
NativeLibraryLoader.loadLibrary
public static void loadLibrary(boolean _trySystemLibsFirst, String _libName, String... _searchPathes) { """ Load the given _libName from one of the given pathes (will search for the library and uses first match). @param _trySystemLibsFirst use system pathes first @param _libName library to load @param _search...
java
public static void loadLibrary(boolean _trySystemLibsFirst, String _libName, String... _searchPathes) { if (!isEnabled()) { return; } List<SearchOrder> loadOrder = new ArrayList<>(); if (_trySystemLibsFirst) { loadOrder.add(SearchOrder.SYSTEM_PATH); } ...
[ "public", "static", "void", "loadLibrary", "(", "boolean", "_trySystemLibsFirst", ",", "String", "_libName", ",", "String", "...", "_searchPathes", ")", "{", "if", "(", "!", "isEnabled", "(", ")", ")", "{", "return", ";", "}", "List", "<", "SearchOrder", "...
Load the given _libName from one of the given pathes (will search for the library and uses first match). @param _trySystemLibsFirst use system pathes first @param _libName library to load @param _searchPathes pathes to search
[ "Load", "the", "given", "_libName", "from", "one", "of", "the", "given", "pathes", "(", "will", "search", "for", "the", "library", "and", "uses", "first", "match", ")", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/system/NativeLibraryLoader.java#L55-L70
pravega/pravega
client/src/main/java/io/pravega/client/segment/impl/Segment.java
Segment.fromScopedName
public static Segment fromScopedName(String qualifiedName) { """ Parses fully scoped name, and creates the segment. @param qualifiedName Fully scoped segment name @return Segment name. """ if (StreamSegmentNameUtils.isTransactionSegment(qualifiedName)) { String originalSegmentName = Str...
java
public static Segment fromScopedName(String qualifiedName) { if (StreamSegmentNameUtils.isTransactionSegment(qualifiedName)) { String originalSegmentName = StreamSegmentNameUtils.getParentStreamSegmentName(qualifiedName); return fromScopedName(originalSegmentName); } else { ...
[ "public", "static", "Segment", "fromScopedName", "(", "String", "qualifiedName", ")", "{", "if", "(", "StreamSegmentNameUtils", ".", "isTransactionSegment", "(", "qualifiedName", ")", ")", "{", "String", "originalSegmentName", "=", "StreamSegmentNameUtils", ".", "getP...
Parses fully scoped name, and creates the segment. @param qualifiedName Fully scoped segment name @return Segment name.
[ "Parses", "fully", "scoped", "name", "and", "creates", "the", "segment", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/segment/impl/Segment.java#L69-L87
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java
FileOperations.deleteFileFromTask
public void deleteFileFromTask(String jobId, String taskId, String fileName) throws BatchErrorException, IOException { """ Deletes the specified file from the specified task's directory on its compute node. @param jobId The ID of the job containing the task. @param taskId The ID of the task. @param fileName T...
java
public void deleteFileFromTask(String jobId, String taskId, String fileName) throws BatchErrorException, IOException { deleteFileFromTask(jobId, taskId, fileName, null, null); }
[ "public", "void", "deleteFileFromTask", "(", "String", "jobId", ",", "String", "taskId", ",", "String", "fileName", ")", "throws", "BatchErrorException", ",", "IOException", "{", "deleteFileFromTask", "(", "jobId", ",", "taskId", ",", "fileName", ",", "null", ",...
Deletes the specified file from the specified task's directory on its compute node. @param jobId The ID of the job containing the task. @param taskId The ID of the task. @param fileName The name of the file to delete. @throws BatchErrorException Exception thrown when an error response is received from the Batch servic...
[ "Deletes", "the", "specified", "file", "from", "the", "specified", "task", "s", "directory", "on", "its", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java#L171-L173
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionparameter.java
filterhtmlinjectionparameter.get
public static filterhtmlinjectionparameter get(nitro_service service, options option) throws Exception { """ Use this API to fetch all the filterhtmlinjectionparameter resources that are configured on netscaler. """ filterhtmlinjectionparameter obj = new filterhtmlinjectionparameter(); filterhtmlinjection...
java
public static filterhtmlinjectionparameter get(nitro_service service, options option) throws Exception{ filterhtmlinjectionparameter obj = new filterhtmlinjectionparameter(); filterhtmlinjectionparameter[] response = (filterhtmlinjectionparameter[])obj.get_resources(service,option); return response[0]; }
[ "public", "static", "filterhtmlinjectionparameter", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "filterhtmlinjectionparameter", "obj", "=", "new", "filterhtmlinjectionparameter", "(", ")", ";", "filterhtmlinjectionpar...
Use this API to fetch all the filterhtmlinjectionparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "filterhtmlinjectionparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionparameter.java#L208-L212
lessthanoptimal/ddogleg
src/org/ddogleg/nn/alg/KdTreeConstructor.java
KdTreeConstructor.computeBranch
protected KdTree.Node computeBranch(List<P> points, GrowQueue_I32 indexes) { """ Given the data inside this particular node, select a point for the node and compute the node's children @return The node associated with this region """ // declare storage for the split data List<P> left = new ArrayList<>(...
java
protected KdTree.Node computeBranch(List<P> points, GrowQueue_I32 indexes) { // declare storage for the split data List<P> left = new ArrayList<>(points.size()/2); List<P> right = new ArrayList<>(points.size()/2); GrowQueue_I32 leftIndexes,rightIndexes; if( indexes == null ) { leftIndexes = null; rightIn...
[ "protected", "KdTree", ".", "Node", "computeBranch", "(", "List", "<", "P", ">", "points", ",", "GrowQueue_I32", "indexes", ")", "{", "// declare storage for the split data", "List", "<", "P", ">", "left", "=", "new", "ArrayList", "<>", "(", "points", ".", "...
Given the data inside this particular node, select a point for the node and compute the node's children @return The node associated with this region
[ "Given", "the", "data", "inside", "this", "particular", "node", "select", "a", "point", "for", "the", "node", "and", "compute", "the", "node", "s", "children" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/KdTreeConstructor.java#L99-L130
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getElemFunctionAndThis
@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx) { """ Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to...
java
@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx) { return getElemFunctionAndThis(obj, elem, cx, getTopCallScope(cx)); }
[ "@", "Deprecated", "public", "static", "Callable", "getElemFunctionAndThis", "(", "Object", "obj", ",", "Object", "elem", ",", "Context", "cx", ")", "{", "return", "getElemFunctionAndThis", "(", "obj", ",", "elem", ",", "cx", ",", "getTopCallScope", "(", "cx",...
Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method. @deprecated Use {@link ...
[ "Prepare", "for", "calling", "obj", "[", "id", "]", "(", "...", ")", ":", "return", "function", "corresponding", "to", "obj", "[", "id", "]", "and", "make", "obj", "properly", "converted", "to", "Scriptable", "available", "as", "ScriptRuntime", ".", "lastS...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L2480-L2486
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java
StoreCallback.sessionUserNameSet
public void sessionUserNameSet(ISession session, String oldUserName, String newUserName) { """ Method sessionUserNameSet <p> @param session @param oldUserName @param newUserName @see com.ibm.wsspi.session.IStoreCallback#sessionUserNameSet(com.ibm.wsspi.session.ISession, java.lang.String, java.lang.String) ...
java
public void sessionUserNameSet(ISession session, String oldUserName, String newUserName) { _sessionStateEventDispatcher.sessionUserNameSet(session, oldUserName, newUserName); }
[ "public", "void", "sessionUserNameSet", "(", "ISession", "session", ",", "String", "oldUserName", ",", "String", "newUserName", ")", "{", "_sessionStateEventDispatcher", ".", "sessionUserNameSet", "(", "session", ",", "oldUserName", ",", "newUserName", ")", ";", "}"...
Method sessionUserNameSet <p> @param session @param oldUserName @param newUserName @see com.ibm.wsspi.session.IStoreCallback#sessionUserNameSet(com.ibm.wsspi.session.ISession, java.lang.String, java.lang.String)
[ "Method", "sessionUserNameSet", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java#L210-L213
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/WindowTinyLfuPolicy.java
WindowTinyLfuPolicy.onMiss
private void onMiss(long key) { """ Adds the entry to the admission window, evicting if necessary. """ admittor.record(key); Node node = new Node(key, Status.WINDOW); node.appendToTail(headWindow); data.put(key, node); sizeWindow++; evict(); }
java
private void onMiss(long key) { admittor.record(key); Node node = new Node(key, Status.WINDOW); node.appendToTail(headWindow); data.put(key, node); sizeWindow++; evict(); }
[ "private", "void", "onMiss", "(", "long", "key", ")", "{", "admittor", ".", "record", "(", "key", ")", ";", "Node", "node", "=", "new", "Node", "(", "key", ",", "Status", ".", "WINDOW", ")", ";", "node", ".", "appendToTail", "(", "headWindow", ")", ...
Adds the entry to the admission window, evicting if necessary.
[ "Adds", "the", "entry", "to", "the", "admission", "window", "evicting", "if", "necessary", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/WindowTinyLfuPolicy.java#L118-L126
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/nikefs2/NikeFS2SwapFileManager.java
NikeFS2SwapFileManager.getSwapDir
private static synchronized File getSwapDir() throws IOException { """ Retrieves a file handle on the swap directory of this session. @return The swap directory of this session. @throws IOException """ if(SWAP_DIR == null) { // create swap directory for this instance File swapDir = File.createTempFil...
java
private static synchronized File getSwapDir() throws IOException { if(SWAP_DIR == null) { // create swap directory for this instance File swapDir = File.createTempFile(SWAP_DIR_PREFIX, SWAP_DIR_SUFFIX, TMP_DIR); // delete if created swapDir.delete(); // create lock file File lockFile = new File(TMP_...
[ "private", "static", "synchronized", "File", "getSwapDir", "(", ")", "throws", "IOException", "{", "if", "(", "SWAP_DIR", "==", "null", ")", "{", "// create swap directory for this instance", "File", "swapDir", "=", "File", ".", "createTempFile", "(", "SWAP_DIR_PREF...
Retrieves a file handle on the swap directory of this session. @return The swap directory of this session. @throws IOException
[ "Retrieves", "a", "file", "handle", "on", "the", "swap", "directory", "of", "this", "session", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/nikefs2/NikeFS2SwapFileManager.java#L128-L147
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.findEntry
public IndexEntry findEntry(String partName, long partFileOffset) { """ Finds the index entry corresponding to a HAR partFile at an offset. @param partName The name of the part file (part-*). @param partFileOffset The offset into the part file. @return The entry corresponding to partName:partFileOffset. """...
java
public IndexEntry findEntry(String partName, long partFileOffset) { for (IndexEntry e: entries) { boolean nameMatch = partName.equals(e.partFileName); boolean inRange = (partFileOffset >= e.startOffset) && (partFileOffset < e.startOffset + e.length); if (nameMatch && inRang...
[ "public", "IndexEntry", "findEntry", "(", "String", "partName", ",", "long", "partFileOffset", ")", "{", "for", "(", "IndexEntry", "e", ":", "entries", ")", "{", "boolean", "nameMatch", "=", "partName", ".", "equals", "(", "e", ".", "partFileName", ")", ";...
Finds the index entry corresponding to a HAR partFile at an offset. @param partName The name of the part file (part-*). @param partFileOffset The offset into the part file. @return The entry corresponding to partName:partFileOffset.
[ "Finds", "the", "index", "entry", "corresponding", "to", "a", "HAR", "partFile", "at", "an", "offset", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L151-L161
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkmax/MkMaxTreeNode.java
MkMaxTreeNode.adjustEntry
@Override public boolean adjustEntry(MkMaxEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O, MkMaxTreeNode<O>, MkMaxEntry, ?> mTree) { """ Calls the super method and adjust additionally the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances of al...
java
@Override public boolean adjustEntry(MkMaxEntry entry, DBID routingObjectID, double parentDistance, AbstractMTree<O, MkMaxTreeNode<O>, MkMaxEntry, ?> mTree) { super.adjustEntry(entry, routingObjectID, parentDistance, mTree); // adjust knn distance entry.setKnnDistance(kNNDistance()); return true; // T...
[ "@", "Override", "public", "boolean", "adjustEntry", "(", "MkMaxEntry", "entry", ",", "DBID", "routingObjectID", ",", "double", "parentDistance", ",", "AbstractMTree", "<", "O", ",", "MkMaxTreeNode", "<", "O", ">", ",", "MkMaxEntry", ",", "?", ">", "mTree", ...
Calls the super method and adjust additionally the k-nearest neighbor distance of this node as the maximum of the k-nearest neighbor distances of all its entries.
[ "Calls", "the", "super", "method", "and", "adjust", "additionally", "the", "k", "-", "nearest", "neighbor", "distance", "of", "this", "node", "as", "the", "maximum", "of", "the", "k", "-", "nearest", "neighbor", "distances", "of", "all", "its", "entries", ...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/mktrees/mkmax/MkMaxTreeNode.java#L81-L87
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/UsersApi.java
UsersApi.addUserWithHttpInfo
public ApiResponse<CreateUserSuccessResponse> addUserWithHttpInfo(AddUserData body) throws ApiException { """ Create a user. Create a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the specified attributes. @param body Body Data (required) @return ApiRespons...
java
public ApiResponse<CreateUserSuccessResponse> addUserWithHttpInfo(AddUserData body) throws ApiException { com.squareup.okhttp.Call call = addUserValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken<CreateUserSuccessResponse>(){}.getType(); return apiClient.execute(call, ...
[ "public", "ApiResponse", "<", "CreateUserSuccessResponse", ">", "addUserWithHttpInfo", "(", "AddUserData", "body", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "addUserValidateBeforeCall", "(", "body", ",", "...
Create a user. Create a user ([CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson)) with the specified attributes. @param body Body Data (required) @return ApiResponse&lt;CreateUserSuccessResponse&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deseriali...
[ "Create", "a", "user", ".", "Create", "a", "user", "(", "[", "CfgPerson", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", "/", "Documentation", "/", "PSDK", "/", "latest", "/", "ConfigLayerRef", "/", "CfgPerson", "))", "with", "the", ...
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/UsersApi.java#L144-L148
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generateKeyPair
public static KeyPair generateKeyPair(String algorithm, AlgorithmParameterSpec params) { """ 生成用于非对称加密的公钥和私钥<br> 密钥对生成算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator @param algorithm 非对称加密算法 @param params {@link AlgorithmParameterSpec} @return {@link Ke...
java
public static KeyPair generateKeyPair(String algorithm, AlgorithmParameterSpec params) { return KeyUtil.generateKeyPair(algorithm, params); }
[ "public", "static", "KeyPair", "generateKeyPair", "(", "String", "algorithm", ",", "AlgorithmParameterSpec", "params", ")", "{", "return", "KeyUtil", ".", "generateKeyPair", "(", "algorithm", ",", "params", ")", ";", "}" ]
生成用于非对称加密的公钥和私钥<br> 密钥对生成算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyPairGenerator @param algorithm 非对称加密算法 @param params {@link AlgorithmParameterSpec} @return {@link KeyPair} @since 4.3.3
[ "生成用于非对称加密的公钥和私钥<br", ">", "密钥对生成算法见:https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "7", "/", "docs", "/", "technotes", "/", "guides", "/", "security", "/", "StandardNames", ".", "html#KeyPairGenerator" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L240-L242
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/FieldFormatterRegistry.java
FieldFormatterRegistry.registerFormatter
public <T> void registerFormatter(final String fieldPath, final Class<T> requiredType, FieldFormatter<T> formatter) { """ フィールドパスとクラスタイプを指定してフォーマッタを登録する。 @param <T> 処理対象のタイプ @param fieldPath @param requiredType クラスタイプ @param formatter 登録対象のフォーマッタ """ ArgUtils.notEmpty(fieldPath, "fieldPath"); ...
java
public <T> void registerFormatter(final String fieldPath, final Class<T> requiredType, FieldFormatter<T> formatter) { ArgUtils.notEmpty(fieldPath, "fieldPath"); ArgUtils.notNull(requiredType, "requiredType"); ArgUtils.notNull(formatter, "formatter"); this.pathMap.put(fieldP...
[ "public", "<", "T", ">", "void", "registerFormatter", "(", "final", "String", "fieldPath", ",", "final", "Class", "<", "T", ">", "requiredType", ",", "FieldFormatter", "<", "T", ">", "formatter", ")", "{", "ArgUtils", ".", "notEmpty", "(", "fieldPath", ","...
フィールドパスとクラスタイプを指定してフォーマッタを登録する。 @param <T> 処理対象のタイプ @param fieldPath @param requiredType クラスタイプ @param formatter 登録対象のフォーマッタ
[ "フィールドパスとクラスタイプを指定してフォーマッタを登録する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/FieldFormatterRegistry.java#L63-L70
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilRandom.java
UtilRandom.getRandomInteger
public static int getRandomInteger(int min, int max) { """ Get a random value from an interval. @param min The minimum value. @param max The maximum value (positive and superior or equal to min). @return A value between min inclusive and max inclusive. """ Check.inferiorOrEqual(min, max); ...
java
public static int getRandomInteger(int min, int max) { Check.inferiorOrEqual(min, max); return min + RANDOM.nextInt(max + 1 - min); }
[ "public", "static", "int", "getRandomInteger", "(", "int", "min", ",", "int", "max", ")", "{", "Check", ".", "inferiorOrEqual", "(", "min", ",", "max", ")", ";", "return", "min", "+", "RANDOM", ".", "nextInt", "(", "max", "+", "1", "-", "min", ")", ...
Get a random value from an interval. @param min The minimum value. @param max The maximum value (positive and superior or equal to min). @return A value between min inclusive and max inclusive.
[ "Get", "a", "random", "value", "from", "an", "interval", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilRandom.java#L82-L87
xqbase/util
util-jdk17/src/main/java/com/xqbase/util/Conf.java
Conf.openLogger
public static Logger openLogger(String name, int limit, int count) { """ Open a {@link Logger} with output file under folder <b>log_dir</b> (if defined in Conf.properties) or <b>logs/</b> relative to the current folder @param name logging output file with the pattern "${name}%g.log" @param limit the maximum n...
java
public static Logger openLogger(String name, int limit, int count) { Logger logger = Logger.getAnonymousLogger(); logger.setLevel(Level.ALL); logger.setUseParentHandlers(false); if (DEBUG) { ConsoleHandler handler = new ConsoleHandler(); handler.setLevel(Level.ALL); logger.addHandler(handler); ...
[ "public", "static", "Logger", "openLogger", "(", "String", "name", ",", "int", "limit", ",", "int", "count", ")", "{", "Logger", "logger", "=", "Logger", ".", "getAnonymousLogger", "(", ")", ";", "logger", ".", "setLevel", "(", "Level", ".", "ALL", ")", ...
Open a {@link Logger} with output file under folder <b>log_dir</b> (if defined in Conf.properties) or <b>logs/</b> relative to the current folder @param name logging output file with the pattern "${name}%g.log" @param limit the maximum number of bytes to write to any one file count the number of files to use @param co...
[ "Open", "a", "{", "@link", "Logger", "}", "with", "output", "file", "under", "folder", "<b", ">", "log_dir<", "/", "b", ">", "(", "if", "defined", "in", "Conf", ".", "properties", ")", "or", "<b", ">", "logs", "/", "<", "/", "b", ">", "relative", ...
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util-jdk17/src/main/java/com/xqbase/util/Conf.java#L136-L159
Ordinastie/MalisisCore
src/main/java/net/malisis/core/client/gui/element/position/Positions.java
Positions.topAlignedTo
public static IntSupplier topAlignedTo(IPositioned other, int offset) { """ Top aligns the owner to the other. @param other the other @param offset the offset @return the int supplier """ checkNotNull(other); return () -> { return other.position().y() + offset; }; }
java
public static IntSupplier topAlignedTo(IPositioned other, int offset) { checkNotNull(other); return () -> { return other.position().y() + offset; }; }
[ "public", "static", "IntSupplier", "topAlignedTo", "(", "IPositioned", "other", ",", "int", "offset", ")", "{", "checkNotNull", "(", "other", ")", ";", "return", "(", ")", "->", "{", "return", "other", ".", "position", "(", ")", ".", "y", "(", ")", "+"...
Top aligns the owner to the other. @param other the other @param offset the offset @return the int supplier
[ "Top", "aligns", "the", "owner", "to", "the", "other", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/element/position/Positions.java#L272-L279
sualeh/magnetictrackparser
src/main/java/us/fatehi/magnetictrack/bankcard/Track1FormatB.java
Track1FormatB.from
public static Track1FormatB from(final String rawTrackData) { """ Parses magnetic track 1 format B data into a Track1FormatB object. @param rawTrackData Raw track data as a string. Can include newlines, and other tracks as well. @return A Track1FormatB instance, corresponding to the parsed data. """ ...
java
public static Track1FormatB from(final String rawTrackData) { final Matcher matcher = track1FormatBPattern .matcher(trimToEmpty(rawTrackData)); final String rawTrack1Data; final AccountNumber pan; final ExpirationDate expirationDate; final Name name; final ServiceCode serviceCode; f...
[ "public", "static", "Track1FormatB", "from", "(", "final", "String", "rawTrackData", ")", "{", "final", "Matcher", "matcher", "=", "track1FormatBPattern", ".", "matcher", "(", "trimToEmpty", "(", "rawTrackData", ")", ")", ";", "final", "String", "rawTrack1Data", ...
Parses magnetic track 1 format B data into a Track1FormatB object. @param rawTrackData Raw track data as a string. Can include newlines, and other tracks as well. @return A Track1FormatB instance, corresponding to the parsed data.
[ "Parses", "magnetic", "track", "1", "format", "B", "data", "into", "a", "Track1FormatB", "object", "." ]
train
https://github.com/sualeh/magnetictrackparser/blob/1da8ff20ac6269b1d523875157278978ba71d260/src/main/java/us/fatehi/magnetictrack/bankcard/Track1FormatB.java#L78-L119
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/extract/FactoryFeatureExtractor.java
FactoryFeatureExtractor.nonmaxLimiter
public static NonMaxLimiter nonmaxLimiter( @Nullable ConfigExtract config , int maxFeatures ) { """ Creates a non-maximum limiter using the specified configuration @param config non-maxumum settings @param maxFeatures maximum allowed features @return The NonMaxLimiter """ NonMaxSuppression nonmax = nonmax...
java
public static NonMaxLimiter nonmaxLimiter( @Nullable ConfigExtract config , int maxFeatures ) { NonMaxSuppression nonmax = nonmax(config); return new NonMaxLimiter(nonmax,maxFeatures); }
[ "public", "static", "NonMaxLimiter", "nonmaxLimiter", "(", "@", "Nullable", "ConfigExtract", "config", ",", "int", "maxFeatures", ")", "{", "NonMaxSuppression", "nonmax", "=", "nonmax", "(", "config", ")", ";", "return", "new", "NonMaxLimiter", "(", "nonmax", ",...
Creates a non-maximum limiter using the specified configuration @param config non-maxumum settings @param maxFeatures maximum allowed features @return The NonMaxLimiter
[ "Creates", "a", "non", "-", "maximum", "limiter", "using", "the", "specified", "configuration" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/extract/FactoryFeatureExtractor.java#L148-L151
bushidowallet/bushido-java-service
bushido-service-lib/src/main/java/com/bccapi/bitlib/util/HexUtils.java
HexUtils.toHex
public static String toHex(byte[] bytes, String separator) { """ Encodes an array of bytes as hex symbols. @param bytes the array of bytes to encode @param separator the separator to use between two bytes, can be null @return the resulting hex string """ return toHex(bytes, 0, bytes.length, separa...
java
public static String toHex(byte[] bytes, String separator) { return toHex(bytes, 0, bytes.length, separator); }
[ "public", "static", "String", "toHex", "(", "byte", "[", "]", "bytes", ",", "String", "separator", ")", "{", "return", "toHex", "(", "bytes", ",", "0", ",", "bytes", ".", "length", ",", "separator", ")", ";", "}" ]
Encodes an array of bytes as hex symbols. @param bytes the array of bytes to encode @param separator the separator to use between two bytes, can be null @return the resulting hex string
[ "Encodes", "an", "array", "of", "bytes", "as", "hex", "symbols", "." ]
train
https://github.com/bushidowallet/bushido-java-service/blob/e1a0157527e57459b509718044d2df44084876a2/bushido-service-lib/src/main/java/com/bccapi/bitlib/util/HexUtils.java#L44-L46
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/server/RemoteSessionServer.java
RemoteSessionServer.getNewRemoteTask
public RemoteTask getNewRemoteTask(Map<String,Object> properties) { """ Get a remote session from the pool and initialize it. If the pool is empty, create a new remote session. @param strUserID The user name/ID of the user, or null if unknown. @return The remote Task. """ try { if (m_a...
java
public RemoteTask getNewRemoteTask(Map<String,Object> properties) { try { if (m_app != null) { // Make sure remote server has same db properties, etc. Map<String,Object> appProperties = m_app.getProperties(); properties = Utility.copyAppProperties(...
[ "public", "RemoteTask", "getNewRemoteTask", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "try", "{", "if", "(", "m_app", "!=", "null", ")", "{", "// Make sure remote server has same db properties, etc.", "Map", "<", "String", ",", "Obje...
Get a remote session from the pool and initialize it. If the pool is empty, create a new remote session. @param strUserID The user name/ID of the user, or null if unknown. @return The remote Task.
[ "Get", "a", "remote", "session", "from", "the", "pool", "and", "initialize", "it", ".", "If", "the", "pool", "is", "empty", "create", "a", "new", "remote", "session", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/server/RemoteSessionServer.java#L154-L170
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/scim/endpoints/UserIdConversionEndpoints.java
UserIdConversionEndpoints.checkFilter
private boolean checkFilter(SCIMFilter filter) { """ Returns true if the field 'id' or 'userName' are present in the query. @param filter @return """ switch (filter.getFilterType()) { case AND: case OR: return checkFilter(filter.getFilterComponents().get(0)) | ...
java
private boolean checkFilter(SCIMFilter filter) { switch (filter.getFilterType()) { case AND: case OR: return checkFilter(filter.getFilterComponents().get(0)) | checkFilter(filter.getFilterComponents().get(1)); case EQUALITY: String name = filte...
[ "private", "boolean", "checkFilter", "(", "SCIMFilter", "filter", ")", "{", "switch", "(", "filter", ".", "getFilterType", "(", ")", ")", "{", "case", "AND", ":", "case", "OR", ":", "return", "checkFilter", "(", "filter", ".", "getFilterComponents", "(", "...
Returns true if the field 'id' or 'userName' are present in the query. @param filter @return
[ "Returns", "true", "if", "the", "field", "id", "or", "userName", "are", "present", "in", "the", "query", "." ]
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/scim/endpoints/UserIdConversionEndpoints.java#L151-L177
chocoteam/choco-graph
src/main/java/org/chocosolver/graphsolver/variables/GraphVar.java
GraphVar.instantiateTo
public void instantiateTo(boolean[][] value, ICause cause) throws ContradictionException { """ Instantiates <code>this</code> to value which represents an adjacency matrix plus a set of nodes (last row of the matrix). This method is not supposed to be used except for restoring solutions. @param value value of...
java
public void instantiateTo(boolean[][] value, ICause cause) throws ContradictionException { int n = value.length - 1; for (int i = 0; i < n; i++) { if (value[n][i]) {//nodes enforceNode(i, cause); } else { removeNode(i, cause); } for (int j = 0; j < n; j++) { if (value[i][j]) {//arcs enf...
[ "public", "void", "instantiateTo", "(", "boolean", "[", "]", "[", "]", "value", ",", "ICause", "cause", ")", "throws", "ContradictionException", "{", "int", "n", "=", "value", ".", "length", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Instantiates <code>this</code> to value which represents an adjacency matrix plus a set of nodes (last row of the matrix). This method is not supposed to be used except for restoring solutions. @param value value of <code>this</code> @param cause @throws ContradictionException if the arc was mandatory
[ "Instantiates", "<code", ">", "this<", "/", "code", ">", "to", "value", "which", "represents", "an", "adjacency", "matrix", "plus", "a", "set", "of", "nodes", "(", "last", "row", "of", "the", "matrix", ")", ".", "This", "method", "is", "not", "supposed",...
train
https://github.com/chocoteam/choco-graph/blob/0a03b0aafc86601977728c7e3fcb5ed376f1fae9/src/main/java/org/chocosolver/graphsolver/variables/GraphVar.java#L368-L384
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/ContainerNamingUtil.java
ContainerNamingUtil.getContainersToStop
public static Collection<Container> getContainersToStop(final ImageConfiguration image, final String defaultContainerNamePattern, final Date buildTimestamp, ...
java
public static Collection<Container> getContainersToStop(final ImageConfiguration image, final String defaultContainerNamePattern, final Date buildTimestamp, ...
[ "public", "static", "Collection", "<", "Container", ">", "getContainersToStop", "(", "final", "ImageConfiguration", "image", ",", "final", "String", "defaultContainerNamePattern", ",", "final", "Date", "buildTimestamp", ",", "final", "Collection", "<", "Container", ">...
Keep only the entry with the higest index if an indexed naming scheme for container has been chosen. @param image the image from which to the the container pattern @param buildTimestamp the timestamp for the build @param containers the list of existing containers @return a list with potentially lower indexed entries re...
[ "Keep", "only", "the", "entry", "with", "the", "higest", "index", "if", "an", "indexed", "naming", "scheme", "for", "container", "has", "been", "chosen", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/ContainerNamingUtil.java#L66-L87
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.getString
public String getString(String name, boolean strict) throws JsonException { """ Returns the value mapped by {@code name} if it exists, coercing it if necessary, or throws if no such mapping exists. @throws JsonException if no such mapping exists. """ JsonElement el = get(name); String res =...
java
public String getString(String name, boolean strict) throws JsonException { JsonElement el = get(name); String res = null; if (strict && !el.isString()) { throw Util.typeMismatch(name, el, "string", true); } res = el.toString(); if (res == null) th...
[ "public", "String", "getString", "(", "String", "name", ",", "boolean", "strict", ")", "throws", "JsonException", "{", "JsonElement", "el", "=", "get", "(", "name", ")", ";", "String", "res", "=", "null", ";", "if", "(", "strict", "&&", "!", "el", ".",...
Returns the value mapped by {@code name} if it exists, coercing it if necessary, or throws if no such mapping exists. @throws JsonException if no such mapping exists.
[ "Returns", "the", "value", "mapped", "by", "{", "@code", "name", "}", "if", "it", "exists", "coercing", "it", "if", "necessary", "or", "throws", "if", "no", "such", "mapping", "exists", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L574-L584
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddPoint.java
ST_AddPoint.addPoint
public static Geometry addPoint(Geometry geometry, Point point) throws SQLException { """ Returns a new geometry based on an existing one, with a specific point as a new vertex. A default distance 10E-6 is used to snap the input point. @param geometry @param point @return @throws SQLException """ ...
java
public static Geometry addPoint(Geometry geometry, Point point) throws SQLException { return addPoint(geometry, point, PRECISION); }
[ "public", "static", "Geometry", "addPoint", "(", "Geometry", "geometry", ",", "Point", "point", ")", "throws", "SQLException", "{", "return", "addPoint", "(", "geometry", ",", "point", ",", "PRECISION", ")", ";", "}" ]
Returns a new geometry based on an existing one, with a specific point as a new vertex. A default distance 10E-6 is used to snap the input point. @param geometry @param point @return @throws SQLException
[ "Returns", "a", "new", "geometry", "based", "on", "an", "existing", "one", "with", "a", "specific", "point", "as", "a", "new", "vertex", ".", "A", "default", "distance", "10E", "-", "6", "is", "used", "to", "snap", "the", "input", "point", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddPoint.java#L60-L62
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.putSubFunction
public void putSubFunction(String name, SameDiff nameSpace) { """ Associate a {@link SameDiff} namespace as a sub function. @param name the opName of the function @param nameSpace the namespace """ if (sameDiffFunctionInstances.containsKey(name) && sameDiffFunctionInstances.get(name) != nameSp...
java
public void putSubFunction(String name, SameDiff nameSpace) { if (sameDiffFunctionInstances.containsKey(name) && sameDiffFunctionInstances.get(name) != nameSpace) { throw new ND4JIllegalStateException("Unable to replace samediff namespace. Please choose another opName"); } sameDiffF...
[ "public", "void", "putSubFunction", "(", "String", "name", ",", "SameDiff", "nameSpace", ")", "{", "if", "(", "sameDiffFunctionInstances", ".", "containsKey", "(", "name", ")", "&&", "sameDiffFunctionInstances", ".", "get", "(", "name", ")", "!=", "nameSpace", ...
Associate a {@link SameDiff} namespace as a sub function. @param name the opName of the function @param nameSpace the namespace
[ "Associate", "a", "{", "@link", "SameDiff", "}", "namespace", "as", "a", "sub", "function", "." ]
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#L874-L880
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java
ESResponseWrapper.getAggregatedResult
private Object getAggregatedResult(InternalAggregations internalAggs, String identifier, Expression exp) { """ Gets the aggregated result. @param internalAggs the internal aggs @param identifier the identifier @param exp the exp @return the aggregated result """ switch (identifier) { ...
java
private Object getAggregatedResult(InternalAggregations internalAggs, String identifier, Expression exp) { switch (identifier) { case Expression.MIN: return (((InternalMin) internalAggs.get(exp.toParsedText())).getValue()); case Expression.MAX: return (((Inte...
[ "private", "Object", "getAggregatedResult", "(", "InternalAggregations", "internalAggs", ",", "String", "identifier", ",", "Expression", "exp", ")", "{", "switch", "(", "identifier", ")", "{", "case", "Expression", ".", "MIN", ":", "return", "(", "(", "(", "In...
Gets the aggregated result. @param internalAggs the internal aggs @param identifier the identifier @param exp the exp @return the aggregated result
[ "Gets", "the", "aggregated", "result", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L555-L576
paypal/SeLion
server/src/main/java/com/paypal/selion/grid/matchers/MinimalIOSCapabilityMatcher.java
MinimalIOSCapabilityMatcher.isValid
private boolean isValid(Map<String, Object> capability) { """ /* Checks the validity of a capability by checking for not-null reference and the availability of CFBundleIdentifier and CFBundleName keys. """ return capability != null && capability.containsKey(BUNDLE_NAME); }
java
private boolean isValid(Map<String, Object> capability) { return capability != null && capability.containsKey(BUNDLE_NAME); }
[ "private", "boolean", "isValid", "(", "Map", "<", "String", ",", "Object", ">", "capability", ")", "{", "return", "capability", "!=", "null", "&&", "capability", ".", "containsKey", "(", "BUNDLE_NAME", ")", ";", "}" ]
/* Checks the validity of a capability by checking for not-null reference and the availability of CFBundleIdentifier and CFBundleName keys.
[ "/", "*", "Checks", "the", "validity", "of", "a", "capability", "by", "checking", "for", "not", "-", "null", "reference", "and", "the", "availability", "of", "CFBundleIdentifier", "and", "CFBundleName", "keys", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/matchers/MinimalIOSCapabilityMatcher.java#L37-L39
apache/incubator-druid
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java
DruidQuery.computeDimensions
private static List<DimensionExpression> computeDimensions( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, final DruidQuerySignature querySignature ) { """ Returns dimensions corresponding to {@code aggregate.getGroupSet()}, in the same order. @param partialQuery ...
java
private static List<DimensionExpression> computeDimensions( final PartialDruidQuery partialQuery, final PlannerContext plannerContext, final DruidQuerySignature querySignature ) { final Aggregate aggregate = Preconditions.checkNotNull(partialQuery.getAggregate()); final List<DimensionExpre...
[ "private", "static", "List", "<", "DimensionExpression", ">", "computeDimensions", "(", "final", "PartialDruidQuery", "partialQuery", ",", "final", "PlannerContext", "plannerContext", ",", "final", "DruidQuerySignature", "querySignature", ")", "{", "final", "Aggregate", ...
Returns dimensions corresponding to {@code aggregate.getGroupSet()}, in the same order. @param partialQuery partial query @param plannerContext planner context @param querySignature source row signature and re-usable virtual column references @return dimensions @throws CannotBuildQueryException if dimensions canno...
[ "Returns", "dimensions", "corresponding", "to", "{", "@code", "aggregate", ".", "getGroupSet", "()", "}", "in", "the", "same", "order", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L450-L505
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.getLastState
public ItemState getLastState(ItemData item, boolean forNode) { """ Return the last item state from ChangesLog. @param item an item data the last state which need to be taken @param forNode retrieves nodes' ItemStates is true, or properties' otherwise @return the last item state """ Map<String, It...
java
public ItemState getLastState(ItemData item, boolean forNode) { Map<String, ItemState> children = forNode ? lastChildNodeStates.get(item.getParentIdentifier()) : lastChildPropertyStates.get(item .getParentIdentifier()); return children == null ? null : children.get(item.getIdentifie...
[ "public", "ItemState", "getLastState", "(", "ItemData", "item", ",", "boolean", "forNode", ")", "{", "Map", "<", "String", ",", "ItemState", ">", "children", "=", "forNode", "?", "lastChildNodeStates", ".", "get", "(", "item", ".", "getParentIdentifier", "(", ...
Return the last item state from ChangesLog. @param item an item data the last state which need to be taken @param forNode retrieves nodes' ItemStates is true, or properties' otherwise @return the last item state
[ "Return", "the", "last", "item", "state", "from", "ChangesLog", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L645-L652
rpau/javalang-compiler
src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java
SymbolType.typeVariableOf
public static SymbolType typeVariableOf(final String typeVariable, List<SymbolType> upperBounds) { """ Builds a symbol for a type variable from a list of upper bounds. @param typeVariable the name of the variable @param upperBounds the upper bounds of the type variable @return a SymbolType that represents a var...
java
public static SymbolType typeVariableOf(final String typeVariable, List<SymbolType> upperBounds) { return new SymbolType(upperBounds, typeVariable); }
[ "public", "static", "SymbolType", "typeVariableOf", "(", "final", "String", "typeVariable", ",", "List", "<", "SymbolType", ">", "upperBounds", ")", "{", "return", "new", "SymbolType", "(", "upperBounds", ",", "typeVariable", ")", ";", "}" ]
Builds a symbol for a type variable from a list of upper bounds. @param typeVariable the name of the variable @param upperBounds the upper bounds of the type variable @return a SymbolType that represents a variable (for generics)
[ "Builds", "a", "symbol", "for", "a", "type", "variable", "from", "a", "list", "of", "upper", "bounds", "." ]
train
https://github.com/rpau/javalang-compiler/blob/d7da81359161feef2bc7ff186c4e1b73c6a5a8ef/src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java#L804-L806
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.addMonth
public static Date addMonth(String date, int amount) throws ParseException { """ 添加月份 @param date 日期 @param amount 数量 @return 添加后的日期 @throws ParseException 异常 """ return add(date, Calendar.MONTH, amount); }
java
public static Date addMonth(String date, int amount) throws ParseException { return add(date, Calendar.MONTH, amount); }
[ "public", "static", "Date", "addMonth", "(", "String", "date", ",", "int", "amount", ")", "throws", "ParseException", "{", "return", "add", "(", "date", ",", "Calendar", ".", "MONTH", ",", "amount", ")", ";", "}" ]
添加月份 @param date 日期 @param amount 数量 @return 添加后的日期 @throws ParseException 异常
[ "添加月份" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L411-L413
tweea/matrixjavalib-main-common
src/main/java/net/matrix/lang/Reflections.java
Reflections.setFieldValue
public static void setFieldValue(final Object target, final String name, final Object value) { """ 直接设置对象成员值,无视 private/protected 修饰符,不经过 setter 函数。 @param target 目标对象 @param name 成员名 @param value 成员值 """ Field field = FieldUtils.getDeclaredField(target.getClass(), name, true); if (field == nul...
java
public static void setFieldValue(final Object target, final String name, final Object value) { Field field = FieldUtils.getDeclaredField(target.getClass(), name, true); if (field == null) { throw new IllegalArgumentException("Could not find field [" + name + "] on target [" + target + ']'); } try { ...
[ "public", "static", "void", "setFieldValue", "(", "final", "Object", "target", ",", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "Field", "field", "=", "FieldUtils", ".", "getDeclaredField", "(", "target", ".", "getClass", "(", ")", ...
直接设置对象成员值,无视 private/protected 修饰符,不经过 setter 函数。 @param target 目标对象 @param name 成员名 @param value 成员值
[ "直接设置对象成员值,无视", "private", "/", "protected", "修饰符,不经过", "setter", "函数。" ]
train
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/lang/Reflections.java#L114-L126
openengsb/openengsb
components/ekb/modelregistry-tracker/src/main/java/org/openengsb/core/ekb/modelregistry/tracker/internal/ModelRegistryService.java
ModelRegistryService.isModelClass
private boolean isModelClass(String classname, Bundle bundle) { """ Returns true if the class with the given class name contained in the given bundle is a model and false if not or the class couldn't be loaded. """ LOGGER.debug("Check if class '{}' is a model class", classname); Class<?> clazz...
java
private boolean isModelClass(String classname, Bundle bundle) { LOGGER.debug("Check if class '{}' is a model class", classname); Class<?> clazz; try { clazz = bundle.loadClass(classname); } catch (ClassNotFoundException e) { LOGGER.warn("Bundle could not load its ...
[ "private", "boolean", "isModelClass", "(", "String", "classname", ",", "Bundle", "bundle", ")", "{", "LOGGER", ".", "debug", "(", "\"Check if class '{}' is a model class\"", ",", "classname", ")", ";", "Class", "<", "?", ">", "clazz", ";", "try", "{", "clazz",...
Returns true if the class with the given class name contained in the given bundle is a model and false if not or the class couldn't be loaded.
[ "Returns", "true", "if", "the", "class", "with", "the", "given", "class", "name", "contained", "in", "the", "given", "bundle", "is", "a", "model", "and", "false", "if", "not", "or", "the", "class", "couldn", "t", "be", "loaded", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/modelregistry-tracker/src/main/java/org/openengsb/core/ekb/modelregistry/tracker/internal/ModelRegistryService.java#L116-L136
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java
PublicIPAddressesInner.getVirtualMachineScaleSetPublicIPAddressAsync
public Observable<PublicIPAddressInner> getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { """ Get the specified public IP address in a virtual ...
java
public Observable<PublicIPAddressInner> getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { return getVirtualMachineScaleSetPublicIPAddressWit...
[ "public", "Observable", "<", "PublicIPAddressInner", ">", "getVirtualMachineScaleSetPublicIPAddressAsync", "(", "String", "resourceGroupName", ",", "String", "virtualMachineScaleSetName", ",", "String", "virtualmachineIndex", ",", "String", "networkInterfaceName", ",", "String"...
Get the specified public IP address in a virtual machine scale set. @param resourceGroupName The name of the resource group. @param virtualMachineScaleSetName The name of the virtual machine scale set. @param virtualmachineIndex The virtual machine index. @param networkInterfaceName The name of the network interface. ...
[ "Get", "the", "specified", "public", "IP", "address", "in", "a", "virtual", "machine", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java#L1466-L1473
bladecoder/blade-ink
src/main/java/com/bladecoder/ink/runtime/CallStack.java
CallStack.setJsonToken
@SuppressWarnings("unchecked") public void setJsonToken(HashMap<String, Object> jRTObject, Story storyContext) throws Exception { """ look up RTObjects from paths for currentContainer within elements. """ threads.clear(); List<Object> jThreads = (List<Object>) jRTObject.get("threads"); for (Object jTh...
java
@SuppressWarnings("unchecked") public void setJsonToken(HashMap<String, Object> jRTObject, Story storyContext) throws Exception { threads.clear(); List<Object> jThreads = (List<Object>) jRTObject.get("threads"); for (Object jThreadTok : jThreads) { HashMap<String, Object> jThreadObj = (HashMap<String, Objec...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setJsonToken", "(", "HashMap", "<", "String", ",", "Object", ">", "jRTObject", ",", "Story", "storyContext", ")", "throws", "Exception", "{", "threads", ".", "clear", "(", ")", ";", "List...
look up RTObjects from paths for currentContainer within elements.
[ "look", "up", "RTObjects", "from", "paths", "for", "currentContainer", "within", "elements", "." ]
train
https://github.com/bladecoder/blade-ink/blob/930922099f7073f50f956479adaa3cbd47c70225/src/main/java/com/bladecoder/ink/runtime/CallStack.java#L317-L330
BioPAX/Paxtools
paxtools-core/src/main/java/org/biopax/paxtools/io/BioPAXIOHandlerAdapter.java
BioPAXIOHandlerAdapter.resourceFixes
protected Object resourceFixes(BioPAXElement bpe, Object value) { """ This method currently only fixes reusedPEPs if the option is set. As L2 is becoming obsolete this method will be slated for deprecation. @param bpe to be bound @param value to be assigned. @return a "fixed" value. """ if (this.isFixReu...
java
protected Object resourceFixes(BioPAXElement bpe, Object value) { if (this.isFixReusedPEPs() && value instanceof physicalEntityParticipant) { value = this.getReusedPEPHelper().fixReusedPEP((physicalEntityParticipant) value, bpe); } return value; }
[ "protected", "Object", "resourceFixes", "(", "BioPAXElement", "bpe", ",", "Object", "value", ")", "{", "if", "(", "this", ".", "isFixReusedPEPs", "(", ")", "&&", "value", "instanceof", "physicalEntityParticipant", ")", "{", "value", "=", "this", ".", "getReuse...
This method currently only fixes reusedPEPs if the option is set. As L2 is becoming obsolete this method will be slated for deprecation. @param bpe to be bound @param value to be assigned. @return a "fixed" value.
[ "This", "method", "currently", "only", "fixes", "reusedPEPs", "if", "the", "option", "is", "set", ".", "As", "L2", "is", "becoming", "obsolete", "this", "method", "will", "be", "slated", "for", "deprecation", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/io/BioPAXIOHandlerAdapter.java#L295-L302
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineTables
private void defineTables(UIDefaults d) { """ Initialize the table UI settings. @param d the UI defaults map. """ d.put("tableHeaderBorderEnabled", new Color(0xcad3e0)); d.put("tableHeaderSortIndicator", new Color(0xc02a5481, true)); // Rossi: table headers now blue and glassy. ...
java
private void defineTables(UIDefaults d) { d.put("tableHeaderBorderEnabled", new Color(0xcad3e0)); d.put("tableHeaderSortIndicator", new Color(0xc02a5481, true)); // Rossi: table headers now blue and glassy. // I know you discussed this already but I like all interactive components to hav...
[ "private", "void", "defineTables", "(", "UIDefaults", "d", ")", "{", "d", ".", "put", "(", "\"tableHeaderBorderEnabled\"", ",", "new", "Color", "(", "0xcad3e0", ")", ")", ";", "d", ".", "put", "(", "\"tableHeaderSortIndicator\"", ",", "new", "Color", "(", ...
Initialize the table UI settings. @param d the UI defaults map.
[ "Initialize", "the", "table", "UI", "settings", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2048-L2094
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/jni/AnalogInputMonitor.java
AnalogInputMonitor.pinValueChangeCallback
@SuppressWarnings("unchecked") private static void pinValueChangeCallback(int pin, double value) { """ <p> This method is provided as the callback handler for the Pi4J native library to invoke when a GPIO analog input calue change is detected. This method should not be called from any Java consumers. (Thus ...
java
@SuppressWarnings("unchecked") private static void pinValueChangeCallback(int pin, double value) { Vector<AnalogInputListener> listenersClone; listenersClone = (Vector<AnalogInputListener>) listeners.clone(); for (int i = 0; i < listenersClone.size(); i++) { AnalogInputListener...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "pinValueChangeCallback", "(", "int", "pin", ",", "double", "value", ")", "{", "Vector", "<", "AnalogInputListener", ">", "listenersClone", ";", "listenersClone", "=", "(", "Vector", ...
<p> This method is provided as the callback handler for the Pi4J native library to invoke when a GPIO analog input calue change is detected. This method should not be called from any Java consumers. (Thus it is marked as a private method.) </p> @param pin GPIO pin number @param value New GPIO analog input value
[ "<p", ">", "This", "method", "is", "provided", "as", "the", "callback", "handler", "for", "the", "Pi4J", "native", "library", "to", "invoke", "when", "a", "GPIO", "analog", "input", "calue", "change", "is", "detected", ".", "This", "method", "should", "not...
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/jni/AnalogInputMonitor.java#L107-L120
Stratio/stratio-cassandra
src/java/org/apache/cassandra/io/util/SequentialWriter.java
SequentialWriter.flushData
protected void flushData() { """ Override this method instead of overriding flush() @throws FSWriteError on any I/O error. """ try { out.write(buffer, 0, validBufferBytes); lastFlushOffset += validBufferBytes; } catch (IOException e) { ...
java
protected void flushData() { try { out.write(buffer, 0, validBufferBytes); lastFlushOffset += validBufferBytes; } catch (IOException e) { throw new FSWriteError(e, getPath()); } if (runPostFlush != null) runPostF...
[ "protected", "void", "flushData", "(", ")", "{", "try", "{", "out", ".", "write", "(", "buffer", ",", "0", ",", "validBufferBytes", ")", ";", "lastFlushOffset", "+=", "validBufferBytes", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new...
Override this method instead of overriding flush() @throws FSWriteError on any I/O error.
[ "Override", "this", "method", "instead", "of", "overriding", "flush", "()" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/util/SequentialWriter.java#L319-L332
projectodd/wunderboss-release
ruby/src/main/java/org/projectodd/wunderboss/ruby/RubyHelper.java
RubyHelper.setIfPossible
public static boolean setIfPossible(final Ruby ruby, final Object target, final String name, final Object value) { """ Set a property on a Ruby object, if possible. <p> If the target responds to {@code name=}, the property will be set. Otherwise, not. </p> @param ruby The Ruby interpreter. @param target...
java
public static boolean setIfPossible(final Ruby ruby, final Object target, final String name, final Object value) { boolean success = false; if (defined( ruby, target, name + "=" )) { JavaEmbedUtils.invokeMethod( ruby, target, name + "=", new Object[] { value }, void.class ); succ...
[ "public", "static", "boolean", "setIfPossible", "(", "final", "Ruby", "ruby", ",", "final", "Object", "target", ",", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "boolean", "success", "=", "false", ";", "if", "(", "defined", "(", ...
Set a property on a Ruby object, if possible. <p> If the target responds to {@code name=}, the property will be set. Otherwise, not. </p> @param ruby The Ruby interpreter. @param target The target object. @param name The basic name of the property. @param value The value to attempt to set. @return {@code true} if suc...
[ "Set", "a", "property", "on", "a", "Ruby", "object", "if", "possible", "." ]
train
https://github.com/projectodd/wunderboss-release/blob/f67c68e80c5798169e3a9b2015e278239dbf005d/ruby/src/main/java/org/projectodd/wunderboss/ruby/RubyHelper.java#L58-L65
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.convertToProperty
private OpenConnection.Property convertToProperty(Map.Entry<String, String> entry) { """ Converts a Map entry into a OpenConnection.Property @param entry The entry to convert @return the OpenConnection.Property representation """ OpenConnection.Property property = new OpenConnection.Property(); ...
java
private OpenConnection.Property convertToProperty(Map.Entry<String, String> entry) { OpenConnection.Property property = new OpenConnection.Property(); property.setName(entry.getKey()); property.setValue(entry.getValue()); return property; }
[ "private", "OpenConnection", ".", "Property", "convertToProperty", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ")", "{", "OpenConnection", ".", "Property", "property", "=", "new", "OpenConnection", ".", "Property", "(", ")", ";", "p...
Converts a Map entry into a OpenConnection.Property @param entry The entry to convert @return the OpenConnection.Property representation
[ "Converts", "a", "Map", "entry", "into", "a", "OpenConnection", ".", "Property" ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L336-L341
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeReadTrx.java
NodeReadTrx.buildQName
public static final QName buildQName(final String paramUri, final String paramName) { """ Building QName out of uri and name. The name can have the prefix denoted with ":"; @param paramUri the namespaceuri @param paramName the name including a possible prefix @return the QName obj """ QName qna...
java
public static final QName buildQName(final String paramUri, final String paramName) { QName qname; if (paramName.contains(":")) { qname = new QName(paramUri, paramName.split(":")[1], paramName.split(":")[0]); } else { qname = new QName(paramUri, paramName); } ...
[ "public", "static", "final", "QName", "buildQName", "(", "final", "String", "paramUri", ",", "final", "String", "paramName", ")", "{", "QName", "qname", ";", "if", "(", "paramName", ".", "contains", "(", "\":\"", ")", ")", "{", "qname", "=", "new", "QNam...
Building QName out of uri and name. The name can have the prefix denoted with ":"; @param paramUri the namespaceuri @param paramName the name including a possible prefix @return the QName obj
[ "Building", "QName", "out", "of", "uri", "and", "name", ".", "The", "name", "can", "have", "the", "prefix", "denoted", "with", ":", ";" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeReadTrx.java#L257-L265
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistriesInner.java
RegistriesInner.beginScheduleRunAsync
public Observable<RunInner> beginScheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) { """ Schedules a new run based on the request parameters and add it to the run queue. @param resourceGroupName The name of the resource group to which the container registry belongs. @param ...
java
public Observable<RunInner> beginScheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest) { return beginScheduleRunWithServiceResponseAsync(resourceGroupName, registryName, runRequest).map(new Func1<ServiceResponse<RunInner>, RunInner>() { @Override public R...
[ "public", "Observable", "<", "RunInner", ">", "beginScheduleRunAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "RunRequest", "runRequest", ")", "{", "return", "beginScheduleRunWithServiceResponseAsync", "(", "resourceGroupName", ",", "regis...
Schedules a new run based on the request parameters and add it to the run queue. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param runRequest The parameters of a run that needs to scheduled. @throws IllegalArg...
[ "Schedules", "a", "new", "run", "based", "on", "the", "request", "parameters", "and", "add", "it", "to", "the", "run", "queue", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistriesInner.java#L1829-L1836
code4everything/util
src/main/java/com/zhazhapan/util/dialog/Alerts.java
Alerts.showInformation
public static Optional<ButtonType> showInformation(String title, String content) { """ 弹出信息框 @param title 标题 @param content 内容 @return {@link ButtonType} """ return showInformation(title, null, content); }
java
public static Optional<ButtonType> showInformation(String title, String content) { return showInformation(title, null, content); }
[ "public", "static", "Optional", "<", "ButtonType", ">", "showInformation", "(", "String", "title", ",", "String", "content", ")", "{", "return", "showInformation", "(", "title", ",", "null", ",", "content", ")", ";", "}" ]
弹出信息框 @param title 标题 @param content 内容 @return {@link ButtonType}
[ "弹出信息框" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/dialog/Alerts.java#L32-L34
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.getGroup
public FriendGroup getGroup() { """ Gets the FriendGroup that contains this friend. @return the FriendGroup that currently contains this Friend or null if this Friend is not in a FriendGroup. """ final Collection<RosterGroup> groups = get().getGroups(); if (groups.size() > 0) { return new FriendG...
java
public FriendGroup getGroup() { final Collection<RosterGroup> groups = get().getGroups(); if (groups.size() > 0) { return new FriendGroup(api, con, get().getGroups().iterator() .next()); } return null; }
[ "public", "FriendGroup", "getGroup", "(", ")", "{", "final", "Collection", "<", "RosterGroup", ">", "groups", "=", "get", "(", ")", ".", "getGroups", "(", ")", ";", "if", "(", "groups", ".", "size", "(", ")", ">", "0", ")", "{", "return", "new", "F...
Gets the FriendGroup that contains this friend. @return the FriendGroup that currently contains this Friend or null if this Friend is not in a FriendGroup.
[ "Gets", "the", "FriendGroup", "that", "contains", "this", "friend", "." ]
train
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L164-L171
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/types/Transform.java
Transform.createViewportTransform
public static Transform createViewportTransform(double x, double y, final double width, final double height, final double viewportWidth, final double viewportHeight) { """ Creates a Transform for a viewport. The visible area is defined by the rectangle [x, y, width, height] and the viewport's width and height. ...
java
public static Transform createViewportTransform(double x, double y, final double width, final double height, final double viewportWidth, final double viewportHeight) { if ((width <= 0) || (height <= 0)) { return null; } final double scaleX = viewportWidth / width; ...
[ "public", "static", "Transform", "createViewportTransform", "(", "double", "x", ",", "double", "y", ",", "final", "double", "width", ",", "final", "double", "height", ",", "final", "double", "viewportWidth", ",", "final", "double", "viewportHeight", ")", "{", ...
Creates a Transform for a viewport. The visible area is defined by the rectangle [x, y, width, height] and the viewport's width and height. @param x X coordinate of the top-left corner of the new view area. @param y Y coordinate of the top-left corner of the new view area. @param width Width of the new view area. @par...
[ "Creates", "a", "Transform", "for", "a", "viewport", ".", "The", "visible", "area", "is", "defined", "by", "the", "rectangle", "[", "x", "y", "width", "height", "]", "and", "the", "viewport", "s", "width", "and", "height", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/types/Transform.java#L469-L506
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/assertion/ChorusAssert.java
ChorusAssert.assertEquals
static public void assertEquals(String message, float expected, float actual, float delta) { """ Asserts that two floats are equal concerning a positive delta. If they are not an AssertionFailedError is thrown with the given message. If the expected value is infinity then the delta value is ignored. """ ...
java
static public void assertEquals(String message, float expected, float actual, float delta) { if (Float.compare(expected, actual) == 0) return; if (!(Math.abs(expected - actual) <= delta)) failNotEquals(message, new Float(expected), new Float(actual)); }
[ "static", "public", "void", "assertEquals", "(", "String", "message", ",", "float", "expected", ",", "float", "actual", ",", "float", "delta", ")", "{", "if", "(", "Float", ".", "compare", "(", "expected", ",", "actual", ")", "==", "0", ")", "return", ...
Asserts that two floats are equal concerning a positive delta. If they are not an AssertionFailedError is thrown with the given message. If the expected value is infinity then the delta value is ignored.
[ "Asserts", "that", "two", "floats", "are", "equal", "concerning", "a", "positive", "delta", ".", "If", "they", "are", "not", "an", "AssertionFailedError", "is", "thrown", "with", "the", "given", "message", ".", "If", "the", "expected", "value", "is", "infini...
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/assertion/ChorusAssert.java#L146-L151
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingnewssearch/src/main/java/com/microsoft/azure/cognitiveservices/search/newssearch/implementation/BingNewsImpl.java
BingNewsImpl.trendingWithServiceResponseAsync
public Observable<ServiceResponse<TrendingTopics>> trendingWithServiceResponseAsync(TrendingOptionalParameter trendingOptionalParameter) { """ The News Trending Topics API lets lets you search on Bing and get back a list of trending news topics that are currently trending on Bing. This section provides technical d...
java
public Observable<ServiceResponse<TrendingTopics>> trendingWithServiceResponseAsync(TrendingOptionalParameter trendingOptionalParameter) { final String acceptLanguage = trendingOptionalParameter != null ? trendingOptionalParameter.acceptLanguage() : null; final String userAgent = trendingOptionalParamet...
[ "public", "Observable", "<", "ServiceResponse", "<", "TrendingTopics", ">", ">", "trendingWithServiceResponseAsync", "(", "TrendingOptionalParameter", "trendingOptionalParameter", ")", "{", "final", "String", "acceptLanguage", "=", "trendingOptionalParameter", "!=", "null", ...
The News Trending Topics API lets lets you search on Bing and get back a list of trending news topics that are currently trending on Bing. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show ...
[ "The", "News", "Trending", "Topics", "API", "lets", "lets", "you", "search", "on", "Bing", "and", "get", "back", "a", "list", "of", "trending", "news", "topics", "that", "are", "currently", "trending", "on", "Bing", ".", "This", "section", "provides", "tec...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingnewssearch/src/main/java/com/microsoft/azure/cognitiveservices/search/newssearch/implementation/BingNewsImpl.java#L667-L685
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java
IconProviderBuilder.forShape
public IconProviderBuilder forShape(String shapeName, Icon icon) { """ Sets the icon to use for a specific shape/group in a {@link MalisisModel}. @param shapeName the shape name @param icon the icon @return the icon provider builder """ setType(Type.MODEL); shapeIcons.put(shapeName, checkNotNull(icon)...
java
public IconProviderBuilder forShape(String shapeName, Icon icon) { setType(Type.MODEL); shapeIcons.put(shapeName, checkNotNull(icon)); return this; }
[ "public", "IconProviderBuilder", "forShape", "(", "String", "shapeName", ",", "Icon", "icon", ")", "{", "setType", "(", "Type", ".", "MODEL", ")", ";", "shapeIcons", ".", "put", "(", "shapeName", ",", "checkNotNull", "(", "icon", ")", ")", ";", "return", ...
Sets the icon to use for a specific shape/group in a {@link MalisisModel}. @param shapeName the shape name @param icon the icon @return the icon provider builder
[ "Sets", "the", "icon", "to", "use", "for", "a", "specific", "shape", "/", "group", "in", "a", "{", "@link", "MalisisModel", "}", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java#L267-L272
spockframework/spock
spock-core/src/main/java/spock/util/concurrent/AsyncConditions.java
AsyncConditions.await
public void await(double seconds) throws Throwable { """ Waits until all evaluate blocks have completed or the specified timeout (in seconds) expires. If one of the evaluate blocks throws an exception, it is rethrown from this method. @param seconds the timeout (in seconds) @throws InterruptedException if th...
java
public void await(double seconds) throws Throwable { latch.await((long) (seconds * 1000), TimeUnit.MILLISECONDS); if (!exceptions.isEmpty()) throw exceptions.poll(); long pendingEvalBlocks = latch.getCount(); if (pendingEvalBlocks > 0) { String msg = String.format("Async conditions timed ou...
[ "public", "void", "await", "(", "double", "seconds", ")", "throws", "Throwable", "{", "latch", ".", "await", "(", "(", "long", ")", "(", "seconds", "*", "1000", ")", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "if", "(", "!", "exceptions", ".", "...
Waits until all evaluate blocks have completed or the specified timeout (in seconds) expires. If one of the evaluate blocks throws an exception, it is rethrown from this method. @param seconds the timeout (in seconds) @throws InterruptedException if the calling thread is interrupted @throws Throwable the first excepti...
[ "Waits", "until", "all", "evaluate", "blocks", "have", "completed", "or", "the", "specified", "timeout", "(", "in", "seconds", ")", "expires", ".", "If", "one", "of", "the", "evaluate", "blocks", "throws", "an", "exception", "it", "is", "rethrown", "from", ...
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/spock/util/concurrent/AsyncConditions.java#L133-L145
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java
CommonExpectations.getResponseTextExpectationsForJwtCookie
public static Expectations getResponseTextExpectationsForJwtCookie(String testAction, String jwtCookieName, String username) { """ Sets expectations that will check: <ol> <li>Response text includes a JWT SSO cookie <li>Response text includes expected remote user <li>Subject principal includes an appropriate JW...
java
public static Expectations getResponseTextExpectationsForJwtCookie(String testAction, String jwtCookieName, String username) { Expectations expectations = new Expectations(); expectations.addExpectations(responseTextIncludesCookie(testAction, jwtCookieName)); expectations.addExpectations(respons...
[ "public", "static", "Expectations", "getResponseTextExpectationsForJwtCookie", "(", "String", "testAction", ",", "String", "jwtCookieName", ",", "String", "username", ")", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ...
Sets expectations that will check: <ol> <li>Response text includes a JWT SSO cookie <li>Response text includes expected remote user <li>Subject principal includes an appropriate JWT <li>Subject public credentials include appropriate access ID </ol>
[ "Sets", "expectations", "that", "will", "check", ":", "<ol", ">", "<li", ">", "Response", "text", "includes", "a", "JWT", "SSO", "cookie", "<li", ">", "Response", "text", "includes", "expected", "remote", "user", "<li", ">", "Subject", "principal", "includes...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java#L115-L123
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.suppressSpecificConstructor
@Deprecated public static synchronized void suppressSpecificConstructor(Class<?> clazz, Class<?>... parameterTypes) { """ This method can be used to suppress the code in a specific constructor. @param clazz The class where the constructor is located. @param parameterTypes The parameter types of th...
java
@Deprecated public static synchronized void suppressSpecificConstructor(Class<?> clazz, Class<?>... parameterTypes) { SuppressCode.suppressSpecificConstructor(clazz, parameterTypes); }
[ "@", "Deprecated", "public", "static", "synchronized", "void", "suppressSpecificConstructor", "(", "Class", "<", "?", ">", "clazz", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "SuppressCode", ".", "suppressSpecificConstructor", "(", "clazz", ...
This method can be used to suppress the code in a specific constructor. @param clazz The class where the constructor is located. @param parameterTypes The parameter types of the constructor to suppress. @deprecated Use {@link #suppress(Constructor)} instead.
[ "This", "method", "can", "be", "used", "to", "suppress", "the", "code", "in", "a", "specific", "constructor", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1771-L1774
radkovo/jStyleParser
src/main/java/cz/vutbr/web/csskit/MatchConditionOnElements.java
MatchConditionOnElements.addMatch
public void addMatch(Element e, PseudoClassType pseudoClass) { """ Assigns a pseudo class to the given element. Multiple pseudo classes may be assigned to a single element. @param e the DOM element @param pseudoClass the pseudo class to be assigned """ if (elements == null) elements = new...
java
public void addMatch(Element e, PseudoClassType pseudoClass) { if (elements == null) elements = new HashMap<Element, Set<PseudoClassType>>(); Set<PseudoClassType> classes = elements.get(e); if (classes == null) { classes = new HashSet<PseudoClassType>...
[ "public", "void", "addMatch", "(", "Element", "e", ",", "PseudoClassType", "pseudoClass", ")", "{", "if", "(", "elements", "==", "null", ")", "elements", "=", "new", "HashMap", "<", "Element", ",", "Set", "<", "PseudoClassType", ">", ">", "(", ")", ";", ...
Assigns a pseudo class to the given element. Multiple pseudo classes may be assigned to a single element. @param e the DOM element @param pseudoClass the pseudo class to be assigned
[ "Assigns", "a", "pseudo", "class", "to", "the", "given", "element", ".", "Multiple", "pseudo", "classes", "may", "be", "assigned", "to", "a", "single", "element", "." ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/csskit/MatchConditionOnElements.java#L67-L79
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java
ApplicationSecurityGroupsInner.getByResourceGroupAsync
public Observable<ApplicationSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { """ Gets information about the specified application security group. @param resourceGroupName The name of the resource group. @param applicationSecurityGroupName The name of...
java
public Observable<ApplicationSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1<ServiceResponse<ApplicationSecurityGroupInner>, ApplicationSe...
[ "public", "Observable", "<", "ApplicationSecurityGroupInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "applicationSecurityGroupName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "app...
Gets information about the specified application security group. @param resourceGroupName The name of the resource group. @param applicationSecurityGroupName The name of the application security group. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ApplicationSe...
[ "Gets", "information", "about", "the", "specified", "application", "security", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java#L291-L298
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPSpecificationOptionUtil.java
CPSpecificationOptionUtil.removeByG_K
public static CPSpecificationOption removeByG_K(long groupId, String key) throws com.liferay.commerce.product.exception.NoSuchCPSpecificationOptionException { """ Removes the cp specification option where groupId = &#63; and key = &#63; from the database. @param groupId the group ID @param key the key @retu...
java
public static CPSpecificationOption removeByG_K(long groupId, String key) throws com.liferay.commerce.product.exception.NoSuchCPSpecificationOptionException { return getPersistence().removeByG_K(groupId, key); }
[ "public", "static", "CPSpecificationOption", "removeByG_K", "(", "long", "groupId", ",", "String", "key", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "exception", ".", "NoSuchCPSpecificationOptionException", "{", "return", "getPersist...
Removes the cp specification option where groupId = &#63; and key = &#63; from the database. @param groupId the group ID @param key the key @return the cp specification option that was removed
[ "Removes", "the", "cp", "specification", "option", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPSpecificationOptionUtil.java#L891-L894
unbescape/unbescape
src/main/java/org/unbescape/java/JavaEscape.java
JavaEscape.escapeJava
public static String escapeJava(final String text, final JavaEscapeLevel level) { """ <p> Perform a (configurable) Java <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.java.JavaEscapeLevel} argu...
java
public static String escapeJava(final String text, final JavaEscapeLevel level) { if (level == null) { throw new IllegalArgumentException("The 'level' argument cannot be null"); } return JavaEscapeUtil.escape(text, level); }
[ "public", "static", "String", "escapeJava", "(", "final", "String", "text", ",", "final", "JavaEscapeLevel", "level", ")", "{", "if", "(", "level", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The 'level' argument cannot be null\"", ...
<p> Perform a (configurable) Java <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.java.JavaEscapeLevel} argument value. </p> <p> All other <tt>String</tt>-based <tt>escapeJava*(...)</tt> methods call this...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "Java", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "will", "perfo...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/java/JavaEscape.java#L334-L342
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java
WebSiteManagementClientImpl.updateSourceControl
public SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { """ Updates source control token. Updates source control token. @param sourceControlType Type of source control @param requestMessage Source control token information @throws IllegalArgumentException ...
java
public SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { return updateSourceControlWithServiceResponseAsync(sourceControlType, requestMessage).toBlocking().single().body(); }
[ "public", "SourceControlInner", "updateSourceControl", "(", "String", "sourceControlType", ",", "SourceControlInner", "requestMessage", ")", "{", "return", "updateSourceControlWithServiceResponseAsync", "(", "sourceControlType", ",", "requestMessage", ")", ".", "toBlocking", ...
Updates source control token. Updates source control token. @param sourceControlType Type of source control @param requestMessage Source control token information @throws IllegalArgumentException thrown if parameters fail the validation @throws DefaultErrorResponseException thrown if the request is rejected by server ...
[ "Updates", "source", "control", "token", ".", "Updates", "source", "control", "token", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java#L849-L851
pac4j/pac4j
pac4j-http/src/main/java/org/pac4j/http/credentials/CredentialUtil.java
CredentialUtil.encryptMD5
public static String encryptMD5(String data) { """ Defined in rfc 2617 as H(data) = MD5(data); @param data data @return MD5(data) """ try { MessageDigest digest = MessageDigest.getInstance("MD5"); return copyValueOf(Hex.encodeHex(digest.digest(data.getBytes(StandardCharsets....
java
public static String encryptMD5(String data) { try { MessageDigest digest = MessageDigest.getInstance("MD5"); return copyValueOf(Hex.encodeHex(digest.digest(data.getBytes(StandardCharsets.UTF_8)))); } catch (final NoSuchAlgorithmException ex) { throw new TechnicalExce...
[ "public", "static", "String", "encryptMD5", "(", "String", "data", ")", "{", "try", "{", "MessageDigest", "digest", "=", "MessageDigest", ".", "getInstance", "(", "\"MD5\"", ")", ";", "return", "copyValueOf", "(", "Hex", ".", "encodeHex", "(", "digest", ".",...
Defined in rfc 2617 as H(data) = MD5(data); @param data data @return MD5(data)
[ "Defined", "in", "rfc", "2617", "as", "H", "(", "data", ")", "=", "MD5", "(", "data", ")", ";" ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-http/src/main/java/org/pac4j/http/credentials/CredentialUtil.java#L27-L34
kiegroup/drools
drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java
DroolsStreamUtils.streamOut
public static void streamOut(OutputStream out, Object object) throws IOException { """ This method would stream out the given object to the given output stream uncompressed. The output contents could only be read by the corresponding "streamIn" method of this class. @param out @param object @throws IOException...
java
public static void streamOut(OutputStream out, Object object) throws IOException { streamOut(out, object, false); }
[ "public", "static", "void", "streamOut", "(", "OutputStream", "out", ",", "Object", "object", ")", "throws", "IOException", "{", "streamOut", "(", "out", ",", "object", ",", "false", ")", ";", "}" ]
This method would stream out the given object to the given output stream uncompressed. The output contents could only be read by the corresponding "streamIn" method of this class. @param out @param object @throws IOException
[ "This", "method", "would", "stream", "out", "the", "given", "object", "to", "the", "given", "output", "stream", "uncompressed", ".", "The", "output", "contents", "could", "only", "be", "read", "by", "the", "corresponding", "streamIn", "method", "of", "this", ...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L76-L78
coursera/courier
typescript-lite/generator/src/main/java/org/coursera/courier/tslite/TSSyntax.java
TSSyntax.docComment
private static String docComment(String doc, Object deprecation /* nullable */) { """ Return a full tsdoc for a type. @param doc the doc string in the type's DataSchema. @param deprecation the object listed under the schema's "deprecation" property @return a fully formed tsdoc for the type. """ Stri...
java
private static String docComment(String doc, Object deprecation /* nullable */) { StringBuilder docStr = new StringBuilder(); if (doc != null) { docStr.append(doc.trim()); } if (deprecation != null) { docStr.append("\n\n").append("@deprecated"); if (deprecation instanceof String) { ...
[ "private", "static", "String", "docComment", "(", "String", "doc", ",", "Object", "deprecation", "/* nullable */", ")", "{", "StringBuilder", "docStr", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "doc", "!=", "null", ")", "{", "docStr", ".", "ap...
Return a full tsdoc for a type. @param doc the doc string in the type's DataSchema. @param deprecation the object listed under the schema's "deprecation" property @return a fully formed tsdoc for the type.
[ "Return", "a", "full", "tsdoc", "for", "a", "type", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/typescript-lite/generator/src/main/java/org/coursera/courier/tslite/TSSyntax.java#L202-L216
aws/aws-sdk-java
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/LoadBalancer.java
LoadBalancer.withConfigurationOptions
public LoadBalancer withConfigurationOptions(java.util.Map<String, String> configurationOptions) { """ <p> A string to string map of the configuration options for your load balancer. Valid values are listed below. </p> @param configurationOptions A string to string map of the configuration options for your l...
java
public LoadBalancer withConfigurationOptions(java.util.Map<String, String> configurationOptions) { setConfigurationOptions(configurationOptions); return this; }
[ "public", "LoadBalancer", "withConfigurationOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "configurationOptions", ")", "{", "setConfigurationOptions", "(", "configurationOptions", ")", ";", "return", "this", ";", "}" ]
<p> A string to string map of the configuration options for your load balancer. Valid values are listed below. </p> @param configurationOptions A string to string map of the configuration options for your load balancer. Valid values are listed below. @return Returns a reference to this object so that method calls can ...
[ "<p", ">", "A", "string", "to", "string", "map", "of", "the", "configuration", "options", "for", "your", "load", "balancer", ".", "Valid", "values", "are", "listed", "below", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/LoadBalancer.java#L1015-L1018
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ContainerServicesInner.java
ContainerServicesInner.listOrchestrators
public OrchestratorVersionProfileListResultInner listOrchestrators(String location, String resourceType) { """ Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including...
java
public OrchestratorVersionProfileListResultInner listOrchestrators(String location, String resourceType) { return listOrchestratorsWithServiceResponseAsync(location, resourceType).toBlocking().single().body(); }
[ "public", "OrchestratorVersionProfileListResultInner", "listOrchestrators", "(", "String", "location", ",", "String", "resourceType", ")", "{", "return", "listOrchestratorsWithServiceResponseAsync", "(", "location", ",", "resourceType", ")", ".", "toBlocking", "(", ")", "...
Gets a list of supported orchestrators in the specified subscription. Gets a list of supported orchestrators in the specified subscription. The operation returns properties of each orchestrator including version and available upgrades. @param location The name of a supported Azure region. @param resourceType resource ...
[ "Gets", "a", "list", "of", "supported", "orchestrators", "in", "the", "specified", "subscription", ".", "Gets", "a", "list", "of", "supported", "orchestrators", "in", "the", "specified", "subscription", ".", "The", "operation", "returns", "properties", "of", "ea...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ContainerServicesInner.java#L846-L848
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/CommonUtils.java
CommonUtils.dateReservedQuarter000
public static Date dateReservedQuarter000(int year, int quarter) { """ 获取指定年,季度的最初时刻 @param year 年份 @param quarter 季度 @return 指定年, 季度的最初时刻日期对象 """ Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); if (quarter <= 1) { calendar.set(Calendar...
java
public static Date dateReservedQuarter000(int year, int quarter) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); if (quarter <= 1) { calendar.set(Calendar.MONTH, Calendar.JANUARY); } else if (quarter == 2) { calendar.set(Calendar.M...
[ "public", "static", "Date", "dateReservedQuarter000", "(", "int", "year", ",", "int", "quarter", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "set", "(", "Calendar", ".", "YEAR", ",", "year", ")", ...
获取指定年,季度的最初时刻 @param year 年份 @param quarter 季度 @return 指定年, 季度的最初时刻日期对象
[ "获取指定年", "季度的最初时刻" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/CommonUtils.java#L470-L483
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXbaseSemanticSequencer.java
AbstractXbaseSemanticSequencer.sequence_XNumberLiteral
protected void sequence_XNumberLiteral(ISerializationContext context, XNumberLiteral semanticObject) { """ Contexts: XExpression returns XNumberLiteral XAssignment returns XNumberLiteral XAssignment.XBinaryOperation_1_1_0_0_0 returns XNumberLiteral XOrExpression returns XNumberLiteral XOrExpression.XBinaryOpe...
java
protected void sequence_XNumberLiteral(ISerializationContext context, XNumberLiteral semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, XbasePackage.Literals.XNUMBER_LITERAL__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValu...
[ "protected", "void", "sequence_XNumberLiteral", "(", "ISerializationContext", "context", ",", "XNumberLiteral", "semanticObject", ")", "{", "if", "(", "errorAcceptor", "!=", "null", ")", "{", "if", "(", "transientValues", ".", "isValueTransient", "(", "semanticObject"...
Contexts: XExpression returns XNumberLiteral XAssignment returns XNumberLiteral XAssignment.XBinaryOperation_1_1_0_0_0 returns XNumberLiteral XOrExpression returns XNumberLiteral XOrExpression.XBinaryOperation_1_0_0_0 returns XNumberLiteral XAndExpression returns XNumberLiteral XAndExpression.XBinaryOperation_1_0_0_0 r...
[ "Contexts", ":", "XExpression", "returns", "XNumberLiteral", "XAssignment", "returns", "XNumberLiteral", "XAssignment", ".", "XBinaryOperation_1_1_0_0_0", "returns", "XNumberLiteral", "XOrExpression", "returns", "XNumberLiteral", "XOrExpression", ".", "XBinaryOperation_1_0_0_0", ...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXbaseSemanticSequencer.java#L1200-L1208
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.deleteRegexEntityRole
public OperationStatus deleteRegexEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { """ Delete an entity role. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role Id. @throws IllegalArgumentException thrown if pa...
java
public OperationStatus deleteRegexEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { return deleteRegexEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body(); }
[ "public", "OperationStatus", "deleteRegexEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ")", "{", "return", "deleteRegexEntityRoleWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId"...
Delete an entity role. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role Id. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeE...
[ "Delete", "an", "entity", "role", "." ]
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#L12256-L12258
OpenLiberty/open-liberty
dev/com.ibm.websphere.security/src/com/ibm/websphere/security/audit/AuditEvent.java
AuditEvent.setReason
public void setReason(Map<String, Object> reason) { """ Set the reason keys/values. The provided Map will completely replace the existing reason, i.e. all current reason keys/values will be removed and the new reason keys/values will be added. @param reason """ removeEntriesStartingWith(REASON); ...
java
public void setReason(Map<String, Object> reason) { removeEntriesStartingWith(REASON); eventMap.putAll(reason); }
[ "public", "void", "setReason", "(", "Map", "<", "String", ",", "Object", ">", "reason", ")", "{", "removeEntriesStartingWith", "(", "REASON", ")", ";", "eventMap", ".", "putAll", "(", "reason", ")", ";", "}" ]
Set the reason keys/values. The provided Map will completely replace the existing reason, i.e. all current reason keys/values will be removed and the new reason keys/values will be added. @param reason
[ "Set", "the", "reason", "keys", "/", "values", ".", "The", "provided", "Map", "will", "completely", "replace", "the", "existing", "reason", "i", ".", "e", ".", "all", "current", "reason", "keys", "/", "values", "will", "be", "removed", "and", "the", "new...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/websphere/security/audit/AuditEvent.java#L371-L374
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java
Tanimoto.method1
public static double method1(ICountFingerprint fp1, ICountFingerprint fp2) { """ Calculates Tanimoto distance for two count fingerprints using method 1. The feature/count type fingerprints may be of different length. Uses Tanimoto method from {@cdk.cite Steffen09}. @param fp1 count fingerprint 1 @param fp2...
java
public static double method1(ICountFingerprint fp1, ICountFingerprint fp2) { long xy = 0, x = 0, y = 0; for (int i = 0; i < fp1.numOfPopulatedbins(); i++) { int hash = fp1.getHash(i); for (int j = 0; j < fp2.numOfPopulatedbins(); j++) { if (hash == fp2.getHash(j))...
[ "public", "static", "double", "method1", "(", "ICountFingerprint", "fp1", ",", "ICountFingerprint", "fp2", ")", "{", "long", "xy", "=", "0", ",", "x", "=", "0", ",", "y", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fp1", ".",...
Calculates Tanimoto distance for two count fingerprints using method 1. The feature/count type fingerprints may be of different length. Uses Tanimoto method from {@cdk.cite Steffen09}. @param fp1 count fingerprint 1 @param fp2 count fingerprint 2 @return a Tanimoto distance
[ "Calculates", "Tanimoto", "distance", "for", "two", "count", "fingerprints", "using", "method", "1", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java#L195-L210
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Form.java
Form.addTagID
public void addTagID(String tagID, String name) { """ Adds a tagId and name to the Form's focusMap. @param tagID the tagID of a child tag. @param name the name of a child tag. """ if (_focusMap == null) { _focusMap = new HashMap(); } _focusMap.put(tagID, name); }
java
public void addTagID(String tagID, String name) { if (_focusMap == null) { _focusMap = new HashMap(); } _focusMap.put(tagID, name); }
[ "public", "void", "addTagID", "(", "String", "tagID", ",", "String", "name", ")", "{", "if", "(", "_focusMap", "==", "null", ")", "{", "_focusMap", "=", "new", "HashMap", "(", ")", ";", "}", "_focusMap", ".", "put", "(", "tagID", ",", "name", ")", ...
Adds a tagId and name to the Form's focusMap. @param tagID the tagID of a child tag. @param name the name of a child tag.
[ "Adds", "a", "tagId", "and", "name", "to", "the", "Form", "s", "focusMap", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Form.java#L560-L566
alkacon/opencms-core
src/org/opencms/file/history/CmsHistoryResourceHandler.java
CmsHistoryResourceHandler.getHistoryResourceURI
public static String getHistoryResourceURI(String uri, ServletRequest req) { """ Appends the <code>version</code> parameter to the URI if needed.<p> @param uri the resource URI @param req the current request @return the same URI, with additional parameters in case of a historical request """ St...
java
public static String getHistoryResourceURI(String uri, ServletRequest req) { String histUri = uri; if (CmsHistoryResourceHandler.isHistoryRequest(req)) { String version = req.getParameter(CmsHistoryResourceHandler.PARAM_VERSION); histUri = CmsRequestUtil.appendParameter(uri, Cms...
[ "public", "static", "String", "getHistoryResourceURI", "(", "String", "uri", ",", "ServletRequest", "req", ")", "{", "String", "histUri", "=", "uri", ";", "if", "(", "CmsHistoryResourceHandler", ".", "isHistoryRequest", "(", "req", ")", ")", "{", "String", "ve...
Appends the <code>version</code> parameter to the URI if needed.<p> @param uri the resource URI @param req the current request @return the same URI, with additional parameters in case of a historical request
[ "Appends", "the", "<code", ">", "version<", "/", "code", ">", "parameter", "to", "the", "URI", "if", "needed", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/history/CmsHistoryResourceHandler.java#L91-L99
rometools/rome
rome/src/main/java/com/rometools/rome/feed/impl/CloneableBean.java
CloneableBean.beanClone
public static Object beanClone(Object obj, Set<String> ignoreProperties) throws CloneNotSupportedException { """ Makes a deep bean clone of the object passed in the constructor. <p> To be used by classes using CloneableBean in a delegation pattern, @return a clone of the object bean. @throws CloneNotSupporte...
java
public static Object beanClone(Object obj, Set<String> ignoreProperties) throws CloneNotSupportedException { final Class<?> clazz = obj.getClass(); try { final Object clonedBean = clazz.newInstance(); final List<PropertyDescriptor> propertyDescriptors = BeanIntrospector.getPr...
[ "public", "static", "Object", "beanClone", "(", "Object", "obj", ",", "Set", "<", "String", ">", "ignoreProperties", ")", "throws", "CloneNotSupportedException", "{", "final", "Class", "<", "?", ">", "clazz", "=", "obj", ".", "getClass", "(", ")", ";", "tr...
Makes a deep bean clone of the object passed in the constructor. <p> To be used by classes using CloneableBean in a delegation pattern, @return a clone of the object bean. @throws CloneNotSupportedException thrown if the object bean could not be cloned.
[ "Makes", "a", "deep", "bean", "clone", "of", "the", "object", "passed", "in", "the", "constructor", ".", "<p", ">", "To", "be", "used", "by", "classes", "using", "CloneableBean", "in", "a", "delegation", "pattern" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/feed/impl/CloneableBean.java#L76-L116
Azure/azure-sdk-for-java
storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/ManagementPoliciesInner.java
ManagementPoliciesInner.createOrUpdateAsync
public Observable<ManagementPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, ManagementPolicySchema policy) { """ Sets the managementpolicy to the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case ins...
java
public Observable<ManagementPolicyInner> createOrUpdateAsync(String resourceGroupName, String accountName, ManagementPolicySchema policy) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, policy).map(new Func1<ServiceResponse<ManagementPolicyInner>, ManagementPolicyInner>() { ...
[ "public", "Observable", "<", "ManagementPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "ManagementPolicySchema", "policy", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName",...
Sets the managementpolicy to the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 charac...
[ "Sets", "the", "managementpolicy", "to", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_11_01/src/main/java/com/microsoft/azure/management/storage/v2018_11_01/implementation/ManagementPoliciesInner.java#L199-L206
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.getPrivateKey
public char[] getPrivateKey() throws GeneralSecurityException, IOException { """ @return the encoded private key for this NKey @throws GeneralSecurityException if there is an encryption problem @throws IOException if there is a problem encoding the key """ if (privateKeyAsSeed == null)...
java
public char[] getPrivateKey() throws GeneralSecurityException, IOException { if (privateKeyAsSeed == null) { throw new IllegalStateException("Public-only NKey"); } DecodedSeed decoded = decodeSeed(privateKeyAsSeed); return encode(Type.PRIVATE, decoded.bytes); }
[ "public", "char", "[", "]", "getPrivateKey", "(", ")", "throws", "GeneralSecurityException", ",", "IOException", "{", "if", "(", "privateKeyAsSeed", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Public-only NKey\"", ")", ";", "}", "Dec...
@return the encoded private key for this NKey @throws GeneralSecurityException if there is an encryption problem @throws IOException if there is a problem encoding the key
[ "@return", "the", "encoded", "private", "key", "for", "this", "NKey" ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L716-L723
vipshop/vjtools
vjkit/src/main/java/com/vip/vjtools/vjkit/concurrent/threadpool/ThreadPoolUtil.java
ThreadPoolUtil.gracefulShutdown
public static boolean gracefulShutdown(@Nullable ExecutorService threadPool, int shutdownTimeoutMills) { """ 按照ExecutorService JavaDoc示例代码编写的Graceful Shutdown方法. 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. 如果1/2超时时间后, 则调用shutdownNow,取消在workQueue中Pending的任务,并中断所有阻塞函数. 如果1/2超时仍然超時,則強制退出. 另对在shutdown时线程本身被调用中断做了处理....
java
public static boolean gracefulShutdown(@Nullable ExecutorService threadPool, int shutdownTimeoutMills) { return threadPool == null || MoreExecutors.shutdownAndAwaitTermination(threadPool, shutdownTimeoutMills, TimeUnit.MILLISECONDS); }
[ "public", "static", "boolean", "gracefulShutdown", "(", "@", "Nullable", "ExecutorService", "threadPool", ",", "int", "shutdownTimeoutMills", ")", "{", "return", "threadPool", "==", "null", "||", "MoreExecutors", ".", "shutdownAndAwaitTermination", "(", "threadPool", ...
按照ExecutorService JavaDoc示例代码编写的Graceful Shutdown方法. 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. 如果1/2超时时间后, 则调用shutdownNow,取消在workQueue中Pending的任务,并中断所有阻塞函数. 如果1/2超时仍然超時,則強制退出. 另对在shutdown时线程本身被调用中断做了处理. 返回线程最后是否被中断. 使用了Guava的工具类 @see MoreExecutors#shutdownAndAwaitTermination(ExecutorService, long, TimeUnit)
[ "按照ExecutorService", "JavaDoc示例代码编写的Graceful", "Shutdown方法", "." ]
train
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjkit/src/main/java/com/vip/vjtools/vjkit/concurrent/threadpool/ThreadPoolUtil.java#L46-L49
Impetus/Kundera
src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java
CouchDBSchemaManager.createViewForSelectSpecificFields
private void createViewForSelectSpecificFields(Map<String, MapReduce> views) { """ Creates the view for select specific fields. @param views the views """ if (views.get(CouchDBConstants.FIELDS) == null) { MapReduce mapr = new MapReduce(); mapr.setMap("function(doc){f...
java
private void createViewForSelectSpecificFields(Map<String, MapReduce> views) { if (views.get(CouchDBConstants.FIELDS) == null) { MapReduce mapr = new MapReduce(); mapr.setMap("function(doc){for(field in doc){emit(field, doc[field]);}}"); views.put(CouchDBConstants...
[ "private", "void", "createViewForSelectSpecificFields", "(", "Map", "<", "String", ",", "MapReduce", ">", "views", ")", "{", "if", "(", "views", ".", "get", "(", "CouchDBConstants", ".", "FIELDS", ")", "==", "null", ")", "{", "MapReduce", "mapr", "=", "new...
Creates the view for select specific fields. @param views the views
[ "Creates", "the", "view", "for", "select", "specific", "fields", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java#L490-L498
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generateComments
private void generateComments(final Metadata m, final Element e) { """ Generation of comments tag. @param m source @param e element to attach new element to """ final Element commentsElements = new Element("comments", NS); for (final String comment : m.getComments()) { addNotNul...
java
private void generateComments(final Metadata m, final Element e) { final Element commentsElements = new Element("comments", NS); for (final String comment : m.getComments()) { addNotNullElement(commentsElements, "comment", comment); } if (!commentsElements.getChildren().isEmp...
[ "private", "void", "generateComments", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "final", "Element", "commentsElements", "=", "new", "Element", "(", "\"comments\"", ",", "NS", ")", ";", "for", "(", "final", "String", "comment", ...
Generation of comments tag. @param m source @param e element to attach new element to
[ "Generation", "of", "comments", "tag", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L276-L284
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/Traversal.java
Traversal.isApplicable
protected boolean isApplicable(AbstractElement<?, ?> result) { """ If the inventory configuration provided a {@link ResultFilter}, this calls it to tell whether provided element is applicable. If the result filter is not provided by the configuration, true will always be returned. @param result the potential r...
java
protected boolean isApplicable(AbstractElement<?, ?> result) { ResultFilter filter = context.configuration.getResultFilter(); return filter == null || filter.isApplicable(result); }
[ "protected", "boolean", "isApplicable", "(", "AbstractElement", "<", "?", ",", "?", ">", "result", ")", "{", "ResultFilter", "filter", "=", "context", ".", "configuration", ".", "getResultFilter", "(", ")", ";", "return", "filter", "==", "null", "||", "filte...
If the inventory configuration provided a {@link ResultFilter}, this calls it to tell whether provided element is applicable. If the result filter is not provided by the configuration, true will always be returned. @param result the potential result to be checked for applicability in the result set @return true or fal...
[ "If", "the", "inventory", "configuration", "provided", "a", "{", "@link", "ResultFilter", "}", "this", "calls", "it", "to", "tell", "whether", "provided", "element", "is", "applicable", ".", "If", "the", "result", "filter", "is", "not", "provided", "by", "th...
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/Traversal.java#L49-L52
alkacon/opencms-core
src-modules/org/opencms/workplace/list/CmsListDirectAction.java
CmsListDirectAction.resolveOnClic
protected String resolveOnClic(Locale locale) { """ Help method to resolve the on clic text to use.<p> @param locale the used locale @return the on clic text """ String confirmationMessage = getConfirmationMessage().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColu...
java
protected String resolveOnClic(Locale locale) { String confirmationMessage = getConfirmationMessage().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { confirmationMessage = new MessageFormat(confirmationMessage, locale).format( ...
[ "protected", "String", "resolveOnClic", "(", "Locale", "locale", ")", "{", "String", "confirmationMessage", "=", "getConfirmationMessage", "(", ")", ".", "key", "(", "locale", ")", ";", "if", "(", "(", "getColumnForTexts", "(", ")", "!=", "null", ")", "&&", ...
Help method to resolve the on clic text to use.<p> @param locale the used locale @return the on clic text
[ "Help", "method", "to", "resolve", "the", "on", "clic", "text", "to", "use", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/list/CmsListDirectAction.java#L84-L108
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.moveToBack
public void moveToBack(Object parent, String name) { """ Within a certain group, move an element to the back. All siblings will be rendered after this one. @param object The group wherein to search for the element. @param name The name of the element to move to the back. @since 1.10.0 """ Element pare...
java
public void moveToBack(Object parent, String name) { Element parentElement = getGroup(parent); if (parentElement == null) { throw new IllegalArgumentException("moveToBack failed: could not find parent group."); } Element element = getElement(parent, name); if (element == null) { throw new IllegalArgume...
[ "public", "void", "moveToBack", "(", "Object", "parent", ",", "String", "name", ")", "{", "Element", "parentElement", "=", "getGroup", "(", "parent", ")", ";", "if", "(", "parentElement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(...
Within a certain group, move an element to the back. All siblings will be rendered after this one. @param object The group wherein to search for the element. @param name The name of the element to move to the back. @since 1.10.0
[ "Within", "a", "certain", "group", "move", "an", "element", "to", "the", "back", ".", "All", "siblings", "will", "be", "rendered", "after", "this", "one", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L381-L395
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ClassUtils.java
ClassUtils.hasMethod
public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) { """ Determine whether the given class has a public method with the given signature. <p>Essentially translates {@code NoSuchMethodException} to "false". @param clazz the clazz to analyze @param methodName the name of the...
java
public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) { return (getMethodIfAvailable(clazz, methodName, paramTypes) != null); }
[ "public", "static", "boolean", "hasMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "paramTypes", ")", "{", "return", "(", "getMethodIfAvailable", "(", "clazz", ",", "methodName", ",", "paramTy...
Determine whether the given class has a public method with the given signature. <p>Essentially translates {@code NoSuchMethodException} to "false". @param clazz the clazz to analyze @param methodName the name of the method @param paramTypes the parameter types of the method @return whether the class has a corresponding...
[ "Determine", "whether", "the", "given", "class", "has", "a", "public", "method", "with", "the", "given", "signature", ".", "<p", ">", "Essentially", "translates", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ClassUtils.java#L614-L616
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java
EvaluationCalibration.getProbabilityHistogramAllClasses
public Histogram getProbabilityHistogramAllClasses() { """ Return a probability histogram for all predictions/classes. @return Probability histogram """ String title = "Network Probabilities Histogram - All Predictions and Classes"; int[] counts = probHistogramOverall.data().asInt(); ...
java
public Histogram getProbabilityHistogramAllClasses() { String title = "Network Probabilities Histogram - All Predictions and Classes"; int[] counts = probHistogramOverall.data().asInt(); return new Histogram(title, 0.0, 1.0, counts); }
[ "public", "Histogram", "getProbabilityHistogramAllClasses", "(", ")", "{", "String", "title", "=", "\"Network Probabilities Histogram - All Predictions and Classes\"", ";", "int", "[", "]", "counts", "=", "probHistogramOverall", ".", "data", "(", ")", ".", "asInt", "(",...
Return a probability histogram for all predictions/classes. @return Probability histogram
[ "Return", "a", "probability", "histogram", "for", "all", "predictions", "/", "classes", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java#L454-L458
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.exportCSV
public static long exportCSV(final File out, final Connection conn, final String querySQL) throws UncheckedSQLException, UncheckedIOException { """ Exports the data from database to CVS. Title will be added at the first line and columns will be quoted. @param out @param conn @param querySQL @return """ ...
java
public static long exportCSV(final File out, final Connection conn, final String querySQL) throws UncheckedSQLException, UncheckedIOException { return exportCSV(out, conn, querySQL, 0, Long.MAX_VALUE, true, true); }
[ "public", "static", "long", "exportCSV", "(", "final", "File", "out", ",", "final", "Connection", "conn", ",", "final", "String", "querySQL", ")", "throws", "UncheckedSQLException", ",", "UncheckedIOException", "{", "return", "exportCSV", "(", "out", ",", "conn"...
Exports the data from database to CVS. Title will be added at the first line and columns will be quoted. @param out @param conn @param querySQL @return
[ "Exports", "the", "data", "from", "database", "to", "CVS", ".", "Title", "will", "be", "added", "at", "the", "first", "line", "and", "columns", "will", "be", "quoted", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L691-L693
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
public static boolean getAt(BitSet self, int index) { """ Support the subscript operator for a Bitset @param self a BitSet @param index index to retrieve @return value of the bit at the given index @see java.util.BitSet @since 1.5.0 """ int i = normaliseIndex(index, self.length()); retu...
java
public static boolean getAt(BitSet self, int index) { int i = normaliseIndex(index, self.length()); return self.get(i); }
[ "public", "static", "boolean", "getAt", "(", "BitSet", "self", ",", "int", "index", ")", "{", "int", "i", "=", "normaliseIndex", "(", "index", ",", "self", ".", "length", "(", ")", ")", ";", "return", "self", ".", "get", "(", "i", ")", ";", "}" ]
Support the subscript operator for a Bitset @param self a BitSet @param index index to retrieve @return value of the bit at the given index @see java.util.BitSet @since 1.5.0
[ "Support", "the", "subscript", "operator", "for", "a", "Bitset" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L14043-L14046
lexs/webimageloader
webimageloader/src/main/java/com/webimageloader/Request.java
Request.forResource
public static Request forResource(Context c, int resId) { """ Create a request for a resource in /res. Note that this sets the SKIP_DISK_CACHE to skip disk cache @param c the context to use @param resId the resource if @return a request for this resource """ String url = createUrl(ContentResolv...
java
public static Request forResource(Context c, int resId) { String url = createUrl(ContentResolver.SCHEME_ANDROID_RESOURCE, c.getPackageName(), String.valueOf(resId)); return new Request(url).addFlag(Flag.SKIP_DISK_CACHE); }
[ "public", "static", "Request", "forResource", "(", "Context", "c", ",", "int", "resId", ")", "{", "String", "url", "=", "createUrl", "(", "ContentResolver", ".", "SCHEME_ANDROID_RESOURCE", ",", "c", ".", "getPackageName", "(", ")", ",", "String", ".", "value...
Create a request for a resource in /res. Note that this sets the SKIP_DISK_CACHE to skip disk cache @param c the context to use @param resId the resource if @return a request for this resource
[ "Create", "a", "request", "for", "a", "resource", "in", "/", "res", "." ]
train
https://github.com/lexs/webimageloader/blob/b29bac036a3855e2f0adf95d3391ee4bbc14457c/webimageloader/src/main/java/com/webimageloader/Request.java#L48-L51
prestodb/presto
presto-spi/src/main/java/com/facebook/presto/spi/predicate/SortedRangeSet.java
SortedRangeSet.of
static SortedRangeSet of(Range first, Range... rest) { """ Provided Ranges are unioned together to form the SortedRangeSet """ List<Range> rangeList = new ArrayList<>(rest.length + 1); rangeList.add(first); for (Range range : rest) { rangeList.add(range); } r...
java
static SortedRangeSet of(Range first, Range... rest) { List<Range> rangeList = new ArrayList<>(rest.length + 1); rangeList.add(first); for (Range range : rest) { rangeList.add(range); } return copyOf(first.getType(), rangeList); }
[ "static", "SortedRangeSet", "of", "(", "Range", "first", ",", "Range", "...", "rest", ")", "{", "List", "<", "Range", ">", "rangeList", "=", "new", "ArrayList", "<>", "(", "rest", ".", "length", "+", "1", ")", ";", "rangeList", ".", "add", "(", "firs...
Provided Ranges are unioned together to form the SortedRangeSet
[ "Provided", "Ranges", "are", "unioned", "together", "to", "form", "the", "SortedRangeSet" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-spi/src/main/java/com/facebook/presto/spi/predicate/SortedRangeSet.java#L87-L95
landawn/AbacusUtil
src/com/landawn/abacus/util/BooleanList.java
BooleanList.allMatch
public <E extends Exception> boolean allMatch(Try.BooleanPredicate<E> filter) throws E { """ Returns whether all elements of this List match the provided predicate. @param filter @return """ return allMatch(0, size(), filter); }
java
public <E extends Exception> boolean allMatch(Try.BooleanPredicate<E> filter) throws E { return allMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "allMatch", "(", "Try", ".", "BooleanPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "allMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether all elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "all", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/BooleanList.java#L841-L843
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java
TransactionSignature.calcSigHashValue
public static int calcSigHashValue(Transaction.SigHash mode, boolean anyoneCanPay) { """ Calculates the byte used in the protocol to represent the combination of mode and anyoneCanPay. """ Preconditions.checkArgument(SigHash.ALL == mode || SigHash.NONE == mode || SigHash.SINGLE == mode); // enforce com...
java
public static int calcSigHashValue(Transaction.SigHash mode, boolean anyoneCanPay) { Preconditions.checkArgument(SigHash.ALL == mode || SigHash.NONE == mode || SigHash.SINGLE == mode); // enforce compatibility since this code was made before the SigHash enum was updated int sighashFlags = mode.value; ...
[ "public", "static", "int", "calcSigHashValue", "(", "Transaction", ".", "SigHash", "mode", ",", "boolean", "anyoneCanPay", ")", "{", "Preconditions", ".", "checkArgument", "(", "SigHash", ".", "ALL", "==", "mode", "||", "SigHash", ".", "NONE", "==", "mode", ...
Calculates the byte used in the protocol to represent the combination of mode and anyoneCanPay.
[ "Calculates", "the", "byte", "used", "in", "the", "protocol", "to", "represent", "the", "combination", "of", "mode", "and", "anyoneCanPay", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java#L71-L77
rimerosolutions/ant-git-tasks
src/main/java/com/rimerosolutions/ant/git/GitSettings.java
GitSettings.setCredentials
public void setCredentials(String username, String password) { """ Sets the Git credentials @param username The username @param password The password """ if (GitTaskUtils.isNullOrBlankString(username) || GitTaskUtils.isNullOrBlankString(password)) { throw new Illegal...
java
public void setCredentials(String username, String password) { if (GitTaskUtils.isNullOrBlankString(username) || GitTaskUtils.isNullOrBlankString(password)) { throw new IllegalArgumentException("Credentials must not be empty."); } credentials = ne...
[ "public", "void", "setCredentials", "(", "String", "username", ",", "String", "password", ")", "{", "if", "(", "GitTaskUtils", ".", "isNullOrBlankString", "(", "username", ")", "||", "GitTaskUtils", ".", "isNullOrBlankString", "(", "password", ")", ")", "{", "...
Sets the Git credentials @param username The username @param password The password
[ "Sets", "the", "Git", "credentials" ]
train
https://github.com/rimerosolutions/ant-git-tasks/blob/bfb32fe68afe6b9dcfd0a5194497d748ef3e8a6f/src/main/java/com/rimerosolutions/ant/git/GitSettings.java#L38-L44
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java
WorkbooksInner.getAsync
public Observable<WorkbookInner> getAsync(String resourceGroupName, String resourceName) { """ Get a single workbook by its resourceName. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException throw...
java
public Observable<WorkbookInner> getAsync(String resourceGroupName, String resourceName) { return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<WorkbookInner>, WorkbookInner>() { @Override public WorkbookInner call(ServiceResponse<WorkbookInne...
[ "public", "Observable", "<", "WorkbookInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map", "(", "new", "Func1", ...
Get a single workbook by its resourceName. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the WorkbookInner object
[ "Get", "a", "single", "workbook", "by", "its", "resourceName", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkbooksInner.java#L308-L315
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/DirectUpdateDoublesSketch.java
DirectUpdateDoublesSketch.newInstance
static DirectUpdateDoublesSketch newInstance(final int k, final WritableMemory dstMem) { """ Obtains a new Direct instance of a DoublesSketch, which may be off-heap. @param k Parameter that controls space usage of sketch and accuracy of estimates. Must be greater than 1 and less than 65536 and a power of 2. @...
java
static DirectUpdateDoublesSketch newInstance(final int k, final WritableMemory dstMem) { // must be able to hold at least an empty sketch final long memCap = dstMem.getCapacity(); checkDirectMemCapacity(k, 0, memCap); //initialize dstMem dstMem.putLong(0, 0L); //clear pre0 insertPreLongs(dstMem...
[ "static", "DirectUpdateDoublesSketch", "newInstance", "(", "final", "int", "k", ",", "final", "WritableMemory", "dstMem", ")", "{", "// must be able to hold at least an empty sketch", "final", "long", "memCap", "=", "dstMem", ".", "getCapacity", "(", ")", ";", "checkD...
Obtains a new Direct instance of a DoublesSketch, which may be off-heap. @param k Parameter that controls space usage of sketch and accuracy of estimates. Must be greater than 1 and less than 65536 and a power of 2. @param dstMem the destination Memory that will be initialized to hold the data for this sketch. It must...
[ "Obtains", "a", "new", "Direct", "instance", "of", "a", "DoublesSketch", "which", "may", "be", "off", "-", "heap", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/DirectUpdateDoublesSketch.java#L59-L81
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getFromLastIncl
@Nullable public static String getFromLastIncl (@Nullable final String sStr, @Nullable final String sSearch) { """ Get everything from the string from and including the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @r...
java
@Nullable public static String getFromLastIncl (@Nullable final String sStr, @Nullable final String sSearch) { return _getFromLast (sStr, sSearch, true); }
[ "@", "Nullable", "public", "static", "String", "getFromLastIncl", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "return", "_getFromLast", "(", "sStr", ",", "sSearch", ",", "true", ")", ";", "...
Get everything from the string from and including the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @return <code>null</code> if the passed string does not contain the search string. If the search string is empty, the input string...
[ "Get", "everything", "from", "the", "string", "from", "and", "including", "the", "passed", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L5072-L5076
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyEncoder.java
KeyEncoder.emitDigit
private static void emitDigit(int value, byte[] dst, int dstOffset, int xorMask) { """ Emits a base-32768 digit using exactly two bytes. The first byte is in the range 32..202 and the second byte is in the range 32..223. @param value digit value in the range 0..32767 @param dst destination for encoded bytes ...
java
private static void emitDigit(int value, byte[] dst, int dstOffset, int xorMask) { // The first byte is computed as ((value / 192) + 32) and the second // byte is computed as ((value % 192) + 32). To speed things up a bit, // the integer division and remainder operations are replaced with a ...
[ "private", "static", "void", "emitDigit", "(", "int", "value", ",", "byte", "[", "]", "dst", ",", "int", "dstOffset", ",", "int", "xorMask", ")", "{", "// The first byte is computed as ((value / 192) + 32) and the second\r", "// byte is computed as ((value % 192) + 32). To ...
Emits a base-32768 digit using exactly two bytes. The first byte is in the range 32..202 and the second byte is in the range 32..223. @param value digit value in the range 0..32767 @param dst destination for encoded bytes @param dstOffset offset into destination array @param xorMask 0 for normal encoding, -1 for desce...
[ "Emits", "a", "base", "-", "32768", "digit", "using", "exactly", "two", "bytes", ".", "The", "first", "byte", "is", "in", "the", "range", "32", "..", "202", "and", "the", "second", "byte", "is", "in", "the", "range", "32", "..", "223", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyEncoder.java#L826-L847
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java
ExtensionUtil.instantiateClass
public static Object instantiateClass(String className, Class assignableFrom) { """ Utility method that helps instantiate a class used to extend the data grid. @param className the name of a class to instantiate @param assignableFrom the type that should be assignable from an instance of type <code>className</...
java
public static Object instantiateClass(String className, Class assignableFrom) { if(className == null) throw new IllegalArgumentException(Bundle.getErrorString("DataGridUtil_CantCreateClass")); Class clazz = null; try { clazz = Class.forName(className, false, Thread.curre...
[ "public", "static", "Object", "instantiateClass", "(", "String", "className", ",", "Class", "assignableFrom", ")", "{", "if", "(", "className", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "Bundle", ".", "getErrorString", "(", "\"DataGridUti...
Utility method that helps instantiate a class used to extend the data grid. @param className the name of a class to instantiate @param assignableFrom the type that should be assignable from an instance of type <code>className</code> @return an instance of the given class @throws org.apache.beehive.netui.databinding.da...
[ "Utility", "method", "that", "helps", "instantiate", "a", "class", "used", "to", "extend", "the", "data", "grid", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java#L44-L63
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/UnionPathIterator.java
UnionPathIterator.createUnionIterator
public static LocPathIterator createUnionIterator(Compiler compiler, int opPos) throws javax.xml.transform.TransformerException { """ This will return an iterator capable of handling the union of paths given. @param compiler The Compiler which is creating this expression. @param opPos The position o...
java
public static LocPathIterator createUnionIterator(Compiler compiler, int opPos) throws javax.xml.transform.TransformerException { // For the moment, I'm going to first create a full UnionPathIterator, and // then see if I can reduce it to a UnionChildIterator. It would obviously // be more effec...
[ "public", "static", "LocPathIterator", "createUnionIterator", "(", "Compiler", "compiler", ",", "int", "opPos", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "// For the moment, I'm going to first create a full UnionPathIterator, and ...
This will return an iterator capable of handling the union of paths given. @param compiler The Compiler which is creating this expression. @param opPos The position of this iterator in the opcode list from the compiler. @return Object that is derived from LocPathIterator. @throws javax.xml.transform.TransformerExcep...
[ "This", "will", "return", "an", "iterator", "capable", "of", "handling", "the", "union", "of", "paths", "given", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/UnionPathIterator.java#L179-L225