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
landawn/AbacusUtil
src/com/landawn/abacus/util/FilenameUtil.java
FilenameUtil.wildcardMatch
public static boolean wildcardMatch(final String filename, final String wildcardfilter, boolean caseSensitivity) { """ Checks a filename to see if it matches the specified wildcard filter allowing control over case-sensitivity. <p> The wildcard filter uses the characters '?' and '*' to represent a single or mu...
java
public static boolean wildcardMatch(final String filename, final String wildcardfilter, boolean caseSensitivity) { return wildcardMatch(filename, wildcardfilter, caseSensitivity ? IOCase.SENSITIVE : IOCase.INSENSITIVE); }
[ "public", "static", "boolean", "wildcardMatch", "(", "final", "String", "filename", ",", "final", "String", "wildcardfilter", ",", "boolean", "caseSensitivity", ")", "{", "return", "wildcardMatch", "(", "filename", ",", "wildcardfilter", ",", "caseSensitivity", "?",...
Checks a filename to see if it matches the specified wildcard filter allowing control over case-sensitivity. <p> The wildcard filter uses the characters '?' and '*' to represent a single or multiple (zero or more) wildcard characters. N.B. the sequence "*?" does not work properly at present in match strings. @param fi...
[ "Checks", "a", "filename", "to", "see", "if", "it", "matches", "the", "specified", "wildcard", "filter", "allowing", "control", "over", "case", "-", "sensitivity", ".", "<p", ">", "The", "wildcard", "filter", "uses", "the", "characters", "?", "and", "*", "...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FilenameUtil.java#L1299-L1301
app55/app55-java
src/support/java/com/googlecode/openbeans/beancontext/BeanContextSupport.java
BeanContextSupport.classEquals
protected static final boolean classEquals(Class clz1, Class clz2) { """ Compares if two classes are equal or their class names are equal. @param clz1 a class @param clz2 another class @return true if two class objects are equal or their class names are equal. """ if (clz1 == null || clz2 == null) {...
java
protected static final boolean classEquals(Class clz1, Class clz2) { if (clz1 == null || clz2 == null) { throw new NullPointerException(); } return clz1 == clz2 || clz1.getName().equals(clz2.getName()); }
[ "protected", "static", "final", "boolean", "classEquals", "(", "Class", "clz1", ",", "Class", "clz2", ")", "{", "if", "(", "clz1", "==", "null", "||", "clz2", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "return", ...
Compares if two classes are equal or their class names are equal. @param clz1 a class @param clz2 another class @return true if two class objects are equal or their class names are equal.
[ "Compares", "if", "two", "classes", "are", "equal", "or", "their", "class", "names", "are", "equal", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/beancontext/BeanContextSupport.java#L476-L483
Stratio/stratio-cassandra
src/java/org/apache/cassandra/config/Schema.java
Schema.getColumnFamilyType
public ColumnFamilyType getColumnFamilyType(String ksName, String cfName) { """ Get type of the ColumnFamily but it's keyspace/name @param ksName The keyspace name @param cfName The ColumnFamily name @return The type of the ColumnFamily """ assert ksName != null && cfName != null; CFMeta...
java
public ColumnFamilyType getColumnFamilyType(String ksName, String cfName) { assert ksName != null && cfName != null; CFMetaData cfMetaData = getCFMetaData(ksName, cfName); return (cfMetaData == null) ? null : cfMetaData.cfType; }
[ "public", "ColumnFamilyType", "getColumnFamilyType", "(", "String", "ksName", ",", "String", "cfName", ")", "{", "assert", "ksName", "!=", "null", "&&", "cfName", "!=", "null", ";", "CFMetaData", "cfMetaData", "=", "getCFMetaData", "(", "ksName", ",", "cfName", ...
Get type of the ColumnFamily but it's keyspace/name @param ksName The keyspace name @param cfName The ColumnFamily name @return The type of the ColumnFamily
[ "Get", "type", "of", "the", "ColumnFamily", "but", "it", "s", "keyspace", "/", "name" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/config/Schema.java#L223-L228
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/QuickSelect.java
QuickSelect.quickSelect
public static <T> T quickSelect(List<? extends T> data, Comparator<? super T> comparator, int rank) { """ QuickSelect is essentially quicksort, except that we only "sort" that half of the array that we are interested in. Note: the array is <b>modified</b> by this. @param <T> object type @param data Data to...
java
public static <T> T quickSelect(List<? extends T> data, Comparator<? super T> comparator, int rank) { quickSelect(data, comparator, 0, data.size(), rank); return data.get(rank); }
[ "public", "static", "<", "T", ">", "T", "quickSelect", "(", "List", "<", "?", "extends", "T", ">", "data", ",", "Comparator", "<", "?", "super", "T", ">", "comparator", ",", "int", "rank", ")", "{", "quickSelect", "(", "data", ",", "comparator", ",",...
QuickSelect is essentially quicksort, except that we only "sort" that half of the array that we are interested in. Note: the array is <b>modified</b> by this. @param <T> object type @param data Data to process @param comparator Comparator to use @param rank Rank position that we are interested in (integer!) @return V...
[ "QuickSelect", "is", "essentially", "quicksort", "except", "that", "we", "only", "sort", "that", "half", "of", "the", "array", "that", "we", "are", "interested", "in", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/QuickSelect.java#L608-L611
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/FileSystemUtil.java
FileSystemUtil.qualified
private static Path qualified(Path rootPath, Path path) { """ Qualifies a path so it includes the schema and authority from the root path. """ URI rootUri = rootPath.toUri(); return path.makeQualified(rootUri, new Path(rootUri.getPath())); }
java
private static Path qualified(Path rootPath, Path path) { URI rootUri = rootPath.toUri(); return path.makeQualified(rootUri, new Path(rootUri.getPath())); }
[ "private", "static", "Path", "qualified", "(", "Path", "rootPath", ",", "Path", "path", ")", "{", "URI", "rootUri", "=", "rootPath", ".", "toUri", "(", ")", ";", "return", "path", ".", "makeQualified", "(", "rootUri", ",", "new", "Path", "(", "rootUri", ...
Qualifies a path so it includes the schema and authority from the root path.
[ "Qualifies", "a", "path", "so", "it", "includes", "the", "schema", "and", "authority", "from", "the", "root", "path", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/FileSystemUtil.java#L110-L113
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/SSLConfigManager.java
SSLConfigManager.getGlobalProperty
public synchronized String getGlobalProperty(String name, String defaultValue) { """ * This method returns the value from the above getGlobalProperty call, if not null. Otherwise it returns the default. @param name @param defaultValue @return String * """ if (TraceComponent.isAnyTracingEnabled(...
java
public synchronized String getGlobalProperty(String name, String defaultValue) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "getGlobalProperty", new Object[] { name, defaultValue }); String value = getGlobalProperty(name); if (value == null) { ...
[ "public", "synchronized", "String", "getGlobalProperty", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", "entry", ...
* This method returns the value from the above getGlobalProperty call, if not null. Otherwise it returns the default. @param name @param defaultValue @return String *
[ "*", "This", "method", "returns", "the", "value", "from", "the", "above", "getGlobalProperty", "call", "if", "not", "null", ".", "Otherwise", "it", "returns", "the", "default", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/SSLConfigManager.java#L1218-L1229
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/model/DeleteItemResult.java
DeleteItemResult.withAttributes
public DeleteItemResult withAttributes(java.util.Map<String,AttributeValue> attributes) { """ If the <code>ReturnValues</code> parameter is provided as <code>ALL_OLD</code> in the request, Amazon DynamoDB returns an array of attribute name-value pairs (essentially, the deleted item). Otherwise, the response con...
java
public DeleteItemResult withAttributes(java.util.Map<String,AttributeValue> attributes) { setAttributes(attributes); return this; }
[ "public", "DeleteItemResult", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
If the <code>ReturnValues</code> parameter is provided as <code>ALL_OLD</code> in the request, Amazon DynamoDB returns an array of attribute name-value pairs (essentially, the deleted item). Otherwise, the response contains an empty set. <p> Returns a reference to this object so that method calls can be chained togethe...
[ "If", "the", "<code", ">", "ReturnValues<", "/", "code", ">", "parameter", "is", "provided", "as", "<code", ">", "ALL_OLD<", "/", "code", ">", "in", "the", "request", "Amazon", "DynamoDB", "returns", "an", "array", "of", "attribute", "name", "-", "value", ...
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/model/DeleteItemResult.java#L92-L95
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertValidSetterName
public static void assertValidSetterName(final Method method, Class<? extends Annotation> annotation) { """ Asserts valid Java Beans setter method name. @param method to validate @param annotation annotation to propagate in exception message """ final String methodName = method.getName(); final...
java
public static void assertValidSetterName(final Method method, Class<? extends Annotation> annotation) { final String methodName = method.getName(); final boolean correctMethodNameLength = methodName.length() > 3; final boolean isSetterMethodName = methodName.startsWith("set"); final boolean i...
[ "public", "static", "void", "assertValidSetterName", "(", "final", "Method", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "final", "String", "methodName", "=", "method", ".", "getName", "(", ")", ";", "final", "bool...
Asserts valid Java Beans setter method name. @param method to validate @param annotation annotation to propagate in exception message
[ "Asserts", "valid", "Java", "Beans", "setter", "method", "name", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L301-L312
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.swapCols
public static void swapCols(Matrix matrix, long col1, long col2) { """ Swap components in the two columns. @param matrix the matrix to modify @param col1 the first row @param col2 the second row """ double temp = 0; long rows = matrix.getRowCount(); for (long row = 0; row < rows; row++) { temp...
java
public static void swapCols(Matrix matrix, long col1, long col2) { double temp = 0; long rows = matrix.getRowCount(); for (long row = 0; row < rows; row++) { temp = matrix.getAsDouble(row, col1); matrix.setAsDouble(matrix.getAsDouble(row, col2), row, col1); matrix.setAsDouble(temp, row, col2); } }
[ "public", "static", "void", "swapCols", "(", "Matrix", "matrix", ",", "long", "col1", ",", "long", "col2", ")", "{", "double", "temp", "=", "0", ";", "long", "rows", "=", "matrix", ".", "getRowCount", "(", ")", ";", "for", "(", "long", "row", "=", ...
Swap components in the two columns. @param matrix the matrix to modify @param col1 the first row @param col2 the second row
[ "Swap", "components", "in", "the", "two", "columns", "." ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L144-L152
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
ParserAdapter.processingInstruction
public void processingInstruction (String target, String data) throws SAXException { """ Adapter implementation method; do not call. Adapt a SAX1 processing instruction event. @param target The processing instruction target. @param data The remainder of the processing instruction @exception SAXException ...
java
public void processingInstruction (String target, String data) throws SAXException { if (contentHandler != null) { contentHandler.processingInstruction(target, data); } }
[ "public", "void", "processingInstruction", "(", "String", "target", ",", "String", "data", ")", "throws", "SAXException", "{", "if", "(", "contentHandler", "!=", "null", ")", "{", "contentHandler", ".", "processingInstruction", "(", "target", ",", "data", ")", ...
Adapter implementation method; do not call. Adapt a SAX1 processing instruction event. @param target The processing instruction target. @param data The remainder of the processing instruction @exception SAXException The client may raise a processing exception. @see org.xml.sax.DocumentHandler#processingInstruction
[ "Adapter", "implementation", "method", ";", "do", "not", "call", ".", "Adapt", "a", "SAX1", "processing", "instruction", "event", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java#L683-L689
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java
JdbcCpoAdapter.persistObjects
@Override public <T> long persistObjects(String name, Collection<T> coll) throws CpoException { """ Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, ...
java
@Override public <T> long persistObjects(String name, Collection<T> coll) throws CpoException { return processUpdateGroup(coll, JdbcCpoAdapter.PERSIST_GROUP, name, null, null, null); }
[ "@", "Override", "public", "<", "T", ">", "long", "persistObjects", "(", "String", "name", ",", "Collection", "<", "T", ">", "coll", ")", "throws", "CpoException", "{", "return", "processUpdateGroup", "(", "coll", ",", "JdbcCpoAdapter", ".", "PERSIST_GROUP", ...
Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource. The objects in the co...
[ "Persists", "a", "collection", "of", "Objects", "into", "the", "datasource", ".", "The", "CpoAdapter", "will", "check", "to", "see", "if", "this", "object", "exists", "in", "the", "datasource", ".", "If", "it", "exists", "the", "object", "is", "updated", "...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L1396-L1399
dita-ot/dita-ot
src/main/java/org/dita/dost/module/DebugAndFilterModule.java
DebugAndFilterModule.generateScheme
private void generateScheme(final File filename, final Document root) throws DITAOTException { """ Serialize subject scheme file. @param filename output filepath @param root subject scheme document @throws DITAOTException if generation fails """ final File p = filename.getParentFile(); i...
java
private void generateScheme(final File filename, final Document root) throws DITAOTException { final File p = filename.getParentFile(); if (!p.exists() && !p.mkdirs()) { throw new DITAOTException("Failed to make directory " + p.getAbsolutePath()); } Result res = null; ...
[ "private", "void", "generateScheme", "(", "final", "File", "filename", ",", "final", "Document", "root", ")", "throws", "DITAOTException", "{", "final", "File", "p", "=", "filename", ".", "getParentFile", "(", ")", ";", "if", "(", "!", "p", ".", "exists", ...
Serialize subject scheme file. @param filename output filepath @param root subject scheme document @throws DITAOTException if generation fails
[ "Serialize", "subject", "scheme", "file", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L477-L501
wanglinsong/thx-webservice
src/main/java/com/tascape/qa/th/ws/comm/WebServiceCommunication.java
WebServiceCommunication.postEntity
public String postEntity(String endpoint, HttpEntity entity) throws IOException { """ Issues HTTP POST request, returns response body as string. @param endpoint endpoint of request url @param entity request entity @return response body @throws IOException in case of any IO related issue """ ...
java
public String postEntity(String endpoint, HttpEntity entity) throws IOException { return this.postEntity(endpoint, "", entity, ""); }
[ "public", "String", "postEntity", "(", "String", "endpoint", ",", "HttpEntity", "entity", ")", "throws", "IOException", "{", "return", "this", ".", "postEntity", "(", "endpoint", ",", "\"\"", ",", "entity", ",", "\"\"", ")", ";", "}" ]
Issues HTTP POST request, returns response body as string. @param endpoint endpoint of request url @param entity request entity @return response body @throws IOException in case of any IO related issue
[ "Issues", "HTTP", "POST", "request", "returns", "response", "body", "as", "string", "." ]
train
https://github.com/wanglinsong/thx-webservice/blob/29bc084b09ad35b012eb7c6b5c9ee55337ddee28/src/main/java/com/tascape/qa/th/ws/comm/WebServiceCommunication.java#L983-L985
lightbend/config
config/src/main/java/com/typesafe/config/ConfigFactory.java
ConfigFactory.parseFile
public static Config parseFile(File file, ConfigParseOptions options) { """ Parses a file into a Config instance. Does not call {@link Config#resolve} or merge the file with any other configuration; this method parses a single file and does nothing else. It does process "include" statements in the parsed file,...
java
public static Config parseFile(File file, ConfigParseOptions options) { return Parseable.newFile(file, options).parse().toConfig(); }
[ "public", "static", "Config", "parseFile", "(", "File", "file", ",", "ConfigParseOptions", "options", ")", "{", "return", "Parseable", ".", "newFile", "(", "file", ",", "options", ")", ".", "parse", "(", ")", ".", "toConfig", "(", ")", ";", "}" ]
Parses a file into a Config instance. Does not call {@link Config#resolve} or merge the file with any other configuration; this method parses a single file and does nothing else. It does process "include" statements in the parsed file, and may end up doing other IO due to those statements. @param file the file to pars...
[ "Parses", "a", "file", "into", "a", "Config", "instance", ".", "Does", "not", "call", "{", "@link", "Config#resolve", "}", "or", "merge", "the", "file", "with", "any", "other", "configuration", ";", "this", "method", "parses", "a", "single", "file", "and",...
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigFactory.java#L738-L740
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.setSharedKeyAsync
public Observable<ConnectionSharedKeyInner> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { """ The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in ...
java
public Observable<ConnectionSharedKeyInner> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).map(new Func1<ServiceResponse<ConnectionSharedKeyInner>, ...
[ "public", "Observable", "<", "ConnectionSharedKeyInner", ">", "setSharedKeyAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "String", "value", ")", "{", "return", "setSharedKeyWithServiceResponseAsync", "(", "resourceGroup...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnect...
[ "The", "Put", "VirtualNetworkGatewayConnectionSharedKey", "operation", "sets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through"...
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/VirtualNetworkGatewayConnectionsInner.java#L883-L890
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java
DrawerUIUtils.setDrawerVerticalPadding
public static void setDrawerVerticalPadding(View v, int level) { """ helper to set the vertical padding including the extra padding for deeper item hirachy level to the DrawerItems this is required because on API Level 17 the padding is ignored which is set via the XML @param v @param level """ in...
java
public static void setDrawerVerticalPadding(View v, int level) { int verticalPadding = v.getContext().getResources().getDimensionPixelSize(R.dimen.material_drawer_vertical_padding); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { v.setPaddingRelative(verticalPadding * lev...
[ "public", "static", "void", "setDrawerVerticalPadding", "(", "View", "v", ",", "int", "level", ")", "{", "int", "verticalPadding", "=", "v", ".", "getContext", "(", ")", ".", "getResources", "(", ")", ".", "getDimensionPixelSize", "(", "R", ".", "dimen", "...
helper to set the vertical padding including the extra padding for deeper item hirachy level to the DrawerItems this is required because on API Level 17 the padding is ignored which is set via the XML @param v @param level
[ "helper", "to", "set", "the", "vertical", "padding", "including", "the", "extra", "padding", "for", "deeper", "item", "hirachy", "level", "to", "the", "DrawerItems", "this", "is", "required", "because", "on", "API", "Level", "17", "the", "padding", "is", "ig...
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java#L216-L224
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java
UserPreferences.setCustomPlugins
public void setCustomPlugins(Map<String, Boolean> customPlugins) { """ Additional plugins which could be used by {@link IFindBugsEngine} (if enabled), or which shouldn't be used (if disabled). If a plugin is not included in the set, it's enablement depends on it's default settings. @param customPlugins map w...
java
public void setCustomPlugins(Map<String, Boolean> customPlugins) { if (customPlugins == null) { throw new IllegalArgumentException("customPlugins may not be null."); } this.customPlugins = customPlugins; }
[ "public", "void", "setCustomPlugins", "(", "Map", "<", "String", ",", "Boolean", ">", "customPlugins", ")", "{", "if", "(", "customPlugins", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"customPlugins may not be null.\"", ")", ";", ...
Additional plugins which could be used by {@link IFindBugsEngine} (if enabled), or which shouldn't be used (if disabled). If a plugin is not included in the set, it's enablement depends on it's default settings. @param customPlugins map with additional third party plugin locations (as absolute paths), never null, but ...
[ "Additional", "plugins", "which", "could", "be", "used", "by", "{", "@link", "IFindBugsEngine", "}", "(", "if", "enabled", ")", "or", "which", "shouldn", "t", "be", "used", "(", "if", "disabled", ")", ".", "If", "a", "plugin", "is", "not", "included", ...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/UserPreferences.java#L593-L598
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.perspectiveLH
public Matrix4f perspectiveLH(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) { """ Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix. <p> If <code>M</code> is <code>this</code> matrix and <code>P...
java
public Matrix4f perspectiveLH(float fovy, float aspect, float zNear, float zFar, boolean zZeroToOne) { return perspectiveLH(fovy, aspect, zNear, zFar, zZeroToOne, thisOrNew()); }
[ "public", "Matrix4f", "perspectiveLH", "(", "float", "fovy", ",", "float", "aspect", ",", "float", "zNear", ",", "float", "zFar", ",", "boolean", "zZeroToOne", ")", "{", "return", "perspectiveLH", "(", "fovy", ",", "aspect", ",", "zNear", ",", "zFar", ",",...
Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using the given NDC z range to this matrix. <p> If <code>M</code> is <code>this</code> matrix and <code>P</code> the perspective projection matrix, then the new matrix will be <code>M * P</code>. So when transforming a v...
[ "Apply", "a", "symmetric", "perspective", "projection", "frustum", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "the", "given", "NDC", "z", "range", "to", "this", "matrix", ".", "<p", ">", "If", "<code", ">", "M<", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L10145-L10147
linkedin/dexmaker
dexmaker/src/main/java/com/android/dx/Code.java
Code.sget
public <V> void sget(FieldId<?, ? extends V> fieldId, Local<V> target) { """ Copies the value in the static field {@code fieldId} to {@code target}. """ addInstruction(new ThrowingCstInsn(Rops.opGetStatic(target.type.ropType), sourcePosition, RegisterSpecList.EMPTY, catches, fieldId.con...
java
public <V> void sget(FieldId<?, ? extends V> fieldId, Local<V> target) { addInstruction(new ThrowingCstInsn(Rops.opGetStatic(target.type.ropType), sourcePosition, RegisterSpecList.EMPTY, catches, fieldId.constant)); moveResult(target, true); }
[ "public", "<", "V", ">", "void", "sget", "(", "FieldId", "<", "?", ",", "?", "extends", "V", ">", "fieldId", ",", "Local", "<", "V", ">", "target", ")", "{", "addInstruction", "(", "new", "ThrowingCstInsn", "(", "Rops", ".", "opGetStatic", "(", "targ...
Copies the value in the static field {@code fieldId} to {@code target}.
[ "Copies", "the", "value", "in", "the", "static", "field", "{" ]
train
https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker/src/main/java/com/android/dx/Code.java#L608-L612
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/components/factories/JComponentFactory.java
JComponentFactory.newJMenuItem
public static JMenuItem newJMenuItem(final @NonNull String text, final int mnemonic, final char accelerator) { """ Factory method for create a <code>JMenuItem</code>. @param text the text of the <code>JMenuItem</code> @param mnemonic the keyboard mnemonic for the <code>JMenuItem</code> @param accelerator ...
java
public static JMenuItem newJMenuItem(final @NonNull String text, final int mnemonic, final char accelerator) { final JMenuItem menuItem = new JMenuItem(text, mnemonic); MenuExtensions.setCtrlAccelerator(menuItem, accelerator); return menuItem; }
[ "public", "static", "JMenuItem", "newJMenuItem", "(", "final", "@", "NonNull", "String", "text", ",", "final", "int", "mnemonic", ",", "final", "char", "accelerator", ")", "{", "final", "JMenuItem", "menuItem", "=", "new", "JMenuItem", "(", "text", ",", "mne...
Factory method for create a <code>JMenuItem</code>. @param text the text of the <code>JMenuItem</code> @param mnemonic the keyboard mnemonic for the <code>JMenuItem</code> @param accelerator The character that have to push together with the CTRL. @return the new {@link JMenuItem}
[ "Factory", "method", "for", "create", "a", "<code", ">", "JMenuItem<", "/", "code", ">", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/components/factories/JComponentFactory.java#L184-L190
OpenLiberty/open-liberty
dev/com.ibm.ws.junit.extensions/src/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
PumpStreamHandler.createPump
protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { """ Creates a stream pumper to copy the given input stream to the given output stream. @param is the input stream to copy from. @param os the output stream to copy to. @param closeWhenEx...
java
protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { return createPump(is, os, closeWhenExhausted, true); }
[ "protected", "Thread", "createPump", "(", "InputStream", "is", ",", "OutputStream", "os", ",", "boolean", "closeWhenExhausted", ")", "{", "return", "createPump", "(", "is", ",", "os", ",", "closeWhenExhausted", ",", "true", ")", ";", "}" ]
Creates a stream pumper to copy the given input stream to the given output stream. @param is the input stream to copy from. @param os the output stream to copy to. @param closeWhenExhausted if true close the inputstream. @return a thread object that does the pumping, subclasses should return an instance of {@link Thre...
[ "Creates", "a", "stream", "pumper", "to", "copy", "the", "given", "input", "stream", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.junit.extensions/src/org/apache/tools/ant/taskdefs/PumpStreamHandler.java#L268-L271
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPostMultipart
protected void doPostMultipart(String path, InputStream inputStream) throws ClientException { """ Submits a multi-part form in an input stream. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param inputStream the multi-part form content. @throws ClientException if a st...
java
protected void doPostMultipart(String path, InputStream inputStream) throws ClientException { doPostMultipart(path, inputStream, null); }
[ "protected", "void", "doPostMultipart", "(", "String", "path", ",", "InputStream", "inputStream", ")", "throws", "ClientException", "{", "doPostMultipart", "(", "path", ",", "inputStream", ",", "null", ")", ";", "}" ]
Submits a multi-part form in an input stream. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param inputStream the multi-part form content. @throws ClientException if a status code other than 200 (OK) and 204 (No Content) is returned.
[ "Submits", "a", "multi", "-", "part", "form", "in", "an", "input", "stream", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L693-L695
googleapis/google-cloud-java
google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java
KeyManagementServiceClient.asymmetricSign
public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { """ Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieve...
java
public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) { AsymmetricSignRequest request = AsymmetricSignRequest.newBuilder().setName(name).setDigest(digest).build(); return asymmetricSign(request); }
[ "public", "final", "AsymmetricSignResponse", "asymmetricSign", "(", "String", "name", ",", "Digest", "digest", ")", "{", "AsymmetricSignRequest", "request", "=", "AsymmetricSignRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", ")", ".", "setDiges...
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. <p>Sample cod...
[ "Signs", "data", "using", "a", "[", "CryptoKeyVersion", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ".", "CryptoKeyVersion", "]", "with", "[", "CryptoKey", ".", "purpose", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ".", "Cr...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java#L2413-L2418
arquillian/arquillian-cube
kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java
DefaultConfiguration.getKubernetesConfigurationUrl
public static URL getKubernetesConfigurationUrl(Map<String, String> map) throws MalformedURLException { """ Applies the kubernetes json url to the configuration. @param map The arquillian configuration. """ if (Strings.isNotNullOrEmpty(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, ""))) {...
java
public static URL getKubernetesConfigurationUrl(Map<String, String> map) throws MalformedURLException { if (Strings.isNotNullOrEmpty(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, ""))) { return new URL(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, "")); } else if (Strings...
[ "public", "static", "URL", "getKubernetesConfigurationUrl", "(", "Map", "<", "String", ",", "String", ">", "map", ")", "throws", "MalformedURLException", "{", "if", "(", "Strings", ".", "isNotNullOrEmpty", "(", "Utils", ".", "getSystemPropertyOrEnvVar", "(", "ENVI...
Applies the kubernetes json url to the configuration. @param map The arquillian configuration.
[ "Applies", "the", "kubernetes", "json", "url", "to", "the", "configuration", "." ]
train
https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java#L237-L252
infinispan/infinispan
core/src/main/java/org/infinispan/io/GridFilesystem.java
GridFilesystem.getWritableChannel
public WritableGridFileChannel getWritableChannel(String pathname, boolean append, int chunkSize) throws IOException { """ Opens a WritableGridFileChannel for writing to the file denoted by pathname. @param pathname the file to write to @param append if true, the bytes written to the channel will be appended to ...
java
public WritableGridFileChannel getWritableChannel(String pathname, boolean append, int chunkSize) throws IOException { GridFile file = (GridFile) getFile(pathname, chunkSize); checkIsNotDirectory(file); createIfNeeded(file); return new WritableGridFileChannel(file, data, append); }
[ "public", "WritableGridFileChannel", "getWritableChannel", "(", "String", "pathname", ",", "boolean", "append", ",", "int", "chunkSize", ")", "throws", "IOException", "{", "GridFile", "file", "=", "(", "GridFile", ")", "getFile", "(", "pathname", ",", "chunkSize",...
Opens a WritableGridFileChannel for writing to the file denoted by pathname. @param pathname the file to write to @param append if true, the bytes written to the channel will be appended to the end of the file @param chunkSize the size of the file's chunks. This parameter is honored only when the file at pathname does ...
[ "Opens", "a", "WritableGridFileChannel", "for", "writing", "to", "the", "file", "denoted", "by", "pathname", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/io/GridFilesystem.java#L228-L233
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip6_stats.java
tunnelip6_stats.get
public static tunnelip6_stats get(nitro_service service, String tunnelip6) throws Exception { """ Use this API to fetch statistics of tunnelip6_stats resource of given name . """ tunnelip6_stats obj = new tunnelip6_stats(); obj.set_tunnelip6(tunnelip6); tunnelip6_stats response = (tunnelip6_stats) obj.st...
java
public static tunnelip6_stats get(nitro_service service, String tunnelip6) throws Exception{ tunnelip6_stats obj = new tunnelip6_stats(); obj.set_tunnelip6(tunnelip6); tunnelip6_stats response = (tunnelip6_stats) obj.stat_resource(service); return response; }
[ "public", "static", "tunnelip6_stats", "get", "(", "nitro_service", "service", ",", "String", "tunnelip6", ")", "throws", "Exception", "{", "tunnelip6_stats", "obj", "=", "new", "tunnelip6_stats", "(", ")", ";", "obj", ".", "set_tunnelip6", "(", "tunnelip6", ")"...
Use this API to fetch statistics of tunnelip6_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "tunnelip6_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip6_stats.java#L209-L214
eclipse/hawkbit
hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java
MgmtDownloadArtifactResource.downloadArtifact
@Override public ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId, @PathVariable("artifactId") final Long artifactId) { """ Handles the GET request for downloading an artifact. @param softwareModuleId of the parent SoftwareModule @param...
java
@Override public ResponseEntity<InputStream> downloadArtifact(@PathVariable("softwareModuleId") final Long softwareModuleId, @PathVariable("artifactId") final Long artifactId) { final SoftwareModule module = softwareModuleManagement.get(softwareModuleId) .orElseThrow(() -> new E...
[ "@", "Override", "public", "ResponseEntity", "<", "InputStream", ">", "downloadArtifact", "(", "@", "PathVariable", "(", "\"softwareModuleId\"", ")", "final", "Long", "softwareModuleId", ",", "@", "PathVariable", "(", "\"artifactId\"", ")", "final", "Long", "artifac...
Handles the GET request for downloading an artifact. @param softwareModuleId of the parent SoftwareModule @param artifactId of the related Artifact @return responseEntity with status ok if successful
[ "Handles", "the", "GET", "request", "for", "downloading", "an", "artifact", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-rest/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java#L60-L79
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterInventory
public void getCharacterInventory(String API, String name, Callback<CharacterInventory> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Character Inventory API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Inventory">here</a><br/> Give user the access to {@link Ca...
java
public void getCharacterInventory(String API, String name, Callback<CharacterInventory> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterInventory(name, API).enqueue(callback); }
[ "public", "void", "getCharacterInventory", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterInventory", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "...
For more info on Character Inventory API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Inventory">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param API API key @param name cha...
[ "For", "more", "info", "on", "Character", "Inventory", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Inventory", ">", "here<", "/", "a", ">", "<br", "/",...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L781-L784
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/StringContext.java
StringContext.endsWith
public boolean endsWith(String str, String suffix) { """ Tests if the given string ends with the given suffix. Returns true if the given string ends with the given suffix. @param str the source string @param suffix the suffix to test for @return true if the given string ends with the given suffix """ ...
java
public boolean endsWith(String str, String suffix) { return (str == null || suffix == null) ? (str == suffix) : str.endsWith(suffix); }
[ "public", "boolean", "endsWith", "(", "String", "str", ",", "String", "suffix", ")", "{", "return", "(", "str", "==", "null", "||", "suffix", "==", "null", ")", "?", "(", "str", "==", "suffix", ")", ":", "str", ".", "endsWith", "(", "suffix", ")", ...
Tests if the given string ends with the given suffix. Returns true if the given string ends with the given suffix. @param str the source string @param suffix the suffix to test for @return true if the given string ends with the given suffix
[ "Tests", "if", "the", "given", "string", "ends", "with", "the", "given", "suffix", ".", "Returns", "true", "if", "the", "given", "string", "ends", "with", "the", "given", "suffix", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/StringContext.java#L55-L58
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/ReadStreamOld.java
ReadStreamOld.readAll
public int readAll(byte []buf, int offset, int length) throws IOException { """ Reads into a byte array. <code>readAll</code> will always read <code>length</code> bytes, blocking if necessary, until the end of file is reached. @param buf byte array @param offset offset into the byte array to start reading ...
java
public int readAll(byte []buf, int offset, int length) throws IOException { int readOffset = _readOffset; int readLength = _readLength; int i = 0; while (true) { int sublen = Math.min(length - i, readLength - readOffset); System.arraycopy(_readBuffer, readOffset, buf, offset + i, ...
[ "public", "int", "readAll", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "int", "readOffset", "=", "_readOffset", ";", "int", "readLength", "=", "_readLength", ";", "int", "i", "=", "0", "...
Reads into a byte array. <code>readAll</code> will always read <code>length</code> bytes, blocking if necessary, until the end of file is reached. @param buf byte array @param offset offset into the byte array to start reading @param length maximum byte allowed to read. @return number of bytes read or -1 on end of f...
[ "Reads", "into", "a", "byte", "array", ".", "<code", ">", "readAll<", "/", "code", ">", "will", "always", "read", "<code", ">", "length<", "/", "code", ">", "bytes", "blocking", "if", "necessary", "until", "the", "end", "of", "file", "is", "reached", "...
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/ReadStreamOld.java#L530-L558
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java
BasicModMixer.setupChannelFilter
protected void setupChannelFilter(ChannelMemory aktMemo, boolean bReset, int flt_modifier) { """ Simple 2-poles resonant filter @since 31.03.2010 @param aktMemo @param bReset @param flt_modifier """ double cutOff = (double)((aktMemo.nCutOff + aktMemo.nCutSwing)&0x7F); double resonance = (double)((aktMe...
java
protected void setupChannelFilter(ChannelMemory aktMemo, boolean bReset, int flt_modifier) { double cutOff = (double)((aktMemo.nCutOff + aktMemo.nCutSwing)&0x7F); double resonance = (double)((aktMemo.nResonance + aktMemo.nResSwing)&0x7F); double fc = cutOffToFrequency((long)cutOff, flt_modifier, (mod.getSongF...
[ "protected", "void", "setupChannelFilter", "(", "ChannelMemory", "aktMemo", ",", "boolean", "bReset", ",", "int", "flt_modifier", ")", "{", "double", "cutOff", "=", "(", "double", ")", "(", "(", "aktMemo", ".", "nCutOff", "+", "aktMemo", ".", "nCutSwing", ")...
Simple 2-poles resonant filter @since 31.03.2010 @param aktMemo @param bReset @param flt_modifier
[ "Simple", "2", "-", "poles", "resonant", "filter" ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java#L512-L550
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsDObjectMgr.java
PresentsDObjectMgr.registerProxyObject
public void registerProxyObject (DObject object, DObjectManager omgr) { """ Registers an object managed by another distributed object manager (probably on another server). The local server will assign the object a proxy oid, and any events that come in on this object will be rewritten from their proxy oid to the...
java
public void registerProxyObject (DObject object, DObjectManager omgr) { int origObjectId = object.getOid(); // register the object locally which will reassign its oid and set us as its manager registerObject(object); // and note a proxy reference for the object which we'll use to for...
[ "public", "void", "registerProxyObject", "(", "DObject", "object", ",", "DObjectManager", "omgr", ")", "{", "int", "origObjectId", "=", "object", ".", "getOid", "(", ")", ";", "// register the object locally which will reassign its oid and set us as its manager", "registerO...
Registers an object managed by another distributed object manager (probably on another server). The local server will assign the object a proxy oid, and any events that come in on this object will be rewritten from their proxy oid to their original id before forwarding on to the originating object manager.
[ "Registers", "an", "object", "managed", "by", "another", "distributed", "object", "manager", "(", "probably", "on", "another", "server", ")", ".", "The", "local", "server", "will", "assign", "the", "object", "a", "proxy", "oid", "and", "any", "events", "that...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsDObjectMgr.java#L171-L179
jfinal/jfinal
src/main/java/com/jfinal/template/EngineConfig.java
EngineConfig.reloadSharedFunctionSourceList
private synchronized void reloadSharedFunctionSourceList() { """ Reload shared function source list devMode 要照顾到 sharedFunctionFiles,所以暂不提供 removeSharedFunction(String functionName) 功能 开发者可直接使用模板注释功能将不需要的 function 直接注释掉 """ Map<String, Define> newMap = createSharedFunctionMap(); for (int i = 0, size...
java
private synchronized void reloadSharedFunctionSourceList() { Map<String, Define> newMap = createSharedFunctionMap(); for (int i = 0, size = sharedFunctionSourceList.size(); i < size; i++) { ISource source = sharedFunctionSourceList.get(i); String fileName = source instanceof FileSource ? ((FileSource)sour...
[ "private", "synchronized", "void", "reloadSharedFunctionSourceList", "(", ")", "{", "Map", "<", "String", ",", "Define", ">", "newMap", "=", "createSharedFunctionMap", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "size", "=", "sharedFunctionSourceList...
Reload shared function source list devMode 要照顾到 sharedFunctionFiles,所以暂不提供 removeSharedFunction(String functionName) 功能 开发者可直接使用模板注释功能将不需要的 function 直接注释掉
[ "Reload", "shared", "function", "source", "list" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/template/EngineConfig.java#L183-L197
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/DBIDUtil.java
DBIDUtil.internalIntersection
private static ModifiableDBIDs internalIntersection(DBIDs first, DBIDs second) { """ Compute the set intersection of two sets. @param first First set @param second Second set @return result. """ second = second.size() > 16 && !(second instanceof SetDBIDs) ? newHashSet(second) : second; ModifiableD...
java
private static ModifiableDBIDs internalIntersection(DBIDs first, DBIDs second) { second = second.size() > 16 && !(second instanceof SetDBIDs) ? newHashSet(second) : second; ModifiableDBIDs inter = newHashSet(first.size()); for(DBIDIter it = first.iter(); it.valid(); it.advance()) { if(second.contains(...
[ "private", "static", "ModifiableDBIDs", "internalIntersection", "(", "DBIDs", "first", ",", "DBIDs", "second", ")", "{", "second", "=", "second", ".", "size", "(", ")", ">", "16", "&&", "!", "(", "second", "instanceof", "SetDBIDs", ")", "?", "newHashSet", ...
Compute the set intersection of two sets. @param first First set @param second Second set @return result.
[ "Compute", "the", "set", "intersection", "of", "two", "sets", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/DBIDUtil.java#L314-L323
jtrfp/jfdt
src/main/java/org/jtrfp/jfdt/Parser.java
Parser.writeBean
public void writeBean(ThirdPartyParseable bean,OutputStream os) { """ Write ThirdPartyParseable bean to the given OutputStream. @param bean @param os @since Sep 17, 2012 """ writeBean(bean,new EndianAwareDataOutputStream(new DataOutputStream(os))); }
java
public void writeBean(ThirdPartyParseable bean,OutputStream os){ writeBean(bean,new EndianAwareDataOutputStream(new DataOutputStream(os))); }
[ "public", "void", "writeBean", "(", "ThirdPartyParseable", "bean", ",", "OutputStream", "os", ")", "{", "writeBean", "(", "bean", ",", "new", "EndianAwareDataOutputStream", "(", "new", "DataOutputStream", "(", "os", ")", ")", ")", ";", "}" ]
Write ThirdPartyParseable bean to the given OutputStream. @param bean @param os @since Sep 17, 2012
[ "Write", "ThirdPartyParseable", "bean", "to", "the", "given", "OutputStream", "." ]
train
https://github.com/jtrfp/jfdt/blob/64e665669b5fcbfe96736346b4e7893e466dd8a0/src/main/java/org/jtrfp/jfdt/Parser.java#L175-L177
wildfly-extras/wildfly-camel
subsystem/core/src/main/java/org/wildfly/extension/camel/proxy/ProxyUtils.java
ProxyUtils.invokeProxied
public static void invokeProxied(final ProxiedAction action, final ClassLoader classLoader) throws Exception { """ Runs a {@link ProxiedAction} within a {@link Proxy} instance. See the following issues for information around its primary use case. https://issues.jboss.org/browse/ENTESB-7117 https://github.com/...
java
public static void invokeProxied(final ProxiedAction action, final ClassLoader classLoader) throws Exception { ProxiedAction proxy = (ProxiedAction) Proxy.newProxyInstance(classLoader, new Class<?>[] { ProxiedAction.class }, new InvocationHandler() { @Override public Object invoke(Object...
[ "public", "static", "void", "invokeProxied", "(", "final", "ProxiedAction", "action", ",", "final", "ClassLoader", "classLoader", ")", "throws", "Exception", "{", "ProxiedAction", "proxy", "=", "(", "ProxiedAction", ")", "Proxy", ".", "newProxyInstance", "(", "cla...
Runs a {@link ProxiedAction} within a {@link Proxy} instance. See the following issues for information around its primary use case. https://issues.jboss.org/browse/ENTESB-7117 https://github.com/wildfly-extras/wildfly-camel/issues/1919 @param action A ProxiedAction instance to invoke within a {@link Proxy} instance @...
[ "Runs", "a", "{", "@link", "ProxiedAction", "}", "within", "a", "{", "@link", "Proxy", "}", "instance", ".", "See", "the", "following", "issues", "for", "information", "around", "its", "primary", "use", "case", "." ]
train
https://github.com/wildfly-extras/wildfly-camel/blob/9ebd7e28574f277a6d5b583e8a4c357e1538c370/subsystem/core/src/main/java/org/wildfly/extension/camel/proxy/ProxyUtils.java#L47-L56
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_portability_id_cancel_POST
public void billingAccount_portability_id_cancel_POST(String billingAccount, Long id, String reason) throws IOException { """ Ask to cancel the portability REST: POST /telephony/{billingAccount}/portability/{id}/cancel @param reason [required] The cancellation reason @param billingAccount [required] The name ...
java
public void billingAccount_portability_id_cancel_POST(String billingAccount, Long id, String reason) throws IOException { String qPath = "/telephony/{billingAccount}/portability/{id}/cancel"; StringBuilder sb = path(qPath, billingAccount, id); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o,...
[ "public", "void", "billingAccount_portability_id_cancel_POST", "(", "String", "billingAccount", ",", "Long", "id", ",", "String", "reason", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/portability/{id}/cancel\"", ";", "StringBuil...
Ask to cancel the portability REST: POST /telephony/{billingAccount}/portability/{id}/cancel @param reason [required] The cancellation reason @param billingAccount [required] The name of your billingAccount @param id [required] The ID of the portability
[ "Ask", "to", "cancel", "the", "portability" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L359-L365
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
ClassBuilder.buildClassSignature
public void buildClassSignature(XMLNode node, Content classInfoTree) { """ Build the signature of the current class. @param node the XML element that specifies which components to document @param classInfoTree the content tree to which the documentation will be added """ StringBuilder modifiers = n...
java
public void buildClassSignature(XMLNode node, Content classInfoTree) { StringBuilder modifiers = new StringBuilder(classDoc.modifiers()); modifiers.append(modifiers.length() == 0 ? "" : " "); if (isEnum) { modifiers.append("enum "); int index; if ((index = mod...
[ "public", "void", "buildClassSignature", "(", "XMLNode", "node", ",", "Content", "classInfoTree", ")", "{", "StringBuilder", "modifiers", "=", "new", "StringBuilder", "(", "classDoc", ".", "modifiers", "(", ")", ")", ";", "modifiers", ".", "append", "(", "modi...
Build the signature of the current class. @param node the XML element that specifies which components to document @param classInfoTree the content tree to which the documentation will be added
[ "Build", "the", "signature", "of", "the", "current", "class", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java#L291-L313
AKSW/RDFUnit
rdfunit-core/src/main/java/org/aksw/rdfunit/utils/StringUtils.java
StringUtils.getHashFromString
public static String getHashFromString(String str) { """ Generates a sha-256 hash from a string Taken from http://stackoverflow.com/questions/415953/generate-md5-hash-in-java @param str a {@link java.lang.String} object. @return a {@link java.lang.String} object. @since 0.7.2 """ try { ...
java
public static String getHashFromString(String str) { try { java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-256"); byte[] array = md.digest(str.getBytes("UTF-8")); StringBuilder sb = new StringBuilder(); for (byte anArray : array) { ...
[ "public", "static", "String", "getHashFromString", "(", "String", "str", ")", "{", "try", "{", "java", ".", "security", ".", "MessageDigest", "md", "=", "java", ".", "security", ".", "MessageDigest", ".", "getInstance", "(", "\"SHA-256\"", ")", ";", "byte", ...
Generates a sha-256 hash from a string Taken from http://stackoverflow.com/questions/415953/generate-md5-hash-in-java @param str a {@link java.lang.String} object. @return a {@link java.lang.String} object. @since 0.7.2
[ "Generates", "a", "sha", "-", "256", "hash", "from", "a", "string", "Taken", "from", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "415953", "/", "generate", "-", "md5", "-", "hash", "-", "in", "-", "java" ]
train
https://github.com/AKSW/RDFUnit/blob/083f18ebda4ad790b1fbb4cfe1c9dd1762d51384/rdfunit-core/src/main/java/org/aksw/rdfunit/utils/StringUtils.java#L23-L35
cdk/cdk
display/render/src/main/java/org/openscience/cdk/renderer/color/CDKAtomColors.java
CDKAtomColors.getAtomColor
@Override public Color getAtomColor(IAtom atom, Color defaultColor) { """ Returns the CDK scheme color for the given atom's element, or defaults to the given color if no color is defined. @param atom IAtom to get a color for @param defaultColor Color returned if this scheme does not define a colo...
java
@Override public Color getAtomColor(IAtom atom, Color defaultColor) { Color color = defaultColor; if (atom.getAtomicNumber() == null) return defaultColor; int atomnumber = atom.getAtomicNumber(); switch (atomnumber) { case 1: color = HYDROGEN; ...
[ "@", "Override", "public", "Color", "getAtomColor", "(", "IAtom", "atom", ",", "Color", "defaultColor", ")", "{", "Color", "color", "=", "defaultColor", ";", "if", "(", "atom", ".", "getAtomicNumber", "(", ")", "==", "null", ")", "return", "defaultColor", ...
Returns the CDK scheme color for the given atom's element, or defaults to the given color if no color is defined. @param atom IAtom to get a color for @param defaultColor Color returned if this scheme does not define a color for the passed IAtom @return the atom's color according to this coloring s...
[ "Returns", "the", "CDK", "scheme", "color", "for", "the", "given", "atom", "s", "element", "or", "defaults", "to", "the", "given", "color", "if", "no", "color", "is", "defined", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/render/src/main/java/org/openscience/cdk/renderer/color/CDKAtomColors.java#L65-L94
azkaban/azkaban
az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/javautils/FileUtils.java
FileUtils.deleteFileOrDirectory
public static void deleteFileOrDirectory(File file) { """ Delete file or directory. (Apache FileUtils.deleteDirectory has a bug and is not working.) """ if (!file.isDirectory()) { file.delete(); return; } if (file.list().length == 0) { //Nothing under directory. Just delete it. ...
java
public static void deleteFileOrDirectory(File file) { if (!file.isDirectory()) { file.delete(); return; } if (file.list().length == 0) { //Nothing under directory. Just delete it. file.delete(); return; } for (String temp : file.list()) { //Delete files or directory under c...
[ "public", "static", "void", "deleteFileOrDirectory", "(", "File", "file", ")", "{", "if", "(", "!", "file", ".", "isDirectory", "(", ")", ")", "{", "file", ".", "delete", "(", ")", ";", "return", ";", "}", "if", "(", "file", ".", "list", "(", ")", ...
Delete file or directory. (Apache FileUtils.deleteDirectory has a bug and is not working.)
[ "Delete", "file", "or", "directory", ".", "(", "Apache", "FileUtils", ".", "deleteDirectory", "has", "a", "bug", "and", "is", "not", "working", ".", ")" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/javautils/FileUtils.java#L40-L57
ksoichiro/Android-ObservableScrollView
library/src/main/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java
ScrollUtils.getColorWithAlpha
public static int getColorWithAlpha(float alpha, int baseColor) { """ Create a color integer value with specified alpha. <p>This may be useful to change alpha value of background color.</p> @param alpha Alpha value from 0.0f to 1.0f. @param baseColor Base color. alpha value will be ignored. @return A col...
java
public static int getColorWithAlpha(float alpha, int baseColor) { int a = Math.min(255, Math.max(0, (int) (alpha * 255))) << 24; int rgb = 0x00ffffff & baseColor; return a + rgb; }
[ "public", "static", "int", "getColorWithAlpha", "(", "float", "alpha", ",", "int", "baseColor", ")", "{", "int", "a", "=", "Math", ".", "min", "(", "255", ",", "Math", ".", "max", "(", "0", ",", "(", "int", ")", "(", "alpha", "*", "255", ")", ")"...
Create a color integer value with specified alpha. <p>This may be useful to change alpha value of background color.</p> @param alpha Alpha value from 0.0f to 1.0f. @param baseColor Base color. alpha value will be ignored. @return A color with alpha made from base color.
[ "Create", "a", "color", "integer", "value", "with", "specified", "alpha", ".", "<p", ">", "This", "may", "be", "useful", "to", "change", "alpha", "value", "of", "background", "color", ".", "<", "/", "p", ">" ]
train
https://github.com/ksoichiro/Android-ObservableScrollView/blob/47a5fb2db5e93d923a8c6772cde48bbb7d932345/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java#L53-L57
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/GeneralPath.java
GeneralPath.shapeOf
public static GeneralPath shapeOf(Shape shape, Color color) { """ Create a filled path of the specified Java 2D Shape and color. @param shape Java 2D shape @param color the color to fill the shape with @return a new general path """ List<PathElement> elements = new ArrayList<PathElement>(); ...
java
public static GeneralPath shapeOf(Shape shape, Color color) { List<PathElement> elements = new ArrayList<PathElement>(); PathIterator pathIt = shape.getPathIterator(new AffineTransform()); double[] data = new double[6]; while (!pathIt.isDone()) { switch (pathIt.currentSegment...
[ "public", "static", "GeneralPath", "shapeOf", "(", "Shape", "shape", ",", "Color", "color", ")", "{", "List", "<", "PathElement", ">", "elements", "=", "new", "ArrayList", "<", "PathElement", ">", "(", ")", ";", "PathIterator", "pathIt", "=", "shape", ".",...
Create a filled path of the specified Java 2D Shape and color. @param shape Java 2D shape @param color the color to fill the shape with @return a new general path
[ "Create", "a", "filled", "path", "of", "the", "specified", "Java", "2D", "Shape", "and", "color", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/GeneralPath.java#L132-L157
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.setIntHeader
@Deprecated public static void setIntHeader(HttpMessage message, String name, int value) { """ @deprecated Use {@link #setInt(CharSequence, int)} instead. @see #setIntHeader(HttpMessage, CharSequence, int) """ message.headers().setInt(name, value); }
java
@Deprecated public static void setIntHeader(HttpMessage message, String name, int value) { message.headers().setInt(name, value); }
[ "@", "Deprecated", "public", "static", "void", "setIntHeader", "(", "HttpMessage", "message", ",", "String", "name", ",", "int", "value", ")", "{", "message", ".", "headers", "(", ")", ".", "setInt", "(", "name", ",", "value", ")", ";", "}" ]
@deprecated Use {@link #setInt(CharSequence, int)} instead. @see #setIntHeader(HttpMessage, CharSequence, int)
[ "@deprecated", "Use", "{", "@link", "#setInt", "(", "CharSequence", "int", ")", "}", "instead", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L764-L767
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeUUIDWithDefault
@Pure public static UUID getAttributeUUIDWithDefault(Node document, boolean caseSensitive, UUID defaultValue, String... path) { """ Replies the UUID that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is t...
java
@Pure public static UUID getAttributeUUIDWithDefault(Node document, boolean caseSensitive, UUID defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); final String v = getAttributeValue(document, caseSensitive, 0, path); if (v != null && !v.isEmpty()) { try { final U...
[ "@", "Pure", "public", "static", "UUID", "getAttributeUUIDWithDefault", "(", "Node", "document", ",", "boolean", "caseSensitive", ",", "UUID", "defaultValue", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".",...
Replies the UUID that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is the XML document to explore. @param caseSensitive indicates of the {@code path}'s components are case sensitive. @param defaultValue is the defa...
[ "Replies", "the", "UUID", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1117-L1132
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java
CSSHTMLBundleLinkRenderer.performGlobalBundleLinksRendering
@Override protected void performGlobalBundleLinksRendering(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { """ Performs the global bundle rendering @param ctx the context @param out the writer @param debugOn the flag indicating if we are in debug mode or not @throws IOExce...
java
@Override protected void performGlobalBundleLinksRendering(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { if (isForcedToRenderIeCssBundleInDebug(ctx, debugOn)) { ResourceBundlePathsIterator resourceBundleIterator = bundler.getGlobalResourceBundlePaths( DebugMode.FORCE_NON_DE...
[ "@", "Override", "protected", "void", "performGlobalBundleLinksRendering", "(", "BundleRendererContext", "ctx", ",", "Writer", "out", ",", "boolean", "debugOn", ")", "throws", "IOException", "{", "if", "(", "isForcedToRenderIeCssBundleInDebug", "(", "ctx", ",", "debug...
Performs the global bundle rendering @param ctx the context @param out the writer @param debugOn the flag indicating if we are in debug mode or not @throws IOException if an IO exception occurs
[ "Performs", "the", "global", "bundle", "rendering" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/CSSHTMLBundleLinkRenderer.java#L190-L205
threerings/nenya
tools/src/main/java/com/threerings/media/tile/tools/xml/XMLTileSetParser.java
XMLTileSetParser.loadTileSets
public void loadTileSets (File file, Map<String, TileSet> tilesets) throws IOException { """ Loads all of the tilesets specified in the supplied XML tileset description file and places them into the supplied map indexed by tileset name. This method is not reentrant, so don't go calling it from multiple ...
java
public void loadTileSets (File file, Map<String, TileSet> tilesets) throws IOException { // load up the tilesets loadTileSets(new FileInputStream(file), tilesets); }
[ "public", "void", "loadTileSets", "(", "File", "file", ",", "Map", "<", "String", ",", "TileSet", ">", "tilesets", ")", "throws", "IOException", "{", "// load up the tilesets", "loadTileSets", "(", "new", "FileInputStream", "(", "file", ")", ",", "tilesets", "...
Loads all of the tilesets specified in the supplied XML tileset description file and places them into the supplied map indexed by tileset name. This method is not reentrant, so don't go calling it from multiple threads. @param file the file in which the tileset definition file can be found. @param tilesets the map int...
[ "Loads", "all", "of", "the", "tilesets", "specified", "in", "the", "supplied", "XML", "tileset", "description", "file", "and", "places", "them", "into", "the", "supplied", "map", "indexed", "by", "tileset", "name", ".", "This", "method", "is", "not", "reentr...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/media/tile/tools/xml/XMLTileSetParser.java#L123-L128
calimero-project/calimero-core
src/tuwien/auto/calimero/datapoint/Datapoint.java
Datapoint.readDPType
private static boolean readDPType(final XmlReader r) throws KNXMLException { """ /* returns true for state based DP, false for command based DP """ final String a = r.getAttributeValue(null, ATTR_STATEBASED); if ("false".equalsIgnoreCase(a)) return false; if ("true".equalsIgnoreCase(a)) return true...
java
private static boolean readDPType(final XmlReader r) throws KNXMLException { final String a = r.getAttributeValue(null, ATTR_STATEBASED); if ("false".equalsIgnoreCase(a)) return false; if ("true".equalsIgnoreCase(a)) return true; throw new KNXMLException("malformed attribute " + ATTR_STATEBASED, r); }
[ "private", "static", "boolean", "readDPType", "(", "final", "XmlReader", "r", ")", "throws", "KNXMLException", "{", "final", "String", "a", "=", "r", ".", "getAttributeValue", "(", "null", ",", "ATTR_STATEBASED", ")", ";", "if", "(", "\"false\"", ".", "equal...
/* returns true for state based DP, false for command based DP
[ "/", "*", "returns", "true", "for", "state", "based", "DP", "false", "for", "command", "based", "DP" ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/datapoint/Datapoint.java#L315-L323
kuali/ojb-1.0.4
src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java
ConcreteEditingContext.isEqual
private boolean isEqual(Object fld1, Object fld2) { """ This method compared simple field values: there are some tricks... """ if (fld1 == null || fld2 == null) { return (fld1 == fld2); } else if ((fld1 instanceof BigDecimal) && (fld2 instanceof BigDecimal)) ...
java
private boolean isEqual(Object fld1, Object fld2) { if (fld1 == null || fld2 == null) { return (fld1 == fld2); } else if ((fld1 instanceof BigDecimal) && (fld2 instanceof BigDecimal)) { return (((BigDecimal) fld1).compareTo((BigDecimal) fld2) =...
[ "private", "boolean", "isEqual", "(", "Object", "fld1", ",", "Object", "fld2", ")", "{", "if", "(", "fld1", "==", "null", "||", "fld2", "==", "null", ")", "{", "return", "(", "fld1", "==", "fld2", ")", ";", "}", "else", "if", "(", "(", "fld1", "i...
This method compared simple field values: there are some tricks...
[ "This", "method", "compared", "simple", "field", "values", ":", "there", "are", "some", "tricks", "..." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java#L898-L916
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/NodeManager.java
NodeManager.getRunnableNode
public ClusterNode getRunnableNode(String host, LocalityLevel maxLevel, ResourceType type, Set<String> excluded) { """ Find the best matching node for this host subject to the maxLevel constraint @param host the host of the request @param maxLevel the max locality level to consider @param type the type o...
java
public ClusterNode getRunnableNode(String host, LocalityLevel maxLevel, ResourceType type, Set<String> excluded) { if (host == null) { RunnableIndices r = typeToIndices.get(type); return r.getRunnableNodeForAny(excluded); } RequestedNode node = resolve(host, type); return getRunnableNo...
[ "public", "ClusterNode", "getRunnableNode", "(", "String", "host", ",", "LocalityLevel", "maxLevel", ",", "ResourceType", "type", ",", "Set", "<", "String", ">", "excluded", ")", "{", "if", "(", "host", "==", "null", ")", "{", "RunnableIndices", "r", "=", ...
Find the best matching node for this host subject to the maxLevel constraint @param host the host of the request @param maxLevel the max locality level to consider @param type the type of resource needed on the node @param excluded the list of nodes to exclude from consideration @return the runnable node satisfying the...
[ "Find", "the", "best", "matching", "node", "for", "this", "host", "subject", "to", "the", "maxLevel", "constraint" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/NodeManager.java#L583-L591
iorga-group/iraj
iraj/src/main/java/com/iorga/iraj/servlet/CacheAwareServlet.java
CacheAwareServlet.doGet
@Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { """ Process a GET request for the specified resource. @param request The servlet request we are processing @param response The servlet response we are creating @exce...
java
@Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { // Serve the requested resource, including the data content serveResource(request, response, true); }
[ "@", "Override", "protected", "void", "doGet", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ")", "throws", "IOException", ",", "ServletException", "{", "// Serve the requested resource, including the data content", "serveReso...
Process a GET request for the specified resource. @param request The servlet request we are processing @param response The servlet response we are creating @exception IOException if an input/output error occurs @exception ServletException if a servlet-specified error occurs
[ "Process", "a", "GET", "request", "for", "the", "specified", "resource", "." ]
train
https://github.com/iorga-group/iraj/blob/5fdee26464248f29833610de402275eb64505542/iraj/src/main/java/com/iorga/iraj/servlet/CacheAwareServlet.java#L163-L169
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/client/ClientResolver.java
ClientResolver.getClientFactory
public static ClientFactory getClientFactory(String persistenceUnit, Map<String, Object> puProperties,final KunderaMetadata kunderaMetadata) { """ Gets the client factory. @param persistenceUnit the persistence unit @return the client factory """ ClientFactory clientFactory = instantiateClientFac...
java
public static ClientFactory getClientFactory(String persistenceUnit, Map<String, Object> puProperties,final KunderaMetadata kunderaMetadata) { ClientFactory clientFactory = instantiateClientFactory(persistenceUnit, puProperties, kunderaMetadata); clientFactories.put(persistenceUnit, clientFactory...
[ "public", "static", "ClientFactory", "getClientFactory", "(", "String", "persistenceUnit", ",", "Map", "<", "String", ",", "Object", ">", "puProperties", ",", "final", "KunderaMetadata", "kunderaMetadata", ")", "{", "ClientFactory", "clientFactory", "=", "instantiateC...
Gets the client factory. @param persistenceUnit the persistence unit @return the client factory
[ "Gets", "the", "client", "factory", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/client/ClientResolver.java#L54-L59
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileUtil.java
FileUtil.unTar
public static void unTar(File inFile, File untarDir) throws IOException { """ Given a Tar File as input it will untar the file in a the untar directory passed as the second parameter This utility will untar ".tar" files and ".tar.gz","tgz" files. @param inFile The tar file as input. @param untarDir The unt...
java
public static void unTar(File inFile, File untarDir) throws IOException { if (!untarDir.mkdirs()) { if (!untarDir.isDirectory()) { throw new IOException("Mkdirs failed to create " + untarDir); } } StringBuffer untarCommand = new StringBuffer(); boolean gzipped = inFile.toString().en...
[ "public", "static", "void", "unTar", "(", "File", "inFile", ",", "File", "untarDir", ")", "throws", "IOException", "{", "if", "(", "!", "untarDir", ".", "mkdirs", "(", ")", ")", "{", "if", "(", "!", "untarDir", ".", "isDirectory", "(", ")", ")", "{",...
Given a Tar File as input it will untar the file in a the untar directory passed as the second parameter This utility will untar ".tar" files and ".tar.gz","tgz" files. @param inFile The tar file as input. @param untarDir The untar directory where to untar the tar file. @throws IOException
[ "Given", "a", "Tar", "File", "as", "input", "it", "will", "untar", "the", "file", "in", "a", "the", "untar", "directory", "passed", "as", "the", "second", "parameter" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileUtil.java#L680-L712
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLUnit.java
XMLUnit.compareXML
public static Diff compareXML(String control, String test) throws SAXException, IOException { """ Compare two XML documents provided as strings @param control Control document @param test Document to test @return Diff object describing differences in documents @throws SAXException @throws IOException ...
java
public static Diff compareXML(String control, String test) throws SAXException, IOException { return new Diff(control, test); }
[ "public", "static", "Diff", "compareXML", "(", "String", "control", ",", "String", "test", ")", "throws", "SAXException", ",", "IOException", "{", "return", "new", "Diff", "(", "control", ",", "test", ")", ";", "}" ]
Compare two XML documents provided as strings @param control Control document @param test Document to test @return Diff object describing differences in documents @throws SAXException @throws IOException
[ "Compare", "two", "XML", "documents", "provided", "as", "strings" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLUnit.java#L619-L622
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java
JarClassLoader.loadJar
public static void loadJar(URLClassLoader loader, File jarFile) throws UtilException { """ 加载Jar文件到指定loader中 @param loader {@link URLClassLoader} @param jarFile 被加载的jar @throws UtilException IO异常包装和执行异常 """ try { final Method method = ClassUtil.getDeclaredMethod(URLClassLoader.class, "addURL", URL....
java
public static void loadJar(URLClassLoader loader, File jarFile) throws UtilException { try { final Method method = ClassUtil.getDeclaredMethod(URLClassLoader.class, "addURL", URL.class); if (null != method) { method.setAccessible(true); final List<File> jars = loopJar(jarFile); for (File jar :...
[ "public", "static", "void", "loadJar", "(", "URLClassLoader", "loader", ",", "File", "jarFile", ")", "throws", "UtilException", "{", "try", "{", "final", "Method", "method", "=", "ClassUtil", ".", "getDeclaredMethod", "(", "URLClassLoader", ".", "class", ",", ...
加载Jar文件到指定loader中 @param loader {@link URLClassLoader} @param jarFile 被加载的jar @throws UtilException IO异常包装和执行异常
[ "加载Jar文件到指定loader中" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java#L57-L70
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/cath/CathDomain.java
CathDomain.getChains
public Set<String> getChains() { """ Returns the chains this domain is defined over; contains more than 1 element only if this domains is a multi-chain domain. """ Set<String> chains = new HashSet<String>(); List<ResidueRange> rrs = toCanonical().getResidueRanges(); for (ResidueRange rr : rrs) chains.add...
java
public Set<String> getChains() { Set<String> chains = new HashSet<String>(); List<ResidueRange> rrs = toCanonical().getResidueRanges(); for (ResidueRange rr : rrs) chains.add(rr.getChainName()); return chains; } @Override public String getIdentifier() { return getCATH(); } @Override public Substructur...
[ "public", "Set", "<", "String", ">", "getChains", "(", ")", "{", "Set", "<", "String", ">", "chains", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "List", "<", "ResidueRange", ">", "rrs", "=", "toCanonical", "(", ")", ".", "getResidueRan...
Returns the chains this domain is defined over; contains more than 1 element only if this domains is a multi-chain domain.
[ "Returns", "the", "chains", "this", "domain", "is", "defined", "over", ";", "contains", "more", "than", "1", "element", "only", "if", "this", "domains", "is", "a", "multi", "-", "chain", "domain", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/cath/CathDomain.java#L424-L459
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.writeUser
public void writeUser(CmsRequestContext context, CmsUser user) throws CmsException, CmsRoleViolationException { """ Updates the user information. <p> The user id has to be a valid OpenCms user id.<br> The user with the given id will be completely overridden by the given data.<p> @param context the curren...
java
public void writeUser(CmsRequestContext context, CmsUser user) throws CmsException, CmsRoleViolationException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { CmsRole role = CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalUnit(user.getName())); chec...
[ "public", "void", "writeUser", "(", "CmsRequestContext", "context", ",", "CmsUser", "user", ")", "throws", "CmsException", ",", "CmsRoleViolationException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "try", ...
Updates the user information. <p> The user id has to be a valid OpenCms user id.<br> The user with the given id will be completely overridden by the given data.<p> @param context the current request context @param user the user to be updated @throws CmsRoleViolationException if the current user does not own the rul...
[ "Updates", "the", "user", "information", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6992-L7004
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.purgeDeletedKey
public void purgeDeletedKey(String vaultBaseUrl, String keyName) { """ Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This o...
java
public void purgeDeletedKey(String vaultBaseUrl, String keyName) { purgeDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName).toBlocking().single().body(); }
[ "public", "void", "purgeDeletedKey", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ")", "{", "purgeDeletedKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ...
Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission. @param vaultBaseUrl The vault n...
[ "Permanently", "deletes", "the", "specified", "key", ".", "The", "Purge", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", "vault", "i...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3145-L3147
marklogic/marklogic-contentpump
mapreduce/src/main/java/com/marklogic/mapreduce/utilities/URIUtil.java
URIUtil.applyUriReplace
public static String applyUriReplace(String uriSource, Configuration conf) { """ Apply URI replacement configuration option to a URI source string. The configuration option is a list of comma separated pairs of regex patterns and replacements. Validation of the configuration is done at command parsing time. ...
java
public static String applyUriReplace(String uriSource, Configuration conf) { if (uriSource == null) return null; String[] uriReplace = conf.getStrings(OUTPUT_URI_REPLACE); if (uriReplace == null) return uriSource; for (int i = 0; i < uriReplace.length - 1; i += 2) { String re...
[ "public", "static", "String", "applyUriReplace", "(", "String", "uriSource", ",", "Configuration", "conf", ")", "{", "if", "(", "uriSource", "==", "null", ")", "return", "null", ";", "String", "[", "]", "uriReplace", "=", "conf", ".", "getStrings", "(", "O...
Apply URI replacement configuration option to a URI source string. The configuration option is a list of comma separated pairs of regex patterns and replacements. Validation of the configuration is done at command parsing time. @param uriSource @param conf @return result URI string
[ "Apply", "URI", "replacement", "configuration", "option", "to", "a", "URI", "source", "string", ".", "The", "configuration", "option", "is", "a", "list", "of", "comma", "separated", "pairs", "of", "regex", "patterns", "and", "replacements", ".", "Validation", ...
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mapreduce/src/main/java/com/marklogic/mapreduce/utilities/URIUtil.java#L45-L55
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
MarkerManager.getMarker
@Deprecated public static Marker getMarker(final String name, final String parent) { """ Retrieves or creates a Marker with the specified parent. The parent must have been previously created. @param name The name of the Marker. @param parent The name of the parent Marker. @return The Marker with the speci...
java
@Deprecated public static Marker getMarker(final String name, final String parent) { final Marker parentMarker = MARKERS.get(parent); if (parentMarker == null) { throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined"); } return getMarker(na...
[ "@", "Deprecated", "public", "static", "Marker", "getMarker", "(", "final", "String", "name", ",", "final", "String", "parent", ")", "{", "final", "Marker", "parentMarker", "=", "MARKERS", ".", "get", "(", "parent", ")", ";", "if", "(", "parentMarker", "==...
Retrieves or creates a Marker with the specified parent. The parent must have been previously created. @param name The name of the Marker. @param parent The name of the parent Marker. @return The Marker with the specified name. @throws IllegalArgumentException if the parent Marker does not exist. @deprecated Use the M...
[ "Retrieves", "or", "creates", "a", "Marker", "with", "the", "specified", "parent", ".", "The", "parent", "must", "have", "been", "previously", "created", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L80-L87
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java
VirtualNetworkPeeringsInner.createOrUpdate
public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { """ Creates or updates a peering in the specified virtual network. @param resourceGroupName The name of the resour...
java
public VirtualNetworkPeeringInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, vi...
[ "public", "VirtualNetworkPeeringInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "String", "virtualNetworkPeeringName", ",", "VirtualNetworkPeeringInner", "virtualNetworkPeeringParameters", ")", "{", "return", "createOrUpdate...
Creates or updates a peering in the specified virtual network. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param virtualNetworkPeeringName The name of the peering. @param virtualNetworkPeeringParameters Parameters supplied to the create or update...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "virtual", "network", "." ]
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/VirtualNetworkPeeringsInner.java#L362-L364
code4everything/util
src/main/java/com/zhazhapan/config/JsonParser.java
JsonParser.arrayAdd
public void arrayAdd(String path, Object... values) { """ 数组追加数组 @param path <a href= "https://github.com/alibaba/fastjson/wiki/JSONPath">路径语法</a> @param values 数组 """ jsonStore.clear(); JSONPath.arrayAdd(jsonObject, checkPath(path), values); }
java
public void arrayAdd(String path, Object... values) { jsonStore.clear(); JSONPath.arrayAdd(jsonObject, checkPath(path), values); }
[ "public", "void", "arrayAdd", "(", "String", "path", ",", "Object", "...", "values", ")", "{", "jsonStore", ".", "clear", "(", ")", ";", "JSONPath", ".", "arrayAdd", "(", "jsonObject", ",", "checkPath", "(", "path", ")", ",", "values", ")", ";", "}" ]
数组追加数组 @param path <a href= "https://github.com/alibaba/fastjson/wiki/JSONPath">路径语法</a> @param values 数组
[ "数组追加数组" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/config/JsonParser.java#L180-L183
facebookarchive/hadoop-20
src/contrib/namespace-notifier/src/java/org/apache/hadoop/hdfs/notifier/server/ServerCore.java
ServerCore.queueNotifications
private void queueNotifications(long clientId, NamespaceEvent event, long txId) throws TransactionIdTooOldException, InvalidClientIdException { """ Queues the notification for a client. The queued notifications will be sent asynchronously after this method returns to the specified client. The queued noti...
java
private void queueNotifications(long clientId, NamespaceEvent event, long txId) throws TransactionIdTooOldException, InvalidClientIdException { if (txId == -1) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Queueing notifications for client " + clientId + " from txId " + ...
[ "private", "void", "queueNotifications", "(", "long", "clientId", ",", "NamespaceEvent", "event", ",", "long", "txId", ")", "throws", "TransactionIdTooOldException", ",", "InvalidClientIdException", "{", "if", "(", "txId", "==", "-", "1", ")", "{", "return", ";"...
Queues the notification for a client. The queued notifications will be sent asynchronously after this method returns to the specified client. The queued notifications will be notifications for the given event and their associated transaction id is greater then the given transaction id (exclusive). @param clientId the...
[ "Queues", "the", "notification", "for", "a", "client", ".", "The", "queued", "notifications", "will", "be", "sent", "asynchronously", "after", "this", "method", "returns", "to", "the", "specified", "client", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/namespace-notifier/src/java/org/apache/hadoop/hdfs/notifier/server/ServerCore.java#L667-L687
twilio/authy-java
src/main/java/com/authy/AuthyUtil.java
AuthyUtil.loadProperties
public static Properties loadProperties(String path, Class cls) { """ Loads your api_key and api_url properties from the given property file <p> Two important things to have in mind here: 1) if api_key and api_url are defined as environment variables, they will be returned as the properties. 2) If you want to ...
java
public static Properties loadProperties(String path, Class cls) { Properties properties = new Properties(); // environment variables will always override properties file try { InputStream in = cls.getResourceAsStream(path); // if we cant find the properties file ...
[ "public", "static", "Properties", "loadProperties", "(", "String", "path", ",", "Class", "cls", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "// environment variables will always override properties file", "try", "{", "InputStream", "...
Loads your api_key and api_url properties from the given property file <p> Two important things to have in mind here: 1) if api_key and api_url are defined as environment variables, they will be returned as the properties. 2) If you want to load your properties file have in mind your classloader path may change. @retu...
[ "Loads", "your", "api_key", "and", "api_url", "properties", "from", "the", "given", "property", "file", "<p", ">", "Two", "important", "things", "to", "have", "in", "mind", "here", ":", "1", ")", "if", "api_key", "and", "api_url", "are", "defined", "as", ...
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/AuthyUtil.java#L216-L244
nohana/Amalgam
amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java
PackageManagerUtils.isPackageInstalled
public static boolean isPackageInstalled(Context context, String targetPackage) { """ Checks if the target package is installed on this device. @param context the context. @param targetPackage the target package name. @return {@code true} if installed, false otherwise. """ PackageManager manager = c...
java
public static boolean isPackageInstalled(Context context, String targetPackage) { PackageManager manager = context.getPackageManager(); Intent intent = new Intent(); intent.setPackage(targetPackage); return manager.resolveActivity(intent, 0) != null; }
[ "public", "static", "boolean", "isPackageInstalled", "(", "Context", "context", ",", "String", "targetPackage", ")", "{", "PackageManager", "manager", "=", "context", ".", "getPackageManager", "(", ")", ";", "Intent", "intent", "=", "new", "Intent", "(", ")", ...
Checks if the target package is installed on this device. @param context the context. @param targetPackage the target package name. @return {@code true} if installed, false otherwise.
[ "Checks", "if", "the", "target", "package", "is", "installed", "on", "this", "device", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java#L87-L92
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/curves/ForwardCurveInterpolation.java
ForwardCurveInterpolation.getForward
@Override public double getForward(AnalyticModel model, double fixingTime, double paymentOffset) { """ Returns the forward for the corresponding fixing time. <b>Note:</b> This implementation currently ignores the provided <code>paymentOffset</code>. Instead it uses the payment offset calculate from the curve ...
java
@Override public double getForward(AnalyticModel model, double fixingTime, double paymentOffset) { double forward = this.getForward(model, fixingTime); double curvePaymentOffset = this.getPaymentOffset(fixingTime); if(paymentOffset != curvePaymentOffset) { forward = (Math.exp(Math.log(1+forward*curvePaymentO...
[ "@", "Override", "public", "double", "getForward", "(", "AnalyticModel", "model", ",", "double", "fixingTime", ",", "double", "paymentOffset", ")", "{", "double", "forward", "=", "this", ".", "getForward", "(", "model", ",", "fixingTime", ")", ";", "double", ...
Returns the forward for the corresponding fixing time. <b>Note:</b> This implementation currently ignores the provided <code>paymentOffset</code>. Instead it uses the payment offset calculate from the curve specification. @param model An analytic model providing a context. Some curves do not need this (can be null). ...
[ "Returns", "the", "forward", "for", "the", "corresponding", "fixing", "time", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/ForwardCurveInterpolation.java#L337-L347
canoo/dolphin-platform
platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/Assert.java
Assert.requireNonNullEntries
public static <T, L extends List<T>> L requireNonNullEntries(final L collection, final String argumentName) { """ Checks whether the specified {@code collection} contains null values, throws {@link IllegalStateException} with a customized error message if it has. @param collection the collection to be checked...
java
public static <T, L extends List<T>> L requireNonNullEntries(final L collection, final String argumentName) { requireNonNull(collection, argumentName); final String msg = String.format(NOT_NULL_ENTRIES_MSG_FORMAT, argumentName); for (final Object value : collection) { requireState(va...
[ "public", "static", "<", "T", ",", "L", "extends", "List", "<", "T", ">", ">", "L", "requireNonNullEntries", "(", "final", "L", "collection", ",", "final", "String", "argumentName", ")", "{", "requireNonNull", "(", "collection", ",", "argumentName", ")", "...
Checks whether the specified {@code collection} contains null values, throws {@link IllegalStateException} with a customized error message if it has. @param collection the collection to be checked. @param argumentName the name of the argument to be used in the error message. @return the {@code collection}. @throws j...
[ "Checks", "whether", "the", "specified", "{", "@code", "collection", "}", "contains", "null", "values", "throws", "{", "@link", "IllegalStateException", "}", "with", "a", "customized", "error", "message", "if", "it", "has", "." ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/Assert.java#L106-L113
darrachequesne/spring-data-jpa-datatables
src/main/java/org/springframework/data/jpa/datatables/mapping/DataTablesInput.java
DataTablesInput.addOrder
public void addOrder(String columnName, boolean ascending) { """ Add an order on the given column @param columnName the name of the column @param ascending whether the sorting is ascending or descending """ if (columnName == null) { return; } for (int i = 0; i < columns.size(); i++) { ...
java
public void addOrder(String columnName, boolean ascending) { if (columnName == null) { return; } for (int i = 0; i < columns.size(); i++) { if (!columnName.equals(columns.get(i).getData())) { continue; } order.add(new Order(i, ascending ? "asc" : "desc")); } }
[ "public", "void", "addOrder", "(", "String", "columnName", ",", "boolean", "ascending", ")", "{", "if", "(", "columnName", "==", "null", ")", "{", "return", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "columns", ".", "size", "(", ")"...
Add an order on the given column @param columnName the name of the column @param ascending whether the sorting is ascending or descending
[ "Add", "an", "order", "on", "the", "given", "column" ]
train
https://github.com/darrachequesne/spring-data-jpa-datatables/blob/0174dec8f52595a8e4b79f32c79922d64b02b732/src/main/java/org/springframework/data/jpa/datatables/mapping/DataTablesInput.java#L112-L122
sundrio/sundrio
annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java
ToPojo.readObjectArrayValue
private static String readObjectArrayValue(String ref, TypeDef source, Property property) { """ Returns the string representation of the code that reads an object array property. @param ref The reference. @param source The type of the reference. @param property The property to read. @retu...
java
private static String readObjectArrayValue(String ref, TypeDef source, Property property) { StringBuilder sb = new StringBuilder(); Method getter = getterOf(source, property); TypeRef getterTypeRef = getter.getReturnType(); TypeRef propertyTypeRef = property.getTypeRef(); if (pr...
[ "private", "static", "String", "readObjectArrayValue", "(", "String", "ref", ",", "TypeDef", "source", ",", "Property", "property", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "Method", "getter", "=", "getterOf", "(", "source",...
Returns the string representation of the code that reads an object array property. @param ref The reference. @param source The type of the reference. @param property The property to read. @return The code.
[ "Returns", "the", "string", "representation", "of", "the", "code", "that", "reads", "an", "object", "array", "property", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java#L788-L810
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/DiscordianDate.java
DiscordianDate.ofEpochDay
static DiscordianDate ofEpochDay(final long epochDay) { """ Obtains a {@code DiscordianDate} representing a date in the Discordian calendar system from the epoch-day. @param epochDay the epoch day to convert based on 1970-01-01 (ISO) @return the date in Discordian calendar system, not null @throws DateTimeE...
java
static DiscordianDate ofEpochDay(final long epochDay) { DiscordianChronology.EPOCH_DAY_RANGE.checkValidValue(epochDay, EPOCH_DAY); // use of Discordian 1167 makes leap year at end of long cycle long discordianEpochDay = epochDay + DISCORDIAN_1167_TO_ISO_1970; long longCycle = Math.floo...
[ "static", "DiscordianDate", "ofEpochDay", "(", "final", "long", "epochDay", ")", "{", "DiscordianChronology", ".", "EPOCH_DAY_RANGE", ".", "checkValidValue", "(", "epochDay", ",", "EPOCH_DAY", ")", ";", "// use of Discordian 1167 makes leap year at end of long cycle", "long...
Obtains a {@code DiscordianDate} representing a date in the Discordian calendar system from the epoch-day. @param epochDay the epoch day to convert based on 1970-01-01 (ISO) @return the date in Discordian calendar system, not null @throws DateTimeException if the epoch-day is out of range
[ "Obtains", "a", "{", "@code", "DiscordianDate", "}", "representing", "a", "date", "in", "the", "Discordian", "calendar", "system", "from", "the", "epoch", "-", "day", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/DiscordianDate.java#L261-L288
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.setBlastFromToPosition
public void setBlastFromToPosition(int start, int end) { """ Sets the QUERY_FROM and QUERY_TO parameters to be use by blast. Do not use if you want to use the whole sequence.<br/> Blastall equivalent: -L @param start QUERY_FROM parameter @param end QUERY_TO parameter """ if (start >= end) { throw new...
java
public void setBlastFromToPosition(int start, int end) { if (start >= end) { throw new IllegalArgumentException("Start index must be less than end index"); } setAlignmentOption(QUERY_FROM, String.valueOf(start)); setAlignmentOption(QUERY_TO, String.valueOf(end)); }
[ "public", "void", "setBlastFromToPosition", "(", "int", "start", ",", "int", "end", ")", "{", "if", "(", "start", ">=", "end", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Start index must be less than end index\"", ")", ";", "}", "setAlignmentOpt...
Sets the QUERY_FROM and QUERY_TO parameters to be use by blast. Do not use if you want to use the whole sequence.<br/> Blastall equivalent: -L @param start QUERY_FROM parameter @param end QUERY_TO parameter
[ "Sets", "the", "QUERY_FROM", "and", "QUERY_TO", "parameters", "to", "be", "use", "by", "blast", ".", "Do", "not", "use", "if", "you", "want", "to", "use", "the", "whole", "sequence", ".", "<br", "/", ">", "Blastall", "equivalent", ":", "-", "L" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L335-L341
whitesource/agents
wss-agent-utils/src/main/java/org/whitesource/agent/utils/ZipUtils.java
ZipUtils.writeChunkBytes
private static void writeChunkBytes(String text, File tempFileIn) throws IOException { """ Writes a string piece by piece to file @param text to input @param tempFileIn input @throws IOException exception when writing """ try (FileOutputStream writer = new FileOutputStream(tempFileIn)) { ...
java
private static void writeChunkBytes(String text, File tempFileIn) throws IOException { try (FileOutputStream writer = new FileOutputStream(tempFileIn)) { int chunk = text.length(); if (text.length() > STRING_MAX_SIZE) { chunk = text.length() / STRING_MAX_SIZE; ...
[ "private", "static", "void", "writeChunkBytes", "(", "String", "text", ",", "File", "tempFileIn", ")", "throws", "IOException", "{", "try", "(", "FileOutputStream", "writer", "=", "new", "FileOutputStream", "(", "tempFileIn", ")", ")", "{", "int", "chunk", "="...
Writes a string piece by piece to file @param text to input @param tempFileIn input @throws IOException exception when writing
[ "Writes", "a", "string", "piece", "by", "piece", "to", "file" ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-utils/src/main/java/org/whitesource/agent/utils/ZipUtils.java#L477-L495
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java
DeleteHandler.deleteEdgeReference
public boolean deleteEdgeReference(AtlasEdge edge, DataTypes.TypeCategory typeCategory, boolean isComposite, boolean forceDeleteStructTrait) throws AtlasException { """ Force delete is used to remove struct/trait in case of entity updates @param edge @param typeCategory @para...
java
public boolean deleteEdgeReference(AtlasEdge edge, DataTypes.TypeCategory typeCategory, boolean isComposite, boolean forceDeleteStructTrait) throws AtlasException { if (LOG.isDebugEnabled()) { LOG.debug("Deleting {}", string(edge)); } boolean forc...
[ "public", "boolean", "deleteEdgeReference", "(", "AtlasEdge", "edge", ",", "DataTypes", ".", "TypeCategory", "typeCategory", ",", "boolean", "isComposite", ",", "boolean", "forceDeleteStructTrait", ")", "throws", "AtlasException", "{", "if", "(", "LOG", ".", "isDebu...
Force delete is used to remove struct/trait in case of entity updates @param edge @param typeCategory @param isComposite @param forceDeleteStructTrait @return returns true if the edge reference is hard deleted @throws AtlasException
[ "Force", "delete", "is", "used", "to", "remove", "struct", "/", "trait", "in", "case", "of", "entity", "updates" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java#L211-L238
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java
ReferenceEntityLockService.isLocked
private boolean isLocked(Class entityType, String entityKey) throws LockingException { """ Answers if the entity represented by the entityType and entityKey already has a lock of some type. @param entityType @param entityKey @exception org.apereo.portal.concurrency.LockingException """ return isL...
java
private boolean isLocked(Class entityType, String entityKey) throws LockingException { return isLocked(entityType, entityKey, null); }
[ "private", "boolean", "isLocked", "(", "Class", "entityType", ",", "String", "entityKey", ")", "throws", "LockingException", "{", "return", "isLocked", "(", "entityType", ",", "entityKey", ",", "null", ")", ";", "}" ]
Answers if the entity represented by the entityType and entityKey already has a lock of some type. @param entityType @param entityKey @exception org.apereo.portal.concurrency.LockingException
[ "Answers", "if", "the", "entity", "represented", "by", "the", "entityType", "and", "entityKey", "already", "has", "a", "lock", "of", "some", "type", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java#L190-L192
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DPathUtils.java
DPathUtils.setValue
public static void setValue(Object target, String dPath, Object value) { """ Set a value to the target object specified by DPath expression. <p> Note: intermediated nodes will NOT be created. </p> <p> Note: if {@code value} is {@code null}: <ul> <li>If the specified item's parent is a list or array, the...
java
public static void setValue(Object target, String dPath, Object value) { setValue(target, dPath, value, false); }
[ "public", "static", "void", "setValue", "(", "Object", "target", ",", "String", "dPath", ",", "Object", "value", ")", "{", "setValue", "(", "target", ",", "dPath", ",", "value", ",", "false", ")", ";", "}" ]
Set a value to the target object specified by DPath expression. <p> Note: intermediated nodes will NOT be created. </p> <p> Note: if {@code value} is {@code null}: <ul> <li>If the specified item's parent is a list or array, the item (specified by {@code dPath}) will be set to {@code null}.</li> <li>If the specified i...
[ "Set", "a", "value", "to", "the", "target", "object", "specified", "by", "DPath", "expression", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DPathUtils.java#L607-L609
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/environment/Environment.java
Environment.getEnvVariable
public static String getEnvVariable( String name ) throws EnvironmentException { """ Gets the value of a shell environment variable. @param name the name of variable @return the String representation of an environment variable value @throws EnvironmentException if there is a problem accessing the ...
java
public static String getEnvVariable( String name ) throws EnvironmentException { if( isUnix() ) { Properties properties = getUnixShellVariables(); return properties.getProperty( name ); } else if( isWindows() ) { Properties properti...
[ "public", "static", "String", "getEnvVariable", "(", "String", "name", ")", "throws", "EnvironmentException", "{", "if", "(", "isUnix", "(", ")", ")", "{", "Properties", "properties", "=", "getUnixShellVariables", "(", ")", ";", "return", "properties", ".", "g...
Gets the value of a shell environment variable. @param name the name of variable @return the String representation of an environment variable value @throws EnvironmentException if there is a problem accessing the environment
[ "Gets", "the", "value", "of", "a", "shell", "environment", "variable", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/environment/Environment.java#L207-L223
lightblueseas/swing-components
src/main/java/de/alpharogroup/layout/ScreenSizeExtensions.java
ScreenSizeExtensions.getScreenDimension
public static Dimension getScreenDimension(Component component) { """ Gets the screen dimension. @param component the component @return the screen dimension """ int screenID = getScreenID(component); Dimension dimension = new Dimension(0, 0); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGra...
java
public static Dimension getScreenDimension(Component component) { int screenID = getScreenID(component); Dimension dimension = new Dimension(0, 0); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsConfiguration defaultConfiguration = ge.getScreenDevices()[screenID] .getDe...
[ "public", "static", "Dimension", "getScreenDimension", "(", "Component", "component", ")", "{", "int", "screenID", "=", "getScreenID", "(", "component", ")", ";", "Dimension", "dimension", "=", "new", "Dimension", "(", "0", ",", "0", ")", ";", "GraphicsEnviron...
Gets the screen dimension. @param component the component @return the screen dimension
[ "Gets", "the", "screen", "dimension", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/layout/ScreenSizeExtensions.java#L174-L185
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getReader
public static BufferedReader getReader(File file, Charset charset) throws IORuntimeException { """ 获得一个文件读取器 @param file 文件 @param charset 字符集 @return BufferedReader对象 @throws IORuntimeException IO异常 """ return IoUtil.getReader(getInputStream(file), charset); }
java
public static BufferedReader getReader(File file, Charset charset) throws IORuntimeException { return IoUtil.getReader(getInputStream(file), charset); }
[ "public", "static", "BufferedReader", "getReader", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "return", "IoUtil", ".", "getReader", "(", "getInputStream", "(", "file", ")", ",", "charset", ")", ";", "}" ]
获得一个文件读取器 @param file 文件 @param charset 字符集 @return BufferedReader对象 @throws IORuntimeException IO异常
[ "获得一个文件读取器" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2005-L2007
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/text/movingwindow/WindowConverter.java
WindowConverter.asExampleArray
public static INDArray asExampleArray(Window window, Word2Vec vec, boolean normalize) { """ Converts a window (each word in the window) in to a vector. Keep in mind each window is a multi word context. From there, each word uses the passed in model as a lookup table to get what vectors are relevant to t...
java
public static INDArray asExampleArray(Window window, Word2Vec vec, boolean normalize) { int length = vec.lookupTable().layerSize(); List<String> words = window.getWords(); int windowSize = vec.getWindow(); Preconditions.checkState(words.size() == vec.getWindow()); INDArray ret = ...
[ "public", "static", "INDArray", "asExampleArray", "(", "Window", "window", ",", "Word2Vec", "vec", ",", "boolean", "normalize", ")", "{", "int", "length", "=", "vec", ".", "lookupTable", "(", ")", ".", "layerSize", "(", ")", ";", "List", "<", "String", "...
Converts a window (each word in the window) in to a vector. Keep in mind each window is a multi word context. From there, each word uses the passed in model as a lookup table to get what vectors are relevant to the passed in windows @param window the window to take in. @param vec the model to use as a lookup table @...
[ "Converts", "a", "window", "(", "each", "word", "in", "the", "window", ")" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/text/movingwindow/WindowConverter.java#L57-L74
aleksandr-m/gitflow-maven-plugin
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
AbstractGitFlowMojo.gitTag
protected void gitTag(final String tagName, String message, boolean gpgSignTag, Map<String, String> messageProperties) throws MojoFailureException, CommandLineException { """ Executes git tag -a [-s] -m. @param tagName Name of the tag. @param message Tag message. @param gpgSignTag Make a GPG-si...
java
protected void gitTag(final String tagName, String message, boolean gpgSignTag, Map<String, String> messageProperties) throws MojoFailureException, CommandLineException { message = replaceProperties(message, messageProperties); if (gpgSignTag) { getLog().info("Creating GPG-signe...
[ "protected", "void", "gitTag", "(", "final", "String", "tagName", ",", "String", "message", ",", "boolean", "gpgSignTag", ",", "Map", "<", "String", ",", "String", ">", "messageProperties", ")", "throws", "MojoFailureException", ",", "CommandLineException", "{", ...
Executes git tag -a [-s] -m. @param tagName Name of the tag. @param message Tag message. @param gpgSignTag Make a GPG-signed tag. @param messageProperties Properties to replace in message. @throws MojoFailureException @throws CommandLineException
[ "Executes", "git", "tag", "-", "a", "[", "-", "s", "]", "-", "m", "." ]
train
https://github.com/aleksandr-m/gitflow-maven-plugin/blob/d7be13c653d885c1cb1d8cd0337fa9db985c381e/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java#L739-L752
signit-wesign/java-sdk
src/main/java/cn/signit/sdk/util/HmacSignatureBuilder.java
HmacSignatureBuilder.assertAuthFail
public void assertAuthFail(byte[] expectedSignature, BuilderMode builderMode, String errorMessage) { """ 断言认证失败.<br> 若认证成功,则抛出异常{@link java.lang.IllegalArgumentException}. @param expectedSignature 传入的期望摘要 @param builderMode 采用的构建模式 @param errorMessage 自定义异常抛出的消息 @throws IllegalArgumentException 参数不合法异常 ...
java
public void assertAuthFail(byte[] expectedSignature, BuilderMode builderMode, String errorMessage) { if (isHashEquals(expectedSignature, builderMode)) { if (Validator.isEmpty(errorMessage)) { throw new IllegalArgumentException(); } else { throw new Illegal...
[ "public", "void", "assertAuthFail", "(", "byte", "[", "]", "expectedSignature", ",", "BuilderMode", "builderMode", ",", "String", "errorMessage", ")", "{", "if", "(", "isHashEquals", "(", "expectedSignature", ",", "builderMode", ")", ")", "{", "if", "(", "Vali...
断言认证失败.<br> 若认证成功,则抛出异常{@link java.lang.IllegalArgumentException}. @param expectedSignature 传入的期望摘要 @param builderMode 采用的构建模式 @param errorMessage 自定义异常抛出的消息 @throws IllegalArgumentException 参数不合法异常 @author zhd @since 1.0.0
[ "断言认证失败", ".", "<br", ">", "若认证成功", "则抛出异常", "{", "@link", "java", ".", "lang", ".", "IllegalArgumentException", "}", "." ]
train
https://github.com/signit-wesign/java-sdk/blob/6f3196c9d444818a953396fdaa8ffed9794d9530/src/main/java/cn/signit/sdk/util/HmacSignatureBuilder.java#L641-L649
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/hllmap/HllMap.java
HllMap.findEmpty
private static final int findEmpty(final byte[] key, final int tableEntries, final byte[] stateArr) { """ Find the first empty slot for the given key. Only used by resize, where it is known that the key does not exist in the table. Throws an exception if no empty slots. @param key the given key @param tableEnt...
java
private static final int findEmpty(final byte[] key, final int tableEntries, final byte[] stateArr) { final long[] hash = MurmurHash3.hash(key, SEED); int entryIndex = getIndex(hash[0], tableEntries); final int stride = getStride(hash[1], tableEntries); final int loopIndex = entryIndex; do { ...
[ "private", "static", "final", "int", "findEmpty", "(", "final", "byte", "[", "]", "key", ",", "final", "int", "tableEntries", ",", "final", "byte", "[", "]", "stateArr", ")", "{", "final", "long", "[", "]", "hash", "=", "MurmurHash3", ".", "hash", "(",...
Find the first empty slot for the given key. Only used by resize, where it is known that the key does not exist in the table. Throws an exception if no empty slots. @param key the given key @param tableEntries prime size of table @param stateArr the valid bit array @return the first empty slot for the given key
[ "Find", "the", "first", "empty", "slot", "for", "the", "given", "key", ".", "Only", "used", "by", "resize", "where", "it", "is", "known", "that", "the", "key", "does", "not", "exist", "in", "the", "table", ".", "Throws", "an", "exception", "if", "no", ...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hllmap/HllMap.java#L236-L249
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java
TransformationPerformer.transformObject
public Object transformObject(TransformationDescription description, Object source, Object target) throws InstantiationException, IllegalAccessException, ClassNotFoundException { """ Performs a transformation based merge of the given source object with the given target object based on the given Transforma...
java
public Object transformObject(TransformationDescription description, Object source, Object target) throws InstantiationException, IllegalAccessException, ClassNotFoundException { checkNeededValues(description); Class<?> sourceClass = modelRegistry.loadModel(description.getSourceModel()); ...
[ "public", "Object", "transformObject", "(", "TransformationDescription", "description", ",", "Object", "source", ",", "Object", "target", ")", "throws", "InstantiationException", ",", "IllegalAccessException", ",", "ClassNotFoundException", "{", "checkNeededValues", "(", ...
Performs a transformation based merge of the given source object with the given target object based on the given TransformationDescription.
[ "Performs", "a", "transformation", "based", "merge", "of", "the", "given", "source", "object", "with", "the", "given", "target", "object", "based", "on", "the", "given", "TransformationDescription", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java#L90-L108
enioka/jqm
jqm-all/jqm-admin/src/main/java/com/enioka/api/admin/ScheduledJob.java
ScheduledJob.addParameter
public ScheduledJob addParameter(String key, String value) { """ Add a parameter to the override parameters. See {@link #getParameters()}. @param key @param value @return """ this.parameters.put(key, value); return this; }
java
public ScheduledJob addParameter(String key, String value) { this.parameters.put(key, value); return this; }
[ "public", "ScheduledJob", "addParameter", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "parameters", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add a parameter to the override parameters. See {@link #getParameters()}. @param key @param value @return
[ "Add", "a", "parameter", "to", "the", "override", "parameters", ".", "See", "{", "@link", "#getParameters", "()", "}", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-admin/src/main/java/com/enioka/api/admin/ScheduledJob.java#L158-L162
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorTaskTracker.java
SimulatorTaskTracker.createTaskAttemptCompletionEvent
private TaskAttemptCompletionEvent createTaskAttemptCompletionEvent( SimulatorTaskInProgress tip, long now) { """ Creates a signal for itself marking the completion of a task attempt. It assumes that the task attempt hasn't made any progress in the user space code so far, i...
java
private TaskAttemptCompletionEvent createTaskAttemptCompletionEvent( SimulatorTaskInProgress tip, long now) { // We need to clone() status as we modify and it goes into an Event TaskStatus status = (TaskStatus)tip.getTaskStatus().clone(); long delta = tip.getUserSpaceR...
[ "private", "TaskAttemptCompletionEvent", "createTaskAttemptCompletionEvent", "(", "SimulatorTaskInProgress", "tip", ",", "long", "now", ")", "{", "// We need to clone() status as we modify and it goes into an Event", "TaskStatus", "status", "=", "(", "TaskStatus", ")", "tip", "...
Creates a signal for itself marking the completion of a task attempt. It assumes that the task attempt hasn't made any progress in the user space code so far, i.e. it is called right at launch for map tasks and immediately after all maps completed for reduce tasks. @param tip the simulator task in progress @param now ...
[ "Creates", "a", "signal", "for", "itself", "marking", "the", "completion", "of", "a", "task", "attempt", ".", "It", "assumes", "that", "the", "task", "attempt", "hasn", "t", "made", "any", "progress", "in", "the", "user", "space", "code", "so", "far", "i...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorTaskTracker.java#L274-L291
Impetus/Kundera
src/data-as-object/src/main/java/com/impetus/dao/utils/JsonUtil.java
JsonUtil.readJson
public final static <T> T readJson(String json, Class<T> clazz) { """ Read json. @param <T> the generic type @param json the json @param clazz the clazz @return the t """ ObjectMapper mapper = new ObjectMapper(); try { if (json != null && !json.isEmpty()) ...
java
public final static <T> T readJson(String json, Class<T> clazz) { ObjectMapper mapper = new ObjectMapper(); try { if (json != null && !json.isEmpty()) { return mapper.readValue(json, clazz); } else { ...
[ "public", "final", "static", "<", "T", ">", "T", "readJson", "(", "String", "json", ",", "Class", "<", "T", ">", "clazz", ")", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "try", "{", "if", "(", "json", "!=", "null", "&...
Read json. @param <T> the generic type @param json the json @param clazz the clazz @return the t
[ "Read", "json", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/data-as-object/src/main/java/com/impetus/dao/utils/JsonUtil.java#L47-L68
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/io/FileStorage.java
FileStorage.onStreamFile
@Handler @SuppressWarnings( { """ Opens a file for reading using the properties of the event and streams its content as a sequence of {@link Output} events with the end of record flag set in the last event. All generated events are considered responses to this event and therefore fired using the event proc...
java
@Handler @SuppressWarnings({ "PMD.AvoidInstantiatingObjectsInLoops", "PMD.AccessorClassGeneration", "PMD.AvoidDuplicateLiterals" }) public void onStreamFile(StreamFile event) throws InterruptedException { if (Arrays.asList(event.options()) .contains(StandardOpenOption.WRI...
[ "@", "Handler", "@", "SuppressWarnings", "(", "{", "\"PMD.AvoidInstantiatingObjectsInLoops\"", ",", "\"PMD.AccessorClassGeneration\"", ",", "\"PMD.AvoidDuplicateLiterals\"", "}", ")", "public", "void", "onStreamFile", "(", "StreamFile", "event", ")", "throws", "InterruptedE...
Opens a file for reading using the properties of the event and streams its content as a sequence of {@link Output} events with the end of record flag set in the last event. All generated events are considered responses to this event and therefore fired using the event processor from the event's I/O subchannel. @param ...
[ "Opens", "a", "file", "for", "reading", "using", "the", "properties", "of", "the", "event", "and", "streams", "its", "content", "as", "a", "sequence", "of", "{", "@link", "Output", "}", "events", "with", "the", "end", "of", "record", "flag", "set", "in",...
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/io/FileStorage.java#L103-L121
threerings/nenya
core/src/main/java/com/threerings/media/util/AStarPathUtil.java
AStarPathUtil.getPath
public static List<Point> getPath ( TraversalPred tpred, Object trav, int longest, int ax, int ay, int bx, int by, boolean partial) { """ Gets a path with the default stepper which assumes the piece can move one in any of the eight cardinal directions. """ return getPath(tpred, new Ste...
java
public static List<Point> getPath ( TraversalPred tpred, Object trav, int longest, int ax, int ay, int bx, int by, boolean partial) { return getPath(tpred, new Stepper(), trav, longest, ax, ay, bx, by, partial); }
[ "public", "static", "List", "<", "Point", ">", "getPath", "(", "TraversalPred", "tpred", ",", "Object", "trav", ",", "int", "longest", ",", "int", "ax", ",", "int", "ay", ",", "int", "bx", ",", "int", "by", ",", "boolean", "partial", ")", "{", "retur...
Gets a path with the default stepper which assumes the piece can move one in any of the eight cardinal directions.
[ "Gets", "a", "path", "with", "the", "default", "stepper", "which", "assumes", "the", "piece", "can", "move", "one", "in", "any", "of", "the", "eight", "cardinal", "directions", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/AStarPathUtil.java#L202-L207
javagl/CommonUI
src/main/java/de/javagl/common/ui/tree/filtered/TreeModelFilters.java
TreeModelFilters.acceptingAll
public static TreeModelFilter acceptingAll() { """ Returns a {@link TreeModelFilter} that is accepting all nodes. @return The new {@link TreeModelFilter} """ return new TreeModelFilter() { @Override public boolean acceptNode(TreeModel treeModel, TreeNode node) ...
java
public static TreeModelFilter acceptingAll() { return new TreeModelFilter() { @Override public boolean acceptNode(TreeModel treeModel, TreeNode node) { return true; } @Override public Stri...
[ "public", "static", "TreeModelFilter", "acceptingAll", "(", ")", "{", "return", "new", "TreeModelFilter", "(", ")", "{", "@", "Override", "public", "boolean", "acceptNode", "(", "TreeModel", "treeModel", ",", "TreeNode", "node", ")", "{", "return", "true", ";"...
Returns a {@link TreeModelFilter} that is accepting all nodes. @return The new {@link TreeModelFilter}
[ "Returns", "a", "{", "@link", "TreeModelFilter", "}", "that", "is", "accepting", "all", "nodes", "." ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/tree/filtered/TreeModelFilters.java#L43-L59
Azure/azure-sdk-for-java
containerservice/resource-manager/v2017_08_31/src/main/java/com/microsoft/azure/management/containerservice/v2017_08_31/implementation/ManagedClustersInner.java
ManagedClustersInner.beginCreateOrUpdateAsync
public Observable<ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { """ Creates or updates a managed cluster. Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. @param resourceGrou...
java
public Observable<ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<ManagedClusterInner>, ManagedClusterInner...
[ "public", "Observable", "<", "ManagedClusterInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ManagedClusterInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceG...
Creates or updates a managed cluster. Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @param parameters Parameters supplied to the Create or Up...
[ "Creates", "or", "updates", "a", "managed", "cluster", ".", "Creates", "or", "updates", "a", "managed", "cluster", "with", "the", "specified", "configuration", "for", "agents", "and", "Kubernetes", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2017_08_31/src/main/java/com/microsoft/azure/management/containerservice/v2017_08_31/implementation/ManagedClustersInner.java#L744-L751
nominanuda/zen-project
zen-dataobject/src/main/java/com/nominanuda/dataobject/DataStructHelper.java
DataStructHelper.copyPush
public void copyPush(Obj source, Obj target) { """ {a:1} {b:1} => {a:1, b:1} {a:1} {a:1} => {a:[1, 1]} {a:1} {a:null} => {a:[1, null]} {a:{b:1}} {a:null} => {a:[{b:1}, null]} {a:{b:1}} {a:{b:{c:null}}} => {a:{b:[1,{c:null}]}} {a:1} {a:[2]} => {a:[1,2]} {a:[1]} {a:[2]} => {a:[1,2]} {a:{b:1}} {a:[2]} => {a:[{b:1}...
java
public void copyPush(Obj source, Obj target) { Iterator<String> itr = source.keyIterator(); while (itr.hasNext()) { String key = itr.next(); Object sval = source.get(key); putPush(target, key, sval); } }
[ "public", "void", "copyPush", "(", "Obj", "source", ",", "Obj", "target", ")", "{", "Iterator", "<", "String", ">", "itr", "=", "source", ".", "keyIterator", "(", ")", ";", "while", "(", "itr", ".", "hasNext", "(", ")", ")", "{", "String", "key", "...
{a:1} {b:1} => {a:1, b:1} {a:1} {a:1} => {a:[1, 1]} {a:1} {a:null} => {a:[1, null]} {a:{b:1}} {a:null} => {a:[{b:1}, null]} {a:{b:1}} {a:{b:{c:null}}} => {a:{b:[1,{c:null}]}} {a:1} {a:[2]} => {a:[1,2]} {a:[1]} {a:[2]} => {a:[1,2]} {a:{b:1}} {a:[2]} => {a:[{b:1},2]} {a:{b:1}} {a:{b:[2]}} => {a:{b:[1,2]}} {a:1} {} => {a:...
[ "{", "a", ":", "1", "}", "{", "b", ":", "1", "}", "=", ">", "{", "a", ":", "1", "b", ":", "1", "}", "{", "a", ":", "1", "}", "{", "a", ":", "1", "}", "=", ">", "{", "a", ":", "[", "1", "1", "]", "}", "{", "a", ":", "1", "}", "...
train
https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-dataobject/src/main/java/com/nominanuda/dataobject/DataStructHelper.java#L226-L233
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
FSDirectory.unprotectedMkdir
private void unprotectedMkdir(long inodeId, INode[] inodes, int pos, byte[] name, PermissionStatus permission, boolean inheritPermission, long timestamp) throws QuotaExceededException { """ create a directory at index pos. The parent path to the directory is at [0, pos-1]. All ancestors exist. Newly ...
java
private void unprotectedMkdir(long inodeId, INode[] inodes, int pos, byte[] name, PermissionStatus permission, boolean inheritPermission, long timestamp) throws QuotaExceededException { inodes[pos] = addChild(inodes, pos, new INodeDirectory(inodeId, name, permission, timestamp), -1, inhe...
[ "private", "void", "unprotectedMkdir", "(", "long", "inodeId", ",", "INode", "[", "]", "inodes", ",", "int", "pos", ",", "byte", "[", "]", "name", ",", "PermissionStatus", "permission", ",", "boolean", "inheritPermission", ",", "long", "timestamp", ")", "thr...
create a directory at index pos. The parent path to the directory is at [0, pos-1]. All ancestors exist. Newly created one stored at index pos.
[ "create", "a", "directory", "at", "index", "pos", ".", "The", "parent", "path", "to", "the", "directory", "is", "at", "[", "0", "pos", "-", "1", "]", ".", "All", "ancestors", "exist", ".", "Newly", "created", "one", "stored", "at", "index", "pos", "....
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L2388-L2394
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/io/tbx/TbxExporter.java
TbxExporter.exportTBXDocument
private void exportTBXDocument(Document tbxDocument, Writer writer) throws TransformerException { """ Export the TBX document to a file specified in parameter. @throws TransformerException """ // Prepare the transformer to persist the file TransformerFactory transformerFactory = TransformerFactory...
java
private void exportTBXDocument(Document tbxDocument, Writer writer) throws TransformerException { // Prepare the transformer to persist the file TransformerFactory transformerFactory = TransformerFactory .newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutp...
[ "private", "void", "exportTBXDocument", "(", "Document", "tbxDocument", ",", "Writer", "writer", ")", "throws", "TransformerException", "{", "// Prepare the transformer to persist the file", "TransformerFactory", "transformerFactory", "=", "TransformerFactory", ".", "newInstanc...
Export the TBX document to a file specified in parameter. @throws TransformerException
[ "Export", "the", "TBX", "document", "to", "a", "file", "specified", "in", "parameter", "." ]
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/io/tbx/TbxExporter.java#L133-L153
etourdot/xincproc
xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java
XPointerEngine.verifyXPathExpression
public String verifyXPathExpression(final Iterable<XmlNsScheme> xmlNsSchemes, final String xpathExpression) { """ Utility method for verifying xpath expression @param xmlNsSchemes namespaces list @param xpathExpression xpath expression to test @return empty string if expression is right, error otherwise "...
java
public String verifyXPathExpression(final Iterable<XmlNsScheme> xmlNsSchemes, final String xpathExpression) { LOG.trace("verifyXPathExpression: {}", xpathExpression); final XPathCompiler xPathCompiler = processor.newXPathCompiler(); for (final XmlNsScheme xmlNsScheme : xmlNsSchemes) ...
[ "public", "String", "verifyXPathExpression", "(", "final", "Iterable", "<", "XmlNsScheme", ">", "xmlNsSchemes", ",", "final", "String", "xpathExpression", ")", "{", "LOG", ".", "trace", "(", "\"verifyXPathExpression: {}\"", ",", "xpathExpression", ")", ";", "final",...
Utility method for verifying xpath expression @param xmlNsSchemes namespaces list @param xpathExpression xpath expression to test @return empty string if expression is right, error otherwise
[ "Utility", "method", "for", "verifying", "xpath", "expression" ]
train
https://github.com/etourdot/xincproc/blob/6e9e9352e1975957ae6821a04c248ea49c7323ec/xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java#L225-L245
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java
DoradusServer.initEmbedded
private void initEmbedded(String[] args, String[] services) { """ Initialize server configuration and given+required services for embedded running. """ if (m_bInitialized) { m_logger.warn("initEmbedded: Already initialized -- ignoring"); return; } m_logger.i...
java
private void initEmbedded(String[] args, String[] services) { if (m_bInitialized) { m_logger.warn("initEmbedded: Already initialized -- ignoring"); return; } m_logger.info("Initializing embedded mode"); initConfig(args); initEmbeddedServices(service...
[ "private", "void", "initEmbedded", "(", "String", "[", "]", "args", ",", "String", "[", "]", "services", ")", "{", "if", "(", "m_bInitialized", ")", "{", "m_logger", ".", "warn", "(", "\"initEmbedded: Already initialized -- ignoring\"", ")", ";", "return", ";"...
Initialize server configuration and given+required services for embedded running.
[ "Initialize", "server", "configuration", "and", "given", "+", "required", "services", "for", "embedded", "running", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L305-L315
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_userLogs_login_PUT
public void serviceName_userLogs_login_PUT(String serviceName, String login, OvhUserLogs body) throws IOException { """ Alter this object properties REST: PUT /hosting/web/{serviceName}/userLogs/{login} @param body [required] New object properties @param serviceName [required] The internal name of your hostin...
java
public void serviceName_userLogs_login_PUT(String serviceName, String login, OvhUserLogs body) throws IOException { String qPath = "/hosting/web/{serviceName}/userLogs/{login}"; StringBuilder sb = path(qPath, serviceName, login); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_userLogs_login_PUT", "(", "String", "serviceName", ",", "String", "login", ",", "OvhUserLogs", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/userLogs/{login}\"", ";", "StringBuilder", "sb", ...
Alter this object properties REST: PUT /hosting/web/{serviceName}/userLogs/{login} @param body [required] New object properties @param serviceName [required] The internal name of your hosting @param login [required] The userLogs login used to connect to logs.ovh.net
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L710-L714
phax/ph-schedule
ph-mini-quartz/src/main/java/com/helger/quartz/impl/StdScheduler.java
StdScheduler.rescheduleJob
public Date rescheduleJob (final TriggerKey triggerKey, final ITrigger newTrigger) throws SchedulerException { """ <p> Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>. </p> """ return m_aSched.rescheduleJob (triggerKey, newTrigger); }
java
public Date rescheduleJob (final TriggerKey triggerKey, final ITrigger newTrigger) throws SchedulerException { return m_aSched.rescheduleJob (triggerKey, newTrigger); }
[ "public", "Date", "rescheduleJob", "(", "final", "TriggerKey", "triggerKey", ",", "final", "ITrigger", "newTrigger", ")", "throws", "SchedulerException", "{", "return", "m_aSched", ".", "rescheduleJob", "(", "triggerKey", ",", "newTrigger", ")", ";", "}" ]
<p> Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>. </p>
[ "<p", ">", "Calls", "the", "equivalent", "method", "on", "the", "proxied", "<code", ">", "QuartzScheduler<", "/", "code", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/impl/StdScheduler.java#L329-L332
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/ssh2/AuthenticationProtocol.java
AuthenticationProtocol.getAuthenticationMethods
public String getAuthenticationMethods(String username, String servicename) throws SshException { """ Get a list of available authentication methods for the user. It is advisable to call this method after contsructing the protocol instance and setting a <a href="BannerDisplay.html">BannerDisplay</a>. If the ...
java
public String getAuthenticationMethods(String username, String servicename) throws SshException { sendRequest(username, servicename, "none", null); try { readMessage(); transport .disconnect(TransportProtocol.PROTOCOL_ERROR, "Unexpected response received from Authentication Protocol"); thro...
[ "public", "String", "getAuthenticationMethods", "(", "String", "username", ",", "String", "servicename", ")", "throws", "SshException", "{", "sendRequest", "(", "username", ",", "servicename", ",", "\"none\"", ",", "null", ")", ";", "try", "{", "readMessage", "(...
Get a list of available authentication methods for the user. It is advisable to call this method after contsructing the protocol instance and setting a <a href="BannerDisplay.html">BannerDisplay</a>. If the server has a banner message to display it is most likely that the server will send it before completing this list...
[ "Get", "a", "list", "of", "available", "authentication", "methods", "for", "the", "user", ".", "It", "is", "advisable", "to", "call", "this", "method", "after", "contsructing", "the", "protocol", "instance", "and", "setting", "a", "<a", "href", "=", "BannerD...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/ssh2/AuthenticationProtocol.java#L234-L260
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
StringUtil.replaceAll
public String replaceAll(String pString, String pRegex, String pReplacement) { """ Replaces each substring of this string that matches the given regular expression with the given pReplacement. <p/> An invocation of this method of the form <tt>replaceAll(<i>str</i>, <i>pRegex</i>, <i>repl</i><)</tt> yields exa...
java
public String replaceAll(String pString, String pRegex, String pReplacement) { return Pattern.compile(pRegex).matcher(pString).replaceAll(pReplacement); }
[ "public", "String", "replaceAll", "(", "String", "pString", ",", "String", "pRegex", ",", "String", "pReplacement", ")", "{", "return", "Pattern", ".", "compile", "(", "pRegex", ")", ".", "matcher", "(", "pString", ")", ".", "replaceAll", "(", "pReplacement"...
Replaces each substring of this string that matches the given regular expression with the given pReplacement. <p/> An invocation of this method of the form <tt>replaceAll(<i>str</i>, <i>pRegex</i>, <i>repl</i><)</tt> yields exactly the same result as the expression <p/> <blockquote><tt> {@link Pattern}.{@link Pattern#c...
[ "Replaces", "each", "substring", "of", "this", "string", "that", "matches", "the", "given", "regular", "expression", "with", "the", "given", "pReplacement", ".", "<p", "/", ">", "An", "invocation", "of", "this", "method", "of", "the", "form", "<tt", ">", "...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java#L1831-L1833
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.setProjectAvatar
public Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws GitLabApiException { """ Uploads and sets the project avatar for the specified project. <pre><code>PUT /projects/:id/uploads</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(pa...
java
public Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws GitLabApiException { Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "projects", getProjectIdOrPath(projectIdOrPath)); return (response.readEntity(Project.class)); }
[ "public", "Project", "setProjectAvatar", "(", "Object", "projectIdOrPath", ",", "File", "avatarFile", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "putUpload", "(", "Response", ".", "Status", ".", "OK", ",", "\"avatar\"", ",", "avatarFile...
Uploads and sets the project avatar for the specified project. <pre><code>PUT /projects/:id/uploads</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param avatarFile the File instance of the avatar file to upload @return the up...
[ "Uploads", "and", "sets", "the", "project", "avatar", "for", "the", "specified", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2395-L2398