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
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.getByResourceGroupAsync
public Observable<AppServiceCertificateOrderInner> getByResourceGroupAsync(String resourceGroupName, String certificateOrderName) { """ Get a certificate order. Get a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the c...
java
public Observable<AppServiceCertificateOrderInner> getByResourceGroupAsync(String resourceGroupName, String certificateOrderName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).map(new Func1<ServiceResponse<AppServiceCertificateOrderInner>, AppServiceCertificateOrde...
[ "public", "Observable", "<", "AppServiceCertificateOrderInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "certifica...
Get a certificate order. Get a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order.. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the AppServiceCertificateO...
[ "Get", "a", "certificate", "order", ".", "Get", "a", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L530-L537
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DateTimeUtils.java
DateTimeUtils.addHours
public static Calendar addHours(Calendar origin, int value) { """ Add/Subtract the specified amount of hours to the given {@link Calendar}. <p> The returned {@link Calendar} has its fields synced. </p> @param origin @param value @return @since 0.9.2 """ Calendar cal = sync((Calendar) origin....
java
public static Calendar addHours(Calendar origin, int value) { Calendar cal = sync((Calendar) origin.clone()); cal.add(Calendar.HOUR_OF_DAY, value); return sync(cal); }
[ "public", "static", "Calendar", "addHours", "(", "Calendar", "origin", ",", "int", "value", ")", "{", "Calendar", "cal", "=", "sync", "(", "(", "Calendar", ")", "origin", ".", "clone", "(", ")", ")", ";", "cal", ".", "add", "(", "Calendar", ".", "HOU...
Add/Subtract the specified amount of hours to the given {@link Calendar}. <p> The returned {@link Calendar} has its fields synced. </p> @param origin @param value @return @since 0.9.2
[ "Add", "/", "Subtract", "the", "specified", "amount", "of", "hours", "to", "the", "given", "{", "@link", "Calendar", "}", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DateTimeUtils.java#L447-L451
belaban/JGroups
src/org/jgroups/util/DefaultThreadFactory.java
DefaultThreadFactory.renameThread
public void renameThread(String base_name, Thread thread, String addr, String cluster_name) { """ Names a thread according to base_name, cluster name and local address. If includeClusterName and includeLocalAddress are null, but cluster_name is set, then we assume we have a shared transport and name the thread sh...
java
public void renameThread(String base_name, Thread thread, String addr, String cluster_name) { String thread_name=getThreadName(base_name, thread, addr, cluster_name); if(thread_name != null) thread.setName(thread_name); }
[ "public", "void", "renameThread", "(", "String", "base_name", ",", "Thread", "thread", ",", "String", "addr", ",", "String", "cluster_name", ")", "{", "String", "thread_name", "=", "getThreadName", "(", "base_name", ",", "thread", ",", "addr", ",", "cluster_na...
Names a thread according to base_name, cluster name and local address. If includeClusterName and includeLocalAddress are null, but cluster_name is set, then we assume we have a shared transport and name the thread shared=clusterName. In the latter case, clusterName points to the singleton_name of TP. @param base_name @...
[ "Names", "a", "thread", "according", "to", "base_name", "cluster", "name", "and", "local", "address", ".", "If", "includeClusterName", "and", "includeLocalAddress", "are", "null", "but", "cluster_name", "is", "set", "then", "we", "assume", "we", "have", "a", "...
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/DefaultThreadFactory.java#L88-L92
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/UserService.java
UserService.persistNewUser
public E persistNewUser(E user, boolean encryptPassword) { """ Persists a new user in the database. @param user The user to create @param encryptPassword Whether or not the current password of the user object should be encrypted or not before the object is persisted in the db @return The persisted...
java
public E persistNewUser(E user, boolean encryptPassword) { if (user.getId() != null) { // to be sure that we are in the // "create" case, the id must be null return user; } if (encryptPassword) { user.setPassword(passwordEncoder.encode(user.getPa...
[ "public", "E", "persistNewUser", "(", "E", "user", ",", "boolean", "encryptPassword", ")", "{", "if", "(", "user", ".", "getId", "(", ")", "!=", "null", ")", "{", "// to be sure that we are in the", "// \"create\" case, the id must be null", "return", "user", ";",...
Persists a new user in the database. @param user The user to create @param encryptPassword Whether or not the current password of the user object should be encrypted or not before the object is persisted in the db @return The persisted user object (incl. ID value)
[ "Persists", "a", "new", "user", "in", "the", "database", "." ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/UserService.java#L189-L204
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/XmlUtils.java
XmlUtils.validateXml
public static void validateXml(Node doc, InputStream schemaStream) throws AlipayApiException { """ Validates the element tree context via given XML schema file. @param doc the XML document to validate @param schemaStream the XML schema file input stream @throws ApiException error occurs if validation fail ...
java
public static void validateXml(Node doc, InputStream schemaStream) throws AlipayApiException { try { Source source = new StreamSource(schemaStream); Schema schema = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(source); Validat...
[ "public", "static", "void", "validateXml", "(", "Node", "doc", ",", "InputStream", "schemaStream", ")", "throws", "AlipayApiException", "{", "try", "{", "Source", "source", "=", "new", "StreamSource", "(", "schemaStream", ")", ";", "Schema", "schema", "=", "Sc...
Validates the element tree context via given XML schema file. @param doc the XML document to validate @param schemaStream the XML schema file input stream @throws ApiException error occurs if validation fail
[ "Validates", "the", "element", "tree", "context", "via", "given", "XML", "schema", "file", "." ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L536-L558
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java
MessagePattern.validateArgumentName
public static int validateArgumentName(String name) { """ Validates and parses an argument name or argument number string. An argument name must be a "pattern identifier", that is, it must contain no Unicode Pattern_Syntax or Pattern_White_Space characters. If it only contains ASCII digits, then it must be a sm...
java
public static int validateArgumentName(String name) { if(!PatternProps.isIdentifier(name)) { return ARG_NAME_NOT_VALID; } return parseArgNumber(name, 0, name.length()); }
[ "public", "static", "int", "validateArgumentName", "(", "String", "name", ")", "{", "if", "(", "!", "PatternProps", ".", "isIdentifier", "(", "name", ")", ")", "{", "return", "ARG_NAME_NOT_VALID", ";", "}", "return", "parseArgNumber", "(", "name", ",", "0", ...
Validates and parses an argument name or argument number string. An argument name must be a "pattern identifier", that is, it must contain no Unicode Pattern_Syntax or Pattern_White_Space characters. If it only contains ASCII digits, then it must be a small integer with no leading zero. @param name Input string. @retur...
[ "Validates", "and", "parses", "an", "argument", "name", "or", "argument", "number", "string", ".", "An", "argument", "name", "must", "be", "a", "pattern", "identifier", "that", "is", "it", "must", "contain", "no", "Unicode", "Pattern_Syntax", "or", "Pattern_Wh...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L345-L350
fullcontact/hadoop-sstable
sstable-core/src/main/java/com/fullcontact/cassandra/io/sstable/Descriptor.java
Descriptor.fromFilename
public static Pair<Descriptor, String> fromFilename(Path directory, String name) { """ Filename of the form "<ksname>-<cfname>-[tmp-][<version>-]<gen>-<component>" @param directory The directory of the SSTable files @param name The name of the SSTable file @return A Descriptor for the SSTable, and the Co...
java
public static Pair<Descriptor, String> fromFilename(Path directory, String name) { // tokenize the filename StringTokenizer st = new StringTokenizer(name, String.valueOf(separator)); String nexttok; // all filenames must start with keyspace and column family String ksname = st.n...
[ "public", "static", "Pair", "<", "Descriptor", ",", "String", ">", "fromFilename", "(", "Path", "directory", ",", "String", "name", ")", "{", "// tokenize the filename", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "name", ",", "String", ".", "...
Filename of the form "<ksname>-<cfname>-[tmp-][<version>-]<gen>-<component>" @param directory The directory of the SSTable files @param name The name of the SSTable file @return A Descriptor for the SSTable, and the Component remainder.
[ "Filename", "of", "the", "form", "<ksname", ">", "-", "<cfname", ">", "-", "[", "tmp", "-", "]", "[", "<version", ">", "-", "]", "<gen", ">", "-", "<component", ">" ]
train
https://github.com/fullcontact/hadoop-sstable/blob/1189c2cb3a2cbbe03b75fda1cf02698e6283dfb2/sstable-core/src/main/java/com/fullcontact/cassandra/io/sstable/Descriptor.java#L243-L272
youseries/urule
urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java
DbPersistenceManager.readBundle
private NodePropBundle readBundle(NodeId id, ResultSet rs, int column) throws SQLException { """ Reads and parses a bundle from the BLOB in the given column of the current row of the given result set. This is a helper method to circumvent issues JCR-1039 and JCR-1474. @param id bundle identifier ...
java
private NodePropBundle readBundle(NodeId id, ResultSet rs, int column) throws SQLException { try { InputStream in; if (rs.getMetaData().getColumnType(column) == Types.BLOB) { in = rs.getBlob(column).getBinaryStream(); } else { in = ...
[ "private", "NodePropBundle", "readBundle", "(", "NodeId", "id", ",", "ResultSet", "rs", ",", "int", "column", ")", "throws", "SQLException", "{", "try", "{", "InputStream", "in", ";", "if", "(", "rs", ".", "getMetaData", "(", ")", ".", "getColumnType", "("...
Reads and parses a bundle from the BLOB in the given column of the current row of the given result set. This is a helper method to circumvent issues JCR-1039 and JCR-1474. @param id bundle identifier @param rs result set @param column BLOB column @return parsed bundle @throws SQLException if the bundle can not be read...
[ "Reads", "and", "parses", "a", "bundle", "from", "the", "BLOB", "in", "the", "given", "column", "of", "the", "current", "row", "of", "the", "given", "result", "set", ".", "This", "is", "a", "helper", "method", "to", "circumvent", "issues", "JCR", "-", ...
train
https://github.com/youseries/urule/blob/3fa0eb4439e97aa292e744bcbd88a9faa36661d8/urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java#L895-L915
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/ast/prims/mungers/AstGroup.java
AstGroup.doGroups
public static IcedHashMap<G, String> doGroups(Frame fr, int[] gbCols, AGG[] aggs) { """ results using 'aggs'. Return an array of groups, with the aggregate results. """ return doGroups(fr, gbCols, aggs, false); }
java
public static IcedHashMap<G, String> doGroups(Frame fr, int[] gbCols, AGG[] aggs) { return doGroups(fr, gbCols, aggs, false); }
[ "public", "static", "IcedHashMap", "<", "G", ",", "String", ">", "doGroups", "(", "Frame", "fr", ",", "int", "[", "]", "gbCols", ",", "AGG", "[", "]", "aggs", ")", "{", "return", "doGroups", "(", "fr", ",", "gbCols", ",", "aggs", ",", "false", ")",...
results using 'aggs'. Return an array of groups, with the aggregate results.
[ "results", "using", "aggs", ".", "Return", "an", "array", "of", "groups", "with", "the", "aggregate", "results", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/ast/prims/mungers/AstGroup.java#L435-L437
keenlabs/KeenClient-Java
query/src/main/java/io/keen/client/java/KeenQueryClient.java
KeenQueryClient.constructFunnelResult
private static FunnelResult constructFunnelResult(Map<String, Object> responseMap) { """ Constructs a FunnelResult from a response object map. This map should include a 'result' key and may include an optional 'actors' key as well. @param responseMap The server response, deserialized to a Map<String, Object> ...
java
private static FunnelResult constructFunnelResult(Map<String, Object> responseMap) { // Create a result for the 'result' field of the funnel response. FunnelResult won't contain // intervals or groups, as those parameters aren't supported for Funnel. QueryResult funnelResult = constructQueryResu...
[ "private", "static", "FunnelResult", "constructFunnelResult", "(", "Map", "<", "String", ",", "Object", ">", "responseMap", ")", "{", "// Create a result for the 'result' field of the funnel response. FunnelResult won't contain", "// intervals or groups, as those parameters aren't supp...
Constructs a FunnelResult from a response object map. This map should include a 'result' key and may include an optional 'actors' key as well. @param responseMap The server response, deserialized to a Map<String, Object> @return A FunnelResult instance.
[ "Constructs", "a", "FunnelResult", "from", "a", "response", "object", "map", ".", "This", "map", "should", "include", "a", "result", "key", "and", "may", "include", "an", "optional", "actors", "key", "as", "well", "." ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/query/src/main/java/io/keen/client/java/KeenQueryClient.java#L632-L661
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java
ST_GeometryShadow.shadowPolygon
private static Geometry shadowPolygon(Polygon polygon, double[] shadowOffset, GeometryFactory factory, boolean doUnion) { """ Compute the shadow for a polygon @param polygon the input polygon @param shadowOffset computed according the sun position and the height of the geometry @return """ Coordi...
java
private static Geometry shadowPolygon(Polygon polygon, double[] shadowOffset, GeometryFactory factory, boolean doUnion) { Coordinate[] shellCoords = polygon.getExteriorRing().getCoordinates(); Collection<Polygon> shadows = new ArrayList<Polygon>(); createShadowPolygons(shadows, shellCoords, shad...
[ "private", "static", "Geometry", "shadowPolygon", "(", "Polygon", "polygon", ",", "double", "[", "]", "shadowOffset", ",", "GeometryFactory", "factory", ",", "boolean", "doUnion", ")", "{", "Coordinate", "[", "]", "shellCoords", "=", "polygon", ".", "getExterior...
Compute the shadow for a polygon @param polygon the input polygon @param shadowOffset computed according the sun position and the height of the geometry @return
[ "Compute", "the", "shadow", "for", "a", "polygon" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java#L158-L182
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/impl/SecurityActions.java
SecurityActions.loadAndInstantiateFromModule
static <T> T loadAndInstantiateFromModule(final String moduleId, final Class<T> iface, final String name) throws Exception { """ WARNING: Calling this method in non modular context has the side effect to load the Module class. This is problematic, the system packages required to properly execute an embedded-serve...
java
static <T> T loadAndInstantiateFromModule(final String moduleId, final Class<T> iface, final String name) throws Exception { if (!WildFlySecurityManager.isChecking()) { return internalLoadAndInstantiateFromModule(moduleId, iface, name); } else { try { return doPri...
[ "static", "<", "T", ">", "T", "loadAndInstantiateFromModule", "(", "final", "String", "moduleId", ",", "final", "Class", "<", "T", ">", "iface", ",", "final", "String", "name", ")", "throws", "Exception", "{", "if", "(", "!", "WildFlySecurityManager", ".", ...
WARNING: Calling this method in non modular context has the side effect to load the Module class. This is problematic, the system packages required to properly execute an embedded-server will not be correct.
[ "WARNING", ":", "Calling", "this", "method", "in", "non", "modular", "context", "has", "the", "side", "effect", "to", "load", "the", "Module", "class", ".", "This", "is", "problematic", "the", "system", "packages", "required", "to", "properly", "execute", "a...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/SecurityActions.java#L90-L109
maxschuster/DataUrl
src/main/java/eu/maxschuster/dataurl/DataUrlSerializer.java
DataUrlSerializer.getAppliedCharset
protected String getAppliedCharset(Map<String, String> headers) { """ Gets the charset that should be used to encode the {@link DataUrl} @param headers Headers map @return Applied charset, never {@code null} """ String encoding; if (headers != null && (encoding = headers.get("charset")) != nu...
java
protected String getAppliedCharset(Map<String, String> headers) { String encoding; if (headers != null && (encoding = headers.get("charset")) != null) { return encoding; } return "US-ASCII"; }
[ "protected", "String", "getAppliedCharset", "(", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "String", "encoding", ";", "if", "(", "headers", "!=", "null", "&&", "(", "encoding", "=", "headers", ".", "get", "(", "\"charset\"", ")", ")"...
Gets the charset that should be used to encode the {@link DataUrl} @param headers Headers map @return Applied charset, never {@code null}
[ "Gets", "the", "charset", "that", "should", "be", "used", "to", "encode", "the", "{" ]
train
https://github.com/maxschuster/DataUrl/blob/6b2e2c54e50bb8ee5a7d8b30c8c2b3b24ddcb628/src/main/java/eu/maxschuster/dataurl/DataUrlSerializer.java#L192-L198
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.completeTransfer
public void completeTransfer( String connId, String parentConnId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { """ Complete a previously initiated two-step transfer using the provided IDs. @param connId The conn...
java
public void completeTransfer( String connId, String parentConnId, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidcompletetransferData completeData = new Voicecallsidcompletetransf...
[ "public", "void", "completeTransfer", "(", "String", "connId", ",", "String", "parentConnId", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicecallsidcompletetransferData", "compl...
Complete a previously initiated two-step transfer using the provided IDs. @param connId The connection ID of the consult call (established). @param parentConnId The connection ID of the parent call (held). @param reasons Information on causes for, and results of, actions taken by the user of the current DN. For details...
[ "Complete", "a", "previously", "initiated", "two", "-", "step", "transfer", "using", "the", "provided", "IDs", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L841-L860
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java
WarUtils.addFilterMapping
public static void addFilterMapping(Document doc, Element root) { """ Adds the filter mapping for the shiro filter to a web.xml file. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the filter mapping to. """ Element filterMapping = doc.createE...
java
public static void addFilterMapping(Document doc, Element root) { Element filterMapping = doc.createElement("filter-mapping"); Element filterName = doc.createElement("filter-name"); filterName.appendChild(doc.createTextNode("ShiroFilter")); filterMapping.appendChild(filterName); Element urlPattern =...
[ "public", "static", "void", "addFilterMapping", "(", "Document", "doc", ",", "Element", "root", ")", "{", "Element", "filterMapping", "=", "doc", ".", "createElement", "(", "\"filter-mapping\"", ")", ";", "Element", "filterName", "=", "doc", ".", "createElement"...
Adds the filter mapping for the shiro filter to a web.xml file. @param doc The xml DOM document to create the new xml elements with. @param root The xml Element node to add the filter mapping to.
[ "Adds", "the", "filter", "mapping", "for", "the", "shiro", "filter", "to", "a", "web", ".", "xml", "file", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java#L331-L343
GerdHolz/TOVAL
src/de/invation/code/toval/os/WindowsRegistry.java
WindowsRegistry.deleteValue
public static void deleteValue(String keyName, String valueName) throws RegistryException { """ Deletes a value within a key. @param keyName Name of the key, which contains the value to delete. @param valueName Name of the value to delete. @throws RegistryException """ try (Key key = Key.open(keyN...
java
public static void deleteValue(String keyName, String valueName) throws RegistryException { try (Key key = Key.open(keyName, KEY_WRITE)) { checkError(invoke(Methods.REG_DELETE_VALUE.get(), key.id, toByteArray(valueName))); } }
[ "public", "static", "void", "deleteValue", "(", "String", "keyName", ",", "String", "valueName", ")", "throws", "RegistryException", "{", "try", "(", "Key", "key", "=", "Key", ".", "open", "(", "keyName", ",", "KEY_WRITE", ")", ")", "{", "checkError", "(",...
Deletes a value within a key. @param keyName Name of the key, which contains the value to delete. @param valueName Name of the value to delete. @throws RegistryException
[ "Deletes", "a", "value", "within", "a", "key", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/WindowsRegistry.java#L126-L130
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/dsl/ParsingModelIo.java
ParsingModelIo.writeConfigurationFile
public static String writeConfigurationFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ) { """ Writes a model into a string. @param relationsFile the relations file @param writeComments true to write comments @param lineSeparator the line separator (if null, the OS' one is used) ...
java
public static String writeConfigurationFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ) { return new FileDefinitionSerializer( lineSeparator ).write( relationsFile, writeComments ); }
[ "public", "static", "String", "writeConfigurationFile", "(", "FileDefinition", "relationsFile", ",", "boolean", "writeComments", ",", "String", "lineSeparator", ")", "{", "return", "new", "FileDefinitionSerializer", "(", "lineSeparator", ")", ".", "write", "(", "relat...
Writes a model into a string. @param relationsFile the relations file @param writeComments true to write comments @param lineSeparator the line separator (if null, the OS' one is used) @return a string (never null)
[ "Writes", "a", "model", "into", "a", "string", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/dsl/ParsingModelIo.java#L75-L77
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceDescriptorAgent.java
NetworkServiceDescriptorAgent.deleteVNFDependency
@Help( help = "Delete the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id" ) public void deleteVNFDependency(final String idNSD, final String idVnfd) throws SDKException { """ Delete a VNFDependency. @param idNSD the ID of the NetworkServiceDescriptor w...
java
@Help( help = "Delete the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id" ) public void deleteVNFDependency(final String idNSD, final String idVnfd) throws SDKException { String url = idNSD + "/vnfdependencies" + "/" + idVnfd; requestDelete(url); }
[ "@", "Help", "(", "help", "=", "\"Delete the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id\"", ")", "public", "void", "deleteVNFDependency", "(", "final", "String", "idNSD", ",", "final", "String", "idVnfd", ")", "throws", "SDKExce...
Delete a VNFDependency. @param idNSD the ID of the NetworkServiceDescriptor which contains the VNFDependency @param idVnfd the ID of the VNFDependency that shall be deleted @throws SDKException if the request fails
[ "Delete", "a", "VNFDependency", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceDescriptorAgent.java#L244-L251
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/util/iterator/ResultSetIterator.java
ResultSetIterator.hasNext
public boolean hasNext() { """ Check for a subsequent item in the ResultSet. @return <code>true</code> if there is another element; <code>false</code> otherwise @throws IllegalStateException when a {@link SQLException} occurs advancing the ResultSet """ if(_rs == null) return false; ...
java
public boolean hasNext() { if(_rs == null) return false; if(_primed) return true; try { _primed = _rs.next(); return _primed; } catch(SQLException sql) { String msg = "An exception occurred reading from the Iterator. ...
[ "public", "boolean", "hasNext", "(", ")", "{", "if", "(", "_rs", "==", "null", ")", "return", "false", ";", "if", "(", "_primed", ")", "return", "true", ";", "try", "{", "_primed", "=", "_rs", ".", "next", "(", ")", ";", "return", "_primed", ";", ...
Check for a subsequent item in the ResultSet. @return <code>true</code> if there is another element; <code>false</code> otherwise @throws IllegalStateException when a {@link SQLException} occurs advancing the ResultSet
[ "Check", "for", "a", "subsequent", "item", "in", "the", "ResultSet", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/util/iterator/ResultSetIterator.java#L82-L98
gresrun/jesque
src/main/java/net/greghaines/jesque/Job.java
Job.setUnknownField
@JsonAnySetter public void setUnknownField(final String name, final Object value) { """ Set an unknown field. @param name the unknown property name @param value the unknown property value """ this.unknownFields.put(name, value); }
java
@JsonAnySetter public void setUnknownField(final String name, final Object value) { this.unknownFields.put(name, value); }
[ "@", "JsonAnySetter", "public", "void", "setUnknownField", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "this", ".", "unknownFields", ".", "put", "(", "name", ",", "value", ")", ";", "}" ]
Set an unknown field. @param name the unknown property name @param value the unknown property value
[ "Set", "an", "unknown", "field", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/Job.java#L240-L243
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java
CORBA_Utils.isRemoteable
public static boolean isRemoteable(Class<?> valueClass, int rmicCompatible) { """ Determines whether a value of the specified type could be a remote object reference. This should return true if read_Object or read_abstract_interface is used for this type. @param clazz class for a method parameter or return ty...
java
public static boolean isRemoteable(Class<?> valueClass, int rmicCompatible) { // NOTE: This logic must be kept in sync with write_value. return valueClass.isInterface() && valueClass != Serializable.class && valueClass != Externalizable.class && (isCORBAObje...
[ "public", "static", "boolean", "isRemoteable", "(", "Class", "<", "?", ">", "valueClass", ",", "int", "rmicCompatible", ")", "{", "// NOTE: This logic must be kept in sync with write_value.", "return", "valueClass", ".", "isInterface", "(", ")", "&&", "valueClass", "!...
Determines whether a value of the specified type could be a remote object reference. This should return true if read_Object or read_abstract_interface is used for this type. @param clazz class for a method parameter or return type that needs to be read from an input stream @param rmicCompatible rmic compatibility flag...
[ "Determines", "whether", "a", "value", "of", "the", "specified", "type", "could", "be", "a", "remote", "object", "reference", ".", "This", "should", "return", "true", "if", "read_Object", "or", "read_abstract_interface", "is", "used", "for", "this", "type", "....
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/CORBA_Utils.java#L268-L277
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/authentication/storage/SecureCredentialsManager.java
SecureCredentialsManager.getCredentials
public void getCredentials(@NonNull BaseCallback<Credentials, CredentialsManagerException> callback) { """ Tries to obtain the credentials from the Storage. The callback's {@link BaseCallback#onSuccess(Object)} method will be called with the result. If something unexpected happens, the {@link BaseCallback#onFailu...
java
public void getCredentials(@NonNull BaseCallback<Credentials, CredentialsManagerException> callback) { if (!hasValidCredentials()) { callback.onFailure(new CredentialsManagerException("No Credentials were previously set.")); return; } if (authenticateBeforeDecrypt) { ...
[ "public", "void", "getCredentials", "(", "@", "NonNull", "BaseCallback", "<", "Credentials", ",", "CredentialsManagerException", ">", "callback", ")", "{", "if", "(", "!", "hasValidCredentials", "(", ")", ")", "{", "callback", ".", "onFailure", "(", "new", "Cr...
Tries to obtain the credentials from the Storage. The callback's {@link BaseCallback#onSuccess(Object)} method will be called with the result. If something unexpected happens, the {@link BaseCallback#onFailure(Auth0Exception)} method will be called with the error. Some devices are not compatible at all with the cryptog...
[ "Tries", "to", "obtain", "the", "credentials", "from", "the", "Storage", ".", "The", "callback", "s", "{", "@link", "BaseCallback#onSuccess", "(", "Object", ")", "}", "method", "will", "be", "called", "with", "the", "result", ".", "If", "something", "unexpec...
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/storage/SecureCredentialsManager.java#L177-L190
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java
DateTimeFormatter.withLocale
public DateTimeFormatter withLocale(Locale locale) { """ Returns a copy of this formatter with a new locale. <p> This is used to lookup any part of the formatter needing specific localization, such as the text or localized pattern. <p> This instance is immutable and unaffected by this method call. @param l...
java
public DateTimeFormatter withLocale(Locale locale) { if (this.locale.equals(locale)) { return this; } return new DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone); }
[ "public", "DateTimeFormatter", "withLocale", "(", "Locale", "locale", ")", "{", "if", "(", "this", ".", "locale", ".", "equals", "(", "locale", ")", ")", "{", "return", "this", ";", "}", "return", "new", "DateTimeFormatter", "(", "printerParser", ",", "loc...
Returns a copy of this formatter with a new locale. <p> This is used to lookup any part of the formatter needing specific localization, such as the text or localized pattern. <p> This instance is immutable and unaffected by this method call. @param locale the new locale, not null @return a formatter based on this for...
[ "Returns", "a", "copy", "of", "this", "formatter", "with", "a", "new", "locale", ".", "<p", ">", "This", "is", "used", "to", "lookup", "any", "part", "of", "the", "formatter", "needing", "specific", "localization", "such", "as", "the", "text", "or", "loc...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java#L1409-L1414
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/relatedsamples/McNemar.java
McNemar.getPvalue
public static double getPvalue(int n11, int n12, int n21, int n22) { """ Calculates the p-value of null Hypothesis @param n11 @param n12 @param n21 @param n22 @return """ double Chisquare=Math.pow(Math.abs(n12-n21) - 0.5,2)/(n12+n21); //McNemar with Yates's correction for continuity dou...
java
public static double getPvalue(int n11, int n12, int n21, int n22) { double Chisquare=Math.pow(Math.abs(n12-n21) - 0.5,2)/(n12+n21); //McNemar with Yates's correction for continuity double pvalue= scoreToPvalue(Chisquare); return pvalue; }
[ "public", "static", "double", "getPvalue", "(", "int", "n11", ",", "int", "n12", ",", "int", "n21", ",", "int", "n22", ")", "{", "double", "Chisquare", "=", "Math", ".", "pow", "(", "Math", ".", "abs", "(", "n12", "-", "n21", ")", "-", "0.5", ","...
Calculates the p-value of null Hypothesis @param n11 @param n12 @param n21 @param n22 @return
[ "Calculates", "the", "p", "-", "value", "of", "null", "Hypothesis" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/relatedsamples/McNemar.java#L36-L42
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java
GeoPackageJavaProperties.getProperty
public static String getProperty(String base, String property) { """ Get a required property by base property and property name @param base base property @param property property @return property value """ return getProperty(base, property, true); }
java
public static String getProperty(String base, String property) { return getProperty(base, property, true); }
[ "public", "static", "String", "getProperty", "(", "String", "base", ",", "String", "property", ")", "{", "return", "getProperty", "(", "base", ",", "property", ",", "true", ")", ";", "}" ]
Get a required property by base property and property name @param base base property @param property property @return property value
[ "Get", "a", "required", "property", "by", "base", "property", "and", "property", "name" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java#L69-L71
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/util/CollectionUtil.java
CollectionUtil.joinAsString
public static String joinAsString( Object[] objects, String separator ) { """ <p>joinAsString.</p> @param objects an array of {@link java.lang.Object} objects. @param separator a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ StringBuilder result = new StringBuilde...
java
public static String joinAsString( Object[] objects, String separator ) { StringBuilder result = new StringBuilder(); for (int i = 0; i < objects.length; i++) { Object element = objects[i]; result.append( String.valueOf( element ) ); if (i < objects.length...
[ "public", "static", "String", "joinAsString", "(", "Object", "[", "]", "objects", ",", "String", "separator", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "objects", "...
<p>joinAsString.</p> @param objects an array of {@link java.lang.Object} objects. @param separator a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "<p", ">", "joinAsString", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/CollectionUtil.java#L150-L160
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Token.java
Token.setWordForms
public void setWordForms(int i, WordForm v) { """ indexed setter for wordForms - sets an indexed value - A Token is related to one or more WordForm @generated @param i index in the array to set @param v value to set into the array """ if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_wordForms...
java
public void setWordForms(int i, WordForm v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_wordForms == null) jcasType.jcas.throwFeatMissing("wordForms", "com.digitalpebble.rasp.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode_w...
[ "public", "void", "setWordForms", "(", "int", "i", ",", "WordForm", "v", ")", "{", "if", "(", "Token_Type", ".", "featOkTst", "&&", "(", "(", "Token_Type", ")", "jcasType", ")", ".", "casFeat_wordForms", "==", "null", ")", "jcasType", ".", "jcas", ".", ...
indexed setter for wordForms - sets an indexed value - A Token is related to one or more WordForm @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "wordForms", "-", "sets", "an", "indexed", "value", "-", "A", "Token", "is", "related", "to", "one", "or", "more", "WordForm" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Token.java#L117-L121
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java
CmsGalleryControllerHandler.onUpdateGalleries
public void onUpdateGalleries(List<CmsGalleryFolderBean> galleries, List<String> selectedGalleries) { """ Will be triggered when the sort parameters of the galleries list are changed.<p> @param galleries the updated galleries list @param selectedGalleries the list of galleries to select """ m_gall...
java
public void onUpdateGalleries(List<CmsGalleryFolderBean> galleries, List<String> selectedGalleries) { m_galleryDialog.getGalleriesTab().updateListContent(galleries, selectedGalleries); }
[ "public", "void", "onUpdateGalleries", "(", "List", "<", "CmsGalleryFolderBean", ">", "galleries", ",", "List", "<", "String", ">", "selectedGalleries", ")", "{", "m_galleryDialog", ".", "getGalleriesTab", "(", ")", ".", "updateListContent", "(", "galleries", ",",...
Will be triggered when the sort parameters of the galleries list are changed.<p> @param galleries the updated galleries list @param selectedGalleries the list of galleries to select
[ "Will", "be", "triggered", "when", "the", "sort", "parameters", "of", "the", "galleries", "list", "are", "changed", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java#L385-L388
ACRA/acra
acra-core/src/main/java/org/acra/collector/BaseReportFieldCollector.java
BaseReportFieldCollector.shouldCollect
boolean shouldCollect(@NonNull Context context, @NonNull CoreConfiguration config, @NonNull ReportField collect, @NonNull ReportBuilder reportBuilder) { """ this should check if the config contains the field, but may add additional checks like permissions etc. @param context a context @param config ...
java
boolean shouldCollect(@NonNull Context context, @NonNull CoreConfiguration config, @NonNull ReportField collect, @NonNull ReportBuilder reportBuilder) { return config.reportContent().contains(collect); }
[ "boolean", "shouldCollect", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "CoreConfiguration", "config", ",", "@", "NonNull", "ReportField", "collect", ",", "@", "NonNull", "ReportBuilder", "reportBuilder", ")", "{", "return", "config", ".", "r...
this should check if the config contains the field, but may add additional checks like permissions etc. @param context a context @param config current configuration @param collect the field to collect @param reportBuilder the current reportBuilder @return if this field should be collected now
[ "this", "should", "check", "if", "the", "config", "contains", "the", "field", "but", "may", "add", "additional", "checks", "like", "permissions", "etc", "." ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/collector/BaseReportFieldCollector.java#L60-L62
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/TopLevelDomainsInner.java
TopLevelDomainsInner.listAgreementsWithServiceResponseAsync
public Observable<ServiceResponse<Page<TldLegalAgreementInner>>> listAgreementsWithServiceResponseAsync(final String name, final TopLevelDomainAgreementOption agreementOption) { """ Gets all legal agreements that user needs to accept before purchasing a domain. Gets all legal agreements that user needs to accept ...
java
public Observable<ServiceResponse<Page<TldLegalAgreementInner>>> listAgreementsWithServiceResponseAsync(final String name, final TopLevelDomainAgreementOption agreementOption) { return listAgreementsSinglePageAsync(name, agreementOption) .concatMap(new Func1<ServiceResponse<Page<TldLegalAgreementInn...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "TldLegalAgreementInner", ">", ">", ">", "listAgreementsWithServiceResponseAsync", "(", "final", "String", "name", ",", "final", "TopLevelDomainAgreementOption", "agreementOption", ")", "{", "return", "li...
Gets all legal agreements that user needs to accept before purchasing a domain. Gets all legal agreements that user needs to accept before purchasing a domain. @param name Name of the top-level domain. @param agreementOption Domain agreement options. @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Gets", "all", "legal", "agreements", "that", "user", "needs", "to", "accept", "before", "purchasing", "a", "domain", ".", "Gets", "all", "legal", "agreements", "that", "user", "needs", "to", "accept", "before", "purchasing", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/TopLevelDomainsInner.java#L352-L364
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setMapMerkleTreeConfigs
public Config setMapMerkleTreeConfigs(Map<String, MerkleTreeConfig> merkleTreeConfigs) { """ Sets the map of map merkle configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param merkleTreeConfigs the map merkle tree configuratio...
java
public Config setMapMerkleTreeConfigs(Map<String, MerkleTreeConfig> merkleTreeConfigs) { this.mapMerkleTreeConfigs.clear(); this.mapMerkleTreeConfigs.putAll(merkleTreeConfigs); for (Entry<String, MerkleTreeConfig> entry : merkleTreeConfigs.entrySet()) { entry.getValue().setMapName(en...
[ "public", "Config", "setMapMerkleTreeConfigs", "(", "Map", "<", "String", ",", "MerkleTreeConfig", ">", "merkleTreeConfigs", ")", "{", "this", ".", "mapMerkleTreeConfigs", ".", "clear", "(", ")", ";", "this", ".", "mapMerkleTreeConfigs", ".", "putAll", "(", "mer...
Sets the map of map merkle configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param merkleTreeConfigs the map merkle tree configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "map", "merkle", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", "will", "be", "obtained", "in", "the", "future", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L3167-L3174
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/Metrics.java
Metrics.gaugeCollectionSize
@Nullable public static <T extends Collection<?>> T gaugeCollectionSize(String name, Iterable<Tag> tags, T collection) { """ Register a gauge that reports the size of the {@link java.util.Collection}. The registration will keep a weak reference to the collection so it will not prevent garbage collection. The...
java
@Nullable public static <T extends Collection<?>> T gaugeCollectionSize(String name, Iterable<Tag> tags, T collection) { return globalRegistry.gaugeCollectionSize(name, tags, collection); }
[ "@", "Nullable", "public", "static", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "gaugeCollectionSize", "(", "String", "name", ",", "Iterable", "<", "Tag", ">", "tags", ",", "T", "collection", ")", "{", "return", "globalRegistry", ".", "g...
Register a gauge that reports the size of the {@link java.util.Collection}. The registration will keep a weak reference to the collection so it will not prevent garbage collection. The collection implementation used should be thread safe. Note that calling {@link java.util.Collection#size()} can be expensive for some c...
[ "Register", "a", "gauge", "that", "reports", "the", "size", "of", "the", "{", "@link", "java", ".", "util", ".", "Collection", "}", ".", "The", "registration", "will", "keep", "a", "weak", "reference", "to", "the", "collection", "so", "it", "will", "not"...
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/Metrics.java#L214-L217
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java
Parameters.getStringOf
public String getStringOf(final String param, final List<String> possibleValues) { """ Looks up a parameter. If the value is not in <code>possibleValues</code>, throws and exception. @param possibleValues May not be null. May not be empty. @throws InvalidEnumeratedPropertyException if the parameter value is ...
java
public String getStringOf(final String param, final List<String> possibleValues) { checkNotNull(possibleValues); checkArgument(!possibleValues.isEmpty()); final String value = getString(param); if (possibleValues.contains(value)) { return value; } else { throw new InvalidEnumeratedProp...
[ "public", "String", "getStringOf", "(", "final", "String", "param", ",", "final", "List", "<", "String", ">", "possibleValues", ")", "{", "checkNotNull", "(", "possibleValues", ")", ";", "checkArgument", "(", "!", "possibleValues", ".", "isEmpty", "(", ")", ...
Looks up a parameter. If the value is not in <code>possibleValues</code>, throws and exception. @param possibleValues May not be null. May not be empty. @throws InvalidEnumeratedPropertyException if the parameter value is not on the list.
[ "Looks", "up", "a", "parameter", ".", "If", "the", "value", "is", "not", "in", "<code", ">", "possibleValues<", "/", "code", ">", "throws", "and", "exception", "." ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java#L416-L427
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.escapeXML
public static void escapeXML(String text, Writer writer) throws IOException { """ Escape text for reserved XML characters to a specified writer. This method has the same logic as {@link #escapeXML(String)} but result is serialized on the given writer. If <code>text</code> parameters is null this method does noth...
java
public static void escapeXML(String text, Writer writer) throws IOException { if(text == null) { return; } for(int i = 0, l = text.length(); i < l; ++i) { char c = text.charAt(i); switch(c) { case '"': writer.write("&quot;"); break; case '\'': ...
[ "public", "static", "void", "escapeXML", "(", "String", "text", ",", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "text", "==", "null", ")", "{", "return", ";", "}", "for", "(", "int", "i", "=", "0", ",", "l", "=", "text", ".",...
Escape text for reserved XML characters to a specified writer. This method has the same logic as {@link #escapeXML(String)} but result is serialized on the given writer. If <code>text</code> parameters is null this method does nothing. @param text string to escape, @param writer writer to serialize resulted escaped st...
[ "Escape", "text", "for", "reserved", "XML", "characters", "to", "a", "specified", "writer", ".", "This", "method", "has", "the", "same", "logic", "as", "{", "@link", "#escapeXML", "(", "String", ")", "}", "but", "result", "is", "serialized", "on", "the", ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L892-L919
samskivert/samskivert
src/main/java/com/samskivert/swing/util/MenuUtil.java
MenuUtil.addMenuItem
public static JMenuItem addMenuItem ( JMenu menu, String name, int mnem, KeyStroke accel, Object target, String callbackName) { """ Adds a new menu item to the menu with the specified name and attributes. The supplied method name will be called (it must have the same signature as {@link ActionListener#ac...
java
public static JMenuItem addMenuItem ( JMenu menu, String name, int mnem, KeyStroke accel, Object target, String callbackName) { JMenuItem item = createItem(name, Integer.valueOf(mnem), accel); item.addActionListener(new ReflectedAction(target, callbackName)); menu.add(item); ...
[ "public", "static", "JMenuItem", "addMenuItem", "(", "JMenu", "menu", ",", "String", "name", ",", "int", "mnem", ",", "KeyStroke", "accel", ",", "Object", "target", ",", "String", "callbackName", ")", "{", "JMenuItem", "item", "=", "createItem", "(", "name",...
Adds a new menu item to the menu with the specified name and attributes. The supplied method name will be called (it must have the same signature as {@link ActionListener#actionPerformed} but can be named whatever you like) when the menu item is selected. @param menu the menu to add the item to. @param name the item n...
[ "Adds", "a", "new", "menu", "item", "to", "the", "menu", "with", "the", "specified", "name", "and", "attributes", ".", "The", "supplied", "method", "name", "will", "be", "called", "(", "it", "must", "have", "the", "same", "signature", "as", "{", "@link",...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/MenuUtil.java#L120-L127
threerings/nenya
core/src/main/java/com/threerings/media/tile/TrimmedTileSet.java
TrimmedTileSet.trimTileSet
public static TrimmedTileSet trimTileSet (TileSet source, OutputStream destImage, String imgFormat) throws IOException { """ Creates a trimmed tileset from the supplied source tileset. The image path must be set by hand to the appropriate path based on where t...
java
public static TrimmedTileSet trimTileSet (TileSet source, OutputStream destImage, String imgFormat) throws IOException { final TrimmedTileSet tset = new TrimmedTileSet(); tset.setName(source.getName()); int tcount = source.getTileCount();...
[ "public", "static", "TrimmedTileSet", "trimTileSet", "(", "TileSet", "source", ",", "OutputStream", "destImage", ",", "String", "imgFormat", ")", "throws", "IOException", "{", "final", "TrimmedTileSet", "tset", "=", "new", "TrimmedTileSet", "(", ")", ";", "tset", ...
Creates a trimmed tileset from the supplied source tileset. The image path must be set by hand to the appropriate path based on where the image data that is written to the <code>destImage</code> parameter is actually stored on the file system. The image format indicateds how the resulting image should be saved. If nul...
[ "Creates", "a", "trimmed", "tileset", "from", "the", "supplied", "source", "tileset", ".", "The", "image", "path", "must", "be", "set", "by", "hand", "to", "the", "appropriate", "path", "based", "on", "where", "the", "image", "data", "that", "is", "written...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/TrimmedTileSet.java#L80-L107
weld/core
impl/src/main/java/org/jboss/weld/util/bytecode/ClassFileUtils.java
ClassFileUtils.makeClassLoaderMethodsAccessible
public static void makeClassLoaderMethodsAccessible() { """ This method cracks open {@code ClassLoader#defineClass()} methods using {@code Unsafe}. It is invoked during {@code WeldStartup#startContainer()} and only in case the integrator does not fully implement {@link ProxyServices}. Method first attempts to...
java
public static void makeClassLoaderMethodsAccessible() { // the AtomicBoolean make sure this gets invoked only once as WeldStartup is triggered per deployment if (classLoaderMethodsMadeAccessible.compareAndSet(false, true)) { try { AccessController.doPrivileged(new PrivilegedE...
[ "public", "static", "void", "makeClassLoaderMethodsAccessible", "(", ")", "{", "// the AtomicBoolean make sure this gets invoked only once as WeldStartup is triggered per deployment", "if", "(", "classLoaderMethodsMadeAccessible", ".", "compareAndSet", "(", "false", ",", "true", ")...
This method cracks open {@code ClassLoader#defineClass()} methods using {@code Unsafe}. It is invoked during {@code WeldStartup#startContainer()} and only in case the integrator does not fully implement {@link ProxyServices}. Method first attempts to use {@code Unsafe} and if that fails then reverts to {@code setAcces...
[ "This", "method", "cracks", "open", "{", "@code", "ClassLoader#defineClass", "()", "}", "methods", "using", "{", "@code", "Unsafe", "}", ".", "It", "is", "invoked", "during", "{", "@code", "WeldStartup#startContainer", "()", "}", "and", "only", "in", "case", ...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/bytecode/ClassFileUtils.java#L60-L98
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_miniPabx_serviceName_hunting_agent_agentNumber_GET
public OvhEasyMiniPabxHuntingAgent billingAccount_miniPabx_serviceName_hunting_agent_agentNumber_GET(String billingAccount, String serviceName, String agentNumber) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/miniPabx/{serviceName}/hunting/agent/{agentNumber} @param...
java
public OvhEasyMiniPabxHuntingAgent billingAccount_miniPabx_serviceName_hunting_agent_agentNumber_GET(String billingAccount, String serviceName, String agentNumber) throws IOException { String qPath = "/telephony/{billingAccount}/miniPabx/{serviceName}/hunting/agent/{agentNumber}"; StringBuilder sb = path(qPath, bil...
[ "public", "OvhEasyMiniPabxHuntingAgent", "billingAccount_miniPabx_serviceName_hunting_agent_agentNumber_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "agentNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{b...
Get this object properties REST: GET /telephony/{billingAccount}/miniPabx/{serviceName}/hunting/agent/{agentNumber} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param agentNumber [required] The phone number of the agent
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5239-L5244
h2oai/h2o-3
h2o-core/src/main/java/water/api/RequestServer.java
RequestServer.defaultFilter
public static HttpLogFilter defaultFilter() { """ Provide the default filters for H2O's HTTP logging. @return an array of HttpLogFilter instances """ return new HttpLogFilter() { // this is much prettier with 1.8 lambdas @Override public LogFilterLevel filter(RequestUri uri, Properties header, Prope...
java
public static HttpLogFilter defaultFilter() { return new HttpLogFilter() { // this is much prettier with 1.8 lambdas @Override public LogFilterLevel filter(RequestUri uri, Properties header, Properties parms) { // static web content String url = uri.getUrl(); if (url.endsWith(".css") |...
[ "public", "static", "HttpLogFilter", "defaultFilter", "(", ")", "{", "return", "new", "HttpLogFilter", "(", ")", "{", "// this is much prettier with 1.8 lambdas", "@", "Override", "public", "LogFilterLevel", "filter", "(", "RequestUri", "uri", ",", "Properties", "head...
Provide the default filters for H2O's HTTP logging. @return an array of HttpLogFilter instances
[ "Provide", "the", "default", "filters", "for", "H2O", "s", "HTTP", "logging", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/RequestServer.java#L579-L612
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.divideAndRound
private static BigInteger divideAndRound(BigInteger bdividend, long ldivisor, int roundingMode) { """ Divides {@code BigInteger} value by {@code long} value and do rounding based on the passed in roundingMode. """ boolean isRemainderZero; // record remainder is zero or not int qsign; // quotie...
java
private static BigInteger divideAndRound(BigInteger bdividend, long ldivisor, int roundingMode) { boolean isRemainderZero; // record remainder is zero or not int qsign; // quotient sign long r = 0; // store quotient & remainder in long MutableBigInteger mq = null; // store quotient ...
[ "private", "static", "BigInteger", "divideAndRound", "(", "BigInteger", "bdividend", ",", "long", "ldivisor", ",", "int", "roundingMode", ")", "{", "boolean", "isRemainderZero", ";", "// record remainder is zero or not", "int", "qsign", ";", "// quotient sign", "long", ...
Divides {@code BigInteger} value by {@code long} value and do rounding based on the passed in roundingMode.
[ "Divides", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L4213-L4230
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java
RowDiscussionResourcesImpl.createDiscussion
public Discussion createDiscussion(long sheetId, long rowId, Discussion discussion) throws SmartsheetException { """ Create discussion on a row. It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/discussions Exceptions: IllegalArgumentException : if any argument is null ...
java
public Discussion createDiscussion(long sheetId, long rowId, Discussion discussion) throws SmartsheetException{ return this.createResource("sheets/" + sheetId + "/rows/" + rowId + "/discussions", Discussion.class, discussion); }
[ "public", "Discussion", "createDiscussion", "(", "long", "sheetId", ",", "long", "rowId", ",", "Discussion", "discussion", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sheets/\"", "+", "sheetId", "+", "\"/rows/\"", "+...
Create discussion on a row. It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/discussions Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem wit...
[ "Create", "discussion", "on", "a", "row", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java#L63-L65
timols/java-gitlab-api
src/main/java/org/gitlab/api/http/GitlabHTTPRequestor.java
GitlabHTTPRequestor.with
public GitlabHTTPRequestor with(String key, Object value) { """ Sets the HTTP Form Post parameters for the request Has a fluent api for method chaining @param key Form parameter Key @param value Form parameter Value @return this """ if (value != null && key != null) { data.p...
java
public GitlabHTTPRequestor with(String key, Object value) { if (value != null && key != null) { data.put(key, value); } return this; }
[ "public", "GitlabHTTPRequestor", "with", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "key", "!=", "null", ")", "{", "data", ".", "put", "(", "key", ",", "value", ")", ";", "}", "return", "this", "...
Sets the HTTP Form Post parameters for the request Has a fluent api for method chaining @param key Form parameter Key @param value Form parameter Value @return this
[ "Sets", "the", "HTTP", "Form", "Post", "parameters", "for", "the", "request", "Has", "a", "fluent", "api", "for", "method", "chaining" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/http/GitlabHTTPRequestor.java#L93-L98
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.getAndCheckEntitySet
public static EntitySet getAndCheckEntitySet(EntityDataModel entityDataModel, String entitySetName) { """ Gets the entity set with the specified name, throws an exception if no entity set with the specified name exists. @param entityDataModel The entity data model. @param entitySetName The name of the entity...
java
public static EntitySet getAndCheckEntitySet(EntityDataModel entityDataModel, String entitySetName) { EntitySet entitySet = entityDataModel.getEntityContainer().getEntitySet(entitySetName); if (entitySet == null) { throw new ODataSystemException("Entity set not found in the entity data model...
[ "public", "static", "EntitySet", "getAndCheckEntitySet", "(", "EntityDataModel", "entityDataModel", ",", "String", "entitySetName", ")", "{", "EntitySet", "entitySet", "=", "entityDataModel", ".", "getEntityContainer", "(", ")", ".", "getEntitySet", "(", "entitySetName"...
Gets the entity set with the specified name, throws an exception if no entity set with the specified name exists. @param entityDataModel The entity data model. @param entitySetName The name of the entity set. @return The entity set. @throws ODataSystemException If the entity data model does not contain an entity set...
[ "Gets", "the", "entity", "set", "with", "the", "specified", "name", "throws", "an", "exception", "if", "no", "entity", "set", "with", "the", "specified", "name", "exists", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L447-L453
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java
Directory.searchBase
public boolean searchBase(String base, String filter) throws NamingException { """ Carry out a base level search. This should be the default if the scope is not specified. @param base @param filter @return DirSearchResult or null @throws NamingException """ return search(base, filter, scopeBase); ...
java
public boolean searchBase(String base, String filter) throws NamingException { return search(base, filter, scopeBase); }
[ "public", "boolean", "searchBase", "(", "String", "base", ",", "String", "filter", ")", "throws", "NamingException", "{", "return", "search", "(", "base", ",", "filter", ",", "scopeBase", ")", ";", "}" ]
Carry out a base level search. This should be the default if the scope is not specified. @param base @param filter @return DirSearchResult or null @throws NamingException
[ "Carry", "out", "a", "base", "level", "search", ".", "This", "should", "be", "the", "default", "if", "the", "scope", "is", "not", "specified", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java#L96-L98
reactor/reactor-netty
src/main/java/reactor/netty/http/client/HttpClient.java
HttpClient.baseUrl
public final HttpClient baseUrl(String baseUrl) { """ Configure URI to use for this request/response @param baseUrl a default base url that can be fully sufficient for request or can be used to prepend future {@link UriConfiguration#uri} calls. @return the appropriate sending or receiving contract """ ...
java
public final HttpClient baseUrl(String baseUrl) { Objects.requireNonNull(baseUrl, "baseUrl"); return tcpConfiguration(tcp -> tcp.bootstrap(b -> HttpClientConfiguration.baseUrl(b, baseUrl))); }
[ "public", "final", "HttpClient", "baseUrl", "(", "String", "baseUrl", ")", "{", "Objects", ".", "requireNonNull", "(", "baseUrl", ",", "\"baseUrl\"", ")", ";", "return", "tcpConfiguration", "(", "tcp", "->", "tcp", ".", "bootstrap", "(", "b", "->", "HttpClie...
Configure URI to use for this request/response @param baseUrl a default base url that can be fully sufficient for request or can be used to prepend future {@link UriConfiguration#uri} calls. @return the appropriate sending or receiving contract
[ "Configure", "URI", "to", "use", "for", "this", "request", "/", "response" ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/client/HttpClient.java#L370-L373
RKumsher/utils
src/main/java/com/github/rkumsher/number/RandomNumberUtils.java
RandomNumberUtils.randomDoubleGreaterThan
public static double randomDoubleGreaterThan(double minExclusive) { """ Returns a random double that is greater than the given double. @param minExclusive the value that returned double must be greater than @return the random double @throws IllegalArgumentException if minExclusive is greater than or equal to ...
java
public static double randomDoubleGreaterThan(double minExclusive) { checkArgument( minExclusive < Double.MAX_VALUE, "Cannot produce double greater than %s", Double.MAX_VALUE); return randomDouble(minExclusive + 1, Double.MAX_VALUE); }
[ "public", "static", "double", "randomDoubleGreaterThan", "(", "double", "minExclusive", ")", "{", "checkArgument", "(", "minExclusive", "<", "Double", ".", "MAX_VALUE", ",", "\"Cannot produce double greater than %s\"", ",", "Double", ".", "MAX_VALUE", ")", ";", "retur...
Returns a random double that is greater than the given double. @param minExclusive the value that returned double must be greater than @return the random double @throws IllegalArgumentException if minExclusive is greater than or equal to {@link Double#MAX_VALUE}
[ "Returns", "a", "random", "double", "that", "is", "greater", "than", "the", "given", "double", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/number/RandomNumberUtils.java#L210-L214
Jasig/resource-server
resource-server-utils/src/main/java/org/jasig/resourceserver/utils/aggr/ResourcesElementsProviderImpl.java
ResourcesElementsProviderImpl.appendJsNode
protected void appendJsNode(HttpServletRequest request, Document document, DocumentFragment head, Js js, String relativeRoot) { """ Convert the {@link Js} argument to an HTML script tag and append it to the {@link DocumentFragment}. """ final String scriptPath = getElementPath(request, js, relativeRoo...
java
protected void appendJsNode(HttpServletRequest request, Document document, DocumentFragment head, Js js, String relativeRoot) { final String scriptPath = getElementPath(request, js, relativeRoot); if (resourcesDao.isConditional(js)) { Comment c = document.createComment(""); c.ap...
[ "protected", "void", "appendJsNode", "(", "HttpServletRequest", "request", ",", "Document", "document", ",", "DocumentFragment", "head", ",", "Js", "js", ",", "String", "relativeRoot", ")", "{", "final", "String", "scriptPath", "=", "getElementPath", "(", "request...
Convert the {@link Js} argument to an HTML script tag and append it to the {@link DocumentFragment}.
[ "Convert", "the", "{" ]
train
https://github.com/Jasig/resource-server/blob/13375f716777ec3c99ae9917f672881d4aa32df3/resource-server-utils/src/main/java/org/jasig/resourceserver/utils/aggr/ResourcesElementsProviderImpl.java#L482-L504
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.findByG_E
@Override public List<CommerceNotificationTemplate> findByG_E(long groupId, boolean enabled, int start, int end) { """ Returns a range of all the commerce notification templates where groupId = &#63; and enabled = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> insta...
java
@Override public List<CommerceNotificationTemplate> findByG_E(long groupId, boolean enabled, int start, int end) { return findByG_E(groupId, enabled, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationTemplate", ">", "findByG_E", "(", "long", "groupId", ",", "boolean", "enabled", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_E", "(", "groupId", ",", "enabled", ",", "start"...
Returns a range of all the commerce notification templates where groupId = &#63; and enabled = &#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> refer...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L2452-L2456
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/UriBuilder.java
UriBuilder.toURI
public URI toURI() throws URISyntaxException { """ Converts the parts of the `UriBuilder` to the `URI` object instance. @return the generated `URI` representing the parts contained in the builder """ final String scheme = traverse(this, UriBuilder::getParent, UriBuilder::getScheme, Traverser::notNul...
java
public URI toURI() throws URISyntaxException { final String scheme = traverse(this, UriBuilder::getParent, UriBuilder::getScheme, Traverser::notNull); final Integer port = traverse(this, UriBuilder::getParent, UriBuilder::getPort, notValue(DEFAULT_PORT)); final String host = traverse(this, UriBu...
[ "public", "URI", "toURI", "(", ")", "throws", "URISyntaxException", "{", "final", "String", "scheme", "=", "traverse", "(", "this", ",", "UriBuilder", "::", "getParent", ",", "UriBuilder", "::", "getScheme", ",", "Traverser", "::", "notNull", ")", ";", "fina...
Converts the parts of the `UriBuilder` to the `URI` object instance. @return the generated `URI` representing the parts contained in the builder
[ "Converts", "the", "parts", "of", "the", "UriBuilder", "to", "the", "URI", "object", "instance", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/UriBuilder.java#L196-L211
shrinkwrap/resolver
maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/plugins/ConfigurationUtils.java
ConfigurationUtils.valueAsFile
static File valueAsFile(Map<String, Object> map, Key key, File basedir, File defaultValue) { """ Fetches a value specified by key @param map XPP3 map equivalent @param key navigation key @param basedir basedir can be different from current basedir @param defaultValue Default value if no such key exists @ret...
java
static File valueAsFile(Map<String, Object> map, Key key, File basedir, File defaultValue) { String value = valueAsString(map, key, null); if (Validate.isNullOrEmpty(value)) { return defaultValue; } File candidate = new File(value); if (!candidate.isAbsolute() && (ba...
[ "static", "File", "valueAsFile", "(", "Map", "<", "String", ",", "Object", ">", "map", ",", "Key", "key", ",", "File", "basedir", ",", "File", "defaultValue", ")", "{", "String", "value", "=", "valueAsString", "(", "map", ",", "key", ",", "null", ")", ...
Fetches a value specified by key @param map XPP3 map equivalent @param key navigation key @param basedir basedir can be different from current basedir @param defaultValue Default value if no such key exists @return File representation of the value
[ "Fetches", "a", "value", "specified", "by", "key" ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/impl-maven-archive/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/archive/plugins/ConfigurationUtils.java#L74-L85
ReactiveX/RxJavaJoins
src/main/java/rx/joins/PatternN.java
PatternN.and
public PatternN and(Observable<? extends Object> other) { """ Creates a pattern that matches when all previous observable sequences have an available element. @param other Observable sequence to match with the previous sequences. @return Pattern object that matches when all observable sequences have an availa...
java
public PatternN and(Observable<? extends Object> other) { if (other == null) { throw new NullPointerException(); } return new PatternN(observables, other); }
[ "public", "PatternN", "and", "(", "Observable", "<", "?", "extends", "Object", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "return", "new", "PatternN", "(", "observables"...
Creates a pattern that matches when all previous observable sequences have an available element. @param other Observable sequence to match with the previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "previous", "observable", "sequences", "have", "an", "available", "element", "." ]
train
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/PatternN.java#L61-L66
jspringbot/jspringbot
src/main/java/org/jspringbot/spring/SpringRobotLibrary.java
SpringRobotLibrary.runKeyword
@SuppressWarnings("unchecked") public Object runKeyword(String keyword, final Object[] params) { """ Implements the Robot Framework interface method 'run_keyword' required for dynamic libraries. @param keyword name of keyword to be executed @param params parameters passed by Robot Framework @return result...
java
@SuppressWarnings("unchecked") public Object runKeyword(String keyword, final Object[] params) { Map attributes = new HashMap(); attributes.put("args", params); try { ApplicationContextHolder.set(context); startJSpringBotKeyword(keyword, attributes); Obj...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Object", "runKeyword", "(", "String", "keyword", ",", "final", "Object", "[", "]", "params", ")", "{", "Map", "attributes", "=", "new", "HashMap", "(", ")", ";", "attributes", ".", "put", "(", ...
Implements the Robot Framework interface method 'run_keyword' required for dynamic libraries. @param keyword name of keyword to be executed @param params parameters passed by Robot Framework @return result of the keyword execution
[ "Implements", "the", "Robot", "Framework", "interface", "method", "run_keyword", "required", "for", "dynamic", "libraries", "." ]
train
https://github.com/jspringbot/jspringbot/blob/03285a7013492fb793cb0c38a4625a5f5c5750e0/src/main/java/org/jspringbot/spring/SpringRobotLibrary.java#L108-L139
radkovo/CSSBox
src/main/java/org/fit/cssbox/css/HTMLNorm.java
HTMLNorm.computeAttributeLength
public static int computeAttributeLength(String value, int whole) throws NumberFormatException { """ Computes a length defined using an HTML attribute (e.g. width for tables). @param value The attribute value @param whole the value used as 100% when value is a percentage @return the computed length """ ...
java
public static int computeAttributeLength(String value, int whole) throws NumberFormatException { String sval = value.trim().toLowerCase(); if (sval.endsWith("%")) { double val = Double.parseDouble(sval.substring(0, sval.length() - 1)); return (int) Math.round(val * wh...
[ "public", "static", "int", "computeAttributeLength", "(", "String", "value", ",", "int", "whole", ")", "throws", "NumberFormatException", "{", "String", "sval", "=", "value", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ";", "if", "(", "sval", ".",...
Computes a length defined using an HTML attribute (e.g. width for tables). @param value The attribute value @param whole the value used as 100% when value is a percentage @return the computed length
[ "Computes", "a", "length", "defined", "using", "an", "HTML", "attribute", "(", "e", ".", "g", ".", "width", "for", "tables", ")", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/css/HTMLNorm.java#L324-L340
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/HeapCache.java
HeapCache.executeWithGlobalLock
private <T> T executeWithGlobalLock(final Job<T> job, final boolean _checkClosed) { """ Execute job while making sure that no other operations are going on. In case the eviction is connected via a queue we need to stop the queue processing. On the other hand we needs to make sure that the queue is drained becaus...
java
private <T> T executeWithGlobalLock(final Job<T> job, final boolean _checkClosed) { synchronized (lock) { if (_checkClosed) { checkClosed(); } eviction.stop(); try { T _result = hash.runTotalLocked(new Job<T>() { @Override public T call() { if (_checkClosed)...
[ "private", "<", "T", ">", "T", "executeWithGlobalLock", "(", "final", "Job", "<", "T", ">", "job", ",", "final", "boolean", "_checkClosed", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "_checkClosed", ")", "{", "checkClosed", "(", ")", "...
Execute job while making sure that no other operations are going on. In case the eviction is connected via a queue we need to stop the queue processing. On the other hand we needs to make sure that the queue is drained because this method is used to access the recent statistics or check integrity. Draining the queue is...
[ "Execute", "job", "while", "making", "sure", "that", "no", "other", "operations", "are", "going", "on", ".", "In", "case", "the", "eviction", "is", "connected", "via", "a", "queue", "we", "need", "to", "stop", "the", "queue", "processing", ".", "On", "th...
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/HeapCache.java#L1890-L1932
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/TemplateFaxJob2HTTPRequestConverter.java
TemplateFaxJob2HTTPRequestConverter.formatHTTPURLParameters
protected String formatHTTPURLParameters(HTTPFaxClientSpi faxClientSpi,FaxJob faxJob) { """ This function formats the HTTP URL parameters. @param faxClientSpi The HTTP fax client SPI @param faxJob The fax job object @return The formatted HTTP URL parameters """ //get URL parameters ...
java
protected String formatHTTPURLParameters(HTTPFaxClientSpi faxClientSpi,FaxJob faxJob) { //get URL parameters String urlParametersTemplate=faxClientSpi.getHTTPURLParameters(); //format URL parameters String urlParameters=SpiUtil.formatTemplate(urlParametersTemplate,faxJob,Spi...
[ "protected", "String", "formatHTTPURLParameters", "(", "HTTPFaxClientSpi", "faxClientSpi", ",", "FaxJob", "faxJob", ")", "{", "//get URL parameters", "String", "urlParametersTemplate", "=", "faxClientSpi", ".", "getHTTPURLParameters", "(", ")", ";", "//format URL parameters...
This function formats the HTTP URL parameters. @param faxClientSpi The HTTP fax client SPI @param faxJob The fax job object @return The formatted HTTP URL parameters
[ "This", "function", "formats", "the", "HTTP", "URL", "parameters", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/TemplateFaxJob2HTTPRequestConverter.java#L328-L337
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java
BuilderResultUtils.getProblemMessage
public static String getProblemMessage(Object object, String summary) { """ Appends compilation problems to summary message if object is an array of {@link CompilationProblem} separated with backspaces @param object object with compilation results @param summary summary message @return summary message with ...
java
public static String getProblemMessage(Object object, String summary) { return getProblemMessage( object, summary, DEFAULT_SEPARATOR ); }
[ "public", "static", "String", "getProblemMessage", "(", "Object", "object", ",", "String", "summary", ")", "{", "return", "getProblemMessage", "(", "object", ",", "summary", ",", "DEFAULT_SEPARATOR", ")", ";", "}" ]
Appends compilation problems to summary message if object is an array of {@link CompilationProblem} separated with backspaces @param object object with compilation results @param summary summary message @return summary message with changes
[ "Appends", "compilation", "problems", "to", "summary", "message", "if", "object", "is", "an", "array", "of", "{", "@link", "CompilationProblem", "}", "separated", "with", "backspaces" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/BuilderResultUtils.java#L23-L25
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMenuItem.java
WMenuItem.setMessage
public void setMessage(final String message, final Serializable... args) { """ Sets the confirmation message that is to be displayed to the user for this menu item. @param message the confirmation message to display, using {@link MessageFormat} syntax. @param args optional arguments for the message format stri...
java
public void setMessage(final String message, final Serializable... args) { getOrCreateComponentModel().message = I18nUtilities.asMessage(message, args); }
[ "public", "void", "setMessage", "(", "final", "String", "message", ",", "final", "Serializable", "...", "args", ")", "{", "getOrCreateComponentModel", "(", ")", ".", "message", "=", "I18nUtilities", ".", "asMessage", "(", "message", ",", "args", ")", ";", "}...
Sets the confirmation message that is to be displayed to the user for this menu item. @param message the confirmation message to display, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "confirmation", "message", "that", "is", "to", "be", "displayed", "to", "the", "user", "for", "this", "menu", "item", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMenuItem.java#L404-L406
s1ck/gdl
src/main/java/org/s1ck/gdl/GDLLoader.java
GDLLoader.processEdge
private void processEdge(GDLParser.EdgeBodyContext edgeBodyContext, boolean isIncoming) { """ Processes incoming and outgoing edges. Checks if the edge has already been created (using its variable). If not, a new edge is created and added to the edge cache. @param edgeBodyContext edge body context @param i...
java
private void processEdge(GDLParser.EdgeBodyContext edgeBodyContext, boolean isIncoming) { String variable = null; Edge e; if (edgeBodyContext != null) { variable = getVariable(edgeBodyContext.header()); } if (variable != null && userEdgeCache.containsKey(variable)) { e = userEdgeCache.g...
[ "private", "void", "processEdge", "(", "GDLParser", ".", "EdgeBodyContext", "edgeBodyContext", ",", "boolean", "isIncoming", ")", "{", "String", "variable", "=", "null", ";", "Edge", "e", ";", "if", "(", "edgeBodyContext", "!=", "null", ")", "{", "variable", ...
Processes incoming and outgoing edges. Checks if the edge has already been created (using its variable). If not, a new edge is created and added to the edge cache. @param edgeBodyContext edge body context @param isIncoming true, if edge is incoming, false for outgoing edge
[ "Processes", "incoming", "and", "outgoing", "edges", "." ]
train
https://github.com/s1ck/gdl/blob/c89b0f83526661823ad3392f338dbf7dc3e3f834/src/main/java/org/s1ck/gdl/GDLLoader.java#L444-L467
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/DisplayReadHandler.java
DisplayReadHandler.init
public void init(Record record, String mainFieldName, Record fileToRead, int iFileKeyField, String fileKeyAreaName) { """ Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param iMainField The field to use as a key in the file to read. @param fileToRead The sec...
java
public void init(Record record, String mainFieldName, Record fileToRead, int iFileKeyField, String fileKeyAreaName) { m_FileToRead = fileToRead; this.mainFieldName = mainFieldName; m_iFileKeyField = iFileKeyField; this.fileKeyFieldName = fileKeyAreaName; super.init(record); ...
[ "public", "void", "init", "(", "Record", "record", ",", "String", "mainFieldName", ",", "Record", "fileToRead", ",", "int", "iFileKeyField", ",", "String", "fileKeyAreaName", ")", "{", "m_FileToRead", "=", "fileToRead", ";", "this", ".", "mainFieldName", "=", ...
Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param iMainField The field to use as a key in the file to read. @param fileToRead The secondary file to read when I read a record from the owner (onvalidrecord). @param iFileKeyField The key field in the secondary file.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/DisplayReadHandler.java#L68-L77
rupertlssmith/junit_toolkit
src/main/com/thesett/junit/extensions/util/MathUtils.java
MathUtils.roundAndAdd
private static void roundAndAdd(Collection<Integer> result, double value) { """ Rounds the specified floating point value to the nearest integer and adds it to the specified list of integers, provided it is not already in the list. @param result The list of integers to add to. @param value The new candidate ...
java
private static void roundAndAdd(Collection<Integer> result, double value) { int roundedValue = (int) Math.round(value); if (!result.contains(roundedValue)) { result.add(roundedValue); } }
[ "private", "static", "void", "roundAndAdd", "(", "Collection", "<", "Integer", ">", "result", ",", "double", "value", ")", "{", "int", "roundedValue", "=", "(", "int", ")", "Math", ".", "round", "(", "value", ")", ";", "if", "(", "!", "result", ".", ...
Rounds the specified floating point value to the nearest integer and adds it to the specified list of integers, provided it is not already in the list. @param result The list of integers to add to. @param value The new candidate to round and add to the list.
[ "Rounds", "the", "specified", "floating", "point", "value", "to", "the", "nearest", "integer", "and", "adds", "it", "to", "the", "specified", "list", "of", "integers", "provided", "it", "is", "not", "already", "in", "the", "list", "." ]
train
https://github.com/rupertlssmith/junit_toolkit/blob/5ec2e82c59602d60f0d9c67e91a66e21ec5fbefb/src/main/com/thesett/junit/extensions/util/MathUtils.java#L428-L436
Azure/azure-sdk-for-java
mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/MySQLManager.java
MySQLManager.authenticate
public static MySQLManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { """ Creates an instance of MySQLManager that exposes DBforMySQL resource management API entry points. @param credentials the credentials to use @param subscriptionId the subscription UUID @return the MySQLManag...
java
public static MySQLManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { return new MySQLManager(new RestClient.Builder() .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) .withCredentials(credentials) .withSerializ...
[ "public", "static", "MySQLManager", "authenticate", "(", "AzureTokenCredentials", "credentials", ",", "String", "subscriptionId", ")", "{", "return", "new", "MySQLManager", "(", "new", "RestClient", ".", "Builder", "(", ")", ".", "withBaseUrl", "(", "credentials", ...
Creates an instance of MySQLManager that exposes DBforMySQL resource management API entry points. @param credentials the credentials to use @param subscriptionId the subscription UUID @return the MySQLManager
[ "Creates", "an", "instance", "of", "MySQLManager", "that", "exposes", "DBforMySQL", "resource", "management", "API", "entry", "points", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/MySQLManager.java#L59-L66
micronaut-projects/micronaut-core
function/src/main/java/io/micronaut/function/executor/FunctionApplication.java
FunctionApplication.exitWithError
static void exitWithError(Boolean isDebug, Exception e) { """ Exit and print an error message if debug flag set. @param isDebug flag for print error @param e exception passed in """ System.err.println("Error executing function (Use -x for more information): " + e.getMessage()); if (isDebug)...
java
static void exitWithError(Boolean isDebug, Exception e) { System.err.println("Error executing function (Use -x for more information): " + e.getMessage()); if (isDebug) { System.err.println(); System.err.println("Error Detail"); System.err.println("------------"); ...
[ "static", "void", "exitWithError", "(", "Boolean", "isDebug", ",", "Exception", "e", ")", "{", "System", ".", "err", ".", "println", "(", "\"Error executing function (Use -x for more information): \"", "+", "e", ".", "getMessage", "(", ")", ")", ";", "if", "(", ...
Exit and print an error message if debug flag set. @param isDebug flag for print error @param e exception passed in
[ "Exit", "and", "print", "an", "error", "message", "if", "debug", "flag", "set", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/function/src/main/java/io/micronaut/function/executor/FunctionApplication.java#L75-L84
crawljax/crawljax
examples/src/main/java/com/crawljax/examples/CrawlExample.java
CrawlExample.main
public static void main(String[] args) throws IOException { """ Run this method to start the crawl. @throws IOException when the output folder cannot be created or emptied. """ CrawljaxConfigurationBuilder builder = CrawljaxConfiguration.builderFor(URL); builder.crawlRules().setFormFillMode(FormF...
java
public static void main(String[] args) throws IOException { CrawljaxConfigurationBuilder builder = CrawljaxConfiguration.builderFor(URL); builder.crawlRules().setFormFillMode(FormFillMode.RANDOM); // click these elements builder.crawlRules().clickDefaultElements(); /*builder.crawlRules().click("A"...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "CrawljaxConfigurationBuilder", "builder", "=", "CrawljaxConfiguration", ".", "builderFor", "(", "URL", ")", ";", "builder", ".", "crawlRules", "(", ")", "....
Run this method to start the crawl. @throws IOException when the output folder cannot be created or emptied.
[ "Run", "this", "method", "to", "start", "the", "crawl", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/examples/src/main/java/com/crawljax/examples/CrawlExample.java#L34-L65
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java
Strs.startAny
public static boolean startAny(String target, Integer toffset, String... startWith) { """ Check if target string starts with any of an array of specified strings beginning at the specified index. @param target @param toffset @param startWith @return """ return startAny(target, toffset, Arrays.asList(st...
java
public static boolean startAny(String target, Integer toffset, String... startWith) { return startAny(target, toffset, Arrays.asList(startWith)); }
[ "public", "static", "boolean", "startAny", "(", "String", "target", ",", "Integer", "toffset", ",", "String", "...", "startWith", ")", "{", "return", "startAny", "(", "target", ",", "toffset", ",", "Arrays", ".", "asList", "(", "startWith", ")", ")", ";", ...
Check if target string starts with any of an array of specified strings beginning at the specified index. @param target @param toffset @param startWith @return
[ "Check", "if", "target", "string", "starts", "with", "any", "of", "an", "array", "of", "specified", "strings", "beginning", "at", "the", "specified", "index", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L341-L343
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/servicegroup_binding.java
servicegroup_binding.get
public static servicegroup_binding get(nitro_service service, String servicegroupname) throws Exception { """ Use this API to fetch servicegroup_binding resource of given name . """ servicegroup_binding obj = new servicegroup_binding(); obj.set_servicegroupname(servicegroupname); servicegroup_binding res...
java
public static servicegroup_binding get(nitro_service service, String servicegroupname) throws Exception{ servicegroup_binding obj = new servicegroup_binding(); obj.set_servicegroupname(servicegroupname); servicegroup_binding response = (servicegroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "servicegroup_binding", "get", "(", "nitro_service", "service", ",", "String", "servicegroupname", ")", "throws", "Exception", "{", "servicegroup_binding", "obj", "=", "new", "servicegroup_binding", "(", ")", ";", "obj", ".", "set_servicegroupname"...
Use this API to fetch servicegroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "servicegroup_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/servicegroup_binding.java#L125-L130
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java
StringFunctions.trim
public static Expression trim(String expression, String characters) { """ Returned expression results in the string with all leading and trailing chars removed (any char in the characters string). """ return trim(x(expression), characters); }
java
public static Expression trim(String expression, String characters) { return trim(x(expression), characters); }
[ "public", "static", "Expression", "trim", "(", "String", "expression", ",", "String", "characters", ")", "{", "return", "trim", "(", "x", "(", "expression", ")", ",", "characters", ")", ";", "}" ]
Returned expression results in the string with all leading and trailing chars removed (any char in the characters string).
[ "Returned", "expression", "results", "in", "the", "string", "with", "all", "leading", "and", "trailing", "chars", "removed", "(", "any", "char", "in", "the", "characters", "string", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java#L325-L327
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/face/AipFace.java
AipFace.addUser
public JSONObject addUser(String image, String imageType, String groupId, String userId, HashMap<String, String> options) { """ 人脸注册接口 @param image - 图片信息(**总数据大小应小于10M**),图片上传方式根据image_type来判断 @param imageType - 图片类型 **BASE64**:图片的base64值,base64编码后的图片数据,需urlencode,编码后的图片大小不超过2M;**URL**:图片的 URL地址( 可能由于网络等原因导致下...
java
public JSONObject addUser(String image, String imageType, String groupId, String userId, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("image", image); request.addBody("image_type", imageType); ...
[ "public", "JSONObject", "addUser", "(", "String", "image", ",", "String", "imageType", ",", "String", "groupId", ",", "String", "userId", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest...
人脸注册接口 @param image - 图片信息(**总数据大小应小于10M**),图片上传方式根据image_type来判断 @param imageType - 图片类型 **BASE64**:图片的base64值,base64编码后的图片数据,需urlencode,编码后的图片大小不超过2M;**URL**:图片的 URL地址( 可能由于网络等原因导致下载图片时间过长)**;FACE_TOKEN**: 人脸图片的唯一标识,调用人脸检测接口时,会为每个人脸图片赋予一个唯一的FACE_TOKEN,同一张图片多次检测得到的FACE_TOKEN是同一个 @param groupId - 用户组id(由数字、字母、下划线组成),长...
[ "人脸注册接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/face/AipFace.java#L109-L127
code4everything/util
src/main/java/com/zhazhapan/util/office/MsWordUtils.java
MsWordUtils.getRun
public static XWPFRun getRun(int paragraphIndex, int runIndex) { """ 获取一个XWPFRun对象 @param paragraphIndex XWPFParagraph位置 @param runIndex XWPFRun位置 @return {@link XWPFRun} """ createXwpfDocumentIfNull(); return xwpfDocument.getParagraphs().get(paragraphIndex).getRuns().get(runIndex); ...
java
public static XWPFRun getRun(int paragraphIndex, int runIndex) { createXwpfDocumentIfNull(); return xwpfDocument.getParagraphs().get(paragraphIndex).getRuns().get(runIndex); }
[ "public", "static", "XWPFRun", "getRun", "(", "int", "paragraphIndex", ",", "int", "runIndex", ")", "{", "createXwpfDocumentIfNull", "(", ")", ";", "return", "xwpfDocument", ".", "getParagraphs", "(", ")", ".", "get", "(", "paragraphIndex", ")", ".", "getRuns"...
获取一个XWPFRun对象 @param paragraphIndex XWPFParagraph位置 @param runIndex XWPFRun位置 @return {@link XWPFRun}
[ "获取一个XWPFRun对象" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/office/MsWordUtils.java#L112-L115
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/form/A_CmsFormFieldPanel.java
A_CmsFormFieldPanel.createRow
protected CmsFormRow createRow(String labelText, String description, Widget widget) { """ Creates a form row.<p> @param labelText the label text @param description the description @param widget the widget to use @return the new form row """ return createRow(labelText, description, widget, null...
java
protected CmsFormRow createRow(String labelText, String description, Widget widget) { return createRow(labelText, description, widget, null, false); }
[ "protected", "CmsFormRow", "createRow", "(", "String", "labelText", ",", "String", "description", ",", "Widget", "widget", ")", "{", "return", "createRow", "(", "labelText", ",", "description", ",", "widget", ",", "null", ",", "false", ")", ";", "}" ]
Creates a form row.<p> @param labelText the label text @param description the description @param widget the widget to use @return the new form row
[ "Creates", "a", "form", "row", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/A_CmsFormFieldPanel.java#L128-L131
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel2D_F64.java
Kernel2D_F64.wrap
public static Kernel2D_F64 wrap(double data[], int width, int offset) { """ Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Kernel origin's offse...
java
public static Kernel2D_F64 wrap(double data[], int width, int offset) { if (width % 2 == 0 && width <= 0 && width * width > data.length) throw new IllegalArgumentException("invalid width"); Kernel2D_F64 ret = new Kernel2D_F64(); ret.data = data; ret.width = width; ret.offset = offset; return ret; }
[ "public", "static", "Kernel2D_F64", "wrap", "(", "double", "data", "[", "]", ",", "int", "width", ",", "int", "offset", ")", "{", "if", "(", "width", "%", "2", "==", "0", "&&", "width", "<=", "0", "&&", "width", "*", "width", ">", "data", ".", "l...
Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Kernel origin's offset from element 0. @return A new kernel.
[ "Creates", "a", "kernel", "whose", "elements", "are", "the", "specified", "data", "array", "and", "has", "the", "specified", "width", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel2D_F64.java#L87-L97
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.terminateAsync
public Observable<Void> terminateAsync(String jobId) { """ Terminates the specified job, marking it as completed. When a Terminate Job request is received, the Batch service sets the job to the terminating state. The Batch service then terminates any running tasks associated with the job and runs any required job...
java
public Observable<Void> terminateAsync(String jobId) { return terminateWithServiceResponseAsync(jobId).map(new Func1<ServiceResponseWithHeaders<Void, JobTerminateHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, JobTerminateHeaders> response) { ...
[ "public", "Observable", "<", "Void", ">", "terminateAsync", "(", "String", "jobId", ")", "{", "return", "terminateWithServiceResponseAsync", "(", "jobId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponseWithHeaders", "<", "Void", ",", "JobTerminateHeade...
Terminates the specified job, marking it as completed. When a Terminate Job request is received, the Batch service sets the job to the terminating state. The Batch service then terminates any running tasks associated with the job and runs any required job release tasks. Then the job moves into the completed state. If t...
[ "Terminates", "the", "specified", "job", "marking", "it", "as", "completed", ".", "When", "a", "Terminate", "Job", "request", "is", "received", "the", "Batch", "service", "sets", "the", "job", "to", "the", "terminating", "state", ".", "The", "Batch", "servic...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L1816-L1823
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java
CollectionLiteralsTypeComputer.doNormalizeElementType
protected LightweightTypeReference doNormalizeElementType(LightweightTypeReference actual, LightweightTypeReference expected) { """ If the expected type is not a wildcard, it may supersede the actual element type. """ if (matchesExpectation(actual, expected)) { return expected; } return normalizeFunct...
java
protected LightweightTypeReference doNormalizeElementType(LightweightTypeReference actual, LightweightTypeReference expected) { if (matchesExpectation(actual, expected)) { return expected; } return normalizeFunctionTypeReference(actual); }
[ "protected", "LightweightTypeReference", "doNormalizeElementType", "(", "LightweightTypeReference", "actual", ",", "LightweightTypeReference", "expected", ")", "{", "if", "(", "matchesExpectation", "(", "actual", ",", "expected", ")", ")", "{", "return", "expected", ";"...
If the expected type is not a wildcard, it may supersede the actual element type.
[ "If", "the", "expected", "type", "is", "not", "a", "wildcard", "it", "may", "supersede", "the", "actual", "element", "type", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/computation/CollectionLiteralsTypeComputer.java#L386-L391
wg/scrypt
src/main/java/com/lambdaworks/crypto/SCryptUtil.java
SCryptUtil.check
public static boolean check(String passwd, String hashed) { """ Compare the supplied plaintext password to a hashed password. @param passwd Plaintext password. @param hashed scrypt hashed password. @return true if passwd matches hashed value. """ try { String[] parts = hashed.s...
java
public static boolean check(String passwd, String hashed) { try { String[] parts = hashed.split("\\$"); if (parts.length != 5 || !parts[1].equals("s0")) { throw new IllegalArgumentException("Invalid hashed value"); } long params = Long.parseLong(...
[ "public", "static", "boolean", "check", "(", "String", "passwd", ",", "String", "hashed", ")", "{", "try", "{", "String", "[", "]", "parts", "=", "hashed", ".", "split", "(", "\"\\\\$\"", ")", ";", "if", "(", "parts", ".", "length", "!=", "5", "||", ...
Compare the supplied plaintext password to a hashed password. @param passwd Plaintext password. @param hashed scrypt hashed password. @return true if passwd matches hashed value.
[ "Compare", "the", "supplied", "plaintext", "password", "to", "a", "hashed", "password", "." ]
train
https://github.com/wg/scrypt/blob/0675236370458e819ee21e4427c5f7f3f9485d33/src/main/java/com/lambdaworks/crypto/SCryptUtil.java#L72-L102
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractObjDynamicHistogram.java
AbstractObjDynamicHistogram.putData
public void putData(double coord, T value) { """ Put fresh data into the histogram (or into the cache). @param coord Coordinate @param value Value """ // Store in cache if(cachefill >= 0 && cachefill < cacheposs.length) { cacheposs[cachefill] = coord; cachevals[cachefill++] = cloneForCa...
java
public void putData(double coord, T value) { // Store in cache if(cachefill >= 0 && cachefill < cacheposs.length) { cacheposs[cachefill] = coord; cachevals[cachefill++] = cloneForCache(value); return; } if(coord == Double.NEGATIVE_INFINITY) { aggregateSpecial(value, 0); } ...
[ "public", "void", "putData", "(", "double", "coord", ",", "T", "value", ")", "{", "// Store in cache", "if", "(", "cachefill", ">=", "0", "&&", "cachefill", "<", "cacheposs", ".", "length", ")", "{", "cacheposs", "[", "cachefill", "]", "=", "coord", ";",...
Put fresh data into the histogram (or into the cache). @param coord Coordinate @param value Value
[ "Put", "fresh", "data", "into", "the", "histogram", "(", "or", "into", "the", "cache", ")", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/histogram/AbstractObjDynamicHistogram.java#L132-L153
irmen/Pyrolite
java/src/main/java/net/razorvine/pyro/PyroProxy.java
PyroProxy.setattr
public void setattr(String attr, Object value) throws PickleException, PyroException, IOException { """ Set a new value on a remote attribute. @param attr the attribute name @param value the new value for the attribute """ this.internal_call("__setattr__", null, 0, false, attr, value); }
java
public void setattr(String attr, Object value) throws PickleException, PyroException, IOException { this.internal_call("__setattr__", null, 0, false, attr, value); }
[ "public", "void", "setattr", "(", "String", "attr", ",", "Object", "value", ")", "throws", "PickleException", ",", "PyroException", ",", "IOException", "{", "this", ".", "internal_call", "(", "\"__setattr__\"", ",", "null", ",", "0", ",", "false", ",", "attr...
Set a new value on a remote attribute. @param attr the attribute name @param value the new value for the attribute
[ "Set", "a", "new", "value", "on", "a", "remote", "attribute", "." ]
train
https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pyro/PyroProxy.java#L203-L205
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.generateInterfaces
void generateInterfaces(Map<String, List<XsdAttribute>> createdAttributes, String apiName) { """ Generates all the required interfaces, based on the information gathered while creating the other classes. It creates both types of interfaces: ElementGroupInterfaces - Interfaces that serve as a base to adding child...
java
void generateInterfaces(Map<String, List<XsdAttribute>> createdAttributes, String apiName) { attributeGroupInterfaces.keySet().forEach(attributeGroupInterface -> generateAttributesGroupInterface(createdAttributes, attributeGroupInterface, attributeGroupInterfaces.get(attributeGroupInterface), apiName)); ...
[ "void", "generateInterfaces", "(", "Map", "<", "String", ",", "List", "<", "XsdAttribute", ">", ">", "createdAttributes", ",", "String", "apiName", ")", "{", "attributeGroupInterfaces", ".", "keySet", "(", ")", ".", "forEach", "(", "attributeGroupInterface", "->...
Generates all the required interfaces, based on the information gathered while creating the other classes. It creates both types of interfaces: ElementGroupInterfaces - Interfaces that serve as a base to adding child elements to the current element; AttributeGroupInterfaces - Interface that serve as a base to adding at...
[ "Generates", "all", "the", "required", "interfaces", "based", "on", "the", "information", "gathered", "while", "creating", "the", "other", "classes", ".", "It", "creates", "both", "types", "of", "interfaces", ":", "ElementGroupInterfaces", "-", "Interfaces", "that...
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L95-L98
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/AbstractStandardTransformationOperation.java
AbstractStandardTransformationOperation.parseIntString
protected Integer parseIntString(String string, boolean abortOnError, int def) throws TransformationOperationException { """ Parses a string to an integer object. AbortOnError defines if the function should throw an exception if an error occurs during the parsing. If it doesn't abort, the given default va...
java
protected Integer parseIntString(String string, boolean abortOnError, int def) throws TransformationOperationException { Integer integer = def; if (string == null) { logger.debug("Given string is empty so the default value is taken."); } try { integer = In...
[ "protected", "Integer", "parseIntString", "(", "String", "string", ",", "boolean", "abortOnError", ",", "int", "def", ")", "throws", "TransformationOperationException", "{", "Integer", "integer", "=", "def", ";", "if", "(", "string", "==", "null", ")", "{", "l...
Parses a string to an integer object. AbortOnError defines if the function should throw an exception if an error occurs during the parsing. If it doesn't abort, the given default value is given back as result on error.
[ "Parses", "a", "string", "to", "an", "integer", "object", ".", "AbortOnError", "defines", "if", "the", "function", "should", "throw", "an", "exception", "if", "an", "error", "occurs", "during", "the", "parsing", ".", "If", "it", "doesn", "t", "abort", "the...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/AbstractStandardTransformationOperation.java#L124-L147
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java
BDBResourceFileLocationDB.removeNameUrl
public void removeNameUrl(final String name, final String url) throws IOException { """ remove a single url location for an name, if it exists @param name @param url @throws IOException """ // need to first see if there is already an entry for this name. // if not, do nothing // if so, loop thru all...
java
public void removeNameUrl(final String name, final String url) throws IOException { // need to first see if there is already an entry for this name. // if not, do nothing // if so, loop thru all current url locations for name // keep any that are not url // if any locations are left, update to the new v...
[ "public", "void", "removeNameUrl", "(", "final", "String", "name", ",", "final", "String", "url", ")", "throws", "IOException", "{", "// need to first see if there is already an entry for this name.", "// if not, do nothing", "// if so, loop thru all current url locations for name"...
remove a single url location for an name, if it exists @param name @param url @throws IOException
[ "remove", "a", "single", "url", "location", "for", "an", "name", "if", "it", "exists" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java#L154-L188
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbClob.java
MariaDbClob.getCharacterStream
public Reader getCharacterStream(long pos, long length) throws SQLException { """ Returns a Reader object that contains a partial Clob value, starting with the character specified by pos, which is length characters in length. @param pos the offset to the first character of the partial value to be retrieved....
java
public Reader getCharacterStream(long pos, long length) throws SQLException { String val = toString(); if (val.length() < (int) pos - 1 + length) { throw ExceptionMapper .getSqlException("pos + length is greater than the number of characters in the Clob"); } String sub = val.substring((i...
[ "public", "Reader", "getCharacterStream", "(", "long", "pos", ",", "long", "length", ")", "throws", "SQLException", "{", "String", "val", "=", "toString", "(", ")", ";", "if", "(", "val", ".", "length", "(", ")", "<", "(", "int", ")", "pos", "-", "1"...
Returns a Reader object that contains a partial Clob value, starting with the character specified by pos, which is length characters in length. @param pos the offset to the first character of the partial value to be retrieved. The first character in the Clob is at position 1. @param length the length in characters ...
[ "Returns", "a", "Reader", "object", "that", "contains", "a", "partial", "Clob", "value", "starting", "with", "the", "character", "specified", "by", "pos", "which", "is", "length", "characters", "in", "length", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbClob.java#L152-L160
ACRA/acra
acra-core/src/main/java/org/acra/log/AndroidLogDelegate.java
AndroidLogDelegate.w
@Override public int w(String tag, Throwable tr) { """ public native boolean isLoggable(java.lang.String tag, int level); """ return Log.w(tag, tr); }
java
@Override public int w(String tag, Throwable tr) { return Log.w(tag, tr); }
[ "@", "Override", "public", "int", "w", "(", "String", "tag", ",", "Throwable", "tr", ")", "{", "return", "Log", ".", "w", "(", "tag", ",", "tr", ")", ";", "}" ]
public native boolean isLoggable(java.lang.String tag, int level);
[ "public", "native", "boolean", "isLoggable", "(", "java", ".", "lang", ".", "String", "tag", "int", "level", ")", ";" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/log/AndroidLogDelegate.java#L62-L65
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.getButton
public Button getButton(String text, boolean onlyVisible) { """ Returns a Button displaying the specified text. @param text the text that is displayed, specified as a regular expression @param onlyVisible {@code true} if only visible buttons on the screen should be returned @return the {@link Button} displayi...
java
public Button getButton(String text, boolean onlyVisible) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "getButton(\""+text+"\", "+onlyVisible+")"); } return getter.getView(Button.class, text, onlyVisible); }
[ "public", "Button", "getButton", "(", "String", "text", ",", "boolean", "onlyVisible", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"getButton(\\\"\"", "+", "text", "+", "\...
Returns a Button displaying the specified text. @param text the text that is displayed, specified as a regular expression @param onlyVisible {@code true} if only visible buttons on the screen should be returned @return the {@link Button} displaying the specified text
[ "Returns", "a", "Button", "displaying", "the", "specified", "text", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2976-L2983
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Arrow.java
Arrow.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { """ Draws this arrow. @param context the {@link Context2D} used to draw this arrow. """ final Point2DArray list = getPolygon();// is null for invalid arrow definition if ((null != l...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final Point2DArray list = getPolygon();// is null for invalid arrow definition if ((null != list) && (list.size() > 2)) { Point2D point = list.get(0); conte...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "final", "Point2DArray", "list", "=", "getPolygon", "(", ")", ";", "// is null for invalid ar...
Draws this arrow. @param context the {@link Context2D} used to draw this arrow.
[ "Draws", "this", "arrow", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Arrow.java#L114-L140
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java
CreateIssueParams.estimatedHours
public CreateIssueParams estimatedHours(BigDecimal estimatedHours) { """ Sets the issue estimate hours. @param estimatedHours the issue estimate hours @return CreateIssueParams instance """ if (estimatedHours == null) { parameters.add(new NameValuePair("estimatedHours", "")); } ...
java
public CreateIssueParams estimatedHours(BigDecimal estimatedHours) { if (estimatedHours == null) { parameters.add(new NameValuePair("estimatedHours", "")); } else { parameters.add(new NameValuePair("estimatedHours", estimatedHours.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainStri...
[ "public", "CreateIssueParams", "estimatedHours", "(", "BigDecimal", "estimatedHours", ")", "{", "if", "(", "estimatedHours", "==", "null", ")", "{", "parameters", ".", "add", "(", "new", "NameValuePair", "(", "\"estimatedHours\"", ",", "\"\"", ")", ")", ";", "...
Sets the issue estimate hours. @param estimatedHours the issue estimate hours @return CreateIssueParams instance
[ "Sets", "the", "issue", "estimate", "hours", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/api/option/CreateIssueParams.java#L95-L102
kaazing/gateway
transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/bridge/filter/SslHandler.java
SslHandler.messageReceived
public void messageReceived(NextFilter nextFilter, ByteBuffer buf) throws SSLException { """ Call when data read from net. Will perform inial hanshake or decrypt provided Buffer. Decrytpted data reurned by getAppBuffer(), if any. @param buf buffer to decrypt @param nextFilter Next filter in chain @th...
java
public void messageReceived(NextFilter nextFilter, ByteBuffer buf) throws SSLException { // append buf to inNetBuffer if (inNetBuffer == null) { inNetBuffer = allocator.wrap(allocator.allocate(buf.remaining())).setAutoExpander(allocator); } inNetBuffer.put(buf); if (...
[ "public", "void", "messageReceived", "(", "NextFilter", "nextFilter", ",", "ByteBuffer", "buf", ")", "throws", "SSLException", "{", "// append buf to inNetBuffer", "if", "(", "inNetBuffer", "==", "null", ")", "{", "inNetBuffer", "=", "allocator", ".", "wrap", "(",...
Call when data read from net. Will perform inial hanshake or decrypt provided Buffer. Decrytpted data reurned by getAppBuffer(), if any. @param buf buffer to decrypt @param nextFilter Next filter in chain @throws SSLException on errors
[ "Call", "when", "data", "read", "from", "net", ".", "Will", "perform", "inial", "hanshake", "or", "decrypt", "provided", "Buffer", ".", "Decrytpted", "data", "reurned", "by", "getAppBuffer", "()", "if", "any", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/bridge/filter/SslHandler.java#L379-L402
fernandospr/java-wns
src/main/java/ar/com/fernandospr/wns/WnsService.java
WnsService.pushToast
public WnsNotificationResponse pushToast(String channelUri, WnsNotificationRequestOptional optional, WnsToast toast) throws WnsException { """ Pushes a toast to channelUri using optional headers @param channelUri @param optional @param toast which should be built with {@link ar.com.fernandospr.wns.model.builder...
java
public WnsNotificationResponse pushToast(String channelUri, WnsNotificationRequestOptional optional, WnsToast toast) throws WnsException { return this.client.push(xmlResourceBuilder, channelUri, toast, this.retryPolicy, optional); }
[ "public", "WnsNotificationResponse", "pushToast", "(", "String", "channelUri", ",", "WnsNotificationRequestOptional", "optional", ",", "WnsToast", "toast", ")", "throws", "WnsException", "{", "return", "this", ".", "client", ".", "push", "(", "xmlResourceBuilder", ","...
Pushes a toast to channelUri using optional headers @param channelUri @param optional @param toast which should be built with {@link ar.com.fernandospr.wns.model.builders.WnsToastBuilder} @return WnsNotificationResponse please see response headers from <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465...
[ "Pushes", "a", "toast", "to", "channelUri", "using", "optional", "headers" ]
train
https://github.com/fernandospr/java-wns/blob/cd621b9c17d1e706f6284e0913531d834904a90d/src/main/java/ar/com/fernandospr/wns/WnsService.java#L134-L136
fabiomaffioletti/jsondoc
jsondoc-springmvc/src/main/java/org/jsondoc/springmvc/scanner/builder/SpringQueryParamBuilder.java
SpringQueryParamBuilder.addRequestMappingParamDoc
private static void addRequestMappingParamDoc(Set<ApiParamDoc> apiParamDocs, RequestMapping requestMapping) { """ Checks the request mapping annotation value and adds the resulting @ApiParamDoc to the documentation @param apiParamDocs @param requestMapping """ if (requestMapping.params().length > 0) { ...
java
private static void addRequestMappingParamDoc(Set<ApiParamDoc> apiParamDocs, RequestMapping requestMapping) { if (requestMapping.params().length > 0) { for (String param : requestMapping.params()) { String[] splitParam = param.split("="); if (splitParam.length > 1) { ...
[ "private", "static", "void", "addRequestMappingParamDoc", "(", "Set", "<", "ApiParamDoc", ">", "apiParamDocs", ",", "RequestMapping", "requestMapping", ")", "{", "if", "(", "requestMapping", ".", "params", "(", ")", ".", "length", ">", "0", ")", "{", "for", ...
Checks the request mapping annotation value and adds the resulting @ApiParamDoc to the documentation @param apiParamDocs @param requestMapping
[ "Checks", "the", "request", "mapping", "annotation", "value", "and", "adds", "the", "resulting" ]
train
https://github.com/fabiomaffioletti/jsondoc/blob/26bf413c236e7c3b66f534c2451b157783c1f45e/jsondoc-springmvc/src/main/java/org/jsondoc/springmvc/scanner/builder/SpringQueryParamBuilder.java#L86-L97
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java
JsonServiceDocumentWriter.writeURL
private void writeURL(JsonGenerator jsonGenerator, Object entity) throws IOException { """ Writes the url of the entity It is a MUST element. @param jsonGenerator jsonGenerator @param entity entity from the container """ // It is exactly the same as the 'name' property. jsonGenerato...
java
private void writeURL(JsonGenerator jsonGenerator, Object entity) throws IOException { // It is exactly the same as the 'name' property. jsonGenerator.writeFieldName(URL); if (entity instanceof EntitySet) { jsonGenerator.writeObject(((EntitySet) entity).getName()); } else { ...
[ "private", "void", "writeURL", "(", "JsonGenerator", "jsonGenerator", ",", "Object", "entity", ")", "throws", "IOException", "{", "// It is exactly the same as the 'name' property.", "jsonGenerator", ".", "writeFieldName", "(", "URL", ")", ";", "if", "(", "entity", "i...
Writes the url of the entity It is a MUST element. @param jsonGenerator jsonGenerator @param entity entity from the container
[ "Writes", "the", "url", "of", "the", "entity", "It", "is", "a", "MUST", "element", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java#L154-L162
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageVisitor.java
ImageVisitor.visit
void visit(ImageElement element, int value) throws IOException { """ Convenience methods to automatically convert numeric value types to strings """ visit(element, Integer.toString(value)); }
java
void visit(ImageElement element, int value) throws IOException { visit(element, Integer.toString(value)); }
[ "void", "visit", "(", "ImageElement", "element", ",", "int", "value", ")", "throws", "IOException", "{", "visit", "(", "element", ",", "Integer", ".", "toString", "(", "value", ")", ")", ";", "}" ]
Convenience methods to automatically convert numeric value types to strings
[ "Convenience", "methods", "to", "automatically", "convert", "numeric", "value", "types", "to", "strings" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageVisitor.java#L112-L114
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/system.java
system.navigateToActivity
public static void navigateToActivity(Context A, Class<?> B, Bundle extras) { """ Navigate to an activity.<br> e.g. navigateToActivity(this,SecondActivity.class, extras) @param A From Activity @param B Destination Activity @param extras Extras to be included in the new Activity """ Inte...
java
public static void navigateToActivity(Context A, Class<?> B, Bundle extras) { Intent myIntent = new Intent(A, B); myIntent.putExtras(extras); A.startActivity(myIntent); }
[ "public", "static", "void", "navigateToActivity", "(", "Context", "A", ",", "Class", "<", "?", ">", "B", ",", "Bundle", "extras", ")", "{", "Intent", "myIntent", "=", "new", "Intent", "(", "A", ",", "B", ")", ";", "myIntent", ".", "putExtras", "(", "...
Navigate to an activity.<br> e.g. navigateToActivity(this,SecondActivity.class, extras) @param A From Activity @param B Destination Activity @param extras Extras to be included in the new Activity
[ "Navigate", "to", "an", "activity", ".", "<br", ">", "e", ".", "g", ".", "navigateToActivity", "(", "this", "SecondActivity", ".", "class", "extras", ")" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/system.java#L150-L154
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/IncidentEntity.java
IncidentEntity.createRecursiveIncidents
protected void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) { """ Instantiate recursive a new incident a super execution (i.e. super process instance) which is affected from this incident. For example: a super process instance called via CallActivity a new process...
java
protected void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) { final ExecutionEntity execution = getExecution(); if(execution != null) { ExecutionEntity superExecution = execution.getProcessInstance().getSuperExecution(); if (superExecution != null) ...
[ "protected", "void", "createRecursiveIncidents", "(", "String", "rootCauseIncidentId", ",", "List", "<", "IncidentEntity", ">", "createdIncidents", ")", "{", "final", "ExecutionEntity", "execution", "=", "getExecution", "(", ")", ";", "if", "(", "execution", "!=", ...
Instantiate recursive a new incident a super execution (i.e. super process instance) which is affected from this incident. For example: a super process instance called via CallActivity a new process instance on which an incident happened, so that the super process instance has an incident too.
[ "Instantiate", "recursive", "a", "new", "incident", "a", "super", "execution", "(", "i", ".", "e", ".", "super", "process", "instance", ")", "which", "is", "affected", "from", "this", "incident", ".", "For", "example", ":", "a", "super", "process", "instan...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/IncidentEntity.java#L79-L109
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSessionSecurityUtil.java
CmsUgcSessionSecurityUtil.checkCreateContent
public static void checkCreateContent(CmsObject cms, CmsUgcConfiguration config) throws CmsUgcException { """ Checks whether a new XML content may be created and throws an exception if this is not the case.<p> @param cms the current CMS context @param config the form configuration @throws CmsUgcException if...
java
public static void checkCreateContent(CmsObject cms, CmsUgcConfiguration config) throws CmsUgcException { if (config.getMaxContentNumber().isPresent()) { int maxContents = config.getMaxContentNumber().get().intValue(); String sitePath = cms.getSitePath(config.getContentParentFolder()); ...
[ "public", "static", "void", "checkCreateContent", "(", "CmsObject", "cms", ",", "CmsUgcConfiguration", "config", ")", "throws", "CmsUgcException", "{", "if", "(", "config", ".", "getMaxContentNumber", "(", ")", ".", "isPresent", "(", ")", ")", "{", "int", "max...
Checks whether a new XML content may be created and throws an exception if this is not the case.<p> @param cms the current CMS context @param config the form configuration @throws CmsUgcException if something goes wrong
[ "Checks", "whether", "a", "new", "XML", "content", "may", "be", "created", "and", "throws", "an", "exception", "if", "this", "is", "not", "the", "case", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSessionSecurityUtil.java#L64-L82
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPoliciesInner.java
BackupShortTermRetentionPoliciesInner.createOrUpdate
public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName) { """ Updates a database's short term retention policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resourc...
java
public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().last().body(); }
[ "public", "BackupShortTermRetentionPolicyInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", ...
Updates a database's short term retention policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @throws IllegalArgum...
[ "Updates", "a", "database", "s", "short", "term", "retention", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPoliciesInner.java#L198-L200
devcon5io/common
cli/src/main/java/io/devcon5/cli/OptionInjector.java
OptionInjector.preFlightCheckMethods
private <T> void preFlightCheckMethods(final T target, final List<Method> methods) { """ Invokes all methods in the list on the target. @param target the target on which the methods should be ivoked @param methods the methods to be invoked in order of priority @param <T> """ methods.forEach(m -> ...
java
private <T> void preFlightCheckMethods(final T target, final List<Method> methods) { methods.forEach(m -> {m.setAccessible(true); try { m.invoke(target); } catch (IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); ...
[ "private", "<", "T", ">", "void", "preFlightCheckMethods", "(", "final", "T", "target", ",", "final", "List", "<", "Method", ">", "methods", ")", "{", "methods", ".", "forEach", "(", "m", "->", "{", "m", ".", "setAccessible", "(", "true", ")", ";", "...
Invokes all methods in the list on the target. @param target the target on which the methods should be ivoked @param methods the methods to be invoked in order of priority @param <T>
[ "Invokes", "all", "methods", "in", "the", "list", "on", "the", "target", "." ]
train
https://github.com/devcon5io/common/blob/363688e0dc904d559682bf796bd6c836b4e0efc7/cli/src/main/java/io/devcon5/cli/OptionInjector.java#L122-L131
knowm/XChange
xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenAccountServiceRaw.java
KrakenAccountServiceRaw.getKrakenLedgerInfo
public Map<String, KrakenLedger> getKrakenLedgerInfo() throws IOException { """ Retrieves the full account Ledger which represents all account asset activity. @return @throws IOException """ return getKrakenLedgerInfo(null, null, null, null); }
java
public Map<String, KrakenLedger> getKrakenLedgerInfo() throws IOException { return getKrakenLedgerInfo(null, null, null, null); }
[ "public", "Map", "<", "String", ",", "KrakenLedger", ">", "getKrakenLedgerInfo", "(", ")", "throws", "IOException", "{", "return", "getKrakenLedgerInfo", "(", "null", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Retrieves the full account Ledger which represents all account asset activity. @return @throws IOException
[ "Retrieves", "the", "full", "account", "Ledger", "which", "represents", "all", "account", "asset", "activity", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-kraken/src/main/java/org/knowm/xchange/kraken/service/KrakenAccountServiceRaw.java#L188-L191
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskState.java
TaskState.updateRecordMetrics
public synchronized void updateRecordMetrics(long recordsWritten, int branchIndex) { """ Update record-level metrics. @param recordsWritten number of records written by the writer @param branchIndex fork branch index @deprecated see {@link org.apache.gobblin.instrumented.writer.InstrumentedDataWriterBase}. ...
java
public synchronized void updateRecordMetrics(long recordsWritten, int branchIndex) { TaskMetrics metrics = TaskMetrics.get(this); // chopping branch index from metric name // String forkBranchId = ForkOperatorUtils.getForkId(this.taskId, branchIndex); String forkBranchId = TaskMetrics.taskInstanceRemove...
[ "public", "synchronized", "void", "updateRecordMetrics", "(", "long", "recordsWritten", ",", "int", "branchIndex", ")", "{", "TaskMetrics", "metrics", "=", "TaskMetrics", ".", "get", "(", "this", ")", ";", "// chopping branch index from metric name", "// String forkBran...
Update record-level metrics. @param recordsWritten number of records written by the writer @param branchIndex fork branch index @deprecated see {@link org.apache.gobblin.instrumented.writer.InstrumentedDataWriterBase}.
[ "Update", "record", "-", "level", "metrics", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskState.java#L256-L268
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/support/ParseTreeUtils.java
ParseTreeUtils.printNodeTree
public static <V> String printNodeTree(ParsingResult<V> parsingResult, Predicate<Node<V>> nodeFilter, Predicate<Node<V>> subTreeFilter) { """ Creates a readable string represenation of the parse tree in thee given {@link ParsingResult} object. The given filter predicate ...
java
public static <V> String printNodeTree(ParsingResult<V> parsingResult, Predicate<Node<V>> nodeFilter, Predicate<Node<V>> subTreeFilter) { checkArgNotNull(parsingResult, "parsingResult"); checkArgNotNull(nodeFilter, "nodeFilter"); checkArgNotNull(subTree...
[ "public", "static", "<", "V", ">", "String", "printNodeTree", "(", "ParsingResult", "<", "V", ">", "parsingResult", ",", "Predicate", "<", "Node", "<", "V", ">", ">", "nodeFilter", ",", "Predicate", "<", "Node", "<", "V", ">", ">", "subTreeFilter", ")", ...
Creates a readable string represenation of the parse tree in thee given {@link ParsingResult} object. The given filter predicate determines whether a particular node (incl. its subtree) is printed or not. @param parsingResult the parsing result containing the parse tree @param nodeFilter the predicate selecting the...
[ "Creates", "a", "readable", "string", "represenation", "of", "the", "parse", "tree", "in", "thee", "given", "{", "@link", "ParsingResult", "}", "object", ".", "The", "given", "filter", "predicate", "determines", "whether", "a", "particular", "node", "(", "incl...
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/support/ParseTreeUtils.java#L340-L347
springfox/springfox
springfox-schema/src/main/java/springfox/documentation/schema/Annotations.java
Annotations.findPropertyAnnotation
public static <A extends Annotation> Optional<A> findPropertyAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { """ Finds first annotation of the given type on the given bean property and returns it. Search precedence is getter, setter, field. @param beanProperty...
java
public static <A extends Annotation> Optional<A> findPropertyAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { return tryGetFieldAnnotation(beanPropertyDefinition, annotationClass) .map(Optional::of).orElse(tryGetGetterAnnotation(beanPropertyDefinition, anno...
[ "public", "static", "<", "A", "extends", "Annotation", ">", "Optional", "<", "A", ">", "findPropertyAnnotation", "(", "BeanPropertyDefinition", "beanPropertyDefinition", ",", "Class", "<", "A", ">", "annotationClass", ")", "{", "return", "tryGetFieldAnnotation", "("...
Finds first annotation of the given type on the given bean property and returns it. Search precedence is getter, setter, field. @param beanPropertyDefinition introspected jackson property definition @param annotationClass class object representing desired annotation @param <A> type that exten...
[ "Finds", "first", "annotation", "of", "the", "given", "type", "on", "the", "given", "bean", "property", "and", "returns", "it", ".", "Search", "precedence", "is", "getter", "setter", "field", "." ]
train
https://github.com/springfox/springfox/blob/e40e2d6f4b345ffa35cd5c0ca7a12589036acaf7/springfox-schema/src/main/java/springfox/documentation/schema/Annotations.java#L46-L53
rototor/pdfbox-graphics2d
src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2DFontTextDrawer.java
PdfBoxGraphics2DFontTextDrawer.registerFont
@SuppressWarnings("WeakerAccess") public void registerFont(String fontName, File fontFile) { """ Register a font. @param fontName the name of the font to use. If null, the name is taken from the font. @param fontFile the font file. This file must exist for the live time of this object, as the font data wi...
java
@SuppressWarnings("WeakerAccess") public void registerFont(String fontName, File fontFile) { if (!fontFile.exists()) throw new IllegalArgumentException("Font " + fontFile + " does not exist!"); FontEntry entry = new FontEntry(); entry.overrideName = fontName; entry.file = fontFile; fontFiles.add(entry); ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "registerFont", "(", "String", "fontName", ",", "File", "fontFile", ")", "{", "if", "(", "!", "fontFile", ".", "exists", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", ...
Register a font. @param fontName the name of the font to use. If null, the name is taken from the font. @param fontFile the font file. This file must exist for the live time of this object, as the font data will be read lazy on demand
[ "Register", "a", "font", "." ]
train
https://github.com/rototor/pdfbox-graphics2d/blob/86d53942cf2c137edca59d45766927c077f49230/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2DFontTextDrawer.java#L106-L114
RestComm/sip-servlets
containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java
SipDigestAuthenticationMechanism.parseUsername
protected String parseUsername(String authorization) { """ Parse the username from the specified authorization string. If none can be identified, return <code>null</code> @param authorization Authorization string to be parsed """ // System.out.println("Authorization token : " + authorization); ...
java
protected String parseUsername(String authorization) { // System.out.println("Authorization token : " + authorization); // Validate the authorization credentials format if (authorization == null) return (null); if (!authorization.startsWith("Digest ")) return (nul...
[ "protected", "String", "parseUsername", "(", "String", "authorization", ")", "{", "// System.out.println(\"Authorization token : \" + authorization);", "// Validate the authorization credentials format", "if", "(", "authorization", "==", "null", ")", "return", "(", "null", ")",...
Parse the username from the specified authorization string. If none can be identified, return <code>null</code> @param authorization Authorization string to be parsed
[ "Parse", "the", "username", "from", "the", "specified", "authorization", "string", ".", "If", "none", "can", "be", "identified", "return", "<code", ">", "null<", "/", "code", ">" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as10/src/main/java/org/mobicents/servlet/sip/undertow/security/authentication/SipDigestAuthenticationMechanism.java#L522-L544
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java
DefaultImageFormatChecker.isHeifHeader
private static boolean isHeifHeader(final byte[] imageHeaderBytes, final int headerSize) { """ Checks if first headerSize bytes of imageHeaderBytes constitute a valid header for a HEIF image. Details on HEIF header can be found at: <a href="http://nokiatech.github.io/heif/technical.html"></a> @param imageHead...
java
private static boolean isHeifHeader(final byte[] imageHeaderBytes, final int headerSize) { if (headerSize < HEIF_HEADER_LENGTH) { return false; } final byte boxLength = imageHeaderBytes[3]; if (boxLength < 8) { return false; } for (final String heifFtype : HEIF_HEADER_SUFFIXES) { ...
[ "private", "static", "boolean", "isHeifHeader", "(", "final", "byte", "[", "]", "imageHeaderBytes", ",", "final", "int", "headerSize", ")", "{", "if", "(", "headerSize", "<", "HEIF_HEADER_LENGTH", ")", "{", "return", "false", ";", "}", "final", "byte", "boxL...
Checks if first headerSize bytes of imageHeaderBytes constitute a valid header for a HEIF image. Details on HEIF header can be found at: <a href="http://nokiatech.github.io/heif/technical.html"></a> @param imageHeaderBytes @param headerSize @return true if imageHeaderBytes is a valid header for a HEIF image
[ "Checks", "if", "first", "headerSize", "bytes", "of", "imageHeaderBytes", "constitute", "a", "valid", "header", "for", "a", "HEIF", "image", ".", "Details", "on", "HEIF", "header", "can", "be", "found", "at", ":", "<a", "href", "=", "http", ":", "//", "n...
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imageformat/DefaultImageFormatChecker.java#L263-L286