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
graknlabs/grakn
server/src/graql/analytics/CommonOLAP.java
CommonOLAP.loadState
public void loadState(final Graph graph, final Configuration configuration) { """ Load <code>persistentProperties</code> and any hard coded fields from an apache config object for use by the spark executor. @param graph the tinker graph @param configuration the apache config object containing the valu...
java
public void loadState(final Graph graph, final Configuration configuration) { // load selected types configuration.subset(PREFIX_SELECTED_TYPE_KEY).getKeys().forEachRemaining(key -> selectedTypes.add((LabelId) configuration.getProperty(PREFIX_SELECTED_TYPE_KEY + "." + key))); //...
[ "public", "void", "loadState", "(", "final", "Graph", "graph", ",", "final", "Configuration", "configuration", ")", "{", "// load selected types", "configuration", ".", "subset", "(", "PREFIX_SELECTED_TYPE_KEY", ")", ".", "getKeys", "(", ")", ".", "forEachRemaining"...
Load <code>persistentProperties</code> and any hard coded fields from an apache config object for use by the spark executor. @param graph the tinker graph @param configuration the apache config object containing the values
[ "Load", "<code", ">", "persistentProperties<", "/", "code", ">", "and", "any", "hard", "coded", "fields", "from", "an", "apache", "config", "object", "for", "use", "by", "the", "spark", "executor", "." ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/analytics/CommonOLAP.java#L83-L91
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.updateServerProperties
public MetadataEnvelope updateServerProperties(String did, Object deviceProperties) throws ApiException { """ Updates a device&#39;s server properties. Updates a device&#39;s server properties. @param did Device ID. (required) @param deviceProperties Device properties object to be set (required) @return Metada...
java
public MetadataEnvelope updateServerProperties(String did, Object deviceProperties) throws ApiException { ApiResponse<MetadataEnvelope> resp = updateServerPropertiesWithHttpInfo(did, deviceProperties); return resp.getData(); }
[ "public", "MetadataEnvelope", "updateServerProperties", "(", "String", "did", ",", "Object", "deviceProperties", ")", "throws", "ApiException", "{", "ApiResponse", "<", "MetadataEnvelope", ">", "resp", "=", "updateServerPropertiesWithHttpInfo", "(", "did", ",", "deviceP...
Updates a device&#39;s server properties. Updates a device&#39;s server properties. @param did Device ID. (required) @param deviceProperties Device properties object to be set (required) @return MetadataEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Updates", "a", "device&#39", ";", "s", "server", "properties", ".", "Updates", "a", "device&#39", ";", "s", "server", "properties", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L1681-L1684
PureSolTechnologies/parsers
parsers/src/main/java/com/puresoltechnologies/parsers/parser/packrat/PackratParser.java
PackratParser.recall
private MemoEntry recall(String production, int position, int line) throws TreeException, ParserException { """ This method is an extended getMemo function which also takes into account the seed growing processes which might be underway. @param production is the currently processes production. @param positio...
java
private MemoEntry recall(String production, int position, int line) throws TreeException, ParserException { /* * Retrieve the current memoized item for the production and the head on the * current position. */ final MemoEntry m = memo.getMemo(production, position); final Head h = heads.get(position); /* * "...
[ "private", "MemoEntry", "recall", "(", "String", "production", ",", "int", "position", ",", "int", "line", ")", "throws", "TreeException", ",", "ParserException", "{", "/*\n\t * Retrieve the current memoized item for the production and the head on the\n\t * current position.\n\t ...
This method is an extended getMemo function which also takes into account the seed growing processes which might be underway. @param production is the currently processes production. @param position is the current parser position. @return A new memo entry is returned containing the result of the memoization buffer and...
[ "This", "method", "is", "an", "extended", "getMemo", "function", "which", "also", "takes", "into", "account", "the", "seed", "growing", "processes", "which", "might", "be", "underway", "." ]
train
https://github.com/PureSolTechnologies/parsers/blob/61077223b90d3768ff9445ae13036343c98b63cd/parsers/src/main/java/com/puresoltechnologies/parsers/parser/packrat/PackratParser.java#L378-L415
JoeKerouac/utils
src/main/java/com/joe/utils/img/ImgUtil.java
ImgUtil.copy
public static BufferedImage copy(BufferedImage src, BufferedImage dest) { """ 将一个image信息复制到另一个image中 @param src 源 @param dest 目标 @return dest """ dest.getGraphics().drawImage(src, 0, 0, null); return dest; }
java
public static BufferedImage copy(BufferedImage src, BufferedImage dest) { dest.getGraphics().drawImage(src, 0, 0, null); return dest; }
[ "public", "static", "BufferedImage", "copy", "(", "BufferedImage", "src", ",", "BufferedImage", "dest", ")", "{", "dest", ".", "getGraphics", "(", ")", ".", "drawImage", "(", "src", ",", "0", ",", "0", ",", "null", ")", ";", "return", "dest", ";", "}" ...
将一个image信息复制到另一个image中 @param src 源 @param dest 目标 @return dest
[ "将一个image信息复制到另一个image中" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/img/ImgUtil.java#L214-L217
alkacon/opencms-core
src/org/opencms/search/CmsSearchManager.java
CmsSearchManager.updateIndexOffline
protected void updateIndexOffline(I_CmsReport report, List<CmsPublishedResource> resourcesToIndex) { """ Updates the offline search indexes for the given list of resources.<p> @param report the report to write the index information to @param resourcesToIndex the list of {@link CmsPublishedResource} objects to ...
java
protected void updateIndexOffline(I_CmsReport report, List<CmsPublishedResource> resourcesToIndex) { CmsObject cms = m_adminCms; try { // copy the administration context for the indexing cms = OpenCms.initCmsObject(m_adminCms); // set site root and project for this i...
[ "protected", "void", "updateIndexOffline", "(", "I_CmsReport", "report", ",", "List", "<", "CmsPublishedResource", ">", "resourcesToIndex", ")", "{", "CmsObject", "cms", "=", "m_adminCms", ";", "try", "{", "// copy the administration context for the indexing", "cms", "=...
Updates the offline search indexes for the given list of resources.<p> @param report the report to write the index information to @param resourcesToIndex the list of {@link CmsPublishedResource} objects to index
[ "Updates", "the", "offline", "search", "indexes", "for", "the", "given", "list", "of", "resources", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchManager.java#L3070-L3095
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.getNextTypeName
private String getNextTypeName(String className, String groupName, String sequenceName, boolean isLast) { """ Obtains the name of the next type of the sequence. @param className The name of the class which contains the sequence. @param groupName The groupName of this sequence, if any. @param sequenceName The se...
java
private String getNextTypeName(String className, String groupName, String sequenceName, boolean isLast){ if (isLast) return groupName == null ? className + "Complete" : className; else return className + firstToUpper(sequenceName); }
[ "private", "String", "getNextTypeName", "(", "String", "className", ",", "String", "groupName", ",", "String", "sequenceName", ",", "boolean", "isLast", ")", "{", "if", "(", "isLast", ")", "return", "groupName", "==", "null", "?", "className", "+", "\"Complete...
Obtains the name of the next type of the sequence. @param className The name of the class which contains the sequence. @param groupName The groupName of this sequence, if any. @param sequenceName The sequence name. @param isLast Indication if the next type will be the last of the sequence. @return The next sequence typ...
[ "Obtains", "the", "name", "of", "the", "next", "type", "of", "the", "sequence", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L466-L471
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ContainerServicesInner.java
ContainerServicesInner.getByResourceGroupAsync
public Observable<ContainerServiceInner> getByResourceGroupAsync(String resourceGroupName, String containerServiceName) { """ Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the p...
java
public Observable<ContainerServiceInner> getByResourceGroupAsync(String resourceGroupName, String containerServiceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerServiceName).map(new Func1<ServiceResponse<ContainerServiceInner>, ContainerServiceInner>() { @Overr...
[ "public", "Observable", "<", "ContainerServiceInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "containerServiceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "containerServiceNam...
Gets the properties of the specified container service. Gets the properties of the specified container service in the specified subscription and resource group. The operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. @param resourceGroupName Th...
[ "Gets", "the", "properties", "of", "the", "specified", "container", "service", ".", "Gets", "the", "properties", "of", "the", "specified", "container", "service", "in", "the", "specified", "subscription", "and", "resource", "group", ".", "The", "operation", "ret...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ContainerServicesInner.java#L434-L441
ehcache/ehcache3
clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ClusteringServiceConfigurationBuilder.java
ClusteringServiceConfigurationBuilder.readOperationTimeout
@Deprecated public ClusteringServiceConfigurationBuilder readOperationTimeout(long duration, TimeUnit unit) { """ Adds a read operation timeout. Read operations which time out return a result comparable to a cache miss. @param duration the amount of time permitted for read operations @param unit the time u...
java
@Deprecated public ClusteringServiceConfigurationBuilder readOperationTimeout(long duration, TimeUnit unit) { Duration readTimeout = Duration.of(duration, toChronoUnit(unit)); return timeouts(TimeoutsBuilder.timeouts().read(readTimeout).build()); }
[ "@", "Deprecated", "public", "ClusteringServiceConfigurationBuilder", "readOperationTimeout", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "Duration", "readTimeout", "=", "Duration", ".", "of", "(", "duration", ",", "toChronoUnit", "(", "unit", ")", ...
Adds a read operation timeout. Read operations which time out return a result comparable to a cache miss. @param duration the amount of time permitted for read operations @param unit the time units for {@code duration} @return a clustering service configuration builder @throws NullPointerException if {@code unit} i...
[ "Adds", "a", "read", "operation", "timeout", ".", "Read", "operations", "which", "time", "out", "return", "a", "result", "comparable", "to", "a", "cache", "miss", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ClusteringServiceConfigurationBuilder.java#L138-L142
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java
MmtfActions.writeToOutputStream
public static void writeToOutputStream(Structure structure, OutputStream outputStream) throws IOException { """ Write a Structure object to an {@link OutputStream} @param structure the Structure to write @param outputStream the {@link OutputStream} to write to @throws IOException an error transferring the byte[...
java
public static void writeToOutputStream(Structure structure, OutputStream outputStream) throws IOException{ // Set up this writer AdapterToStructureData writerToEncoder = new AdapterToStructureData(); // Get the writer - this is what people implement new MmtfStructureWriter(structure, writerToEncoder); // Now ...
[ "public", "static", "void", "writeToOutputStream", "(", "Structure", "structure", ",", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "// Set up this writer", "AdapterToStructureData", "writerToEncoder", "=", "new", "AdapterToStructureData", "(", ")", ...
Write a Structure object to an {@link OutputStream} @param structure the Structure to write @param outputStream the {@link OutputStream} to write to @throws IOException an error transferring the byte[]
[ "Write", "a", "Structure", "object", "to", "an", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java#L78-L86
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/io/IO.java
IO.writeFile
public static void writeFile(IFile file, final FileOutput output, IProgressMonitor monitor) throws CoreException { """ Write the contents of a file in the Eclipse workspace. @param file the file to write to @param output the FileOutput object responsible for generating the data @param monitor a progress mo...
java
public static void writeFile(IFile file, final FileOutput output, IProgressMonitor monitor) throws CoreException { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); output.writeFile(bos); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); ...
[ "public", "static", "void", "writeFile", "(", "IFile", "file", ",", "final", "FileOutput", "output", ",", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "try", "{", "ByteArrayOutputStream", "bos", "=", "new", "ByteArrayOutputStream", "(", ")",...
Write the contents of a file in the Eclipse workspace. @param file the file to write to @param output the FileOutput object responsible for generating the data @param monitor a progress monitor (or null if none) @throws CoreException
[ "Write", "the", "contents", "of", "a", "file", "in", "the", "Eclipse", "workspace", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/io/IO.java#L58-L74
LearnLib/automatalib
util/src/main/java/net/automatalib/util/minimizer/TransitionLabel.java
TransitionLabel.addToBucket
public boolean addToBucket(State<S, EP> state) { """ Adds a state to this label's bucket. @param state the state to be added to the bucket. @return <code>true</code> if this is the first state to be added to the bucket, <code>false</code> otherwise. """ boolean first = false; if (bucket...
java
public boolean addToBucket(State<S, EP> state) { boolean first = false; if (bucket.isEmpty()) { first = true; } bucket.pushBack(state); return first; }
[ "public", "boolean", "addToBucket", "(", "State", "<", "S", ",", "EP", ">", "state", ")", "{", "boolean", "first", "=", "false", ";", "if", "(", "bucket", ".", "isEmpty", "(", ")", ")", "{", "first", "=", "true", ";", "}", "bucket", ".", "pushBack"...
Adds a state to this label's bucket. @param state the state to be added to the bucket. @return <code>true</code> if this is the first state to be added to the bucket, <code>false</code> otherwise.
[ "Adds", "a", "state", "to", "this", "label", "s", "bucket", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/minimizer/TransitionLabel.java#L75-L84
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.queryBean
public static <T> T queryBean(String sql, Class<T> beanType, Object[] params) throws YankSQLException { """ Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned using the default connection pool. @param sql The SQL statement @param params The ...
java
public static <T> T queryBean(String sql, Class<T> beanType, Object[] params) throws YankSQLException { return queryBean(YankPoolManager.DEFAULT_POOL_NAME, sql, beanType, params); }
[ "public", "static", "<", "T", ">", "T", "queryBean", "(", "String", "sql", ",", "Class", "<", "T", ">", "beanType", ",", "Object", "[", "]", "params", ")", "throws", "YankSQLException", "{", "return", "queryBean", "(", "YankPoolManager", ".", "DEFAULT_POOL...
Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned using the default connection pool. @param sql The SQL statement @param params The replacement parameters @param beanType The Class of the desired return Object matching the table @return The Object
[ "Return", "just", "one", "Bean", "given", "an", "SQL", "statement", ".", "If", "more", "than", "one", "row", "match", "the", "query", "only", "the", "first", "row", "is", "returned", "using", "the", "default", "connection", "pool", "." ]
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L379-L383
hawkular/hawkular-alerts
engine/src/main/java/org/hawkular/alerts/engine/impl/ispn/IspnActionsServiceImpl.java
IspnActionsServiceImpl.inClause
private String inClause(String field, Set<String> values) { """ An exploded "in" clause because the actual one seems not to work """ String separator = ""; StringBuffer sb = new StringBuffer(" and ("); for (String v : values) { sb.append(separator); sb.append(Str...
java
private String inClause(String field, Set<String> values) { String separator = ""; StringBuffer sb = new StringBuffer(" and ("); for (String v : values) { sb.append(separator); sb.append(String.format("%s = '%s'", field, v)); separator = " or "; } ...
[ "private", "String", "inClause", "(", "String", "field", ",", "Set", "<", "String", ">", "values", ")", "{", "String", "separator", "=", "\"\"", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "\" and (\"", ")", ";", "for", "(", "String", "v"...
An exploded "in" clause because the actual one seems not to work
[ "An", "exploded", "in", "clause", "because", "the", "actual", "one", "seems", "not", "to", "work" ]
train
https://github.com/hawkular/hawkular-alerts/blob/b4a0c2909b38e03e72cc1828219562ee8fcbf426/engine/src/main/java/org/hawkular/alerts/engine/impl/ispn/IspnActionsServiceImpl.java#L227-L237
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.addColTimes
public static void addColTimes(Matrix matrix, long diag, long fromRow, long col, double factor) { """ Add a factor times one column to another column @param matrix the matrix to modify @param diag coordinate on the diagonal @param fromRow first row to process @param col column to process @param factor ...
java
public static void addColTimes(Matrix matrix, long diag, long fromRow, long col, double factor) { long rows = matrix.getRowCount(); for (long row = fromRow; row < rows; row++) { matrix.setAsDouble( matrix.getAsDouble(row, col) - factor * matrix.getAsDouble(row, diag), row, col); } }
[ "public", "static", "void", "addColTimes", "(", "Matrix", "matrix", ",", "long", "diag", ",", "long", "fromRow", ",", "long", "col", ",", "double", "factor", ")", "{", "long", "rows", "=", "matrix", ".", "getRowCount", "(", ")", ";", "for", "(", "long"...
Add a factor times one column to another column @param matrix the matrix to modify @param diag coordinate on the diagonal @param fromRow first row to process @param col column to process @param factor factor to multiply
[ "Add", "a", "factor", "times", "one", "column", "to", "another", "column" ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L540-L546
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.showOverlay
public static void showOverlay(Element element, boolean show) { """ Sets a CSS class to show or hide a given overlay. Will not add an overlay to the element.<p> @param element the parent element of the overlay @param show <code>true</code> to show the overlay """ if (show) { element.re...
java
public static void showOverlay(Element element, boolean show) { if (show) { element.removeClassName(I_CmsLayoutBundle.INSTANCE.generalCss().hideOverlay()); } else { element.addClassName(I_CmsLayoutBundle.INSTANCE.generalCss().hideOverlay()); } }
[ "public", "static", "void", "showOverlay", "(", "Element", "element", ",", "boolean", "show", ")", "{", "if", "(", "show", ")", "{", "element", ".", "removeClassName", "(", "I_CmsLayoutBundle", ".", "INSTANCE", ".", "generalCss", "(", ")", ".", "hideOverlay"...
Sets a CSS class to show or hide a given overlay. Will not add an overlay to the element.<p> @param element the parent element of the overlay @param show <code>true</code> to show the overlay
[ "Sets", "a", "CSS", "class", "to", "show", "or", "hide", "a", "given", "overlay", ".", "Will", "not", "add", "an", "overlay", "to", "the", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L2056-L2063
liferay/com-liferay-commerce
commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentEntryPersistenceImpl.java
CommerceUserSegmentEntryPersistenceImpl.filterFindByGroupId
@Override public List<CommerceUserSegmentEntry> filterFindByGroupId(long groupId, int start, int end) { """ Returns a range of all the commerce user segment entries that the user has permission to view where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> i...
java
@Override public List<CommerceUserSegmentEntry> filterFindByGroupId(long groupId, int start, int end) { return filterFindByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceUserSegmentEntry", ">", "filterFindByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "filterFindByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ...
Returns a range of all the commerce user segment entries that the user has permission to view where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "user", "segment", "entries", "that", "the", "user", "has", "permission", "to", "view", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentEntryPersistenceImpl.java#L569-L573
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.optionalEnd
public DateTimeFormatterBuilder optionalEnd() { """ Ends an optional section. <p> The output of printing can include optional sections, which may be nested. An optional section is started by calling {@link #optionalStart()} and ended using this method (or at the end of the builder). <p> Calling this method w...
java
public DateTimeFormatterBuilder optionalEnd() { if (active.parent == null) { throw new IllegalStateException("Cannot call optionalEnd() as there was no previous call to optionalStart()"); } if (active.printerParsers.size() > 0) { CompositePrinterParser cpp = new Composite...
[ "public", "DateTimeFormatterBuilder", "optionalEnd", "(", ")", "{", "if", "(", "active", ".", "parent", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot call optionalEnd() as there was no previous call to optionalStart()\"", ")", ";", "}", ...
Ends an optional section. <p> The output of printing can include optional sections, which may be nested. An optional section is started by calling {@link #optionalStart()} and ended using this method (or at the end of the builder). <p> Calling this method without having previously called {@code optionalStart} will thro...
[ "Ends", "an", "optional", "section", ".", "<p", ">", "The", "output", "of", "printing", "can", "include", "optional", "sections", "which", "may", "be", "nested", ".", "An", "optional", "section", "is", "started", "by", "calling", "{", "@link", "#optionalStar...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L1813-L1825
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java
XBasePanel.printScreen
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { """ Print this screen's content area. @param out The out stream. @exception DBException File exception. """ int iPrintOptions = this.getScreenField().getPrintOptions(); this.getScreenField().printControl...
java
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { int iPrintOptions = this.getScreenField().getPrintOptions(); this.getScreenField().printControl(out, iPrintOptions); this.getScreenField().printData(out, iPrintOptions); }
[ "public", "void", "printScreen", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "int", "iPrintOptions", "=", "this", ".", "getScreenField", "(", ")", ".", "getPrintOptions", "(", ")", ";", "this", ".", "getScreenFie...
Print this screen's content area. @param out The out stream. @exception DBException File exception.
[ "Print", "this", "screen", "s", "content", "area", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBasePanel.java#L374-L380
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F2.orElse
public F2<P1, P2, R> orElse(final Func2<? super P1, ? super P2, ? extends R> fallback) { """ Returns a composed function that when applied, try to apply this function first, in case a {@link NotAppliedException} is captured apply to the fallback function specified. This method helps to implement partial function...
java
public F2<P1, P2, R> orElse(final Func2<? super P1, ? super P2, ? extends R> fallback) { final F2<P1, P2, R> me = this; return new F2<P1, P2, R>() { @Override public R apply(P1 p1, P2 p2) { try { return me.apply(p1, p2);...
[ "public", "F2", "<", "P1", ",", "P2", ",", "R", ">", "orElse", "(", "final", "Func2", "<", "?", "super", "P1", ",", "?", "super", "P2", ",", "?", "extends", "R", ">", "fallback", ")", "{", "final", "F2", "<", "P1", ",", "P2", ",", "R", ">", ...
Returns a composed function that when applied, try to apply this function first, in case a {@link NotAppliedException} is captured apply to the fallback function specified. This method helps to implement partial function @param fallback the function to applied if this function doesn't apply to the parameter(s) @return...
[ "Returns", "a", "composed", "function", "that", "when", "applied", "try", "to", "apply", "this", "function", "first", "in", "case", "a", "{", "@link", "NotAppliedException", "}", "is", "captured", "apply", "to", "the", "fallback", "function", "specified", ".",...
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L1038-L1050
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/resources/MFSResource.java
MFSResource.getMFS
public String getMFS(final TreeMultimap<Integer, String> mfsMap) { """ Get the MFS from a lemma#posClass entry, e.g., house#n. @param mfsMap map to get the MFS from @return the most frequent sense """ final SortedSet<String> mfs = mfsMap.get(mfsMap.keySet().first()); return mfs.first(); }
java
public String getMFS(final TreeMultimap<Integer, String> mfsMap) { final SortedSet<String> mfs = mfsMap.get(mfsMap.keySet().first()); return mfs.first(); }
[ "public", "String", "getMFS", "(", "final", "TreeMultimap", "<", "Integer", ",", "String", ">", "mfsMap", ")", "{", "final", "SortedSet", "<", "String", ">", "mfs", "=", "mfsMap", ".", "get", "(", "mfsMap", ".", "keySet", "(", ")", ".", "first", "(", ...
Get the MFS from a lemma#posClass entry, e.g., house#n. @param mfsMap map to get the MFS from @return the most frequent sense
[ "Get", "the", "MFS", "from", "a", "lemma#posClass", "entry", "e", ".", "g", ".", "house#n", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/resources/MFSResource.java#L297-L300
bluelinelabs/LoganSquare
core/src/main/java/com/bluelinelabs/logansquare/LoganSquare.java
LoganSquare.mapperFor
@SuppressWarnings("unchecked") public static <E> JsonMapper<E> mapperFor(ParameterizedType<E> type) throws NoSuchMapperException { """ Returns a JsonMapper for a given class that has been annotated with @JsonObject. @param type The ParameterizedType for which the JsonMapper should be fetched. """ ...
java
@SuppressWarnings("unchecked") public static <E> JsonMapper<E> mapperFor(ParameterizedType<E> type) throws NoSuchMapperException { return mapperFor(type, null); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "E", ">", "JsonMapper", "<", "E", ">", "mapperFor", "(", "ParameterizedType", "<", "E", ">", "type", ")", "throws", "NoSuchMapperException", "{", "return", "mapperFor", "(", "type", ...
Returns a JsonMapper for a given class that has been annotated with @JsonObject. @param type The ParameterizedType for which the JsonMapper should be fetched.
[ "Returns", "a", "JsonMapper", "for", "a", "given", "class", "that", "has", "been", "annotated", "with", "@JsonObject", "." ]
train
https://github.com/bluelinelabs/LoganSquare/blob/6c5ec5281fb58d85a99413b7b6f55e9ef18a6e06/core/src/main/java/com/bluelinelabs/logansquare/LoganSquare.java#L315-L318
zanata/openprops
src/main/java/org/fedorahosted/openprops/Properties.java
Properties.setComment
public void setComment(String key, String comment) { """ Sets the comment for the specified key. Each line of the comment will be preceded by the comment marker "#", and leading and trailing whitespace will not be preserved. <br> Note: if you set a comment, you must set a corresponding value before calling s...
java
public void setComment(String key, String comment) { if (comment == null) throw new NullPointerException(); setRawComment(key, uncookComment(comment)); }
[ "public", "void", "setComment", "(", "String", "key", ",", "String", "comment", ")", "{", "if", "(", "comment", "==", "null", ")", "throw", "new", "NullPointerException", "(", ")", ";", "setRawComment", "(", "key", ",", "uncookComment", "(", "comment", ")"...
Sets the comment for the specified key. Each line of the comment will be preceded by the comment marker "#", and leading and trailing whitespace will not be preserved. <br> Note: if you set a comment, you must set a corresponding value before calling store or storeToXML. @param key property key whose comment should b...
[ "Sets", "the", "comment", "for", "the", "specified", "key", ".", "Each", "line", "of", "the", "comment", "will", "be", "preceded", "by", "the", "comment", "marker", "#", "and", "leading", "and", "trailing", "whitespace", "will", "not", "be", "preserved", "...
train
https://github.com/zanata/openprops/blob/46510e610a765e4a91b302fc0d6a2123ed589603/src/main/java/org/fedorahosted/openprops/Properties.java#L1276-L1280
apache/incubator-zipkin
zipkin-storage/mysql-v1/src/main/java/zipkin2/storage/mysql/v1/Schema.java
Schema.maybeGet
static <T> T maybeGet(Record record, TableField<Record, T> field, T defaultValue) { """ returns the default value if the column doesn't exist or the result was null """ if (record.fieldsRow().indexOf(field) < 0) { return defaultValue; } else { T result = record.get(field); return resu...
java
static <T> T maybeGet(Record record, TableField<Record, T> field, T defaultValue) { if (record.fieldsRow().indexOf(field) < 0) { return defaultValue; } else { T result = record.get(field); return result != null ? result : defaultValue; } }
[ "static", "<", "T", ">", "T", "maybeGet", "(", "Record", "record", ",", "TableField", "<", "Record", ",", "T", ">", "field", ",", "T", "defaultValue", ")", "{", "if", "(", "record", ".", "fieldsRow", "(", ")", ".", "indexOf", "(", "field", ")", "<"...
returns the default value if the column doesn't exist or the result was null
[ "returns", "the", "default", "value", "if", "the", "column", "doesn", "t", "exist", "or", "the", "result", "was", "null" ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-storage/mysql-v1/src/main/java/zipkin2/storage/mysql/v1/Schema.java#L157-L164
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.extractColumn
public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) { """ Extracts the column from a matrix. @param a Input matrix @param column Which column is to be extracted @param out output. Storage for the extracted column. If null then a new vector will be returned. @return The extrac...
java
public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) { if( out == null) out = new DMatrixRMaj(a.numRows,1); else if( !MatrixFeatures_DDRM.isVector(out) || out.getNumElements() != a.numRows ) throw new MatrixDimensionException("Output must be a ve...
[ "public", "static", "DMatrixRMaj", "extractColumn", "(", "DMatrixRMaj", "a", ",", "int", "column", ",", "DMatrixRMaj", "out", ")", "{", "if", "(", "out", "==", "null", ")", "out", "=", "new", "DMatrixRMaj", "(", "a", ".", "numRows", ",", "1", ")", ";",...
Extracts the column from a matrix. @param a Input matrix @param column Which column is to be extracted @param out output. Storage for the extracted column. If null then a new vector will be returned. @return The extracted column.
[ "Extracts", "the", "column", "from", "a", "matrix", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1348-L1359
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/xml/ObjectTreeParser.java
ObjectTreeParser.findField
private Field findField(Class clazz, String name) { """ Find a field in a class by it's name. Note that this method is only needed because the general reflection method is case sensitive @param clazz The clazz to search @param name The name of the field to search for @return The field or null if none could ...
java
private Field findField(Class clazz, String name) { Field[] fields = clazz.getDeclaredFields(); for (int i=0;i<fields.length;i++) { if (fields[i].getName().equalsIgnoreCase(name)) { if (fields[i].getType().isPrimitive()) { return fields[i]; } if (fields[i].getType() == String.class) { ...
[ "private", "Field", "findField", "(", "Class", "clazz", ",", "String", "name", ")", "{", "Field", "[", "]", "fields", "=", "clazz", ".", "getDeclaredFields", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fields", ".", "length", "...
Find a field in a class by it's name. Note that this method is only needed because the general reflection method is case sensitive @param clazz The clazz to search @param name The name of the field to search for @return The field or null if none could be located
[ "Find", "a", "field", "in", "a", "class", "by", "it", "s", "name", ".", "Note", "that", "this", "method", "is", "only", "needed", "because", "the", "general", "reflection", "method", "is", "case", "sensitive" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/xml/ObjectTreeParser.java#L354-L368
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateEnded.java
JingleSessionStateEnded.processJingle
@Override public IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) { """ Pretty much nothing is valid for receiving once we've ended the session. """ IQ response; response = session.createJingleError(jingle, JingleError.MALFORMED_STANZA); return respo...
java
@Override public IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) { IQ response; response = session.createJingleError(jingle, JingleError.MALFORMED_STANZA); return response; }
[ "@", "Override", "public", "IQ", "processJingle", "(", "JingleSession", "session", ",", "Jingle", "jingle", ",", "JingleActionEnum", "action", ")", "{", "IQ", "response", ";", "response", "=", "session", ".", "createJingleError", "(", "jingle", ",", "JingleError...
Pretty much nothing is valid for receiving once we've ended the session.
[ "Pretty", "much", "nothing", "is", "valid", "for", "receiving", "once", "we", "ve", "ended", "the", "session", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionStateEnded.java#L69-L76
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyDomainAxiomImpl_CustomFieldSerializer.java
OWLObjectPropertyDomainAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectPropertyDomainAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.g...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectPropertyDomainAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectPropertyDomainAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyDomainAxiomImpl_CustomFieldSerializer.java#L76-L79
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_disks_id_monitoring_GET
public OvhUnitAndValues<OvhVpsTimestampValue> serviceName_disks_id_monitoring_GET(String serviceName, Long id, OvhVpsMonitoringPeriodEnum period, OvhStatisticTypeEnum type) throws IOException { """ Return many statistics about the disk for a given period REST: GET /vps/{serviceName}/disks/{id}/monitoring @para...
java
public OvhUnitAndValues<OvhVpsTimestampValue> serviceName_disks_id_monitoring_GET(String serviceName, Long id, OvhVpsMonitoringPeriodEnum period, OvhStatisticTypeEnum type) throws IOException { String qPath = "/vps/{serviceName}/disks/{id}/monitoring"; StringBuilder sb = path(qPath, serviceName, id); query(sb, "p...
[ "public", "OvhUnitAndValues", "<", "OvhVpsTimestampValue", ">", "serviceName_disks_id_monitoring_GET", "(", "String", "serviceName", ",", "Long", "id", ",", "OvhVpsMonitoringPeriodEnum", "period", ",", "OvhStatisticTypeEnum", "type", ")", "throws", "IOException", "{", "St...
Return many statistics about the disk for a given period REST: GET /vps/{serviceName}/disks/{id}/monitoring @param type [required] The type of statistic to be fetched @param period [required] The period the statistics are fetched for @param serviceName [required] The internal name of your VPS offer @param id [required...
[ "Return", "many", "statistics", "about", "the", "disk", "for", "a", "given", "period" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L925-L932
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java
HelpFormatter.renderWrappedText
public static void renderWrappedText(StringBuilder sb, int width, int nextLineTabStop, String text) { """ Render the specified text and return the rendered Options in a StringBuilder. @param sb the StringBuilder to place the rendered text into @param width the number of characters to display per line @param ...
java
public static void renderWrappedText(StringBuilder sb, int width, int nextLineTabStop, String text) { int pos = OptionUtils.findWrapPos(text, width, 0); if (pos == -1) { sb.append(OptionUtils.rtrim(text)); return; } sb.append(OptionUtils.rtrim(text.substring(0, po...
[ "public", "static", "void", "renderWrappedText", "(", "StringBuilder", "sb", ",", "int", "width", ",", "int", "nextLineTabStop", ",", "String", "text", ")", "{", "int", "pos", "=", "OptionUtils", ".", "findWrapPos", "(", "text", ",", "width", ",", "0", ")"...
Render the specified text and return the rendered Options in a StringBuilder. @param sb the StringBuilder to place the rendered text into @param width the number of characters to display per line @param nextLineTabStop the position on the next line for the first tab @param text the text to be rendered
[ "Render", "the", "specified", "text", "and", "return", "the", "rendered", "Options", "in", "a", "StringBuilder", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java#L539-L565
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.anySatisfy
public static <T> boolean anySatisfy(Iterable<T> iterable, Predicate<? super T> predicate) { """ Returns true if the predicate evaluates to true for any element of the iterable. Returns false if the iterable is empty or if no elements return true for the predicate. """ if (iterable instanceof RichIter...
java
public static <T> boolean anySatisfy(Iterable<T> iterable, Predicate<? super T> predicate) { if (iterable instanceof RichIterable) { return ((RichIterable<T>) iterable).anySatisfy(predicate); } if (iterable instanceof ArrayList) { return ArrayListItera...
[ "public", "static", "<", "T", ">", "boolean", "anySatisfy", "(", "Iterable", "<", "T", ">", "iterable", ",", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "if", "(", "iterable", "instanceof", "RichIterable", ")", "{", "return", "(", ...
Returns true if the predicate evaluates to true for any element of the iterable. Returns false if the iterable is empty or if no elements return true for the predicate.
[ "Returns", "true", "if", "the", "predicate", "evaluates", "to", "true", "for", "any", "element", "of", "the", "iterable", ".", "Returns", "false", "if", "the", "iterable", "is", "empty", "or", "if", "no", "elements", "return", "true", "for", "the", "predic...
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L2796-L2815
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java
AjaxAddableTabbedPanel.onNewTab
public void onNewTab(final AjaxRequestTarget target, final T tab, final int index) { """ On new tab. @param target the target @param tab the tab @param index the index """ if ((index < 0) || (index >= getTabs().size())) { throw new IndexOutOfBoundsException(); } getTabs().add(index, tab); ...
java
public void onNewTab(final AjaxRequestTarget target, final T tab, final int index) { if ((index < 0) || (index >= getTabs().size())) { throw new IndexOutOfBoundsException(); } getTabs().add(index, tab); setSelectedTab(index); target.add(this); }
[ "public", "void", "onNewTab", "(", "final", "AjaxRequestTarget", "target", ",", "final", "T", "tab", ",", "final", "int", "index", ")", "{", "if", "(", "(", "index", "<", "0", ")", "||", "(", "index", ">=", "getTabs", "(", ")", ".", "size", "(", ")...
On new tab. @param target the target @param tab the tab @param index the index
[ "On", "new", "tab", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L733-L742
alkacon/opencms-core
src/org/opencms/db/CmsPublishList.java
CmsPublishList.checkContainsSubResources
protected CmsResource checkContainsSubResources(CmsObject cms, List<CmsResource> folders) throws CmsException { """ Checks whether the publish list contains all sub-resources of a list of folders.<p> @param cms the current CMS context @param folders the folders which should be checked @return a folder from th...
java
protected CmsResource checkContainsSubResources(CmsObject cms, List<CmsResource> folders) throws CmsException { for (CmsResource folder : folders) { if (!containsSubResources(cms, folder)) { return folder; } } return null; }
[ "protected", "CmsResource", "checkContainsSubResources", "(", "CmsObject", "cms", ",", "List", "<", "CmsResource", ">", "folders", ")", "throws", "CmsException", "{", "for", "(", "CmsResource", "folder", ":", "folders", ")", "{", "if", "(", "!", "containsSubReso...
Checks whether the publish list contains all sub-resources of a list of folders.<p> @param cms the current CMS context @param folders the folders which should be checked @return a folder from the list if one of its sub-resources is not contained in the publish list, otherwise null @throws CmsException if something go...
[ "Checks", "whether", "the", "publish", "list", "contains", "all", "sub", "-", "resources", "of", "a", "list", "of", "folders", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsPublishList.java#L594-L603
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.sendDTMF
public ApiSuccessResponse sendDTMF(String id, SendDTMFData sendDTMFData) throws ApiException { """ Send digits as DTMF Send DTMF digits to the specified call. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. @param id The connection ID of the call. (re...
java
public ApiSuccessResponse sendDTMF(String id, SendDTMFData sendDTMFData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendDTMFWithHttpInfo(id, sendDTMFData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "sendDTMF", "(", "String", "id", ",", "SendDTMFData", "sendDTMFData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "sendDTMFWithHttpInfo", "(", "id", ",", "sendDTMFData", ")", ";", ...
Send digits as DTMF Send DTMF digits to the specified call. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. @param id The connection ID of the call. (required) @param sendDTMFData (required) @return ApiSuccessResponse @throws ApiException If fail to call th...
[ "Send", "digits", "as", "DTMF", "Send", "DTMF", "digits", "to", "the", "specified", "call", ".", "You", "can", "send", "DTMF", "digits", "individually", "with", "multiple", "requests", "or", "together", "with", "multiple", "digits", "in", "one", "request", "...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L3361-L3364
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GridCell.java
GridCell.hasContactToAtom
public boolean hasContactToAtom(Point3d[] iAtoms, Point3d[] jAtoms, Point3d query, double cutoff) { """ Tests whether any atom in this cell has a contact with the specified query atom @param iAtoms the first set of atoms to which the iIndices correspond @param jAtoms the second set of atoms to which the jIndices...
java
public boolean hasContactToAtom(Point3d[] iAtoms, Point3d[] jAtoms, Point3d query, double cutoff) { for( int i : iIndices ) { double distance = iAtoms[i].distance(query); if( distance<cutoff) return true; } if (jAtoms!=null) { for( int i : jIndices ) { double distance = jAtoms[i].distance(query);...
[ "public", "boolean", "hasContactToAtom", "(", "Point3d", "[", "]", "iAtoms", ",", "Point3d", "[", "]", "jAtoms", ",", "Point3d", "query", ",", "double", "cutoff", ")", "{", "for", "(", "int", "i", ":", "iIndices", ")", "{", "double", "distance", "=", "...
Tests whether any atom in this cell has a contact with the specified query atom @param iAtoms the first set of atoms to which the iIndices correspond @param jAtoms the second set of atoms to which the jIndices correspond, or null @param query test point @param cutoff @return
[ "Tests", "whether", "any", "atom", "in", "this", "cell", "has", "a", "contact", "with", "the", "specified", "query", "atom" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GridCell.java#L153-L167
derari/cthul
objects/src/main/java/org/cthul/objects/Boxing.java
Boxing.deepBoxAs
public static <T> T deepBoxAs(Object src, Class<T> type) { """ Returns any multidimensional array into an array of boxed values. @param <T> @param src source array @param type target type @return multidimensional array """ return (T) deepBox(type, src); }
java
public static <T> T deepBoxAs(Object src, Class<T> type) { return (T) deepBox(type, src); }
[ "public", "static", "<", "T", ">", "T", "deepBoxAs", "(", "Object", "src", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "(", "T", ")", "deepBox", "(", "type", ",", "src", ")", ";", "}" ]
Returns any multidimensional array into an array of boxed values. @param <T> @param src source array @param type target type @return multidimensional array
[ "Returns", "any", "multidimensional", "array", "into", "an", "array", "of", "boxed", "values", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L745-L747
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java
RoleAssignmentsInner.getAsync
public Observable<RoleAssignmentInner> getAsync(String scope, String roleAssignmentName) { """ Get the specified role assignment. @param scope The scope of the role assignment. @param roleAssignmentName The name of the role assignment to get. @throws IllegalArgumentException thrown if parameters fail the vali...
java
public Observable<RoleAssignmentInner> getAsync(String scope, String roleAssignmentName) { return getWithServiceResponseAsync(scope, roleAssignmentName).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public RoleAssignmentInner call(ServiceResponse<...
[ "public", "Observable", "<", "RoleAssignmentInner", ">", "getAsync", "(", "String", "scope", ",", "String", "roleAssignmentName", ")", "{", "return", "getWithServiceResponseAsync", "(", "scope", ",", "roleAssignmentName", ")", ".", "map", "(", "new", "Func1", "<",...
Get the specified role assignment. @param scope The scope of the role assignment. @param roleAssignmentName The name of the role assignment to get. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RoleAssignmentInner object
[ "Get", "the", "specified", "role", "assignment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java#L859-L866
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java
ProcessGroovyMethods.consumeProcessOutputStream
public static Thread consumeProcessOutputStream(Process self, OutputStream output) { """ Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied OutputStream. A new Thread is started, so this method w...
java
public static Thread consumeProcessOutputStream(Process self, OutputStream output) { Thread thread = new Thread(new ByteDumper(self.getInputStream(), output)); thread.start(); return thread; }
[ "public", "static", "Thread", "consumeProcessOutputStream", "(", "Process", "self", ",", "OutputStream", "output", ")", "{", "Thread", "thread", "=", "new", "Thread", "(", "new", "ByteDumper", "(", "self", ".", "getInputStream", "(", ")", ",", "output", ")", ...
Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied OutputStream. A new Thread is started, so this method will return immediately. @param self a Process @param output an OutputStream to capture the proce...
[ "Gets", "the", "output", "stream", "from", "a", "process", "and", "reads", "it", "to", "keep", "the", "process", "from", "blocking", "due", "to", "a", "full", "output", "buffer", ".", "The", "processed", "stream", "data", "is", "appended", "to", "the", "...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java#L334-L338
eclipse/xtext-core
org.eclipse.xtext.util/src/org/eclipse/xtext/util/OnChangeEvictingCache.java
OnChangeEvictingCache.get
@Override public <T> T get(Object key, Resource resource, Provider<T> provider) { """ Try to obtain the value that is cached for the given key in the given resource. If no value is cached, the provider is used to compute it and store it afterwards. @param resource the resource. If it is <code>null</code>, the p...
java
@Override public <T> T get(Object key, Resource resource, Provider<T> provider) { if(resource == null) { return provider.get(); } CacheAdapter adapter = getOrCreate(resource); T element = adapter.<T>internalGet(key); if (element==null) { element = provider.get(); cacheMiss(adapter); adapter.set(k...
[ "@", "Override", "public", "<", "T", ">", "T", "get", "(", "Object", "key", ",", "Resource", "resource", ",", "Provider", "<", "T", ">", "provider", ")", "{", "if", "(", "resource", "==", "null", ")", "{", "return", "provider", ".", "get", "(", ")"...
Try to obtain the value that is cached for the given key in the given resource. If no value is cached, the provider is used to compute it and store it afterwards. @param resource the resource. If it is <code>null</code>, the provider will be used to compute the value. @param key the cache key. May not be <code>null</co...
[ "Try", "to", "obtain", "the", "value", "that", "is", "cached", "for", "the", "given", "key", "in", "the", "given", "resource", ".", "If", "no", "value", "is", "cached", "the", "provider", "is", "used", "to", "compute", "it", "and", "store", "it", "afte...
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/OnChangeEvictingCache.java#L68-L86
ACRA/acra
acra-core/src/main/java/org/acra/builder/ReportBuilder.java
ReportBuilder.customData
@NonNull @SuppressWarnings("unused") public ReportBuilder customData(@NonNull String key, String value) { """ Sets an additional value to be added to {@link org.acra.ReportField#CUSTOM_DATA}. The value specified here takes precedence over globally specified custom data. @param key the key identifying...
java
@NonNull @SuppressWarnings("unused") public ReportBuilder customData(@NonNull String key, String value) { customData.put(key, value); return this; }
[ "@", "NonNull", "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "ReportBuilder", "customData", "(", "@", "NonNull", "String", "key", ",", "String", "value", ")", "{", "customData", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this"...
Sets an additional value to be added to {@link org.acra.ReportField#CUSTOM_DATA}. The value specified here takes precedence over globally specified custom data. @param key the key identifying the custom data @param value the value for the custom data entry @return the updated {@code ReportBuilder}
[ "Sets", "an", "additional", "value", "to", "be", "added", "to", "{", "@link", "org", ".", "acra", ".", "ReportField#CUSTOM_DATA", "}", ".", "The", "value", "specified", "here", "takes", "precedence", "over", "globally", "specified", "custom", "data", "." ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/builder/ReportBuilder.java#L122-L127
j-a-w-r/jawr-main-repo
jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/BundleProcessor.java
BundleProcessor.removeServletMappingFromPath
protected String removeServletMappingFromPath(String path, String mapping) { """ Remove the servlet mapping from the path @param path the path @param mapping the servlet mapping @return the path without the servlet mapping """ if (mapping != null && mapping.length() > 0) { int idx = path.indexOf(ma...
java
protected String removeServletMappingFromPath(String path, String mapping) { if (mapping != null && mapping.length() > 0) { int idx = path.indexOf(mapping); if (idx > -1) { path = path.substring(idx + mapping.length()); } path = PathNormalizer.asPath(path); } return path; }
[ "protected", "String", "removeServletMappingFromPath", "(", "String", "path", ",", "String", "mapping", ")", "{", "if", "(", "mapping", "!=", "null", "&&", "mapping", ".", "length", "(", ")", ">", "0", ")", "{", "int", "idx", "=", "path", ".", "indexOf",...
Remove the servlet mapping from the path @param path the path @param mapping the servlet mapping @return the path without the servlet mapping
[ "Remove", "the", "servlet", "mapping", "from", "the", "path" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/BundleProcessor.java#L983-L993
indeedeng/util
urlparsing/src/main/java/com/indeed/util/urlparsing/ParseUtils.java
ParseUtils.parseInt
public static int parseInt(String s, final int start, final int end) throws NumberFormatException { """ Parses out an int value from the provided string, equivalent to Integer.parseInt(s.substring(start, end)), but has significantly less overhead, no object creation and later garbage collection required """ ...
java
public static int parseInt(String s, final int start, final int end) throws NumberFormatException { return parseSignedInt(s, start, end); }
[ "public", "static", "int", "parseInt", "(", "String", "s", ",", "final", "int", "start", ",", "final", "int", "end", ")", "throws", "NumberFormatException", "{", "return", "parseSignedInt", "(", "s", ",", "start", ",", "end", ")", ";", "}" ]
Parses out an int value from the provided string, equivalent to Integer.parseInt(s.substring(start, end)), but has significantly less overhead, no object creation and later garbage collection required
[ "Parses", "out", "an", "int", "value", "from", "the", "provided", "string", "equivalent", "to", "Integer", ".", "parseInt", "(", "s", ".", "substring", "(", "start", "end", "))", "but", "has", "significantly", "less", "overhead", "no", "object", "creation", ...
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/urlparsing/src/main/java/com/indeed/util/urlparsing/ParseUtils.java#L21-L23
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINK.java
SLINK.step2
private void step2(DBIDRef id, DBIDArrayIter it, int n, DistanceQuery<? super O> distQuery, WritableDoubleDataStore m) { """ Second step: Determine the pairwise distances from all objects in the pointer representation to the new object with the specified id. @param id the id of the object to be inserted into t...
java
private void step2(DBIDRef id, DBIDArrayIter it, int n, DistanceQuery<? super O> distQuery, WritableDoubleDataStore m) { for(it.seek(0); it.getOffset() < n; it.advance()) { // M(i) = dist(i, n+1) m.putDouble(it, distQuery.distance(it, id)); } }
[ "private", "void", "step2", "(", "DBIDRef", "id", ",", "DBIDArrayIter", "it", ",", "int", "n", ",", "DistanceQuery", "<", "?", "super", "O", ">", "distQuery", ",", "WritableDoubleDataStore", "m", ")", "{", "for", "(", "it", ".", "seek", "(", "0", ")", ...
Second step: Determine the pairwise distances from all objects in the pointer representation to the new object with the specified id. @param id the id of the object to be inserted into the pointer representation @param it Array iterator @param n Last object @param distQuery Distance query @param m Data store
[ "Second", "step", ":", "Determine", "the", "pairwise", "distances", "from", "all", "objects", "in", "the", "pointer", "representation", "to", "the", "new", "object", "with", "the", "specified", "id", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINK.java#L162-L167
googlearchive/firebase-simple-login-java
src/main/java/com/firebase/simplelogin/SimpleLogin.java
SimpleLogin.loginWithFacebook
public void loginWithFacebook(final String appId, final String accessToken, final SimpleLoginAuthenticatedHandler completionHandler) { """ Login to Firebase using a Facebook token. The returned FirebaseSimpleLoginUser object will contain pertinent Facebook data accessible with getThirdPartyUserData(). @param a...
java
public void loginWithFacebook(final String appId, final String accessToken, final SimpleLoginAuthenticatedHandler completionHandler) { if(appId == null || accessToken == null) { handleInvalidInvalidToken(completionHandler); } else { HashMap<String, String> data = new HashMap<String, String>(); ...
[ "public", "void", "loginWithFacebook", "(", "final", "String", "appId", ",", "final", "String", "accessToken", ",", "final", "SimpleLoginAuthenticatedHandler", "completionHandler", ")", "{", "if", "(", "appId", "==", "null", "||", "accessToken", "==", "null", ")",...
Login to Firebase using a Facebook token. The returned FirebaseSimpleLoginUser object will contain pertinent Facebook data accessible with getThirdPartyUserData(). @param appId Facebook app id. @param accessToken Access token returned by Facebook SDK. @param completionHandler Handler for asynchronous events.
[ "Login", "to", "Firebase", "using", "a", "Facebook", "token", ".", "The", "returned", "FirebaseSimpleLoginUser", "object", "will", "contain", "pertinent", "Facebook", "data", "accessible", "with", "getThirdPartyUserData", "()", "." ]
train
https://github.com/googlearchive/firebase-simple-login-java/blob/40498ad173b5fa69c869ba0d29cec187271fda13/src/main/java/com/firebase/simplelogin/SimpleLogin.java#L659-L669
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getSubgraphAtomsMap
public static List<CDKRMap> getSubgraphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { """ Returns the first subgraph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomCon...
java
public static List<CDKRMap> getSubgraphAtomsMap(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<CDKRMap> list = checkSingleAtomCases(sourceGraph, targetGraph); if (list == null) { return makeAtomsMapOfBondsMap(CDKMCS.ge...
[ "public", "static", "List", "<", "CDKRMap", ">", "getSubgraphAtomsMap", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "CDKRMap", ">", "list", "=", "c...
Returns the first subgraph 'atom mapping' found for targetGraph in sourceGraph. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the first subgraph atom mapping found projected on sourceGraph. ...
[ "Returns", "the", "first", "subgraph", "atom", "mapping", "found", "for", "targetGraph", "in", "sourceGraph", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L327-L338
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.addExceptionRange
private void addExceptionRange(ProjectCalendarException exception, Date start, Date finish) { """ Add a range to an exception, ensure that we don't try to add null ranges. @param exception target exception @param start exception start @param finish exception finish """ if (start != null && finish !=...
java
private void addExceptionRange(ProjectCalendarException exception, Date start, Date finish) { if (start != null && finish != null) { exception.addRange(new DateRange(start, finish)); } }
[ "private", "void", "addExceptionRange", "(", "ProjectCalendarException", "exception", ",", "Date", "start", ",", "Date", "finish", ")", "{", "if", "(", "start", "!=", "null", "&&", "finish", "!=", "null", ")", "{", "exception", ".", "addRange", "(", "new", ...
Add a range to an exception, ensure that we don't try to add null ranges. @param exception target exception @param start exception start @param finish exception finish
[ "Add", "a", "range", "to", "an", "exception", "ensure", "that", "we", "don", "t", "try", "to", "add", "null", "ranges", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L702-L708
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/BaseFlowToJobSpecCompiler.java
BaseFlowToJobSpecCompiler.jobSpecGenerator
protected JobSpec jobSpecGenerator(FlowSpec flowSpec) { """ Naive implementation of generating jobSpec, which fetch the first available template, in an exemplified single-hop FlowCompiler implementation. @param flowSpec @return """ JobSpec jobSpec; JobSpec.Builder jobSpecBuilder = JobSpec.builder(jo...
java
protected JobSpec jobSpecGenerator(FlowSpec flowSpec) { JobSpec jobSpec; JobSpec.Builder jobSpecBuilder = JobSpec.builder(jobSpecURIGenerator(flowSpec)) .withConfig(flowSpec.getConfig()) .withDescription(flowSpec.getDescription()) .withVersion(flowSpec.getVersion()); if (flowSpec.ge...
[ "protected", "JobSpec", "jobSpecGenerator", "(", "FlowSpec", "flowSpec", ")", "{", "JobSpec", "jobSpec", ";", "JobSpec", ".", "Builder", "jobSpecBuilder", "=", "JobSpec", ".", "builder", "(", "jobSpecURIGenerator", "(", "flowSpec", ")", ")", ".", "withConfig", "...
Naive implementation of generating jobSpec, which fetch the first available template, in an exemplified single-hop FlowCompiler implementation. @param flowSpec @return
[ "Naive", "implementation", "of", "generating", "jobSpec", "which", "fetch", "the", "first", "available", "template", "in", "an", "exemplified", "single", "-", "hop", "FlowCompiler", "implementation", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/BaseFlowToJobSpecCompiler.java#L229-L271
samskivert/samskivert
src/main/java/com/samskivert/util/RandomUtil.java
RandomUtil.getWeightedIndex
public static int getWeightedIndex (float[] weights, Random r) { """ Pick a random index from the array, weighted by the value of the corresponding array element. @param weights an array of non-negative floats. @return an index into the array, or -1 if the sum of the weights is less than or equal to 0.0 or...
java
public static int getWeightedIndex (float[] weights, Random r) { float sum = 0.0f; for (float weight : weights) { if (weight < 0.0f) { return -1; } sum += weight; } if (sum <= 0.0) { return -1; } float p...
[ "public", "static", "int", "getWeightedIndex", "(", "float", "[", "]", "weights", ",", "Random", "r", ")", "{", "float", "sum", "=", "0.0f", ";", "for", "(", "float", "weight", ":", "weights", ")", "{", "if", "(", "weight", "<", "0.0f", ")", "{", "...
Pick a random index from the array, weighted by the value of the corresponding array element. @param weights an array of non-negative floats. @return an index into the array, or -1 if the sum of the weights is less than or equal to 0.0 or any individual element is negative. For example, passing in {0.2, 0.0, 0.6, 0....
[ "Pick", "a", "random", "index", "from", "the", "array", "weighted", "by", "the", "value", "of", "the", "corresponding", "array", "element", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/RandomUtil.java#L252-L275
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/AbstractAuthorizedOnly.java
AbstractAuthorizedOnly.httpClient
protected static HttpClient httpClient() throws Exception { """ Sets the Commons HttpComponents to accept all SSL Certificates. @throws Exception @return An instance of HttpClient that will accept all. """ return HttpClients.custom() .setHostnameVerifier(new AllowAllHostnameVerifier()) ...
java
protected static HttpClient httpClient() throws Exception { return HttpClients.custom() .setHostnameVerifier(new AllowAllHostnameVerifier()) .setSslcontext(SSLContexts.custom() .loadTrustMaterial(null, new TrustStrategy() { @Override public boolean isTrusted(X...
[ "protected", "static", "HttpClient", "httpClient", "(", ")", "throws", "Exception", "{", "return", "HttpClients", ".", "custom", "(", ")", ".", "setHostnameVerifier", "(", "new", "AllowAllHostnameVerifier", "(", ")", ")", ".", "setSslcontext", "(", "SSLContexts", ...
Sets the Commons HttpComponents to accept all SSL Certificates. @throws Exception @return An instance of HttpClient that will accept all.
[ "Sets", "the", "Commons", "HttpComponents", "to", "accept", "all", "SSL", "Certificates", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/AbstractAuthorizedOnly.java#L149-L161
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.countDistinct
public org.grails.datastore.mapping.query.api.ProjectionList countDistinct(String propertyName) { """ Adds a projection that allows the criteria to return the distinct property count @param propertyName The name of the property """ return countDistinct(propertyName, null); }
java
public org.grails.datastore.mapping.query.api.ProjectionList countDistinct(String propertyName) { return countDistinct(propertyName, null); }
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "ProjectionList", "countDistinct", "(", "String", "propertyName", ")", "{", "return", "countDistinct", "(", "propertyName", ",", "null", ")", ";", "}" ]
Adds a projection that allows the criteria to return the distinct property count @param propertyName The name of the property
[ "Adds", "a", "projection", "that", "allows", "the", "criteria", "to", "return", "the", "distinct", "property", "count" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L413-L415
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.eligibility_meetings_GET
public OvhAsyncTask<OvhMeetingSlots> eligibility_meetings_GET(String eligibilityId, String offerLabel) throws IOException { """ Search for meeting time slot REST: GET /xdsl/eligibility/meetings @param offerLabel [required] The choosen offer label @param eligibilityId [required] The eligibility test id @depre...
java
public OvhAsyncTask<OvhMeetingSlots> eligibility_meetings_GET(String eligibilityId, String offerLabel) throws IOException { String qPath = "/xdsl/eligibility/meetings"; StringBuilder sb = path(qPath); query(sb, "eligibilityId", eligibilityId); query(sb, "offerLabel", offerLabel); String resp = exec(qPath, "GE...
[ "public", "OvhAsyncTask", "<", "OvhMeetingSlots", ">", "eligibility_meetings_GET", "(", "String", "eligibilityId", ",", "String", "offerLabel", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/eligibility/meetings\"", ";", "StringBuilder", "sb", "=", ...
Search for meeting time slot REST: GET /xdsl/eligibility/meetings @param offerLabel [required] The choosen offer label @param eligibilityId [required] The eligibility test id @deprecated
[ "Search", "for", "meeting", "time", "slot" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L322-L329
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java
FlowControllerFactory.getPageFlowForRelativeURI
public static PageFlowController getPageFlowForRelativeURI( HttpServletRequest request, HttpServletResponse response, String path, ...
java
public static PageFlowController getPageFlowForRelativeURI( HttpServletRequest request, HttpServletResponse response, String path, ...
[ "public", "static", "PageFlowController", "getPageFlowForRelativeURI", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "String", "path", ",", "ServletContext", "servletContext", ")", "{", "try", "{", "return", "get", "(", "servletConte...
Get the page flow instance that should be associated with the given path. If it doesn't exist, create it. If one is created, the page flow stack (for nesting) will be cleared or pushed, and the new instance will be stored as the current page flow. @deprecated Use {@link #getPageFlowForPath(RequestContext, String)} ins...
[ "Get", "the", "page", "flow", "instance", "that", "should", "be", "associated", "with", "the", "given", "path", ".", "If", "it", "doesn", "t", "exist", "create", "it", ".", "If", "one", "is", "created", "the", "page", "flow", "stack", "(", "for", "nest...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java#L608-L627
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java
Instance.setTags
public Operation setTags(Iterable<String> tags, OperationOption... options) { """ Sets the tags for this instance, fingerprint value is taken from this instance's {@code tags().fingerprint()}. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws...
java
public Operation setTags(Iterable<String> tags, OperationOption... options) { return setTags(getTags().toBuilder().setValues(tags).build(), options); }
[ "public", "Operation", "setTags", "(", "Iterable", "<", "String", ">", "tags", ",", "OperationOption", "...", "options", ")", "{", "return", "setTags", "(", "getTags", "(", ")", ".", "toBuilder", "(", ")", ".", "setValues", "(", "tags", ")", ".", "build"...
Sets the tags for this instance, fingerprint value is taken from this instance's {@code tags().fingerprint()}. @return a zone operation if the set request was issued correctly, {@code null} if the instance was not found @throws ComputeException upon failure
[ "Sets", "the", "tags", "for", "this", "instance", "fingerprint", "value", "is", "taken", "from", "this", "instance", "s", "{", "@code", "tags", "()", ".", "fingerprint", "()", "}", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Instance.java#L405-L407
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerKeysInner.java
ServerKeysInner.beginCreateOrUpdateAsync
public ServiceFuture<ServerKeyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, final ServiceCallback<ServerKeyInner> serviceCallback) { """ Creates or updates a server key. @param resourceGroupName The name of the resource group that contain...
java
public ServiceFuture<ServerKeyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, final ServiceCallback<ServerKeyInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverNa...
[ "public", "ServiceFuture", "<", "ServerKeyInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "keyName", ",", "ServerKeyInner", "parameters", ",", "final", "ServiceCallback", "<", "ServerKeyInner", ">"...
Creates or updates a server key. @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 keyName The name of the server key to be operated on (updated or created). T...
[ "Creates", "or", "updates", "a", "server", "key", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerKeysInner.java#L421-L423
youseries/urule
urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java
DbPersistenceManager.store
public synchronized void store(NodeReferences refs) throws ItemStateException { """ {@inheritDoc} This method uses shared <code>PreparedStatements</code>, which must be used strictly sequentially. Because this method synchronizes on the persistence manager instance, there is no need to synchronize on the sha...
java
public synchronized void store(NodeReferences refs) throws ItemStateException { if (!initialized) { throw new IllegalStateException("not initialized"); } // check if insert or update boolean update = existsReferencesTo(refs.getTargetId()); String sql = (update) ? nod...
[ "public", "synchronized", "void", "store", "(", "NodeReferences", "refs", ")", "throws", "ItemStateException", "{", "if", "(", "!", "initialized", ")", "{", "throw", "new", "IllegalStateException", "(", "\"not initialized\"", ")", ";", "}", "// check if insert or up...
{@inheritDoc} This method uses shared <code>PreparedStatements</code>, which must be used strictly sequentially. Because this method synchronizes on the persistence manager instance, there is no need to synchronize on the shared statement. If the method would not be synchronized, the shared statement must be synchroni...
[ "{", "@inheritDoc", "}" ]
train
https://github.com/youseries/urule/blob/3fa0eb4439e97aa292e744bcbd88a9faa36661d8/urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java#L1006-L1031
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCheckBoxRenderer.java
WCheckBoxRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WCheckBox. @param component the WCheckBox to paint. @param renderContext the RenderContext to paint to. """ WCheckBox checkBox = (WCheckBox) component; XmlStringBuilder xml = rend...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCheckBox checkBox = (WCheckBox) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = checkBox.isReadOnly(); xml.appendTagOpen(TAG_NAME); xml.appendAttribute("id", component.getId...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WCheckBox", "checkBox", "=", "(", "WCheckBox", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderCo...
Paints the given WCheckBox. @param component the WCheckBox to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WCheckBox", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCheckBoxRenderer.java#L30-L68
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobExecutionsInner.java
JobExecutionsInner.beginCreateOrUpdateAsync
public Observable<JobExecutionInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { """ Creates or updatess a job execution. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this ...
java
public Observable<JobExecutionInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).map(new Func1<ServiceRes...
[ "public", "Observable", "<", "JobExecutionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "jobName", ",", "UUID", "jobExecutionId", ")", "{", "return", "beginCreate...
Creates or updatess a job execution. @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 jobAgentName The name of the job agent. @param jobName The name of the j...
[ "Creates", "or", "updatess", "a", "job", "execution", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobExecutionsInner.java#L1247-L1254
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisRepository.java
CmsCmisRepository.createPermission
private static PermissionDefinition createPermission(String permission, String description) { """ Creates a permission definition.<p> @param permission the permission name @param description the permission description @return the new permission definition """ PermissionDefinitionDataImpl pd =...
java
private static PermissionDefinition createPermission(String permission, String description) { PermissionDefinitionDataImpl pd = new PermissionDefinitionDataImpl(); pd.setId(permission); pd.setDescription(description); return pd; }
[ "private", "static", "PermissionDefinition", "createPermission", "(", "String", "permission", ",", "String", "description", ")", "{", "PermissionDefinitionDataImpl", "pd", "=", "new", "PermissionDefinitionDataImpl", "(", ")", ";", "pd", ".", "setId", "(", "permission"...
Creates a permission definition.<p> @param permission the permission name @param description the permission description @return the new permission definition
[ "Creates", "a", "permission", "definition", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisRepository.java#L245-L252
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/beans/PropertyChangeSupport.java
PropertyChangeSupport.firePropertyChange
public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { """ Reports a bound property update to listeners that have been registered to track updates of all properties or a property with the specified name. <p> No event is fired if old and new values are equal and non-null. <p> ...
java
public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { if (oldValue == null || newValue == null || !oldValue.equals(newValue)) { firePropertyChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue)); } }
[ "public", "void", "firePropertyChange", "(", "String", "propertyName", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "if", "(", "oldValue", "==", "null", "||", "newValue", "==", "null", "||", "!", "oldValue", ".", "equals", "(", "newValue",...
Reports a bound property update to listeners that have been registered to track updates of all properties or a property with the specified name. <p> No event is fired if old and new values are equal and non-null. <p> This is merely a convenience wrapper around the more general {@link #firePropertyChange(PropertyChangeE...
[ "Reports", "a", "bound", "property", "update", "to", "listeners", "that", "have", "been", "registered", "to", "track", "updates", "of", "all", "properties", "or", "a", "property", "with", "the", "specified", "name", ".", "<p", ">", "No", "event", "is", "fi...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/beans/PropertyChangeSupport.java#L261-L265
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/remote/ResponseAttachmentInputStreamSupport.java
ResponseAttachmentInputStreamSupport.getCloseHandler
ManagementRequestHandler<Void, Void> getCloseHandler() { """ Gets a handler for requests to close an input stream. @return the handler """ return new AbstractAttachmentHandler() { @Override void handleRequest(TimedStreamEntry entry, FlushableDataOutput output) throws IOExcep...
java
ManagementRequestHandler<Void, Void> getCloseHandler() { return new AbstractAttachmentHandler() { @Override void handleRequest(TimedStreamEntry entry, FlushableDataOutput output) throws IOException { // no-op as AbstractAttachmentHandler will close the entry after calling...
[ "ManagementRequestHandler", "<", "Void", ",", "Void", ">", "getCloseHandler", "(", ")", "{", "return", "new", "AbstractAttachmentHandler", "(", ")", "{", "@", "Override", "void", "handleRequest", "(", "TimedStreamEntry", "entry", ",", "FlushableDataOutput", "output"...
Gets a handler for requests to close an input stream. @return the handler
[ "Gets", "a", "handler", "for", "requests", "to", "close", "an", "input", "stream", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/ResponseAttachmentInputStreamSupport.java#L167-L179
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/content/CmsElementRename.java
CmsElementRename.isValidTemplateElement
private boolean isValidTemplateElement(String template, String element) { """ Check if the given template includes the specified element.<p> @param template the template @param element the element name @return true if the template includes the given element """ List elements = new ArrayList(getTe...
java
private boolean isValidTemplateElement(String template, String element) { List elements = new ArrayList(getTemplateElements(template)); Iterator i = elements.iterator(); while (i.hasNext()) { CmsDialogElement currElement = (CmsDialogElement)i.next(); if (element.equals(c...
[ "private", "boolean", "isValidTemplateElement", "(", "String", "template", ",", "String", "element", ")", "{", "List", "elements", "=", "new", "ArrayList", "(", "getTemplateElements", "(", "template", ")", ")", ";", "Iterator", "i", "=", "elements", ".", "iter...
Check if the given template includes the specified element.<p> @param template the template @param element the element name @return true if the template includes the given element
[ "Check", "if", "the", "given", "template", "includes", "the", "specified", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/CmsElementRename.java#L782-L794
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/framework/MatcherPattern.java
MatcherPattern.setContentMimeTypeVnd
public MatcherPattern setContentMimeTypeVnd(ContentMimeTypeVndInfo contentMimeTypeVndInfo) { """ Set the MIME types. This is used when you are not using the DefaultContentMimeTypeVnd annotation, or want to override the setting of the DefaultContentMimeTypeVnd annotation. This method can not be called after Match...
java
public MatcherPattern setContentMimeTypeVnd(ContentMimeTypeVndInfo contentMimeTypeVndInfo) { if (this.initialized) { throw new IllegalStateException("Can't change the settings after initialization."); } this.contentMimeTypeVndInfo = contentMimeTypeVndInfo; this.mimeTypeVnd = ...
[ "public", "MatcherPattern", "setContentMimeTypeVnd", "(", "ContentMimeTypeVndInfo", "contentMimeTypeVndInfo", ")", "{", "if", "(", "this", ".", "initialized", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Can't change the settings after initialization.\"", ")", ...
Set the MIME types. This is used when you are not using the DefaultContentMimeTypeVnd annotation, or want to override the setting of the DefaultContentMimeTypeVnd annotation. This method can not be called after MatcherController#hasPreinitialized(). @see com.tojc.ormlite.android.annotation.info.ContentMimeTypeVndInfo @...
[ "Set", "the", "MIME", "types", ".", "This", "is", "used", "when", "you", "are", "not", "using", "the", "DefaultContentMimeTypeVnd", "annotation", "or", "want", "to", "override", "the", "setting", "of", "the", "DefaultContentMimeTypeVnd", "annotation", ".", "This...
train
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/framework/MatcherPattern.java#L170-L177
cdk/cdk
tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java
HashGeneratorMaker.makeStereoEncoderFactory
private StereoEncoderFactory makeStereoEncoderFactory() { """ Combines the separate stereo encoder factories into a single factory. @return a single stereo encoder factory """ if (stereoEncoders.isEmpty()) { return StereoEncoderFactory.EMPTY; } else if (stereoEncoders.size() == 1...
java
private StereoEncoderFactory makeStereoEncoderFactory() { if (stereoEncoders.isEmpty()) { return StereoEncoderFactory.EMPTY; } else if (stereoEncoders.size() == 1) { return stereoEncoders.get(0); } else { StereoEncoderFactory factory = new ConjugatedEncoderFac...
[ "private", "StereoEncoderFactory", "makeStereoEncoderFactory", "(", ")", "{", "if", "(", "stereoEncoders", ".", "isEmpty", "(", ")", ")", "{", "return", "StereoEncoderFactory", ".", "EMPTY", ";", "}", "else", "if", "(", "stereoEncoders", ".", "size", "(", ")",...
Combines the separate stereo encoder factories into a single factory. @return a single stereo encoder factory
[ "Combines", "the", "separate", "stereo", "encoder", "factories", "into", "a", "single", "factory", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/hash/src/main/java/org/openscience/cdk/hash/HashGeneratorMaker.java#L277-L289
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/SliceInput.java
SliceInput.readBytes
public void readBytes(Slice destination, int length) { """ Transfers this buffer's data to the specified destination starting at the current {@code position} and increases the {@code position} by the number of the transferred bytes (= {@code length}). This method is basically same with {@link #readBytes(Slice,...
java
public void readBytes(Slice destination, int length) { if (length > destination.length()) { throw new IndexOutOfBoundsException(); } readBytes(destination, destination.length(), length); }
[ "public", "void", "readBytes", "(", "Slice", "destination", ",", "int", "length", ")", "{", "if", "(", "length", ">", "destination", ".", "length", "(", ")", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "readBytes", "(", "de...
Transfers this buffer's data to the specified destination starting at the current {@code position} and increases the {@code position} by the number of the transferred bytes (= {@code length}). This method is basically same with {@link #readBytes(Slice, int, int)}, except that this method increases the {@code writerInd...
[ "Transfers", "this", "buffer", "s", "data", "to", "the", "specified", "destination", "starting", "at", "the", "current", "{", "@code", "position", "}", "and", "increases", "the", "{", "@code", "position", "}", "by", "the", "number", "of", "the", "transferred...
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/SliceInput.java#L298-L304
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/common/Numbers.java
Numbers.parseLong
public static long parseLong(Object val) { """ Parse the given object as a {@code long}. The input object can be a {@link String} or one of the implementations of {@link Number}. You may want to use {@code GuavaUtils.tryParseLong()} instead if the input is a nullable string and you want to avoid any exceptions. ...
java
public static long parseLong(Object val) { if (val instanceof String) { return Long.parseLong((String) val); } else if (val instanceof Number) { return ((Number) val).longValue(); } else { if (val == null) { throw new NullPointerException("Input is null"); } else { ...
[ "public", "static", "long", "parseLong", "(", "Object", "val", ")", "{", "if", "(", "val", "instanceof", "String", ")", "{", "return", "Long", ".", "parseLong", "(", "(", "String", ")", "val", ")", ";", "}", "else", "if", "(", "val", "instanceof", "N...
Parse the given object as a {@code long}. The input object can be a {@link String} or one of the implementations of {@link Number}. You may want to use {@code GuavaUtils.tryParseLong()} instead if the input is a nullable string and you want to avoid any exceptions. @throws NumberFormatException if the input is an unpa...
[ "Parse", "the", "given", "object", "as", "a", "{", "@code", "long", "}", ".", "The", "input", "object", "can", "be", "a", "{", "@link", "String", "}", "or", "one", "of", "the", "implementations", "of", "{", "@link", "Number", "}", ".", "You", "may", ...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/Numbers.java#L33-L46
alkacon/opencms-core
src/org/opencms/search/galleries/CmsGallerySearch.java
CmsGallerySearch.searchById
public static CmsGallerySearchResult searchById(CmsObject cms, CmsUUID structureId, Locale locale) throws CmsException { """ Searches by structure id.<p> @param cms the OpenCms context to use for the search @param structureId the structure id of the document to search for @param locale the locale for whic...
java
public static CmsGallerySearchResult searchById(CmsObject cms, CmsUUID structureId, Locale locale) throws CmsException { CmsGallerySearch gallerySearch = new CmsGallerySearch(); gallerySearch.init(cms); gallerySearch.setIndexForProject(cms); return gallerySearch.searchById(structure...
[ "public", "static", "CmsGallerySearchResult", "searchById", "(", "CmsObject", "cms", ",", "CmsUUID", "structureId", ",", "Locale", "locale", ")", "throws", "CmsException", "{", "CmsGallerySearch", "gallerySearch", "=", "new", "CmsGallerySearch", "(", ")", ";", "gall...
Searches by structure id.<p> @param cms the OpenCms context to use for the search @param structureId the structure id of the document to search for @param locale the locale for which the search result should be returned @return the search result @throws CmsException if something goes wrong
[ "Searches", "by", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/galleries/CmsGallerySearch.java#L72-L79
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java
DocumentTranslator.getParentKey
public NodeKey getParentKey( Document document, String primaryWorkspaceKey, String secondaryWorkspaceKey ) { """ Obtain the preferred {@link NodeKey key} for the parent of this node. Because a node can be used in more than once place, it may techni...
java
public NodeKey getParentKey( Document document, String primaryWorkspaceKey, String secondaryWorkspaceKey ) { Object value = document.get(PARENT); return keyFrom(value, primaryWorkspaceKey, secondaryWorkspaceKey); }
[ "public", "NodeKey", "getParentKey", "(", "Document", "document", ",", "String", "primaryWorkspaceKey", ",", "String", "secondaryWorkspaceKey", ")", "{", "Object", "value", "=", "document", ".", "get", "(", "PARENT", ")", ";", "return", "keyFrom", "(", "value", ...
Obtain the preferred {@link NodeKey key} for the parent of this node. Because a node can be used in more than once place, it may technically have more than one parent. Therefore, in such cases this method prefers the parent that is in the {@code primaryWorkspaceKey} and, if there is no such parent, the parent that is i...
[ "Obtain", "the", "preferred", "{", "@link", "NodeKey", "key", "}", "for", "the", "parent", "of", "this", "node", ".", "Because", "a", "node", "can", "be", "used", "in", "more", "than", "once", "place", "it", "may", "technically", "have", "more", "than", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentTranslator.java#L165-L170
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/AssetRendition.java
AssetRendition.toDimension
private static @Nullable Dimension toDimension(long width, long height) { """ Convert with/height to dimension @param width Width @param height Height @return Dimension or null if width or height are not valid """ if (width > 0L && height > 0L) { return new Dimension(width, height); } retu...
java
private static @Nullable Dimension toDimension(long width, long height) { if (width > 0L && height > 0L) { return new Dimension(width, height); } return null; }
[ "private", "static", "@", "Nullable", "Dimension", "toDimension", "(", "long", "width", ",", "long", "height", ")", "{", "if", "(", "width", ">", "0L", "&&", "height", ">", "0L", ")", "{", "return", "new", "Dimension", "(", "width", ",", "height", ")",...
Convert with/height to dimension @param width Width @param height Height @return Dimension or null if width or height are not valid
[ "Convert", "with", "/", "height", "to", "dimension" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/AssetRendition.java#L209-L214
netty/netty
common/src/main/java/io/netty/util/ReferenceCountUtil.java
ReferenceCountUtil.safeRelease
public static void safeRelease(Object msg, int decrement) { """ Try to call {@link ReferenceCounted#release(int)} if the specified message implements {@link ReferenceCounted}. If the specified message doesn't implement {@link ReferenceCounted}, this method does nothing. Unlike {@link #release(Object)} this metho...
java
public static void safeRelease(Object msg, int decrement) { try { release(msg, decrement); } catch (Throwable t) { if (logger.isWarnEnabled()) { logger.warn("Failed to release a message: {} (decrement: {})", msg, decrement, t); } } }
[ "public", "static", "void", "safeRelease", "(", "Object", "msg", ",", "int", "decrement", ")", "{", "try", "{", "release", "(", "msg", ",", "decrement", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "if", "(", "logger", ".", "isWarnEnabled",...
Try to call {@link ReferenceCounted#release(int)} if the specified message implements {@link ReferenceCounted}. If the specified message doesn't implement {@link ReferenceCounted}, this method does nothing. Unlike {@link #release(Object)} this method catches an exception raised by {@link ReferenceCounted#release(int)} ...
[ "Try", "to", "call", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/ReferenceCountUtil.java#L126-L134
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/CallableUtils.java
CallableUtils.updateTypesByName
public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { """ Same as @updateTypes but updates based not on position but on key @param original QueryParameters which would be updated @param source QueryParameters types of which would be read @return updated clone on...
java
public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) =...
[ "public", "static", "QueryParameters", "updateTypesByName", "(", "QueryParameters", "original", ",", "QueryParameters", "source", ")", "{", "QueryParameters", "updatedParams", "=", "new", "QueryParameters", "(", "original", ")", ";", "if", "(", "source", "!=", "null...
Same as @updateTypes but updates based not on position but on key @param original QueryParameters which would be updated @param source QueryParameters types of which would be read @return updated clone on @original with updated types
[ "Same", "as", "@updateTypes", "but", "updates", "based", "not", "on", "position", "but", "on", "key" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/CallableUtils.java#L189-L201
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/text/sctl/ShardingCTLBackendHandlerFactory.java
ShardingCTLBackendHandlerFactory.newInstance
public static TextProtocolBackendHandler newInstance(final String sql, final BackendConnection backendConnection) { """ Create new instance of sharding CTL backend handler. @param sql SQL to be executed @param backendConnection backend connection @return instance of sharding CTL backend handler """ ...
java
public static TextProtocolBackendHandler newInstance(final String sql, final BackendConnection backendConnection) { if (sql.toUpperCase().startsWith(SCTL_SET)) { return new ShardingCTLSetBackendHandler(sql, backendConnection); } if (sql.toUpperCase().startsWith(SCTL_SHOW)) { ...
[ "public", "static", "TextProtocolBackendHandler", "newInstance", "(", "final", "String", "sql", ",", "final", "BackendConnection", "backendConnection", ")", "{", "if", "(", "sql", ".", "toUpperCase", "(", ")", ".", "startsWith", "(", "SCTL_SET", ")", ")", "{", ...
Create new instance of sharding CTL backend handler. @param sql SQL to be executed @param backendConnection backend connection @return instance of sharding CTL backend handler
[ "Create", "new", "instance", "of", "sharding", "CTL", "backend", "handler", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/text/sctl/ShardingCTLBackendHandlerFactory.java#L48-L59
atomix/atomix
utils/src/main/java/io/atomix/utils/Generics.java
Generics.getGenericInterfaceType
public static Type getGenericInterfaceType(Object instance, Class<?> iface, int position) { """ Returns the generic type at the given position for the given interface. @param instance the implementing instance @param iface the generic interface @param position the generic position @return the generic type...
java
public static Type getGenericInterfaceType(Object instance, Class<?> iface, int position) { Class<?> type = instance.getClass(); while (type != Object.class) { for (Type genericType : type.getGenericInterfaces()) { if (genericType instanceof ParameterizedType) { ParameterizedType paramet...
[ "public", "static", "Type", "getGenericInterfaceType", "(", "Object", "instance", ",", "Class", "<", "?", ">", "iface", ",", "int", "position", ")", "{", "Class", "<", "?", ">", "type", "=", "instance", ".", "getClass", "(", ")", ";", "while", "(", "ty...
Returns the generic type at the given position for the given interface. @param instance the implementing instance @param iface the generic interface @param position the generic position @return the generic type at the given position
[ "Returns", "the", "generic", "type", "at", "the", "given", "position", "for", "the", "given", "interface", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/Generics.java#L59-L73
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnspolicylabel_stats.java
dnspolicylabel_stats.get
public static dnspolicylabel_stats get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch statistics of dnspolicylabel_stats resource of given name . """ dnspolicylabel_stats obj = new dnspolicylabel_stats(); obj.set_labelname(labelname); dnspolicylabel_stats response =...
java
public static dnspolicylabel_stats get(nitro_service service, String labelname) throws Exception{ dnspolicylabel_stats obj = new dnspolicylabel_stats(); obj.set_labelname(labelname); dnspolicylabel_stats response = (dnspolicylabel_stats) obj.stat_resource(service); return response; }
[ "public", "static", "dnspolicylabel_stats", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "dnspolicylabel_stats", "obj", "=", "new", "dnspolicylabel_stats", "(", ")", ";", "obj", ".", "set_labelname", "(", "la...
Use this API to fetch statistics of dnspolicylabel_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "dnspolicylabel_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnspolicylabel_stats.java#L149-L154
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.getConversations
public Observable<ComapiResult<List<Conversation>>> getConversations(final boolean isPublic) { """ Returns observable to get all visible conversations. @param isPublic Has the conversation public or private access. @return Observable to to create a conversation. """ final String token = getToken()...
java
public Observable<ComapiResult<List<Conversation>>> getConversations(final boolean isPublic) { final String token = getToken(); if (sessionController.isCreatingSession()) { return getTaskQueue().queueGetConversationsExt(isPublic ? Scope.PUBLIC : Scope.PARTICIPANT); } else if (TextU...
[ "public", "Observable", "<", "ComapiResult", "<", "List", "<", "Conversation", ">", ">", ">", "getConversations", "(", "final", "boolean", "isPublic", ")", "{", "final", "String", "token", "=", "getToken", "(", ")", ";", "if", "(", "sessionController", ".", ...
Returns observable to get all visible conversations. @param isPublic Has the conversation public or private access. @return Observable to to create a conversation.
[ "Returns", "observable", "to", "get", "all", "visible", "conversations", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L531-L542
threerings/playn
java/src/playn/java/JavaAudio.java
JavaAudio.createSound
public JavaSound createSound(final JavaAssets.Resource rsrc, final boolean music) { """ Creates a sound instance from the audio data available via {@code in}. @param rsrc a resource via which the audio data can be read. @param music if true, a custom {@link Clip} implementation will be used which can handle lo...
java
public JavaSound createSound(final JavaAssets.Resource rsrc, final boolean music) { final JavaSound sound = new JavaSound(); ((JavaPlatform) platform).invokeAsync(new Runnable() { public void run () { try { AudioInputStream ais = rsrc.openAudioStream(); Clip clip = AudioSystem....
[ "public", "JavaSound", "createSound", "(", "final", "JavaAssets", ".", "Resource", "rsrc", ",", "final", "boolean", "music", ")", "{", "final", "JavaSound", "sound", "=", "new", "JavaSound", "(", ")", ";", "(", "(", "JavaPlatform", ")", "platform", ")", "....
Creates a sound instance from the audio data available via {@code in}. @param rsrc a resource via which the audio data can be read. @param music if true, a custom {@link Clip} implementation will be used which can handle long audio clips; if false, the default Java clip implementation is used which cannot handle long ...
[ "Creates", "a", "sound", "instance", "from", "the", "audio", "data", "available", "via", "{", "@code", "in", "}", "." ]
train
https://github.com/threerings/playn/blob/c266eeb39188dcada4b00992a0d1199759e03d42/java/src/playn/java/JavaAudio.java#L41-L72
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CampaignResponse.java
CampaignResponse.withTags
public CampaignResponse withTags(java.util.Map<String, String> tags) { """ The Tags for the campaign. @param tags The Tags for the campaign. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public CampaignResponse withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CampaignResponse", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The Tags for the campaign. @param tags The Tags for the campaign. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "Tags", "for", "the", "campaign", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CampaignResponse.java#L780-L783
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/apple/PropertyListSerialization.java
PropertyListSerialization.serializeList
private static void serializeList(final List list, final ContentHandler handler) throws SAXException { """ Serialize a list as an array element. @param list list to serialize. @param handler destination of serialization events. @throws SAXException if exception during serialization. """ final Attri...
java
private static void serializeList(final List list, final ContentHandler handler) throws SAXException { final AttributesImpl attributes = new AttributesImpl(); handler.startElement(null, "array", "array", attributes); for (final Object aList : list) { serializeObject(aList, handler); } handler....
[ "private", "static", "void", "serializeList", "(", "final", "List", "list", ",", "final", "ContentHandler", "handler", ")", "throws", "SAXException", "{", "final", "AttributesImpl", "attributes", "=", "new", "AttributesImpl", "(", ")", ";", "handler", ".", "star...
Serialize a list as an array element. @param list list to serialize. @param handler destination of serialization events. @throws SAXException if exception during serialization.
[ "Serialize", "a", "list", "as", "an", "array", "element", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/apple/PropertyListSerialization.java#L145-L152
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/element/MergedVertex.java
MergedVertex.applyMatrix
public void applyMatrix() { """ Applies the transformations matrices to this {@link MergedVertex}. This modifies the position of the vertexes. """ transformMatrix.translate(new Vector3f(-0.5F, -0.5F, -0.5F)); for (Vertex v : vertexes) v.applyMatrix(transformMatrix); resetMatrix(); return; }
java
public void applyMatrix() { transformMatrix.translate(new Vector3f(-0.5F, -0.5F, -0.5F)); for (Vertex v : vertexes) v.applyMatrix(transformMatrix); resetMatrix(); return; }
[ "public", "void", "applyMatrix", "(", ")", "{", "transformMatrix", ".", "translate", "(", "new", "Vector3f", "(", "-", "0.5F", ",", "-", "0.5F", ",", "-", "0.5F", ")", ")", ";", "for", "(", "Vertex", "v", ":", "vertexes", ")", "v", ".", "applyMatrix"...
Applies the transformations matrices to this {@link MergedVertex}. This modifies the position of the vertexes.
[ "Applies", "the", "transformations", "matrices", "to", "this", "{" ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/element/MergedVertex.java#L215-L225
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.transformEntries
public static boolean transformEntries(File zip, ZipEntryTransformerEntry[] entries, File destZip) { """ Copies an existing ZIP file and transforms the given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entry transformers. @param destZip new ZIP file created. @return <cod...
java
public static boolean transformEntries(File zip, ZipEntryTransformerEntry[] entries, File destZip) { if (log.isDebugEnabled()) log.debug("Copying '" + zip + "' to '" + destZip + "' and transforming entries " + Arrays.asList(entries) + "."); try { ZipOutputStream out = new ZipOutputStream(new Buffer...
[ "public", "static", "boolean", "transformEntries", "(", "File", "zip", ",", "ZipEntryTransformerEntry", "[", "]", "entries", ",", "File", "destZip", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"Copying '\"", ...
Copies an existing ZIP file and transforms the given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entry transformers. @param destZip new ZIP file created. @return <code>true</code> if at least one entry was replaced.
[ "Copies", "an", "existing", "ZIP", "file", "and", "transforms", "the", "given", "entries", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2845-L2863
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AccountFiltersInner.java
AccountFiltersInner.getAsync
public Observable<AccountFilterInner> getAsync(String resourceGroupName, String accountName, String filterName) { """ Get an Account Filter. Get the details of an Account Filter in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param account...
java
public Observable<AccountFilterInner> getAsync(String resourceGroupName, String accountName, String filterName) { return getWithServiceResponseAsync(resourceGroupName, accountName, filterName).map(new Func1<ServiceResponse<AccountFilterInner>, AccountFilterInner>() { @Override public Acc...
[ "public", "Observable", "<", "AccountFilterInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "filterName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "fi...
Get an Account Filter. Get the details of an Account Filter in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param filterName The Account Filter name @throws IllegalArgumentException thrown if para...
[ "Get", "an", "Account", "Filter", ".", "Get", "the", "details", "of", "an", "Account", "Filter", "in", "the", "Media", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AccountFiltersInner.java#L260-L267
kaazing/java.client
amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java
AmqpChannel.publishBasic
private AmqpChannel publishBasic(ByteBuffer body, HashMap<String, Object> headers, String exchange, String routingKey, boolean mandatory, boolean immediate) { """ /* This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distribute...
java
private AmqpChannel publishBasic(ByteBuffer body, HashMap<String, Object> headers, String exchange, String routingKey, boolean mandatory, boolean immediate) { Object[] args = {0, exchange, routingKey, mandatory, immediate}; WrappedByteBuffer bodyArg = null; if (body != null) { bodyAr...
[ "private", "AmqpChannel", "publishBasic", "(", "ByteBuffer", "body", ",", "HashMap", "<", "String", ",", "Object", ">", "headers", ",", "String", "exchange", ",", "String", "routingKey", ",", "boolean", "mandatory", ",", "boolean", "immediate", ")", "{", "Obje...
/* This method publishes a message to a specific exchange. The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed. @param body @param headers @param exchange @param routingKey @param mandatory @param immediate @re...
[ "/", "*", "This", "method", "publishes", "a", "message", "to", "a", "specific", "exchange", ".", "The", "message", "will", "be", "routed", "to", "queues", "as", "defined", "by", "the", "exchange", "configuration", "and", "distributed", "to", "any", "active",...
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java#L803-L820
probedock/probedock-java
src/main/java/io/probedock/client/core/filters/FilterTargetData.java
FilterTargetData.mergeTags
private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) { """ Create a string containing all the tags from method and class annotations @param mAnnotation Method annotation @param cAnnotation Class annotation @return The string of tags """ List<String> tags = new ArrayLi...
java
private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) { List<String> tags = new ArrayList<>(); if (mAnnotation != null) { tags.addAll(Arrays.asList(mAnnotation.tags())); } if (cAnnotation != null) { tags.addAll(Arrays.asList(cAnnotat...
[ "private", "static", "String", "mergeTags", "(", "ProbeTest", "mAnnotation", ",", "ProbeTestClass", "cAnnotation", ")", "{", "List", "<", "String", ">", "tags", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "mAnnotation", "!=", "null", ")", "{",...
Create a string containing all the tags from method and class annotations @param mAnnotation Method annotation @param cAnnotation Class annotation @return The string of tags
[ "Create", "a", "string", "containing", "all", "the", "tags", "from", "method", "and", "class", "annotations" ]
train
https://github.com/probedock/probedock-java/blob/92ee6634ba4fe3fdffeb4e202f5372ef947a67c3/src/main/java/io/probedock/client/core/filters/FilterTargetData.java#L167-L179
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java
RouteFilterRulesInner.getAsync
public Observable<RouteFilterRuleInner> getAsync(String resourceGroupName, String routeFilterName, String ruleName) { """ Gets the specified rule from a route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param ruleName The name of the r...
java
public Observable<RouteFilterRuleInner> getAsync(String resourceGroupName, String routeFilterName, String ruleName) { return getWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName).map(new Func1<ServiceResponse<RouteFilterRuleInner>, RouteFilterRuleInner>() { @Override ...
[ "public", "Observable", "<", "RouteFilterRuleInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "String", "ruleName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeFilterName", ",...
Gets the specified rule from a route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param ruleName The name of the rule. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RouteFilterRuleInner o...
[ "Gets", "the", "specified", "rule", "from", "a", "route", "filter", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java#L307-L314
jglobus/JGlobus
io/src/main/java/org/globus/io/gass/client/internal/GASSProtocol.java
GASSProtocol.PUT
public static String PUT(String path, String host, long length, boolean append) { """ This method concatenates a properly formatted header for performing Globus Gass PUTs with the given information. @param path the path of the remote file to put to @param host the host of the remote file to put to @param len...
java
public static String PUT(String path, String host, long length, boolean append) { String newPath = null; if (append) { newPath = APPEND_URI + "/" + path; } else { newPath = "/" + path; } return HTTPProtocol.createPUTHeader(newPath, host, USER_AGENT, TYPE, length, append); }
[ "public", "static", "String", "PUT", "(", "String", "path", ",", "String", "host", ",", "long", "length", ",", "boolean", "append", ")", "{", "String", "newPath", "=", "null", ";", "if", "(", "append", ")", "{", "newPath", "=", "APPEND_URI", "+", "\"/\...
This method concatenates a properly formatted header for performing Globus Gass PUTs with the given information. @param path the path of the remote file to put to @param host the host of the remote file to put to @param length the length of data which will be sent (the size of the file) @param append append mode @ret...
[ "This", "method", "concatenates", "a", "properly", "formatted", "header", "for", "performing", "Globus", "Gass", "PUTs", "with", "the", "given", "information", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/io/src/main/java/org/globus/io/gass/client/internal/GASSProtocol.java#L58-L69
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/services/MesosServicesUtils.java
MesosServicesUtils.createMesosServices
public static MesosServices createMesosServices(Configuration configuration, String hostname) throws Exception { """ Creates a {@link MesosServices} instance depending on the high availability settings. @param configuration containing the high availability settings @param hostname the hostname to advertise to ...
java
public static MesosServices createMesosServices(Configuration configuration, String hostname) throws Exception { ActorSystem localActorSystem = AkkaUtils.createLocalActorSystem(configuration); MesosArtifactServer artifactServer = createArtifactServer(configuration, hostname); HighAvailabilityMode highAvailabil...
[ "public", "static", "MesosServices", "createMesosServices", "(", "Configuration", "configuration", ",", "String", "hostname", ")", "throws", "Exception", "{", "ActorSystem", "localActorSystem", "=", "AkkaUtils", ".", "createLocalActorSystem", "(", "configuration", ")", ...
Creates a {@link MesosServices} instance depending on the high availability settings. @param configuration containing the high availability settings @param hostname the hostname to advertise to remote clients @return a mesos services instance @throws Exception if the mesos services instance could not be created
[ "Creates", "a", "{", "@link", "MesosServices", "}", "instance", "depending", "on", "the", "high", "availability", "settings", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/services/MesosServicesUtils.java#L46-L71
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
Configuration.getResource
public Content getResource(String key, Object o1, Object o2) { """ Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text """ return getResource(key, o...
java
public Content getResource(String key, Object o1, Object o2) { return getResource(key, o1, o2, null); }
[ "public", "Content", "getResource", "(", "String", "key", ",", "Object", "o1", ",", "Object", "o2", ")", "{", "return", "getResource", "(", "key", ",", "o1", ",", "o2", ",", "null", ")", ";", "}" ]
Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text
[ "Get", "the", "configuration", "string", "as", "a", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java#L789-L791
graknlabs/grakn
server/src/graql/reasoner/atom/Atom.java
Atom.getMultiUnifier
public MultiUnifier getMultiUnifier(Atom parentAtom, UnifierComparison unifierType) { """ find the (multi) unifier with parent atom @param parentAtom atom to be unified with @param unifierType type of unifier to be computed @return multiunifier """ //NB only for relations we can have non-unique u...
java
public MultiUnifier getMultiUnifier(Atom parentAtom, UnifierComparison unifierType) { //NB only for relations we can have non-unique unifiers Unifier unifier = this.getUnifier(parentAtom, unifierType); return unifier != null ? new MultiUnifierImpl(unifier) : MultiUnifierImpl.nonExistent(); }
[ "public", "MultiUnifier", "getMultiUnifier", "(", "Atom", "parentAtom", ",", "UnifierComparison", "unifierType", ")", "{", "//NB only for relations we can have non-unique unifiers", "Unifier", "unifier", "=", "this", ".", "getUnifier", "(", "parentAtom", ",", "unifierType",...
find the (multi) unifier with parent atom @param parentAtom atom to be unified with @param unifierType type of unifier to be computed @return multiunifier
[ "find", "the", "(", "multi", ")", "unifier", "with", "parent", "atom" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/reasoner/atom/Atom.java#L452-L456
saxsys/SynchronizeFX
transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java
SychronizeFXWebsocketServer.onMessage
public void onMessage(final byte[] message, final Session session) { """ Pass {@link OnMessage} events of the Websocket API to this method to handle incoming commands of other peers. @param message The message that was received. @param session The client that has send the message """ final Synchron...
java
public void onMessage(final byte[] message, final Session session) { final SynchronizeFXWebsocketChannel channel = getChannelOrFail(session); channel.newMessage(message, session); }
[ "public", "void", "onMessage", "(", "final", "byte", "[", "]", "message", ",", "final", "Session", "session", ")", "{", "final", "SynchronizeFXWebsocketChannel", "channel", "=", "getChannelOrFail", "(", "session", ")", ";", "channel", ".", "newMessage", "(", "...
Pass {@link OnMessage} events of the Websocket API to this method to handle incoming commands of other peers. @param message The message that was received. @param session The client that has send the message
[ "Pass", "{", "@link", "OnMessage", "}", "events", "of", "the", "Websocket", "API", "to", "this", "method", "to", "handle", "incoming", "commands", "of", "other", "peers", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java#L187-L191
jbundle/jbundle
base/message/jibx/src/main/java/org/jbundle/base/message/trx/message/external/convert/jibx/JibxConvertToMessage.java
JibxConvertToMessage.unmarshalRootElement
public Object unmarshalRootElement(Reader inStream, BaseXmlTrxMessageIn soapTrxMessage) throws Exception { """ Create the root element for this message. You must override this. @return The root element. """ String packageName = null; String bindingName = null; try { // create a ...
java
public Object unmarshalRootElement(Reader inStream, BaseXmlTrxMessageIn soapTrxMessage) throws Exception { String packageName = null; String bindingName = null; try { // create a JAXBContext capable of handling classes generated into // the primer.po package pac...
[ "public", "Object", "unmarshalRootElement", "(", "Reader", "inStream", ",", "BaseXmlTrxMessageIn", "soapTrxMessage", ")", "throws", "Exception", "{", "String", "packageName", "=", "null", ";", "String", "bindingName", "=", "null", ";", "try", "{", "// create a JAXBC...
Create the root element for this message. You must override this. @return The root element.
[ "Create", "the", "root", "element", "for", "this", "message", ".", "You", "must", "override", "this", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/jibx/src/main/java/org/jbundle/base/message/trx/message/external/convert/jibx/JibxConvertToMessage.java#L66-L96
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/system/exec/Exec.java
Exec.appAs
public static Execed appAs(String as, Iterable<String> command) throws IOException { """ Runs a command, optionally executing as a different user (eg root) @param as @param command @return @throws IOException """ Exec e = new Exec(command); if (as != null) e.runAs(as); e.setRedirectError(fal...
java
public static Execed appAs(String as, Iterable<String> command) throws IOException { Exec e = new Exec(command); if (as != null) e.runAs(as); e.setRedirectError(false); return e.start(); }
[ "public", "static", "Execed", "appAs", "(", "String", "as", ",", "Iterable", "<", "String", ">", "command", ")", "throws", "IOException", "{", "Exec", "e", "=", "new", "Exec", "(", "command", ")", ";", "if", "(", "as", "!=", "null", ")", "e", ".", ...
Runs a command, optionally executing as a different user (eg root) @param as @param command @return @throws IOException
[ "Runs", "a", "command", "optionally", "executing", "as", "a", "different", "user", "(", "eg", "root", ")" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/system/exec/Exec.java#L405-L413
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getItemInfo
public void getItemInfo(int[] ids, Callback<List<Item>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Item API go <a href="https://wiki.guildwars2.com/wiki/API:2/items">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailu...
java
public void getItemInfo(int[] ids, Callback<List<Item>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getItemInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getItemInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "Item", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ")"...
For more info on Item API go <a href="https://wiki.guildwars2.com/wiki/API:2/items">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of item id @param callback callback that is going to...
[ "For", "more", "info", "on", "Item", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "items", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", "the"...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1689-L1692
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/ascii/rest/HttpCommand.java
HttpCommand.setResponse
public void setResponse(byte[] contentType, byte[] value) { """ HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-TextCommandType: text/html Content-Length: 1354 @param contentType @param value """ int valueSize = (value == null) ? 0 : value.length; byte[] len = stringToBytes(S...
java
public void setResponse(byte[] contentType, byte[] value) { int valueSize = (value == null) ? 0 : value.length; byte[] len = stringToBytes(String.valueOf(valueSize)); int size = RES_200.length; if (contentType != null) { size += CONTENT_TYPE.length; size += conten...
[ "public", "void", "setResponse", "(", "byte", "[", "]", "contentType", ",", "byte", "[", "]", "value", ")", "{", "int", "valueSize", "=", "(", "value", "==", "null", ")", "?", "0", ":", "value", ".", "length", ";", "byte", "[", "]", "len", "=", "...
HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-TextCommandType: text/html Content-Length: 1354 @param contentType @param value
[ "HTTP", "/", "1", ".", "0", "200", "OK", "Date", ":", "Fri", "31", "Dec", "1999", "23", ":", "59", ":", "59", "GMT", "Content", "-", "TextCommandType", ":", "text", "/", "html", "Content", "-", "Length", ":", "1354" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/ascii/rest/HttpCommand.java#L150-L179
Stratio/bdt
src/main/java/com/stratio/qa/specs/RestSpec.java
RestSpec.setupRestClient
@Given("^I( securely)? send requests to '([^:]+?)(:.+?)?'$") public void setupRestClient(String isSecured, String restHost, String restPort) { """ Send requests to {@code restHost @code restPort}. @param restHost host where api is running @param restPort port where api is running """ String res...
java
@Given("^I( securely)? send requests to '([^:]+?)(:.+?)?'$") public void setupRestClient(String isSecured, String restHost, String restPort) { String restProtocol = "http://"; if (isSecured != null) { restProtocol = "https://"; } if (restHost == null) { res...
[ "@", "Given", "(", "\"^I( securely)? send requests to '([^:]+?)(:.+?)?'$\"", ")", "public", "void", "setupRestClient", "(", "String", "isSecured", ",", "String", "restHost", ",", "String", "restPort", ")", "{", "String", "restProtocol", "=", "\"http://\"", ";", "if", ...
Send requests to {@code restHost @code restPort}. @param restHost host where api is running @param restPort port where api is running
[ "Send", "requests", "to", "{", "@code", "restHost", "@code", "restPort", "}", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/RestSpec.java#L59-L83
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowTriggersInner.java
WorkflowTriggersInner.setStateAsync
public Observable<Void> setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) { """ Sets the state of a workflow trigger. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param triggerName The workflow trigger nam...
java
public Observable<Void> setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) { return setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source).map(new Func1<ServiceResponse<Void>, Void>() { @Override p...
[ "public", "Observable", "<", "Void", ">", "setStateAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "String", "triggerName", ",", "WorkflowTriggerInner", "source", ")", "{", "return", "setStateWithServiceResponseAsync", "(", "resourceGroup...
Sets the state of a workflow trigger. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param triggerName The workflow trigger name. @param source the WorkflowTriggerInner value @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceR...
[ "Sets", "the", "state", "of", "a", "workflow", "trigger", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowTriggersInner.java#L760-L767
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/Utils.java
Utils.parseLong
public static long parseLong(String val, long defValue) { """ Parse a long from a String in a safe manner. @param val the string to parse @param defValue the default value to return if parsing fails @return the parsed long, or default value """ if(TextUtils.isEmpty(val)...
java
public static long parseLong(String val, long defValue){ if(TextUtils.isEmpty(val)) return defValue; try{ return Long.parseLong(val); }catch (NumberFormatException e){ return defValue; } }
[ "public", "static", "long", "parseLong", "(", "String", "val", ",", "long", "defValue", ")", "{", "if", "(", "TextUtils", ".", "isEmpty", "(", "val", ")", ")", "return", "defValue", ";", "try", "{", "return", "Long", ".", "parseLong", "(", "val", ")", ...
Parse a long from a String in a safe manner. @param val the string to parse @param defValue the default value to return if parsing fails @return the parsed long, or default value
[ "Parse", "a", "long", "from", "a", "String", "in", "a", "safe", "manner", "." ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/Utils.java#L278-L285
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildMethodsSummary
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { """ Build the method summary. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added """ MemberSummaryWriter writer = ...
java
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.METHODS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.METHODS]; addSummary(writer, visibleMembe...
[ "public", "void", "buildMethodsSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", "[", "VisibleMemberMap", ".", "METHODS", "]", ";", "VisibleMemberMap", "visibleMemberMap", "=", ...
Build the method summary. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "method", "summary", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java#L303-L309
liuyukuai/commons
commons-core/src/main/java/com/itxiaoer/commons/core/util/NumUtils.java
NumUtils.intVal
public static int intVal(String val, int defaultValue) { """ 转换为int类型数据 @param val 需要转换的值 @param defaultValue 默认值 @return int """ try { return NumberUtils.createNumber(val).intValue(); } catch (Exception e) { log.warn("intVal(String, int) throw {}, return d...
java
public static int intVal(String val, int defaultValue) { try { return NumberUtils.createNumber(val).intValue(); } catch (Exception e) { log.warn("intVal(String, int) throw {}, return defaultValue = {}", e, defaultValue); return defaultValue; } }
[ "public", "static", "int", "intVal", "(", "String", "val", ",", "int", "defaultValue", ")", "{", "try", "{", "return", "NumberUtils", ".", "createNumber", "(", "val", ")", ".", "intValue", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", ...
转换为int类型数据 @param val 需要转换的值 @param defaultValue 默认值 @return int
[ "转换为int类型数据" ]
train
https://github.com/liuyukuai/commons/blob/ba67eddb542446b12f419f1866dbaa82e47fbf35/commons-core/src/main/java/com/itxiaoer/commons/core/util/NumUtils.java#L40-L47
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/Configurer.java
Configurer.getStringDefault
public final String getStringDefault(String defaultValue, String attribute, String... path) { """ Get a string in the xml tree. @param defaultValue Value used if node does not exist. @param attribute The attribute to get as string. @param path The node path (child list) @return The string value. @throws Lio...
java
public final String getStringDefault(String defaultValue, String attribute, String... path) { return getNodeStringDefault(defaultValue, attribute, path); }
[ "public", "final", "String", "getStringDefault", "(", "String", "defaultValue", ",", "String", "attribute", ",", "String", "...", "path", ")", "{", "return", "getNodeStringDefault", "(", "defaultValue", ",", "attribute", ",", "path", ")", ";", "}" ]
Get a string in the xml tree. @param defaultValue Value used if node does not exist. @param attribute The attribute to get as string. @param path The node path (child list) @return The string value. @throws LionEngineException If unable to read node.
[ "Get", "a", "string", "in", "the", "xml", "tree", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/Configurer.java#L172-L175
geomajas/geomajas-project-client-gwt2
plugin/wms/wms/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsClient.java
WmsClient.createTileConfig
public TileConfiguration createTileConfig(WmsLayerInfo layerInfo, ViewPort viewPort, int tileWidth, int tileHeight) throws IllegalArgumentException { """ Create a new tile configuration object from a WmsLayerInfo object. @param layerInfo The layer info object. Acquired from a WMS GetCapabilities. @param vi...
java
public TileConfiguration createTileConfig(WmsLayerInfo layerInfo, ViewPort viewPort, int tileWidth, int tileHeight) throws IllegalArgumentException { Bbox bbox = layerInfo.getBoundingBox(viewPort.getCrs()); if (bbox == null) { throw new IllegalArgumentException("Layer does not support map CRS (" + viewPort.ge...
[ "public", "TileConfiguration", "createTileConfig", "(", "WmsLayerInfo", "layerInfo", ",", "ViewPort", "viewPort", ",", "int", "tileWidth", ",", "int", "tileHeight", ")", "throws", "IllegalArgumentException", "{", "Bbox", "bbox", "=", "layerInfo", ".", "getBoundingBox"...
Create a new tile configuration object from a WmsLayerInfo object. @param layerInfo The layer info object. Acquired from a WMS GetCapabilities. @param viewPort The ViewPort to get the CRS and fixed resolutions from. @param tileWidth The tile width in pixels. @param tileHeight The tile height in pixels. @return Ret...
[ "Create", "a", "new", "tile", "configuration", "object", "from", "a", "WmsLayerInfo", "object", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wms/wms/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsClient.java#L113-L121
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java
CustomDictionary.insert
public static boolean insert(String word, String natureWithFrequency) { """ 往自定义词典中插入一个新词(覆盖模式)<br> 动态增删不会持久化到词典文件 @param word 新词 如“裸婚” @param natureWithFrequency 词性和其对应的频次,比如“nz 1 v 2”,null时表示“nz 1”。 @return 是否插入成功(失败的原因可能是natureWithFrequency问题,可以通过调试模式了解原因) """ if (word == null) ...
java
public static boolean insert(String word, String natureWithFrequency) { if (word == null) return false; if (HanLP.Config.Normalization) word = CharTable.convert(word); CoreDictionary.Attribute att = natureWithFrequency == null ? new CoreDictionary.Attribute(Nature.nz, 1) : CoreDictionary.Att...
[ "public", "static", "boolean", "insert", "(", "String", "word", ",", "String", "natureWithFrequency", ")", "{", "if", "(", "word", "==", "null", ")", "return", "false", ";", "if", "(", "HanLP", ".", "Config", ".", "Normalization", ")", "word", "=", "Char...
往自定义词典中插入一个新词(覆盖模式)<br> 动态增删不会持久化到词典文件 @param word 新词 如“裸婚” @param natureWithFrequency 词性和其对应的频次,比如“nz 1 v 2”,null时表示“nz 1”。 @return 是否插入成功(失败的原因可能是natureWithFrequency问题,可以通过调试模式了解原因)
[ "往自定义词典中插入一个新词(覆盖模式)<br", ">", "动态增删不会持久化到词典文件" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java#L293-L303
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseIntObj
@Nullable public static Integer parseIntObj (@Nullable final String sStr) { """ Parse the given {@link String} as {@link Integer} with radix {@value #DEFAULT_RADIX}. @param sStr The string to parse. May be <code>null</code>. @return <code>null</code> if the string does not represent a valid value. """ ...
java
@Nullable public static Integer parseIntObj (@Nullable final String sStr) { return parseIntObj (sStr, DEFAULT_RADIX, null); }
[ "@", "Nullable", "public", "static", "Integer", "parseIntObj", "(", "@", "Nullable", "final", "String", "sStr", ")", "{", "return", "parseIntObj", "(", "sStr", ",", "DEFAULT_RADIX", ",", "null", ")", ";", "}" ]
Parse the given {@link String} as {@link Integer} with radix {@value #DEFAULT_RADIX}. @param sStr The string to parse. May be <code>null</code>. @return <code>null</code> if the string does not represent a valid value.
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "{", "@link", "Integer", "}", "with", "radix", "{", "@value", "#DEFAULT_RADIX", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L846-L850