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
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java
JPAGenericDAORulesBasedImpl.addPredicates
protected void addPredicates(CriteriaBuilder criteriaBuilder, Root<T> root, CriteriaQuery<?> criteriaQuery, List<Predicate> predicates) { """ Méthode de chargement des prédicats @param criteriaBuilder Constructeur de critères @param root Objet racine @param criteriaQuery Requete de critères @param predicates L...
java
protected void addPredicates(CriteriaBuilder criteriaBuilder, Root<T> root, CriteriaQuery<?> criteriaQuery, List<Predicate> predicates) { // Si la liste de predicats est vide if(predicates == null || predicates.size() == 0) return; // Liste de predicats JPA 2 List<javax.persistence.criteria.Predicat...
[ "protected", "void", "addPredicates", "(", "CriteriaBuilder", "criteriaBuilder", ",", "Root", "<", "T", ">", "root", ",", "CriteriaQuery", "<", "?", ">", "criteriaQuery", ",", "List", "<", "Predicate", ">", "predicates", ")", "{", "// Si la liste de predicats est ...
Méthode de chargement des prédicats @param criteriaBuilder Constructeur de critères @param root Objet racine @param criteriaQuery Requete de critères @param predicates Liste des predicats
[ "Méthode", "de", "chargement", "des", "prédicats" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java#L714-L734
google/closure-compiler
src/com/google/javascript/rhino/Node.java
Node.replaceFirstOrChildAfter
public final void replaceFirstOrChildAfter(@Nullable Node prev, Node newChild) { """ Detaches the child after the given child, or the first child if prev is null. """ Node target = prev == null ? first : prev.next; checkNotNull(target, "prev doesn't have a sibling to replace."); replaceChild(target...
java
public final void replaceFirstOrChildAfter(@Nullable Node prev, Node newChild) { Node target = prev == null ? first : prev.next; checkNotNull(target, "prev doesn't have a sibling to replace."); replaceChild(target, newChild); }
[ "public", "final", "void", "replaceFirstOrChildAfter", "(", "@", "Nullable", "Node", "prev", ",", "Node", "newChild", ")", "{", "Node", "target", "=", "prev", "==", "null", "?", "first", ":", "prev", ".", "next", ";", "checkNotNull", "(", "target", ",", ...
Detaches the child after the given child, or the first child if prev is null.
[ "Detaches", "the", "child", "after", "the", "given", "child", "or", "the", "first", "child", "if", "prev", "is", "null", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/Node.java#L1033-L1037
airbnb/lottie-android
lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java
LottieCompositionFactory.fromAsset
public static LottieTask<LottieComposition> fromAsset(Context context, final String fileName) { """ Parse an animation from src/main/assets. It is recommended to use {@link #fromRawRes(Context, int)} instead. The asset file name will be used as a cache key so future usages won't have to parse the json again. How...
java
public static LottieTask<LottieComposition> fromAsset(Context context, final String fileName) { // Prevent accidentally leaking an Activity. final Context appContext = context.getApplicationContext(); return cache(fileName, new Callable<LottieResult<LottieComposition>>() { @Override public LottieResul...
[ "public", "static", "LottieTask", "<", "LottieComposition", ">", "fromAsset", "(", "Context", "context", ",", "final", "String", "fileName", ")", "{", "// Prevent accidentally leaking an Activity.", "final", "Context", "appContext", "=", "context", ".", "getApplicationC...
Parse an animation from src/main/assets. It is recommended to use {@link #fromRawRes(Context, int)} instead. The asset file name will be used as a cache key so future usages won't have to parse the json again. However, if your animation has images, you may package the json and images as a single flattened zip file in a...
[ "Parse", "an", "animation", "from", "src", "/", "main", "/", "assets", ".", "It", "is", "recommended", "to", "use", "{", "@link", "#fromRawRes", "(", "Context", "int", ")", "}", "instead", ".", "The", "asset", "file", "name", "will", "be", "used", "as"...
train
https://github.com/airbnb/lottie-android/blob/126dabdc9f586c87822f85fe1128cdad439d30fa/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java#L89-L97
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/datatypes/lcmsrun/LCMSRunInfo.java
LCMSRunInfo.addInstrument
public void addInstrument(Instrument instrument, String id) { """ If only one instrument is added, it will be set as the default instrument, all the scans, that you add to the ScanCollection will implicitly refer to this one instrument. @param id some identifier for mapping instruments. Instrumnt list is norma...
java
public void addInstrument(Instrument instrument, String id) { if (instrument == null || id == null) { throw new IllegalArgumentException("Instruemnt and ID must be non-null values."); } if (instruments.size() == 0) { defaultInstrumentID = id; } else if (instruments.size() > 0 && !isDefaultE...
[ "public", "void", "addInstrument", "(", "Instrument", "instrument", ",", "String", "id", ")", "{", "if", "(", "instrument", "==", "null", "||", "id", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Instruemnt and ID must be non-null val...
If only one instrument is added, it will be set as the default instrument, all the scans, that you add to the ScanCollection will implicitly refer to this one instrument. @param id some identifier for mapping instruments. Instrumnt list is normally stored at the beginning of the run file, so it's a mapping from this l...
[ "If", "only", "one", "instrument", "is", "added", "it", "will", "be", "set", "as", "the", "default", "instrument", "all", "the", "scans", "that", "you", "add", "to", "the", "ScanCollection", "will", "implicitly", "refer", "to", "this", "one", "instrument", ...
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/lcmsrun/LCMSRunInfo.java#L82-L93
VoltDB/voltdb
src/frontend/org/voltdb/NonVoltDBBackend.java
NonVoltDBBackend.isVarcharColumn
private boolean isVarcharColumn(String columnName, List<String> tableNames, boolean debugPrint) { """ Returns true if the <i>columnName</i> is a VARCHAR column type, of any size, or equivalents in a comparison, non-VoltDB database; false otherwise. """ List<String> varcharColumnTypes = Arrays.asList("...
java
private boolean isVarcharColumn(String columnName, List<String> tableNames, boolean debugPrint) { List<String> varcharColumnTypes = Arrays.asList("VARCHAR"); return isColumnType(varcharColumnTypes, columnName, tableNames, debugPrint); }
[ "private", "boolean", "isVarcharColumn", "(", "String", "columnName", ",", "List", "<", "String", ">", "tableNames", ",", "boolean", "debugPrint", ")", "{", "List", "<", "String", ">", "varcharColumnTypes", "=", "Arrays", ".", "asList", "(", "\"VARCHAR\"", ")"...
Returns true if the <i>columnName</i> is a VARCHAR column type, of any size, or equivalents in a comparison, non-VoltDB database; false otherwise.
[ "Returns", "true", "if", "the", "<i", ">", "columnName<", "/", "i", ">", "is", "a", "VARCHAR", "column", "type", "of", "any", "size", "or", "equivalents", "in", "a", "comparison", "non", "-", "VoltDB", "database", ";", "false", "otherwise", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NonVoltDBBackend.java#L563-L566
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java
LdapConnection.addAttributes
@Trivial private void addAttributes(Attributes sourceAttrs, Attributes descAttrs) { """ Add attributes new attributes to an existing {@link Attributes} instance. @param sourceAttrs The attributes to add. @param descAttrs The attributes to add to. """ for (NamingEnumeration<?> neu = sourceAttrs....
java
@Trivial private void addAttributes(Attributes sourceAttrs, Attributes descAttrs) { for (NamingEnumeration<?> neu = sourceAttrs.getAll(); neu.hasMoreElements();) { descAttrs.put((Attribute) neu.nextElement()); } }
[ "@", "Trivial", "private", "void", "addAttributes", "(", "Attributes", "sourceAttrs", ",", "Attributes", "descAttrs", ")", "{", "for", "(", "NamingEnumeration", "<", "?", ">", "neu", "=", "sourceAttrs", ".", "getAll", "(", ")", ";", "neu", ".", "hasMoreEleme...
Add attributes new attributes to an existing {@link Attributes} instance. @param sourceAttrs The attributes to add. @param descAttrs The attributes to add to.
[ "Add", "attributes", "new", "attributes", "to", "an", "existing", "{", "@link", "Attributes", "}", "instance", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java#L1056-L1061
mozilla/rhino
src/org/mozilla/classfile/ClassFileWriter.java
ClassFileWriter.startMethod
public void startMethod(String methodName, String type, short flags) { """ Add a method and begin adding code. This method must be called before other methods for adding code, exception tables, etc. can be invoked. @param methodName the name of the method @param type a string representing the type @param ...
java
public void startMethod(String methodName, String type, short flags) { short methodNameIndex = itsConstantPool.addUtf8(methodName); short typeIndex = itsConstantPool.addUtf8(type); itsCurrentMethod = new ClassFileMethod(methodName, methodNameIndex, type, typeIndex, flags); it...
[ "public", "void", "startMethod", "(", "String", "methodName", ",", "String", "type", ",", "short", "flags", ")", "{", "short", "methodNameIndex", "=", "itsConstantPool", ".", "addUtf8", "(", "methodName", ")", ";", "short", "typeIndex", "=", "itsConstantPool", ...
Add a method and begin adding code. This method must be called before other methods for adding code, exception tables, etc. can be invoked. @param methodName the name of the method @param type a string representing the type @param flags the attributes of the field, such as ACC_PUBLIC, etc. bitwise or'd together
[ "Add", "a", "method", "and", "begin", "adding", "code", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/classfile/ClassFileWriter.java#L234-L242
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/dbhandling/TorqueDBHandling.java
TorqueDBHandling.writeCompressedTexts
private void writeCompressedTexts(File dir, HashMap contents) throws IOException { """ Uncompresses the textual contents in the given map and and writes them to the files denoted by the keys of the map. @param dir The base directory into which the files will be written @param contents The map containing ...
java
private void writeCompressedTexts(File dir, HashMap contents) throws IOException { String filename; for (Iterator nameIt = contents.keySet().iterator(); nameIt.hasNext();) { filename = (String)nameIt.next(); writeCompressedText(new File(dir, filename), (byte[]...
[ "private", "void", "writeCompressedTexts", "(", "File", "dir", ",", "HashMap", "contents", ")", "throws", "IOException", "{", "String", "filename", ";", "for", "(", "Iterator", "nameIt", "=", "contents", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ...
Uncompresses the textual contents in the given map and and writes them to the files denoted by the keys of the map. @param dir The base directory into which the files will be written @param contents The map containing the contents indexed by the filename @throws IOException If an error occurred
[ "Uncompresses", "the", "textual", "contents", "in", "the", "given", "map", "and", "and", "writes", "them", "to", "the", "files", "denoted", "by", "the", "keys", "of", "the", "map", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/dbhandling/TorqueDBHandling.java#L623-L632
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.rejectChar
public static String rejectChar(String string, CharPredicate predicate) { """ @return a new string excluding all of the characters that return true for the specified {@code predicate}. @since 7.0 """ int size = string.length(); StringBuilder buffer = new StringBuilder(string.length()); ...
java
public static String rejectChar(String string, CharPredicate predicate) { int size = string.length(); StringBuilder buffer = new StringBuilder(string.length()); for (int i = 0; i < size; i++) { char character = string.charAt(i); if (!predicate.accept(character...
[ "public", "static", "String", "rejectChar", "(", "String", "string", ",", "CharPredicate", "predicate", ")", "{", "int", "size", "=", "string", ".", "length", "(", ")", ";", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", "string", ".", "length"...
@return a new string excluding all of the characters that return true for the specified {@code predicate}. @since 7.0
[ "@return", "a", "new", "string", "excluding", "all", "of", "the", "characters", "that", "return", "true", "for", "the", "specified", "{", "@code", "predicate", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L1044-L1057
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapefileWriter.java
ShapefileWriter.writeHeaders
public void writeHeaders(ShapeType type) throws IOException { """ Write the headers for this shapefile.Use this function before inserting the first geometry, then when all geometries are inserted. @param type Shape type @throws java.io.IOException """ try { handler = type.getShapeHandler(); } catch (S...
java
public void writeHeaders(ShapeType type) throws IOException { try { handler = type.getShapeHandler(); } catch (ShapefileException se) { throw new IOException("Error with type " + type, se); } if(indexBuffer != null) { indexBuffer.flush(); } if(shapeBuffer != null) { ...
[ "public", "void", "writeHeaders", "(", "ShapeType", "type", ")", "throws", "IOException", "{", "try", "{", "handler", "=", "type", ".", "getShapeHandler", "(", ")", ";", "}", "catch", "(", "ShapefileException", "se", ")", "{", "throw", "new", "IOException", ...
Write the headers for this shapefile.Use this function before inserting the first geometry, then when all geometries are inserted. @param type Shape type @throws java.io.IOException
[ "Write", "the", "headers", "for", "this", "shapefile", ".", "Use", "this", "function", "before", "inserting", "the", "first", "geometry", "then", "when", "all", "geometries", "are", "inserted", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/shp/internal/ShapefileWriter.java#L99-L129
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSCredentialImpl.java
GlobusGSSCredentialImpl.getPrivateKey
public PrivateKey getPrivateKey() throws GSSException { """ Returns the private key of this credential (if any). @return The private key. Might be null if this is an anonymous credential. """ try { return (this.cred == null) ? null : this.cred.getPrivateKey(); } catch (CredentialException e)...
java
public PrivateKey getPrivateKey() throws GSSException { try { return (this.cred == null) ? null : this.cred.getPrivateKey(); } catch (CredentialException e) { throw new GlobusGSSException(GSSException.FAILURE, e); } }
[ "public", "PrivateKey", "getPrivateKey", "(", ")", "throws", "GSSException", "{", "try", "{", "return", "(", "this", ".", "cred", "==", "null", ")", "?", "null", ":", "this", ".", "cred", ".", "getPrivateKey", "(", ")", ";", "}", "catch", "(", "Credent...
Returns the private key of this credential (if any). @return The private key. Might be null if this is an anonymous credential.
[ "Returns", "the", "private", "key", "of", "this", "credential", "(", "if", "any", ")", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSCredentialImpl.java#L264-L271
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputSecurityGroupResult.java
DescribeInputSecurityGroupResult.withTags
public DescribeInputSecurityGroupResult withTags(java.util.Map<String, String> tags) { """ A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; ...
java
public DescribeInputSecurityGroupResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "DescribeInputSecurityGroupResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DescribeInputSecurityGroupResult.java#L250-L253
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/internal/Utils.java
Utils.getSegmentSharedPreferences
public static SharedPreferences getSegmentSharedPreferences(Context context, String tag) { """ Returns a shared preferences for storing any library preferences. """ return context.getSharedPreferences("analytics-android-" + tag, MODE_PRIVATE); }
java
public static SharedPreferences getSegmentSharedPreferences(Context context, String tag) { return context.getSharedPreferences("analytics-android-" + tag, MODE_PRIVATE); }
[ "public", "static", "SharedPreferences", "getSegmentSharedPreferences", "(", "Context", "context", ",", "String", "tag", ")", "{", "return", "context", ".", "getSharedPreferences", "(", "\"analytics-android-\"", "+", "tag", ",", "MODE_PRIVATE", ")", ";", "}" ]
Returns a shared preferences for storing any library preferences.
[ "Returns", "a", "shared", "preferences", "for", "storing", "any", "library", "preferences", "." ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/internal/Utils.java#L284-L286
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/json/JSONDeserializer.java
JSONDeserializer.fromString
public final IJSONSerializable<?> fromString(String string, final boolean validate) { """ Parses the JSON string and returns the IJSONSerializable. If validate is true, it will attempt to validate the attributes and types of child nodes etc. If validate is false, it assumes the JSON string is correct (this is a...
java
public final IJSONSerializable<?> fromString(String string, final boolean validate) { if (null == (string = StringOps.toTrimOrNull(string))) { return null; } final JSONValue value = JSONParser.parseStrict(string); if (null == value) { ...
[ "public", "final", "IJSONSerializable", "<", "?", ">", "fromString", "(", "String", "string", ",", "final", "boolean", "validate", ")", "{", "if", "(", "null", "==", "(", "string", "=", "StringOps", ".", "toTrimOrNull", "(", "string", ")", ")", ")", "{",...
Parses the JSON string and returns the IJSONSerializable. If validate is true, it will attempt to validate the attributes and types of child nodes etc. If validate is false, it assumes the JSON string is correct (this is a little faster.) @param string JSON string as produced by {@link IJSONSerializable#toJSONString()...
[ "Parses", "the", "JSON", "string", "and", "returns", "the", "IJSONSerializable", ".", "If", "validate", "is", "true", "it", "will", "attempt", "to", "validate", "the", "attributes", "and", "types", "of", "child", "nodes", "etc", ".", "If", "validate", "is", ...
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/json/JSONDeserializer.java#L98-L130
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/ProgramUtils.java
ProgramUtils.executeCommand
public static int executeCommand( final Logger logger, final List<String> command, final File workingDir, final Map<String,String> environmentVars, final String applicationName, final String scopedInstanceName) throws IOException, InterruptedException { """ Executes a command on the VM and print...
java
public static int executeCommand( final Logger logger, final List<String> command, final File workingDir, final Map<String,String> environmentVars, final String applicationName, final String scopedInstanceName) throws IOException, InterruptedException { return executeCommand( logger, command.toArr...
[ "public", "static", "int", "executeCommand", "(", "final", "Logger", "logger", ",", "final", "List", "<", "String", ">", "command", ",", "final", "File", "workingDir", ",", "final", "Map", "<", "String", ",", "String", ">", "environmentVars", ",", "final", ...
Executes a command on the VM and prints on the console its output. @param command a command to execute (not null, not empty) @param environmentVars a map containing environment variables (can be null) @param logger a logger (not null) @throws IOException if a new process could not be created @throws InterruptedExceptio...
[ "Executes", "a", "command", "on", "the", "VM", "and", "prints", "on", "the", "console", "its", "output", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/ProgramUtils.java#L165-L175
m-m-m/util
pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java
AbstractPojoPathNavigator.createStateByType
@SuppressWarnings("rawtypes") protected PojoPathState createStateByType(GenericType initialPojoType, String pojoPath, PojoPathMode mode, PojoPathContext context) { """ This method gets the {@link PojoPathState} for the given {@code context}. @param initialPojoType is the initial pojo-type this {@link PojoPath...
java
@SuppressWarnings("rawtypes") protected PojoPathState createStateByType(GenericType initialPojoType, String pojoPath, PojoPathMode mode, PojoPathContext context) { Class<?> initialPojoClass = initialPojoType.getRetrievalClass(); Map<Object, Object> rawCache = context.getCache(); if (rawCache == null) { ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "protected", "PojoPathState", "createStateByType", "(", "GenericType", "initialPojoType", ",", "String", "pojoPath", ",", "PojoPathMode", "mode", ",", "PojoPathContext", "context", ")", "{", "Class", "<", "?", ">", ...
This method gets the {@link PojoPathState} for the given {@code context}. @param initialPojoType is the initial pojo-type this {@link PojoPathNavigator} was invoked with. @param pojoPath is the {@link net.sf.mmm.util.pojo.path.api.PojoPath} to navigate. @param mode is the {@link PojoPathMode mode} that determines how ...
[ "This", "method", "gets", "the", "{", "@link", "PojoPathState", "}", "for", "the", "given", "{", "@code", "context", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java#L248-L263
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.isColumnPresent
private boolean isColumnPresent(ColumnInfo columnInfo, ColumnDef columnDef, boolean isCql3Enabled) throws Exception { """ isInedexesPresent method return whether indexes present or not on particular column. @param columnInfo the column info @param columnDef the column def @param isCql3Enabled the is cql3 ...
java
private boolean isColumnPresent(ColumnInfo columnInfo, ColumnDef columnDef, boolean isCql3Enabled) throws Exception { return (new String(columnDef.getName(), Constants.ENCODING).equals(columnInfo.getColumnName())); }
[ "private", "boolean", "isColumnPresent", "(", "ColumnInfo", "columnInfo", ",", "ColumnDef", "columnDef", ",", "boolean", "isCql3Enabled", ")", "throws", "Exception", "{", "return", "(", "new", "String", "(", "columnDef", ".", "getName", "(", ")", ",", "Constants...
isInedexesPresent method return whether indexes present or not on particular column. @param columnInfo the column info @param columnDef the column def @param isCql3Enabled the is cql3 enabled @return true, if is indexes present @throws Exception the exception
[ "isInedexesPresent", "method", "return", "whether", "indexes", "present", "or", "not", "on", "particular", "column", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2068-L2071
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.isSingletonAdapter
static boolean isSingletonAdapter( Elements elements, Types types, TypeElement element, TypeMirror adaptedType) { """ A singleton is defined by a class with a public static final field named "INSTANCE" with a type assignable from a {@code TypeAdapter} of {@code adaptedType}. """ TypeElement typeAdap...
java
static boolean isSingletonAdapter( Elements elements, Types types, TypeElement element, TypeMirror adaptedType) { TypeElement typeAdapterElement = elements.getTypeElement(TYPE_ADAPTER_CLASS_NAME); DeclaredType typeAdapterType = types.getDeclaredType(typeAdapterElement, adaptedType); return isSingleton...
[ "static", "boolean", "isSingletonAdapter", "(", "Elements", "elements", ",", "Types", "types", ",", "TypeElement", "element", ",", "TypeMirror", "adaptedType", ")", "{", "TypeElement", "typeAdapterElement", "=", "elements", ".", "getTypeElement", "(", "TYPE_ADAPTER_CL...
A singleton is defined by a class with a public static final field named "INSTANCE" with a type assignable from a {@code TypeAdapter} of {@code adaptedType}.
[ "A", "singleton", "is", "defined", "by", "a", "class", "with", "a", "public", "static", "final", "field", "named", "INSTANCE", "with", "a", "type", "assignable", "from", "a", "{" ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L342-L347
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java
SimpleMMcifConsumer.isKnownChain
private static Chain isKnownChain(String asymId, List<Chain> chains) { """ Test if the given asymId is already present in the list of chains given. If yes, returns the chain otherwise returns null. """ for (int i = 0; i< chains.size();i++){ Chain testchain = chains.get(i); //System.out.println("comp...
java
private static Chain isKnownChain(String asymId, List<Chain> chains){ for (int i = 0; i< chains.size();i++){ Chain testchain = chains.get(i); //System.out.println("comparing chainID >"+chainID+"< against testchain " + i+" >" +testchain.getName()+"<"); if (asymId.equals(testchain.getId())) { //System.ou...
[ "private", "static", "Chain", "isKnownChain", "(", "String", "asymId", ",", "List", "<", "Chain", ">", "chains", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chains", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Chain", "testc...
Test if the given asymId is already present in the list of chains given. If yes, returns the chain otherwise returns null.
[ "Test", "if", "the", "given", "asymId", "is", "already", "present", "in", "the", "list", "of", "chains", "given", ".", "If", "yes", "returns", "the", "chain", "otherwise", "returns", "null", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java#L314-L326
google/truth
core/src/main/java/com/google/common/truth/MapSubject.java
MapSubject.containsExactlyEntriesIn
@CanIgnoreReturnValue public Ordered containsExactlyEntriesIn(Map<?, ?> expectedMap) { """ Fails if the map does not contain exactly the given set of entries in the given map. """ if (expectedMap.isEmpty()) { if (actual().isEmpty()) { return IN_ORDER; } else { isEmpty(); // fa...
java
@CanIgnoreReturnValue public Ordered containsExactlyEntriesIn(Map<?, ?> expectedMap) { if (expectedMap.isEmpty()) { if (actual().isEmpty()) { return IN_ORDER; } else { isEmpty(); // fails return ALREADY_FAILED; } } boolean containsAnyOrder = containsEntrie...
[ "@", "CanIgnoreReturnValue", "public", "Ordered", "containsExactlyEntriesIn", "(", "Map", "<", "?", ",", "?", ">", "expectedMap", ")", "{", "if", "(", "expectedMap", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "actual", "(", ")", ".", "isEmpty", "(", ...
Fails if the map does not contain exactly the given set of entries in the given map.
[ "Fails", "if", "the", "map", "does", "not", "contain", "exactly", "the", "given", "set", "of", "entries", "in", "the", "given", "map", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/MapSubject.java#L231-L248
grails/grails-core
grails-bootstrap/src/main/groovy/org/grails/io/support/GrailsResourceUtils.java
GrailsResourceUtils.getClassNameForClassFile
public static String getClassNameForClassFile(String rootDir, String path) { """ Returns the class name for a compiled class file @param path The path to check @return The class name or null if it doesn't exist """ path = path.replace("/", "."); path = path.replace('\\', '.'); path ...
java
public static String getClassNameForClassFile(String rootDir, String path) { path = path.replace("/", "."); path = path.replace('\\', '.'); path = path.substring(0, path.length() - CLASS_EXTENSION.length()); if (rootDir != null) { path = path.substring(rootDir.length()); ...
[ "public", "static", "String", "getClassNameForClassFile", "(", "String", "rootDir", ",", "String", "path", ")", "{", "path", "=", "path", ".", "replace", "(", "\"/\"", ",", "\".\"", ")", ";", "path", "=", "path", ".", "replace", "(", "'", "'", ",", "'"...
Returns the class name for a compiled class file @param path The path to check @return The class name or null if it doesn't exist
[ "Returns", "the", "class", "name", "for", "a", "compiled", "class", "file" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-bootstrap/src/main/groovy/org/grails/io/support/GrailsResourceUtils.java#L305-L313
wildfly/wildfly-core
domain-management/src/main/java/org/jboss/as/domain/management/security/PropertiesFileLoader.java
PropertiesFileLoader.getValue
private String getValue(String key, String previousValue) { """ Get the value of the property.<br/> If the value to save is null, return the previous value (enable/disable mode). @param key The key of the property @param previousValue The previous value @return The value of the property """ final...
java
private String getValue(String key, String previousValue) { final String value; final String valueUpdated = toSave.getProperty(key); if (valueUpdated == null) { value = previousValue; } else { value = valueUpdated; } return value; }
[ "private", "String", "getValue", "(", "String", "key", ",", "String", "previousValue", ")", "{", "final", "String", "value", ";", "final", "String", "valueUpdated", "=", "toSave", ".", "getProperty", "(", "key", ")", ";", "if", "(", "valueUpdated", "==", "...
Get the value of the property.<br/> If the value to save is null, return the previous value (enable/disable mode). @param key The key of the property @param previousValue The previous value @return The value of the property
[ "Get", "the", "value", "of", "the", "property", ".", "<br", "/", ">", "If", "the", "value", "to", "save", "is", "null", "return", "the", "previous", "value", "(", "enable", "/", "disable", "mode", ")", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/PropertiesFileLoader.java#L359-L368
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/io/MatrixVectorReader.java
MatrixVectorReader.readCoordinate
public void readCoordinate(int[] index, float[] dataR, float[] dataI) throws IOException { """ Reads a coordinate vector. First data array contains real entries, and the second contains imaginary entries """ int size = index.length; if (size != dataR.length || size != dataI.length)...
java
public void readCoordinate(int[] index, float[] dataR, float[] dataI) throws IOException { int size = index.length; if (size != dataR.length || size != dataI.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i...
[ "public", "void", "readCoordinate", "(", "int", "[", "]", "index", ",", "float", "[", "]", "dataR", ",", "float", "[", "]", "dataI", ")", "throws", "IOException", "{", "int", "size", "=", "index", ".", "length", ";", "if", "(", "size", "!=", "dataR",...
Reads a coordinate vector. First data array contains real entries, and the second contains imaginary entries
[ "Reads", "a", "coordinate", "vector", ".", "First", "data", "array", "contains", "real", "entries", "and", "the", "second", "contains", "imaginary", "entries" ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/io/MatrixVectorReader.java#L450-L461
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatterLenient
@Nonnull public static DateTimeFormatter getDateTimeFormatterLenient (@Nonnull @Nonempty final String sPattern) { """ Get the cached DateTimeFormatter using LENIENT resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and neve...
java
@Nonnull public static DateTimeFormatter getDateTimeFormatterLenient (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.LENIENT); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatterLenient", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ")", "{", "return", "getDateTimeFormatter", "(", "sPattern", ",", "ResolverStyle", ".", "LENIENT", ")", ";", ...
Get the cached DateTimeFormatter using LENIENT resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <code>null</code> . @throws IllegalArgumentException If the pattern is invalid
[ "Get", "the", "cached", "DateTimeFormatter", "using", "LENIENT", "resolving", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L106-L110
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/IntentUtils.java
IntentUtils.isAppInstalled
public static boolean isAppInstalled(final Context context, final String packageName) { """ Check if app for the given package name is installed on this device. """ try { context.getPackageManager().getPackageInfo(packageName, 0); return true; } catch (Exception e) { ...
java
public static boolean isAppInstalled(final Context context, final String packageName){ try { context.getPackageManager().getPackageInfo(packageName, 0); return true; } catch (Exception e) { return false; } }
[ "public", "static", "boolean", "isAppInstalled", "(", "final", "Context", "context", ",", "final", "String", "packageName", ")", "{", "try", "{", "context", ".", "getPackageManager", "(", ")", ".", "getPackageInfo", "(", "packageName", ",", "0", ")", ";", "r...
Check if app for the given package name is installed on this device.
[ "Check", "if", "app", "for", "the", "given", "package", "name", "is", "installed", "on", "this", "device", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/IntentUtils.java#L54-L61
wdullaer/MaterialDateTimePicker
library/src/main/java/com/wdullaer/materialdatetimepicker/time/TimePickerDialog.java
TimePickerDialog.newInstance
@SuppressWarnings( { """ Create a new TimePickerDialog instance initialized to the current system time @param callback How the parent is notified that the time is set. @param is24HourMode True to render 24 hour mode, false to render AM / PM selectors. @return a new TimePickerDialog instance. """"unused"...
java
@SuppressWarnings({"unused", "SameParameterValue"}) public static TimePickerDialog newInstance(OnTimeSetListener callback, boolean is24HourMode) { Calendar now = Calendar.getInstance(); return TimePickerDialog.newInstance(callback, now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE), is24HourMod...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"SameParameterValue\"", "}", ")", "public", "static", "TimePickerDialog", "newInstance", "(", "OnTimeSetListener", "callback", ",", "boolean", "is24HourMode", ")", "{", "Calendar", "now", "=", "Calendar", ".", ...
Create a new TimePickerDialog instance initialized to the current system time @param callback How the parent is notified that the time is set. @param is24HourMode True to render 24 hour mode, false to render AM / PM selectors. @return a new TimePickerDialog instance.
[ "Create", "a", "new", "TimePickerDialog", "instance", "initialized", "to", "the", "current", "system", "time" ]
train
https://github.com/wdullaer/MaterialDateTimePicker/blob/0a8fe28f19db4f5a5a6cfc525a852416232873a8/library/src/main/java/com/wdullaer/materialdatetimepicker/time/TimePickerDialog.java#L224-L228
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java
FlowControllerFactory.createPageFlow
public PageFlowController createPageFlow( RequestContext context, String pageFlowClassName ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { """ Create a {@link PageFlowController} of the given type. The {@link PageFlowController} stack used for nesting will be cleared or ...
java
public PageFlowController createPageFlow( RequestContext context, String pageFlowClassName ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { Class pageFlowClass = getFlowControllerClass( pageFlowClassName ); return createPageFlow( context, pageFlowClass ); ...
[ "public", "PageFlowController", "createPageFlow", "(", "RequestContext", "context", ",", "String", "pageFlowClassName", ")", "throws", "ClassNotFoundException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "Class", "pageFlowClass", "=", "getFlowControlle...
Create a {@link PageFlowController} of the given type. The {@link PageFlowController} stack used for nesting will be cleared or pushed, and the new instance will be stored as the current {@link PageFlowController}. @param context a {@link RequestContext} object which contains the current request and response. @param ...
[ "Create", "a", "{", "@link", "PageFlowController", "}", "of", "the", "given", "type", ".", "The", "{", "@link", "PageFlowController", "}", "stack", "used", "for", "nesting", "will", "be", "cleared", "or", "pushed", "and", "the", "new", "instance", "will", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java#L186-L191
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipCall.java
SipCall.sendMessageResponse
public boolean sendMessageResponse(int statusCode, String reasonPhrase, int expires) { """ This method sends a basic response to a previously received MESSAGE request. The response is constructed based on the parameters passed in. Call this method after waitForMessage() returns true. Call this method multiple ti...
java
public boolean sendMessageResponse(int statusCode, String reasonPhrase, int expires) { return sendMessageResponse(statusCode, reasonPhrase, expires, null, null, null); }
[ "public", "boolean", "sendMessageResponse", "(", "int", "statusCode", ",", "String", "reasonPhrase", ",", "int", "expires", ")", "{", "return", "sendMessageResponse", "(", "statusCode", ",", "reasonPhrase", ",", "expires", ",", "null", ",", "null", ",", "null", ...
This method sends a basic response to a previously received MESSAGE request. The response is constructed based on the parameters passed in. Call this method after waitForMessage() returns true. Call this method multiple times to send multiple responses to the received MESSAGE. The MESSAGE being responded to must be the...
[ "This", "method", "sends", "a", "basic", "response", "to", "a", "previously", "received", "MESSAGE", "request", ".", "The", "response", "is", "constructed", "based", "on", "the", "parameters", "passed", "in", ".", "Call", "this", "method", "after", "waitForMes...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipCall.java#L641-L643
hazelcast/hazelcast
hazelcast-spring/src/main/java/com/hazelcast/spring/cache/SpringHazelcastCachingProvider.java
SpringHazelcastCachingProvider.getCacheManager
public static CacheManager getCacheManager(HazelcastInstance instance, String uriString, Properties props) { """ Creates a {@link CacheManager} on an existing HazelcastInstance. @param uriString Scope of {@link CacheManager} @param instance Hazelcast instance that created {@link CacheManager} is connected. @...
java
public static CacheManager getCacheManager(HazelcastInstance instance, String uriString, Properties props) { URI uri = null; if (uriString != null) { try { uri = new URI(uriString); } catch (URISyntaxException e) { throw rethrow(e); } ...
[ "public", "static", "CacheManager", "getCacheManager", "(", "HazelcastInstance", "instance", ",", "String", "uriString", ",", "Properties", "props", ")", "{", "URI", "uri", "=", "null", ";", "if", "(", "uriString", "!=", "null", ")", "{", "try", "{", "uri", ...
Creates a {@link CacheManager} on an existing HazelcastInstance. @param uriString Scope of {@link CacheManager} @param instance Hazelcast instance that created {@link CacheManager} is connected. @param props Extra properties to be passed to cache manager. If {@code props} contain hazelcast.instance.name it overri...
[ "Creates", "a", "{", "@link", "CacheManager", "}", "on", "an", "existing", "HazelcastInstance", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-spring/src/main/java/com/hazelcast/spring/cache/SpringHazelcastCachingProvider.java#L50-L64
ltearno/hexa.tools
hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/PropertyValues.java
PropertyValues.getObjectDynamicProperty
<T> T getObjectDynamicProperty( Object object, String propertyName ) { """ Gets a dynamic property value on an object @param object the object from which one wants to get the property value @param propertyName the property name """ DynamicPropertyBag bag = propertyBagAccess.getObjectDynamicPropertyBag(...
java
<T> T getObjectDynamicProperty( Object object, String propertyName ) { DynamicPropertyBag bag = propertyBagAccess.getObjectDynamicPropertyBag( object ); if( bag == null ) return null; @SuppressWarnings( "unchecked" ) T result = (T) bag.get( propertyName ); return result; }
[ "<", "T", ">", "T", "getObjectDynamicProperty", "(", "Object", "object", ",", "String", "propertyName", ")", "{", "DynamicPropertyBag", "bag", "=", "propertyBagAccess", ".", "getObjectDynamicPropertyBag", "(", "object", ")", ";", "if", "(", "bag", "==", "null", ...
Gets a dynamic property value on an object @param object the object from which one wants to get the property value @param propertyName the property name
[ "Gets", "a", "dynamic", "property", "value", "on", "an", "object" ]
train
https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/PropertyValues.java#L214-L224
apache/incubator-atlas
graphdb/titan0/src/main/java/com/thinkaurelius/titan/diskstorage/locking/LocalLockMediator.java
LocalLockMediator.unlock
public boolean unlock(KeyColumn kc, T requestor) { """ Release the lock specified by {@code kc} and which was previously locked by {@code requestor}, if it is possible to release it. @param kc lock identifier @param requestor the object which previously locked {@code kc} """ if (!locks.con...
java
public boolean unlock(KeyColumn kc, T requestor) { if (!locks.containsKey(kc)) { log.info("Local unlock failed: no locks found for {}", kc); return false; } AuditRecord<T> unlocker = new AuditRecord<>(requestor, null); AuditRecord<T> holder = locks.get(kc); ...
[ "public", "boolean", "unlock", "(", "KeyColumn", "kc", ",", "T", "requestor", ")", "{", "if", "(", "!", "locks", ".", "containsKey", "(", "kc", ")", ")", "{", "log", ".", "info", "(", "\"Local unlock failed: no locks found for {}\"", ",", "kc", ")", ";", ...
Release the lock specified by {@code kc} and which was previously locked by {@code requestor}, if it is possible to release it. @param kc lock identifier @param requestor the object which previously locked {@code kc}
[ "Release", "the", "lock", "specified", "by", "{", "@code", "kc", "}", "and", "which", "was", "previously", "locked", "by", "{", "@code", "requestor", "}", "if", "it", "is", "possible", "to", "release", "it", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/graphdb/titan0/src/main/java/com/thinkaurelius/titan/diskstorage/locking/LocalLockMediator.java#L186-L220
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/node/locate/KeyValueLocator.java
KeyValueLocator.handleNotEqualNodeSizes
private static boolean handleNotEqualNodeSizes(int configNodeSize, int actualNodeSize) { """ Helper method to handle potentially different node sizes in the actual list and in the config. @return true if they are not equal, false if they are. """ if (configNodeSize != actualNodeSize) { i...
java
private static boolean handleNotEqualNodeSizes(int configNodeSize, int actualNodeSize) { if (configNodeSize != actualNodeSize) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Node list and configuration's partition hosts sizes : {} <> {}, rescheduling", actualN...
[ "private", "static", "boolean", "handleNotEqualNodeSizes", "(", "int", "configNodeSize", ",", "int", "actualNodeSize", ")", "{", "if", "(", "configNodeSize", "!=", "actualNodeSize", ")", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG...
Helper method to handle potentially different node sizes in the actual list and in the config. @return true if they are not equal, false if they are.
[ "Helper", "method", "to", "handle", "potentially", "different", "node", "sizes", "in", "the", "actual", "list", "and", "in", "the", "config", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/node/locate/KeyValueLocator.java#L283-L292
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPanel.java
LogPanel.getOrCreateProgressBar
private JProgressBar getOrCreateProgressBar(Progress prog) { """ Get an existing or create a new progress bar. @param prog Progress @return Associated progress bar. """ JProgressBar pbar = pbarmap.get(prog); // Add a new progress bar. if(pbar == null) { synchronized(pbarmap) { if(...
java
private JProgressBar getOrCreateProgressBar(Progress prog) { JProgressBar pbar = pbarmap.get(prog); // Add a new progress bar. if(pbar == null) { synchronized(pbarmap) { if(prog instanceof FiniteProgress) { pbar = new JProgressBar(0, ((FiniteProgress) prog).getTotal()); pba...
[ "private", "JProgressBar", "getOrCreateProgressBar", "(", "Progress", "prog", ")", "{", "JProgressBar", "pbar", "=", "pbarmap", ".", "get", "(", "prog", ")", ";", "// Add a new progress bar.", "if", "(", "pbar", "==", "null", ")", "{", "synchronized", "(", "pb...
Get an existing or create a new progress bar. @param prog Progress @return Associated progress bar.
[ "Get", "an", "existing", "or", "create", "a", "new", "progress", "bar", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPanel.java#L132-L159
Javen205/IJPay
src/main/java/com/jpay/util/HttpKitExt.java
HttpKitExt.postSSL
protected static String postSSL(String url, String data, String certPath, String certPass) { """ 涉及资金回滚的接口会使用到商户证书,包括退款、撤销接口的请求 @param url 请求的地址 @param data xml数据 @param certPath 证书文件目录 @param certPass 证书密码 @return String 回调的xml信息 """ HttpsURLConnection conn = null; OutputStream out = null; In...
java
protected static String postSSL(String url, String data, String certPath, String certPass) { HttpsURLConnection conn = null; OutputStream out = null; InputStream inputStream = null; BufferedReader reader = null; try { KeyStore clientStore = KeyStore.getInstance("PKCS12"); clientStore.load(new FileInputS...
[ "protected", "static", "String", "postSSL", "(", "String", "url", ",", "String", "data", ",", "String", "certPath", ",", "String", "certPass", ")", "{", "HttpsURLConnection", "conn", "=", "null", ";", "OutputStream", "out", "=", "null", ";", "InputStream", "...
涉及资金回滚的接口会使用到商户证书,包括退款、撤销接口的请求 @param url 请求的地址 @param data xml数据 @param certPath 证书文件目录 @param certPass 证书密码 @return String 回调的xml信息
[ "涉及资金回滚的接口会使用到商户证书,包括退款、撤销接口的请求" ]
train
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/util/HttpKitExt.java#L148-L198
apache/incubator-druid
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentInsertAction.java
SegmentInsertAction.perform
@Override public Set<DataSegment> perform(Task task, TaskActionToolbox toolbox) { """ Behaves similarly to {@link org.apache.druid.indexing.overlord.IndexerMetadataStorageCoordinator#announceHistoricalSegments}, with startMetadata and endMetadata both null. """ return new SegmentTransactionalInsertActi...
java
@Override public Set<DataSegment> perform(Task task, TaskActionToolbox toolbox) { return new SegmentTransactionalInsertAction(segments, null, null).perform(task, toolbox).getSegments(); }
[ "@", "Override", "public", "Set", "<", "DataSegment", ">", "perform", "(", "Task", "task", ",", "TaskActionToolbox", "toolbox", ")", "{", "return", "new", "SegmentTransactionalInsertAction", "(", "segments", ",", "null", ",", "null", ")", ".", "perform", "(", ...
Behaves similarly to {@link org.apache.druid.indexing.overlord.IndexerMetadataStorageCoordinator#announceHistoricalSegments}, with startMetadata and endMetadata both null.
[ "Behaves", "similarly", "to", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentInsertAction.java#L71-L75
voldemort/voldemort
src/java/voldemort/rest/coordinator/CoordinatorProxyService.java
CoordinatorProxyService.initializeFatClient
private synchronized void initializeFatClient(String storeName, Properties storeClientProps) { """ Initialize the fat client for the given store. 1. Updates the coordinatorMetadata 2.Gets the new store configs from the config file 3.Creates a new @SocketStoreClientFactory 4. Subsequently caches the @StoreClie...
java
private synchronized void initializeFatClient(String storeName, Properties storeClientProps) { // updates the coordinator metadata with recent stores and cluster xml updateCoordinatorMetadataWithLatestState(); logger.info("Creating a Fat client for store: " + storeName); SocketStoreClie...
[ "private", "synchronized", "void", "initializeFatClient", "(", "String", "storeName", ",", "Properties", "storeClientProps", ")", "{", "// updates the coordinator metadata with recent stores and cluster xml", "updateCoordinatorMetadataWithLatestState", "(", ")", ";", "logger", "....
Initialize the fat client for the given store. 1. Updates the coordinatorMetadata 2.Gets the new store configs from the config file 3.Creates a new @SocketStoreClientFactory 4. Subsequently caches the @StoreClient obtained from the factory. This is synchronized because if Coordinator Admin is already doing some chan...
[ "Initialize", "the", "fat", "client", "for", "the", "given", "store", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/rest/coordinator/CoordinatorProxyService.java#L104-L122
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java
DebugUtil.buildTimeDifference
public static String buildTimeDifference(final long pStartTime, final long pEndTime) { """ Builds the time difference between two millisecond representations. <p> This method is to be used with small time intervals between 0 ms up to a couple of minutes. <p> @param pStartTime the start time. @param pEndTime...
java
public static String buildTimeDifference(final long pStartTime, final long pEndTime) { //return pEndTime - pStartTime; StringBuilder retVal = new StringBuilder(); // The time difference in milliseconds long timeDifference = pEndTime - pStartTime; if (timeDifference < 1000) { retVal...
[ "public", "static", "String", "buildTimeDifference", "(", "final", "long", "pStartTime", ",", "final", "long", "pEndTime", ")", "{", "//return pEndTime - pStartTime;\r", "StringBuilder", "retVal", "=", "new", "StringBuilder", "(", ")", ";", "// The time difference in mi...
Builds the time difference between two millisecond representations. <p> This method is to be used with small time intervals between 0 ms up to a couple of minutes. <p> @param pStartTime the start time. @param pEndTime the end time. @return the time difference in milliseconds.
[ "Builds", "the", "time", "difference", "between", "two", "millisecond", "representations", ".", "<p", ">", "This", "method", "is", "to", "be", "used", "with", "small", "time", "intervals", "between", "0", "ms", "up", "to", "a", "couple", "of", "minutes", "...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L848-L871
OpenLiberty/open-liberty
dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/WCApplicationHelper.java
WCApplicationHelper.createJar
public static void createJar(LibertyServer server, String dir, String jarName, boolean addJarResources, String... packageNames) throws Exception { """ /* Helper method to create a ear and placed it to the specified directory which is relative from /publish/servers/ directory. this method supports adding jar file...
java
public static void createJar(LibertyServer server, String dir, String jarName, boolean addJarResources, String... packageNames) throws Exception { String baseDir = DIR_PUBLISH + server.getServerName() + "/" + dir + "/"; JavaArchive jar = null; if (jarName != null) { LOG.info("createJ...
[ "public", "static", "void", "createJar", "(", "LibertyServer", "server", ",", "String", "dir", ",", "String", "jarName", ",", "boolean", "addJarResources", ",", "String", "...", "packageNames", ")", "throws", "Exception", "{", "String", "baseDir", "=", "DIR_PUBL...
/* Helper method to create a ear and placed it to the specified directory which is relative from /publish/servers/ directory. this method supports adding jar file.
[ "/", "*", "Helper", "method", "to", "create", "a", "ear", "and", "placed", "it", "to", "the", "specified", "directory", "which", "is", "relative", "from", "/", "publish", "/", "servers", "/", "directory", ".", "this", "method", "supports", "adding", "jar",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/WCApplicationHelper.java#L90-L107
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java
RdKNNTree.adjustKNNDistance
private void adjustKNNDistance(RdKNNEntry entry, ArrayDBIDs ids, List<? extends KNNList> knnLists) { """ Adjusts the knn distance in the subtree of the specified root entry. @param entry the root entry of the current subtree @param ids <em>Sorted</em> list of IDs @param knnLists a map of knn lists for each le...
java
private void adjustKNNDistance(RdKNNEntry entry, ArrayDBIDs ids, List<? extends KNNList> knnLists) { RdKNNNode node = getNode(entry); double knnDist_node = 0.; if(node.isLeaf()) { for(int i = 0; i < node.getNumEntries(); i++) { RdKNNEntry leafEntry = node.getEntry(i); DBID id = ((LeafE...
[ "private", "void", "adjustKNNDistance", "(", "RdKNNEntry", "entry", ",", "ArrayDBIDs", "ids", ",", "List", "<", "?", "extends", "KNNList", ">", "knnLists", ")", "{", "RdKNNNode", "node", "=", "getNode", "(", "entry", ")", ";", "double", "knnDist_node", "=", ...
Adjusts the knn distance in the subtree of the specified root entry. @param entry the root entry of the current subtree @param ids <em>Sorted</em> list of IDs @param knnLists a map of knn lists for each leaf entry
[ "Adjusts", "the", "knn", "distance", "in", "the", "subtree", "of", "the", "specified", "root", "entry", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/rdknn/RdKNNTree.java#L467-L489
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobID.java
JobID.getJobIDsPattern
@Deprecated public static String getJobIDsPattern(String jtIdentifier, Integer jobId) { """ Returns a regex pattern which matches task IDs. Arguments can be given null, in which case that part of the regex will be generic. For example to obtain a regex matching <i>any job</i> run on the jobtracker started at ...
java
@Deprecated public static String getJobIDsPattern(String jtIdentifier, Integer jobId) { StringBuilder builder = new StringBuilder(JOB).append(SEPARATOR); builder.append(getJobIDsPatternWOPrefix(jtIdentifier, jobId)); return builder.toString(); }
[ "@", "Deprecated", "public", "static", "String", "getJobIDsPattern", "(", "String", "jtIdentifier", ",", "Integer", "jobId", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "JOB", ")", ".", "append", "(", "SEPARATOR", ")", ";", "builder...
Returns a regex pattern which matches task IDs. Arguments can be given null, in which case that part of the regex will be generic. For example to obtain a regex matching <i>any job</i> run on the jobtracker started at <i>200707121733</i>, we would use : <pre> JobID.getTaskIDsPattern("200707121733", null); </pre> which ...
[ "Returns", "a", "regex", "pattern", "which", "matches", "task", "IDs", ".", "Arguments", "can", "be", "given", "null", "in", "which", "case", "that", "part", "of", "the", "regex", "will", "be", "generic", ".", "For", "example", "to", "obtain", "a", "rege...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobID.java#L96-L101
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.saveSynonym
public JSONObject saveSynonym(String objectID, JSONObject content, boolean forwardToReplicas) throws AlgoliaException { """ Update one synonym @param objectID The objectId of the synonym to save @param content The new content of this synonym @param forwardToReplicas Forward the operation to...
java
public JSONObject saveSynonym(String objectID, JSONObject content, boolean forwardToReplicas) throws AlgoliaException { return this.saveSynonym(objectID, content, forwardToReplicas, RequestOptions.empty); }
[ "public", "JSONObject", "saveSynonym", "(", "String", "objectID", ",", "JSONObject", "content", ",", "boolean", "forwardToReplicas", ")", "throws", "AlgoliaException", "{", "return", "this", ".", "saveSynonym", "(", "objectID", ",", "content", ",", "forwardToReplica...
Update one synonym @param objectID The objectId of the synonym to save @param content The new content of this synonym @param forwardToReplicas Forward the operation to the replica indices
[ "Update", "one", "synonym" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L1639-L1641
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java
SpannerClient.beginTransaction
public final Transaction beginTransaction(SessionName session, TransactionOptions options) { """ Begins a new transaction. This step can often be skipped: [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [Commit][google.spanner.v1.Spanner.Commit] can begin a new tran...
java
public final Transaction beginTransaction(SessionName session, TransactionOptions options) { BeginTransactionRequest request = BeginTransactionRequest.newBuilder() .setSession(session == null ? null : session.toString()) .setOptions(options) .build(); return beginTra...
[ "public", "final", "Transaction", "beginTransaction", "(", "SessionName", "session", ",", "TransactionOptions", "options", ")", "{", "BeginTransactionRequest", "request", "=", "BeginTransactionRequest", ".", "newBuilder", "(", ")", ".", "setSession", "(", "session", "...
Begins a new transaction. This step can often be skipped: [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a side-effect. <p>Sample code: <pre><code> try (SpannerClient spannerClient = SpannerClient...
[ "Begins", "a", "new", "transaction", ".", "This", "step", "can", "often", "be", "skipped", ":", "[", "Read", "]", "[", "google", ".", "spanner", ".", "v1", ".", "Spanner", ".", "Read", "]", "[", "ExecuteSql", "]", "[", "google", ".", "spanner", ".", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java#L940-L948
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.getObjectMetadata
@Override public StorageObjectMetadata getObjectMetadata(String remoteStorageLocation, String prefix) throws StorageProviderException { """ Returns the metadata properties for a remote storage object @param remoteStorageLocation location, i.e. bucket for S3 @param prefix the prefix/path of t...
java
@Override public StorageObjectMetadata getObjectMetadata(String remoteStorageLocation, String prefix) throws StorageProviderException { AzureObjectMetadata azureObjectMetadata = null; try { // Get a reference to the BLOB, to retrieve its metadata CloudBlobContainer container = azStorageCli...
[ "@", "Override", "public", "StorageObjectMetadata", "getObjectMetadata", "(", "String", "remoteStorageLocation", ",", "String", "prefix", ")", "throws", "StorageProviderException", "{", "AzureObjectMetadata", "azureObjectMetadata", "=", "null", ";", "try", "{", "// Get a ...
Returns the metadata properties for a remote storage object @param remoteStorageLocation location, i.e. bucket for S3 @param prefix the prefix/path of the object to retrieve @return storage metadata object @throws StorageProviderException azure storage exception
[ "Returns", "the", "metadata", "properties", "for", "a", "remote", "storage", "object" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L259-L295
facebookarchive/hadoop-20
src/core/org/apache/hadoop/jmx/JMXJsonServlet.java
JMXJsonServlet.renderMBean
private void renderMBean(JsonGenerator jg, ObjectName objectName) throws IOException { """ Render a particular MBean's attributes to jg. @param jg JsonGenerator that will be written to @param objectName ObjectName for the mbean to render. @return void """ MBeanInfo beanInfo; String className; ...
java
private void renderMBean(JsonGenerator jg, ObjectName objectName) throws IOException { MBeanInfo beanInfo; String className; jg.writeObjectFieldStart(objectName.toString()); jg.writeStringField("beanName", objectName.toString()); try { beanInfo = mBeanServer.getMBeanInfo(objectName); c...
[ "private", "void", "renderMBean", "(", "JsonGenerator", "jg", ",", "ObjectName", "objectName", ")", "throws", "IOException", "{", "MBeanInfo", "beanInfo", ";", "String", "className", ";", "jg", ".", "writeObjectFieldStart", "(", "objectName", ".", "toString", "(",...
Render a particular MBean's attributes to jg. @param jg JsonGenerator that will be written to @param objectName ObjectName for the mbean to render. @return void
[ "Render", "a", "particular", "MBean", "s", "attributes", "to", "jg", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java#L237-L273
intellimate/Izou
src/main/java/org/intellimate/izou/events/EventDistributor.java
EventDistributor.registerEventListener
@SuppressWarnings( { """ Adds an listener for events. <p> Be careful with this method, it will register the listener for ALL the informations found in the Event. If your event-type is a common event type, it will fire EACH time!. It will also register for all Descriptors individually! It will also ignore if t...
java
@SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter"}) public void registerEventListener(EventModel event, EventListenerModel eventListener) throws IllegalIDException { registerEventListener(event.getAllInformations(), eventListener); }
[ "@", "SuppressWarnings", "(", "{", "\"SynchronizationOnLocalVariableOrMethodParameter\"", "}", ")", "public", "void", "registerEventListener", "(", "EventModel", "event", ",", "EventListenerModel", "eventListener", ")", "throws", "IllegalIDException", "{", "registerEventListe...
Adds an listener for events. <p> Be careful with this method, it will register the listener for ALL the informations found in the Event. If your event-type is a common event type, it will fire EACH time!. It will also register for all Descriptors individually! It will also ignore if this listener is already listening t...
[ "Adds", "an", "listener", "for", "events", ".", "<p", ">", "Be", "careful", "with", "this", "method", "it", "will", "register", "the", "listener", "for", "ALL", "the", "informations", "found", "in", "the", "Event", ".", "If", "your", "event", "-", "type"...
train
https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/events/EventDistributor.java#L116-L119
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.ovhAccount_ovhAccountId_movements_movementId_GET
public net.minidev.ovh.api.billing.OvhMovement ovhAccount_ovhAccountId_movements_movementId_GET(String ovhAccountId, Long movementId) throws IOException { """ Get this object properties REST: GET /me/ovhAccount/{ovhAccountId}/movements/{movementId} @param ovhAccountId [required] @param movementId [required] ...
java
public net.minidev.ovh.api.billing.OvhMovement ovhAccount_ovhAccountId_movements_movementId_GET(String ovhAccountId, Long movementId) throws IOException { String qPath = "/me/ovhAccount/{ovhAccountId}/movements/{movementId}"; StringBuilder sb = path(qPath, ovhAccountId, movementId); String resp = exec(qPath, "GET...
[ "public", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "billing", ".", "OvhMovement", "ovhAccount_ovhAccountId_movements_movementId_GET", "(", "String", "ovhAccountId", ",", "Long", "movementId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\...
Get this object properties REST: GET /me/ovhAccount/{ovhAccountId}/movements/{movementId} @param ovhAccountId [required] @param movementId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3348-L3353
undera/jmeter-plugins
plugins/functions/src/main/java/kg/apc/jmeter/functions/CaseFormat.java
CaseFormat.addVariableValue
private final void addVariableValue(String value, String variableName) { """ Store value in a variable @param value value of variable to update @param String variable name """ if (StringUtils.isNotEmpty(variableName)) { JMeterVariables vars = getVariables(); if (vars != null) { vars.put(variabl...
java
private final void addVariableValue(String value, String variableName) { if (StringUtils.isNotEmpty(variableName)) { JMeterVariables vars = getVariables(); if (vars != null) { vars.put(variableName, value); } } }
[ "private", "final", "void", "addVariableValue", "(", "String", "value", ",", "String", "variableName", ")", "{", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "variableName", ")", ")", "{", "JMeterVariables", "vars", "=", "getVariables", "(", ")", ";", "...
Store value in a variable @param value value of variable to update @param String variable name
[ "Store", "value", "in", "a", "variable" ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/plugins/functions/src/main/java/kg/apc/jmeter/functions/CaseFormat.java#L242-L249
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsRequest.java
EsRequest.put
public void put(String name, Object value) { """ Adds single property value. @param name property name. @param value property value. """ if (value instanceof EsRequest) { document.setDocument(name, ((EsRequest)value).document); } else { document.set(name, value); ...
java
public void put(String name, Object value) { if (value instanceof EsRequest) { document.setDocument(name, ((EsRequest)value).document); } else { document.set(name, value); } }
[ "public", "void", "put", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "EsRequest", ")", "{", "document", ".", "setDocument", "(", "name", ",", "(", "(", "EsRequest", ")", "value", ")", ".", "document", ")",...
Adds single property value. @param name property name. @param value property value.
[ "Adds", "single", "property", "value", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsRequest.java#L56-L62
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java
FactoryDescribeRegionPoint.surfFast
public static <T extends ImageGray<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfFast(@Nullable ConfigSurfDescribe.Speed config , Class<T> imageType) { """ <p> Creates a SURF descriptor. SURF descriptors are invariant to illumination, orientation, and scale. BoofCV provides two variant...
java
public static <T extends ImageGray<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfFast(@Nullable ConfigSurfDescribe.Speed config , Class<T> imageType) { Class<II> integralType = GIntegralImageOps.getIntegralType(imageType); DescribePointSurf<II> alg = FactoryDescribePointAlgs.surfSpeed( ...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "II", "extends", "ImageGray", "<", "II", ">", ">", "DescribeRegionPoint", "<", "T", ",", "BrightFeature", ">", "surfFast", "(", "@", "Nullable", "ConfigSurfDescribe", ".", "Speed", "...
<p> Creates a SURF descriptor. SURF descriptors are invariant to illumination, orientation, and scale. BoofCV provides two variants. This SURF variant created here is designed for speed and sacrifices some stability. Different descriptors are produced for gray-scale and color images. </p> @see DescribePointSurf @par...
[ "<p", ">", "Creates", "a", "SURF", "descriptor", ".", "SURF", "descriptors", "are", "invariant", "to", "illumination", "orientation", "and", "scale", ".", "BoofCV", "provides", "two", "variants", ".", "This", "SURF", "variant", "created", "here", "is", "design...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L58-L67
jenkinsci/jenkins
core/src/main/java/hudson/util/jna/DotNet.java
DotNet.isInstalled
public static boolean isInstalled(int major, int minor) { """ Returns true if the .NET framework of the given version (or greater) is installed. """ try { // see http://support.microsoft.com/?scid=kb;en-us;315291 for the basic algorithm // observation in my registry shows that t...
java
public static boolean isInstalled(int major, int minor) { try { // see http://support.microsoft.com/?scid=kb;en-us;315291 for the basic algorithm // observation in my registry shows that the actual key name can be things like "v2.0 SP1" // or "v2.0.50727", so the regexp is wr...
[ "public", "static", "boolean", "isInstalled", "(", "int", "major", ",", "int", "minor", ")", "{", "try", "{", "// see http://support.microsoft.com/?scid=kb;en-us;315291 for the basic algorithm", "// observation in my registry shows that the actual key name can be things like \"v2.0 SP1...
Returns true if the .NET framework of the given version (or greater) is installed.
[ "Returns", "true", "if", "the", ".", "NET", "framework", "of", "the", "given", "version", "(", "or", "greater", ")", "is", "installed", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/jna/DotNet.java#L45-L65
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java
BasicAtomGenerator.invisibleHydrogen
protected boolean invisibleHydrogen(IAtom atom, RendererModel model) { """ Checks an atom to see if it is an 'invisible hydrogen' - that is, it is a) an (explicit) hydrogen, and b) explicit hydrogens are set to off. @param atom the atom to check @param model the renderer model @return true if this atom shoul...
java
protected boolean invisibleHydrogen(IAtom atom, RendererModel model) { return isHydrogen(atom) && !(Boolean) model.get(ShowExplicitHydrogens.class); }
[ "protected", "boolean", "invisibleHydrogen", "(", "IAtom", "atom", ",", "RendererModel", "model", ")", "{", "return", "isHydrogen", "(", "atom", ")", "&&", "!", "(", "Boolean", ")", "model", ".", "get", "(", "ShowExplicitHydrogens", ".", "class", ")", ";", ...
Checks an atom to see if it is an 'invisible hydrogen' - that is, it is a) an (explicit) hydrogen, and b) explicit hydrogens are set to off. @param atom the atom to check @param model the renderer model @return true if this atom should not be shown
[ "Checks", "an", "atom", "to", "see", "if", "it", "is", "an", "invisible", "hydrogen", "-", "that", "is", "it", "is", "a", ")", "an", "(", "explicit", ")", "hydrogen", "and", "b", ")", "explicit", "hydrogens", "are", "set", "to", "off", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java#L262-L264
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/TokenCachingStrategy.java
TokenCachingStrategy.putExpirationMilliseconds
public static void putExpirationMilliseconds(Bundle bundle, long value) { """ Puts the expiration date into a Bundle. @param bundle A Bundle in which the expiration date should be stored. @param value The long representing the expiration date in milliseconds since the epoch. @throws NullPointerException ...
java
public static void putExpirationMilliseconds(Bundle bundle, long value) { Validate.notNull(bundle, "bundle"); bundle.putLong(EXPIRATION_DATE_KEY, value); }
[ "public", "static", "void", "putExpirationMilliseconds", "(", "Bundle", "bundle", ",", "long", "value", ")", "{", "Validate", ".", "notNull", "(", "bundle", ",", "\"bundle\"", ")", ";", "bundle", ".", "putLong", "(", "EXPIRATION_DATE_KEY", ",", "value", ")", ...
Puts the expiration date into a Bundle. @param bundle A Bundle in which the expiration date should be stored. @param value The long representing the expiration date in milliseconds since the epoch. @throws NullPointerException if the passed in Bundle is null
[ "Puts", "the", "expiration", "date", "into", "a", "Bundle", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/TokenCachingStrategy.java#L232-L235
sksamuel/scrimage
scrimage-core/src/main/java/com/sksamuel/scrimage/AwtImage.java
AwtImage.toNewBufferedImage
public BufferedImage toNewBufferedImage(int type) { """ Returns a new AWT BufferedImage from this image. @param type the type of buffered image to create, if not specified then defaults to the current image type @return a new, non-shared, BufferedImage with the same data as this Image. """ Buffered...
java
public BufferedImage toNewBufferedImage(int type) { BufferedImage target = new BufferedImage(width, height, type); Graphics2D g2 = (Graphics2D) target.getGraphics(); g2.drawImage(awt, 0, 0, null); g2.dispose(); return target; }
[ "public", "BufferedImage", "toNewBufferedImage", "(", "int", "type", ")", "{", "BufferedImage", "target", "=", "new", "BufferedImage", "(", "width", ",", "height", ",", "type", ")", ";", "Graphics2D", "g2", "=", "(", "Graphics2D", ")", "target", ".", "getGra...
Returns a new AWT BufferedImage from this image. @param type the type of buffered image to create, if not specified then defaults to the current image type @return a new, non-shared, BufferedImage with the same data as this Image.
[ "Returns", "a", "new", "AWT", "BufferedImage", "from", "this", "image", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-core/src/main/java/com/sksamuel/scrimage/AwtImage.java#L366-L372
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkManagementClientImpl.java
NetworkManagementClientImpl.checkDnsNameAvailabilityAsync
public Observable<DnsNameAvailabilityResultInner> checkDnsNameAvailabilityAsync(String location, String domainNameLabel) { """ Checks whether a domain name in the cloudapp.azure.com zone is available for use. @param location The location of the domain name. @param domainNameLabel The domain name to be verified...
java
public Observable<DnsNameAvailabilityResultInner> checkDnsNameAvailabilityAsync(String location, String domainNameLabel) { return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).map(new Func1<ServiceResponse<DnsNameAvailabilityResultInner>, DnsNameAvailabilityResultInner>() { ...
[ "public", "Observable", "<", "DnsNameAvailabilityResultInner", ">", "checkDnsNameAvailabilityAsync", "(", "String", "location", ",", "String", "domainNameLabel", ")", "{", "return", "checkDnsNameAvailabilityWithServiceResponseAsync", "(", "location", ",", "domainNameLabel", "...
Checks whether a domain name in the cloudapp.azure.com zone is available for use. @param location The location of the domain name. @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @throws IllegalArgumentException thrown if param...
[ "Checks", "whether", "a", "domain", "name", "in", "the", "cloudapp", ".", "azure", ".", "com", "zone", "is", "available", "for", "use", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkManagementClientImpl.java#L1181-L1188
apptik/jus
jus-java/src/main/java/io/apptik/comm/jus/RequestQueue.java
RequestQueue.addMarker
public <R extends RequestQueue> R addMarker(String tag, Object... args) { """ Adds a marker for the {@link RequestQueue} @param tag @param args @param <R> @return """ Marker marker = new Marker(tag, Thread.currentThread().getId(), Thread.currentThread().getName(), ...
java
public <R extends RequestQueue> R addMarker(String tag, Object... args) { Marker marker = new Marker(tag, Thread.currentThread().getId(), Thread.currentThread().getName(), System.nanoTime()); for (RequestListener.MarkerListener markerListener : markerListe...
[ "public", "<", "R", "extends", "RequestQueue", ">", "R", "addMarker", "(", "String", "tag", ",", "Object", "...", "args", ")", "{", "Marker", "marker", "=", "new", "Marker", "(", "tag", ",", "Thread", ".", "currentThread", "(", ")", ".", "getId", "(", ...
Adds a marker for the {@link RequestQueue} @param tag @param args @param <R> @return
[ "Adds", "a", "marker", "for", "the", "{" ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/jus-java/src/main/java/io/apptik/comm/jus/RequestQueue.java#L305-L314
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ErrorHandling.java
ErrorHandling.reportCollectedErrors
public static void reportCollectedErrors(PageContext pc, JspTag tag) { """ This method get the current errors and write the formated output @param pc """ IErrorReporter er = getErrorReporter(tag); if (er == null) return; assert (pc != null); ArrayList errors = er.r...
java
public static void reportCollectedErrors(PageContext pc, JspTag tag) { IErrorReporter er = getErrorReporter(tag); if (er == null) return; assert (pc != null); ArrayList errors = er.returnErrors(); if (errors == null || errors.size() == 0) return; ...
[ "public", "static", "void", "reportCollectedErrors", "(", "PageContext", "pc", ",", "JspTag", "tag", ")", "{", "IErrorReporter", "er", "=", "getErrorReporter", "(", "tag", ")", ";", "if", "(", "er", "==", "null", ")", "return", ";", "assert", "(", "pc", ...
This method get the current errors and write the formated output @param pc
[ "This", "method", "get", "the", "current", "errors", "and", "write", "the", "formated", "output" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ErrorHandling.java#L287-L333
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceCountryUtil.java
CommerceCountryUtil.findByG_N
public static CommerceCountry findByG_N(long groupId, int numericISOCode) throws com.liferay.commerce.exception.NoSuchCountryException { """ Returns the commerce country where groupId = &#63; and numericISOCode = &#63; or throws a {@link NoSuchCountryException} if it could not be found. @param groupId the gro...
java
public static CommerceCountry findByG_N(long groupId, int numericISOCode) throws com.liferay.commerce.exception.NoSuchCountryException { return getPersistence().findByG_N(groupId, numericISOCode); }
[ "public", "static", "CommerceCountry", "findByG_N", "(", "long", "groupId", ",", "int", "numericISOCode", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "exception", ".", "NoSuchCountryException", "{", "return", "getPersistence", "(", ")", ".", "fin...
Returns the commerce country where groupId = &#63; and numericISOCode = &#63; or throws a {@link NoSuchCountryException} if it could not be found. @param groupId the group ID @param numericISOCode the numeric iso code @return the matching commerce country @throws NoSuchCountryException if a matching commerce country c...
[ "Returns", "the", "commerce", "country", "where", "groupId", "=", "&#63", ";", "and", "numericISOCode", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCountryException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceCountryUtil.java#L734-L737
datastax/java-driver
core/src/main/java/com/datastax/oss/driver/internal/core/util/concurrent/CompletableFutures.java
CompletableFutures.getCompleted
public static <T> T getCompleted(CompletionStage<T> stage) { """ Get the result now, when we know for sure that the future is complete. """ CompletableFuture<T> future = stage.toCompletableFuture(); Preconditions.checkArgument(future.isDone() && !future.isCompletedExceptionally()); try { retu...
java
public static <T> T getCompleted(CompletionStage<T> stage) { CompletableFuture<T> future = stage.toCompletableFuture(); Preconditions.checkArgument(future.isDone() && !future.isCompletedExceptionally()); try { return future.get(); } catch (InterruptedException | ExecutionException e) { // Ne...
[ "public", "static", "<", "T", ">", "T", "getCompleted", "(", "CompletionStage", "<", "T", ">", "stage", ")", "{", "CompletableFuture", "<", "T", ">", "future", "=", "stage", ".", "toCompletableFuture", "(", ")", ";", "Preconditions", ".", "checkArgument", ...
Get the result now, when we know for sure that the future is complete.
[ "Get", "the", "result", "now", "when", "we", "know", "for", "sure", "that", "the", "future", "is", "complete", "." ]
train
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/core/src/main/java/com/datastax/oss/driver/internal/core/util/concurrent/CompletableFutures.java#L77-L86
stripe/stripe-java
src/main/java/com/stripe/model/Invoice.java
Invoice.finalizeInvoice
public Invoice finalizeInvoice() throws StripeException { """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method. """ return finalizeInvoice((Map<String, Object>) null, (Reque...
java
public Invoice finalizeInvoice() throws StripeException { return finalizeInvoice((Map<String, Object>) null, (RequestOptions) null); }
[ "public", "Invoice", "finalizeInvoice", "(", ")", "throws", "StripeException", "{", "return", "finalizeInvoice", "(", "(", "Map", "<", "String", ",", "Object", ">", ")", "null", ",", "(", "RequestOptions", ")", "null", ")", ";", "}" ]
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
[ "Stripe", "automatically", "finalizes", "drafts", "before", "sending", "and", "attempting", "payment", "on", "invoices", ".", "However", "if", "you’d", "like", "to", "finalize", "a", "draft", "invoice", "manually", "you", "can", "do", "so", "using", "this", "m...
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/Invoice.java#L951-L953
Ardesco/selenium-standalone-server-plugin
src/main/java/com/lazerycode/selenium/extract/FileExtractor.java
FileExtractor.unzipFile
String unzipFile(File downloadedCompressedFile, String extractedToFilePath, BinaryType possibleFilenames) throws IOException, ExpectedFileNotFoundException { """ Unzip a downloaded zip file (this will implicitly overwrite any existing files) @param downloadedCompressedFile The downloaded zip file @param extrac...
java
String unzipFile(File downloadedCompressedFile, String extractedToFilePath, BinaryType possibleFilenames) throws IOException, ExpectedFileNotFoundException { LOG.debug("Attempting to extract binary from .zip file..."); ArrayList<String> filenamesWeAreSearchingFor = new ArrayList<String>(possibleFilename...
[ "String", "unzipFile", "(", "File", "downloadedCompressedFile", ",", "String", "extractedToFilePath", ",", "BinaryType", "possibleFilenames", ")", "throws", "IOException", ",", "ExpectedFileNotFoundException", "{", "LOG", ".", "debug", "(", "\"Attempting to extract binary f...
Unzip a downloaded zip file (this will implicitly overwrite any existing files) @param downloadedCompressedFile The downloaded zip file @param extractedToFilePath Path to extracted file @param possibleFilenames Names of the files we want to extract @return boolean @throws IOException IOException
[ "Unzip", "a", "downloaded", "zip", "file", "(", "this", "will", "implicitly", "overwrite", "any", "existing", "files", ")" ]
train
https://github.com/Ardesco/selenium-standalone-server-plugin/blob/e0ecfad426c1a28115cab60def84731d7a4d7e6f/src/main/java/com/lazerycode/selenium/extract/FileExtractor.java#L84-L110
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java
BoxApiFile.getDownloadRequest
public BoxRequestsFile.DownloadFile getDownloadRequest(File target, String fileId) throws IOException { """ Gets a request that downloads a given file to a target file @param target target file to download to, target can be either a directory or a file @param fileId id of the file to download @return r...
java
public BoxRequestsFile.DownloadFile getDownloadRequest(File target, String fileId) throws IOException{ if (!target.exists()){ throw new FileNotFoundException(); } BoxRequestsFile.DownloadFile request = new BoxRequestsFile.DownloadFile(fileId, target, getFileDownloadUr...
[ "public", "BoxRequestsFile", ".", "DownloadFile", "getDownloadRequest", "(", "File", "target", ",", "String", "fileId", ")", "throws", "IOException", "{", "if", "(", "!", "target", ".", "exists", "(", ")", ")", "{", "throw", "new", "FileNotFoundException", "("...
Gets a request that downloads a given file to a target file @param target target file to download to, target can be either a directory or a file @param fileId id of the file to download @return request to download a file to a target file @throws IOException throws FileNotFoundException if target file does not e...
[ "Gets", "a", "request", "that", "downloads", "a", "given", "file", "to", "a", "target", "file" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java#L367-L373
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java
FileSystemMetadataProvider.pathForMetadata
private static Path pathForMetadata(Path root, String namespace, String name) { """ Returns the correct metadata path for the given dataset. @param root A Path @param name A String dataset name @return the metadata Path """ return new Path( FileSystemDatasetRepository.pathForDataset(root, namesp...
java
private static Path pathForMetadata(Path root, String namespace, String name) { return new Path( FileSystemDatasetRepository.pathForDataset(root, namespace, name), METADATA_DIRECTORY); }
[ "private", "static", "Path", "pathForMetadata", "(", "Path", "root", ",", "String", "namespace", ",", "String", "name", ")", "{", "return", "new", "Path", "(", "FileSystemDatasetRepository", ".", "pathForDataset", "(", "root", ",", "namespace", ",", "name", ")...
Returns the correct metadata path for the given dataset. @param root A Path @param name A String dataset name @return the metadata Path
[ "Returns", "the", "correct", "metadata", "path", "for", "the", "given", "dataset", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java#L561-L565
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.getEntityAuditEvents
public List<EntityAuditEvent> getEntityAuditEvents(String entityId, String startKey, short numResults) throws AtlasServiceException { """ Get the entity audit events in decreasing order of timestamp for the given entity id @param entityId entity id @param startKey key for the first event to be return...
java
public List<EntityAuditEvent> getEntityAuditEvents(String entityId, String startKey, short numResults) throws AtlasServiceException { WebResource resource = getResource(API.LIST_ENTITY_AUDIT, entityId, URI_ENTITY_AUDIT); if (StringUtils.isNotEmpty(startKey)) { resource = resource...
[ "public", "List", "<", "EntityAuditEvent", ">", "getEntityAuditEvents", "(", "String", "entityId", ",", "String", "startKey", ",", "short", "numResults", ")", "throws", "AtlasServiceException", "{", "WebResource", "resource", "=", "getResource", "(", "API", ".", "...
Get the entity audit events in decreasing order of timestamp for the given entity id @param entityId entity id @param startKey key for the first event to be returned, used for pagination @param numResults number of results to be returned @return list of audit events for the entity id @throws AtlasServiceException
[ "Get", "the", "entity", "audit", "events", "in", "decreasing", "order", "of", "timestamp", "for", "the", "given", "entity", "id" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L787-L803
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java
BoxApiMetadata.getUpdateFileMetadataRequest
public BoxRequestsMetadata.UpdateFileMetadata getUpdateFileMetadataRequest(String id, String scope, String template) { """ Gets a request that updates the metadata for a specific template on a file @param id id of the file to retrieve metadata for @param scope currently only global and enterprise scopes ...
java
public BoxRequestsMetadata.UpdateFileMetadata getUpdateFileMetadataRequest(String id, String scope, String template) { BoxRequestsMetadata.UpdateFileMetadata request = new BoxRequestsMetadata.UpdateFileMetadata(getFileMetadataUrl(id, scope, template), mSession); return request; }
[ "public", "BoxRequestsMetadata", ".", "UpdateFileMetadata", "getUpdateFileMetadataRequest", "(", "String", "id", ",", "String", "scope", ",", "String", "template", ")", "{", "BoxRequestsMetadata", ".", "UpdateFileMetadata", "request", "=", "new", "BoxRequestsMetadata", ...
Gets a request that updates the metadata for a specific template on a file @param id id of the file to retrieve metadata for @param scope currently only global and enterprise scopes are supported @param template metadata template to use @return request to update metadata on a file
[ "Gets", "a", "request", "that", "updates", "the", "metadata", "for", "a", "specific", "template", "on", "a", "file" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java#L228-L231
nmdp-bioinformatics/ngs
align/src/main/java/org/nmdp/ngs/align/HighScoringPair.java
HighScoringPair.valueOf
public static HighScoringPair valueOf(final String value) { """ Return a new high scoring pair parsed from the specified value. @param value value to parse, must not be null @return a new high scoring pair parsed from the specified value @throws IllegalArgumentException if the value is not valid high scoring ...
java
public static HighScoringPair valueOf(final String value) { checkNotNull(value); List<String> tokens = Splitter.on("\t").trimResults().splitToList(value); if (tokens.size() != 12) { throw new IllegalArgumentException("value must have twelve fields"); } String source =...
[ "public", "static", "HighScoringPair", "valueOf", "(", "final", "String", "value", ")", "{", "checkNotNull", "(", "value", ")", ";", "List", "<", "String", ">", "tokens", "=", "Splitter", ".", "on", "(", "\"\\t\"", ")", ".", "trimResults", "(", ")", ".",...
Return a new high scoring pair parsed from the specified value. @param value value to parse, must not be null @return a new high scoring pair parsed from the specified value @throws IllegalArgumentException if the value is not valid high scoring pair format @throws NumberFormatException if a number valued field cannot...
[ "Return", "a", "new", "high", "scoring", "pair", "parsed", "from", "the", "specified", "value", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/HighScoringPair.java#L241-L261
twitter/cloudhopper-commons
ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java
PropertiesReplacementUtil.replaceProperties
static public InputStream replaceProperties(InputStream source, Properties props) throws IOException, SubstitutionException { """ Creates an InputStream containing the document resulting from replacing template parameters in the given InputStream source. @param source The source stream @param props The properti...
java
static public InputStream replaceProperties(InputStream source, Properties props) throws IOException, SubstitutionException { return replaceProperties(source, props, "${", "}"); }
[ "static", "public", "InputStream", "replaceProperties", "(", "InputStream", "source", ",", "Properties", "props", ")", "throws", "IOException", ",", "SubstitutionException", "{", "return", "replaceProperties", "(", "source", ",", "props", ",", "\"${\"", ",", "\"}\""...
Creates an InputStream containing the document resulting from replacing template parameters in the given InputStream source. @param source The source stream @param props The properties @return An InputStream containing the resulting document.
[ "Creates", "an", "InputStream", "containing", "the", "document", "resulting", "from", "replacing", "template", "parameters", "in", "the", "given", "InputStream", "source", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java#L110-L112
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/inject/dagger/Util.java
Util.makeConcreteClassAbstract
static SuggestedFix.Builder makeConcreteClassAbstract(ClassTree classTree, VisitorState state) { """ Returns a fix that changes a concrete class to an abstract class. <ul> <li>Removes {@code final} if it was there. <li>Adds {@code abstract} if it wasn't there. <li>Adds a private empty constructor if the clas...
java
static SuggestedFix.Builder makeConcreteClassAbstract(ClassTree classTree, VisitorState state) { Set<Modifier> flags = EnumSet.noneOf(Modifier.class); flags.addAll(classTree.getModifiers().getFlags()); boolean wasFinal = flags.remove(FINAL); boolean wasAbstract = !flags.add(ABSTRACT); if (classTree...
[ "static", "SuggestedFix", ".", "Builder", "makeConcreteClassAbstract", "(", "ClassTree", "classTree", ",", "VisitorState", "state", ")", "{", "Set", "<", "Modifier", ">", "flags", "=", "EnumSet", ".", "noneOf", "(", "Modifier", ".", "class", ")", ";", "flags",...
Returns a fix that changes a concrete class to an abstract class. <ul> <li>Removes {@code final} if it was there. <li>Adds {@code abstract} if it wasn't there. <li>Adds a private empty constructor if the class was {@code final} and had only a default constructor. </ul>
[ "Returns", "a", "fix", "that", "changes", "a", "concrete", "class", "to", "an", "abstract", "class", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/inject/dagger/Util.java#L164-L190
facebookarchive/hadoop-20
src/contrib/benchmark/src/java/org/apache/hadoop/hdfs/StructureGenerator.java
StructureGenerator.genFileStructure
private void genFileStructure() { """ Decides where to place all the files and its length. It first collects all empty directories in the tree. For each file, it randomly chooses an empty directory to place the file. The file's length is generated using Gaussian distribution. """ List<INode> leaves = ge...
java
private void genFileStructure() { List<INode> leaves = getLeaves(); int totalLeaves = leaves.size(); for (int i=0; i<numOfFiles; i++) { int leaveNum = r.nextInt(totalLeaves); double fileSize; do { fileSize = r.nextGaussian()+avgFileSize; } while (fileSize<0); leaves.get...
[ "private", "void", "genFileStructure", "(", ")", "{", "List", "<", "INode", ">", "leaves", "=", "getLeaves", "(", ")", ";", "int", "totalLeaves", "=", "leaves", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numOfFile...
Decides where to place all the files and its length. It first collects all empty directories in the tree. For each file, it randomly chooses an empty directory to place the file. The file's length is generated using Gaussian distribution.
[ "Decides", "where", "to", "place", "all", "the", "files", "and", "its", "length", ".", "It", "first", "collects", "all", "empty", "directories", "in", "the", "tree", ".", "For", "each", "file", "it", "randomly", "chooses", "an", "empty", "directory", "to",...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/benchmark/src/java/org/apache/hadoop/hdfs/StructureGenerator.java#L266-L278
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeRestrictionImpl_CustomFieldSerializer.java
OWLDatatypeRestrictionImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeRestrictionImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.goo...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeRestrictionImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDatatypeRestrictionImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeRestrictionImpl_CustomFieldSerializer.java#L95-L98
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.updateUser
public void updateUser(String poolId, String nodeId, String userName, NodeUpdateUserParameter nodeUpdateUserParameter) { """ Updates the password and expiration time of a user account on the specified compute node. This operation replaces of all the updatable properties of the account. For example, if the expiryT...
java
public void updateUser(String poolId, String nodeId, String userName, NodeUpdateUserParameter nodeUpdateUserParameter) { updateUserWithServiceResponseAsync(poolId, nodeId, userName, nodeUpdateUserParameter).toBlocking().single().body(); }
[ "public", "void", "updateUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ",", "NodeUpdateUserParameter", "nodeUpdateUserParameter", ")", "{", "updateUserWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ",", "userName", ",", ...
Updates the password and expiration time of a user account on the specified compute node. This operation replaces of all the updatable properties of the account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user acco...
[ "Updates", "the", "password", "and", "expiration", "time", "of", "a", "user", "account", "on", "the", "specified", "compute", "node", ".", "This", "operation", "replaces", "of", "all", "the", "updatable", "properties", "of", "the", "account", ".", "For", "ex...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L623-L625
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuParamSetf
@Deprecated public static int cuParamSetf(CUfunction hfunc, int offset, float value) { """ Adds a floating-point parameter to the function's argument list. <pre> CUresult cuParamSetf ( CUfunction hfunc, int offset, float value ) </pre> <div> <p>Adds a floating-point parameter to the function's ar...
java
@Deprecated public static int cuParamSetf(CUfunction hfunc, int offset, float value) { return checkResult(cuParamSetfNative(hfunc, offset, value)); }
[ "@", "Deprecated", "public", "static", "int", "cuParamSetf", "(", "CUfunction", "hfunc", ",", "int", "offset", ",", "float", "value", ")", "{", "return", "checkResult", "(", "cuParamSetfNative", "(", "hfunc", ",", "offset", ",", "value", ")", ")", ";", "}"...
Adds a floating-point parameter to the function's argument list. <pre> CUresult cuParamSetf ( CUfunction hfunc, int offset, float value ) </pre> <div> <p>Adds a floating-point parameter to the function's argument list. Deprecated Sets a floating-point parameter that will be specified the next time the kernel corresp...
[ "Adds", "a", "floating", "-", "point", "parameter", "to", "the", "function", "s", "argument", "list", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L11843-L11847
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/meta/AbstractBlockMeta.java
AbstractBlockMeta.commitPath
public static String commitPath(StorageDir dir, long blockId) { """ Committed block is stored in BlockStore under its {@link StorageDir} as a block file named after its blockId. e.g. Block 100 of StorageDir "/mnt/mem/0" has path: <p> /mnt/mem/0/100 @param blockId the block id @param dir the parent directory...
java
public static String commitPath(StorageDir dir, long blockId) { return PathUtils.concatPath(dir.getDirPath(), blockId); }
[ "public", "static", "String", "commitPath", "(", "StorageDir", "dir", ",", "long", "blockId", ")", "{", "return", "PathUtils", ".", "concatPath", "(", "dir", ".", "getDirPath", "(", ")", ",", "blockId", ")", ";", "}" ]
Committed block is stored in BlockStore under its {@link StorageDir} as a block file named after its blockId. e.g. Block 100 of StorageDir "/mnt/mem/0" has path: <p> /mnt/mem/0/100 @param blockId the block id @param dir the parent directory @return committed file path
[ "Committed", "block", "is", "stored", "in", "BlockStore", "under", "its", "{", "@link", "StorageDir", "}", "as", "a", "block", "file", "named", "after", "its", "blockId", ".", "e", ".", "g", ".", "Block", "100", "of", "StorageDir", "/", "mnt", "/", "me...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/meta/AbstractBlockMeta.java#L61-L63
geomajas/geomajas-project-client-gwt2
server-extension/src/main/java/org/geomajas/gwt2/client/controller/FeatureSelectionController.java
FeatureSelectionController.pixelsToUnits
private double pixelsToUnits(int pixels) { """ Transform a pixel-length into a real-life distance expressed in map CRS. This depends on the current map scale. @param pixels The number of pixels to calculate the distance for. @return The distance the given number of pixels entails. """ Coordinate c1 = ma...
java
private double pixelsToUnits(int pixels) { Coordinate c1 = mapPresenter.getViewPort().getTransformationService() .transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD); Coordinate c2 = mapPresenter.getViewPort().getTransformationService() .transform(new Coordinate(pixels, 0), RenderSpace.SC...
[ "private", "double", "pixelsToUnits", "(", "int", "pixels", ")", "{", "Coordinate", "c1", "=", "mapPresenter", ".", "getViewPort", "(", ")", ".", "getTransformationService", "(", ")", ".", "transform", "(", "new", "Coordinate", "(", "0", ",", "0", ")", ","...
Transform a pixel-length into a real-life distance expressed in map CRS. This depends on the current map scale. @param pixels The number of pixels to calculate the distance for. @return The distance the given number of pixels entails.
[ "Transform", "a", "pixel", "-", "length", "into", "a", "real", "-", "life", "distance", "expressed", "in", "map", "CRS", ".", "This", "depends", "on", "the", "current", "map", "scale", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/server-extension/src/main/java/org/geomajas/gwt2/client/controller/FeatureSelectionController.java#L293-L299
phax/ph-commons
ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java
KeyStoreHelper.loadPrivateKey
@Nonnull public static LoadedKey <KeyStore.PrivateKeyEntry> loadPrivateKey (@Nonnull final KeyStore aKeyStore, @Nonnull final String sKeyStorePath, @Nullable final String sKeyStore...
java
@Nonnull public static LoadedKey <KeyStore.PrivateKeyEntry> loadPrivateKey (@Nonnull final KeyStore aKeyStore, @Nonnull final String sKeyStorePath, @Nullable final String sKeyStore...
[ "@", "Nonnull", "public", "static", "LoadedKey", "<", "KeyStore", ".", "PrivateKeyEntry", ">", "loadPrivateKey", "(", "@", "Nonnull", "final", "KeyStore", "aKeyStore", ",", "@", "Nonnull", "final", "String", "sKeyStorePath", ",", "@", "Nullable", "final", "Strin...
Load the specified private key entry from the provided key store. @param aKeyStore The key store to load the key from. May not be <code>null</code>. @param sKeyStorePath Key store path. For nice error messages only. May be <code>null</code>. @param sKeyStoreKeyAlias The alias to be resolved in the key store. Must be n...
[ "Load", "the", "specified", "private", "key", "entry", "from", "the", "provided", "key", "store", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java#L335-L342
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java
ArrayHelper.getFirst
@Nullable @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE getFirst (@Nullable final ELEMENTTYPE... aArray) { """ Get the first element of the array or <code>null</code> if the passed array is empty. @param <ELEMENTTYPE> Array element type @param aArray The array who's first element is to be retriev...
java
@Nullable @SafeVarargs public static <ELEMENTTYPE> ELEMENTTYPE getFirst (@Nullable final ELEMENTTYPE... aArray) { return getFirst (aArray, null); }
[ "@", "Nullable", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "ELEMENTTYPE", "getFirst", "(", "@", "Nullable", "final", "ELEMENTTYPE", "...", "aArray", ")", "{", "return", "getFirst", "(", "aArray", ",", "null", ")", ";", "}" ]
Get the first element of the array or <code>null</code> if the passed array is empty. @param <ELEMENTTYPE> Array element type @param aArray The array who's first element is to be retrieved. May be <code>null</code> or empty. @return <code>null</code> if the passed array is <code>null</code> or empty - the first elemen...
[ "Get", "the", "first", "element", "of", "the", "array", "or", "<code", ">", "null<", "/", "code", ">", "if", "the", "passed", "array", "is", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/ArrayHelper.java#L1080-L1085
rzwitserloot/lombok
src/core/lombok/javac/handlers/HandleGetter.java
HandleGetter.generateGetterForField
public void generateGetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level, boolean lazy, List<JCAnnotation> onMethod) { """ Generates a getter on the stated field. Used by {@link HandleData}. The difference between this call and the handle method is as follows: If there is a {@code...
java
public void generateGetterForField(JavacNode fieldNode, DiagnosticPosition pos, AccessLevel level, boolean lazy, List<JCAnnotation> onMethod) { if (hasAnnotation(Getter.class, fieldNode)) { //The annotation will make it happen, so we can skip it. return; } createGetterForField(level, fieldNode, fieldNode, f...
[ "public", "void", "generateGetterForField", "(", "JavacNode", "fieldNode", ",", "DiagnosticPosition", "pos", ",", "AccessLevel", "level", ",", "boolean", "lazy", ",", "List", "<", "JCAnnotation", ">", "onMethod", ")", "{", "if", "(", "hasAnnotation", "(", "Gette...
Generates a getter on the stated field. Used by {@link HandleData}. The difference between this call and the handle method is as follows: If there is a {@code lombok.Getter} annotation on the field, it is used and the same rules apply (e.g. warning if the method already exists, stated access level applies). If not, ...
[ "Generates", "a", "getter", "on", "the", "stated", "field", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/HandleGetter.java#L122-L128
Impetus/Kundera
src/data-as-object/src/main/java/com/impetus/dao/utils/JsonUtil.java
JsonUtil.readJson
public final static <T> T readJson(InputStream jsonStream, Class<T> clazz) { """ Read json. @param <T> the generic type @param jsonStream the json stream @param clazz the clazz @return the t """ ObjectMapper mapper = new ObjectMapper(); try { if (jsonStream != null)...
java
public final static <T> T readJson(InputStream jsonStream, Class<T> clazz) { ObjectMapper mapper = new ObjectMapper(); try { if (jsonStream != null) { return mapper.readValue(jsonStream, clazz); } else { ...
[ "public", "final", "static", "<", "T", ">", "T", "readJson", "(", "InputStream", "jsonStream", ",", "Class", "<", "T", ">", "clazz", ")", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "try", "{", "if", "(", "jsonStream", "!=...
Read json. @param <T> the generic type @param jsonStream the json stream @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#L81-L102
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupDb.java
CmsSetupDb.hasTableOrColumn
public boolean hasTableOrColumn(String table, String column) { """ Checks if the given table, column or combination of both is available in the database in case insensitive way.<P> @param table the sought table @param column the sought column @return true if the requested table/column is available, false if...
java
public boolean hasTableOrColumn(String table, String column) { String tableName, columnName; boolean result; tableName = table == null ? null : table.toUpperCase(); columnName = column == null ? null : column.toUpperCase(); result = hasTableOrColumnCaseSensitive(tableName, colu...
[ "public", "boolean", "hasTableOrColumn", "(", "String", "table", ",", "String", "column", ")", "{", "String", "tableName", ",", "columnName", ";", "boolean", "result", ";", "tableName", "=", "table", "==", "null", "?", "null", ":", "table", ".", "toUpperCase...
Checks if the given table, column or combination of both is available in the database in case insensitive way.<P> @param table the sought table @param column the sought column @return true if the requested table/column is available, false if not
[ "Checks", "if", "the", "given", "table", "column", "or", "combination", "of", "both", "is", "available", "in", "the", "database", "in", "case", "insensitive", "way", ".", "<P", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupDb.java#L391-L407
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/x500/X500Principal.java
X500Principal.getName
public String getName(String format, Map<String, String> oidMap) { """ Returns a string representation of the X.500 distinguished name using the specified format. Valid values for the format are "RFC1779" and "RFC2253" (case insensitive). "CANONICAL" is not permitted and an {@code IllegalArgumentException} will...
java
public String getName(String format, Map<String, String> oidMap) { if (oidMap == null) { throw new NullPointerException (sun.security.util.ResourcesMgr.getString ("provided.null.OID.map")); } if (format != null) { if (format.equalsIgnoreCas...
[ "public", "String", "getName", "(", "String", "format", ",", "Map", "<", "String", ",", "String", ">", "oidMap", ")", "{", "if", "(", "oidMap", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "sun", ".", "security", ".", "util", "....
Returns a string representation of the X.500 distinguished name using the specified format. Valid values for the format are "RFC1779" and "RFC2253" (case insensitive). "CANONICAL" is not permitted and an {@code IllegalArgumentException} will be thrown. <p>This method returns Strings in the format as specified in {@lin...
[ "Returns", "a", "string", "representation", "of", "the", "X", ".", "500", "distinguished", "name", "using", "the", "specified", "format", ".", "Valid", "values", "for", "the", "format", "are", "RFC1779", "and", "RFC2253", "(", "case", "insensitive", ")", "."...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/x500/X500Principal.java#L406-L420
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java
FieldListener.setRespondsToMode
public void setRespondsToMode(int iMoveMode, boolean flag) { """ Set the mode this listener responds/doesn't respond to. @param iMoveMode The type of move being done (init/read/screen). @param flag True If this listener should respond to this kind of move. """ if (iMoveMode == DBConstants.SCREEN_MOVE...
java
public void setRespondsToMode(int iMoveMode, boolean flag) { if (iMoveMode == DBConstants.SCREEN_MOVE) m_bScreenMove = flag; if (iMoveMode == DBConstants.INIT_MOVE) m_bInitMove = flag; if (iMoveMode == DBConstants.READ_MOVE) m_bReadMove = flag; }
[ "public", "void", "setRespondsToMode", "(", "int", "iMoveMode", ",", "boolean", "flag", ")", "{", "if", "(", "iMoveMode", "==", "DBConstants", ".", "SCREEN_MOVE", ")", "m_bScreenMove", "=", "flag", ";", "if", "(", "iMoveMode", "==", "DBConstants", ".", "INIT...
Set the mode this listener responds/doesn't respond to. @param iMoveMode The type of move being done (init/read/screen). @param flag True If this listener should respond to this kind of move.
[ "Set", "the", "mode", "this", "listener", "responds", "/", "doesn", "t", "respond", "to", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldListener.java#L299-L307
OpenTSDB/opentsdb
src/tsd/HttpJsonSerializer.java
HttpJsonSerializer.parsePutV1
@Override public <T extends IncomingDataPoint> List<T> parsePutV1( final Class<T> type, final TypeReference<ArrayList<T>> typeReference) { """ Parses one or more data points for storage @return an array of data points to process for storage @throws JSONException if parsing failed @throws BadRequestExcep...
java
@Override public <T extends IncomingDataPoint> List<T> parsePutV1( final Class<T> type, final TypeReference<ArrayList<T>> typeReference) { if (!query.hasContent()) { throw new BadRequestException("Missing request content"); } // convert to a string so we can handle character encoding properly...
[ "@", "Override", "public", "<", "T", "extends", "IncomingDataPoint", ">", "List", "<", "T", ">", "parsePutV1", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "TypeReference", "<", "ArrayList", "<", "T", ">", ">", "typeReference", ")", "{", ...
Parses one or more data points for storage @return an array of data points to process for storage @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed @since 2.4
[ "Parses", "one", "or", "more", "data", "points", "for", "storage" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpJsonSerializer.java#L168-L194
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java
ClassPath.newInstance
public static <T> T newInstance(String className, Class<?> parameterType,Object initarg) throws SetupException { """ Use a constructor of the a class to create an instance @param className the class the create @param parameterType the parameter type @param initarg the initial constructor argument @param <T>...
java
public static <T> T newInstance(String className, Class<?> parameterType,Object initarg) throws SetupException { try { return newInstance(Class.forName(className),parameterType,initarg); } catch (ClassNotFoundException e) { throw new SetupException(e); } }
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "String", "className", ",", "Class", "<", "?", ">", "parameterType", ",", "Object", "initarg", ")", "throws", "SetupException", "{", "try", "{", "return", "newInstance", "(", "Class", ".", "forNam...
Use a constructor of the a class to create an instance @param className the class the create @param parameterType the parameter type @param initarg the initial constructor argument @param <T> the type to be created @return the initiate object @throws SetupException the setup error
[ "Use", "a", "constructor", "of", "the", "a", "class", "to", "create", "an", "instance" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/operations/ClassPath.java#L143-L155
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/support/WhiteLabelingOptions.java
WhiteLabelingOptions.setColor
private void setColor(String key, String color) throws HelloSignException { """ Helper method to validate and set a color. @param key String key @param color String color hex code @throws HelloSignException thrown if the color string is an invalid hex string """ if (!validateColor(color)) { ...
java
private void setColor(String key, String color) throws HelloSignException { if (!validateColor(color)) { throw new HelloSignException("Invalid color: " + color); } set(key, color); }
[ "private", "void", "setColor", "(", "String", "key", ",", "String", "color", ")", "throws", "HelloSignException", "{", "if", "(", "!", "validateColor", "(", "color", ")", ")", "{", "throw", "new", "HelloSignException", "(", "\"Invalid color: \"", "+", "color",...
Helper method to validate and set a color. @param key String key @param color String color hex code @throws HelloSignException thrown if the color string is an invalid hex string
[ "Helper", "method", "to", "validate", "and", "set", "a", "color", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/support/WhiteLabelingOptions.java#L90-L95
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.forAllForeignkeyColumnPairs
public void forAllForeignkeyColumnPairs(String template, Properties attributes) throws XDocletException { """ Processes the template for all column pairs of the current foreignkey. @param template The template @param attributes The attributes of the tag @exception XDocletException if ...
java
public void forAllForeignkeyColumnPairs(String template, Properties attributes) throws XDocletException { for (int idx = 0; idx < _curForeignkeyDef.getNumColumnPairs(); idx++) { _curPairLeft = _curForeignkeyDef.getLocalColumn(idx); _curPairRight = _curForeignkeyDef.getR...
[ "public", "void", "forAllForeignkeyColumnPairs", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "for", "(", "int", "idx", "=", "0", ";", "idx", "<", "_curForeignkeyDef", ".", "getNumColumnPairs", "(", ")", ";"...
Processes the template for all column pairs of the current foreignkey. @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occurs @doc.tag type="block"
[ "Processes", "the", "template", "for", "all", "column", "pairs", "of", "the", "current", "foreignkey", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1380-L1390
flex-oss/flex-fruit
fruit-jpa/src/main/java/org/cdlflex/fruit/jpa/QueryFactory.java
QueryFactory.count
public TypedQuery<Long> count(Filter filter) { """ Creates a new TypedQuery that queries the amount of entities of the entity class of this QueryFactory, that a query for the given Filter would return. @param filter the filter @return a query """ CriteriaQuery<Long> query = cb.createQuery(Long.cla...
java
public TypedQuery<Long> count(Filter filter) { CriteriaQuery<Long> query = cb.createQuery(Long.class); Root<T> from = query.from(getEntityClass()); if (filter != null) { Predicate where = new CriteriaMapper(from, cb).create(filter); query.where(where); } ...
[ "public", "TypedQuery", "<", "Long", ">", "count", "(", "Filter", "filter", ")", "{", "CriteriaQuery", "<", "Long", ">", "query", "=", "cb", ".", "createQuery", "(", "Long", ".", "class", ")", ";", "Root", "<", "T", ">", "from", "=", "query", ".", ...
Creates a new TypedQuery that queries the amount of entities of the entity class of this QueryFactory, that a query for the given Filter would return. @param filter the filter @return a query
[ "Creates", "a", "new", "TypedQuery", "that", "queries", "the", "amount", "of", "entities", "of", "the", "entity", "class", "of", "this", "QueryFactory", "that", "a", "query", "for", "the", "given", "Filter", "would", "return", "." ]
train
https://github.com/flex-oss/flex-fruit/blob/30d7eca5ee796b829f96c9932a95b259ca9738d9/fruit-jpa/src/main/java/org/cdlflex/fruit/jpa/QueryFactory.java#L61-L71
sailthru/sailthru-java-client
src/main/com/sailthru/client/SailthruClient.java
SailthruClient.scheduleBlastFromBlast
public JsonResponse scheduleBlastFromBlast(Integer blastId, Date scheduleTime, Blast blast) throws IOException { """ Schedule a mass mail blast from previous blast @param blastId blast ID @param scheduleTime schedule time for the blast @param blast Blast object @return JsonResponse @throws IOException """...
java
public JsonResponse scheduleBlastFromBlast(Integer blastId, Date scheduleTime, Blast blast) throws IOException { blast.setCopyBlast(blastId); blast.setScheduleTime(scheduleTime); return apiPost(blast); }
[ "public", "JsonResponse", "scheduleBlastFromBlast", "(", "Integer", "blastId", ",", "Date", "scheduleTime", ",", "Blast", "blast", ")", "throws", "IOException", "{", "blast", ".", "setCopyBlast", "(", "blastId", ")", ";", "blast", ".", "setScheduleTime", "(", "s...
Schedule a mass mail blast from previous blast @param blastId blast ID @param scheduleTime schedule time for the blast @param blast Blast object @return JsonResponse @throws IOException
[ "Schedule", "a", "mass", "mail", "blast", "from", "previous", "blast" ]
train
https://github.com/sailthru/sailthru-java-client/blob/62b491f6a39b41b836bfc021779200d29b6d2069/src/main/com/sailthru/client/SailthruClient.java#L210-L214
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPTaxCategoryPersistenceImpl.java
CPTaxCategoryPersistenceImpl.findByGroupId
@Override public List<CPTaxCategory> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the cp tax categories where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary ke...
java
@Override public List<CPTaxCategory> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPTaxCategory", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp tax categories where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. ...
[ "Returns", "a", "range", "of", "all", "the", "cp", "tax", "categories", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPTaxCategoryPersistenceImpl.java#L138-L141
structurizr/java
structurizr-core/src/com/structurizr/model/StaticStructureElement.java
StaticStructureElement.delivers
@Nullable public Relationship delivers(@Nonnull Person destination, String description, String technology, InteractionStyle interactionStyle) { """ Adds a unidirectional relationship between this element and a person. @param destination the target of the relationship @param description a descript...
java
@Nullable public Relationship delivers(@Nonnull Person destination, String description, String technology, InteractionStyle interactionStyle) { return uses(destination, description, technology, interactionStyle); }
[ "@", "Nullable", "public", "Relationship", "delivers", "(", "@", "Nonnull", "Person", "destination", ",", "String", "description", ",", "String", "technology", ",", "InteractionStyle", "interactionStyle", ")", "{", "return", "uses", "(", "destination", ",", "descr...
Adds a unidirectional relationship between this element and a person. @param destination the target of the relationship @param description a description of the relationship (e.g. "sends e-mail to") @param technology the technology details (e.g. JSON/HTTPS) @param interactionStyle the interaction style ...
[ "Adds", "a", "unidirectional", "relationship", "between", "this", "element", "and", "a", "person", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/StaticStructureElement.java#L166-L169
Jasig/uPortal
uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java
AuthorizationImpl.getInheritedPrincipals
private Iterator getInheritedPrincipals(IAuthorizationPrincipal principal) throws AuthorizationException { """ Hook into the Groups system, find all containing groups, and convert the them to <code> IAuthorizationPrincipals</code>. @param principal - org.apereo.portal.security.IAuthorizationPrincip...
java
private Iterator getInheritedPrincipals(IAuthorizationPrincipal principal) throws AuthorizationException { Iterator i = null; ArrayList<IAuthorizationPrincipal> al = new ArrayList<>(5); try { i = getGroupsForPrincipal(principal); } catch (GroupsException ge) { ...
[ "private", "Iterator", "getInheritedPrincipals", "(", "IAuthorizationPrincipal", "principal", ")", "throws", "AuthorizationException", "{", "Iterator", "i", "=", "null", ";", "ArrayList", "<", "IAuthorizationPrincipal", ">", "al", "=", "new", "ArrayList", "<>", "(", ...
Hook into the Groups system, find all containing groups, and convert the them to <code> IAuthorizationPrincipals</code>. @param principal - org.apereo.portal.security.IAuthorizationPrincipal @return java.util.Iterator over Collection of IEntityGroups
[ "Hook", "into", "the", "Groups", "system", "find", "all", "containing", "groups", "and", "convert", "the", "them", "to", "<code", ">", "IAuthorizationPrincipals<", "/", "code", ">", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java#L744-L761
abel533/EasyXls
src/main/java/com/github/abel533/easyxls/EasyXls.java
EasyXls.list2Xls
public static boolean list2Xls(ExcelConfig config, List<?> list, OutputStream outputStream) throws Exception { """ 导出list对象到excel @param config 配置 @param list 导出的list @param outputStream 输出流 @return 处理结果,true成功,false失败 @throws Exception """ return XlsUtil.list2Xls(config, list, outputStrea...
java
public static boolean list2Xls(ExcelConfig config, List<?> list, OutputStream outputStream) throws Exception { return XlsUtil.list2Xls(config, list, outputStream); }
[ "public", "static", "boolean", "list2Xls", "(", "ExcelConfig", "config", ",", "List", "<", "?", ">", "list", ",", "OutputStream", "outputStream", ")", "throws", "Exception", "{", "return", "XlsUtil", ".", "list2Xls", "(", "config", ",", "list", ",", "outputS...
导出list对象到excel @param config 配置 @param list 导出的list @param outputStream 输出流 @return 处理结果,true成功,false失败 @throws Exception
[ "导出list对象到excel" ]
train
https://github.com/abel533/EasyXls/blob/f73be23745c2180d7c0b8f0a510e72e61cc37d5d/src/main/java/com/github/abel533/easyxls/EasyXls.java#L122-L124
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/generators/SEPAGeneratorFactory.java
SEPAGeneratorFactory.get
public static ISEPAGenerator get(AbstractSEPAGV job, SepaVersion version) throws ClassNotFoundException, InstantiationException, IllegalAccessException { """ Gibt den passenden SEPA Generator für die angegebene PAIN-Version. @param job der zu erzeugende Job. @param version die PAIN-Version. @retur...
java
public static ISEPAGenerator get(AbstractSEPAGV job, SepaVersion version) throws ClassNotFoundException, InstantiationException, IllegalAccessException { String jobname = job.getPainJobName(); // referenzierter pain-Geschäftsvorfall return get(jobname, version); }
[ "public", "static", "ISEPAGenerator", "get", "(", "AbstractSEPAGV", "job", ",", "SepaVersion", "version", ")", "throws", "ClassNotFoundException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "String", "jobname", "=", "job", ".", "getPainJobName", ...
Gibt den passenden SEPA Generator für die angegebene PAIN-Version. @param job der zu erzeugende Job. @param version die PAIN-Version. @return ISEPAGenerator @throws IllegalAccessException @throws InstantiationException @throws ClassNotFoundException
[ "Gibt", "den", "passenden", "SEPA", "Generator", "für", "die", "angegebene", "PAIN", "-", "Version", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/generators/SEPAGeneratorFactory.java#L30-L34
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java
CassQuery.appendIn
private boolean appendIn(StringBuilder builder, CQLTranslator translator, String columnName) { """ Append in. @param builder the builder @param translator the translator @param columnName the column name @return true, if successful """ boolean isPresent; isPresent = true; trans...
java
private boolean appendIn(StringBuilder builder, CQLTranslator translator, String columnName) { boolean isPresent; isPresent = true; translator.ensureCase(builder, columnName, false); builder.append(" IN "); return isPresent; }
[ "private", "boolean", "appendIn", "(", "StringBuilder", "builder", ",", "CQLTranslator", "translator", ",", "String", "columnName", ")", "{", "boolean", "isPresent", ";", "isPresent", "=", "true", ";", "translator", ".", "ensureCase", "(", "builder", ",", "colum...
Append in. @param builder the builder @param translator the translator @param columnName the column name @return true, if successful
[ "Append", "in", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/query/CassQuery.java#L1077-L1083
mikepenz/Crossfader
library/src/main/java/com/mikepenz/crossfader/util/UIUtils.java
UIUtils.isPointInsideView
public static boolean isPointInsideView(float x, float y, View view) { """ Determines if given points are inside view @param x - x coordinate of point @param y - y coordinate of point @param view - view object to compare @return true if the points are within view bounds, false otherwise """ ...
java
public static boolean isPointInsideView(float x, float y, View view) { int location[] = new int[2]; view.getLocationOnScreen(location); int viewX = location[0]; int viewY = location[1]; //point is inside view bounds if ((viewX < x && x < (viewX + view.getWidth())) && ...
[ "public", "static", "boolean", "isPointInsideView", "(", "float", "x", ",", "float", "y", ",", "View", "view", ")", "{", "int", "location", "[", "]", "=", "new", "int", "[", "2", "]", ";", "view", ".", "getLocationOnScreen", "(", "location", ")", ";", ...
Determines if given points are inside view @param x - x coordinate of point @param y - y coordinate of point @param view - view object to compare @return true if the points are within view bounds, false otherwise
[ "Determines", "if", "given", "points", "are", "inside", "view" ]
train
https://github.com/mikepenz/Crossfader/blob/b2e1ee461bc3bcdd897d83f0fad950663bdc73b4/library/src/main/java/com/mikepenz/crossfader/util/UIUtils.java#L50-L63
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.fillResourceFromURL
protected <T extends AbstractResource> T fillResourceFromURL(URLConnection con, T resource) throws IOException { """ Get the content from the URLConnection, create a Resource representing the content and carry over some metadata like HTTP Result and location header. @param <T extends AbstractResource> the resou...
java
protected <T extends AbstractResource> T fillResourceFromURL(URLConnection con, T resource) throws IOException { resource.fill(con); resource.getAdditionalHeaders().putAll(getAdditionalHeaders()); // carry over additional headers TODO don't do it if there are no additional headers return resource; }
[ "protected", "<", "T", "extends", "AbstractResource", ">", "T", "fillResourceFromURL", "(", "URLConnection", "con", ",", "T", "resource", ")", "throws", "IOException", "{", "resource", ".", "fill", "(", "con", ")", ";", "resource", ".", "getAdditionalHeaders", ...
Get the content from the URLConnection, create a Resource representing the content and carry over some metadata like HTTP Result and location header. @param <T extends AbstractResource> the resource that will be created and filled @param con the URLConnection used to get the data @param resourceClass the resource clas...
[ "Get", "the", "content", "from", "the", "URLConnection", "create", "a", "Resource", "representing", "the", "content", "and", "carry", "over", "some", "metadata", "like", "HTTP", "Result", "and", "location", "header", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L428-L432
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java
DatatypeConfigurationException.printStackTrace
public void printStackTrace() { """ Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object. """ if (!isJDK14OrAbove && causeOnJDK13OrBelow != null) { printStackTrace0(new PrintWriter(System.err, true)); ...
java
public void printStackTrace() { if (!isJDK14OrAbove && causeOnJDK13OrBelow != null) { printStackTrace0(new PrintWriter(System.err, true)); } else { super.printStackTrace(); } }
[ "public", "void", "printStackTrace", "(", ")", "{", "if", "(", "!", "isJDK14OrAbove", "&&", "causeOnJDK13OrBelow", "!=", "null", ")", "{", "printStackTrace0", "(", "new", "PrintWriter", "(", "System", ".", "err", ",", "true", ")", ")", ";", "}", "else", ...
Print the the trace of methods from where the error originated. This will trace all nested exception objects, as well as this object.
[ "Print", "the", "the", "trace", "of", "methods", "from", "where", "the", "error", "originated", ".", "This", "will", "trace", "all", "nested", "exception", "objects", "as", "well", "as", "this", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java#L96-L103
landawn/AbacusUtil
src/com/landawn/abacus/util/CouchbaseExecutor.java
CouchbaseExecutor.exists
@SafeVarargs public final boolean exists(final String query, final Object... parameters) { """ Always remember to set "<code>LIMIT 1</code>" in the sql statement for better performance. @param query @param parameters @return """ final QueryResult resultSet = execute(query, parameters); ...
java
@SafeVarargs public final boolean exists(final String query, final Object... parameters) { final QueryResult resultSet = execute(query, parameters); return resultSet.iterator().hasNext(); }
[ "@", "SafeVarargs", "public", "final", "boolean", "exists", "(", "final", "String", "query", ",", "final", "Object", "...", "parameters", ")", "{", "final", "QueryResult", "resultSet", "=", "execute", "(", "query", ",", "parameters", ")", ";", "return", "res...
Always remember to set "<code>LIMIT 1</code>" in the sql statement for better performance. @param query @param parameters @return
[ "Always", "remember", "to", "set", "<code", ">", "LIMIT", "1<", "/", "code", ">", "in", "the", "sql", "statement", "for", "better", "performance", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CouchbaseExecutor.java#L759-L764
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPCtxtProcessor.java
JPAPCtxtProcessor.createInjectionBinding
@Override public InjectionBinding<PersistenceContext> createInjectionBinding (PersistenceContext annotation, Class<?> instanceClass, Member member, String jndiName) throws InjectionException { """ Returns an annotation specific InjectionBinding associated...
java
@Override public InjectionBinding<PersistenceContext> createInjectionBinding (PersistenceContext annotation, Class<?> instanceClass, Member member, String jndiName) throws InjectionException { return new JPAPCtxtInjectionBinding(annotation, ivNameS...
[ "@", "Override", "public", "InjectionBinding", "<", "PersistenceContext", ">", "createInjectionBinding", "(", "PersistenceContext", "annotation", ",", "Class", "<", "?", ">", "instanceClass", ",", "Member", "member", ",", "String", "jndiName", ")", "throws", "Inject...
Returns an annotation specific InjectionBinding associated with the input annotation. <p> Provides a 'factory' to the base InjectionProcessor for creating annotation specific Binding objects. <p> @param annotation the annotation to create a binding for. @param compNSConfig component configuration data. @throws Injec...
[ "Returns", "an", "annotation", "specific", "InjectionBinding", "associated", "with", "the", "input", "annotation", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPCtxtProcessor.java#L130-L136
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java
IdentityTemplateLibrary.decodeCoordinates
static Point2d[] decodeCoordinates(String str) { """ Decode coordinates that have been placed in a byte buffer. @param str the string to decode @return array of coordinates """ if (str.startsWith("|(")) { int end = str.indexOf(')', 2); if (end < 0) return new...
java
static Point2d[] decodeCoordinates(String str) { if (str.startsWith("|(")) { int end = str.indexOf(')', 2); if (end < 0) return new Point2d[0]; String[] strs = str.substring(2, end).split(";"); Point2d[] points = new Point2d[strs.length]; ...
[ "static", "Point2d", "[", "]", "decodeCoordinates", "(", "String", "str", ")", "{", "if", "(", "str", ".", "startsWith", "(", "\"|(\"", ")", ")", "{", "int", "end", "=", "str", ".", "indexOf", "(", "'", "'", ",", "2", ")", ";", "if", "(", "end", ...
Decode coordinates that have been placed in a byte buffer. @param str the string to decode @return array of coordinates
[ "Decode", "coordinates", "that", "have", "been", "placed", "in", "a", "byte", "buffer", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/IdentityTemplateLibrary.java#L249-L272
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/text.java
text.getSentence
public static String getSentence(int maxNumWords, boolean startLorem) { """ Returns a randomly generated sentence of lorem ipsum text. <br/> The first word is capitalized, and the sentence ends in either a period, exclamation mark or question mark. Commas are added at random. @param maxNumWords the length of...
java
public static String getSentence(int maxNumWords, boolean startLorem) { // number of words varies between 3 and 15 int wordCount = QuickUtils.math.getRandomInteger(3, maxNumWords); List<String> words = getWords(wordCount, startLorem); // run trough string, add commas every 3-10 words ...
[ "public", "static", "String", "getSentence", "(", "int", "maxNumWords", ",", "boolean", "startLorem", ")", "{", "// number of words varies between 3 and 15", "int", "wordCount", "=", "QuickUtils", ".", "math", ".", "getRandomInteger", "(", "3", ",", "maxNumWords", "...
Returns a randomly generated sentence of lorem ipsum text. <br/> The first word is capitalized, and the sentence ends in either a period, exclamation mark or question mark. Commas are added at random. @param maxNumWords the length of the word @param startLorem whether to start with standard lorem ipsum text or not @r...
[ "Returns", "a", "randomly", "generated", "sentence", "of", "lorem", "ipsum", "text", ".", "<br", "/", ">", "The", "first", "word", "is", "capitalized", "and", "the", "sentence", "ends", "in", "either", "a", "period", "exclamation", "mark", "or", "question", ...
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/text.java#L168-L197
alkacon/opencms-core
src/org/opencms/ui/apps/modules/edit/CmsEditModuleForm.java
CmsEditModuleForm.addExportPointRow
public void addExportPointRow(String src, String target) { """ Adds another entry to the list of export points in the export point tab.<p> @param src the export point source @param target the export point target """ CmsExportPointWidget exportPointWidget = new CmsExportPointWidget(src, target); ...
java
public void addExportPointRow(String src, String target) { CmsExportPointWidget exportPointWidget = new CmsExportPointWidget(src, target); m_exportPointGroup.addRow(exportPointWidget); // row.addStyleName(COMPLEX_ROW); // m_exportPoints.addComponent(row); }
[ "public", "void", "addExportPointRow", "(", "String", "src", ",", "String", "target", ")", "{", "CmsExportPointWidget", "exportPointWidget", "=", "new", "CmsExportPointWidget", "(", "src", ",", "target", ")", ";", "m_exportPointGroup", ".", "addRow", "(", "exportP...
Adds another entry to the list of export points in the export point tab.<p> @param src the export point source @param target the export point target
[ "Adds", "another", "entry", "to", "the", "list", "of", "export", "points", "in", "the", "export", "point", "tab", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/modules/edit/CmsEditModuleForm.java#L548-L554