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
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/ObjectCacheUnitImpl.java
ObjectCacheUnitImpl.createEventSource
public EventSource createEventSource(boolean createAsyncEventSource, String cacheName) { """ This implements the method in the ServletCacheUnit interface. This method is used to initialize event source for invalidation listener @param createAsyncEventSource boolean true - using async thread context for callba...
java
public EventSource createEventSource(boolean createAsyncEventSource, String cacheName) { EventSource eventSource = new DCEventSource(cacheName, createAsyncEventSource); if (tc.isDebugEnabled()) Tr.debug(tc, "Using caller thread context for callback - cacheName= " + cacheName); retu...
[ "public", "EventSource", "createEventSource", "(", "boolean", "createAsyncEventSource", ",", "String", "cacheName", ")", "{", "EventSource", "eventSource", "=", "new", "DCEventSource", "(", "cacheName", ",", "createAsyncEventSource", ")", ";", "if", "(", "tc", ".", ...
This implements the method in the ServletCacheUnit interface. This method is used to initialize event source for invalidation listener @param createAsyncEventSource boolean true - using async thread context for callback; false - using caller thread for callback @param cacheName The cache name @return EventSourceIntf T...
[ "This", "implements", "the", "method", "in", "the", "ServletCacheUnit", "interface", ".", "This", "method", "is", "used", "to", "initialize", "event", "source", "for", "invalidation", "listener" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/ObjectCacheUnitImpl.java#L121-L128
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnGetReductionWorkspaceSize
public static int cudnnGetReductionWorkspaceSize( cudnnHandle handle, cudnnReduceTensorDescriptor reduceTensorDesc, cudnnTensorDescriptor aDesc, cudnnTensorDescriptor cDesc, long[] sizeInBytes) { """ Helper function to return the minimum size of the workspace to be passe...
java
public static int cudnnGetReductionWorkspaceSize( cudnnHandle handle, cudnnReduceTensorDescriptor reduceTensorDesc, cudnnTensorDescriptor aDesc, cudnnTensorDescriptor cDesc, long[] sizeInBytes) { return checkResult(cudnnGetReductionWorkspaceSizeNative(handle, redu...
[ "public", "static", "int", "cudnnGetReductionWorkspaceSize", "(", "cudnnHandle", "handle", ",", "cudnnReduceTensorDescriptor", "reduceTensorDesc", ",", "cudnnTensorDescriptor", "aDesc", ",", "cudnnTensorDescriptor", "cDesc", ",", "long", "[", "]", "sizeInBytes", ")", "{",...
Helper function to return the minimum size of the workspace to be passed to the reduction given the input and output tensors
[ "Helper", "function", "to", "return", "the", "minimum", "size", "of", "the", "workspace", "to", "be", "passed", "to", "the", "reduction", "given", "the", "input", "and", "output", "tensors" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L638-L646
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/MatcherLibrary.java
MatcherLibrary.getRelationFromSenseGlossMatchers
private char getRelationFromSenseGlossMatchers(List<ISense> sourceSenses, List<ISense> targetSenses) throws MatcherLibraryException { """ Returns semantic relation between two sets of senses by WordNet sense-based matchers. @param sourceSenses source senses @param targetSenses target senses @return semantic r...
java
private char getRelationFromSenseGlossMatchers(List<ISense> sourceSenses, List<ISense> targetSenses) throws MatcherLibraryException { char relation = IMappingElement.IDK; if (0 < senseGlossMatchers.size()) { for (ISense sourceSense : sourceSenses) { //noinspection LoopSta...
[ "private", "char", "getRelationFromSenseGlossMatchers", "(", "List", "<", "ISense", ">", "sourceSenses", ",", "List", "<", "ISense", ">", "targetSenses", ")", "throws", "MatcherLibraryException", "{", "char", "relation", "=", "IMappingElement", ".", "IDK", ";", "i...
Returns semantic relation between two sets of senses by WordNet sense-based matchers. @param sourceSenses source senses @param targetSenses target senses @return semantic relation between two sets of senses @throws MatcherLibraryException MatcherLibraryException
[ "Returns", "semantic", "relation", "between", "two", "sets", "of", "senses", "by", "WordNet", "sense", "-", "based", "matchers", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/MatcherLibrary.java#L228-L244
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java
QrPose3DUtils.setPair
private void setPair(int which, int row, int col, int N , Point2D_F64 pixel ) { """ Specifies PNP parameters for a single feature @param which Landmark's index @param row row in the QR code's grid coordinate system @param col column in the QR code's grid coordinate system @param N width of grid @param pixel...
java
private void setPair(int which, int row, int col, int N , Point2D_F64 pixel ) { set3D(row,col,N,point23.get(which).location); pixelToNorm.compute(pixel.x,pixel.y,point23.get(which).observation); }
[ "private", "void", "setPair", "(", "int", "which", ",", "int", "row", ",", "int", "col", ",", "int", "N", ",", "Point2D_F64", "pixel", ")", "{", "set3D", "(", "row", ",", "col", ",", "N", ",", "point23", ".", "get", "(", "which", ")", ".", "locat...
Specifies PNP parameters for a single feature @param which Landmark's index @param row row in the QR code's grid coordinate system @param col column in the QR code's grid coordinate system @param N width of grid @param pixel observed pixel coordinate of feature
[ "Specifies", "PNP", "parameters", "for", "a", "single", "feature" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrPose3DUtils.java#L149-L152
sagiegurari/fax4j
src/main/java/org/fax4j/common/ServiceFactory.java
ServiceFactory.createService
public static Service createService(String classNameKey,String defaultClassName,ConfigurationHolder configurationHolder,String propertyPart) { """ This function creates, initializes and returns new service objects. @param classNameKey The configuration key holding the service object class name @param defa...
java
public static Service createService(String classNameKey,String defaultClassName,ConfigurationHolder configurationHolder,String propertyPart) { //validate input if(configurationHolder==null) { throw new FaxException("Service configuration not provided."); } if(clas...
[ "public", "static", "Service", "createService", "(", "String", "classNameKey", ",", "String", "defaultClassName", ",", "ConfigurationHolder", "configurationHolder", ",", "String", "propertyPart", ")", "{", "//validate input", "if", "(", "configurationHolder", "==", "nul...
This function creates, initializes and returns new service objects. @param classNameKey The configuration key holding the service object class name @param defaultClassName The default service object class name if the value was not found in the configuration @param configurationHolder The configuration holder use...
[ "This", "function", "creates", "initializes", "and", "returns", "new", "service", "objects", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/ServiceFactory.java#L67-L103
landawn/AbacusUtil
src/com/landawn/abacus/util/Triple.java
Triple.setMiddleIf
public <E extends Exception> boolean setMiddleIf(final M newMiddle, Try.BiPredicate<? super Triple<L, M, R>, ? super M, E> predicate) throws E { """ Set to the specified <code>newMiddle</code> and returns <code>true</code> if <code>predicate</code> returns true. Otherwise returns <code>false</code> without setti...
java
public <E extends Exception> boolean setMiddleIf(final M newMiddle, Try.BiPredicate<? super Triple<L, M, R>, ? super M, E> predicate) throws E { if (predicate.test(this, newMiddle)) { this.middle = newMiddle; return true; } return false; }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "setMiddleIf", "(", "final", "M", "newMiddle", ",", "Try", ".", "BiPredicate", "<", "?", "super", "Triple", "<", "L", ",", "M", ",", "R", ">", ",", "?", "super", "M", ",", "E", ">", "predi...
Set to the specified <code>newMiddle</code> and returns <code>true</code> if <code>predicate</code> returns true. Otherwise returns <code>false</code> without setting the value to new value. @param newMiddle @param predicate - the first parameter is current pair, the second parameter is the <code>newMiddle</code> @ret...
[ "Set", "to", "the", "specified", "<code", ">", "newMiddle<", "/", "code", ">", "and", "returns", "<code", ">", "true<", "/", "code", ">", "if", "<code", ">", "predicate<", "/", "code", ">", "returns", "true", ".", "Otherwise", "returns", "<code", ">", ...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Triple.java#L156-L163
aerogear/aerogear-unifiedpush-server
push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java
AbstractJMSMessageProducer.sendNonTransacted
protected void sendNonTransacted(Destination destination, Serializable message) { """ Sends message to the destination in non-transactional manner. @param destination where to send @param message what to send Since non-transacted session is used, the message is send immediately without requiring to commit e...
java
protected void sendNonTransacted(Destination destination, Serializable message) { send(destination, message, null, null, false); }
[ "protected", "void", "sendNonTransacted", "(", "Destination", "destination", ",", "Serializable", "message", ")", "{", "send", "(", "destination", ",", "message", ",", "null", ",", "null", ",", "false", ")", ";", "}" ]
Sends message to the destination in non-transactional manner. @param destination where to send @param message what to send Since non-transacted session is used, the message is send immediately without requiring to commit enclosing transaction.
[ "Sends", "message", "to", "the", "destination", "in", "non", "-", "transactional", "manner", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/jms/AbstractJMSMessageProducer.java#L54-L56
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabasesInner.java
DatabasesInner.listUsagesAsync
public Observable<List<UsageInner>> listUsagesAsync(String resourceGroupName, String accountName, String databaseRid, String filter) { """ Retrieves the usages (most recent data) for the given database. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name...
java
public Observable<List<UsageInner>> listUsagesAsync(String resourceGroupName, String accountName, String databaseRid, String filter) { return listUsagesWithServiceResponseAsync(resourceGroupName, accountName, databaseRid, filter).map(new Func1<ServiceResponse<List<UsageInner>>, List<UsageInner>>() { ...
[ "public", "Observable", "<", "List", "<", "UsageInner", ">", ">", "listUsagesAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "databaseRid", ",", "String", "filter", ")", "{", "return", "listUsagesWithServiceResponseAsync", "(...
Retrieves the usages (most recent data) for the given database. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param databaseRid Cosmos DB database rid. @param filter An OData filter expression that describes a subset of usages to return. The supported pa...
[ "Retrieves", "the", "usages", "(", "most", "recent", "data", ")", "for", "the", "given", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabasesInner.java#L307-L314
zaproxy/zaproxy
src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java
ZapNTLMEngineImpl.createDESKey
private static Key createDESKey(final byte[] bytes, final int offset) { """ Creates a DES encryption key from the given key material. @param bytes A byte array containing the DES key material. @param offset The offset in the given byte array at which the 7-byte key material starts. @return A DES encrypti...
java
private static Key createDESKey(final byte[] bytes, final int offset) { final byte[] keyBytes = new byte[7]; System.arraycopy(bytes, offset, keyBytes, 0, 7); final byte[] material = new byte[8]; material[0] = keyBytes[0]; material[1] = (byte) (keyBytes[0] << 7 | (keyBytes[1] & 0x...
[ "private", "static", "Key", "createDESKey", "(", "final", "byte", "[", "]", "bytes", ",", "final", "int", "offset", ")", "{", "final", "byte", "[", "]", "keyBytes", "=", "new", "byte", "[", "7", "]", ";", "System", ".", "arraycopy", "(", "bytes", ","...
Creates a DES encryption key from the given key material. @param bytes A byte array containing the DES key material. @param offset The offset in the given byte array at which the 7-byte key material starts. @return A DES encryption key created from the key material starting at the specified offset in the given byte a...
[ "Creates", "a", "DES", "encryption", "key", "from", "the", "given", "key", "material", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/network/ZapNTLMEngineImpl.java#L1012-L1026
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/util/logging/LogParser.java
LogParser.getFilteredLinesFromFile
public static ArrayList<String> getFilteredLinesFromFile(final String fileName, final String filter) throws IOException { """ get lines from given file with specified filter. @param fileName @param filter @return @throws IOException """ return getFilteredLinesFromFile(fileName, filter, null, null...
java
public static ArrayList<String> getFilteredLinesFromFile(final String fileName, final String filter) throws IOException { return getFilteredLinesFromFile(fileName, filter, null, null); }
[ "public", "static", "ArrayList", "<", "String", ">", "getFilteredLinesFromFile", "(", "final", "String", "fileName", ",", "final", "String", "filter", ")", "throws", "IOException", "{", "return", "getFilteredLinesFromFile", "(", "fileName", ",", "filter", ",", "nu...
get lines from given file with specified filter. @param fileName @param filter @return @throws IOException
[ "get", "lines", "from", "given", "file", "with", "specified", "filter", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/util/logging/LogParser.java#L110-L113
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BooleanField.java
BooleanField.setValue
public int setValue(double value, boolean bDisplayOption, int iMoveMode) { """ Set the Value of this field as a double. For a boolean, 0 for false 1 for true. @param value The value of this field. @param iDisplayOption If true, display the new field. @param iMoveMove The move mode. @return An error code (NORM...
java
public int setValue(double value, boolean bDisplayOption, int iMoveMode) { // Set this field's value Boolean bField = Boolean.FALSE; if (value != 0) bField = Boolean.TRUE; int errorCode = this.setData(bField, bDisplayOption, iMoveMode); return errorCode; }
[ "public", "int", "setValue", "(", "double", "value", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "// Set this field's value", "Boolean", "bField", "=", "Boolean", ".", "FALSE", ";", "if", "(", "value", "!=", "0", ")", "bField", "=", ...
Set the Value of this field as a double. For a boolean, 0 for false 1 for true. @param value The value of this field. @param iDisplayOption If true, display the new field. @param iMoveMove The move mode. @return An error code (NORMAL_RETURN for success).
[ "Set", "the", "Value", "of", "this", "field", "as", "a", "double", ".", "For", "a", "boolean", "0", "for", "false", "1", "for", "true", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BooleanField.java#L240-L247
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java
BuildsInner.update
public BuildInner update(String resourceGroupName, String registryName, String buildId) { """ Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. @thro...
java
public BuildInner update(String resourceGroupName, String registryName, String buildId) { return updateWithServiceResponseAsync(resourceGroupName, registryName, buildId).toBlocking().last().body(); }
[ "public", "BuildInner", "update", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildId", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "buildId", ")", ".", "toBlocking", ...
Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if th...
[ "Patch", "the", "build", "properties", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java#L453-L455
MeetMe/font-compat
mock/src/main/java/android/graphics/FontFamily.java
FontFamily.addFontWeightStyle
@TargetApi(24) public boolean addFontWeightStyle(ByteBuffer buffer, int ttcIndex, List axes, int weight, boolean isItalic) { """ <pre>addFontWeightStyle(ByteBuffer, int ttcIndex, List&lt;axes&gt;, int weight, boolean isItalic)</pre> @since API Level 24 """ // Acceptable: ttcIndex==0, axes==empt...
java
@TargetApi(24) public boolean addFontWeightStyle(ByteBuffer buffer, int ttcIndex, List axes, int weight, boolean isItalic) { // Acceptable: ttcIndex==0, axes==emptyList throw new RuntimeException(); }
[ "@", "TargetApi", "(", "24", ")", "public", "boolean", "addFontWeightStyle", "(", "ByteBuffer", "buffer", ",", "int", "ttcIndex", ",", "List", "axes", ",", "int", "weight", ",", "boolean", "isItalic", ")", "{", "// Acceptable: ttcIndex==0, axes==emptyList", "thro...
<pre>addFontWeightStyle(ByteBuffer, int ttcIndex, List&lt;axes&gt;, int weight, boolean isItalic)</pre> @since API Level 24
[ "<pre", ">", "addFontWeightStyle", "(", "ByteBuffer", "int", "ttcIndex", "List&lt", ";", "axes&gt", ";", "int", "weight", "boolean", "isItalic", ")", "<", "/", "pre", ">" ]
train
https://github.com/MeetMe/font-compat/blob/db913e6533d02e1300177682e95d4a23ca47030f/mock/src/main/java/android/graphics/FontFamily.java#L51-L55
roboconf/roboconf-platform
core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/RabbitMqClientFactory.java
RabbitMqClientFactory.setConfiguration
public void setConfiguration( Dictionary<?,?> properties ) { """ Invoked by iPojo when one or several properties were updated from Config Admin. @param properties """ // Ignore iPojo properties final List<String> propertiesToSkip = Arrays.asList( "component", "felix.fileinstall.filename" ); //...
java
public void setConfiguration( Dictionary<?,?> properties ) { // Ignore iPojo properties final List<String> propertiesToSkip = Arrays.asList( "component", "felix.fileinstall.filename" ); // Convert the dictionary into a map Map<String,String> map = new LinkedHashMap<> (); for( Enumeration<?> en = pro...
[ "public", "void", "setConfiguration", "(", "Dictionary", "<", "?", ",", "?", ">", "properties", ")", "{", "// Ignore iPojo properties", "final", "List", "<", "String", ">", "propertiesToSkip", "=", "Arrays", ".", "asList", "(", "\"component\"", ",", "\"felix.fil...
Invoked by iPojo when one or several properties were updated from Config Admin. @param properties
[ "Invoked", "by", "iPojo", "when", "one", "or", "several", "properties", "were", "updated", "from", "Config", "Admin", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/RabbitMqClientFactory.java#L153-L178
threerings/nenya
core/src/main/java/com/threerings/util/BrowserUtil.java
BrowserUtil.browseURL
public static void browseURL (URL url, ResultListener<Void> listener, String genagent) { """ Opens the user's web browser with the specified URL. @param url the URL to display in an external browser. @param listener a listener to be notified if we failed to launch the browser. <em>Note:</em> it will not be no...
java
public static void browseURL (URL url, ResultListener<Void> listener, String genagent) { String[] cmd; if (RunAnywhere.isWindows()) { // TODO: test this on Vinders 98 // cmd = new String[] { "rundll32", "url.dll,FileProtocolHandler", // url.toString() }; ...
[ "public", "static", "void", "browseURL", "(", "URL", "url", ",", "ResultListener", "<", "Void", ">", "listener", ",", "String", "genagent", ")", "{", "String", "[", "]", "cmd", ";", "if", "(", "RunAnywhere", ".", "isWindows", "(", ")", ")", "{", "// TO...
Opens the user's web browser with the specified URL. @param url the URL to display in an external browser. @param listener a listener to be notified if we failed to launch the browser. <em>Note:</em> it will not be notified of success. @param genagent the path to the browser to execute on non-Windows, non-MacOS.
[ "Opens", "the", "user", "s", "web", "browser", "with", "the", "specified", "URL", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/BrowserUtil.java#L57-L94
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCameraRig.java
GVRCameraRig.setVec2
public void setVec2(String key, float x, float y) { """ Map a two-component {@code float} vector to {@code key}. @param key Key to map the vector to. @param x 'X' component of vector. @param y 'Y' component of vector. """ checkStringNotNullOrEmpty("key", key); NativeCameraRig.setVec2(ge...
java
public void setVec2(String key, float x, float y) { checkStringNotNullOrEmpty("key", key); NativeCameraRig.setVec2(getNative(), key, x, y); }
[ "public", "void", "setVec2", "(", "String", "key", ",", "float", "x", ",", "float", "y", ")", "{", "checkStringNotNullOrEmpty", "(", "\"key\"", ",", "key", ")", ";", "NativeCameraRig", ".", "setVec2", "(", "getNative", "(", ")", ",", "key", ",", "x", "...
Map a two-component {@code float} vector to {@code key}. @param key Key to map the vector to. @param x 'X' component of vector. @param y 'Y' component of vector.
[ "Map", "a", "two", "-", "component", "{", "@code", "float", "}", "vector", "to", "{", "@code", "key", "}", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCameraRig.java#L249-L252
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTemplate.java
WTemplate.addEngineOption
public void addEngineOption(final String key, final Object value) { """ Pass configuration options to the template engine. <p> The options are determined by the {@link TemplateRenderer} implementation for the template engine. </p> <p> The {@link TemplateRenderer} implemented is determined by the {@link Templa...
java
public void addEngineOption(final String key, final Object value) { if (Util.empty(key)) { throw new IllegalArgumentException("A key must be provided"); } TemplateModel model = getOrCreateComponentModel(); if (model.engineOptions == null) { model.engineOptions = new HashMap<>(); } model.engineOptions....
[ "public", "void", "addEngineOption", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "if", "(", "Util", ".", "empty", "(", "key", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A key must be provided\"", ")", ";"...
Pass configuration options to the template engine. <p> The options are determined by the {@link TemplateRenderer} implementation for the template engine. </p> <p> The {@link TemplateRenderer} implemented is determined by the {@link TemplateRendererFactory}. </p> @param key the engine option key @param value the engine...
[ "Pass", "configuration", "options", "to", "the", "template", "engine", ".", "<p", ">", "The", "options", "are", "determined", "by", "the", "{", "@link", "TemplateRenderer", "}", "implementation", "for", "the", "template", "engine", ".", "<", "/", "p", ">", ...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTemplate.java#L313-L322
liferay/com-liferay-commerce
commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java
CommerceTaxFixedRateAddressRelPersistenceImpl.findByCommerceTaxMethodId
@Override public List<CommerceTaxFixedRateAddressRel> findByCommerceTaxMethodId( long commerceTaxMethodId, int start, int end) { """ Returns a range of all the commerce tax fixed rate address rels where commerceTaxMethodId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</...
java
@Override public List<CommerceTaxFixedRateAddressRel> findByCommerceTaxMethodId( long commerceTaxMethodId, int start, int end) { return findByCommerceTaxMethodId(commerceTaxMethodId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceTaxFixedRateAddressRel", ">", "findByCommerceTaxMethodId", "(", "long", "commerceTaxMethodId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCommerceTaxMethodId", "(", "commerceTaxMethodId", ",", "s...
Returns a range of all the commerce tax fixed rate address rels where commerceTaxMethodId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers t...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "tax", "fixed", "rate", "address", "rels", "where", "commerceTaxMethodId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java#L147-L151
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
ExtendedMessageFormat.insertFormats
private String insertFormats(final String pattern, final ArrayList<String> customPatterns) { """ Insert formats back into the pattern for toPattern() support. @param pattern source @param customPatterns The custom patterns to re-insert, if any @return full pattern """ if (!containsElements(customP...
java
private String insertFormats(final String pattern, final ArrayList<String> customPatterns) { if (!containsElements(customPatterns)) { return pattern; } final StringBuilder sb = new StringBuilder(pattern.length() * 2); final ParsePosition pos = new ParsePosition(0); in...
[ "private", "String", "insertFormats", "(", "final", "String", "pattern", ",", "final", "ArrayList", "<", "String", ">", "customPatterns", ")", "{", "if", "(", "!", "containsElements", "(", "customPatterns", ")", ")", "{", "return", "pattern", ";", "}", "fina...
Insert formats back into the pattern for toPattern() support. @param pattern source @param customPatterns The custom patterns to re-insert, if any @return full pattern
[ "Insert", "formats", "back", "into", "the", "pattern", "for", "toPattern", "()", "support", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java#L406-L441
bazaarvoice/emodb
databus/src/main/java/com/bazaarvoice/emodb/databus/core/DefaultDatabus.java
DefaultDatabus.sortedTagUnion
private static List<List<String>> sortedTagUnion(@Nullable List<List<String>> existingTags, Set<String> newTagSet) { """ Produces a list-of-lists for all unique tag sets for a given databus event. <code>existingTags</code> must either be null or the result of a previous call to {@link #sortedTagUnion(java.util.L...
java
private static List<List<String>> sortedTagUnion(@Nullable List<List<String>> existingTags, Set<String> newTagSet) { return sortedTagUnion(existingTags, asSortedList(newTagSet)); }
[ "private", "static", "List", "<", "List", "<", "String", ">", ">", "sortedTagUnion", "(", "@", "Nullable", "List", "<", "List", "<", "String", ">", ">", "existingTags", ",", "Set", "<", "String", ">", "newTagSet", ")", "{", "return", "sortedTagUnion", "(...
Produces a list-of-lists for all unique tag sets for a given databus event. <code>existingTags</code> must either be null or the result of a previous call to {@link #sortedTagUnion(java.util.List, java.util.List)} or {@link #sortedTagUnion(java.util.List, java.util.Set)}.
[ "Produces", "a", "list", "-", "of", "-", "lists", "for", "all", "unique", "tag", "sets", "for", "a", "given", "databus", "event", ".", "<code", ">", "existingTags<", "/", "code", ">", "must", "either", "be", "null", "or", "the", "result", "of", "a", ...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/databus/src/main/java/com/bazaarvoice/emodb/databus/core/DefaultDatabus.java#L1249-L1251
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java
ModeledDirectoryObjectService.beforeDelete
protected void beforeDelete(ModeledAuthenticatedUser user, String identifier) throws GuacamoleException { """ Called before any object is deleted through this directory object service. This function serves as a final point of validation before the delete operation occurs. In its default implementatio...
java
protected void beforeDelete(ModeledAuthenticatedUser user, String identifier) throws GuacamoleException { // Verify permission to delete objects if (!hasObjectPermission(user, identifier, ObjectPermission.Type.DELETE)) throw new GuacamoleSecurityException("Permission denied."); ...
[ "protected", "void", "beforeDelete", "(", "ModeledAuthenticatedUser", "user", ",", "String", "identifier", ")", "throws", "GuacamoleException", "{", "// Verify permission to delete objects", "if", "(", "!", "hasObjectPermission", "(", "user", ",", "identifier", ",", "Ob...
Called before any object is deleted through this directory object service. This function serves as a final point of validation before the delete operation occurs. In its default implementation, beforeDelete() performs basic permissions checks. @param user The user deleting the existing object. @param identifier The i...
[ "Called", "before", "any", "object", "is", "deleted", "through", "this", "directory", "object", "service", ".", "This", "function", "serves", "as", "a", "final", "point", "of", "validation", "before", "the", "delete", "operation", "occurs", ".", "In", "its", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java#L300-L307
hageldave/ImagingKit
ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/ComplexImg.java
ComplexImg.getValue
public double getValue(int channel, int x, int y, int boundaryMode) { """ See {@link ColorImg#getValue(int, int, int, int)}. <p> Please Notice that when using {@link #CHANNEL_POWER}, this will not calculate the power in case it is not up to date. Use {@link #recomputePowerChannel()} to make sure this method yi...
java
public double getValue(int channel, int x, int y, int boundaryMode) { return delegate.getValue(channel, x, y, boundaryMode); }
[ "public", "double", "getValue", "(", "int", "channel", ",", "int", "x", ",", "int", "y", ",", "int", "boundaryMode", ")", "{", "return", "delegate", ".", "getValue", "(", "channel", ",", "x", ",", "y", ",", "boundaryMode", ")", ";", "}" ]
See {@link ColorImg#getValue(int, int, int, int)}. <p> Please Notice that when using {@link #CHANNEL_POWER}, this will not calculate the power in case it is not up to date. Use {@link #recomputePowerChannel()} to make sure this method yields reasonable results. @param channel one of {@link #CHANNEL_REAL},{@link #CHANNE...
[ "See", "{" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/ComplexImg.java#L255-L257
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java
HsqlTimer.addTask
protected Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { """ Adds to the task queue a new Task object encapsulating the supplied Runnable and scheduling arguments. @param first the time of the task's first execution @param runnable the...
java
protected Task addTask(final long first, final Runnable runnable, final long period, boolean relative) { if (this.isShutdown) { throw new IllegalStateException("shutdown"); } final Task task = new Task(first, runnable, period, relative); // sychr...
[ "protected", "Task", "addTask", "(", "final", "long", "first", ",", "final", "Runnable", "runnable", ",", "final", "long", "period", ",", "boolean", "relative", ")", "{", "if", "(", "this", ".", "isShutdown", ")", "{", "throw", "new", "IllegalStateException"...
Adds to the task queue a new Task object encapsulating the supplied Runnable and scheduling arguments. @param first the time of the task's first execution @param runnable the Runnable to execute @param period the task's periodicity @param relative if true, use fixed rate else use fixed delay scheduling @return an opaq...
[ "Adds", "to", "the", "task", "queue", "a", "new", "Task", "object", "encapsulating", "the", "supplied", "Runnable", "and", "scheduling", "arguments", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlTimer.java#L463-L479
graknlabs/grakn
daemon/GraknDaemon.java
GraknDaemon.assertEnvironment
private static void assertEnvironment(Path graknHome, Path graknProperties) { """ Basic environment checks. Grakn should only be ran if users are running Java 8, home folder can be detected, and the configuration file 'grakn.properties' exists. @param graknHome path to $GRAKN_HOME @param graknProperties...
java
private static void assertEnvironment(Path graknHome, Path graknProperties) { String javaVersion = System.getProperty("java.specification.version"); if (!javaVersion.equals("1.8")) { throw new RuntimeException(ErrorMessage.UNSUPPORTED_JAVA_VERSION.getMessage(javaVersion)); } ...
[ "private", "static", "void", "assertEnvironment", "(", "Path", "graknHome", ",", "Path", "graknProperties", ")", "{", "String", "javaVersion", "=", "System", ".", "getProperty", "(", "\"java.specification.version\"", ")", ";", "if", "(", "!", "javaVersion", ".", ...
Basic environment checks. Grakn should only be ran if users are running Java 8, home folder can be detected, and the configuration file 'grakn.properties' exists. @param graknHome path to $GRAKN_HOME @param graknProperties path to the 'grakn.properties' file
[ "Basic", "environment", "checks", ".", "Grakn", "should", "only", "be", "ran", "if", "users", "are", "running", "Java", "8", "home", "folder", "can", "be", "detected", "and", "the", "configuration", "file", "grakn", ".", "properties", "exists", "." ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/daemon/GraknDaemon.java#L94-L105
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java
NeedlessMemberCollectionSynchronization.visitClassContext
@Override public void visitClassContext(ClassContext classContext) { """ implements the visitor to clear the collectionFields and stack and to report collections that remain unmodified out of clinit or init @param classContext the context object of the currently parsed class """ try { ...
java
@Override public void visitClassContext(ClassContext classContext) { try { if ((collectionClass != null) && (mapClass != null)) { collectionFields = new HashMap<>(); aliases = new HashMap<>(); stack = new OpcodeStack(); JavaClass cl...
[ "@", "Override", "public", "void", "visitClassContext", "(", "ClassContext", "classContext", ")", "{", "try", "{", "if", "(", "(", "collectionClass", "!=", "null", ")", "&&", "(", "mapClass", "!=", "null", ")", ")", "{", "collectionFields", "=", "new", "Ha...
implements the visitor to clear the collectionFields and stack and to report collections that remain unmodified out of clinit or init @param classContext the context object of the currently parsed class
[ "implements", "the", "visitor", "to", "clear", "the", "collectionFields", "and", "stack", "and", "to", "report", "collections", "that", "remain", "unmodified", "out", "of", "clinit", "or", "init" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java#L106-L128
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AlertDto.java
AlertDto.transformToDto
public static AlertDto transformToDto(Alert alert) { """ Converts alert entity to alertDto. @param alert The alert object. Cannot be null. @return AlertDto object. @throws WebApplicationException If an error occurs. """ if (alert == null) { throw new WebApplicationException("...
java
public static AlertDto transformToDto(Alert alert) { if (alert == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } AlertDto result = createDtoObject(AlertDto.class, alert); result.setOwnerNam...
[ "public", "static", "AlertDto", "transformToDto", "(", "Alert", "alert", ")", "{", "if", "(", "alert", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be converted to Dto object.\"", ",", "Status", ".", "INTERNAL_SE...
Converts alert entity to alertDto. @param alert The alert object. Cannot be null. @return AlertDto object. @throws WebApplicationException If an error occurs.
[ "Converts", "alert", "entity", "to", "alertDto", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AlertDto.java#L77-L92
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsDocidNotFound
public FessMessages addErrorsDocidNotFound(String property, String arg0) { """ Add the created action message for the key 'errors.docid_not_found' with parameters. <pre> message: Not found Doc ID:{0} </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message...
java
public FessMessages addErrorsDocidNotFound(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_docid_not_found, arg0)); return this; }
[ "public", "FessMessages", "addErrorsDocidNotFound", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_docid_not_found", ",", "arg0", ")", ...
Add the created action message for the key 'errors.docid_not_found' with parameters. <pre> message: Not found Doc ID:{0} </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "docid_not_found", "with", "parameters", ".", "<pre", ">", "message", ":", "Not", "found", "Doc", "ID", ":", "{", "0", "}", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1477-L1481
pwittchen/ReactiveNetwork
library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/SocketInternetObservingStrategy.java
SocketInternetObservingStrategy.isConnected
protected boolean isConnected(final Socket socket, final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler) { """ checks if device is connected to given host at given port @param socket to connect @param host to connect @param port to connect @param timeoutInMs connect...
java
protected boolean isConnected(final Socket socket, final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler) { boolean isConnected; try { socket.connect(new InetSocketAddress(host, port), timeoutInMs); isConnected = socket.isConnected(); } catch (IOExceptio...
[ "protected", "boolean", "isConnected", "(", "final", "Socket", "socket", ",", "final", "String", "host", ",", "final", "int", "port", ",", "final", "int", "timeoutInMs", ",", "final", "ErrorHandler", "errorHandler", ")", "{", "boolean", "isConnected", ";", "tr...
checks if device is connected to given host at given port @param socket to connect @param host to connect @param port to connect @param timeoutInMs connection timeout @param errorHandler error handler for socket connection @return boolean true if connected and false if not
[ "checks", "if", "device", "is", "connected", "to", "given", "host", "at", "given", "port" ]
train
https://github.com/pwittchen/ReactiveNetwork/blob/cfeb3b79a1e44d106581af5e6709ff206e60c369/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/SocketInternetObservingStrategy.java#L123-L139
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
DnsClient.decodeDnsRecord
private static ADnsAnswer decodeDnsRecord(DnsRecord dnsRecord, boolean includeIpVersion) { """ Picks out the IP address and TTL from the answer response for each record. """ if (dnsRecord == null) { return null; } LOG.trace("Attempting to decode DNS record [{}]", dnsRecord...
java
private static ADnsAnswer decodeDnsRecord(DnsRecord dnsRecord, boolean includeIpVersion) { if (dnsRecord == null) { return null; } LOG.trace("Attempting to decode DNS record [{}]", dnsRecord); /* Read data from DNS record response. The data is a binary representation of th...
[ "private", "static", "ADnsAnswer", "decodeDnsRecord", "(", "DnsRecord", "dnsRecord", ",", "boolean", "includeIpVersion", ")", "{", "if", "(", "dnsRecord", "==", "null", ")", "{", "return", "null", ";", "}", "LOG", ".", "trace", "(", "\"Attempting to decode DNS r...
Picks out the IP address and TTL from the answer response for each record.
[ "Picks", "out", "the", "IP", "address", "and", "TTL", "from", "the", "answer", "response", "for", "each", "record", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java#L173-L219
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/json/simplifier/SimplifierExtractor.java
SimplifierExtractor.addExtractor
protected final void addExtractor(String pName, AttributeExtractor<T> pExtractor) { """ Add a single extractor @param pName name of the extractor @param pExtractor the extractor itself """ extractorMap.put(pName,pExtractor); }
java
protected final void addExtractor(String pName, AttributeExtractor<T> pExtractor) { extractorMap.put(pName,pExtractor); }
[ "protected", "final", "void", "addExtractor", "(", "String", "pName", ",", "AttributeExtractor", "<", "T", ">", "pExtractor", ")", "{", "extractorMap", ".", "put", "(", "pName", ",", "pExtractor", ")", ";", "}" ]
Add a single extractor @param pName name of the extractor @param pExtractor the extractor itself
[ "Add", "a", "single", "extractor" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/simplifier/SimplifierExtractor.java#L147-L149
Esri/spatial-framework-for-hadoop
hive/src/main/java/com/esri/hadoop/hive/GeometryUtils.java
GeometryUtils.setWKID
public static void setWKID(BytesWritable geomref, int wkid) { """ Sets the WKID (in place) for the given hive geometry bytes @param geomref reference to hive geometry bytes @param wkid """ ByteBuffer bb = ByteBuffer.allocate(4); bb.putInt(wkid); System.arraycopy(bb.array(), 0, geomref.getBytes(), ...
java
public static void setWKID(BytesWritable geomref, int wkid){ ByteBuffer bb = ByteBuffer.allocate(4); bb.putInt(wkid); System.arraycopy(bb.array(), 0, geomref.getBytes(), 0, SIZE_WKID); }
[ "public", "static", "void", "setWKID", "(", "BytesWritable", "geomref", ",", "int", "wkid", ")", "{", "ByteBuffer", "bb", "=", "ByteBuffer", ".", "allocate", "(", "4", ")", ";", "bb", ".", "putInt", "(", "wkid", ")", ";", "System", ".", "arraycopy", "(...
Sets the WKID (in place) for the given hive geometry bytes @param geomref reference to hive geometry bytes @param wkid
[ "Sets", "the", "WKID", "(", "in", "place", ")", "for", "the", "given", "hive", "geometry", "bytes" ]
train
https://github.com/Esri/spatial-framework-for-hadoop/blob/00959d6b4465313c934aaa8aaf17b52d6c9c60d4/hive/src/main/java/com/esri/hadoop/hive/GeometryUtils.java#L177-L181
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.java
BezelImageView.setSelectorColor
public void setSelectorColor(int selectorColor) { """ Sets the color of the selector to be draw over the CircularImageView. Be sure to provide some opacity. @param selectorColor The color (including alpha) to set for the selector overlay. """ this.mSelectorColor = selectorColor; this.mSelec...
java
public void setSelectorColor(int selectorColor) { this.mSelectorColor = selectorColor; this.mSelectorFilter = new PorterDuffColorFilter(Color.argb(mSelectorAlpha, Color.red(mSelectorColor), Color.green(mSelectorColor), Color.blue(mSelectorColor)), PorterDuff.Mode.SRC_ATOP); this.invalidate(); ...
[ "public", "void", "setSelectorColor", "(", "int", "selectorColor", ")", "{", "this", ".", "mSelectorColor", "=", "selectorColor", ";", "this", ".", "mSelectorFilter", "=", "new", "PorterDuffColorFilter", "(", "Color", ".", "argb", "(", "mSelectorAlpha", ",", "Co...
Sets the color of the selector to be draw over the CircularImageView. Be sure to provide some opacity. @param selectorColor The color (including alpha) to set for the selector overlay.
[ "Sets", "the", "color", "of", "the", "selector", "to", "be", "draw", "over", "the", "CircularImageView", ".", "Be", "sure", "to", "provide", "some", "opacity", "." ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/view/BezelImageView.java#L300-L304
Jasig/spring-portlet-contrib
spring-security-portlet-contrib/src/main/java/org/jasig/springframework/security/portlet/authentication/PortletPreAuthenticatedAuthenticationDetailsSource.java
PortletPreAuthenticatedAuthenticationDetailsSource.buildDetails
public PreAuthenticatedGrantedAuthoritiesPortletAuthenticationDetails buildDetails(PortletRequest context) { """ Builds the authentication details object. @see org.springframework.security.authentication.AuthenticationDetailsSource#buildDetails(Object) @param context a {@link javax.portlet.PortletRequest} obje...
java
public PreAuthenticatedGrantedAuthoritiesPortletAuthenticationDetails buildDetails(PortletRequest context) { Collection<? extends GrantedAuthority> userGas = buildGrantedAuthorities(context); PreAuthenticatedGrantedAuthoritiesPortletAuthenticationDetails result = new PreAuthenticatedGr...
[ "public", "PreAuthenticatedGrantedAuthoritiesPortletAuthenticationDetails", "buildDetails", "(", "PortletRequest", "context", ")", "{", "Collection", "<", "?", "extends", "GrantedAuthority", ">", "userGas", "=", "buildGrantedAuthorities", "(", "context", ")", ";", "PreAuthe...
Builds the authentication details object. @see org.springframework.security.authentication.AuthenticationDetailsSource#buildDetails(Object) @param context a {@link javax.portlet.PortletRequest} object. @return a {@link org.jasig.springframework.security.portlet.authentication.PreAuthenticatedGrantedAuthoritiesPortletA...
[ "Builds", "the", "authentication", "details", "object", "." ]
train
https://github.com/Jasig/spring-portlet-contrib/blob/719240fa268ddc69900ce9775d9cad3b9c543c6b/spring-security-portlet-contrib/src/main/java/org/jasig/springframework/security/portlet/authentication/PortletPreAuthenticatedAuthenticationDetailsSource.java#L93-L101
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java
BytecodeUtils.compareSoyEquals
public static Expression compareSoyEquals(final SoyExpression left, final SoyExpression right) { """ Compares two {@link SoyExpression}s for equality using soy == semantics. """ // We can special case when we know the types. // If either is a string, we run special logic so test for that first // o...
java
public static Expression compareSoyEquals(final SoyExpression left, final SoyExpression right) { // We can special case when we know the types. // If either is a string, we run special logic so test for that first // otherwise we special case primitives and eventually fall back to our runtime. SoyRuntim...
[ "public", "static", "Expression", "compareSoyEquals", "(", "final", "SoyExpression", "left", ",", "final", "SoyExpression", "right", ")", "{", "// We can special case when we know the types.", "// If either is a string, we run special logic so test for that first", "// otherwise we s...
Compares two {@link SoyExpression}s for equality using soy == semantics.
[ "Compares", "two", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java#L576-L603
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.saveReport
public static void saveReport(String xml, String path) { """ Write a xml text to a file at specified path @param xml xml text @param path file path """ FileOutputStream fos = null; try { fos = new FileOutputStream(path); fos.write(xml.getBytes("UTF-8")); fos.flush(); } catch (Exception ex)...
java
public static void saveReport(String xml, String path) { FileOutputStream fos = null; try { fos = new FileOutputStream(path); fos.write(xml.getBytes("UTF-8")); fos.flush(); } catch (Exception ex) { LOG.error(ex.getMessage(), ex); ex.printStackTrace(); } finally { if (fos != null) { try { ...
[ "public", "static", "void", "saveReport", "(", "String", "xml", ",", "String", "path", ")", "{", "FileOutputStream", "fos", "=", "null", ";", "try", "{", "fos", "=", "new", "FileOutputStream", "(", "path", ")", ";", "fos", ".", "write", "(", "xml", "."...
Write a xml text to a file at specified path @param xml xml text @param path file path
[ "Write", "a", "xml", "text", "to", "a", "file", "at", "specified", "path" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L238-L256
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/TransferQuotaPolicy.java
TransferQuotaPolicy.doFinalApply
protected void doFinalApply(IPolicyContext context, TransferQuotaConfig config, long downloadedBytes) { """ Called when everything is done (the last byte is written). This is used to record the # of bytes downloaded. @param context @param config @param downloadedBytes """ if (config.getDirection()...
java
protected void doFinalApply(IPolicyContext context, TransferQuotaConfig config, long downloadedBytes) { if (config.getDirection() == TransferDirectionType.download || config.getDirection() == TransferDirectionType.both) { final String bucketId = context.getAttribute(BUCKET_ID_ATTR, (String) null); ...
[ "protected", "void", "doFinalApply", "(", "IPolicyContext", "context", ",", "TransferQuotaConfig", "config", ",", "long", "downloadedBytes", ")", "{", "if", "(", "config", ".", "getDirection", "(", ")", "==", "TransferDirectionType", ".", "download", "||", "config...
Called when everything is done (the last byte is written). This is used to record the # of bytes downloaded. @param context @param config @param downloadedBytes
[ "Called", "when", "everything", "is", "done", "(", "the", "last", "byte", "is", "written", ")", ".", "This", "is", "used", "to", "record", "the", "#", "of", "bytes", "downloaded", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/TransferQuotaPolicy.java#L245-L259
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newSecurityException
public static SecurityException newSecurityException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link SecurityException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throw...
java
public static SecurityException newSecurityException(Throwable cause, String message, Object... args) { return new SecurityException(format(message, args), cause); }
[ "public", "static", "SecurityException", "newSecurityException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "SecurityException", "(", "format", "(", "message", ",", "args", ")", ",", "cause", "...
Constructs and initializes a new {@link SecurityException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link SecurityException} was thrown. @param message {@link String} describing t...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "SecurityException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L655-L657
Jasig/uPortal
uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java
FileSystemGroupStore.directoryContains
private boolean directoryContains(File directory, IGroupMember member) { """ Answers if <code>directory</code> contains <code>member</code>. A directory can only contain (other) groups. @param directory java.io.File @param member @return boolean """ boolean found = false; if (member.isGro...
java
private boolean directoryContains(File directory, IGroupMember member) { boolean found = false; if (member.isGroup()) { File memberFile = getFile((IEntityGroup) member); File[] files = directory.listFiles(); for (int i = 0; i < files.length & !found; i++) { ...
[ "private", "boolean", "directoryContains", "(", "File", "directory", ",", "IGroupMember", "member", ")", "{", "boolean", "found", "=", "false", ";", "if", "(", "member", ".", "isGroup", "(", ")", ")", "{", "File", "memberFile", "=", "getFile", "(", "(", ...
Answers if <code>directory</code> contains <code>member</code>. A directory can only contain (other) groups. @param directory java.io.File @param member @return boolean
[ "Answers", "if", "<code", ">", "directory<", "/", "code", ">", "contains", "<code", ">", "member<", "/", "code", ">", ".", "A", "directory", "can", "only", "contain", "(", "other", ")", "groups", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java#L884-L894
apache/incubator-gobblin
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java
MD5Digest.fromBytes
public static MD5Digest fromBytes(byte[] md5Bytes, int offset) { """ Static method to get an MD5Digest from a binary byte representation. @param md5Bytes @param offset in the byte array to start reading from @return a filled out MD5Digest """ byte[] md5BytesCopy = Arrays.copyOfRange(md5Bytes, offset, of...
java
public static MD5Digest fromBytes(byte[] md5Bytes, int offset) { byte[] md5BytesCopy = Arrays.copyOfRange(md5Bytes, offset, offset + MD5_BYTES_LENGTH); //TODO: Replace this with a version that encodes without needing a copy. String md5String = Hex.encodeHexString(md5BytesCopy); return new MD5Digest(md5S...
[ "public", "static", "MD5Digest", "fromBytes", "(", "byte", "[", "]", "md5Bytes", ",", "int", "offset", ")", "{", "byte", "[", "]", "md5BytesCopy", "=", "Arrays", ".", "copyOfRange", "(", "md5Bytes", ",", "offset", ",", "offset", "+", "MD5_BYTES_LENGTH", ")...
Static method to get an MD5Digest from a binary byte representation. @param md5Bytes @param offset in the byte array to start reading from @return a filled out MD5Digest
[ "Static", "method", "to", "get", "an", "MD5Digest", "from", "a", "binary", "byte", "representation", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/serialize/MD5Digest.java#L86-L91
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestClient.java
RestClient.isStatusCodeOK
private boolean isStatusCodeOK(Response response, String uri) { """ Checks if is status code ok. @param response the response @param uri the uri @return true, if is status code ok """ if (response.getStatus() == Status.OK.getStatusCode() || response.getStatus() == Status.CREATED.getStatusCode()) {...
java
private boolean isStatusCodeOK(Response response, String uri) { if (response.getStatus() == Status.OK.getStatusCode() || response.getStatus() == Status.CREATED.getStatusCode()) { return true; } else if (response.getStatus() == Status.UNAUTHORIZED.getStatusCode()) { throw new NotAuthorizedException("UNAUTH...
[ "private", "boolean", "isStatusCodeOK", "(", "Response", "response", ",", "String", "uri", ")", "{", "if", "(", "response", ".", "getStatus", "(", ")", "==", "Status", ".", "OK", ".", "getStatusCode", "(", ")", "||", "response", ".", "getStatus", "(", ")...
Checks if is status code ok. @param response the response @param uri the uri @return true, if is status code ok
[ "Checks", "if", "is", "status", "code", "ok", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestClient.java#L180-L196
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java
CaptureActivityIntents.setSizeOfScanningRectangleInPx
public static void setSizeOfScanningRectangleInPx(Intent intent, int width, int height) { """ Set optional parameters to specify the width and height of the scanning rectangle in pixels to {@code Intent}. @param intent Target intent. @param width Width of scanning rectangle in pixels. @param height Height of s...
java
public static void setSizeOfScanningRectangleInPx(Intent intent, int width, int height) { intent.putExtra(Intents.Scan.WIDTH, width); intent.putExtra(Intents.Scan.HEIGHT, height); }
[ "public", "static", "void", "setSizeOfScanningRectangleInPx", "(", "Intent", "intent", ",", "int", "width", ",", "int", "height", ")", "{", "intent", ".", "putExtra", "(", "Intents", ".", "Scan", ".", "WIDTH", ",", "width", ")", ";", "intent", ".", "putExt...
Set optional parameters to specify the width and height of the scanning rectangle in pixels to {@code Intent}. @param intent Target intent. @param width Width of scanning rectangle in pixels. @param height Height of scanning rectangle in pixels.
[ "Set", "optional", "parameters", "to", "specify", "the", "width", "and", "height", "of", "the", "scanning", "rectangle", "in", "pixels", "to", "{" ]
train
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java#L164-L167
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ResourceCopy.java
ResourceCopy.copyInstances
public static void copyInstances(AbstractWisdomMojo mojo, MavenResourcesFiltering filtering) throws IOException { """ Copies the `cfg` files from `src/main/instances` to the Wisdom application directory. @param mojo the mojo @param filtering the filtering support @throws IOException if file cannot be cop...
java
public static void copyInstances(AbstractWisdomMojo mojo, MavenResourcesFiltering filtering) throws IOException { File in = new File(mojo.basedir, Constants.INSTANCES_SRC_DIR); if (in.isDirectory()) { File out = new File(mojo.getWisdomRootDirectory(), Constants.APPLICATION_DIR); ...
[ "public", "static", "void", "copyInstances", "(", "AbstractWisdomMojo", "mojo", ",", "MavenResourcesFiltering", "filtering", ")", "throws", "IOException", "{", "File", "in", "=", "new", "File", "(", "mojo", ".", "basedir", ",", "Constants", ".", "INSTANCES_SRC_DIR...
Copies the `cfg` files from `src/main/instances` to the Wisdom application directory. @param mojo the mojo @param filtering the filtering support @throws IOException if file cannot be copied
[ "Copies", "the", "cfg", "files", "from", "src", "/", "main", "/", "instances", "to", "the", "Wisdom", "application", "directory", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ResourceCopy.java#L286-L292
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocoludp_stats.java
protocoludp_stats.get_nitro_response
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { """ <pre> converts nitro response into object and returns the object array in case of get request. </pre> """ protocoludp_stats[] resources = new protocoludp_stats[1]; protocoludp_response result = (pr...
java
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { protocoludp_stats[] resources = new protocoludp_stats[1]; protocoludp_response result = (protocoludp_response) service.get_payload_formatter().string_to_resource(protocoludp_response.class, response); if(result...
[ "protected", "base_resource", "[", "]", "get_nitro_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "protocoludp_stats", "[", "]", "resources", "=", "new", "protocoludp_stats", "[", "1", "]", ";", "protocoludp...
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "converts", "nitro", "response", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocoludp_stats.java#L184-L203
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java
PactDslJsonArray.arrayMinLike
public static PactDslJsonArray arrayMinLike(int minSize, int numberExamples, PactDslJsonRootValue value) { """ Root level array with minimum size where each item must match the provided matcher @param minSize minimum size @param numberExamples Number of examples to generate """ if (numberExamples < minSi...
java
public static PactDslJsonArray arrayMinLike(int minSize, int numberExamples, PactDslJsonRootValue value) { if (numberExamples < minSize) { throw new IllegalArgumentException(String.format("Number of example %d is less than the minimum size of %d", numberExamples, minSize)); } PactDslJsonArray ...
[ "public", "static", "PactDslJsonArray", "arrayMinLike", "(", "int", "minSize", ",", "int", "numberExamples", ",", "PactDslJsonRootValue", "value", ")", "{", "if", "(", "numberExamples", "<", "minSize", ")", "{", "throw", "new", "IllegalArgumentException", "(", "St...
Root level array with minimum size where each item must match the provided matcher @param minSize minimum size @param numberExamples Number of examples to generate
[ "Root", "level", "array", "with", "minimum", "size", "where", "each", "item", "must", "match", "the", "provided", "matcher" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java#L802-L812
alkacon/opencms-core
src/org/opencms/main/CmsStaticResourceHandler.java
CmsStaticResourceHandler.getStaticResourceContext
public static String getStaticResourceContext(String opencmsContext, String opencmsVersion) { """ Returns the context for static resources served from the class path, e.g. "/opencms/handleStatic/v5976v".<p> @param opencmsContext the OpenCms context @param opencmsVersion the OpenCms version @return the stati...
java
public static String getStaticResourceContext(String opencmsContext, String opencmsVersion) { return opencmsContext + STATIC_RESOURCE_PREFIX + "/v" + opencmsVersion.hashCode() + "v"; }
[ "public", "static", "String", "getStaticResourceContext", "(", "String", "opencmsContext", ",", "String", "opencmsVersion", ")", "{", "return", "opencmsContext", "+", "STATIC_RESOURCE_PREFIX", "+", "\"/v\"", "+", "opencmsVersion", ".", "hashCode", "(", ")", "+", "\"...
Returns the context for static resources served from the class path, e.g. "/opencms/handleStatic/v5976v".<p> @param opencmsContext the OpenCms context @param opencmsVersion the OpenCms version @return the static resource context
[ "Returns", "the", "context", "for", "static", "resources", "served", "from", "the", "class", "path", "e", ".", "g", ".", "/", "opencms", "/", "handleStatic", "/", "v5976v", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsStaticResourceHandler.java#L85-L88
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.localSeo_directoriesList_GET
public OvhDirectoriesList localSeo_directoriesList_GET(OvhCountryEnum country, net.minidev.ovh.api.hosting.web.localseo.location.OvhOfferEnum offer) throws IOException { """ Get list of directories associated to a local SEO offer and a country REST: GET /hosting/web/localSeo/directoriesList @param offer [requi...
java
public OvhDirectoriesList localSeo_directoriesList_GET(OvhCountryEnum country, net.minidev.ovh.api.hosting.web.localseo.location.OvhOfferEnum offer) throws IOException { String qPath = "/hosting/web/localSeo/directoriesList"; StringBuilder sb = path(qPath); query(sb, "country", country); query(sb, "offer", offe...
[ "public", "OvhDirectoriesList", "localSeo_directoriesList_GET", "(", "OvhCountryEnum", "country", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "hosting", ".", "web", ".", "localseo", ".", "location", ".", "OvhOfferEnum", "offer", ")", "throws", "IOEx...
Get list of directories associated to a local SEO offer and a country REST: GET /hosting/web/localSeo/directoriesList @param offer [required] Local SEO offer @param country [required] Country of the location
[ "Get", "list", "of", "directories", "associated", "to", "a", "local", "SEO", "offer", "and", "a", "country" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L2230-L2237
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/FastByteArrayOutputStream.java
FastByteArrayOutputStream.writeToImpl
private void writeToImpl(Writer out, String encoding, byte[] bufferToWrite, int bufferToWriteLen) throws IOException { """ Write <code>bufferToWriteLen</code> of bytes from <code>bufferToWrite</code> to <code>out</code> encoding it at the same time. @param out @param encoding @param bufferToWrite...
java
private void writeToImpl(Writer out, String encoding, byte[] bufferToWrite, int bufferToWriteLen) throws IOException { String writeStr; if (encoding != null) { writeStr = new String(bufferToWrite, 0, bufferToWriteLen, encoding); } else { writeStr = new String(...
[ "private", "void", "writeToImpl", "(", "Writer", "out", ",", "String", "encoding", ",", "byte", "[", "]", "bufferToWrite", ",", "int", "bufferToWriteLen", ")", "throws", "IOException", "{", "String", "writeStr", ";", "if", "(", "encoding", "!=", "null", ")",...
Write <code>bufferToWriteLen</code> of bytes from <code>bufferToWrite</code> to <code>out</code> encoding it at the same time. @param out @param encoding @param bufferToWrite @param bufferToWriteLen @throws IOException
[ "Write", "<code", ">", "bufferToWriteLen<", "/", "code", ">", "of", "bytes", "from", "<code", ">", "bufferToWrite<", "/", "code", ">", "to", "<code", ">", "out<", "/", "code", ">", "encoding", "it", "at", "the", "same", "time", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/FastByteArrayOutputStream.java#L249-L258
Dempsy/dempsy
dempsy-framework.api/src/main/java/net/dempsy/lifecycle/annotation/internal/AnnotatedMethodInvoker.java
AnnotatedMethodInvoker.invokeSetter
public Object invokeSetter(final Object instance, final Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { """ Invokes the annotated setter appropriate to the passed value (must not be <code>null</code>). @throws IllegalArgumentException if there is n...
java
public Object invokeSetter(final Object instance, final Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { final Class<?> valueClass = value.getClass(); final Method method = getInvokableMethodForClass(valueClass); if (method == null) {...
[ "public", "Object", "invokeSetter", "(", "final", "Object", "instance", ",", "final", "Object", "value", ")", "throws", "IllegalArgumentException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "final", "Class", "<", "?", ">", "valueClass", "...
Invokes the annotated setter appropriate to the passed value (must not be <code>null</code>). @throws IllegalArgumentException if there is no annotated method appropriate to the value @throws IllegalAccessException if unable to invoke the annotated method @throws InvocationTargetException if the invoked method threw a...
[ "Invokes", "the", "annotated", "setter", "appropriate", "to", "the", "passed", "value", "(", "must", "not", "be", "<code", ">", "null<", "/", "code", ">", ")", "." ]
train
https://github.com/Dempsy/dempsy/blob/cd3415b51b6787a6a9d9589b15f00ce674b6f113/dempsy-framework.api/src/main/java/net/dempsy/lifecycle/annotation/internal/AnnotatedMethodInvoker.java#L118-L129
meltmedia/cadmium
persistence/src/main/java/com/meltmedia/cadmium/persistence/CadmiumPersistenceProvider.java
CadmiumPersistenceProvider.createEntityManagerFactory
@SuppressWarnings("rawtypes") @Override public EntityManagerFactory createEntityManagerFactory(String emName, Map properties) { """ Uses Hibernate's Reflections and the properties map to override defaults to create a EntityManagerFactory without the need of any persistence.xml file. """ PersistenceUni...
java
@SuppressWarnings("rawtypes") @Override public EntityManagerFactory createEntityManagerFactory(String emName, Map properties) { PersistenceUnitInfo pUnit = new CadmiumPersistenceUnitInfo() ; return createContainerEntityManagerFactory(pUnit, properties); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "@", "Override", "public", "EntityManagerFactory", "createEntityManagerFactory", "(", "String", "emName", ",", "Map", "properties", ")", "{", "PersistenceUnitInfo", "pUnit", "=", "new", "CadmiumPersistenceUnitInfo", "("...
Uses Hibernate's Reflections and the properties map to override defaults to create a EntityManagerFactory without the need of any persistence.xml file.
[ "Uses", "Hibernate", "s", "Reflections", "and", "the", "properties", "map", "to", "override", "defaults", "to", "create", "a", "EntityManagerFactory", "without", "the", "need", "of", "any", "persistence", ".", "xml", "file", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/persistence/src/main/java/com/meltmedia/cadmium/persistence/CadmiumPersistenceProvider.java#L91-L96
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.orthoSymmetric
public Matrix4f orthoSymmetric(float width, float height, float zNear, float zFar, Matrix4f dest) { """ Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> ...
java
public Matrix4f orthoSymmetric(float width, float height, float zNear, float zFar, Matrix4f dest) { return orthoSymmetric(width, height, zNear, zFar, false, dest); }
[ "public", "Matrix4f", "orthoSymmetric", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ",", "Matrix4f", "dest", ")", "{", "return", "orthoSymmetric", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", ...
Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #ortho(float, float, float, float, float, float, Matrix4f) ortho()} ...
[ "Apply", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/", "code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L7398-L7400
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getArgumentSlot
public int getArgumentSlot(int i, int numArguments) { """ Get the stack slot that will contain given method argument. Assumes that this frame is at the location (just before) a method invocation instruction. @param i the argument index: 0 for first arg, etc. @param numArguments total number of arguments to...
java
public int getArgumentSlot(int i, int numArguments) { if (i >= numArguments) { throw new IllegalArgumentException(); } return (slotList.size() - numArguments) + i; }
[ "public", "int", "getArgumentSlot", "(", "int", "i", ",", "int", "numArguments", ")", "{", "if", "(", "i", ">=", "numArguments", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "return", "(", "slotList", ".", "size", "(", ")", ...
Get the stack slot that will contain given method argument. Assumes that this frame is at the location (just before) a method invocation instruction. @param i the argument index: 0 for first arg, etc. @param numArguments total number of arguments to the called method @return slot containing the argument value
[ "Get", "the", "stack", "slot", "that", "will", "contain", "given", "method", "argument", ".", "Assumes", "that", "this", "frame", "is", "at", "the", "location", "(", "just", "before", ")", "a", "method", "invocation", "instruction", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L425-L431
google/closure-compiler
src/com/google/javascript/jscomp/OptimizeArgumentsArray.java
OptimizeArgumentsArray.changeBody
private void changeBody(ImmutableMap<Integer, String> argNames) { """ Performs the replacement of arguments[x] -> a if x is known. @param argNames maps param index to param name, if the param with that index has a name. """ for (Node ref : currentArgumentsAccesses) { Node index = ref.getNext(); ...
java
private void changeBody(ImmutableMap<Integer, String> argNames) { for (Node ref : currentArgumentsAccesses) { Node index = ref.getNext(); Node parent = ref.getParent(); int value = (int) index.getDouble(); // This was validated earlier. @Nullable String name = argNames.get(value); if ...
[ "private", "void", "changeBody", "(", "ImmutableMap", "<", "Integer", ",", "String", ">", "argNames", ")", "{", "for", "(", "Node", "ref", ":", "currentArgumentsAccesses", ")", "{", "Node", "index", "=", "ref", ".", "getNext", "(", ")", ";", "Node", "par...
Performs the replacement of arguments[x] -> a if x is known. @param argNames maps param index to param name, if the param with that index has a name.
[ "Performs", "the", "replacement", "of", "arguments", "[", "x", "]", "-", ">", "a", "if", "x", "is", "known", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/OptimizeArgumentsArray.java#L248-L264
google/Accessibility-Test-Framework-for-Android
src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java
ScreenshotUtils.writeBitmapToCache
public static File writeBitmapToCache(Context context, Bitmap bitmap, String dir, String filename) { """ Writes a {@link Bitmap} object to a file in the current context's cache directory. @param context The current context. @param bitmap The bitmap object to output. @param dir The output directory nam...
java
public static File writeBitmapToCache(Context context, Bitmap bitmap, String dir, String filename) { if ((bitmap == null) || TextUtils.isEmpty(dir) || TextUtils.isEmpty(filename)) { return null; } final File dirFile = new File(context.getCacheDir(), dir); return write...
[ "public", "static", "File", "writeBitmapToCache", "(", "Context", "context", ",", "Bitmap", "bitmap", ",", "String", "dir", ",", "String", "filename", ")", "{", "if", "(", "(", "bitmap", "==", "null", ")", "||", "TextUtils", ".", "isEmpty", "(", "dir", "...
Writes a {@link Bitmap} object to a file in the current context's cache directory. @param context The current context. @param bitmap The bitmap object to output. @param dir The output directory name within the cache directory. @param filename The name of the file to output. @return A file where the Bitmap was stored, ...
[ "Writes", "a", "{", "@link", "Bitmap", "}", "object", "to", "a", "file", "in", "the", "current", "context", "s", "cache", "directory", "." ]
train
https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java#L212-L219
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/event/task/EventNotificationManager.java
EventNotificationManager.unsubscribeFromEvent
public void unsubscribeFromEvent(final EventListener eventListener, final Class<? extends AbstractEvent> eventType) { """ Removes a subscription of an {@link EventListener} object for the given event type. @param eventListener the event listener to remove the subscription for @param eventType the event type ...
java
public void unsubscribeFromEvent(final EventListener eventListener, final Class<? extends AbstractEvent> eventType) { synchronized (this.subscriptions) { List<EventListener> subscribers = this.subscriptions.get(eventType); if (subscribers == null) { return; } subscribers.remove(eventListener); if...
[ "public", "void", "unsubscribeFromEvent", "(", "final", "EventListener", "eventListener", ",", "final", "Class", "<", "?", "extends", "AbstractEvent", ">", "eventType", ")", "{", "synchronized", "(", "this", ".", "subscriptions", ")", "{", "List", "<", "EventLis...
Removes a subscription of an {@link EventListener} object for the given event type. @param eventListener the event listener to remove the subscription for @param eventType the event type to remove the subscription for
[ "Removes", "a", "subscription", "of", "an", "{", "@link", "EventListener", "}", "object", "for", "the", "given", "event", "type", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/event/task/EventNotificationManager.java#L65-L79
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.updatePhraseListWithServiceResponseAsync
public Observable<ServiceResponse<OperationStatus>> updatePhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId, UpdatePhraseListOptionalParameter updatePhraseListOptionalParameter) { """ Updates the phrases, the state and the name of the phraselist feature. @param appId The applicat...
java
public Observable<ServiceResponse<OperationStatus>> updatePhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId, UpdatePhraseListOptionalParameter updatePhraseListOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this...
[ "public", "Observable", "<", "ServiceResponse", "<", "OperationStatus", ">", ">", "updatePhraseListWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "int", "phraselistId", ",", "UpdatePhraseListOptionalParameter", "updatePhraseListOptionalParam...
Updates the phrases, the state and the name of the phraselist feature. @param appId The application ID. @param versionId The version ID. @param phraselistId The ID of the feature to be updated. @param updatePhraseListOptionalParameter the object representing the optional parameters to be set before calling this API @t...
[ "Updates", "the", "phrases", "the", "state", "and", "the", "name", "of", "the", "phraselist", "feature", "." ]
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/FeaturesImpl.java#L694-L707
cdk/cdk
base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java
Reaction.setReactantCoefficient
@Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { """ Sets the coefficient of a a reactant to a given value. @param reactant Reactant for which the coefficient is set @param coefficient The new coefficient for the given reactant @return true if Molecule...
java
@Override public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient) { boolean result = reactants.setMultiplier(reactant, coefficient); return result; }
[ "@", "Override", "public", "boolean", "setReactantCoefficient", "(", "IAtomContainer", "reactant", ",", "Double", "coefficient", ")", "{", "boolean", "result", "=", "reactants", ".", "setMultiplier", "(", "reactant", ",", "coefficient", ")", ";", "return", "result...
Sets the coefficient of a a reactant to a given value. @param reactant Reactant for which the coefficient is set @param coefficient The new coefficient for the given reactant @return true if Molecule has been found and stoichiometry has been set. @see #getReactantCoefficient
[ "Sets", "the", "coefficient", "of", "a", "a", "reactant", "to", "a", "given", "value", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Reaction.java#L309-L313
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.addPermission
public void addPermission(String path) { """ If there is a Java SecurityManager create a read FilePermission or JndiPermission for the file directory path. @param path file directory path """ if (path == null) { return; } if (securityManager != null) { Permi...
java
public void addPermission(String path) { if (path == null) { return; } if (securityManager != null) { Permission permission = null; if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) { if (!path.endsWith("/")) { ...
[ "public", "void", "addPermission", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", ";", "}", "if", "(", "securityManager", "!=", "null", ")", "{", "Permission", "permission", "=", "null", ";", "if", "(", "path", ...
If there is a Java SecurityManager create a read FilePermission or JndiPermission for the file directory path. @param path file directory path
[ "If", "there", "is", "a", "Java", "SecurityManager", "create", "a", "read", "FilePermission", "or", "JndiPermission", "for", "the", "file", "directory", "path", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L449-L472
GerdHolz/TOVAL
src/de/invation/code/toval/misc/RandomUtils.java
RandomUtils.randomIntBetween
public static int randomIntBetween(int lowerBound, int upperBound) { """ Returns a random <code>int</code> value out of a specified range @param lowerBound Lower bound of the target range (inclusive) @param upperBound Upper bound of the target range (exclusive) @return A random <code>int</code> value out of a...
java
public static int randomIntBetween(int lowerBound, int upperBound) { if (upperBound < lowerBound) { throw new IllegalArgumentException("lower bound higher than upper bound"); } return rand.nextInt(upperBound - lowerBound) + lowerBound; }
[ "public", "static", "int", "randomIntBetween", "(", "int", "lowerBound", ",", "int", "upperBound", ")", "{", "if", "(", "upperBound", "<", "lowerBound", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"lower bound higher than upper bound\"", ")", ";", ...
Returns a random <code>int</code> value out of a specified range @param lowerBound Lower bound of the target range (inclusive) @param upperBound Upper bound of the target range (exclusive) @return A random <code>int</code> value out of a specified range
[ "Returns", "a", "random", "<code", ">", "int<", "/", "code", ">", "value", "out", "of", "a", "specified", "range" ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/RandomUtils.java#L77-L82
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201811/cdnconfigurationservice/GetAllCdnConfigurations.java
GetAllCdnConfigurations.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { CdnConfigurationServiceInterface cdnConfigurationService = adManagerServices.get(session, CdnConfigurationServiceInterface.class); // Create a statement to select CDN configuratio...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "CdnConfigurationServiceInterface", "cdnConfigurationService", "=", "adManagerServices", ".", "get", "(", "ses...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201811/cdnconfigurationservice/GetAllCdnConfigurations.java#L51-L82
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java
ValueMap.withNumberSet
public ValueMap withNumberSet(String key, BigDecimal ... val) { """ Sets the value of the specified key in the current ValueMap to the given value. """ super.put(key, new LinkedHashSet<BigDecimal>(Arrays.asList(val))); return this; }
java
public ValueMap withNumberSet(String key, BigDecimal ... val) { super.put(key, new LinkedHashSet<BigDecimal>(Arrays.asList(val))); return this; }
[ "public", "ValueMap", "withNumberSet", "(", "String", "key", ",", "BigDecimal", "...", "val", ")", "{", "super", ".", "put", "(", "key", ",", "new", "LinkedHashSet", "<", "BigDecimal", ">", "(", "Arrays", ".", "asList", "(", "val", ")", ")", ")", ";", ...
Sets the value of the specified key in the current ValueMap to the given value.
[ "Sets", "the", "value", "of", "the", "specified", "key", "in", "the", "current", "ValueMap", "to", "the", "given", "value", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java#L122-L125
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/dv/MinimumPennTemplateAcceptor.java
MinimumPennTemplateAcceptor.toPattern
static String toPattern(String pos1, String rel, String pos2) { """ Returns the pattern string for the provided parts of speech and relation. """ return pos1 + ":" + rel + ":" + pos2; }
java
static String toPattern(String pos1, String rel, String pos2) { return pos1 + ":" + rel + ":" + pos2; }
[ "static", "String", "toPattern", "(", "String", "pos1", ",", "String", "rel", ",", "String", "pos2", ")", "{", "return", "pos1", "+", "\":\"", "+", "rel", "+", "\":\"", "+", "pos2", ";", "}" ]
Returns the pattern string for the provided parts of speech and relation.
[ "Returns", "the", "pattern", "string", "for", "the", "provided", "parts", "of", "speech", "and", "relation", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/dv/MinimumPennTemplateAcceptor.java#L210-L212
checkstyle-addons/checkstyle-addons
src/main/java/com/thomasjensen/checkstyle/addons/util/Util.java
Util.readBytes
public static byte[] readBytes(@Nonnull final InputStream pInputStream) throws IOException { """ Read all bytes from an InputStream into a byte array. Can be replaced with <code>Files.readAllBytes()</code> once the code is migrated to Java 7. @param pInputStream the input stream @return the complete c...
java
public static byte[] readBytes(@Nonnull final InputStream pInputStream) throws IOException { ByteArrayOutputStream baos = null; BufferedInputStream bis = null; try { baos = new ByteArrayOutputStream(IO_BUFFER_SIZE_BYTES); bis = new BufferedInputStream(pInputSt...
[ "public", "static", "byte", "[", "]", "readBytes", "(", "@", "Nonnull", "final", "InputStream", "pInputStream", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "baos", "=", "null", ";", "BufferedInputStream", "bis", "=", "null", ";", "try", "{", "b...
Read all bytes from an InputStream into a byte array. Can be replaced with <code>Files.readAllBytes()</code> once the code is migrated to Java 7. @param pInputStream the input stream @return the complete contents read from the input stream @throws IOException I/O error
[ "Read", "all", "bytes", "from", "an", "InputStream", "into", "a", "byte", "array", ".", "Can", "be", "replaced", "with", "<code", ">", "Files", ".", "readAllBytes", "()", "<", "/", "code", ">", "once", "the", "code", "is", "migrated", "to", "Java", "7"...
train
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/src/main/java/com/thomasjensen/checkstyle/addons/util/Util.java#L171-L190
qiniu/java-sdk
src/main/java/com/qiniu/storage/UploadManager.java
UploadManager.asyncPut
public void asyncPut(final byte[] data, final String key, final String token, StringMap params, String mime, boolean checkCrc, UpCompletionHandler handler) throws IOException { """ 异步上传数据 @param data 上传的数据 @param key 上传数据保存的文件名 @param token 上传凭证 @param params 自定义参数,如 pa...
java
public void asyncPut(final byte[] data, final String key, final String token, StringMap params, String mime, boolean checkCrc, UpCompletionHandler handler) throws IOException { checkArgs(key, data, null, token); if (mime == null) { mime = Client.DefaultMime; ...
[ "public", "void", "asyncPut", "(", "final", "byte", "[", "]", "data", ",", "final", "String", "key", ",", "final", "String", "token", ",", "StringMap", "params", ",", "String", "mime", ",", "boolean", "checkCrc", ",", "UpCompletionHandler", "handler", ")", ...
异步上传数据 @param data 上传的数据 @param key 上传数据保存的文件名 @param token 上传凭证 @param params 自定义参数,如 params.put("x:foo", "foo") @param mime 指定文件mimetype @param checkCrc 是否验证crc32 @param handler 上传完成的回调函数
[ "异步上传数据" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/UploadManager.java#L226-L234
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_binding.java
auditsyslogpolicy_binding.get
public static auditsyslogpolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch auditsyslogpolicy_binding resource of given name . """ auditsyslogpolicy_binding obj = new auditsyslogpolicy_binding(); obj.set_name(name); auditsyslogpolicy_binding response = (au...
java
public static auditsyslogpolicy_binding get(nitro_service service, String name) throws Exception{ auditsyslogpolicy_binding obj = new auditsyslogpolicy_binding(); obj.set_name(name); auditsyslogpolicy_binding response = (auditsyslogpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "auditsyslogpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "auditsyslogpolicy_binding", "obj", "=", "new", "auditsyslogpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", ...
Use this API to fetch auditsyslogpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "auditsyslogpolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_binding.java#L191-L196
fcrepo4/fcrepo4
fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/api/utils/SubjectMappingUtil.java
SubjectMappingUtil.mapSubject
public static Triple mapSubject(final Triple t, final String resourceUri, final String destinationUri) { """ Maps the subject of t from resourceUri to destinationUri to produce a new Triple. If the triple does not have the subject resourceUri, then the triple is unchanged. @param t triple to be remapped. @par...
java
public static Triple mapSubject(final Triple t, final String resourceUri, final String destinationUri) { final Node destinationNode = createURI(destinationUri); return mapSubject(t, resourceUri, destinationNode); }
[ "public", "static", "Triple", "mapSubject", "(", "final", "Triple", "t", ",", "final", "String", "resourceUri", ",", "final", "String", "destinationUri", ")", "{", "final", "Node", "destinationNode", "=", "createURI", "(", "destinationUri", ")", ";", "return", ...
Maps the subject of t from resourceUri to destinationUri to produce a new Triple. If the triple does not have the subject resourceUri, then the triple is unchanged. @param t triple to be remapped. @param resourceUri resource subject uri to be remapped. @param destinationUri subject uri for the resultant triple. @retur...
[ "Maps", "the", "subject", "of", "t", "from", "resourceUri", "to", "destinationUri", "to", "produce", "a", "new", "Triple", ".", "If", "the", "triple", "does", "not", "have", "the", "subject", "resourceUri", "then", "the", "triple", "is", "unchanged", "." ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/api/utils/SubjectMappingUtil.java#L45-L48
amaembo/streamex
src/main/java/one/util/streamex/AbstractStreamEx.java
AbstractStreamEx.sortedBy
public <V extends Comparable<? super V>> S sortedBy(Function<? super T, ? extends V> keyExtractor) { """ Returns a stream consisting of the elements of this stream, sorted according to the natural order of the keys extracted by provided function. <p> For ordered streams, the sort is stable. For unordered str...
java
public <V extends Comparable<? super V>> S sortedBy(Function<? super T, ? extends V> keyExtractor) { return sorted(Comparator.comparing(keyExtractor)); }
[ "public", "<", "V", "extends", "Comparable", "<", "?", "super", "V", ">", ">", "S", "sortedBy", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ">", "keyExtractor", ")", "{", "return", "sorted", "(", "Comparator", ".", "comparing", ...
Returns a stream consisting of the elements of this stream, sorted according to the natural order of the keys extracted by provided function. <p> For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made. <p> This is a <a href="package-summary.html#StreamOps">stateful intermedia...
[ "Returns", "a", "stream", "consisting", "of", "the", "elements", "of", "this", "stream", "sorted", "according", "to", "the", "natural", "order", "of", "the", "keys", "extracted", "by", "provided", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/AbstractStreamEx.java#L751-L753
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.joining
public String joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { """ Returns a {@link String} which is the concatenation of the results of calling {@link String#valueOf(int)} on each element of this stream, separated by the specified delimiter, with the specified prefix and suffix in en...
java
public String joining(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return collect(IntCollector.joining(delimiter, prefix, suffix)); }
[ "public", "String", "joining", "(", "CharSequence", "delimiter", ",", "CharSequence", "prefix", ",", "CharSequence", "suffix", ")", "{", "return", "collect", "(", "IntCollector", ".", "joining", "(", "delimiter", ",", "prefix", ",", "suffix", ")", ")", ";", ...
Returns a {@link String} which is the concatenation of the results of calling {@link String#valueOf(int)} on each element of this stream, separated by the specified delimiter, with the specified prefix and suffix in encounter order. <p> This is a terminal operation. @param delimiter the delimiter to be used between e...
[ "Returns", "a", "{", "@link", "String", "}", "which", "is", "the", "concatenation", "of", "the", "results", "of", "calling", "{", "@link", "String#valueOf", "(", "int", ")", "}", "on", "each", "element", "of", "this", "stream", "separated", "by", "the", ...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L1610-L1612
threerings/nenya
core/src/main/java/com/threerings/media/util/ModeUtil.java
ModeUtil.getDisplayMode
public static DisplayMode getDisplayMode ( GraphicsDevice gd, int width, int height, int desiredDepth, int minimumDepth) { """ Gets a display mode that matches the specified parameters. The screen resolution must match the specified resolution exactly, the specified desired depth will be used if it is av...
java
public static DisplayMode getDisplayMode ( GraphicsDevice gd, int width, int height, int desiredDepth, int minimumDepth) { DisplayMode[] modes = gd.getDisplayModes(); final int ddepth = desiredDepth; // we sort modes in order of desirability Comparator<DisplayMode> mcomp = n...
[ "public", "static", "DisplayMode", "getDisplayMode", "(", "GraphicsDevice", "gd", ",", "int", "width", ",", "int", "height", ",", "int", "desiredDepth", ",", "int", "minimumDepth", ")", "{", "DisplayMode", "[", "]", "modes", "=", "gd", ".", "getDisplayModes", ...
Gets a display mode that matches the specified parameters. The screen resolution must match the specified resolution exactly, the specified desired depth will be used if it is available, and if not, the highest depth greater than or equal to the specified minimum depth is used. The highest refresh rate available for th...
[ "Gets", "a", "display", "mode", "that", "matches", "the", "specified", "parameters", ".", "The", "screen", "resolution", "must", "match", "the", "specified", "resolution", "exactly", "the", "specified", "desired", "depth", "will", "be", "used", "if", "it", "is...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/ModeUtil.java#L41-L82
thorntail/thorntail
plugins/gradle/tooling-api/src/main/java/org/wildfly/swarm/plugin/gradle/GradleToolingHelper.java
GradleToolingHelper.toDeclaredDependencies
public static DeclaredDependencies toDeclaredDependencies(Map<DependencyDescriptor, Set<DependencyDescriptor>> depMap) { """ Translate the given dependency tree in to an instance of {@link DeclaredDependencies}. """ DeclaredDependencies dependencies = new DeclaredDependencies(); depMap.forEach(...
java
public static DeclaredDependencies toDeclaredDependencies(Map<DependencyDescriptor, Set<DependencyDescriptor>> depMap) { DeclaredDependencies dependencies = new DeclaredDependencies(); depMap.forEach((directDep, resolvedDeps) -> { ArtifactSpec parent = toArtifactSpec(directDep); ...
[ "public", "static", "DeclaredDependencies", "toDeclaredDependencies", "(", "Map", "<", "DependencyDescriptor", ",", "Set", "<", "DependencyDescriptor", ">", ">", "depMap", ")", "{", "DeclaredDependencies", "dependencies", "=", "new", "DeclaredDependencies", "(", ")", ...
Translate the given dependency tree in to an instance of {@link DeclaredDependencies}.
[ "Translate", "the", "given", "dependency", "tree", "in", "to", "an", "instance", "of", "{" ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/gradle/tooling-api/src/main/java/org/wildfly/swarm/plugin/gradle/GradleToolingHelper.java#L36-L46
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java
SerializationUtil.writeCollection
public static <T> void writeCollection(Collection<T> items, ObjectDataOutput out) throws IOException { """ Writes a collection to an {@link ObjectDataOutput}. The collection's size is written to the data output, then each object in the collection is serialized. @param items collection of items to be serialized...
java
public static <T> void writeCollection(Collection<T> items, ObjectDataOutput out) throws IOException { out.writeInt(items.size()); for (T item : items) { out.writeObject(item); } }
[ "public", "static", "<", "T", ">", "void", "writeCollection", "(", "Collection", "<", "T", ">", "items", ",", "ObjectDataOutput", "out", ")", "throws", "IOException", "{", "out", ".", "writeInt", "(", "items", ".", "size", "(", ")", ")", ";", "for", "(...
Writes a collection to an {@link ObjectDataOutput}. The collection's size is written to the data output, then each object in the collection is serialized. @param items collection of items to be serialized @param out data output to write to @param <T> type of items @throws NullPointerException if {@code items} or {...
[ "Writes", "a", "collection", "to", "an", "{", "@link", "ObjectDataOutput", "}", ".", "The", "collection", "s", "size", "is", "written", "to", "the", "data", "output", "then", "each", "object", "in", "the", "collection", "is", "serialized", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java#L248-L253
RallyTools/RallyRestToolkitForJava
src/main/java/com/rallydev/rest/request/Request.java
Request.addParam
public void addParam(String name, String value) { """ Add the specified parameter to this request. @param name the parameter name @param value the parameter value """ getParams().add(new BasicNameValuePair(name, value)); }
java
public void addParam(String name, String value) { getParams().add(new BasicNameValuePair(name, value)); }
[ "public", "void", "addParam", "(", "String", "name", ",", "String", "value", ")", "{", "getParams", "(", ")", ".", "add", "(", "new", "BasicNameValuePair", "(", "name", ",", "value", ")", ")", ";", "}" ]
Add the specified parameter to this request. @param name the parameter name @param value the parameter value
[ "Add", "the", "specified", "parameter", "to", "this", "request", "." ]
train
https://github.com/RallyTools/RallyRestToolkitForJava/blob/542afa16ea44c9c64cebb0299500dcbbb50b6d7d/src/main/java/com/rallydev/rest/request/Request.java#L54-L56
Hygieia/Hygieia
collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java
DefaultBaseClient.makeSoapCall
protected String makeSoapCall(String soapMessageString, HpsmSoapModel hpsmSoapModel) throws HygieiaException { """ Makes SOAP request for given soap message @param soapMessageString Generated SOAP ready for POST @param hpsmSoapModel hpsmSoapModel @return Soap response """ String requestAction = hps...
java
protected String makeSoapCall(String soapMessageString, HpsmSoapModel hpsmSoapModel) throws HygieiaException { String requestAction = hpsmSoapModel.getSoapAction(); String response = ""; contentType = hpsmSettings.getContentType(); charset = hpsmSettings.getCharset(); try { ...
[ "protected", "String", "makeSoapCall", "(", "String", "soapMessageString", ",", "HpsmSoapModel", "hpsmSoapModel", ")", "throws", "HygieiaException", "{", "String", "requestAction", "=", "hpsmSoapModel", ".", "getSoapAction", "(", ")", ";", "String", "response", "=", ...
Makes SOAP request for given soap message @param soapMessageString Generated SOAP ready for POST @param hpsmSoapModel hpsmSoapModel @return Soap response
[ "Makes", "SOAP", "request", "for", "given", "soap", "message" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java#L72-L100
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/Table.java
Table.setColumnStyle
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { """ Set the style of a column. @param col The column number @param ts The style to be used, make sure the style is of type TableFamilyStyle.STYLEFAMILY_TABLECOLUMN @throws FastOdsException Thrown if col has an inv...
java
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { if (this.appender.isPreambleWritten()) throw new IllegalStateException(); this.builder.setColumnStyle(col, ts); }
[ "public", "void", "setColumnStyle", "(", "final", "int", "col", ",", "final", "TableColumnStyle", "ts", ")", "throws", "FastOdsException", "{", "if", "(", "this", ".", "appender", ".", "isPreambleWritten", "(", ")", ")", "throw", "new", "IllegalStateException", ...
Set the style of a column. @param col The column number @param ts The style to be used, make sure the style is of type TableFamilyStyle.STYLEFAMILY_TABLECOLUMN @throws FastOdsException Thrown if col has an invalid value.
[ "Set", "the", "style", "of", "a", "column", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L280-L284
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/CmsModelPageTreeItem.java
CmsModelPageTreeItem.createRootItem
public static CmsModelPageTreeItem createRootItem(boolean isModelGroup, String title, String subTitle) { """ Creates the fake model page tree item used as a root for the tree view.<p> @param isModelGroup in case of a model group page @param title the title @param subTitle the sub title @return the root tre...
java
public static CmsModelPageTreeItem createRootItem(boolean isModelGroup, String title, String subTitle) { return new CmsModelPageTreeItem(isModelGroup, title, subTitle); }
[ "public", "static", "CmsModelPageTreeItem", "createRootItem", "(", "boolean", "isModelGroup", ",", "String", "title", ",", "String", "subTitle", ")", "{", "return", "new", "CmsModelPageTreeItem", "(", "isModelGroup", ",", "title", ",", "subTitle", ")", ";", "}" ]
Creates the fake model page tree item used as a root for the tree view.<p> @param isModelGroup in case of a model group page @param title the title @param subTitle the sub title @return the root tree item
[ "Creates", "the", "fake", "model", "page", "tree", "item", "used", "as", "a", "root", "for", "the", "tree", "view", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/CmsModelPageTreeItem.java#L132-L135
landawn/AbacusUtil
src/com/landawn/abacus/util/CharList.java
CharList.reduce
public <E extends Exception> char reduce(final char identity, final Try.CharBinaryOperator<E> accumulator) throws E { """ This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } char result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsChar(result, elementData...
java
public <E extends Exception> char reduce(final char identity, final Try.CharBinaryOperator<E> accumulator) throws E { if (isEmpty()) { return identity; } char result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsChar(result, el...
[ "public", "<", "E", "extends", "Exception", ">", "char", "reduce", "(", "final", "char", "identity", ",", "final", "Try", ".", "CharBinaryOperator", "<", "E", ">", "accumulator", ")", "throws", "E", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "retur...
This is equivalent to: <pre> <code> if (isEmpty()) { return identity; } char result = identity; for (int i = 0; i < size; i++) { result = accumulator.applyAsChar(result, elementData[i]); } return result; </code> </pre> @param identity @param accumulator @return
[ "This", "is", "equivalent", "to", ":", "<pre", ">", "<code", ">", "if", "(", "isEmpty", "()", ")", "{", "return", "identity", ";", "}" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CharList.java#L1152-L1164
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeNotificationSettings
public void writeNotificationSettings(OutputStream out, NotificationSettings value) throws IOException { """ Encode a NotificationSettings instance as JSON: { "deliveryInterval" : Integer } @param out The stream to write JSON to @param value The NotificationSettings instance to encode. Can't be null. @thro...
java
public void writeNotificationSettings(OutputStream out, NotificationSettings value) throws IOException { writeStartObject(out); writeIntField(out, OM_DELIVERYINTERVAL, value.deliveryInterval); writeIntField(out, OM_INBOXEXPIRTY, value.inboxExpiry); writeEndObject(out); }
[ "public", "void", "writeNotificationSettings", "(", "OutputStream", "out", ",", "NotificationSettings", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writeIntField", "(", "out", ",", "OM_DELIVERYINTERVAL", ",", "value", ".", ...
Encode a NotificationSettings instance as JSON: { "deliveryInterval" : Integer } @param out The stream to write JSON to @param value The NotificationSettings instance to encode. Can't be null. @throws IOException If an I/O error occurs @see #readNotificationSettings(InputStream)
[ "Encode", "a", "NotificationSettings", "instance", "as", "JSON", ":", "{", "deliveryInterval", ":", "Integer", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1912-L1917
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/CommonUtils.java
CommonUtils.dateReservedQuarter999
public static Date dateReservedQuarter999(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 dateReservedQuarter999(int year, int quarter) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); if (quarter <= 1) { calendar.set(Calendar.MONTH, Calendar.MARCH); } else if (quarter == 2) { calendar.set(Calendar.MON...
[ "public", "static", "Date", "dateReservedQuarter999", "(", "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#L492-L505
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuExceptionUtil.java
GosuExceptionUtil.throwArgMismatchException
public static void throwArgMismatchException( IllegalArgumentException exceptionToWrap, String featureName, Class[] actualParameters, Object[] args ) { """ This method can be used to provide a more informative type-mismatch exception message than the standard java reflection does with its IllegalArgumentException...
java
public static void throwArgMismatchException( IllegalArgumentException exceptionToWrap, String featureName, Class[] actualParameters, Object[] args ) { String argTypes = "("; for( int i = 0; i < actualParameters.length; i++ ) { Class aClass = actualParameters[i]; if( i > 0 ) { ar...
[ "public", "static", "void", "throwArgMismatchException", "(", "IllegalArgumentException", "exceptionToWrap", ",", "String", "featureName", ",", "Class", "[", "]", "actualParameters", ",", "Object", "[", "]", "args", ")", "{", "String", "argTypes", "=", "\"(\"", ";...
This method can be used to provide a more informative type-mismatch exception message than the standard java reflection does with its IllegalArgumentException. @param exceptionToWrap - exception to wrap @param featureName - feature being executed when the (e.g. "method" or "constructor") @param actualParameters ...
[ "This", "method", "can", "be", "used", "to", "provide", "a", "more", "informative", "type", "-", "mismatch", "exception", "message", "than", "the", "standard", "java", "reflection", "does", "with", "its", "IllegalArgumentException", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuExceptionUtil.java#L52-L85
tvesalainen/util
util/src/main/java/org/vesalainen/ui/LineDrawer.java
LineDrawer.fillWidth
public static void fillWidth(Point point, Point derivate, double width, PlotOperator plot) { """ Draws orthogonal to derivate width length line having center at point. @param point @param derivate @param width @param plot """ fillWidth(point.x, point.y, derivate.x, derivate.y, width, plot); }
java
public static void fillWidth(Point point, Point derivate, double width, PlotOperator plot) { fillWidth(point.x, point.y, derivate.x, derivate.y, width, plot); }
[ "public", "static", "void", "fillWidth", "(", "Point", "point", ",", "Point", "derivate", ",", "double", "width", ",", "PlotOperator", "plot", ")", "{", "fillWidth", "(", "point", ".", "x", ",", "point", ".", "y", ",", "derivate", ".", "x", ",", "deriv...
Draws orthogonal to derivate width length line having center at point. @param point @param derivate @param width @param plot
[ "Draws", "orthogonal", "to", "derivate", "width", "length", "line", "having", "center", "at", "point", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/LineDrawer.java#L35-L38
whitesource/fs-agent
src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java
ArchiveExtractor.extractArchives
public String extractArchives(String scannerBaseDir, int archiveExtractionDepth, List<String> archiveDirectories) { """ The Method extracts all the Archive files according to the archiveExtractionDepth. archiveExtractionDepth defined by the user in the configuration file. <p> The archiveExtractionDepth default ...
java
public String extractArchives(String scannerBaseDir, int archiveExtractionDepth, List<String> archiveDirectories) { this.randomString = String.valueOf(ThreadLocalRandom.current().nextLong(0, LONG_BOUND)); this.tempFolderNoDepth = getTempFolder(scannerBaseDir); logger.debug("Base directory is {},...
[ "public", "String", "extractArchives", "(", "String", "scannerBaseDir", ",", "int", "archiveExtractionDepth", ",", "List", "<", "String", ">", "archiveDirectories", ")", "{", "this", ".", "randomString", "=", "String", ".", "valueOf", "(", "ThreadLocalRandom", "."...
The Method extracts all the Archive files according to the archiveExtractionDepth. archiveExtractionDepth defined by the user in the configuration file. <p> The archiveExtractionDepth default value is 0 - no archive scanning, the max value is 3. By default the method scans jar/war/ear. If archiveIncludes/archiveExclude...
[ "The", "Method", "extracts", "all", "the", "Archive", "files", "according", "to", "the", "archiveExtractionDepth", ".", "archiveExtractionDepth", "defined", "by", "the", "user", "in", "the", "configuration", "file", ".", "<p", ">", "The", "archiveExtractionDepth", ...
train
https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L183-L223
UrielCh/ovh-java-sdk
ovh-java-sdk-partners/src/main/java/net/minidev/ovh/api/ApiOvhPartners.java
ApiOvhPartners.register_company_companyId_GET
public OvhCompany register_company_companyId_GET(String companyId) throws IOException { """ Get information on a created company REST: GET /partners/register/company/{companyId} @param companyId [required] Company's id """ String qPath = "/partners/register/company/{companyId}"; StringBuilder sb = path...
java
public OvhCompany register_company_companyId_GET(String companyId) throws IOException { String qPath = "/partners/register/company/{companyId}"; StringBuilder sb = path(qPath, companyId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhCompany.class); }
[ "public", "OvhCompany", "register_company_companyId_GET", "(", "String", "companyId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/partners/register/company/{companyId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "companyId", ")", ...
Get information on a created company REST: GET /partners/register/company/{companyId} @param companyId [required] Company's id
[ "Get", "information", "on", "a", "created", "company" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-partners/src/main/java/net/minidev/ovh/api/ApiOvhPartners.java#L129-L134
fernandospr/javapns-jdk16
src/main/java/javapns/Push.java
Push.contentAvailable
public static PushedNotifications contentAvailable(Object keystore, String password, boolean production, Object devices) throws CommunicationException, KeystoreException { """ Push a content-available notification for Newsstand. @param keystore a keystore containing your private key and the certificate signed b...
java
public static PushedNotifications contentAvailable(Object keystore, String password, boolean production, Object devices) throws CommunicationException, KeystoreException { return sendPayload(NewsstandNotificationPayload.contentAvailable(), keystore, password, production, devices); }
[ "public", "static", "PushedNotifications", "contentAvailable", "(", "Object", "keystore", ",", "String", "password", ",", "boolean", "production", ",", "Object", "devices", ")", "throws", "CommunicationException", ",", "KeystoreException", "{", "return", "sendPayload", ...
Push a content-available notification for Newsstand. @param keystore a keystore containing your private key and the certificate signed by Apple ({@link java.io.File}, {@link java.io.InputStream}, byte[], {@link java.security.KeyStore} or {@link java.lang.String} for a file path) @param password the keystore's password...
[ "Push", "a", "content", "-", "available", "notification", "for", "Newsstand", "." ]
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/Push.java#L115-L117
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildContents
public void buildContents(XMLNode node, Content contentTree) { """ Build the list of packages. @param node the XML element that specifies which components to document @param contentTree the content tree to which the content list will be added """ Content contentListTree = writer.getContentsHeader()...
java
public void buildContents(XMLNode node, Content contentTree) { Content contentListTree = writer.getContentsHeader(); printedPackageHeaders = new HashSet<>(); for (PackageDoc pkg : configuration.packages) { if (hasConstantField(pkg) && !hasPrintedPackageIndex(pkg.name())) { ...
[ "public", "void", "buildContents", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "{", "Content", "contentListTree", "=", "writer", ".", "getContentsHeader", "(", ")", ";", "printedPackageHeaders", "=", "new", "HashSet", "<>", "(", ")", ";", "for"...
Build the list of packages. @param node the XML element that specifies which components to document @param contentTree the content tree to which the content list will be added
[ "Build", "the", "list", "of", "packages", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java#L158-L169
microfocus-idol/java-idol-user-service
src/main/java/com/hp/autonomy/user/UserServiceImpl.java
UserServiceImpl.createUserRoles
private List<UserRoles> createUserRoles(final Iterable<String> roleList, final boolean includeEmpty) { """ <p>If includeEmpty is false, returns a list of UserRoles containing only users with one or more of the roles listed in roleList. If it is true, the list also includes users without any of the given roles. In...
java
private List<UserRoles> createUserRoles(final Iterable<String> roleList, final boolean includeEmpty) { final List<User> userDetails = getUsers(); final Map<String, List<String>> userNamesRolesMap = createUsernameRolesMap(roleList); final List<UserRoles> userRoles = new ArrayList<>(); fo...
[ "private", "List", "<", "UserRoles", ">", "createUserRoles", "(", "final", "Iterable", "<", "String", ">", "roleList", ",", "final", "boolean", "includeEmpty", ")", "{", "final", "List", "<", "User", ">", "userDetails", "=", "getUsers", "(", ")", ";", "fin...
<p>If includeEmpty is false, returns a list of UserRoles containing only users with one or more of the roles listed in roleList. If it is true, the list also includes users without any of the given roles. In either case, the UserRoles' roles lists only contain roles contained in roleList.</p> <p>Given a role list, it g...
[ "<p", ">", "If", "includeEmpty", "is", "false", "returns", "a", "list", "of", "UserRoles", "containing", "only", "users", "with", "one", "or", "more", "of", "the", "roles", "listed", "in", "roleList", ".", "If", "it", "is", "true", "the", "list", "also",...
train
https://github.com/microfocus-idol/java-idol-user-service/blob/8eb5d00b3359b69891893c54f8201c16e7910322/src/main/java/com/hp/autonomy/user/UserServiceImpl.java#L318-L337
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginSetFlowLogConfigurationAsync
public Observable<FlowLogInformationInner> beginSetFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { """ Configures flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcher...
java
public Observable<FlowLogInformationInner> beginSetFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { return beginSetFlowLogConfigurationWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<Flo...
[ "public", "Observable", "<", "FlowLogInformationInner", ">", "beginSetFlowLogConfigurationAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "FlowLogInformationInner", "parameters", ")", "{", "return", "beginSetFlowLogConfigurationWithServiceRes...
Configures flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the configuration of flow log. @throws IllegalArgumentException thrown if parameters fail th...
[ "Configures", "flow", "log", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1904-L1911
azkaban/azkaban
az-core/src/main/java/azkaban/utils/TimeUtils.java
TimeUtils.formatDuration
public static String formatDuration(final long startTime, final long endTime) { """ Format time period pair to Duration String @param startTime start time @param endTime end time @return Duration String """ if (startTime == -1) { return "-"; } final long durationMS; if (endTime == -...
java
public static String formatDuration(final long startTime, final long endTime) { if (startTime == -1) { return "-"; } final long durationMS; if (endTime == -1) { durationMS = System.currentTimeMillis() - startTime; } else { durationMS = endTime - startTime; } long seconds ...
[ "public", "static", "String", "formatDuration", "(", "final", "long", "startTime", ",", "final", "long", "endTime", ")", "{", "if", "(", "startTime", "==", "-", "1", ")", "{", "return", "\"-\"", ";", "}", "final", "long", "durationMS", ";", "if", "(", ...
Format time period pair to Duration String @param startTime start time @param endTime end time @return Duration String
[ "Format", "time", "period", "pair", "to", "Duration", "String" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-core/src/main/java/azkaban/utils/TimeUtils.java#L72-L104
OpenLiberty/open-liberty
dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/AppClassLoader.java
AppClassLoader.checkLib
private static boolean checkLib(final File f, String basename) { """ Check if the given file's name matches the given library basename. @param f The file to check. @param basename The basename to compare the file against. @return true if the file exists and its name matches the given basename. false otherw...
java
private static boolean checkLib(final File f, String basename) { boolean fExists = System.getSecurityManager() == null ? f.exists() : AccessController.doPrivileged(new PrivilegedAction<Boolean>() { @Override public Boolean run() { return f.exists(); } ...
[ "private", "static", "boolean", "checkLib", "(", "final", "File", "f", ",", "String", "basename", ")", "{", "boolean", "fExists", "=", "System", ".", "getSecurityManager", "(", ")", "==", "null", "?", "f", ".", "exists", "(", ")", ":", "AccessController", ...
Check if the given file's name matches the given library basename. @param f The file to check. @param basename The basename to compare the file against. @return true if the file exists and its name matches the given basename. false otherwise.
[ "Check", "if", "the", "given", "file", "s", "name", "matches", "the", "given", "library", "basename", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.classloading/src/com/ibm/ws/classloading/internal/AppClassLoader.java#L635-L644
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/MetadataAwareClassVisitor.java
MetadataAwareClassVisitor.onVisitInnerClass
protected void onVisitInnerClass(String name, String outerName, String innerName, int modifiers) { """ An order-sensitive invocation of {@link ClassVisitor#visitInnerClass(String, String, String, int)}. @param name The internal name of the inner class. @param outerName The internal name of the outer class...
java
protected void onVisitInnerClass(String name, String outerName, String innerName, int modifiers) { super.visitInnerClass(name, outerName, innerName, modifiers); }
[ "protected", "void", "onVisitInnerClass", "(", "String", "name", ",", "String", "outerName", ",", "String", "innerName", ",", "int", "modifiers", ")", "{", "super", ".", "visitInnerClass", "(", "name", ",", "outerName", ",", "innerName", ",", "modifiers", ")",...
An order-sensitive invocation of {@link ClassVisitor#visitInnerClass(String, String, String, int)}. @param name The internal name of the inner class. @param outerName The internal name of the outer class. @param innerName The inner class's simple name or {@code null} for an anonymous class. @param modifiers The i...
[ "An", "order", "-", "sensitive", "invocation", "of", "{", "@link", "ClassVisitor#visitInnerClass", "(", "String", "String", "String", "int", ")", "}", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/MetadataAwareClassVisitor.java#L218-L220
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java
ExpressionToken.beanUpdate
protected final void beanUpdate(Object bean, Object identifier, Object value) { """ Update a JavaBean property named <code>identifier</code> with the given <code>value</code>. @param bean the JavaBean @param identifier the property name @param value the new value """ LOGGER.trace("Update bean \"" + ...
java
protected final void beanUpdate(Object bean, Object identifier, Object value) { LOGGER.trace("Update bean \"" + bean + "\" property \"" + identifier + "\""); String propertyName = identifier.toString(); Class beanType = bean.getClass(); Class propType = PROPERTY_CACHE.getPropertyType(b...
[ "protected", "final", "void", "beanUpdate", "(", "Object", "bean", ",", "Object", "identifier", ",", "Object", "value", ")", "{", "LOGGER", ".", "trace", "(", "\"Update bean \\\"\"", "+", "bean", "+", "\"\\\" property \\\"\"", "+", "identifier", "+", "\"\\\"\"",...
Update a JavaBean property named <code>identifier</code> with the given <code>value</code>. @param bean the JavaBean @param identifier the property name @param value the new value
[ "Update", "a", "JavaBean", "property", "named", "<code", ">", "identifier<", "/", "code", ">", "with", "the", "given", "<code", ">", "value<", "/", "code", ">", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java#L184-L229
buschmais/jqa-core-framework
shared/src/main/java/com/buschmais/jqassistant/core/shared/reflection/ClassHelper.java
ClassHelper.getType
public <T> Class<T> getType(String typeName) { """ Create and return an instance of the given type name. @param typeName The type name. @param <T> The type. @return The instance. """ try { return (Class<T>) classLoader.loadClass(typeName); } catch (ClassNotFoundException e...
java
public <T> Class<T> getType(String typeName) { try { return (Class<T>) classLoader.loadClass(typeName); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Cannot find class " + typeName, e); } }
[ "public", "<", "T", ">", "Class", "<", "T", ">", "getType", "(", "String", "typeName", ")", "{", "try", "{", "return", "(", "Class", "<", "T", ">", ")", "classLoader", ".", "loadClass", "(", "typeName", ")", ";", "}", "catch", "(", "ClassNotFoundExce...
Create and return an instance of the given type name. @param typeName The type name. @param <T> The type. @return The instance.
[ "Create", "and", "return", "an", "instance", "of", "the", "given", "type", "name", "." ]
train
https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/shared/src/main/java/com/buschmais/jqassistant/core/shared/reflection/ClassHelper.java#L26-L32
poetix/protonpack
src/main/java/com/codepoetics/protonpack/StreamUtils.java
StreamUtils.groupRuns
public static <T extends Comparable<T>> Stream<List<T>> groupRuns(Stream<T> source) { """ Constructs a stream that represents grouped run using the default comparator. This means that similar elements will get grouped into a list. I.e. given a list of [1,1,2,3,4,4] you will get a stream of ([1,1], [2], [3], [4, ...
java
public static <T extends Comparable<T>> Stream<List<T>> groupRuns(Stream<T> source){ return groupRuns(source, Comparable::compareTo); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Stream", "<", "List", "<", "T", ">", ">", "groupRuns", "(", "Stream", "<", "T", ">", "source", ")", "{", "return", "groupRuns", "(", "source", ",", "Comparable", "::", "compa...
Constructs a stream that represents grouped run using the default comparator. This means that similar elements will get grouped into a list. I.e. given a list of [1,1,2,3,4,4] you will get a stream of ([1,1], [2], [3], [4, 4]) @param source The input stream @param <T> The type over which to stream @return A stream of ...
[ "Constructs", "a", "stream", "that", "represents", "grouped", "run", "using", "the", "default", "comparator", ".", "This", "means", "that", "similar", "elements", "will", "get", "grouped", "into", "a", "list", ".", "I", ".", "e", ".", "given", "a", "list",...
train
https://github.com/poetix/protonpack/blob/00c55a05a4779926d02d5f4e6c820560a773f9f1/src/main/java/com/codepoetics/protonpack/StreamUtils.java#L305-L307
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java
SVGAndroidRenderer.doFilledPath
private void doFilledPath(SvgElement obj, Path path) { """ /* Fill a path with either the given paint, or if a pattern is set, with the pattern. """ // First check for pattern fill. It requires special handling. if (state.style.fill instanceof SVG.PaintReference) { SVG.SvgObject...
java
private void doFilledPath(SvgElement obj, Path path) { // First check for pattern fill. It requires special handling. if (state.style.fill instanceof SVG.PaintReference) { SVG.SvgObject ref = document.resolveIRI(((SVG.PaintReference) state.style.fill).href); if (ref instanc...
[ "private", "void", "doFilledPath", "(", "SvgElement", "obj", ",", "Path", "path", ")", "{", "// First check for pattern fill. It requires special handling.\r", "if", "(", "state", ".", "style", ".", "fill", "instanceof", "SVG", ".", "PaintReference", ")", "{", "SVG"...
/* Fill a path with either the given paint, or if a pattern is set, with the pattern.
[ "/", "*", "Fill", "a", "path", "with", "either", "the", "given", "paint", "or", "if", "a", "pattern", "is", "set", "with", "the", "pattern", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java#L469-L484
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmpty
@CodingStyleguideUnaware public static <T extends Iterable <?>> T notEmpty (final T aValue, final String sName) { """ Check that the passed {@link Iterable} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the ...
java
@CodingStyleguideUnaware public static <T extends Iterable <?>> T notEmpty (final T aValue, final String sName) { if (isEnabled ()) return notEmpty (aValue, () -> sName); return aValue; }
[ "@", "CodingStyleguideUnaware", "public", "static", "<", "T", "extends", "Iterable", "<", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "notEmpty",...
Check that the passed {@link Iterable} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the passed value is empty
[ "Check", "that", "the", "passed", "{", "@link", "Iterable", "}", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L781-L787
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
StylesheetHandler.endDocument
public void endDocument() throws org.xml.sax.SAXException { """ Receive notification of the end of the document. @see org.xml.sax.ContentHandler#endDocument @throws org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. """ try { if (null != getStylesheetRoot()) ...
java
public void endDocument() throws org.xml.sax.SAXException { try { if (null != getStylesheetRoot()) { if (0 == m_stylesheetLevel) getStylesheetRoot().recompose(); } else throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_NO_...
[ "public", "void", "endDocument", "(", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "try", "{", "if", "(", "null", "!=", "getStylesheetRoot", "(", ")", ")", "{", "if", "(", "0", "==", "m_stylesheetLevel", ")", "getStylesheetRoot...
Receive notification of the end of the document. @see org.xml.sax.ContentHandler#endDocument @throws org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
[ "Receive", "notification", "of", "the", "end", "of", "the", "document", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/StylesheetHandler.java#L463-L496
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java
NaryTreeNode.moveTo
public boolean moveTo(N newParent) { """ Move this node in the given new parent node. <p>This function adds this node at the end of the list of the children of the new parent node. <p>This function is preferred to a sequence of calls to {@link #removeFromParent()} and {@link #setChildAt(int, NaryTreeNode)}...
java
public boolean moveTo(N newParent) { if (newParent == null) { return false; } return moveTo(newParent, newParent.getChildCount()); }
[ "public", "boolean", "moveTo", "(", "N", "newParent", ")", "{", "if", "(", "newParent", "==", "null", ")", "{", "return", "false", ";", "}", "return", "moveTo", "(", "newParent", ",", "newParent", ".", "getChildCount", "(", ")", ")", ";", "}" ]
Move this node in the given new parent node. <p>This function adds this node at the end of the list of the children of the new parent node. <p>This function is preferred to a sequence of calls to {@link #removeFromParent()} and {@link #setChildAt(int, NaryTreeNode)} because it fires a limited set of events dedicated ...
[ "Move", "this", "node", "in", "the", "given", "new", "parent", "node", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/NaryTreeNode.java#L221-L226
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/finder/DeepFetchNode.java
DeepFetchNode.getSimplifiedJoinOp
public Operation getSimplifiedJoinOp(Mapper mapper, List parentList) { """ mapper is not necessarily this.relatedFinder.mapper. chained mapper """ int maxSimplifiedIn = DeepRelationshipUtility.MAX_SIMPLIFIED_IN; boolean differentPersisterThanParent = differentPersisterIdThanParent(mapper); ...
java
public Operation getSimplifiedJoinOp(Mapper mapper, List parentList) { int maxSimplifiedIn = DeepRelationshipUtility.MAX_SIMPLIFIED_IN; boolean differentPersisterThanParent = differentPersisterIdThanParent(mapper); if (differentPersisterThanParent) { maxSimplifiedIn...
[ "public", "Operation", "getSimplifiedJoinOp", "(", "Mapper", "mapper", ",", "List", "parentList", ")", "{", "int", "maxSimplifiedIn", "=", "DeepRelationshipUtility", ".", "MAX_SIMPLIFIED_IN", ";", "boolean", "differentPersisterThanParent", "=", "differentPersisterIdThanPare...
mapper is not necessarily this.relatedFinder.mapper. chained mapper
[ "mapper", "is", "not", "necessarily", "this", ".", "relatedFinder", ".", "mapper", ".", "chained", "mapper" ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/finder/DeepFetchNode.java#L885-L894
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/common/ognl/OgnlFactory.java
OgnlFactory.getInstance
public static OgnlEvaluator getInstance(final Object root, final String expression) { """ Get an OGNL Evaluator for a particular expression with a given input @param root an example instance of the root object that will be passed to this OGNL evaluator @param expression the OGNL expression @return @see...
java
public static OgnlEvaluator getInstance(final Object root, final String expression) { final OgnlEvaluatorCollection collection = INSTANCE.getEvaluators(getRootClass(root)); return collection.get(expression); }
[ "public", "static", "OgnlEvaluator", "getInstance", "(", "final", "Object", "root", ",", "final", "String", "expression", ")", "{", "final", "OgnlEvaluatorCollection", "collection", "=", "INSTANCE", ".", "getEvaluators", "(", "getRootClass", "(", "root", ")", ")",...
Get an OGNL Evaluator for a particular expression with a given input @param root an example instance of the root object that will be passed to this OGNL evaluator @param expression the OGNL expression @return @see <a href="https://commons.apache.org/proper/commons-ognl/language-guide.html">OGNL Language Guide</a>
[ "Get", "an", "OGNL", "Evaluator", "for", "a", "particular", "expression", "with", "a", "given", "input" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/common/ognl/OgnlFactory.java#L61-L66
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newNoSuchElementException
public static NoSuchElementException newNoSuchElementException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link NoSuchElementException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cau...
java
public static NoSuchElementException newNoSuchElementException(Throwable cause, String message, Object... args) { return (NoSuchElementException) new NoSuchElementException(format(message, args)).initCause(cause); }
[ "public", "static", "NoSuchElementException", "newNoSuchElementException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "(", "NoSuchElementException", ")", "new", "NoSuchElementException", "(", "format", "(", ...
Constructs and initializes a new {@link NoSuchElementException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link NoSuchElementException} was thrown. @param message {@link String} de...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "NoSuchElementException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "O...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L148-L150
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/TilesExtractor.java
TilesExtractor.compareTile
public static boolean compareTile(int tw, int th, ImageBuffer a, int xa, int ya, ImageBuffer b, int xb, int yb) { """ Compare two tiles by checking all pixels. @param tw The tile width. @param th The tile height. @param a The first tile image. @param xa The location x. @param ya The location y. @param b Th...
java
public static boolean compareTile(int tw, int th, ImageBuffer a, int xa, int ya, ImageBuffer b, int xb, int yb) { for (int x = 0; x < tw; x++) { for (int y = 0; y < th; y++) { final int colorA = a.getRgb(x + xa, y + ya); final int colorB = b.ge...
[ "public", "static", "boolean", "compareTile", "(", "int", "tw", ",", "int", "th", ",", "ImageBuffer", "a", ",", "int", "xa", ",", "int", "ya", ",", "ImageBuffer", "b", ",", "int", "xb", ",", "int", "yb", ")", "{", "for", "(", "int", "x", "=", "0"...
Compare two tiles by checking all pixels. @param tw The tile width. @param th The tile height. @param a The first tile image. @param xa The location x. @param ya The location y. @param b The second tile image. @param xb The location x. @param yb The location y. @return <code>true</code> if equals, <code>false</code> e...
[ "Compare", "two", "tiles", "by", "checking", "all", "pixels", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/TilesExtractor.java#L60-L76
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/CharUtils.java
CharUtils.toChar
public static char toChar(String str, char defaultValue) { """ <p>Converts the String to a char using the first character, defaulting the value on empty Strings.</p> <pre> CharUtils.toChar(null, 'X') = 'X' CharUtils.toChar("", 'X') = 'X' CharUtils.toChar("A", 'X') = 'A' CharUtils.toChar("BA", 'X') = 'B'...
java
public static char toChar(String str, char defaultValue) { if (StringUtils.isEmpty(str)) { return defaultValue; } return str.charAt(0); }
[ "public", "static", "char", "toChar", "(", "String", "str", ",", "char", "defaultValue", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "str", ")", ")", "{", "return", "defaultValue", ";", "}", "return", "str", ".", "charAt", "(", "0", ")", ...
<p>Converts the String to a char using the first character, defaulting the value on empty Strings.</p> <pre> CharUtils.toChar(null, 'X') = 'X' CharUtils.toChar("", 'X') = 'X' CharUtils.toChar("A", 'X') = 'A' CharUtils.toChar("BA", 'X') = 'B' </pre> @param str the character to convert @param defaultValue the valu...
[ "<p", ">", "Converts", "the", "String", "to", "a", "char", "using", "the", "first", "character", "defaulting", "the", "value", "on", "empty", "Strings", ".", "<", "/", "p", ">" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/CharUtils.java#L216-L221