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
dadoonet/fscrawler
framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java
FsCrawlerUtil.isIndexable
public static boolean isIndexable(String content, List<String> filters) { """ We check if we can index the content or skip it @param content Content to parse @param filters regular expressions that all needs to match if we want to index. If empty we consider it always matches. """ if (isNullOrEmpt...
java
public static boolean isIndexable(String content, List<String> filters) { if (isNullOrEmpty(content)) { logger.trace("Null or empty content always matches."); return true; } if (filters == null || filters.isEmpty()) { logger.trace("No pattern always matches."...
[ "public", "static", "boolean", "isIndexable", "(", "String", "content", ",", "List", "<", "String", ">", "filters", ")", "{", "if", "(", "isNullOrEmpty", "(", "content", ")", ")", "{", "logger", ".", "trace", "(", "\"Null or empty content always matches.\"", "...
We check if we can index the content or skip it @param content Content to parse @param filters regular expressions that all needs to match if we want to index. If empty we consider it always matches.
[ "We", "check", "if", "we", "can", "index", "the", "content", "or", "skip", "it" ]
train
https://github.com/dadoonet/fscrawler/blob/cca00a14e21ef9986aa30e19b160463aed6bf921/framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java#L258-L282
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPropertyCustom.java
CmsPropertyCustom.actionEdit
@Override public void actionEdit(HttpServletRequest request) throws JspException { """ Performs the edit properties action, will be called by the JSP page.<p> @param request the HttpServletRequest @throws JspException if problems including sub-elements occur """ // save initialized instance of...
java
@Override public void actionEdit(HttpServletRequest request) throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { // save the changes only if resou...
[ "@", "Override", "public", "void", "actionEdit", "(", "HttpServletRequest", "request", ")", "throws", "JspException", "{", "// save initialized instance of this class in request attribute for included sub-elements", "getJsp", "(", ")", ".", "getRequest", "(", ")", ".", "set...
Performs the edit properties action, will be called by the JSP page.<p> @param request the HttpServletRequest @throws JspException if problems including sub-elements occur
[ "Performs", "the", "edit", "properties", "action", "will", "be", "called", "by", "the", "JSP", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPropertyCustom.java#L113-L127
aws/aws-sdk-java
aws-java-sdk-iotjobsdataplane/src/main/java/com/amazonaws/services/iotjobsdataplane/model/UpdateJobExecutionRequest.java
UpdateJobExecutionRequest.withStatusDetails
public UpdateJobExecutionRequest withStatusDetails(java.util.Map<String, String> statusDetails) { """ <p> Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. </p> @param statusDetails Optional. A collection of name/valu...
java
public UpdateJobExecutionRequest withStatusDetails(java.util.Map<String, String> statusDetails) { setStatusDetails(statusDetails); return this; }
[ "public", "UpdateJobExecutionRequest", "withStatusDetails", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "statusDetails", ")", "{", "setStatusDetails", "(", "statusDetails", ")", ";", "return", "this", ";", "}" ]
<p> Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. </p> @param statusDetails Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. @return...
[ "<p", ">", "Optional", ".", "A", "collection", "of", "name", "/", "value", "pairs", "that", "describe", "the", "status", "of", "the", "job", "execution", ".", "If", "not", "specified", "the", "statusDetails", "are", "unchanged", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iotjobsdataplane/src/main/java/com/amazonaws/services/iotjobsdataplane/model/UpdateJobExecutionRequest.java#L282-L285
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/io/IOUtil.java
IOUtil.writeKryo
public static <T> void writeKryo(T obj, OutputStream file) { """ Write kryo. @param <T> the type parameter @param obj the obj @param file the file """ try { Output output = new Output(buffer.get()); new KryoReflectionFactorySupport().writeClassAndObject(output, obj); output.close()...
java
public static <T> void writeKryo(T obj, OutputStream file) { try { Output output = new Output(buffer.get()); new KryoReflectionFactorySupport().writeClassAndObject(output, obj); output.close(); IOUtils.write(CompressionUtil.encodeBZ(Arrays.copyOf(output.getBuffer(), output.position())), file...
[ "public", "static", "<", "T", ">", "void", "writeKryo", "(", "T", "obj", ",", "OutputStream", "file", ")", "{", "try", "{", "Output", "output", "=", "new", "Output", "(", "buffer", ".", "get", "(", ")", ")", ";", "new", "KryoReflectionFactorySupport", ...
Write kryo. @param <T> the type parameter @param obj the obj @param file the file
[ "Write", "kryo", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/io/IOUtil.java#L97-L107
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/utility/logging/MetaCSPLogging.java
MetaCSPLogging.setLevel
public static void setLevel(Class<?> c, Level l) /* throws LoggerNotDefined */ { """ Set a desired log level for a specific class. @param c The class to set the log level for. @param l The desired log level. """ if (!loggers.containsKey(c)) tempLevels.put(c, l); else loggers.get(c).setLevel(l); //Sy...
java
public static void setLevel(Class<?> c, Level l) /* throws LoggerNotDefined */ { if (!loggers.containsKey(c)) tempLevels.put(c, l); else loggers.get(c).setLevel(l); //System.out.println("Set level " + l + " for logger " + loggers.get(c).getName()); }
[ "public", "static", "void", "setLevel", "(", "Class", "<", "?", ">", "c", ",", "Level", "l", ")", "/* throws LoggerNotDefined */", "{", "if", "(", "!", "loggers", ".", "containsKey", "(", "c", ")", ")", "tempLevels", ".", "put", "(", "c", ",", "l", "...
Set a desired log level for a specific class. @param c The class to set the log level for. @param l The desired log level.
[ "Set", "a", "desired", "log", "level", "for", "a", "specific", "class", "." ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/logging/MetaCSPLogging.java#L126-L130
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/StorageTreeFactory.java
StorageTreeFactory.configureConverterPlugin
private TreeBuilder<ResourceMeta> configureConverterPlugin(TreeBuilder<ResourceMeta> builder, int index, Map<String, String> configProps) { """ Configure converter plugins for the builder @param builder builder @param index given index @...
java
private TreeBuilder<ResourceMeta> configureConverterPlugin(TreeBuilder<ResourceMeta> builder, int index, Map<String, String> configProps) { String pref1 = getConverterConfigPrefix() + SEP + index; String pluginType = configProps.get(pref1 + ...
[ "private", "TreeBuilder", "<", "ResourceMeta", ">", "configureConverterPlugin", "(", "TreeBuilder", "<", "ResourceMeta", ">", "builder", ",", "int", "index", ",", "Map", "<", "String", ",", "String", ">", "configProps", ")", "{", "String", "pref1", "=", "getCo...
Configure converter plugins for the builder @param builder builder @param index given index @param configProps configuration properties @return builder
[ "Configure", "converter", "plugins", "for", "the", "builder" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/StorageTreeFactory.java#L204-L227
lessthanoptimal/BoofCV
examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java
ExampleFundamentalMatrix.simpleFundamental
public static DMatrixRMaj simpleFundamental( List<AssociatedPair> matches ) { """ If the set of associated features are known to be correct, then the fundamental matrix can be computed directly with a lot less code. The down side is that this technique is very sensitive to noise. """ // Use the 8-point al...
java
public static DMatrixRMaj simpleFundamental( List<AssociatedPair> matches ) { // Use the 8-point algorithm since it will work with an arbitrary number of points Estimate1ofEpipolar estimateF = FactoryMultiView.fundamental_1(EnumFundamental.LINEAR_8, 0); DMatrixRMaj F = new DMatrixRMaj(3,3); if( !estimateF.proc...
[ "public", "static", "DMatrixRMaj", "simpleFundamental", "(", "List", "<", "AssociatedPair", ">", "matches", ")", "{", "// Use the 8-point algorithm since it will work with an arbitrary number of points", "Estimate1ofEpipolar", "estimateF", "=", "FactoryMultiView", ".", "fundament...
If the set of associated features are known to be correct, then the fundamental matrix can be computed directly with a lot less code. The down side is that this technique is very sensitive to noise.
[ "If", "the", "set", "of", "associated", "features", "are", "known", "to", "be", "correct", "then", "the", "fundamental", "matrix", "can", "be", "computed", "directly", "with", "a", "lot", "less", "code", ".", "The", "down", "side", "is", "that", "this", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/stereo/ExampleFundamentalMatrix.java#L114-L125
casbin/jcasbin
src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java
ManagementEnforcer.hasNamedPolicy
public boolean hasNamedPolicy(String ptype, List<String> params) { """ hasNamedPolicy determines whether a named authorization rule exists. @param ptype the policy type, can be "p", "p2", "p3", .. @param params the "p" policy rule. @return whether the rule exists. """ return model.hasPolicy("p", p...
java
public boolean hasNamedPolicy(String ptype, List<String> params) { return model.hasPolicy("p", ptype, params); }
[ "public", "boolean", "hasNamedPolicy", "(", "String", "ptype", ",", "List", "<", "String", ">", "params", ")", "{", "return", "model", ".", "hasPolicy", "(", "\"p\"", ",", "ptype", ",", "params", ")", ";", "}" ]
hasNamedPolicy determines whether a named authorization rule exists. @param ptype the policy type, can be "p", "p2", "p3", .. @param params the "p" policy rule. @return whether the rule exists.
[ "hasNamedPolicy", "determines", "whether", "a", "named", "authorization", "rule", "exists", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java#L241-L243
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ServletStartedListener.java
ServletStartedListener.createSecurityConstraint
private SecurityConstraint createSecurityConstraint(SecurityMetadata securityMetadataFromDD, List<WebResourceCollection> webResourceCollections, HttpConstraintElement httpConstraint, boolean fromHttpConstraint) { """ Creates a security constraint from the giv...
java
private SecurityConstraint createSecurityConstraint(SecurityMetadata securityMetadataFromDD, List<WebResourceCollection> webResourceCollections, HttpConstraintElement httpConstraint, boolean fromHttpConstraint) { List<String> roles = createRoles(httpConstr...
[ "private", "SecurityConstraint", "createSecurityConstraint", "(", "SecurityMetadata", "securityMetadataFromDD", ",", "List", "<", "WebResourceCollection", ">", "webResourceCollections", ",", "HttpConstraintElement", "httpConstraint", ",", "boolean", "fromHttpConstraint", ")", "...
Creates a security constraint from the given web resource collections, url patterns and HttpConstraint element. @param securityMetadataFromDD the security metadata processed from the deployment descriptor, for updating the roles @param webResourceCollections a list of web resource collections @param httpConstraint the...
[ "Creates", "a", "security", "constraint", "from", "the", "given", "web", "resource", "collections", "url", "patterns", "and", "HttpConstraint", "element", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ServletStartedListener.java#L368-L381
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java
SqlConnRunner.insertOrUpdate
public int insertOrUpdate(Connection conn, Entity record, String... keys) throws SQLException { """ 插入数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @param keys 需要检查唯一性的字段 @return 插入行数 @throws SQLException SQL执行异常 """ final Entity where = record.filter(keys); if(MapUtil.isNotEmpty(wh...
java
public int insertOrUpdate(Connection conn, Entity record, String... keys) throws SQLException { final Entity where = record.filter(keys); if(MapUtil.isNotEmpty(where) && count(conn, where) > 0) { return update(conn, record, where); }else { return insert(conn, record); } }
[ "public", "int", "insertOrUpdate", "(", "Connection", "conn", ",", "Entity", "record", ",", "String", "...", "keys", ")", "throws", "SQLException", "{", "final", "Entity", "where", "=", "record", ".", "filter", "(", "keys", ")", ";", "if", "(", "MapUtil", ...
插入数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @param keys 需要检查唯一性的字段 @return 插入行数 @throws SQLException SQL执行异常
[ "插入数据<br", ">", "此方法不会关闭Connection" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L121-L128
cdk/cdk
storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java
BeamToCDK.findDirectionalEdge
private Edge findDirectionalEdge(Graph g, int u) { """ Utility for find the first directional edge incident to a vertex. If there are no directional labels then null is returned. @param g graph from Beam @param u the vertex for which to find @return first directional edge (or null if none) """ Li...
java
private Edge findDirectionalEdge(Graph g, int u) { List<Edge> edges = g.edges(u); if (edges.size() == 1) return null; Edge first = null; for (Edge e : edges) { Bond b = e.bond(); if (b == Bond.UP || b == Bond.DOWN) { if (first == null) ...
[ "private", "Edge", "findDirectionalEdge", "(", "Graph", "g", ",", "int", "u", ")", "{", "List", "<", "Edge", ">", "edges", "=", "g", ".", "edges", "(", "u", ")", ";", "if", "(", "edges", ".", "size", "(", ")", "==", "1", ")", "return", "null", ...
Utility for find the first directional edge incident to a vertex. If there are no directional labels then null is returned. @param g graph from Beam @param u the vertex for which to find @return first directional edge (or null if none)
[ "Utility", "for", "find", "the", "first", "directional", "edge", "incident", "to", "a", "vertex", ".", "If", "there", "are", "no", "directional", "labels", "then", "null", "is", "returned", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/smiles/src/main/java/org/openscience/cdk/smiles/BeamToCDK.java#L419-L434
kohsuke/com4j
runtime/src/main/java/com4j/COM4J.java
COM4J.getObject
public static <T extends Com4jObject> T getObject(Class<T> primaryInterface, String fileName, String progId ) { """ Returns a reference to a COM object primarily by loading a file. <p> This method implements the semantics of the {@code GetObject} Visual Basic function. See <a href="http://msdn2.microsoft.com/...
java
public static <T extends Com4jObject> T getObject(Class<T> primaryInterface, String fileName, String progId ) { return new GetObjectTask<T>(fileName,progId,primaryInterface).execute(); }
[ "public", "static", "<", "T", "extends", "Com4jObject", ">", "T", "getObject", "(", "Class", "<", "T", ">", "primaryInterface", ",", "String", "fileName", ",", "String", "progId", ")", "{", "return", "new", "GetObjectTask", "<", "T", ">", "(", "fileName", ...
Returns a reference to a COM object primarily by loading a file. <p> This method implements the semantics of the {@code GetObject} Visual Basic function. See <a href="http://msdn2.microsoft.com/en-us/library/e9waz863(VS.71).aspx">MSDN reference</a> for its semantics. <p> This function really has three different mode ...
[ "Returns", "a", "reference", "to", "a", "COM", "object", "primarily", "by", "loading", "a", "file", "." ]
train
https://github.com/kohsuke/com4j/blob/1e690b805fb0e4e9ef61560e20a56335aecb0b24/runtime/src/main/java/com4j/COM4J.java#L257-L259
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/MoveOnChangeHandler.java
MoveOnChangeHandler.moveSourceToDest
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode) { """ Do the physical move operation. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay). """ if (m_fldSource instance...
java
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode) { if (m_fldSource instanceof BaseField) return ((BaseField)m_fldDest.getField()).moveFieldToThis((BaseField)m_fldSource, bDisplayOption, iMoveMode); // Move dependent field to here else return m_fldDest.setS...
[ "public", "int", "moveSourceToDest", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "if", "(", "m_fldSource", "instanceof", "BaseField", ")", "return", "(", "(", "BaseField", ")", "m_fldDest", ".", "getField", "(", ")", ")", ".", "moveF...
Do the physical move operation. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay).
[ "Do", "the", "physical", "move", "operation", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/MoveOnChangeHandler.java#L196-L202
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertexIterator.java
ManagementGroupVertexIterator.allConnectionsFromOtherStage
private boolean allConnectionsFromOtherStage(final ManagementGroupVertex groupVertex, final boolean forward) { """ Checks if for the given group vertex all incoming (if forward is <code>true</code>) or outgoing edges (if forward is <code>false</code>) come from other stages than the one the given vertex is in. ...
java
private boolean allConnectionsFromOtherStage(final ManagementGroupVertex groupVertex, final boolean forward) { if (forward) { for (int i = 0; i < groupVertex.getNumberOfBackwardEdges(); i++) { if (this.stage == groupVertex.getBackwardEdge(i).getSource().getStageNumber()) { return false; } } } el...
[ "private", "boolean", "allConnectionsFromOtherStage", "(", "final", "ManagementGroupVertex", "groupVertex", ",", "final", "boolean", "forward", ")", "{", "if", "(", "forward", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "groupVertex", ".", "ge...
Checks if for the given group vertex all incoming (if forward is <code>true</code>) or outgoing edges (if forward is <code>false</code>) come from other stages than the one the given vertex is in. @param groupVertex the group vertex to check for @param forward <code>true</code> if incoming edges should be considered, ...
[ "Checks", "if", "for", "the", "given", "group", "vertex", "all", "incoming", "(", "if", "forward", "is", "<code", ">", "true<", "/", "code", ">", ")", "or", "outgoing", "edges", "(", "if", "forward", "is", "<code", ">", "false<", "/", "code", ">", ")...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertexIterator.java#L193-L210
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dos/dospolicy_stats.java
dospolicy_stats.get
public static dospolicy_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of dospolicy_stats resource of given name . """ dospolicy_stats obj = new dospolicy_stats(); obj.set_name(name); dospolicy_stats response = (dospolicy_stats) obj.stat_resource(ser...
java
public static dospolicy_stats get(nitro_service service, String name) throws Exception{ dospolicy_stats obj = new dospolicy_stats(); obj.set_name(name); dospolicy_stats response = (dospolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "dospolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "dospolicy_stats", "obj", "=", "new", "dospolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "dos...
Use this API to fetch statistics of dospolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "dospolicy_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dos/dospolicy_stats.java#L279-L284
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java
JarWriter.writeEntry
@Override public void writeEntry(String entryName, InputStream inputStream) throws IOException { """ Writes an entry. The {@code inputStream} is closed once the entry has been written @param entryName the name of the entry @param inputStream the stream from which the entry's data can be read @throws IOExceptio...
java
@Override public void writeEntry(String entryName, InputStream inputStream) throws IOException { JarArchiveEntry entry = new JarArchiveEntry(entryName); writeEntry(entry, new InputStreamEntryWriter(inputStream, true)); }
[ "@", "Override", "public", "void", "writeEntry", "(", "String", "entryName", ",", "InputStream", "inputStream", ")", "throws", "IOException", "{", "JarArchiveEntry", "entry", "=", "new", "JarArchiveEntry", "(", "entryName", ")", ";", "writeEntry", "(", "entry", ...
Writes an entry. The {@code inputStream} is closed once the entry has been written @param entryName the name of the entry @param inputStream the stream from which the entry's data can be read @throws IOException if the write fails
[ "Writes", "an", "entry", ".", "The", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java#L167-L171
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificateIssuer
public IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes) { """ Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the ...
java
public IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes) { return updateCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName, provider, credentials, orga...
[ "public", "IssuerBundle", "updateCertificateIssuer", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ",", "String", "provider", ",", "IssuerCredentials", "credentials", ",", "OrganizationDetails", "organizationDetails", ",", "IssuerAttributes", "attributes", ")"...
Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param issuerName The name of t...
[ "Updates", "the", "specified", "certificate", "issuer", ".", "The", "UpdateCertificateIssuer", "operation", "performs", "an", "update", "on", "the", "specified", "certificate", "issuer", "entity", ".", "This", "operation", "requires", "the", "certificates", "/", "se...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6204-L6206
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/support/LettuceCdiExtension.java
LettuceCdiExtension.afterBeanDiscovery
void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) { """ Implementation of a an observer which registers beans to the CDI container for the detected RedisURIs. <p> The repository beans are associated to the EntityManagers using their qualifiers. @param beanManage...
java
void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) { int counter = 0; for (Entry<Set<Annotation>, Bean<RedisURI>> entry : redisUris.entrySet()) { Bean<RedisURI> redisUri = entry.getValue(); Set<Annotation> qualifiers = entry.getKey...
[ "void", "afterBeanDiscovery", "(", "@", "Observes", "AfterBeanDiscovery", "afterBeanDiscovery", ",", "BeanManager", "beanManager", ")", "{", "int", "counter", "=", "0", ";", "for", "(", "Entry", "<", "Set", "<", "Annotation", ">", ",", "Bean", "<", "RedisURI",...
Implementation of a an observer which registers beans to the CDI container for the detected RedisURIs. <p> The repository beans are associated to the EntityManagers using their qualifiers. @param beanManager The BeanManager instance.
[ "Implementation", "of", "a", "an", "observer", "which", "registers", "beans", "to", "the", "CDI", "container", "for", "the", "detected", "RedisURIs", ".", "<p", ">", "The", "repository", "beans", "are", "associated", "to", "the", "EntityManagers", "using", "th...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/support/LettuceCdiExtension.java#L130-L157
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.getFullUrlAsync
public Observable<EventSubscriptionFullUrlInner> getFullUrlAsync(String scope, String eventSubscriptionName) { """ Get full URL of an event subscription. Get the full endpoint URL for an event subscription. @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, ...
java
public Observable<EventSubscriptionFullUrlInner> getFullUrlAsync(String scope, String eventSubscriptionName) { return getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1<ServiceResponse<EventSubscriptionFullUrlInner>, EventSubscriptionFullUrlInner>() { @Override ...
[ "public", "Observable", "<", "EventSubscriptionFullUrlInner", ">", "getFullUrlAsync", "(", "String", "scope", ",", "String", "eventSubscriptionName", ")", "{", "return", "getFullUrlWithServiceResponseAsync", "(", "scope", ",", "eventSubscriptionName", ")", ".", "map", "...
Get full URL of an event subscription. Get the full endpoint URL for an event subscription. @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions...
[ "Get", "full", "URL", "of", "an", "event", "subscription", ".", "Get", "the", "full", "endpoint", "URL", "for", "an", "event", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L764-L771
OpenLiberty/open-liberty
dev/com.ibm.ws.persistence/src/com/ibm/wsspi/persistence/internal/eclipselink/sql/UnicodeFilteringPreparedStatement.java
UnicodeFilteringPreparedStatement.setString
@Override public void setString(int parameterIndex, @Sensitive String parameter) throws SQLException { """ Need to make sure that we don't trace / log {@code parameter} as it could contain sensitive information. """ if (!isValidString(parameter)) { // TODO -- work with consumers to mak...
java
@Override public void setString(int parameterIndex, @Sensitive String parameter) throws SQLException { if (!isValidString(parameter)) { // TODO -- work with consumers to make sure they understand this exception is coming // and make sure that it is exposed to end users in a consumabl...
[ "@", "Override", "public", "void", "setString", "(", "int", "parameterIndex", ",", "@", "Sensitive", "String", "parameter", ")", "throws", "SQLException", "{", "if", "(", "!", "isValidString", "(", "parameter", ")", ")", "{", "// TODO -- work with consumers to mak...
Need to make sure that we don't trace / log {@code parameter} as it could contain sensitive information.
[ "Need", "to", "make", "sure", "that", "we", "don", "t", "trace", "/", "log", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.persistence/src/com/ibm/wsspi/persistence/internal/eclipselink/sql/UnicodeFilteringPreparedStatement.java#L41-L50
Azure/azure-sdk-for-java
datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java
ServicesInner.beginUpdateAsync
public Observable<DataMigrationServiceInner> beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { """ Create or update DMS Service Instance. The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing se...
java
public Observable<DataMigrationServiceInner> beginUpdateAsync(String groupName, String serviceName, DataMigrationServiceInner parameters) { return beginUpdateWithServiceResponseAsync(groupName, serviceName, parameters).map(new Func1<ServiceResponse<DataMigrationServiceInner>, DataMigrationServiceInner>() { ...
[ "public", "Observable", "<", "DataMigrationServiceInner", ">", "beginUpdateAsync", "(", "String", "groupName", ",", "String", "serviceName", ",", "DataMigrationServiceInner", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "groupName", ",", "...
Create or update DMS Service Instance. The services resource is the top-level resource that represents the Data Migration Service. The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail...
[ "Create", "or", "update", "DMS", "Service", "Instance", ".", "The", "services", "resource", "is", "the", "top", "-", "level", "resource", "that", "represents", "the", "Data", "Migration", "Service", ".", "The", "PATCH", "method", "updates", "an", "existing", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L871-L878
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendClose
public static void sendClose(final CloseMessage closeMessage, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) { """ Sends a complete close message, invoking the callback when complete @param closeMessage The close message @param wsChannel The web socket channel @param callback The ca...
java
public static void sendClose(final CloseMessage closeMessage, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) { sendClose(closeMessage, wsChannel, callback, null); }
[ "public", "static", "void", "sendClose", "(", "final", "CloseMessage", "closeMessage", ",", "final", "WebSocketChannel", "wsChannel", ",", "final", "WebSocketCallback", "<", "Void", ">", "callback", ")", "{", "sendClose", "(", "closeMessage", ",", "wsChannel", ","...
Sends a complete close message, invoking the callback when complete @param closeMessage The close message @param wsChannel The web socket channel @param callback The callback to invoke on completion
[ "Sends", "a", "complete", "close", "message", "invoking", "the", "callback", "when", "complete" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L841-L843
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.shiftReactionVertical
public static Rectangle2D shiftReactionVertical(IReaction reaction, Rectangle2D bounds, Rectangle2D last, double gap) { """ Shift the containers in a reaction vertically upwards to not overlap with the reference Rectangle2D. The shift is such that the given gap is realized, but only if the reactions are actually...
java
public static Rectangle2D shiftReactionVertical(IReaction reaction, Rectangle2D bounds, Rectangle2D last, double gap) { // determine if the reactions are overlapping if (last.getMaxY() + gap >= bounds.getMinY()) { double yShift = bounds.getHeight() + last.getHeight() + gap; Vecto...
[ "public", "static", "Rectangle2D", "shiftReactionVertical", "(", "IReaction", "reaction", ",", "Rectangle2D", "bounds", ",", "Rectangle2D", "last", ",", "double", "gap", ")", "{", "// determine if the reactions are overlapping", "if", "(", "last", ".", "getMaxY", "(",...
Shift the containers in a reaction vertically upwards to not overlap with the reference Rectangle2D. The shift is such that the given gap is realized, but only if the reactions are actually overlapping. @param reaction the reaction to shift @param bounds the bounds of the reaction to shift @param last the bounds...
[ "Shift", "the", "containers", "in", "a", "reaction", "vertically", "upwards", "to", "not", "overlap", "with", "the", "reference", "Rectangle2D", ".", "The", "shift", "is", "such", "that", "the", "given", "gap", "is", "realized", "but", "only", "if", "the", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L1709-L1723
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.buildProject
public BuildProject buildProject(String name, String reference, Map<String, Object> attributes) { """ Create a new Build Project with a name and reference. @param name Initial name. @param reference Reference value. @param attributes additional attributes for the BuildProject. @return A newly minted B...
java
public BuildProject buildProject(String name, String reference, Map<String, Object> attributes) { BuildProject buildProject = new BuildProject(instance); buildProject.setName(name); buildProject.setReference(reference); addAttributes(buildProject, attributes); buildProject.save(...
[ "public", "BuildProject", "buildProject", "(", "String", "name", ",", "String", "reference", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "BuildProject", "buildProject", "=", "new", "BuildProject", "(", "instance", ")", ";", "buildPro...
Create a new Build Project with a name and reference. @param name Initial name. @param reference Reference value. @param attributes additional attributes for the BuildProject. @return A newly minted Build Project that exists in the VersionOne system.
[ "Create", "a", "new", "Build", "Project", "with", "a", "name", "and", "reference", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L878-L886
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
SubWriterHolderWriter.addClassContentTree
public void addClassContentTree(Content contentTree, Content classContentTree) { """ Add the class content tree. @param contentTree content tree to which the class content will be added @param classContentTree class content tree which will be added to the content tree """ if (configuration.allowTag...
java
public void addClassContentTree(Content contentTree, Content classContentTree) { if (configuration.allowTag(HtmlTag.MAIN)) { mainTree.addContent(classContentTree); contentTree.addContent(mainTree); } else { contentTree.addContent(classContentTree); } }
[ "public", "void", "addClassContentTree", "(", "Content", "contentTree", ",", "Content", "classContentTree", ")", "{", "if", "(", "configuration", ".", "allowTag", "(", "HtmlTag", ".", "MAIN", ")", ")", "{", "mainTree", ".", "addContent", "(", "classContentTree",...
Add the class content tree. @param contentTree content tree to which the class content will be added @param classContentTree class content tree which will be added to the content tree
[ "Add", "the", "class", "content", "tree", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java#L276-L283
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.tagsMembersGetblacklist
public static GetblacklistResult tagsMembersGetblacklist(String access_token,String begin_openid) { """ 黑名单管理 获取公众号的黑名单列表<br> 该接口每次调用最多可拉取 10000 个OpenID,当列表数较多时,可以通过多次拉取的方式来满足需求。 @since 2.8.1 @param access_token access_token @param begin_openid 当 begin_openid 为空时,默认从开头拉取。 @return result """ String json ...
java
public static GetblacklistResult tagsMembersGetblacklist(String access_token,String begin_openid){ String json = String.format("{\"begin_openid\":\"%s\"}",begin_openid == null?"":begin_openid); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI+"/cgi-bi...
[ "public", "static", "GetblacklistResult", "tagsMembersGetblacklist", "(", "String", "access_token", ",", "String", "begin_openid", ")", "{", "String", "json", "=", "String", ".", "format", "(", "\"{\\\"begin_openid\\\":\\\"%s\\\"}\"", ",", "begin_openid", "==", "null", ...
黑名单管理 获取公众号的黑名单列表<br> 该接口每次调用最多可拉取 10000 个OpenID,当列表数较多时,可以通过多次拉取的方式来满足需求。 @since 2.8.1 @param access_token access_token @param begin_openid 当 begin_openid 为空时,默认从开头拉取。 @return result
[ "黑名单管理", "获取公众号的黑名单列表<br", ">", "该接口每次调用最多可拉取", "10000", "个OpenID,当列表数较多时,可以通过多次拉取的方式来满足需求。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L431-L440
ulisesbocchio/spring-boot-security-saml
spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/configurer/builder/KeyManagerConfigurer.java
KeyManagerConfigurer.keyPassword
public KeyManagerConfigurer keyPassword(String key, String password) { """ Alternative to {@link #keyPasswords} when only 1 (one) key is present in the {@link KeyStore}. <p> Alternatively use property: <pre> saml.sso.key-manager.key-passwords </pre> </p> @param key the key name. @param password the ...
java
public KeyManagerConfigurer keyPassword(String key, String password) { if (keyPasswords == null) { keyPasswords = new HashMap<>(); } keyPasswords.put(key, password); return this; }
[ "public", "KeyManagerConfigurer", "keyPassword", "(", "String", "key", ",", "String", "password", ")", "{", "if", "(", "keyPasswords", "==", "null", ")", "{", "keyPasswords", "=", "new", "HashMap", "<>", "(", ")", ";", "}", "keyPasswords", ".", "put", "(",...
Alternative to {@link #keyPasswords} when only 1 (one) key is present in the {@link KeyStore}. <p> Alternatively use property: <pre> saml.sso.key-manager.key-passwords </pre> </p> @param key the key name. @param password the key password. @return this configurer for further customization
[ "Alternative", "to", "{", "@link", "#keyPasswords", "}", "when", "only", "1", "(", "one", ")", "key", "is", "present", "in", "the", "{", "@link", "KeyStore", "}", ".", "<p", ">", "Alternatively", "use", "property", ":", "<pre", ">", "saml", ".", "sso",...
train
https://github.com/ulisesbocchio/spring-boot-security-saml/blob/63596fe9b4b5504053392b9ee9a925b9a77644d4/spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/configurer/builder/KeyManagerConfigurer.java#L231-L237
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.listAsync
public Observable<FeaturesResponseObject> listAsync(UUID appId, String versionId, ListFeaturesOptionalParameter listOptionalParameter) { """ Gets all the extraction features for the specified application version. @param appId The application ID. @param versionId The version ID. @param listOptionalParameter th...
java
public Observable<FeaturesResponseObject> listAsync(UUID appId, String versionId, ListFeaturesOptionalParameter listOptionalParameter) { return listWithServiceResponseAsync(appId, versionId, listOptionalParameter).map(new Func1<ServiceResponse<FeaturesResponseObject>, FeaturesResponseObject>() { @Ov...
[ "public", "Observable", "<", "FeaturesResponseObject", ">", "listAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListFeaturesOptionalParameter", "listOptionalParameter", ")", "{", "return", "listWithServiceResponseAsync", "(", "appId", ",", "versionId", ...
Gets all the extraction features for the specified application version. @param appId The application ID. @param versionId The version ID. @param listOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Gets", "all", "the", "extraction", "features", "for", "the", "specified", "application", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java#L406-L413
lessthanoptimal/ejml
main/ejml-simple/src/org/ejml/simple/SimpleBase.java
SimpleBase.set
public void set( int index , double value ) { """ Assigns an element a value based on its index in the internal array.. @param index The matrix element that is being assigned a value. @param value The element's new value. """ if( mat.getType() == MatrixType.DDRM ) { ((DMatrixRMaj) mat)....
java
public void set( int index , double value ) { if( mat.getType() == MatrixType.DDRM ) { ((DMatrixRMaj) mat).set(index, value); } else if( mat.getType() == MatrixType.FDRM ) { ((FMatrixRMaj) mat).set(index, (float)value); } else { throw new RuntimeException("Not...
[ "public", "void", "set", "(", "int", "index", ",", "double", "value", ")", "{", "if", "(", "mat", ".", "getType", "(", ")", "==", "MatrixType", ".", "DDRM", ")", "{", "(", "(", "DMatrixRMaj", ")", "mat", ")", ".", "set", "(", "index", ",", "value...
Assigns an element a value based on its index in the internal array.. @param index The matrix element that is being assigned a value. @param value The element's new value.
[ "Assigns", "an", "element", "a", "value", "based", "on", "its", "index", "in", "the", "internal", "array", ".." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleBase.java#L625-L633
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/AbstractMappingHTTPResponseHandler.java
AbstractMappingHTTPResponseHandler.findValue
protected String findValue(T object,String path) { """ This function returns the requested value from the object data.<br> The path is a set of key names seperated by ';'. @param object The object holding all the data @param path The path to the value (elements seperated by ;) @return The value (null ...
java
protected String findValue(T object,String path) { String value=null; if((path!=null)&&(object!=null)) { //find value value=this.findValueImpl(object,path); if(value!=null) { value=value.trim(); if(value.length(...
[ "protected", "String", "findValue", "(", "T", "object", ",", "String", "path", ")", "{", "String", "value", "=", "null", ";", "if", "(", "(", "path", "!=", "null", ")", "&&", "(", "object", "!=", "null", ")", ")", "{", "//find value", "value", "=", ...
This function returns the requested value from the object data.<br> The path is a set of key names seperated by ';'. @param object The object holding all the data @param path The path to the value (elements seperated by ;) @return The value (null if not found)
[ "This", "function", "returns", "the", "requested", "value", "from", "the", "object", "data", ".", "<br", ">", "The", "path", "is", "a", "set", "of", "key", "names", "seperated", "by", ";", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/AbstractMappingHTTPResponseHandler.java#L259-L278
vlingo/vlingo-wire
src/main/java/io/vlingo/wire/message/Converters.java
Converters.toRawMessage
public static RawMessage toRawMessage(final short sendingNodeId, final ByteBuffer buffer) { """ Uses buffer.flip() and then buffer.clear() @param sendingNodeId short @param buffer ByteBuffer @return RawMessage """ buffer.flip(); final RawMessage message = new RawMessage(buffer.limit()); messag...
java
public static RawMessage toRawMessage(final short sendingNodeId, final ByteBuffer buffer) { buffer.flip(); final RawMessage message = new RawMessage(buffer.limit()); message.put(buffer, false); buffer.clear(); final RawMessageHeader header = new RawMessageHeader(sendingNodeId, (short) 0, (short)...
[ "public", "static", "RawMessage", "toRawMessage", "(", "final", "short", "sendingNodeId", ",", "final", "ByteBuffer", "buffer", ")", "{", "buffer", ".", "flip", "(", ")", ";", "final", "RawMessage", "message", "=", "new", "RawMessage", "(", "buffer", ".", "l...
Uses buffer.flip() and then buffer.clear() @param sendingNodeId short @param buffer ByteBuffer @return RawMessage
[ "Uses", "buffer", ".", "flip", "()", "and", "then", "buffer", ".", "clear", "()" ]
train
https://github.com/vlingo/vlingo-wire/blob/3980e3b257ddfb80a6ccae7f60cb67d7f53560c4/src/main/java/io/vlingo/wire/message/Converters.java#L34-L48
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/util/ImageIOHelper.java
ImageIOHelper.createTiffFiles
public static List<File> createTiffFiles(File imageFile, int index) throws IOException { """ Creates a list of TIFF image files from an image file. It basically converts images of other formats to TIFF format, or a multi-page TIFF image to multiple TIFF image files. @param imageFile input image file @param i...
java
public static List<File> createTiffFiles(File imageFile, int index) throws IOException { return createTiffFiles(imageFile, index, false); }
[ "public", "static", "List", "<", "File", ">", "createTiffFiles", "(", "File", "imageFile", ",", "int", "index", ")", "throws", "IOException", "{", "return", "createTiffFiles", "(", "imageFile", ",", "index", ",", "false", ")", ";", "}" ]
Creates a list of TIFF image files from an image file. It basically converts images of other formats to TIFF format, or a multi-page TIFF image to multiple TIFF image files. @param imageFile input image file @param index an index of the page; -1 means all pages, as in a multi-page TIFF image @return a list of TIFF ima...
[ "Creates", "a", "list", "of", "TIFF", "image", "files", "from", "an", "image", "file", ".", "It", "basically", "converts", "images", "of", "other", "formats", "to", "TIFF", "format", "or", "a", "multi", "-", "page", "TIFF", "image", "to", "multiple", "TI...
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/ImageIOHelper.java#L79-L81
cdapio/tephra
tephra-hbase-compat-1.0/src/main/java/co/cask/tephra/hbase10/coprocessor/TransactionFilters.java
TransactionFilters.getVisibilityFilter
public static Filter getVisibilityFilter(Transaction tx, Map<byte[], Long> ttlByFamily, boolean allowEmptyValues, ScanType scanType) { """ Creates a new {@link org.apache.hadoop.hbase.filter.Filter} for returning data only from visible transactions. @param tx the curre...
java
public static Filter getVisibilityFilter(Transaction tx, Map<byte[], Long> ttlByFamily, boolean allowEmptyValues, ScanType scanType) { return new CellSkipFilter(new TransactionVisibilityFilter(tx, ttlByFamily, allowEmptyValues, scanType, null)); }
[ "public", "static", "Filter", "getVisibilityFilter", "(", "Transaction", "tx", ",", "Map", "<", "byte", "[", "]", ",", "Long", ">", "ttlByFamily", ",", "boolean", "allowEmptyValues", ",", "ScanType", "scanType", ")", "{", "return", "new", "CellSkipFilter", "("...
Creates a new {@link org.apache.hadoop.hbase.filter.Filter} for returning data only from visible transactions. @param tx the current transaction to apply. Only data visible to this transaction will be returned. @param ttlByFamily map of time-to-live (TTL) (in milliseconds) by column family name @param allowEmptyValue...
[ "Creates", "a", "new", "{", "@link", "org", ".", "apache", ".", "hadoop", ".", "hbase", ".", "filter", ".", "Filter", "}", "for", "returning", "data", "only", "from", "visible", "transactions", "." ]
train
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-hbase-compat-1.0/src/main/java/co/cask/tephra/hbase10/coprocessor/TransactionFilters.java#L39-L42
SonarSource/sonarqube
sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java
PluginClassloaderFactory.apiMask
private static Mask apiMask() { """ The resources (packages) that API exposes to plugins. Other core classes (SonarQube, MyBatis, ...) can't be accessed. <p>To sum-up, these are the classes packaged in sonar-plugin-api.jar or available as a transitive dependency of sonar-plugin-api</p> """ return new Ma...
java
private static Mask apiMask() { return new Mask() .addInclusion("org/sonar/api/") .addInclusion("org/sonar/check/") .addInclusion("org/codehaus/stax2/") .addInclusion("org/codehaus/staxmate/") .addInclusion("com/ctc/wstx/") .addInclusion("org/slf4j/") // SLF4J bridges. Do ...
[ "private", "static", "Mask", "apiMask", "(", ")", "{", "return", "new", "Mask", "(", ")", ".", "addInclusion", "(", "\"org/sonar/api/\"", ")", ".", "addInclusion", "(", "\"org/sonar/check/\"", ")", ".", "addInclusion", "(", "\"org/codehaus/stax2/\"", ")", ".", ...
The resources (packages) that API exposes to plugins. Other core classes (SonarQube, MyBatis, ...) can't be accessed. <p>To sum-up, these are the classes packaged in sonar-plugin-api.jar or available as a transitive dependency of sonar-plugin-api</p>
[ "The", "resources", "(", "packages", ")", "that", "API", "exposes", "to", "plugins", ".", "Other", "core", "classes", "(", "SonarQube", "MyBatis", "...", ")", "can", "t", "be", "accessed", ".", "<p", ">", "To", "sum", "-", "up", "these", "are", "the", ...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java#L123-L148
liuyukuai/commons
commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateTimeUtil.java
LocalDateTimeUtil.format
public static String format(TemporalAccessor localDate, String pattern) { """ 格式化时间 @param localDate 时间 @param pattern 时间格式 @return 时间字符串 """ return DateTimeFormatter.ofPattern(pattern).format(localDate); }
java
public static String format(TemporalAccessor localDate, String pattern) { return DateTimeFormatter.ofPattern(pattern).format(localDate); }
[ "public", "static", "String", "format", "(", "TemporalAccessor", "localDate", ",", "String", "pattern", ")", "{", "return", "DateTimeFormatter", ".", "ofPattern", "(", "pattern", ")", ".", "format", "(", "localDate", ")", ";", "}" ]
格式化时间 @param localDate 时间 @param pattern 时间格式 @return 时间字符串
[ "格式化时间" ]
train
https://github.com/liuyukuai/commons/blob/ba67eddb542446b12f419f1866dbaa82e47fbf35/commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateTimeUtil.java#L104-L106
pravega/pravega
common/src/main/java/io/pravega/common/io/StreamHelpers.java
StreamHelpers.readAll
public static int readAll(InputStream stream, byte[] target, int startOffset, int maxLength) throws IOException { """ Reads at most 'maxLength' bytes from the given input stream, as long as the stream still has data to serve. @param stream The InputStream to read from. @param target The target array ...
java
public static int readAll(InputStream stream, byte[] target, int startOffset, int maxLength) throws IOException { Preconditions.checkNotNull(stream, "stream"); Preconditions.checkNotNull(stream, "target"); Preconditions.checkElementIndex(startOffset, target.length, "startOffset"); Except...
[ "public", "static", "int", "readAll", "(", "InputStream", "stream", ",", "byte", "[", "]", "target", ",", "int", "startOffset", ",", "int", "maxLength", ")", "throws", "IOException", "{", "Preconditions", ".", "checkNotNull", "(", "stream", ",", "\"stream\"", ...
Reads at most 'maxLength' bytes from the given input stream, as long as the stream still has data to serve. @param stream The InputStream to read from. @param target The target array to write data to. @param startOffset The offset within the target array to start writing data to. @param maxLength The maxim...
[ "Reads", "at", "most", "maxLength", "bytes", "from", "the", "given", "input", "stream", "as", "long", "as", "the", "stream", "still", "has", "data", "to", "serve", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/io/StreamHelpers.java#L32-L50
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkChecker.java
CloudSdkChecker.checkCloudSdk
public void checkCloudSdk(CloudSdk cloudSdk, String version) throws CloudSdkVersionFileException, CloudSdkNotFoundException, CloudSdkOutOfDateException { """ Validates the cloud SDK installation @param cloudSdk CloudSdk with a configured sdk home directory """ if (!version.equals(cloudSdk.getVersi...
java
public void checkCloudSdk(CloudSdk cloudSdk, String version) throws CloudSdkVersionFileException, CloudSdkNotFoundException, CloudSdkOutOfDateException { if (!version.equals(cloudSdk.getVersion().toString())) { throw new RuntimeException( "Specified Cloud SDK version (" + version...
[ "public", "void", "checkCloudSdk", "(", "CloudSdk", "cloudSdk", ",", "String", "version", ")", "throws", "CloudSdkVersionFileException", ",", "CloudSdkNotFoundException", ",", "CloudSdkOutOfDateException", "{", "if", "(", "!", "version", ".", "equals", "(", "cloudSdk"...
Validates the cloud SDK installation @param cloudSdk CloudSdk with a configured sdk home directory
[ "Validates", "the", "cloud", "SDK", "installation" ]
train
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/CloudSdkChecker.java#L32-L44
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java
DefaultAnnotationMetadata.contributeDefaults
@Internal public static void contributeDefaults(AnnotationMetadata target, AnnotationMetadata source) { """ Contributes defaults to the given target. <p>WARNING: for internal use only be the framework</p> @param target The target @param source The source """ if (target instanceof DefaultAnnota...
java
@Internal public static void contributeDefaults(AnnotationMetadata target, AnnotationMetadata source) { if (target instanceof DefaultAnnotationMetadata && source instanceof DefaultAnnotationMetadata) { final Map<String, Map<CharSequence, Object>> existingDefaults = ((DefaultAnnotationMetadata) t...
[ "@", "Internal", "public", "static", "void", "contributeDefaults", "(", "AnnotationMetadata", "target", ",", "AnnotationMetadata", "source", ")", "{", "if", "(", "target", "instanceof", "DefaultAnnotationMetadata", "&&", "source", "instanceof", "DefaultAnnotationMetadata"...
Contributes defaults to the given target. <p>WARNING: for internal use only be the framework</p> @param target The target @param source The source
[ "Contributes", "defaults", "to", "the", "given", "target", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/DefaultAnnotationMetadata.java#L935-L948
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByCreatedDate
public Iterable<DUser> queryByCreatedDate(java.util.Date createdDate) { """ query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of DUsers for the specified createdDate """ return queryByField(null, DUserMapper.Field.CREATEDDATE.getFieldName(), createdDate)...
java
public Iterable<DUser> queryByCreatedDate(java.util.Date createdDate) { return queryByField(null, DUserMapper.Field.CREATEDDATE.getFieldName(), createdDate); }
[ "public", "Iterable", "<", "DUser", ">", "queryByCreatedDate", "(", "java", ".", "util", ".", "Date", "createdDate", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "CREATEDDATE", ".", "getFieldName", "(", ")", ",", ...
query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of DUsers for the specified createdDate
[ "query", "-", "by", "method", "for", "field", "createdDate" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L124-L126
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java
HttpContext.doGet
public String doGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { """ Perform an HTTP GET at the given path returning the results of the response. @param host The hostname of the reques...
java
public String doGet(String host, String path, int port, Map<String, String> headers, int timeout) throws UnknownHostException, ConnectException, IOException { return doHttpCall(host, path, null, port, headers, timeout, false); }
[ "public", "String", "doGet", "(", "String", "host", ",", "String", "path", ",", "int", "port", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "int", "timeout", ")", "throws", "UnknownHostException", ",", "ConnectException", ",", "IOException"...
Perform an HTTP GET at the given path returning the results of the response. @param host The hostname of the request @param path The path of the request @param port The port of the request @param headers The headers to pass in the request @param timeout The timeout of the request in milliseconds @return The data of t...
[ "Perform", "an", "HTTP", "GET", "at", "the", "given", "path", "returning", "the", "results", "of", "the", "response", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/HttpContext.java#L60-L65
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/DeleteQuery.java
DeleteQuery.exec
@Override public void exec(Result<Object> result, Object ...args) { """ /* @Override public int partitionHash(Object[] args) { if (_keyExpr == null) { return -1; } return _keyExpr.partitionHash(args); } """ TableKelp tableKelp = _table.getTableKelp(); RowCursor minCursor = tableKelp.cu...
java
@Override public void exec(Result<Object> result, Object ...args) { TableKelp tableKelp = _table.getTableKelp(); RowCursor minCursor = tableKelp.cursor(); RowCursor maxCursor = tableKelp.cursor(); minCursor.clear(); maxCursor.setKeyMax(); _keyExpr.fillMinCursor(minCursor, args...
[ "@", "Override", "public", "void", "exec", "(", "Result", "<", "Object", ">", "result", ",", "Object", "...", "args", ")", "{", "TableKelp", "tableKelp", "=", "_table", ".", "getTableKelp", "(", ")", ";", "RowCursor", "minCursor", "=", "tableKelp", ".", ...
/* @Override public int partitionHash(Object[] args) { if (_keyExpr == null) { return -1; } return _keyExpr.partitionHash(args); }
[ "/", "*", "@Override", "public", "int", "partitionHash", "(", "Object", "[]", "args", ")", "{", "if", "(", "_keyExpr", "==", "null", ")", "{", "return", "-", "1", ";", "}" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/DeleteQuery.java#L97-L129
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java
ApiOvhDedicatednasha.serviceName_partition_partitionName_snapshot_snapshotType_GET
public OvhSnapshot serviceName_partition_partitionName_snapshot_snapshotType_GET(String serviceName, String partitionName, net.minidev.ovh.api.dedicated.storage.OvhSnapshotEnum snapshotType) throws IOException { """ Get this object properties REST: GET /dedicated/nasha/{serviceName}/partition/{partitionName}/sn...
java
public OvhSnapshot serviceName_partition_partitionName_snapshot_snapshotType_GET(String serviceName, String partitionName, net.minidev.ovh.api.dedicated.storage.OvhSnapshotEnum snapshotType) throws IOException { String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/snapshot/{snapshotType}"; Strin...
[ "public", "OvhSnapshot", "serviceName_partition_partitionName_snapshot_snapshotType_GET", "(", "String", "serviceName", ",", "String", "partitionName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "dedicated", ".", "storage", ".", "OvhSnapshotEnum", "snapsho...
Get this object properties REST: GET /dedicated/nasha/{serviceName}/partition/{partitionName}/snapshot/{snapshotType} @param serviceName [required] The internal name of your storage @param partitionName [required] the given name of partition @param snapshotType [required] the interval of snapshot
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java#L296-L301
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/FilterableTableExample.java
FilterableTableExample.buildColumnHeader
private WDecoratedLabel buildColumnHeader(final String text, final WMenu menu) { """ Helper to create the table column heading's WDecoratedLabel. @param text The readable text content of the column header @param menu The WMenu we want in this column header. @return WDecoratedLabel used to create a column head...
java
private WDecoratedLabel buildColumnHeader(final String text, final WMenu menu) { WDecoratedLabel label = new WDecoratedLabel(null, new WText(text), menu); return label; }
[ "private", "WDecoratedLabel", "buildColumnHeader", "(", "final", "String", "text", ",", "final", "WMenu", "menu", ")", "{", "WDecoratedLabel", "label", "=", "new", "WDecoratedLabel", "(", "null", ",", "new", "WText", "(", "text", ")", ",", "menu", ")", ";", ...
Helper to create the table column heading's WDecoratedLabel. @param text The readable text content of the column header @param menu The WMenu we want in this column header. @return WDecoratedLabel used to create a column heading.
[ "Helper", "to", "create", "the", "table", "column", "heading", "s", "WDecoratedLabel", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/FilterableTableExample.java#L152-L155
lucastheisen/jsch-extension
src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java
TunnelConnection.getTunnel
public Tunnel getTunnel( String destinationHostname, int destinationPort ) { """ Returns the tunnel matching the supplied values, or <code>null</code> if there isn't one that matches. @param destinationHostname The tunnels destination hostname @param destinationPort The tunnels destination port @return T...
java
public Tunnel getTunnel( String destinationHostname, int destinationPort ) { return tunnelsByDestination.get( hostnamePortKey( destinationHostname, destinationPort ) ); }
[ "public", "Tunnel", "getTunnel", "(", "String", "destinationHostname", ",", "int", "destinationPort", ")", "{", "return", "tunnelsByDestination", ".", "get", "(", "hostnamePortKey", "(", "destinationHostname", ",", "destinationPort", ")", ")", ";", "}" ]
Returns the tunnel matching the supplied values, or <code>null</code> if there isn't one that matches. @param destinationHostname The tunnels destination hostname @param destinationPort The tunnels destination port @return The tunnel matching the supplied values
[ "Returns", "the", "tunnel", "matching", "the", "supplied", "values", "or", "<code", ">", "null<", "/", "code", ">", "if", "there", "isn", "t", "one", "that", "matches", "." ]
train
https://github.com/lucastheisen/jsch-extension/blob/3c5bfae84d63e8632828a10721f2e605b68d749a/src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java#L113-L116
milaboratory/milib
src/main/java/com/milaboratory/core/clustering/Clustering.java
Clustering.getComparatorOfObjectsRegardingSequences
static <T, S extends Sequence> Comparator<T> getComparatorOfObjectsRegardingSequences(final Comparator<T> objectComparator, final SequenceExtractor<T, S> extractor) { """ First REVERSE compare objects (bigger objects comes first), if equal, REVERSE compare object sequence. """ return new Comparator...
java
static <T, S extends Sequence> Comparator<T> getComparatorOfObjectsRegardingSequences(final Comparator<T> objectComparator, final SequenceExtractor<T, S> extractor) { return new Comparator<T>() { @Override public int compare(T o1, T o2) { int i = objectComparator.comp...
[ "static", "<", "T", ",", "S", "extends", "Sequence", ">", "Comparator", "<", "T", ">", "getComparatorOfObjectsRegardingSequences", "(", "final", "Comparator", "<", "T", ">", "objectComparator", ",", "final", "SequenceExtractor", "<", "T", ",", "S", ">", "extra...
First REVERSE compare objects (bigger objects comes first), if equal, REVERSE compare object sequence.
[ "First", "REVERSE", "compare", "objects", "(", "bigger", "objects", "comes", "first", ")", "if", "equal", "REVERSE", "compare", "object", "sequence", "." ]
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/clustering/Clustering.java#L246-L257
jbehave/jbehave-core
jbehave-core/src/main/java/org/jbehave/core/steps/StepCreator.java
StepCreator.parameterNames
private ParameterName[] parameterNames(Method method) { """ Returns the {@link ParameterName} representations for the method, providing an abstraction that supports both annotated and non-annotated parameters. @param method the Method @return The array of {@link ParameterName}s """ ParameterName[...
java
private ParameterName[] parameterNames(Method method) { ParameterName[] parameterNames; if (method != null) { String[] annotatedNames = annotatedParameterNames(method); String[] paranamerNames = paranamerParameterNames(method); String[] contextNames = contextParameter...
[ "private", "ParameterName", "[", "]", "parameterNames", "(", "Method", "method", ")", "{", "ParameterName", "[", "]", "parameterNames", ";", "if", "(", "method", "!=", "null", ")", "{", "String", "[", "]", "annotatedNames", "=", "annotatedParameterNames", "(",...
Returns the {@link ParameterName} representations for the method, providing an abstraction that supports both annotated and non-annotated parameters. @param method the Method @return The array of {@link ParameterName}s
[ "Returns", "the", "{", "@link", "ParameterName", "}", "representations", "for", "the", "method", "providing", "an", "abstraction", "that", "supports", "both", "annotated", "and", "non", "-", "annotated", "parameters", "." ]
train
https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-core/src/main/java/org/jbehave/core/steps/StepCreator.java#L138-L157
jayantk/jklol
src/com/jayantkrish/jklol/ccg/chart/CcgLeftToRightChart.java
CcgLeftToRightChart.offerEntry
private final void offerEntry(ChartEntry entry, double probability, int spanStart, int spanEnd) { """ Adds a chart entry to the heap for {@code spanStart} to {@code spanEnd}. This operation preserves existing chart entry indexes and automatically resizes any arrays to fit the new entry. """ int nextEntr...
java
private final void offerEntry(ChartEntry entry, double probability, int spanStart, int spanEnd) { int nextEntryIndex = chartSizes[spanStart][spanEnd]; if (nextEntryIndex == chart[spanStart][spanEnd].length) { // Resize the arrays to fit the new entry. ChartEntry[] spanChart = chart[spanStart][spanEn...
[ "private", "final", "void", "offerEntry", "(", "ChartEntry", "entry", ",", "double", "probability", ",", "int", "spanStart", ",", "int", "spanEnd", ")", "{", "int", "nextEntryIndex", "=", "chartSizes", "[", "spanStart", "]", "[", "spanEnd", "]", ";", "if", ...
Adds a chart entry to the heap for {@code spanStart} to {@code spanEnd}. This operation preserves existing chart entry indexes and automatically resizes any arrays to fit the new entry.
[ "Adds", "a", "chart", "entry", "to", "the", "heap", "for", "{" ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/chart/CcgLeftToRightChart.java#L201-L215
bmwcarit/joynr
java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java
AbstractSubscriptionPublisher.registerBroadcastListener
@Override public void registerBroadcastListener(String broadcastName, BroadcastListener broadcastListener) { """ Registers a broadcast listener that gets notified in case the broadcast is fired. @param broadcastName the broadcast name as defined in the Franca model to subscribe to. @param broadcastLi...
java
@Override public void registerBroadcastListener(String broadcastName, BroadcastListener broadcastListener) { broadcastListeners.putIfAbsent(broadcastName, new ArrayList<BroadcastListener>()); List<BroadcastListener> listeners = broadcastListeners.get(broadcastName); synchronized (listeners) ...
[ "@", "Override", "public", "void", "registerBroadcastListener", "(", "String", "broadcastName", ",", "BroadcastListener", "broadcastListener", ")", "{", "broadcastListeners", ".", "putIfAbsent", "(", "broadcastName", ",", "new", "ArrayList", "<", "BroadcastListener", ">...
Registers a broadcast listener that gets notified in case the broadcast is fired. @param broadcastName the broadcast name as defined in the Franca model to subscribe to. @param broadcastListener the listener to add.
[ "Registers", "a", "broadcast", "listener", "that", "gets", "notified", "in", "case", "the", "broadcast", "is", "fired", "." ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java#L169-L176
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addConstraintsDecimalMinMessage
public FessMessages addConstraintsDecimalMinMessage(String property, String value) { """ Add the created action message for the key 'constraints.DecimalMin.message' with parameters. <pre> message: {item} must be greater than ${inclusive == true ? 'or equal to ' : ''}{value}. </pre> @param property The property...
java
public FessMessages addConstraintsDecimalMinMessage(String property, String value) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_DecimalMin_MESSAGE, value)); return this; }
[ "public", "FessMessages", "addConstraintsDecimalMinMessage", "(", "String", "property", ",", "String", "value", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "CONSTRAINTS_DecimalMin_MESSAGE", ",",...
Add the created action message for the key 'constraints.DecimalMin.message' with parameters. <pre> message: {item} must be greater than ${inclusive == true ? 'or equal to ' : ''}{value}. </pre> @param property The property name for the message. (NotNull) @param value The parameter value for message. (NotNull) @return t...
[ "Add", "the", "created", "action", "message", "for", "the", "key", "constraints", ".", "DecimalMin", ".", "message", "with", "parameters", ".", "<pre", ">", "message", ":", "{", "item", "}", "must", "be", "greater", "than", "$", "{", "inclusive", "==", "...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L651-L655
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/train/MarginalLogLikelihood.java
MarginalLogLikelihood.addExpectedPartials
static void addExpectedPartials(FactorGraph fg, FgInferencer inferencer, double multiplier, IFgModel gradient) { """ Computes the expected partials (i.e. feature counts for exponential family factors) for a factor graph, and adds them to the gradient after scaling them. @param fg The factor graph. @param infe...
java
static void addExpectedPartials(FactorGraph fg, FgInferencer inferencer, double multiplier, IFgModel gradient) { // For each factor... for (int factorId=0; factorId<fg.getNumFactors(); factorId++) { Factor f = fg.getFactor(factorId); if (f instanceof GlobalFactor) { ...
[ "static", "void", "addExpectedPartials", "(", "FactorGraph", "fg", ",", "FgInferencer", "inferencer", ",", "double", "multiplier", ",", "IFgModel", "gradient", ")", "{", "// For each factor...", "for", "(", "int", "factorId", "=", "0", ";", "factorId", "<", "fg"...
Computes the expected partials (i.e. feature counts for exponential family factors) for a factor graph, and adds them to the gradient after scaling them. @param fg The factor graph. @param inferencer The inferencer for a clamped factor graph, which has already been run. @param multiplier The value which the expected p...
[ "Computes", "the", "expected", "partials", "(", "i", ".", "e", ".", "feature", "counts", "for", "exponential", "family", "factors", ")", "for", "a", "factor", "graph", "and", "adds", "them", "to", "the", "gradient", "after", "scaling", "them", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/train/MarginalLogLikelihood.java#L230-L241
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java
BinaryEllipseDetectorPixel.undistortContour
void undistortContour(List<Point2D_I32> external, FastQueue<Point2D_F64> pointsF ) { """ Undistort the contour points and convert into a floating point format for the fitting operation @param external The external contour @param pointsF Output of converted points """ for (int j = 0; j < external.size(); ...
java
void undistortContour(List<Point2D_I32> external, FastQueue<Point2D_F64> pointsF ) { for (int j = 0; j < external.size(); j++) { Point2D_I32 p = external.get(j); if( distToUndist != null ) { distToUndist.compute(p.x,p.y,distortedPoint); pointsF.grow().set( distortedPoint.x , distortedPoint.y ); } el...
[ "void", "undistortContour", "(", "List", "<", "Point2D_I32", ">", "external", ",", "FastQueue", "<", "Point2D_F64", ">", "pointsF", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "external", ".", "size", "(", ")", ";", "j", "++", ")", "...
Undistort the contour points and convert into a floating point format for the fitting operation @param external The external contour @param pointsF Output of converted points
[ "Undistort", "the", "contour", "points", "and", "convert", "into", "a", "floating", "point", "format", "for", "the", "fitting", "operation" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetectorPixel.java#L239-L250
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionVaultsInner.java
BackupLongTermRetentionVaultsInner.beginCreateOrUpdate
public BackupLongTermRetentionVaultInner beginCreateOrUpdate(String resourceGroupName, String serverName, String recoveryServicesVaultResourceId) { """ Updates a server backup long term retention vault. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value...
java
public BackupLongTermRetentionVaultInner beginCreateOrUpdate(String resourceGroupName, String serverName, String recoveryServicesVaultResourceId) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, recoveryServicesVaultResourceId).toBlocking().single().body(); }
[ "public", "BackupLongTermRetentionVaultInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "recoveryServicesVaultResourceId", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",...
Updates a server backup long term retention vault. @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 recoveryServicesVaultResourceId The azure recovery service...
[ "Updates", "a", "server", "backup", "long", "term", "retention", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionVaultsInner.java#L252-L254
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AFPAlignmentDisplay.java
AFPAlignmentDisplay.getBlockNrForAlignPos
public static int getBlockNrForAlignPos(AFPChain afpChain, int aligPos) { """ get the block number for an aligned position @param afpChain @param aligPos @return """ // moved here from DisplayAFP; int blockNum = afpChain.getBlockNum(); int[] optLen = afpChain.getOptLen(); int[][][] optAln = afpC...
java
public static int getBlockNrForAlignPos(AFPChain afpChain, int aligPos){ // moved here from DisplayAFP; int blockNum = afpChain.getBlockNum(); int[] optLen = afpChain.getOptLen(); int[][][] optAln = afpChain.getOptAln(); int len = 0; int p1b=0; int p2b=0; for(int i = 0; i < blockNum; i ++) { fo...
[ "public", "static", "int", "getBlockNrForAlignPos", "(", "AFPChain", "afpChain", ",", "int", "aligPos", ")", "{", "// moved here from DisplayAFP;", "int", "blockNum", "=", "afpChain", ".", "getBlockNum", "(", ")", ";", "int", "[", "]", "optLen", "=", "afpChain",...
get the block number for an aligned position @param afpChain @param aligPos @return
[ "get", "the", "block", "number", "for", "an", "aligned", "position" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AFPAlignmentDisplay.java#L449-L489
hawkular/hawkular-alerts
engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java
AlertsEngineImpl.onTriggerChange
@Override public void onTriggerChange(Operation operation, String tenantId, String triggerId) { """ /* This listener method is invoked on distributed scenarios. When a trigger is modified, PartitionManager detects which node holds the trigger and send the event. Local node is responsible to remove/reload th...
java
@Override public void onTriggerChange(Operation operation, String tenantId, String triggerId) { log.debugf("Executing: %s tenantId: %s triggerId: %s", operation, tenantId, triggerId); switch (operation) { case ADD: case UPDATE: Trigger reloadTrigger = new Trig...
[ "@", "Override", "public", "void", "onTriggerChange", "(", "Operation", "operation", ",", "String", "tenantId", ",", "String", "triggerId", ")", "{", "log", ".", "debugf", "(", "\"Executing: %s tenantId: %s triggerId: %s\"", ",", "operation", ",", "tenantId", ",", ...
/* This listener method is invoked on distributed scenarios. When a trigger is modified, PartitionManager detects which node holds the trigger and send the event. Local node is responsible to remove/reload the trigger from AlertsEngine memory.
[ "/", "*", "This", "listener", "method", "is", "invoked", "on", "distributed", "scenarios", ".", "When", "a", "trigger", "is", "modified", "PartitionManager", "detects", "which", "node", "holds", "the", "trigger", "and", "send", "the", "event", ".", "Local", ...
train
https://github.com/hawkular/hawkular-alerts/blob/b4a0c2909b38e03e72cc1828219562ee8fcbf426/engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java#L803-L817
jenkinsci/jenkins
core/src/main/java/jenkins/model/identity/IdentityRootAction.java
IdentityRootAction.getFingerprint
public String getFingerprint() { """ Returns the fingerprint of the public key. @return the fingerprint of the public key. """ RSAPublicKey key = InstanceIdentityProvider.RSA.getPublicKey(); if (key == null) { return null; } // TODO replace with org.jenkinsci.remo...
java
public String getFingerprint() { RSAPublicKey key = InstanceIdentityProvider.RSA.getPublicKey(); if (key == null) { return null; } // TODO replace with org.jenkinsci.remoting.util.KeyUtils once JENKINS-36871 changes are merged try { MessageDigest digest = ...
[ "public", "String", "getFingerprint", "(", ")", "{", "RSAPublicKey", "key", "=", "InstanceIdentityProvider", ".", "RSA", ".", "getPublicKey", "(", ")", ";", "if", "(", "key", "==", "null", ")", "{", "return", "null", ";", "}", "// TODO replace with org.jenkins...
Returns the fingerprint of the public key. @return the fingerprint of the public key.
[ "Returns", "the", "fingerprint", "of", "the", "public", "key", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/identity/IdentityRootAction.java#L73-L95
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.rules_GET
public OvhRule rules_GET(String cartId, Long itemId) throws IOException { """ List all the rules for a specific cartId/itemId REST: GET /domain/rules @param cartId [required] Cart ID concerned for the rules @param itemId [required] Item ID concerned for the rules API beta """ String qPath = "/domain/...
java
public OvhRule rules_GET(String cartId, Long itemId) throws IOException { String qPath = "/domain/rules"; StringBuilder sb = path(qPath); query(sb, "cartId", cartId); query(sb, "itemId", itemId); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhRule.class); }
[ "public", "OvhRule", "rules_GET", "(", "String", "cartId", ",", "Long", "itemId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/rules\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", "(", "sb", ",", "\"c...
List all the rules for a specific cartId/itemId REST: GET /domain/rules @param cartId [required] Cart ID concerned for the rules @param itemId [required] Item ID concerned for the rules API beta
[ "List", "all", "the", "rules", "for", "a", "specific", "cartId", "/", "itemId" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L310-L317
jenkinsci/jenkins
core/src/main/java/hudson/util/FormValidation.java
FormValidation.validateBase64
public static FormValidation validateBase64(String value, boolean allowWhitespace, boolean allowEmpty, String errorMessage) { """ Makes sure that the given string is a base64 encoded text. @param allowWhitespace if you allow whitespace (CR,LF,etc) in base64 encoding @param allowEmpty Is empty string allowed?...
java
public static FormValidation validateBase64(String value, boolean allowWhitespace, boolean allowEmpty, String errorMessage) { try { String v = value; if(!allowWhitespace) { if(v.indexOf(' ')>=0 || v.indexOf('\n')>=0) return error(errorMessage); ...
[ "public", "static", "FormValidation", "validateBase64", "(", "String", "value", ",", "boolean", "allowWhitespace", ",", "boolean", "allowEmpty", ",", "String", "errorMessage", ")", "{", "try", "{", "String", "v", "=", "value", ";", "if", "(", "!", "allowWhites...
Makes sure that the given string is a base64 encoded text. @param allowWhitespace if you allow whitespace (CR,LF,etc) in base64 encoding @param allowEmpty Is empty string allowed? @param errorMessage Error message. @since 1.305
[ "Makes", "sure", "that", "the", "given", "string", "is", "a", "base64", "encoded", "text", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/FormValidation.java#L455-L471
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/Counter.java
Counter.setCount
public double setCount(T element, double count) { """ This method sets new counter value for given element @param element element to be updated @param count new counter value @return previous value """ AtomicDouble t = map.get(element); if (t != null) { double val = t.getAndSet...
java
public double setCount(T element, double count) { AtomicDouble t = map.get(element); if (t != null) { double val = t.getAndSet(count); dirty.set(true); return val; } else { map.put(element, new AtomicDouble(count)); totalCount.addAndGet...
[ "public", "double", "setCount", "(", "T", "element", ",", "double", "count", ")", "{", "AtomicDouble", "t", "=", "map", ".", "get", "(", "element", ")", ";", "if", "(", "t", "!=", "null", ")", "{", "double", "val", "=", "t", ".", "getAndSet", "(", ...
This method sets new counter value for given element @param element element to be updated @param count new counter value @return previous value
[ "This", "method", "sets", "new", "counter", "value", "for", "given", "element" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/Counter.java#L101-L113
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.onSetTableId
private void onSetTableId(CfDef cfDef, Properties cfProperties, StringBuilder builder) { """ On set table id. @param cfDef the cf def @param cfProperties the cf properties @param builder the builder """ String id = cfProperties.getProperty(CassandraConstants.ID); if (id != null) ...
java
private void onSetTableId(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String id = cfProperties.getProperty(CassandraConstants.ID); if (id != null) { try { if (builder != null) { // TODO::::not avai...
[ "private", "void", "onSetTableId", "(", "CfDef", "cfDef", ",", "Properties", "cfProperties", ",", "StringBuilder", "builder", ")", "{", "String", "id", "=", "cfProperties", ".", "getProperty", "(", "CassandraConstants", ".", "ID", ")", ";", "if", "(", "id", ...
On set table id. @param cfDef the cf def @param cfProperties the cf properties @param builder the builder
[ "On", "set", "table", "id", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2530-L2552
landawn/AbacusUtil
src/com/landawn/abacus/util/CodeGenerator.java
CodeGenerator.writeClassMethod
public static void writeClassMethod(final File srcDir, final Class<?> cls) { """ Write the generated methods by the fields defined the in specified class to the source file. <br /> Add below comments to specified the section where the generated methods should be written to <pre> =====> <===== </pre> @...
java
public static void writeClassMethod(final File srcDir, final Class<?> cls) { writeClassMethod(srcDir, cls, false, false, false, null, null, Objects.class); }
[ "public", "static", "void", "writeClassMethod", "(", "final", "File", "srcDir", ",", "final", "Class", "<", "?", ">", "cls", ")", "{", "writeClassMethod", "(", "srcDir", ",", "cls", ",", "false", ",", "false", ",", "false", ",", "null", ",", "null", ",...
Write the generated methods by the fields defined the in specified class to the source file. <br /> Add below comments to specified the section where the generated methods should be written to <pre> =====> <===== </pre> @param srcDir @param cls
[ "Write", "the", "generated", "methods", "by", "the", "fields", "defined", "the", "in", "specified", "class", "to", "the", "source", "file", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CodeGenerator.java#L116-L118
apache/reef
lang/java/reef-examples/src/main/java/org/apache/reef/examples/scheduler/driver/http/SchedulerHttpHandler.java
SchedulerHttpHandler.onHttpRequest
@Override public void onHttpRequest(final ParsedHttpRequest request, final HttpServletResponse response) throws IOException, ServletException { """ HttpRequest handler. You must specify UriSpecification and API version. The request url is http://{address}:{port}/scheduler/v1 APIs /list ...
java
@Override public void onHttpRequest(final ParsedHttpRequest request, final HttpServletResponse response) throws IOException, ServletException { final String target = request.getTargetEntity().toLowerCase(); final Map<String, List<String>> queryMap = request.getQueryMap(); final SchedulerResponse re...
[ "@", "Override", "public", "void", "onHttpRequest", "(", "final", "ParsedHttpRequest", "request", ",", "final", "HttpServletResponse", "response", ")", "throws", "IOException", ",", "ServletException", "{", "final", "String", "target", "=", "request", ".", "getTarge...
HttpRequest handler. You must specify UriSpecification and API version. The request url is http://{address}:{port}/scheduler/v1 APIs /list to get the status list for all tasks /status?id={id} to query the status of such a task, given id /submit?cmd={cmd} to submit a Task, which returns its id /c...
[ "HttpRequest", "handler", ".", "You", "must", "specify", "UriSpecification", "and", "API", "version", ".", "The", "request", "url", "is", "http", ":", "//", "{", "address", "}", ":", "{", "port", "}", "/", "scheduler", "/", "v1" ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-examples/src/main/java/org/apache/reef/examples/scheduler/driver/http/SchedulerHttpHandler.java#L70-L109
casbin/jcasbin
src/main/java/org/casbin/jcasbin/model/Policy.java
Policy.removePolicy
public boolean removePolicy(String sec, String ptype, List<String> rule) { """ removePolicy removes a policy rule from the model. @param sec the section, "p" or "g". @param ptype the policy type, "p", "p2", .. or "g", "g2", .. @param rule the policy rule. @return succeeds or not. """ for (int i =...
java
public boolean removePolicy(String sec, String ptype, List<String> rule) { for (int i = 0; i < model.get(sec).get(ptype).policy.size(); i ++) { List<String> r = model.get(sec).get(ptype).policy.get(i); if (Util.arrayEquals(rule, r)) { model.get(sec).get(ptype).policy.remo...
[ "public", "boolean", "removePolicy", "(", "String", "sec", ",", "String", "ptype", ",", "List", "<", "String", ">", "rule", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "model", ".", "get", "(", "sec", ")", ".", "get", "(", "ptype",...
removePolicy removes a policy rule from the model. @param sec the section, "p" or "g". @param ptype the policy type, "p", "p2", .. or "g", "g2", .. @param rule the policy rule. @return succeeds or not.
[ "removePolicy", "removes", "a", "policy", "rule", "from", "the", "model", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/model/Policy.java#L163-L173
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java
CPDisplayLayoutPersistenceImpl.removeByUUID_G
@Override public CPDisplayLayout removeByUUID_G(String uuid, long groupId) throws NoSuchCPDisplayLayoutException { """ Removes the cp display layout where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp display layout that was removed ...
java
@Override public CPDisplayLayout removeByUUID_G(String uuid, long groupId) throws NoSuchCPDisplayLayoutException { CPDisplayLayout cpDisplayLayout = findByUUID_G(uuid, groupId); return remove(cpDisplayLayout); }
[ "@", "Override", "public", "CPDisplayLayout", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPDisplayLayoutException", "{", "CPDisplayLayout", "cpDisplayLayout", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "re...
Removes the cp display layout where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp display layout that was removed
[ "Removes", "the", "cp", "display", "layout", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java#L811-L817
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.singleStepTransfer
public void singleStepTransfer( String connId, String destination, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { """ Perform a single-step tr...
java
public void singleStepTransfer( String connId, String destination, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { Voice...
[ "public", "void", "singleStepTransfer", "(", "String", "connId", ",", "String", "destination", ",", "String", "location", ",", "KeyValueCollection", "userData", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiEx...
Perform a single-step transfer to the specified destination. @param connId The connection ID of the call to transfer. @param destination The number where the call should be transferred. @param location Name of the remote location in the form of <SwitchName> or <T-ServerApplicationName>@<SwitchName>. This value is used ...
[ "Perform", "a", "single", "-", "step", "transfer", "to", "the", "specified", "destination", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L971-L995
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_serviceMonitoring_monitoringId_PUT
public void serviceName_serviceMonitoring_monitoringId_PUT(String serviceName, Long monitoringId, OvhServiceMonitoring body) throws IOException { """ Alter this object properties REST: PUT /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId} @param body [required] New object properties @param serv...
java
public void serviceName_serviceMonitoring_monitoringId_PUT(String serviceName, Long monitoringId, OvhServiceMonitoring body) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}"; StringBuilder sb = path(qPath, serviceName, monitoringId); exec(qPath, "PUT", sb.toSt...
[ "public", "void", "serviceName_serviceMonitoring_monitoringId_PUT", "(", "String", "serviceName", ",", "Long", "monitoringId", ",", "OvhServiceMonitoring", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/serviceMonitoring/{m...
Alter this object properties REST: PUT /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId} @param body [required] New object properties @param serviceName [required] The internal name of your dedicated server @param monitoringId [required] This monitoring id
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2283-L2287
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Searcher.java
Searcher.searchForWebElement
public WebElement searchForWebElement(final By by, int minimumNumberOfMatches) { """ Searches for a web element. @param by the By object e.g. By.id("id"); @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches @return the web element or...
java
public WebElement searchForWebElement(final By by, int minimumNumberOfMatches){ if(minimumNumberOfMatches < 1){ minimumNumberOfMatches = 1; } List<WebElement> viewsFromScreen = webUtils.getWebElements(by, true); addViewsToList (webElements, viewsFromScreen); return getViewFromList(webElements, minimumNu...
[ "public", "WebElement", "searchForWebElement", "(", "final", "By", "by", ",", "int", "minimumNumberOfMatches", ")", "{", "if", "(", "minimumNumberOfMatches", "<", "1", ")", "{", "minimumNumberOfMatches", "=", "1", ";", "}", "List", "<", "WebElement", ">", "vie...
Searches for a web element. @param by the By object e.g. By.id("id"); @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches @return the web element or null if not found
[ "Searches", "for", "a", "web", "element", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Searcher.java#L231-L241
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
FSDataset.getValidateBlockFile
File getValidateBlockFile(int namespaceId, Block b, boolean checkSize) throws IOException { """ Find the file corresponding to the block and return it if it exists. """ //Should we check for metadata file too? DatanodeBlockInfo blockInfo = this.getDatanodeBlockInfo(namespaceId, b); File f = n...
java
File getValidateBlockFile(int namespaceId, Block b, boolean checkSize) throws IOException { //Should we check for metadata file too? DatanodeBlockInfo blockInfo = this.getDatanodeBlockInfo(namespaceId, b); File f = null; if (blockInfo != null) { if (checkSize) { blockInfo.verifyFinal...
[ "File", "getValidateBlockFile", "(", "int", "namespaceId", ",", "Block", "b", ",", "boolean", "checkSize", ")", "throws", "IOException", "{", "//Should we check for metadata file too?", "DatanodeBlockInfo", "blockInfo", "=", "this", ".", "getDatanodeBlockInfo", "(", "na...
Find the file corresponding to the block and return it if it exists.
[ "Find", "the", "file", "corresponding", "to", "the", "block", "and", "return", "it", "if", "it", "exists", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java#L2543-L2568
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/StringHelper.java
StringHelper.isEqual
public static boolean isEqual(String pStr1, String pStr2) { """ Checks if both the strings are equal for value - Case Sensitive. @param pStr1 A String value. @param pStr2 A String value. @return boolean A boolean <code>true</code> if the Strings are equal, otherwise <code>false</code>. @see String#equal...
java
public static boolean isEqual(String pStr1, String pStr2) { if (pStr1 == null && pStr2 == null) { return true; } else if (pStr1 == null || pStr2 == null) { return false; } else if (pStr1.equals(pStr2)) { return true; } return false; }
[ "public", "static", "boolean", "isEqual", "(", "String", "pStr1", ",", "String", "pStr2", ")", "{", "if", "(", "pStr1", "==", "null", "&&", "pStr2", "==", "null", ")", "{", "return", "true", ";", "}", "else", "if", "(", "pStr1", "==", "null", "||", ...
Checks if both the strings are equal for value - Case Sensitive. @param pStr1 A String value. @param pStr2 A String value. @return boolean A boolean <code>true</code> if the Strings are equal, otherwise <code>false</code>. @see String#equals(java.lang.Object)
[ "Checks", "if", "both", "the", "strings", "are", "equal", "for", "value", "-", "Case", "Sensitive", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/StringHelper.java#L899-L908
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/rocksdb/RocksDbWrapper.java
RocksDbWrapper.openReadWrite
public static RocksDbWrapper openReadWrite(File directory, String... columnFamilies) throws RocksDbException, IOException { """ Open a {@link RocksDB} with default options in read/write mode. @param directory directory to store {@link RocksDB} data @param columnFamilies list of column families to...
java
public static RocksDbWrapper openReadWrite(File directory, String... columnFamilies) throws RocksDbException, IOException { RocksDbWrapper rocksDbWrapper = new RocksDbWrapper(directory, false); rocksDbWrapper.setColumnFamilies(RocksDbUtils.buildColumnFamilyDescriptors(columnFamilies)); ...
[ "public", "static", "RocksDbWrapper", "openReadWrite", "(", "File", "directory", ",", "String", "...", "columnFamilies", ")", "throws", "RocksDbException", ",", "IOException", "{", "RocksDbWrapper", "rocksDbWrapper", "=", "new", "RocksDbWrapper", "(", "directory", ","...
Open a {@link RocksDB} with default options in read/write mode. @param directory directory to store {@link RocksDB} data @param columnFamilies list of column families to store key/value (the column family "default" will be automatically added) @return @throws RocksDbException @throws IOException
[ "Open", "a", "{", "@link", "RocksDB", "}", "with", "default", "options", "in", "read", "/", "write", "mode", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/rocksdb/RocksDbWrapper.java#L124-L130
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getTVExternalIDs
public ExternalID getTVExternalIDs(int tvID, String language) throws MovieDbException { """ Get the external ids that we have stored for a TV series. @param tvID tvID @param language language @return @throws com.omertron.themoviedbapi.MovieDbException """ return tmdbTv.getTVExternalIDs(tvID, lang...
java
public ExternalID getTVExternalIDs(int tvID, String language) throws MovieDbException { return tmdbTv.getTVExternalIDs(tvID, language); }
[ "public", "ExternalID", "getTVExternalIDs", "(", "int", "tvID", ",", "String", "language", ")", "throws", "MovieDbException", "{", "return", "tmdbTv", ".", "getTVExternalIDs", "(", "tvID", ",", "language", ")", ";", "}" ]
Get the external ids that we have stored for a TV series. @param tvID tvID @param language language @return @throws com.omertron.themoviedbapi.MovieDbException
[ "Get", "the", "external", "ids", "that", "we", "have", "stored", "for", "a", "TV", "series", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1509-L1511
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByFirstName
public Iterable<DUser> queryByFirstName(java.lang.String firstName) { """ query-by method for field firstName @param firstName the specified attribute @return an Iterable of DUsers for the specified firstName """ return queryByField(null, DUserMapper.Field.FIRSTNAME.getFieldName(), firstName); }
java
public Iterable<DUser> queryByFirstName(java.lang.String firstName) { return queryByField(null, DUserMapper.Field.FIRSTNAME.getFieldName(), firstName); }
[ "public", "Iterable", "<", "DUser", ">", "queryByFirstName", "(", "java", ".", "lang", ".", "String", "firstName", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "FIRSTNAME", ".", "getFieldName", "(", ")", ",", "fir...
query-by method for field firstName @param firstName the specified attribute @return an Iterable of DUsers for the specified firstName
[ "query", "-", "by", "method", "for", "field", "firstName" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L151-L153
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java
WebDriverTool.processField
public void processField(final By by, final String dataSetKey, final String dataKey) { """ Uses the internal {@link FormInputHandler} to set a form field. @param by the {@link By} used to locate the element representing an HTML input or textarea @param dataSetKey the data set key @param dataKey the key us...
java
public void processField(final By by, final String dataSetKey, final String dataKey) { checkTopmostElement(by); fih.by(by).dataSet(dataSets.get(dataSetKey)).dataKey(dataKey).perform(); }
[ "public", "void", "processField", "(", "final", "By", "by", ",", "final", "String", "dataSetKey", ",", "final", "String", "dataKey", ")", "{", "checkTopmostElement", "(", "by", ")", ";", "fih", ".", "by", "(", "by", ")", ".", "dataSet", "(", "dataSets", ...
Uses the internal {@link FormInputHandler} to set a form field. @param by the {@link By} used to locate the element representing an HTML input or textarea @param dataSetKey the data set key @param dataKey the key used to retrieve the value for the field from the data set with the specifies data set key
[ "Uses", "the", "internal", "{", "@link", "FormInputHandler", "}", "to", "set", "a", "form", "field", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L633-L636
docker-java/docker-java
src/main/java/com/github/dockerjava/core/util/FilePathUtil.java
FilePathUtil.relativize
public static String relativize(Path baseDir, Path file) { """ Return the relative path. Path elements are separated with / char. @param baseDir a parent directory of {@code file} @param file the file to get the relative path @return the relative path """ String path = baseDir.toUri().relativize...
java
public static String relativize(Path baseDir, Path file) { String path = baseDir.toUri().relativize(file.toUri()).getPath(); if (!"/".equals(baseDir.getFileSystem().getSeparator())) { // For windows return path.replace(baseDir.getFileSystem().getSeparator(), "/"); } else ...
[ "public", "static", "String", "relativize", "(", "Path", "baseDir", ",", "Path", "file", ")", "{", "String", "path", "=", "baseDir", ".", "toUri", "(", ")", ".", "relativize", "(", "file", ".", "toUri", "(", ")", ")", ".", "getPath", "(", ")", ";", ...
Return the relative path. Path elements are separated with / char. @param baseDir a parent directory of {@code file} @param file the file to get the relative path @return the relative path
[ "Return", "the", "relative", "path", ".", "Path", "elements", "are", "separated", "with", "/", "char", "." ]
train
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/util/FilePathUtil.java#L43-L51
keyboardsurfer/Crouton
library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java
Crouton.makeText
public static Crouton makeText(Activity activity, CharSequence text, Style style, int viewGroupResId) { """ Creates a {@link Crouton} with provided text and style for a given activity. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param text The text yo...
java
public static Crouton makeText(Activity activity, CharSequence text, Style style, int viewGroupResId) { return new Crouton(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)); }
[ "public", "static", "Crouton", "makeText", "(", "Activity", "activity", ",", "CharSequence", "text", ",", "Style", "style", ",", "int", "viewGroupResId", ")", "{", "return", "new", "Crouton", "(", "activity", ",", "text", ",", "style", ",", "(", "ViewGroup",...
Creates a {@link Crouton} with provided text and style for a given activity. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param text The text you want to display. @param style The style that this {@link Crouton} should be created with. @param viewGroupResId The r...
[ "Creates", "a", "{", "@link", "Crouton", "}", "with", "provided", "text", "and", "style", "for", "a", "given", "activity", "." ]
train
https://github.com/keyboardsurfer/Crouton/blob/7806b15e4d52793e1f5aeaa4a55b1e220289e619/library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java#L232-L234
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory.java
SocketFactory.createSocket
@Override public Socket createSocket(String host, int port) throws IOException { """ Create a client socket of the appropriate type using the provided address and port information. @return A Socket (either plain or SSL) configured for connection to the target. """ if (TraceComponent.isAnyTraci...
java
@Override public Socket createSocket(String host, int port) throws IOException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "SocketFactory attempting to create socket for host: " + host + " port: " + port); // check for SSL addresses if (Util.i...
[ "@", "Override", "public", "Socket", "createSocket", "(", "String", "host", ",", "int", "port", ")", "throws", "IOException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", "....
Create a client socket of the appropriate type using the provided address and port information. @return A Socket (either plain or SSL) configured for connection to the target.
[ "Create", "a", "client", "socket", "of", "the", "appropriate", "type", "using", "the", "provided", "address", "and", "port", "information", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory.java#L114-L127
jhipster/jhipster
jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java
QueryService.buildStringSpecification
protected Specification<ENTITY> buildStringSpecification(StringFilter filter, SingularAttribute<? super ENTITY, String> field) { """ Helper function to return a specification for filtering on a {@link String} field, where equality, containment, and null/non-null conditions are supported. @param filter ...
java
protected Specification<ENTITY> buildStringSpecification(StringFilter filter, SingularAttribute<? super ENTITY, String> field) { return buildSpecification(filter, root -> root.get(field)); }
[ "protected", "Specification", "<", "ENTITY", ">", "buildStringSpecification", "(", "StringFilter", "filter", ",", "SingularAttribute", "<", "?", "super", "ENTITY", ",", "String", ">", "field", ")", "{", "return", "buildSpecification", "(", "filter", ",", "root", ...
Helper function to return a specification for filtering on a {@link String} field, where equality, containment, and null/non-null conditions are supported. @param filter the individual attribute filter coming from the frontend. @param field the JPA static metamodel representing the field. @return a Specification
[ "Helper", "function", "to", "return", "a", "specification", "for", "filtering", "on", "a", "{", "@link", "String", "}", "field", "where", "equality", "containment", "and", "null", "/", "non", "-", "null", "conditions", "are", "supported", "." ]
train
https://github.com/jhipster/jhipster/blob/5dcf4239c7cc035e188ef02447d3c628fac5c5d9/jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java#L88-L91
b3log/latke
latke-core/src/main/java/org/b3log/latke/plugin/PluginManager.java
PluginManager.registerEventListeners
private void registerEventListeners(final Properties props, final URLClassLoader classLoader, final AbstractPlugin plugin) throws Exception { """ Registers event listeners with the specified plugin properties, class loader and plugin. @param props the specified plugin properties @param classL...
java
private void registerEventListeners(final Properties props, final URLClassLoader classLoader, final AbstractPlugin plugin) throws Exception { final String eventListenerClasses = props.getProperty(Plugin.PLUGIN_EVENT_LISTENER_CLASSES); final String[] eventListenerClassArray = eventListenerCla...
[ "private", "void", "registerEventListeners", "(", "final", "Properties", "props", ",", "final", "URLClassLoader", "classLoader", ",", "final", "AbstractPlugin", "plugin", ")", "throws", "Exception", "{", "final", "String", "eventListenerClasses", "=", "props", ".", ...
Registers event listeners with the specified plugin properties, class loader and plugin. @param props the specified plugin properties @param classLoader the specified class loader @param plugin the specified plugin @throws Exception exception
[ "Registers", "event", "listeners", "with", "the", "specified", "plugin", "properties", "class", "loader", "and", "plugin", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/plugin/PluginManager.java#L292-L313
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JMenuBar leftShift(JMenuBar self, JMenu menu) { """ Overloads the left shift operator to provide an easy way to add menus to a menuBar.<p> @param self a JMenuBar @param menu a menu to be added to the menuBar. @return same menuBar, after the value was added to it. @since 1.6.4 """ s...
java
public static JMenuBar leftShift(JMenuBar self, JMenu menu) { self.add(menu); return self; }
[ "public", "static", "JMenuBar", "leftShift", "(", "JMenuBar", "self", ",", "JMenu", "menu", ")", "{", "self", ".", "add", "(", "menu", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add menus to a menuBar.<p> @param self a JMenuBar @param menu a menu to be added to the menuBar. @return same menuBar, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "menus", "to", "a", "menuBar", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L871-L874
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/Function2Args.java
Function2Args.setArg
public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { """ Set an argument expression for a function. This method is called by the XPath compiler. @param arg non-null expression that represents the argument. @param argNum The argument number index. @throws WrongNumberAr...
java
public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { // System.out.println("argNum: "+argNum); if (argNum == 0) super.setArg(arg, argNum); else if (1 == argNum) { m_arg1 = arg; arg.exprSetParent(this); } else reportWrongNumberArgs();...
[ "public", "void", "setArg", "(", "Expression", "arg", ",", "int", "argNum", ")", "throws", "WrongNumberArgsException", "{", "// System.out.println(\"argNum: \"+argNum);", "if", "(", "argNum", "==", "0", ")", "super", ".", "setArg", "(", "arg", ",", "argNum", ")"...
Set an argument expression for a function. This method is called by the XPath compiler. @param arg non-null expression that represents the argument. @param argNum The argument number index. @throws WrongNumberArgsException If the argNum parameter is greater than 1.
[ "Set", "an", "argument", "expression", "for", "a", "function", ".", "This", "method", "is", "called", "by", "the", "XPath", "compiler", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/Function2Args.java#L78-L92
alkacon/opencms-core
src/org/opencms/ui/apps/modules/CmsModuleApp.java
CmsModuleApp.editModule
public static void editModule(CmsModule module, boolean isNew, String caption, Runnable callback) { """ Opens the module editor for the given module.<p> @param module the edited module @param isNew true if this is a new module @param caption the caption for the module editor dialog @param callback the callba...
java
public static void editModule(CmsModule module, boolean isNew, String caption, Runnable callback) { Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide); CmsEditModuleForm form = new CmsEditModuleForm(module, isNew, callback); window.setContent(form); window.setCaption(caption...
[ "public", "static", "void", "editModule", "(", "CmsModule", "module", ",", "boolean", "isNew", ",", "String", "caption", ",", "Runnable", "callback", ")", "{", "Window", "window", "=", "CmsBasicDialog", ".", "prepareWindow", "(", "DialogWidth", ".", "wide", ")...
Opens the module editor for the given module.<p> @param module the edited module @param isNew true if this is a new module @param caption the caption for the module editor dialog @param callback the callback to call after the edit dialog is done
[ "Opens", "the", "module", "editor", "for", "the", "given", "module", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/modules/CmsModuleApp.java#L539-L547
btrplace/scheduler
json/src/main/java/org/btrplace/json/JSONs.java
JSONs.requiredNodes
public static List<Node> requiredNodes(Model mo, JSONObject o, String id) throws JSONConverterException { """ Read an expected list of nodes. @param mo the associated model to browse @param o the object to parse @param id the key in the map that points to the list @return the parsed list @throws JSONConver...
java
public static List<Node> requiredNodes(Model mo, JSONObject o, String id) throws JSONConverterException { checkKeys(o, id); Object x = o.get(id); if (!(x instanceof JSONArray)) { throw new JSONConverterException("integers expected at key '" + id + "'"); } return nodes...
[ "public", "static", "List", "<", "Node", ">", "requiredNodes", "(", "Model", "mo", ",", "JSONObject", "o", ",", "String", "id", ")", "throws", "JSONConverterException", "{", "checkKeys", "(", "o", ",", "id", ")", ";", "Object", "x", "=", "o", ".", "get...
Read an expected list of nodes. @param mo the associated model to browse @param o the object to parse @param id the key in the map that points to the list @return the parsed list @throws JSONConverterException if the key does not point to a list of nodes identifiers
[ "Read", "an", "expected", "list", "of", "nodes", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/JSONs.java#L281-L288
icode/ameba
src/main/java/ameba/message/jackson/internal/JacksonUtils.java
JacksonUtils.configureMapper
public static void configureMapper(ObjectMapper mapper, Application.Mode mode) { """ <p>configureMapper.</p> @param mapper a {@link com.fasterxml.jackson.databind.ObjectMapper} object. @param mode App mode """ mapper.registerModule(new GuavaModule()); mapper.setSerializationInclusion(Json...
java
public static void configureMapper(ObjectMapper mapper, Application.Mode mode) { mapper.registerModule(new GuavaModule()); mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY) .enable(SerializationFeature.WRITE_ENUMS_USING_INDEX) .enable(MapperFeature.PROPAGATE...
[ "public", "static", "void", "configureMapper", "(", "ObjectMapper", "mapper", ",", "Application", ".", "Mode", "mode", ")", "{", "mapper", ".", "registerModule", "(", "new", "GuavaModule", "(", ")", ")", ";", "mapper", ".", "setSerializationInclusion", "(", "J...
<p>configureMapper.</p> @param mapper a {@link com.fasterxml.jackson.databind.ObjectMapper} object. @param mode App mode
[ "<p", ">", "configureMapper", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/message/jackson/internal/JacksonUtils.java#L93-L107
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.pack
public static void pack(File sourceDir, File targetZip, NameMapper mapper, int compressionLevel) { """ Compresses the given directory and all its sub-directories into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param sourceDir root directory. @param targetZip ...
java
public static void pack(File sourceDir, File targetZip, NameMapper mapper, int compressionLevel) { log.debug("Compressing '{}' into '{}'.", sourceDir, targetZip); if (!sourceDir.exists()) { throw new ZipException("Given file '" + sourceDir + "' doesn't exist!"); } ZipOutputStream out = null; t...
[ "public", "static", "void", "pack", "(", "File", "sourceDir", ",", "File", "targetZip", ",", "NameMapper", "mapper", ",", "int", "compressionLevel", ")", "{", "log", ".", "debug", "(", "\"Compressing '{}' into '{}'.\"", ",", "sourceDir", ",", "targetZip", ")", ...
Compresses the given directory and all its sub-directories into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param sourceDir root directory. @param targetZip ZIP file that will be created or overwritten. @param mapper call-back for renaming the entries. @param compressionL...
[ "Compresses", "the", "given", "directory", "and", "all", "its", "sub", "-", "directories", "into", "a", "ZIP", "file", ".", "<p", ">", "The", "ZIP", "file", "must", "not", "be", "a", "directory", "and", "its", "parent", "directory", "must", "exist", "." ...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1603-L1620
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.querySingleTypedResult
public <T> T querySingleTypedResult(String sql, String[] args, int column) { """ Query the SQL for a single result typed object @param <T> result value type @param sql sql statement @param args arguments @param column column index @return result, null if no result @since 3.1.0 """ return db.query...
java
public <T> T querySingleTypedResult(String sql, String[] args, int column) { return db.querySingleTypedResult(sql, args, column); }
[ "public", "<", "T", ">", "T", "querySingleTypedResult", "(", "String", "sql", ",", "String", "[", "]", "args", ",", "int", "column", ")", "{", "return", "db", ".", "querySingleTypedResult", "(", "sql", ",", "args", ",", "column", ")", ";", "}" ]
Query the SQL for a single result typed object @param <T> result value type @param sql sql statement @param args arguments @param column column index @return result, null if no result @since 3.1.0
[ "Query", "the", "SQL", "for", "a", "single", "result", "typed", "object" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1019-L1021
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
BinaryString.concatWs
public static BinaryString concatWs(BinaryString separator, BinaryString... inputs) { """ Concatenates input strings together into a single string using the separator. A null input is skipped. For example, concat(",", "a", null, "c") would yield "a,c". """ return concatWs(separator, Arrays.asList(inputs)); ...
java
public static BinaryString concatWs(BinaryString separator, BinaryString... inputs) { return concatWs(separator, Arrays.asList(inputs)); }
[ "public", "static", "BinaryString", "concatWs", "(", "BinaryString", "separator", ",", "BinaryString", "...", "inputs", ")", "{", "return", "concatWs", "(", "separator", ",", "Arrays", ".", "asList", "(", "inputs", ")", ")", ";", "}" ]
Concatenates input strings together into a single string using the separator. A null input is skipped. For example, concat(",", "a", null, "c") would yield "a,c".
[ "Concatenates", "input", "strings", "together", "into", "a", "single", "string", "using", "the", "separator", ".", "A", "null", "input", "is", "skipped", ".", "For", "example", "concat", "(", "a", "null", "c", ")", "would", "yield", "a", "c", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java#L494-L496
zaproxy/zaproxy
src/org/zaproxy/zap/extension/dynssl/SslCertificateUtils.java
SslCertificateUtils.pem2Keystore
public static KeyStore pem2Keystore(File pemFile) throws IOException, CertificateException, InvalidKeySpecException, NoSuchAlgorithmException, KeyStoreException { """ Code c/o http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem @param pemFile @return @throws IOException @t...
java
public static KeyStore pem2Keystore(File pemFile) throws IOException, CertificateException, InvalidKeySpecException, NoSuchAlgorithmException, KeyStoreException { String certAndKey = FileUtils.readFileToString(pemFile, StandardCharsets.US_ASCII); byte[] certBytes = extractCertificate(certAndKey); byte[]...
[ "public", "static", "KeyStore", "pem2Keystore", "(", "File", "pemFile", ")", "throws", "IOException", ",", "CertificateException", ",", "InvalidKeySpecException", ",", "NoSuchAlgorithmException", ",", "KeyStoreException", "{", "String", "certAndKey", "=", "FileUtils", "...
Code c/o http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem @param pemFile @return @throws IOException @throws CertificateException @throws InvalidKeySpecException @throws NoSuchAlgorithmException @throws KeyStoreException
[ "Code", "c", "/", "o", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "12501117", "/", "programmatically", "-", "obtain", "-", "keystore", "-", "from", "-", "pem" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/dynssl/SslCertificateUtils.java#L212-L219
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
BlobInfo.newBuilder
public static Builder newBuilder(BucketInfo bucketInfo, String name, Long generation) { """ Returns a {@code BlobInfo} builder where blob identity is set using the provided values. """ return newBuilder(bucketInfo.getName(), name, generation); }
java
public static Builder newBuilder(BucketInfo bucketInfo, String name, Long generation) { return newBuilder(bucketInfo.getName(), name, generation); }
[ "public", "static", "Builder", "newBuilder", "(", "BucketInfo", "bucketInfo", ",", "String", "name", ",", "Long", "generation", ")", "{", "return", "newBuilder", "(", "bucketInfo", ".", "getName", "(", ")", ",", "name", ",", "generation", ")", ";", "}" ]
Returns a {@code BlobInfo} builder where blob identity is set using the provided values.
[ "Returns", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java#L1014-L1016
atomix/atomix
protocols/primary-backup/src/main/java/io/atomix/protocols/backup/MultiPrimaryProtocolBuilder.java
MultiPrimaryProtocolBuilder.withRetryDelay
public MultiPrimaryProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) { """ Sets the operation retry delay. @param retryDelay the delay between operation retries @param timeUnit the delay time unit @return the proxy builder @throws NullPointerException if the time unit is null """ r...
java
public MultiPrimaryProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) { return withRetryDelay(Duration.ofMillis(timeUnit.toMillis(retryDelay))); }
[ "public", "MultiPrimaryProtocolBuilder", "withRetryDelay", "(", "long", "retryDelay", ",", "TimeUnit", "timeUnit", ")", "{", "return", "withRetryDelay", "(", "Duration", ".", "ofMillis", "(", "timeUnit", ".", "toMillis", "(", "retryDelay", ")", ")", ")", ";", "}...
Sets the operation retry delay. @param retryDelay the delay between operation retries @param timeUnit the delay time unit @return the proxy builder @throws NullPointerException if the time unit is null
[ "Sets", "the", "operation", "retry", "delay", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/primary-backup/src/main/java/io/atomix/protocols/backup/MultiPrimaryProtocolBuilder.java#L120-L122
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
PathFileObject.createSimplePathFileObject
static PathFileObject createSimplePathFileObject(JavacPathFileManager fileManager, final Path path) { """ Create a PathFileObject whose binary name might be inferred from its position on a search path. """ return new PathFileObject(fileManager, path) { @Override Str...
java
static PathFileObject createSimplePathFileObject(JavacPathFileManager fileManager, final Path path) { return new PathFileObject(fileManager, path) { @Override String inferBinaryName(Iterable<? extends Path> paths) { Path absPath = path.toAbsolutePath(); ...
[ "static", "PathFileObject", "createSimplePathFileObject", "(", "JavacPathFileManager", "fileManager", ",", "final", "Path", "path", ")", "{", "return", "new", "PathFileObject", "(", "fileManager", ",", "path", ")", "{", "@", "Override", "String", "inferBinaryName", ...
Create a PathFileObject whose binary name might be inferred from its position on a search path.
[ "Create", "a", "PathFileObject", "whose", "binary", "name", "might", "be", "inferred", "from", "its", "position", "on", "a", "search", "path", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java#L113-L134
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/dao/Results.java
Results.addResultSet
public void addResultSet(SelectResultSet resultSet, boolean moreResultAvailable) { """ Add resultSet to results. @param resultSet new resultSet. @param moreResultAvailable indicate if other results (ResultSet or updateCount) are available. """ if (resultSet.isCallableResult()) { callabl...
java
public void addResultSet(SelectResultSet resultSet, boolean moreResultAvailable) { if (resultSet.isCallableResult()) { callableResultSet = resultSet; return; } if (executionResults == null) { executionResults = new ArrayDeque<>(); } executionResults.add(resultSet); if (cmdInfor...
[ "public", "void", "addResultSet", "(", "SelectResultSet", "resultSet", ",", "boolean", "moreResultAvailable", ")", "{", "if", "(", "resultSet", ".", "isCallableResult", "(", ")", ")", "{", "callableResultSet", "=", "resultSet", ";", "return", ";", "}", "if", "...
Add resultSet to results. @param resultSet new resultSet. @param moreResultAvailable indicate if other results (ResultSet or updateCount) are available.
[ "Add", "resultSet", "to", "results", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/dao/Results.java#L217-L237
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.varargs
public Binder varargs(int index, Class<?> type) { """ Box all incoming arguments from the given position onward into the given array type. This version accepts a variable number of incoming arguments. @param index the index from which to start boxing args @param type the array type into which the args will b...
java
public Binder varargs(int index, Class<?> type) { return new Binder(this, new Varargs(type(), index, type)); }
[ "public", "Binder", "varargs", "(", "int", "index", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "new", "Binder", "(", "this", ",", "new", "Varargs", "(", "type", "(", ")", ",", "index", ",", "type", ")", ")", ";", "}" ]
Box all incoming arguments from the given position onward into the given array type. This version accepts a variable number of incoming arguments. @param index the index from which to start boxing args @param type the array type into which the args will be boxed @return a new Binder
[ "Box", "all", "incoming", "arguments", "from", "the", "given", "position", "onward", "into", "the", "given", "array", "type", ".", "This", "version", "accepts", "a", "variable", "number", "of", "incoming", "arguments", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L903-L905
usman-h/Habanero
src/main/java/com/usmanhussain/habanero/configuration/LoadProperties.java
LoadProperties.loadProps
public static void loadProps(Properties props, File file) throws IOException { """ Loads in the properties file @param props Properties being loaded from the file @param file File declartion that is being used @throws java.io.IOException IOException is thrown """ FileInputStream fis = null; ...
java
public static void loadProps(Properties props, File file) throws IOException { FileInputStream fis = null; try { fis = new FileInputStream(file); props.load(fis); } finally { if (null != fis) { fis.close(); } } }
[ "public", "static", "void", "loadProps", "(", "Properties", "props", ",", "File", "file", ")", "throws", "IOException", "{", "FileInputStream", "fis", "=", "null", ";", "try", "{", "fis", "=", "new", "FileInputStream", "(", "file", ")", ";", "props", ".", ...
Loads in the properties file @param props Properties being loaded from the file @param file File declartion that is being used @throws java.io.IOException IOException is thrown
[ "Loads", "in", "the", "properties", "file" ]
train
https://github.com/usman-h/Habanero/blob/da962025ee8c2a9da7b28905359a6821b579b6d8/src/main/java/com/usmanhussain/habanero/configuration/LoadProperties.java#L52-L62
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/helper/RestJsonConverter.java
RestJsonConverter.jsonToEntityUnwrapRoot
public <T> T jsonToEntityUnwrapRoot(String jsonString, Class<T> type) { """ Converts a jsonString to an object of type T. Unwraps from root, most often this means that the "data" tag is ignored and that the entity is created from within that data tag. @param jsonString the returned json from the api call. @p...
java
public <T> T jsonToEntityUnwrapRoot(String jsonString, Class<T> type) { return jsonToEntity(jsonString, type, this.objectMapperWrapped); }
[ "public", "<", "T", ">", "T", "jsonToEntityUnwrapRoot", "(", "String", "jsonString", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "jsonToEntity", "(", "jsonString", ",", "type", ",", "this", ".", "objectMapperWrapped", ")", ";", "}" ]
Converts a jsonString to an object of type T. Unwraps from root, most often this means that the "data" tag is ignored and that the entity is created from within that data tag. @param jsonString the returned json from the api call. @param type the type to convert to @return a type T
[ "Converts", "a", "jsonString", "to", "an", "object", "of", "type", "T", ".", "Unwraps", "from", "root", "most", "often", "this", "means", "that", "the", "data", "tag", "is", "ignored", "and", "that", "the", "entity", "is", "created", "from", "within", "t...
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/helper/RestJsonConverter.java#L79-L81
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.addInstance
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { """ Adds an instance into an application. @param applicationName the application name @param parentInstancePath the path of the parent instance (null to create a root instance) @param ...
java
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { this.logger.finer( "Adding an instance to the application " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances...
[ "public", "void", "addInstance", "(", "String", "applicationName", ",", "String", "parentInstancePath", ",", "Instance", "instance", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Adding an instance to the application \"", "+"...
Adds an instance into an application. @param applicationName the application name @param parentInstancePath the path of the parent instance (null to create a root instance) @param instance the instance to add @throws ApplicationWsException if a problem occurred with the instance management
[ "Adds", "an", "instance", "into", "an", "application", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L236-L249
nominanuda/zen-project
zen-core/src/main/java/com/nominanuda/zen/obj/JsonPath.java
JsonPath.copyPush
public void copyPush(Obj source, Obj target) { """ {a:1} {b:1} =&gt; {a:1, b:1} {a:1} {a:1} =&gt; {a:[1, 1]} {a:1} {a:null} =&gt; {a:[1, null]} {a:{b:1}} {a:null} =&gt; {a:[{b:1}, null]} {a:{b:1}} {a:{b:{c:null}}} =&gt; {a:{b:[1,{c:null}]}} {a:1} {a:[2]} =&gt; {a:[1,2]} {a:[1]} {a:[2]} =&gt; {a:[1,2]} {a:{b:1}}...
java
public void copyPush(Obj source, Obj target) { Iterator<Entry<String,Object>> itr = source.iterator(); while (itr.hasNext()) { Entry<String,Object> e = itr.next(); putPush(target, e.getKey(), e.getValue()); } }
[ "public", "void", "copyPush", "(", "Obj", "source", ",", "Obj", "target", ")", "{", "Iterator", "<", "Entry", "<", "String", ",", "Object", ">", ">", "itr", "=", "source", ".", "iterator", "(", ")", ";", "while", "(", "itr", ".", "hasNext", "(", ")...
{a:1} {b:1} =&gt; {a:1, b:1} {a:1} {a:1} =&gt; {a:[1, 1]} {a:1} {a:null} =&gt; {a:[1, null]} {a:{b:1}} {a:null} =&gt; {a:[{b:1}, null]} {a:{b:1}} {a:{b:{c:null}}} =&gt; {a:{b:[1,{c:null}]}} {a:1} {a:[2]} =&gt; {a:[1,2]} {a:[1]} {a:[2]} =&gt; {a:[1,2]} {a:{b:1}} {a:[2]} =&gt; {a:[{b:1},2]} {a:{b:1}} {a:{b:[2]}} =&gt; {a...
[ "{", "a", ":", "1", "}", "{", "b", ":", "1", "}", "=", "&gt", ";", "{", "a", ":", "1", "b", ":", "1", "}", "{", "a", ":", "1", "}", "{", "a", ":", "1", "}", "=", "&gt", ";", "{", "a", ":", "[", "1", "1", "]", "}", "{", "a", ":",...
train
https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-core/src/main/java/com/nominanuda/zen/obj/JsonPath.java#L97-L103
mpetazzoni/ttorrent
ttorrent-client/src/main/java/com/turn/ttorrent/client/SharedTorrent.java
SharedTorrent.handlePieceAvailability
@Override public void handlePieceAvailability(SharingPeer peer, Piece piece) { """ Piece availability handler. <p/> <p> Handle updates in piece availability from a peer's HAVE message. When this happens, we need to mark that piece as available from the peer. </p> @param peer The peer we got the update f...
java
@Override public void handlePieceAvailability(SharingPeer peer, Piece piece) { boolean isPeerInteresting = !this.completedPieces.get(piece.getIndex()) && !this.requestedPieces.get(piece.getIndex()); if (isPeerInteresting) { peer.interesting(); } piece.seenAt(peer); logger.trace...
[ "@", "Override", "public", "void", "handlePieceAvailability", "(", "SharingPeer", "peer", ",", "Piece", "piece", ")", "{", "boolean", "isPeerInteresting", "=", "!", "this", ".", "completedPieces", ".", "get", "(", "piece", ".", "getIndex", "(", ")", ")", "&&...
Piece availability handler. <p/> <p> Handle updates in piece availability from a peer's HAVE message. When this happens, we need to mark that piece as available from the peer. </p> @param peer The peer we got the update from. @param piece The piece that became available.
[ "Piece", "availability", "handler", ".", "<p", "/", ">", "<p", ">", "Handle", "updates", "in", "piece", "availability", "from", "a", "peer", "s", "HAVE", "message", ".", "When", "this", "happens", "we", "need", "to", "mark", "that", "piece", "as", "avail...
train
https://github.com/mpetazzoni/ttorrent/blob/ecd0e6caf853b63393c4ab63cfd8f20114f73f70/ttorrent-client/src/main/java/com/turn/ttorrent/client/SharedTorrent.java#L556-L580
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java
AccessControlList.addPermissions
public void addPermissions(String identity, String[] perm) throws RepositoryException { """ Adds a set of permission types to a given identity @param identity the member identity @param perm an array of permission types to add """ for (String p : perm) { accessList.add(new AccessControlE...
java
public void addPermissions(String identity, String[] perm) throws RepositoryException { for (String p : perm) { accessList.add(new AccessControlEntry(identity, p)); } }
[ "public", "void", "addPermissions", "(", "String", "identity", ",", "String", "[", "]", "perm", ")", "throws", "RepositoryException", "{", "for", "(", "String", "p", ":", "perm", ")", "{", "accessList", ".", "add", "(", "new", "AccessControlEntry", "(", "i...
Adds a set of permission types to a given identity @param identity the member identity @param perm an array of permission types to add
[ "Adds", "a", "set", "of", "permission", "types", "to", "a", "given", "identity" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/access/AccessControlList.java#L131-L137
js-lib-com/commons
src/main/java/js/util/Types.java
Types.isKindOf
private static boolean isKindOf(Type t, Type typeToMatch) { """ Determine if a given type is a kind of a requested type to match. Returns true if <code>type</code> is a subclass or implements <code>typeToMatch</code> - not necessarily direct. Boxing classes for primitive values are compatible. This depart from {...
java
private static boolean isKindOf(Type t, Type typeToMatch) { if(t == null || typeToMatch == null) { return false; } if(t.equals(typeToMatch)) { return true; } Class<?> clazz = typeToClass(t); Class<?> classToMatch = typeToClass(typeToMatch); if(clazz.isPrimitive())...
[ "private", "static", "boolean", "isKindOf", "(", "Type", "t", ",", "Type", "typeToMatch", ")", "{", "if", "(", "t", "==", "null", "||", "typeToMatch", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "t", ".", "equals", "(", "typeToMat...
Determine if a given type is a kind of a requested type to match. Returns true if <code>type</code> is a subclass or implements <code>typeToMatch</code> - not necessarily direct. Boxing classes for primitive values are compatible. This depart from {@link Class#isAssignableFrom(Class)} that consider primitive and relate...
[ "Determine", "if", "a", "given", "type", "is", "a", "kind", "of", "a", "requested", "type", "to", "match", ".", "Returns", "true", "if", "<code", ">", "type<", "/", "code", ">", "is", "a", "subclass", "or", "implements", "<code", ">", "typeToMatch<", "...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Types.java#L106-L126
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java
AbstractHBaseUtils.createDelete
public Delete createDelete(URI id, String tableName) throws IOException { """ Creates deletes for HBase tables @param id @param tableName @param conf @return @throws IOException """ Delete del = null; Object tTable = getTable(tableName); if (tTable != null) { del = new ...
java
public Delete createDelete(URI id, String tableName) throws IOException { Delete del = null; Object tTable = getTable(tableName); if (tTable != null) { del = new Delete(Bytes.toBytes(id.toString())); } return del; }
[ "public", "Delete", "createDelete", "(", "URI", "id", ",", "String", "tableName", ")", "throws", "IOException", "{", "Delete", "del", "=", "null", ";", "Object", "tTable", "=", "getTable", "(", "tableName", ")", ";", "if", "(", "tTable", "!=", "null", ")...
Creates deletes for HBase tables @param id @param tableName @param conf @return @throws IOException
[ "Creates", "deletes", "for", "HBase", "tables" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java#L284-L291
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/NotificationConfig.java
NotificationConfig.getNotificationEvents
public java.util.List<String> getNotificationEvents() { """ <p> The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see <a href="http://docs.aws.amazon.com/systems-mana...
java
public java.util.List<String> getNotificationEvents() { if (notificationEvents == null) { notificationEvents = new com.amazonaws.internal.SdkInternalList<String>(); } return notificationEvents; }
[ "public", "java", ".", "util", ".", "List", "<", "String", ">", "getNotificationEvents", "(", ")", "{", "if", "(", "notificationEvents", "==", "null", ")", "{", "notificationEvents", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList...
<p> The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see <a href="http://docs.aws.amazon.com/systems-manager/latest/userguide/rc-sns-notifications.html">Configuring Amazon S...
[ "<p", ">", "The", "different", "events", "for", "which", "you", "can", "receive", "notifications", ".", "These", "events", "include", "the", "following", ":", "All", "(", "events", ")", "InProgress", "Success", "TimedOut", "Cancelled", "Failed", ".", "To", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/NotificationConfig.java#L116-L121