repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
188
func_name
stringlengths
7
127
whole_func_string
stringlengths
77
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
77
3.91k
func_code_tokens
listlengths
20
745
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
477
split_name
stringclasses
1 value
func_code_url
stringlengths
111
288
xfcjscn/sudoor-server-lib
src/main/java/net/gplatform/sudoor/server/spring/SpringContextsUtil.java
SpringContextsUtil.getBean
public static Object getBean(String name, Class requiredType) throws BeansException { return applicationContext.getBean(name, requiredType); }
java
public static Object getBean(String name, Class requiredType) throws BeansException { return applicationContext.getBean(name, requiredType); }
[ "public", "static", "Object", "getBean", "(", "String", "name", ",", "Class", "requiredType", ")", "throws", "BeansException", "{", "return", "applicationContext", ".", "getBean", "(", "name", ",", "requiredType", ")", ";", "}" ]
获取类型为requiredType的对象 如果bean不能被类型转换,相应的异常将会被抛出(BeanNotOfRequiredTypeException) @param name bean注册名 @param requiredType 返回对象类型 @return Object 返回requiredType类型对象 @throws BeansException
[ "获取类型为requiredType的对象", "如果bean不能被类型转换,相应的异常将会被抛出(BeanNotOfRequiredTypeException)" ]
train
https://github.com/xfcjscn/sudoor-server-lib/blob/37dc1996eaa9cad25c82abd1de315ba565e32097/src/main/java/net/gplatform/sudoor/server/spring/SpringContextsUtil.java#L88-L90
square/okhttp
samples/slack/src/main/java/okhttp3/slack/SlackClient.java
SlackClient.requestOauthSession
public void requestOauthSession(String scopes, String team) throws Exception { if (sessionFactory == null) { sessionFactory = new OAuthSessionFactory(slackApi); sessionFactory.start(); } HttpUrl authorizeUrl = sessionFactory.newAuthorizeUrl(scopes, team, session -> { initOauthSession(sess...
java
public void requestOauthSession(String scopes, String team) throws Exception { if (sessionFactory == null) { sessionFactory = new OAuthSessionFactory(slackApi); sessionFactory.start(); } HttpUrl authorizeUrl = sessionFactory.newAuthorizeUrl(scopes, team, session -> { initOauthSession(sess...
[ "public", "void", "requestOauthSession", "(", "String", "scopes", ",", "String", "team", ")", "throws", "Exception", "{", "if", "(", "sessionFactory", "==", "null", ")", "{", "sessionFactory", "=", "new", "OAuthSessionFactory", "(", "slackApi", ")", ";", "sess...
Shows a browser URL to authorize this app to act as this user.
[ "Shows", "a", "browser", "URL", "to", "authorize", "this", "app", "to", "act", "as", "this", "user", "." ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/samples/slack/src/main/java/okhttp3/slack/SlackClient.java#L36-L48
playn/playn
core/src/playn/core/Platform.java
Platform.dispatchEvent
public <E> void dispatchEvent (Signal<E> signal, E event) { try { signal.emit(event); } catch (Throwable cause) { reportError("Event dispatch failure", cause); } }
java
public <E> void dispatchEvent (Signal<E> signal, E event) { try { signal.emit(event); } catch (Throwable cause) { reportError("Event dispatch failure", cause); } }
[ "public", "<", "E", ">", "void", "dispatchEvent", "(", "Signal", "<", "E", ">", "signal", ",", "E", "event", ")", "{", "try", "{", "signal", ".", "emit", "(", "event", ")", ";", "}", "catch", "(", "Throwable", "cause", ")", "{", "reportError", "(",...
Dispatches {@code event} on {@code signal} and catches any error that propagates out of the event dispatch, reporting it via {@link #reportError}.
[ "Dispatches", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Platform.java#L108-L114
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/decompose/qr/QrHelperFunctions_ZDRM.java
QrHelperFunctions_ZDRM.findMax
public static double findMax( double[] u, int startU , int length ) { double max = -1; int index = startU*2; int stopIndex = (startU + length)*2; for( ; index < stopIndex;) { double real = u[index++]; double img = u[index++]; double val = real*real +...
java
public static double findMax( double[] u, int startU , int length ) { double max = -1; int index = startU*2; int stopIndex = (startU + length)*2; for( ; index < stopIndex;) { double real = u[index++]; double img = u[index++]; double val = real*real +...
[ "public", "static", "double", "findMax", "(", "double", "[", "]", "u", ",", "int", "startU", ",", "int", "length", ")", "{", "double", "max", "=", "-", "1", ";", "int", "index", "=", "startU", "*", "2", ";", "int", "stopIndex", "=", "(", "startU", ...
Returns the maximum magnitude of the complex numbers @param u Array of complex numbers @param startU first index to consider in u @param length Number of complex numebrs to consider @return magnitude
[ "Returns", "the", "maximum", "magnitude", "of", "the", "complex", "numbers" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/decompose/qr/QrHelperFunctions_ZDRM.java#L55-L72
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteConnectionsInner.java
ExpressRouteConnectionsInner.createOrUpdateAsync
public Observable<ExpressRouteConnectionInner> createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connect...
java
public Observable<ExpressRouteConnectionInner> createOrUpdateAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName, ExpressRouteConnectionInner putExpressRouteConnectionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connect...
[ "public", "Observable", "<", "ExpressRouteConnectionInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "expressRouteGatewayName", ",", "String", "connectionName", ",", "ExpressRouteConnectionInner", "putExpressRouteConnectionParameters", ")", ...
Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. @param resourceGroupName The name of the resource group. @param expressRouteGatewayName The name of the ExpressRoute gateway. @param connectionName The name of the connection subresource. @param putExpressRouteConnectionParameters Parame...
[ "Creates", "a", "connection", "between", "an", "ExpressRoute", "gateway", "and", "an", "ExpressRoute", "circuit", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteConnectionsInner.java#L125-L132
tacitknowledge/discovery
src/main/java/com/tacitknowledge/util/discovery/ArchiveResourceListSource.java
ArchiveResourceListSource.getResources
private List getResources(ZipFile file, String root) { List resourceNames = new ArrayList(); Enumeration e = file.entries(); while (e.hasMoreElements()) { ZipEntry entry = (ZipEntry) e.nextElement(); String name = entry.getName(); if (name.startsWi...
java
private List getResources(ZipFile file, String root) { List resourceNames = new ArrayList(); Enumeration e = file.entries(); while (e.hasMoreElements()) { ZipEntry entry = (ZipEntry) e.nextElement(); String name = entry.getName(); if (name.startsWi...
[ "private", "List", "getResources", "(", "ZipFile", "file", ",", "String", "root", ")", "{", "List", "resourceNames", "=", "new", "ArrayList", "(", ")", ";", "Enumeration", "e", "=", "file", ".", "entries", "(", ")", ";", "while", "(", "e", ".", "hasMor...
Returns a list of file resources contained in the specified directory within a given Zip'd archive file. @param file the zip file containing the resources to return @param root the directory within the zip file containing the resources @return a list of file resources contained in the specified directory within a gi...
[ "Returns", "a", "list", "of", "file", "resources", "contained", "in", "the", "specified", "directory", "within", "a", "given", "Zip", "d", "archive", "file", "." ]
train
https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ArchiveResourceListSource.java#L95-L114
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/DiagonalMatrix.java
DiagonalMatrix.checkIndices
private void checkIndices(int row, int col) { if (row < 0 || col < 0 || row >= values.length || col >= values.length) throw new ArrayIndexOutOfBoundsException(); }
java
private void checkIndices(int row, int col) { if (row < 0 || col < 0 || row >= values.length || col >= values.length) throw new ArrayIndexOutOfBoundsException(); }
[ "private", "void", "checkIndices", "(", "int", "row", ",", "int", "col", ")", "{", "if", "(", "row", "<", "0", "||", "col", "<", "0", "||", "row", ">=", "values", ".", "length", "||", "col", ">=", "values", ".", "length", ")", "throw", "new", "Ar...
Checks that the given row and column values are non-negative, and less than the number of diagonals in this {@code DiagonalMatrix}. @param row The row index to check. @param col The col index to check. @throws IllegalArgumentException if either index is invalid.
[ "Checks", "that", "the", "given", "row", "and", "column", "values", "are", "non", "-", "negative", "and", "less", "than", "the", "number", "of", "diagonals", "in", "this", "{", "@code", "DiagonalMatrix", "}", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/DiagonalMatrix.java#L79-L82
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java
AbstractHibernateCriteriaBuilder.geProperty
public org.grails.datastore.mapping.query.api.Criteria geProperty(String propertyName, String otherPropertyName) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [geProperty] with propertyName [" + propertyName + "] and other proper...
java
public org.grails.datastore.mapping.query.api.Criteria geProperty(String propertyName, String otherPropertyName) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [geProperty] with propertyName [" + propertyName + "] and other proper...
[ "public", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "query", ".", "api", ".", "Criteria", "geProperty", "(", "String", "propertyName", ",", "String", "otherPropertyName", ")", "{", "if", "(", "!", "validateSimpleExpression", "(", ")", ")",...
Creates a Criterion that tests if the first property is greater than or equal to the second property @param propertyName The first property name @param otherPropertyName The second property name @return A Criterion instance
[ "Creates", "a", "Criterion", "that", "tests", "if", "the", "first", "property", "is", "greater", "than", "or", "equal", "to", "the", "second", "property" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/query/AbstractHibernateCriteriaBuilder.java#L639-L649
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java
SchedulerStateManagerAdaptor.updatePackingPlan
public Boolean updatePackingPlan(PackingPlans.PackingPlan packingPlan, String topologyName) { if (getPackingPlan(topologyName) != null) { deletePackingPlan(topologyName); } return setPackingPlan(packingPlan, topologyName); }
java
public Boolean updatePackingPlan(PackingPlans.PackingPlan packingPlan, String topologyName) { if (getPackingPlan(topologyName) != null) { deletePackingPlan(topologyName); } return setPackingPlan(packingPlan, topologyName); }
[ "public", "Boolean", "updatePackingPlan", "(", "PackingPlans", ".", "PackingPlan", "packingPlan", ",", "String", "topologyName", ")", "{", "if", "(", "getPackingPlan", "(", "topologyName", ")", "!=", "null", ")", "{", "deletePackingPlan", "(", "topologyName", ")",...
Update the packing plan for the given topology. If the packing plan doesn't exist, create it. If it does, update it. @param packingPlan the packing plan of the topology @return Boolean - Success or Failure
[ "Update", "the", "packing", "plan", "for", "the", "given", "topology", ".", "If", "the", "packing", "plan", "doesn", "t", "exist", "create", "it", ".", "If", "it", "does", "update", "it", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java#L164-L169
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.putObject
public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta, @NotNull final Links links) throws IOException { if (links.getLinks().containsKey(LinkType.Download)) { return false; } final Link uploadLink = links.getLinks().get(LinkType.Upload); if (uploadLink == ...
java
public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta, @NotNull final Links links) throws IOException { if (links.getLinks().containsKey(LinkType.Download)) { return false; } final Link uploadLink = links.getLinks().get(LinkType.Upload); if (uploadLink == ...
[ "public", "boolean", "putObject", "(", "@", "NotNull", "final", "StreamProvider", "streamProvider", ",", "@", "NotNull", "final", "Meta", "meta", ",", "@", "NotNull", "final", "Links", "links", ")", "throws", "IOException", "{", "if", "(", "links", ".", "get...
Upload object by metadata. @param links Object links. @param streamProvider Object stream provider. @param meta Object metadata. @return Return true is object is uploaded successfully and false if object is already uploaded. @throws IOException On some errors.
[ "Upload", "object", "by", "metadata", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L230-L245
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryBaseImpl.java
PersistenceBrokerFactoryBaseImpl.createPersistenceBroker
public PersistenceBrokerInternal createPersistenceBroker(PBKey pbKey) throws PBFactoryException { if (log.isDebugEnabled()) log.debug("Obtain broker from pool, used PBKey is " + pbKey); /* try to find a valid PBKey, if given key does not full match */ pbKey = BrokerHe...
java
public PersistenceBrokerInternal createPersistenceBroker(PBKey pbKey) throws PBFactoryException { if (log.isDebugEnabled()) log.debug("Obtain broker from pool, used PBKey is " + pbKey); /* try to find a valid PBKey, if given key does not full match */ pbKey = BrokerHe...
[ "public", "PersistenceBrokerInternal", "createPersistenceBroker", "(", "PBKey", "pbKey", ")", "throws", "PBFactoryException", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"Obtain broker from pool, used PBKey is \"", "+", "pb...
Always return a new created {@link PersistenceBroker} instance @param pbKey @return @throws PBFactoryException
[ "Always", "return", "a", "new", "created", "{", "@link", "PersistenceBroker", "}", "instance" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryBaseImpl.java#L124-L142
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java
TargetAssignmentOperations.createAssignmentTab
public static ConfirmationTab createAssignmentTab( final ActionTypeOptionGroupAssignmentLayout actionTypeOptionGroupLayout, final MaintenanceWindowLayout maintenanceWindowLayout, final Consumer<Boolean> saveButtonToggle, final VaadinMessageSource i18n, final UiProperties uiProperties...
java
public static ConfirmationTab createAssignmentTab( final ActionTypeOptionGroupAssignmentLayout actionTypeOptionGroupLayout, final MaintenanceWindowLayout maintenanceWindowLayout, final Consumer<Boolean> saveButtonToggle, final VaadinMessageSource i18n, final UiProperties uiProperties...
[ "public", "static", "ConfirmationTab", "createAssignmentTab", "(", "final", "ActionTypeOptionGroupAssignmentLayout", "actionTypeOptionGroupLayout", ",", "final", "MaintenanceWindowLayout", "maintenanceWindowLayout", ",", "final", "Consumer", "<", "Boolean", ">", "saveButtonToggle...
Create the Assignment Confirmation Tab @param actionTypeOptionGroupLayout the action Type Option Group Layout @param maintenanceWindowLayout the Maintenance Window Layout @param saveButtonToggle The event listener to derimne if save button should be enabled or not @param i18n the Vaadin Message Source for multi langua...
[ "Create", "the", "Assignment", "Confirmation", "Tab" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/TargetAssignmentOperations.java#L197-L211
buschmais/jqa-java-plugin
src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/VisitorHelper.java
VisitorHelper.getVariableDescriptor
VariableDescriptor getVariableDescriptor(String name, String signature) { VariableDescriptor variableDescriptor = scannerContext.getStore().create(VariableDescriptor.class); variableDescriptor.setName(name); variableDescriptor.setSignature(signature); return variableDescriptor; }
java
VariableDescriptor getVariableDescriptor(String name, String signature) { VariableDescriptor variableDescriptor = scannerContext.getStore().create(VariableDescriptor.class); variableDescriptor.setName(name); variableDescriptor.setSignature(signature); return variableDescriptor; }
[ "VariableDescriptor", "getVariableDescriptor", "(", "String", "name", ",", "String", "signature", ")", "{", "VariableDescriptor", "variableDescriptor", "=", "scannerContext", ".", "getStore", "(", ")", ".", "create", "(", "VariableDescriptor", ".", "class", ")", ";"...
Return the field descriptor for the given type and field signature. @param name The variable name. @param signature The variable signature. @return The field descriptor.
[ "Return", "the", "field", "descriptor", "for", "the", "given", "type", "and", "field", "signature", "." ]
train
https://github.com/buschmais/jqa-java-plugin/blob/4c050943e9c28cf1c4a08aa962d5b5bf03c4fe54/src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/VisitorHelper.java#L199-L204
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/common/destination/DestinationTools.java
DestinationTools.asRef
public static DestinationRef asRef( Destination destination ) throws JMSException { if (destination == null) return null; if (destination instanceof DestinationRef) return (DestinationRef)destination; if (destination instanceof Queue) ...
java
public static DestinationRef asRef( Destination destination ) throws JMSException { if (destination == null) return null; if (destination instanceof DestinationRef) return (DestinationRef)destination; if (destination instanceof Queue) ...
[ "public", "static", "DestinationRef", "asRef", "(", "Destination", "destination", ")", "throws", "JMSException", "{", "if", "(", "destination", "==", "null", ")", "return", "null", ";", "if", "(", "destination", "instanceof", "DestinationRef", ")", "return", "("...
Make sure the given destination is a light-weight serializable destination reference
[ "Make", "sure", "the", "given", "destination", "is", "a", "light", "-", "weight", "serializable", "destination", "reference" ]
train
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/common/destination/DestinationTools.java#L38-L53
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java
BoundedOverlay.isWithinBoundingBox
public boolean isWithinBoundingBox(int x, int y, int zoom) { boolean withinBounds = true; // If a bounding box is set, check if it overlaps with the request if (webMercatorBoundingBox != null) { // Get the bounding box of the requested tile BoundingBox tileWebMercatorBo...
java
public boolean isWithinBoundingBox(int x, int y, int zoom) { boolean withinBounds = true; // If a bounding box is set, check if it overlaps with the request if (webMercatorBoundingBox != null) { // Get the bounding box of the requested tile BoundingBox tileWebMercatorBo...
[ "public", "boolean", "isWithinBoundingBox", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "boolean", "withinBounds", "=", "true", ";", "// If a bounding box is set, check if it overlaps with the request", "if", "(", "webMercatorBoundingBox", "!=", "n...
Check if the tile request is within the desired tile bounds @param x x coordinate @param y y coordinate @param zoom zoom value @return true if within bounds
[ "Check", "if", "the", "tile", "request", "is", "within", "the", "desired", "tile", "bounds" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/BoundedOverlay.java#L213-L232
haifengl/smile
core/src/main/java/smile/association/FPGrowth.java
FPGrowth.getLocalItemSupport
private boolean getLocalItemSupport(FPTree.Node node, int[] localItemSupport) { boolean end = true; Arrays.fill(localItemSupport, 0); while (node != null) { int support = node.count; Node parent = node.parent; while (parent != null) { localItem...
java
private boolean getLocalItemSupport(FPTree.Node node, int[] localItemSupport) { boolean end = true; Arrays.fill(localItemSupport, 0); while (node != null) { int support = node.count; Node parent = node.parent; while (parent != null) { localItem...
[ "private", "boolean", "getLocalItemSupport", "(", "FPTree", ".", "Node", "node", ",", "int", "[", "]", "localItemSupport", ")", "{", "boolean", "end", "=", "true", ";", "Arrays", ".", "fill", "(", "localItemSupport", ",", "0", ")", ";", "while", "(", "no...
Counts the supports of single items in ancestor item sets linked list. @return true if there are condition patterns given this node
[ "Counts", "the", "supports", "of", "single", "items", "in", "ancestor", "item", "sets", "linked", "list", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/FPGrowth.java#L421-L437
sagiegurari/fax4j
src/main/java/org/fax4j/util/IOHelper.java
IOHelper.readAndWriteStreams
public static void readAndWriteStreams(InputStream inputStream,OutputStream outputStream) throws IOException { byte[] buffer=new byte[5000]; int read=-1; try { do { //read next buffer read=inputStream.read(buffer); ...
java
public static void readAndWriteStreams(InputStream inputStream,OutputStream outputStream) throws IOException { byte[] buffer=new byte[5000]; int read=-1; try { do { //read next buffer read=inputStream.read(buffer); ...
[ "public", "static", "void", "readAndWriteStreams", "(", "InputStream", "inputStream", ",", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "5000", "]", ";", "int", "read", "=", "-", "1",...
Reads the data from the input stream and writes to the output stream. @param inputStream The inputStream to read from @param outputStream The output stream to write to @throws IOException Any IO exception
[ "Reads", "the", "data", "from", "the", "input", "stream", "and", "writes", "to", "the", "output", "stream", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/IOHelper.java#L384-L408
mkolisnyk/cucumber-reports
cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java
LazyAssert.assertThat
public static <T> void assertThat(T actual, Matcher<? super T> matcher) { assertThat("", actual, matcher); }
java
public static <T> void assertThat(T actual, Matcher<? super T> matcher) { assertThat("", actual, matcher); }
[ "public", "static", "<", "T", ">", "void", "assertThat", "(", "T", "actual", ",", "Matcher", "<", "?", "super", "T", ">", "matcher", ")", "{", "assertThat", "(", "\"\"", ",", "actual", ",", "matcher", ")", ";", "}" ]
Asserts that <code>actual</code> satisfies the condition specified by <code>matcher</code>. If not, an {@link LazyAssertionError} is thrown with information about the matcher and failing value. Example: <pre> assertThat(0, is(1)); // fails: // failure message: // expected: is &lt;1&gt; // got value: &lt;0&gt; assertTh...
[ "Asserts", "that", "<code", ">", "actual<", "/", "code", ">", "satisfies", "the", "condition", "specified", "by", "<code", ">", "matcher<", "/", "code", ">", ".", "If", "not", "an", "{", "@link", "LazyAssertionError", "}", "is", "thrown", "with", "informat...
train
https://github.com/mkolisnyk/cucumber-reports/blob/9c9a32f15f0bf1eb1d3d181a11bae9c5eec84a8e/cucumber-runner/src/main/java/com/github/mkolisnyk/cucumber/assertions/LazyAssert.java#L922-L924
stephanenicolas/toothpick
toothpick-runtime/src/main/java/toothpick/ScopeImpl.java
ScopeImpl.getUnBoundProvider
private <T> InternalProviderImpl<? extends T> getUnBoundProvider(Class<T> clazz, String bindingName) { return getInternalProvider(clazz, bindingName, false); }
java
private <T> InternalProviderImpl<? extends T> getUnBoundProvider(Class<T> clazz, String bindingName) { return getInternalProvider(clazz, bindingName, false); }
[ "private", "<", "T", ">", "InternalProviderImpl", "<", "?", "extends", "T", ">", "getUnBoundProvider", "(", "Class", "<", "T", ">", "clazz", ",", "String", "bindingName", ")", "{", "return", "getInternalProvider", "(", "clazz", ",", "bindingName", ",", "fals...
Obtains the provider of the class {@code clazz} and name {@code bindingName}, if any. The returned provider will belong to the pool of unbound providers. It can be {@code null} if there is no such provider. @param clazz the class for which to obtain the unbound provider. @param bindingName the name, possibly {@code nu...
[ "Obtains", "the", "provider", "of", "the", "class", "{", "@code", "clazz", "}", "and", "name", "{", "@code", "bindingName", "}", "if", "any", ".", "The", "returned", "provider", "will", "belong", "to", "the", "pool", "of", "unbound", "providers", ".", "I...
train
https://github.com/stephanenicolas/toothpick/blob/54476ca9a5fa48809c15a46e43e38db9ed7e1a75/toothpick-runtime/src/main/java/toothpick/ScopeImpl.java#L376-L378
JodaOrg/joda-money
src/main/java/org/joda/money/CurrencyUnit.java
CurrencyUnit.registerCurrency
public static synchronized CurrencyUnit registerCurrency( String currencyCode, int numericCurrencyCode, int decimalPlaces, boolean force) { List<String> countryCodes = Collections.emptyList(); return registerCurrency(currencyCode, numericCurrency...
java
public static synchronized CurrencyUnit registerCurrency( String currencyCode, int numericCurrencyCode, int decimalPlaces, boolean force) { List<String> countryCodes = Collections.emptyList(); return registerCurrency(currencyCode, numericCurrency...
[ "public", "static", "synchronized", "CurrencyUnit", "registerCurrency", "(", "String", "currencyCode", ",", "int", "numericCurrencyCode", ",", "int", "decimalPlaces", ",", "boolean", "force", ")", "{", "List", "<", "String", ">", "countryCodes", "=", "Collections", ...
Registers a currency allowing it to be used, allowing replacement. <p> This class only permits known currencies to be returned. To achieve this, all currencies have to be registered in advance. <p> Since this method is public, it is possible to add currencies in application code. It is recommended to do this only at st...
[ "Registers", "a", "currency", "allowing", "it", "to", "be", "used", "allowing", "replacement", ".", "<p", ">", "This", "class", "only", "permits", "known", "currencies", "to", "be", "returned", ".", "To", "achieve", "this", "all", "currencies", "have", "to",...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/CurrencyUnit.java#L265-L273
FXMisc/WellBehavedFX
src/main/java/org/fxmisc/wellbehaved/event/Nodes.java
Nodes.popInputMap
public static boolean popInputMap(Node node) { Stack<InputMap<?>> stackedInputMaps = getStack(node); if (!stackedInputMaps.isEmpty()) { // If stack is not empty, node has already been initialized, so can use unsafe methods. // Now, completely override current input map with previ...
java
public static boolean popInputMap(Node node) { Stack<InputMap<?>> stackedInputMaps = getStack(node); if (!stackedInputMaps.isEmpty()) { // If stack is not empty, node has already been initialized, so can use unsafe methods. // Now, completely override current input map with previ...
[ "public", "static", "boolean", "popInputMap", "(", "Node", "node", ")", "{", "Stack", "<", "InputMap", "<", "?", ">", ">", "stackedInputMaps", "=", "getStack", "(", "node", ")", ";", "if", "(", "!", "stackedInputMaps", ".", "isEmpty", "(", ")", ")", "{...
If the internal stack has an {@link InputMap}, removes the current {@link InputMap} that was installed on the give node via {@link #pushInputMap(Node, InputMap)}, reinstalls the previous {@code InputMap}, and then returns true. If the stack is empty, returns false.
[ "If", "the", "internal", "stack", "has", "an", "{" ]
train
https://github.com/FXMisc/WellBehavedFX/blob/ca889734481f5439655ca8deb6f742964b5654b0/src/main/java/org/fxmisc/wellbehaved/event/Nodes.java#L102-L112
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/network/manager/NetworkManager.java
NetworkManager.deployModule
private void deployModule(final Node node, final InstanceContext instance, final CountingCompletionHandler<Void> counter) { log.debug(String.format("%s - Deploying %s to %s", NetworkManager.this, instance.component().asModule().module(), node.address())); node.deployModule(instance.component().asModule().module...
java
private void deployModule(final Node node, final InstanceContext instance, final CountingCompletionHandler<Void> counter) { log.debug(String.format("%s - Deploying %s to %s", NetworkManager.this, instance.component().asModule().module(), node.address())); node.deployModule(instance.component().asModule().module...
[ "private", "void", "deployModule", "(", "final", "Node", "node", ",", "final", "InstanceContext", "instance", ",", "final", "CountingCompletionHandler", "<", "Void", ">", "counter", ")", "{", "log", ".", "debug", "(", "String", ".", "format", "(", "\"%s - Depl...
Deploys a module component instance in the network's cluster.
[ "Deploys", "a", "module", "component", "instance", "in", "the", "network", "s", "cluster", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/network/manager/NetworkManager.java#L833-L850
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newSystemException
public static SystemException newSystemException(String message, Object... args) { return newSystemException(null, message, args); }
java
public static SystemException newSystemException(String message, Object... args) { return newSystemException(null, message, args); }
[ "public", "static", "SystemException", "newSystemException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newSystemException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link SystemException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link SystemException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@link St...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "SystemException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L901-L903
netty/netty
handler/src/main/java/io/netty/handler/logging/LoggingHandler.java
LoggingHandler.formatSimple
private static String formatSimple(ChannelHandlerContext ctx, String eventName, Object msg) { String chStr = ctx.channel().toString(); String msgStr = String.valueOf(msg); StringBuilder buf = new StringBuilder(chStr.length() + 1 + eventName.length() + 2 + msgStr.length()); return buf.app...
java
private static String formatSimple(ChannelHandlerContext ctx, String eventName, Object msg) { String chStr = ctx.channel().toString(); String msgStr = String.valueOf(msg); StringBuilder buf = new StringBuilder(chStr.length() + 1 + eventName.length() + 2 + msgStr.length()); return buf.app...
[ "private", "static", "String", "formatSimple", "(", "ChannelHandlerContext", "ctx", ",", "String", "eventName", ",", "Object", "msg", ")", "{", "String", "chStr", "=", "ctx", ".", "channel", "(", ")", ".", "toString", "(", ")", ";", "String", "msgStr", "="...
Generates the default log message of the specified event whose argument is an arbitrary object.
[ "Generates", "the", "default", "log", "message", "of", "the", "specified", "event", "whose", "argument", "is", "an", "arbitrary", "object", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/logging/LoggingHandler.java#L369-L374
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.dedicated_server_ip_routedTo_GET
public OvhPrice dedicated_server_ip_routedTo_GET(net.minidev.ovh.api.price.dedicated.server.OvhIpEnum routedTo) throws IOException { String qPath = "/price/dedicated/server/ip/{routedTo}"; StringBuilder sb = path(qPath, routedTo); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, Ovh...
java
public OvhPrice dedicated_server_ip_routedTo_GET(net.minidev.ovh.api.price.dedicated.server.OvhIpEnum routedTo) throws IOException { String qPath = "/price/dedicated/server/ip/{routedTo}"; StringBuilder sb = path(qPath, routedTo); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, Ovh...
[ "public", "OvhPrice", "dedicated_server_ip_routedTo_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "dedicated", ".", "server", ".", "OvhIpEnum", "routedTo", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/price/dedica...
Get price of IPs REST: GET /price/dedicated/server/ip/{routedTo} @param routedTo [required] Ip
[ "Get", "price", "of", "IPs" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L128-L133
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.ofCombinations
public static StreamEx<int[]> ofCombinations(int n, int k) { checkNonNegative("k", k); checkNonNegative("n", n); if (k > n) { return StreamEx.empty(); } if (k == 0) { return StreamEx.of(new int[0]); } long size = CombinationSpliterator.cnk(...
java
public static StreamEx<int[]> ofCombinations(int n, int k) { checkNonNegative("k", k); checkNonNegative("n", n); if (k > n) { return StreamEx.empty(); } if (k == 0) { return StreamEx.of(new int[0]); } long size = CombinationSpliterator.cnk(...
[ "public", "static", "StreamEx", "<", "int", "[", "]", ">", "ofCombinations", "(", "int", "n", ",", "int", "k", ")", "{", "checkNonNegative", "(", "\"k\"", ",", "k", ")", ";", "checkNonNegative", "(", "\"n\"", ",", "n", ")", ";", "if", "(", "k", ">"...
Returns a new {@code StreamEx} of {@code int[]} arrays containing all the possible combinations of length {@code k} consisting of numbers from 0 to {@code n-1} in lexicographic order. <p> Example: {@code StreamEx.ofCombinations(3, 2)} returns the stream of three elements: {@code [0, 1]}, {@code [0, 2]} and {@code [1, 2...
[ "Returns", "a", "new", "{", "@code", "StreamEx", "}", "of", "{", "@code", "int", "[]", "}", "arrays", "containing", "all", "the", "possible", "combinations", "of", "length", "{", "@code", "k", "}", "consisting", "of", "numbers", "from", "0", "to", "{", ...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L2511-L2527
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/TitleRule.java
TitleRule.apply
@Override public JDocComment apply(String nodeName, JsonNode node, JsonNode parent, JDocCommentable generatableType, Schema schema) { JDocComment javadoc = generatableType.javadoc(); javadoc.add(0, node.asText() + "\n<p>\n"); return javadoc; }
java
@Override public JDocComment apply(String nodeName, JsonNode node, JsonNode parent, JDocCommentable generatableType, Schema schema) { JDocComment javadoc = generatableType.javadoc(); javadoc.add(0, node.asText() + "\n<p>\n"); return javadoc; }
[ "@", "Override", "public", "JDocComment", "apply", "(", "String", "nodeName", ",", "JsonNode", "node", ",", "JsonNode", "parent", ",", "JDocCommentable", "generatableType", ",", "Schema", "schema", ")", "{", "JDocComment", "javadoc", "=", "generatableType", ".", ...
Applies this schema rule to take the required code generation steps. <p> When a title node is found and applied with this rule, the value of the title is added as a JavaDoc comment. This rule is typically applied to the generated field, generated getter and generated setter for the property. <p> Note that the title is ...
[ "Applies", "this", "schema", "rule", "to", "take", "the", "required", "code", "generation", "steps", ".", "<p", ">", "When", "a", "title", "node", "is", "found", "and", "applied", "with", "this", "rule", "the", "value", "of", "the", "title", "is", "added...
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/TitleRule.java#L56-L63
Jasig/uPortal
uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java
PortletRendererImpl.doRenderReplayCachedContent
protected PortletRenderResult doRenderReplayCachedContent( IPortletWindow portletWindow, HttpServletRequest httpServletRequest, CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> cacheState, PortletOutputHandler portletOutputHandler, Rende...
java
protected PortletRenderResult doRenderReplayCachedContent( IPortletWindow portletWindow, HttpServletRequest httpServletRequest, CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> cacheState, PortletOutputHandler portletOutputHandler, Rende...
[ "protected", "PortletRenderResult", "doRenderReplayCachedContent", "(", "IPortletWindow", "portletWindow", ",", "HttpServletRequest", "httpServletRequest", ",", "CacheState", "<", "CachedPortletData", "<", "PortletRenderResult", ">", ",", "PortletRenderResult", ">", "cacheState...
Replay the cached content inside the {@link CachedPortletData} as the response to a doRender.
[ "Replay", "the", "cached", "content", "inside", "the", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-web/src/main/java/org/apereo/portal/portlet/rendering/PortletRendererImpl.java#L550-L576
alkacon/opencms-core
src/org/opencms/lock/CmsLockUtil.java
CmsLockUtil.tryUnlock
public static void tryUnlock(CmsObject cms, CmsResource resource) { try { cms.unlockResource(resource); } catch (CmsException e) { LOG.debug("Unable to unlock " + resource.getRootPath(), e); } }
java
public static void tryUnlock(CmsObject cms, CmsResource resource) { try { cms.unlockResource(resource); } catch (CmsException e) { LOG.debug("Unable to unlock " + resource.getRootPath(), e); } }
[ "public", "static", "void", "tryUnlock", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "{", "try", "{", "cms", ".", "unlockResource", "(", "resource", ")", ";", "}", "catch", "(", "CmsException", "e", ")", "{", "LOG", ".", "debug", "(", ...
Tries to unlock the given resource.<p> Will ignore any failure.<p> @param cms the cms context @param resource the resource to unlock
[ "Tries", "to", "unlock", "the", "given", "resource", ".", "<p", ">", "Will", "ignore", "any", "failure", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockUtil.java#L229-L236
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.setCursor
public void setCursor(Object object, String cursor) { if (object == null) { Dom.setStyleAttribute(getRootElement(), "cursor", cursor); } else { Element element = getGroup(object); if (element != null) { Dom.setStyleAttribute(element, "cursor", cursor); } } }
java
public void setCursor(Object object, String cursor) { if (object == null) { Dom.setStyleAttribute(getRootElement(), "cursor", cursor); } else { Element element = getGroup(object); if (element != null) { Dom.setStyleAttribute(element, "cursor", cursor); } } }
[ "public", "void", "setCursor", "(", "Object", "object", ",", "String", "cursor", ")", "{", "if", "(", "object", "==", "null", ")", "{", "Dom", ".", "setStyleAttribute", "(", "getRootElement", "(", ")", ",", "\"cursor\"", ",", "cursor", ")", ";", "}", "...
Set a specific cursor on an element of this <code>GraphicsContext</code>. @param object the element on which the controller should be set. @param cursor The string representation of the cursor to use.
[ "Set", "a", "specific", "cursor", "on", "an", "element", "of", "this", "<code", ">", "GraphicsContext<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L628-L637
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/wiringpi/GpioInterrupt.java
GpioInterrupt.pinStateChangeCallback
@SuppressWarnings("unchecked") private static void pinStateChangeCallback(int pin, boolean state) { Vector<GpioInterruptListener> listenersClone; listenersClone = (Vector<GpioInterruptListener>) listeners.clone(); for (int i = 0; i < listenersClone.size(); i++) { GpioInterruptL...
java
@SuppressWarnings("unchecked") private static void pinStateChangeCallback(int pin, boolean state) { Vector<GpioInterruptListener> listenersClone; listenersClone = (Vector<GpioInterruptListener>) listeners.clone(); for (int i = 0; i < listenersClone.size(); i++) { GpioInterruptL...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "pinStateChangeCallback", "(", "int", "pin", ",", "boolean", "state", ")", "{", "Vector", "<", "GpioInterruptListener", ">", "listenersClone", ";", "listenersClone", "=", "(", "Vector...
<p> This method is provided as the callback handler for the Pi4J native library to invoke when a GPIO interrupt is detected. This method should not be called from any Java consumers. (Thus is is marked as a private method.) </p> @param pin GPIO pin number (not header pin number; not wiringPi pin number) @param state N...
[ "<p", ">", "This", "method", "is", "provided", "as", "the", "callback", "handler", "for", "the", "Pi4J", "native", "library", "to", "invoke", "when", "a", "GPIO", "interrupt", "is", "detected", ".", "This", "method", "should", "not", "be", "called", "from"...
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/wiringpi/GpioInterrupt.java#L118-L133
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/CalendarUtil.java
CalendarUtil.addYears
public XMLGregorianCalendar addYears(final XMLGregorianCalendar cal, final int amount) { XMLGregorianCalendar to = buildXMLGregorianCalendarDate(cal); // Add amount of months to.add(addYears(amount)); return to; }
java
public XMLGregorianCalendar addYears(final XMLGregorianCalendar cal, final int amount) { XMLGregorianCalendar to = buildXMLGregorianCalendarDate(cal); // Add amount of months to.add(addYears(amount)); return to; }
[ "public", "XMLGregorianCalendar", "addYears", "(", "final", "XMLGregorianCalendar", "cal", ",", "final", "int", "amount", ")", "{", "XMLGregorianCalendar", "to", "=", "buildXMLGregorianCalendarDate", "(", "cal", ")", ";", "// Add amount of months", "to", ".", "add", ...
Add Years to a Gregorian Calendar. @param cal The XMLGregorianCalendar source @param amount The amount of years. Can be a negative Integer to substract. @return A XMLGregorianCalendar with the new Date
[ "Add", "Years", "to", "a", "Gregorian", "Calendar", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/CalendarUtil.java#L63-L68
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java
AlignmentTools.getSymmetryOrder
public static int getSymmetryOrder(Map<Integer, Integer> alignment, final int maxSymmetry, final float minimumMetricChange) { return getSymmetryOrder(alignment, new IdentityMap<Integer>(), maxSymmetry, minimumMetricChange); }
java
public static int getSymmetryOrder(Map<Integer, Integer> alignment, final int maxSymmetry, final float minimumMetricChange) { return getSymmetryOrder(alignment, new IdentityMap<Integer>(), maxSymmetry, minimumMetricChange); }
[ "public", "static", "int", "getSymmetryOrder", "(", "Map", "<", "Integer", ",", "Integer", ">", "alignment", ",", "final", "int", "maxSymmetry", ",", "final", "float", "minimumMetricChange", ")", "{", "return", "getSymmetryOrder", "(", "alignment", ",", "new", ...
Helper for {@link #getSymmetryOrder(Map, Map, int, float)} with a true identity function (X->X). <p>This method should only be used in cases where the two proteins aligned have identical numbering, as for self-alignments. See {@link #getSymmetryOrder(AFPChain, int, float)} for a way to guess the sequential corresponde...
[ "Helper", "for", "{", "@link", "#getSymmetryOrder", "(", "Map", "Map", "int", "float", ")", "}", "with", "a", "true", "identity", "function", "(", "X", "-", ">", "X", ")", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java#L283-L286
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java
TypesafeConfigUtils.getObject
@SuppressWarnings("unchecked") public static <T> T getObject(Config config, String path, Class<T> clazz) { Object obj = getObject(config, path); return obj != null && clazz.isAssignableFrom(obj.getClass()) ? (T) obj : null; }
java
@SuppressWarnings("unchecked") public static <T> T getObject(Config config, String path, Class<T> clazz) { Object obj = getObject(config, path); return obj != null && clazz.isAssignableFrom(obj.getClass()) ? (T) obj : null; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getObject", "(", "Config", "config", ",", "String", "path", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Object", "obj", "=", "getObject", "(", "config", "...
Get a configuration as Java object. Return {@code null} if missing or wrong type. @param config @param path @param clazz @return
[ "Get", "a", "configuration", "as", "Java", "object", ".", "Return", "{", "@code", "null", "}", "if", "missing", "or", "wrong", "type", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java#L825-L829
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/resources/Downloader.java
Downloader.checkMD5OfFile
public static boolean checkMD5OfFile(String targetMD5, File file) throws IOException { InputStream in = FileUtils.openInputStream(file); String trueMd5 = DigestUtils.md5Hex(in); IOUtils.closeQuietly(in); return (targetMD5.equals(trueMd5)); }
java
public static boolean checkMD5OfFile(String targetMD5, File file) throws IOException { InputStream in = FileUtils.openInputStream(file); String trueMd5 = DigestUtils.md5Hex(in); IOUtils.closeQuietly(in); return (targetMD5.equals(trueMd5)); }
[ "public", "static", "boolean", "checkMD5OfFile", "(", "String", "targetMD5", ",", "File", "file", ")", "throws", "IOException", "{", "InputStream", "in", "=", "FileUtils", ".", "openInputStream", "(", "file", ")", ";", "String", "trueMd5", "=", "DigestUtils", ...
Check the MD5 of the specified file @param targetMD5 Expected MD5 @param file File to check @return True if MD5 matches, false otherwise
[ "Check", "the", "MD5", "of", "the", "specified", "file" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/resources/Downloader.java#L118-L123
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedValue.java
OriginTrackedValue.of
public static OriginTrackedValue of(Object value, Origin origin) { if (value == null) { return null; } if (value instanceof CharSequence) { return new OriginTrackedCharSequence((CharSequence) value, origin); } return new OriginTrackedValue(value, origin); }
java
public static OriginTrackedValue of(Object value, Origin origin) { if (value == null) { return null; } if (value instanceof CharSequence) { return new OriginTrackedCharSequence((CharSequence) value, origin); } return new OriginTrackedValue(value, origin); }
[ "public", "static", "OriginTrackedValue", "of", "(", "Object", "value", ",", "Origin", "origin", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "value", "instanceof", "CharSequence", ")", "{", "return", "new"...
Create an {@link OriginTrackedValue} containing the specified {@code value} and {@code origin}. If the source value implements {@link CharSequence} then so will the resulting {@link OriginTrackedValue}. @param value the source value @param origin the origin @return an {@link OriginTrackedValue} or {@code null} if the s...
[ "Create", "an", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedValue.java#L85-L93
alkacon/opencms-core
src/org/opencms/i18n/tools/CmsContainerPageCopier.java
CmsContainerPageCopier.copyPageOnly
public void copyPageOnly(CmsResource originalPage, String targetPageRootPath) throws CmsException, NoCustomReplacementException { if ((null == originalPage) || !OpenCms.getResourceManager().getResourceType(originalPage).getTypeName().equals( CmsResourceTypeXmlContainerPage.getSt...
java
public void copyPageOnly(CmsResource originalPage, String targetPageRootPath) throws CmsException, NoCustomReplacementException { if ((null == originalPage) || !OpenCms.getResourceManager().getResourceType(originalPage).getTypeName().equals( CmsResourceTypeXmlContainerPage.getSt...
[ "public", "void", "copyPageOnly", "(", "CmsResource", "originalPage", ",", "String", "targetPageRootPath", ")", "throws", "CmsException", ",", "NoCustomReplacementException", "{", "if", "(", "(", "null", "==", "originalPage", ")", "||", "!", "OpenCms", ".", "getRe...
Copies the given container page to the provided root path. @param originalPage the page to copy @param targetPageRootPath the root path of the copy target. @throws CmsException thrown if something goes wrong. @throws NoCustomReplacementException if a custom replacement is not found for a type which requires it.
[ "Copies", "the", "given", "container", "page", "to", "the", "provided", "root", "path", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/tools/CmsContainerPageCopier.java#L223-L240
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java
DefBase.setProperty
public void setProperty(String name, String value) { if ((value == null) || (value.length() == 0)) { _properties.remove(name); } else { _properties.setProperty(name, value); } }
java
public void setProperty(String name, String value) { if ((value == null) || (value.length() == 0)) { _properties.remove(name); } else { _properties.setProperty(name, value); } }
[ "public", "void", "setProperty", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "(", "value", "==", "null", ")", "||", "(", "value", ".", "length", "(", ")", "==", "0", ")", ")", "{", "_properties", ".", "remove", "(", "name", ...
Sets a property. @param name The property name @param value The property value
[ "Sets", "a", "property", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/DefBase.java#L133-L143
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/sampling/VarOptItemsUnion.java
VarOptItemsUnion.update
public void update(final Memory mem, final ArrayOfItemsSerDe<T> serDe) { if (mem != null) { final VarOptItemsSketch<T> vis = VarOptItemsSketch.heapify(mem, serDe); mergeInto(vis); } }
java
public void update(final Memory mem, final ArrayOfItemsSerDe<T> serDe) { if (mem != null) { final VarOptItemsSketch<T> vis = VarOptItemsSketch.heapify(mem, serDe); mergeInto(vis); } }
[ "public", "void", "update", "(", "final", "Memory", "mem", ",", "final", "ArrayOfItemsSerDe", "<", "T", ">", "serDe", ")", "{", "if", "(", "mem", "!=", "null", ")", "{", "final", "VarOptItemsSketch", "<", "T", ">", "vis", "=", "VarOptItemsSketch", ".", ...
Union the given Memory image of the sketch. <p>This method can be repeatedly called.</p> @param mem Memory image of sketch to be merged @param serDe An instance of ArrayOfItemsSerDe
[ "Union", "the", "given", "Memory", "image", "of", "the", "sketch", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/sampling/VarOptItemsUnion.java#L205-L210
anotheria/moskito
moskito-webui/src/main/java/net/anotheria/moskito/webui/producers/action/ShowProducerAction.java
ShowProducerAction.populateCumulatedStats
private void populateCumulatedStats(final StatDecoratorBean decoratorBean, final List<StatLineAO> allStatLines) { if (allStatLines == null || allStatLines.isEmpty()) { LOGGER.warn("Producer's stats are empty"); return; } final int cumulatedIndex = getCumulatedIndex(allStatLines); if (cumulatedIndex == -1...
java
private void populateCumulatedStats(final StatDecoratorBean decoratorBean, final List<StatLineAO> allStatLines) { if (allStatLines == null || allStatLines.isEmpty()) { LOGGER.warn("Producer's stats are empty"); return; } final int cumulatedIndex = getCumulatedIndex(allStatLines); if (cumulatedIndex == -1...
[ "private", "void", "populateCumulatedStats", "(", "final", "StatDecoratorBean", "decoratorBean", ",", "final", "List", "<", "StatLineAO", ">", "allStatLines", ")", "{", "if", "(", "allStatLines", "==", "null", "||", "allStatLines", ".", "isEmpty", "(", ")", ")",...
Allows to set cumulated stat to decorator bean. @param decoratorBean {@link StatDecoratorBean} @param allStatLines list of {@link StatLineAO}, all stats present in producer
[ "Allows", "to", "set", "cumulated", "stat", "to", "decorator", "bean", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-webui/src/main/java/net/anotheria/moskito/webui/producers/action/ShowProducerAction.java#L231-L248
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/EntityUtils.java
EntityUtils.getEntityRotation
public static int getEntityRotation(Entity entity, boolean sixWays) { if (entity == null) return 6; float pitch = entity.rotationPitch; if (sixWays && pitch < -45) return 4; if (sixWays && pitch > 45) return 5; return (MathHelper.floor(entity.rotationYaw * 4.0F / 360.0F + 0.5D) + 2) & 3; }
java
public static int getEntityRotation(Entity entity, boolean sixWays) { if (entity == null) return 6; float pitch = entity.rotationPitch; if (sixWays && pitch < -45) return 4; if (sixWays && pitch > 45) return 5; return (MathHelper.floor(entity.rotationYaw * 4.0F / 360.0F + 0.5D) + 2) & 3; }
[ "public", "static", "int", "getEntityRotation", "(", "Entity", "entity", ",", "boolean", "sixWays", ")", "{", "if", "(", "entity", "==", "null", ")", "return", "6", ";", "float", "pitch", "=", "entity", ".", "rotationPitch", ";", "if", "(", "sixWays", "&...
Gets the entity rotation based on where it's currently facing. @param entity the entity @param sixWays the six ways @return the entity rotation
[ "Gets", "the", "entity", "rotation", "based", "on", "where", "it", "s", "currently", "facing", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/EntityUtils.java#L180-L192
aws/aws-sdk-java
aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/StorageGatewayUtils.java
StorageGatewayUtils.getActivationKey
public static String getActivationKey(String gatewayAddress, Region activationRegion) throws AmazonClientException { return getActivationKey(gatewayAddress, activationRegion == null ? null : activationRegion.getName()); }
java
public static String getActivationKey(String gatewayAddress, Region activationRegion) throws AmazonClientException { return getActivationKey(gatewayAddress, activationRegion == null ? null : activationRegion.getName()); }
[ "public", "static", "String", "getActivationKey", "(", "String", "gatewayAddress", ",", "Region", "activationRegion", ")", "throws", "AmazonClientException", "{", "return", "getActivationKey", "(", "gatewayAddress", ",", "activationRegion", "==", "null", "?", "null", ...
Sends a request to the AWS Storage Gateway server running at the specified address, and returns the activation key for that server. @param gatewayAddress The DNS name or IP address of a running AWS Storage Gateway @param activationRegionName The region in which the gateway will be activated. @return The activation k...
[ "Sends", "a", "request", "to", "the", "AWS", "Storage", "Gateway", "server", "running", "at", "the", "specified", "address", "and", "returns", "the", "activation", "key", "for", "that", "server", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/StorageGatewayUtils.java#L72-L76
apache/incubator-gobblin
gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/converter/jdbc/AvroToJdbcEntryConverter.java
AvroToJdbcEntryConverter.convertSchema
@Override public JdbcEntrySchema convertSchema(Schema inputSchema, WorkUnitState workUnit) throws SchemaConversionException { LOG.info("Converting schema " + inputSchema); Preconditions.checkArgument(Type.RECORD.equals(inputSchema.getType()), "%s is expected for the first level element in Avro schema ...
java
@Override public JdbcEntrySchema convertSchema(Schema inputSchema, WorkUnitState workUnit) throws SchemaConversionException { LOG.info("Converting schema " + inputSchema); Preconditions.checkArgument(Type.RECORD.equals(inputSchema.getType()), "%s is expected for the first level element in Avro schema ...
[ "@", "Override", "public", "JdbcEntrySchema", "convertSchema", "(", "Schema", "inputSchema", ",", "WorkUnitState", "workUnit", ")", "throws", "SchemaConversionException", "{", "LOG", ".", "info", "(", "\"Converting schema \"", "+", "inputSchema", ")", ";", "Preconditi...
Converts Avro schema to JdbcEntrySchema. Few precondition to the Avro schema 1. Avro schema should have one entry type record at first depth. 2. Avro schema can recurse by having record inside record. 3. Supported Avro primitive types and conversion boolean --> java.lang.Boolean int --> java.lang.Integer long --> java...
[ "Converts", "Avro", "schema", "to", "JdbcEntrySchema", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/converter/jdbc/AvroToJdbcEntryConverter.java#L176-L205
jparsec/jparsec
jparsec/src/main/java/org/jparsec/pattern/Patterns.java
Patterns.hasAtLeast
public static Pattern hasAtLeast(final int n) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { if ((begin + n) > end) return MISMATCH; else return n; } @Override public String toString() { return ".{" + n + ",}"; } }; }
java
public static Pattern hasAtLeast(final int n) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { if ((begin + n) > end) return MISMATCH; else return n; } @Override public String toString() { return ".{" + n + ",}"; } }; }
[ "public", "static", "Pattern", "hasAtLeast", "(", "final", "int", "n", ")", "{", "return", "new", "Pattern", "(", ")", "{", "@", "Override", "public", "int", "match", "(", "CharSequence", "src", ",", "int", "begin", ",", "int", "end", ")", "{", "if", ...
Returns a {@link Pattern} object that matches if the input has at least {@code n} characters left. Match length is {@code n} if succeed.
[ "Returns", "a", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/pattern/Patterns.java#L130-L140
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/BlocksMap.java
BlocksMap.removeNode
boolean removeNode(Block b, DatanodeDescriptor node) { BlockInfo info = blocks.get(b); if (info == null) return false; // remove block from the data-node list and the node from the block info boolean removed = node.removeBlock(info); if (info.getDatanode(0) == null // no datanodes left ...
java
boolean removeNode(Block b, DatanodeDescriptor node) { BlockInfo info = blocks.get(b); if (info == null) return false; // remove block from the data-node list and the node from the block info boolean removed = node.removeBlock(info); if (info.getDatanode(0) == null // no datanodes left ...
[ "boolean", "removeNode", "(", "Block", "b", ",", "DatanodeDescriptor", "node", ")", "{", "BlockInfo", "info", "=", "blocks", ".", "get", "(", "b", ")", ";", "if", "(", "info", "==", "null", ")", "return", "false", ";", "// remove block from the data-node lis...
Remove data-node reference from the block. Remove the block from the block map only if it does not belong to any file and data-nodes.
[ "Remove", "data", "-", "node", "reference", "from", "the", "block", ".", "Remove", "the", "block", "from", "the", "block", "map", "only", "if", "it", "does", "not", "belong", "to", "any", "file", "and", "data", "-", "nodes", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/BlocksMap.java#L555-L568
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java
MXBeanUtil.unregisterCacheObject
public static void unregisterCacheObject(String cacheManagerName, String name, boolean stats) { synchronized (mBeanServer) { ObjectName objectName = calculateObjectName(cacheManagerName, name, stats); Set<ObjectName> registeredObjectNames = mBeanServer.queryNames(objectName, null); ...
java
public static void unregisterCacheObject(String cacheManagerName, String name, boolean stats) { synchronized (mBeanServer) { ObjectName objectName = calculateObjectName(cacheManagerName, name, stats); Set<ObjectName> registeredObjectNames = mBeanServer.queryNames(objectName, null); ...
[ "public", "static", "void", "unregisterCacheObject", "(", "String", "cacheManagerName", ",", "String", "name", ",", "boolean", "stats", ")", "{", "synchronized", "(", "mBeanServer", ")", "{", "ObjectName", "objectName", "=", "calculateObjectName", "(", "cacheManager...
UnRegisters the mxbean if registered already. @param cacheManagerName name generated by URI and classloader. @param name cache name. @param stats is mxbean, a statistics mxbean.
[ "UnRegisters", "the", "mxbean", "if", "registered", "already", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java#L79-L99
chr78rm/tracelogger
src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java
AbstractTracer.initCurrentTracingContext
public void initCurrentTracingContext(int debugLevel, boolean online) { // todo: prevent manually creation of tracing contexts by configuration?! TracingContext tracingContext = this.threadMap.getCurrentTracingContext(); if (tracingContext == null) { System.out.println(formatContextInfo(de...
java
public void initCurrentTracingContext(int debugLevel, boolean online) { // todo: prevent manually creation of tracing contexts by configuration?! TracingContext tracingContext = this.threadMap.getCurrentTracingContext(); if (tracingContext == null) { System.out.println(formatContextInfo(de...
[ "public", "void", "initCurrentTracingContext", "(", "int", "debugLevel", ",", "boolean", "online", ")", "{", "// todo: prevent manually creation of tracing contexts by configuration?!\r", "TracingContext", "tracingContext", "=", "this", ".", "threadMap", ".", "getCurrentTracing...
Initialises the current tracing context with the given debugLevel and online state. @param debugLevel controls the extent of the output @param online a value of false delivers no output of the current thread at all whereas a value of true delivers output controlled by debugLevel
[ "Initialises", "the", "current", "tracing", "context", "with", "the", "given", "debugLevel", "and", "online", "state", "." ]
train
https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java#L571-L585
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/copy/AutomatonLowLevelCopy.java
AutomatonLowLevelCopy.rawCopy
public static <S1, I, T1, S2, T2, SP2, TP2> Mapping<S1, S2> rawCopy(AutomatonCopyMethod method, Automaton<S1, ? super I, T1> in, Collection<? extends I> inputs, ...
java
public static <S1, I, T1, S2, T2, SP2, TP2> Mapping<S1, S2> rawCopy(AutomatonCopyMethod method, Automaton<S1, ? super I, T1> in, Collection<? extends I> inputs, ...
[ "public", "static", "<", "S1", ",", "I", ",", "T1", ",", "S2", ",", "T2", ",", "SP2", ",", "TP2", ">", "Mapping", "<", "S1", ",", "S2", ">", "rawCopy", "(", "AutomatonCopyMethod", "method", ",", "Automaton", "<", "S1", ",", "?", "super", "I", ","...
Copies an {@link Automaton} to a {@link MutableAutomaton} with a compatible input alphabet, but possibly heterogeneous state and transition properties. States and transitions will not be filtered. @param <S1> input automaton state type @param <I> input symbol type @param <T1> input automaton transition type @param <S2...
[ "Copies", "an", "{", "@link", "Automaton", "}", "to", "a", "{", "@link", "MutableAutomaton", "}", "with", "a", "compatible", "input", "alphabet", "but", "possibly", "heterogeneous", "state", "and", "transition", "properties", ".", "States", "and", "transitions",...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/copy/AutomatonLowLevelCopy.java#L185-L192
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getEventsBatch
public OneLoginResponse<Event> getEventsBatch(int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getEventsBatch(new HashMap<String, String>(), batchSize, afterCursor); }
java
public OneLoginResponse<Event> getEventsBatch(int batchSize, String afterCursor) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getEventsBatch(new HashMap<String, String>(), batchSize, afterCursor); }
[ "public", "OneLoginResponse", "<", "Event", ">", "getEventsBatch", "(", "int", "batchSize", ",", "String", "afterCursor", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "getEventsBatch", "(", "new", "Hash...
Get a batch of Events. @param batchSize Size of the Batch @param afterCursor Reference to continue collecting items of next page @return OneLoginResponse of Event (Batch) @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are ...
[ "Get", "a", "batch", "of", "Events", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2004-L2007
deephacks/confit
api-model/src/main/java/org/deephacks/confit/model/Bean.java
Bean.setReferences
public void setReferences(final String propertyName, final List<BeanId> values) { Preconditions.checkNotNull(propertyName); if (values == null || values.size() == 0) { references.put(propertyName, null); return; } checkCircularReference(values.toArray(new BeanId[v...
java
public void setReferences(final String propertyName, final List<BeanId> values) { Preconditions.checkNotNull(propertyName); if (values == null || values.size() == 0) { references.put(propertyName, null); return; } checkCircularReference(values.toArray(new BeanId[v...
[ "public", "void", "setReferences", "(", "final", "String", "propertyName", ",", "final", "List", "<", "BeanId", ">", "values", ")", "{", "Preconditions", ".", "checkNotNull", "(", "propertyName", ")", ";", "if", "(", "values", "==", "null", "||", "values", ...
Overwrite/replace the current references with the provided reference. @param propertyName name of the property as defined by the bean's schema. @param values override
[ "Overwrite", "/", "replace", "the", "current", "references", "with", "the", "provided", "reference", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/api-model/src/main/java/org/deephacks/confit/model/Bean.java#L374-L382
apereo/cas
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/SamlUtils.java
SamlUtils.transformSamlObject
public static <T extends XMLObject> T transformSamlObject(final OpenSamlConfigBean configBean, final String xml, final Class<T> clazz) { return transformSamlObject(configBean, xml.getBytes(StandardCharsets.UTF_8), clazz); }
java
public static <T extends XMLObject> T transformSamlObject(final OpenSamlConfigBean configBean, final String xml, final Class<T> clazz) { return transformSamlObject(configBean, xml.getBytes(StandardCharsets.UTF_8), clazz); }
[ "public", "static", "<", "T", "extends", "XMLObject", ">", "T", "transformSamlObject", "(", "final", "OpenSamlConfigBean", "configBean", ",", "final", "String", "xml", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "return", "transformSamlObject", "(...
Transform saml object t. @param <T> the type parameter @param configBean the config bean @param xml the xml @param clazz the clazz @return the t
[ "Transform", "saml", "object", "t", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/SamlUtils.java#L84-L87
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java
DestinationManager.getDestination
public DestinationHandler getDestination(SIBUuid12 destinationUuid, boolean includeInvisible) throws SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getDestination", destinat...
java
public DestinationHandler getDestination(SIBUuid12 destinationUuid, boolean includeInvisible) throws SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getDestination", destinat...
[ "public", "DestinationHandler", "getDestination", "(", "SIBUuid12", "destinationUuid", ",", "boolean", "includeInvisible", ")", "throws", "SITemporaryDestinationNotFoundException", ",", "SINotPossibleInCurrentConfigurationException", "{", "if", "(", "TraceComponent", ".", "isAn...
Method getDestination. @param destinationUuid @return Destination @throws SIDestinationNotFoundException <p>This method provides lookup of a destination by its uuid. If the destination is not found, it throws SIDestinationNotFoundException.</p>
[ "Method", "getDestination", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java#L5184-L5201
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/Kryo.java
Kryo.addDefaultSerializer
public void addDefaultSerializer (Class type, SerializerFactory serializerFactory) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializerFactory == null) throw new IllegalArgumentException("serializerFactory cannot be null."); insertDefaultSerializer(type, serializerFact...
java
public void addDefaultSerializer (Class type, SerializerFactory serializerFactory) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializerFactory == null) throw new IllegalArgumentException("serializerFactory cannot be null."); insertDefaultSerializer(type, serializerFact...
[ "public", "void", "addDefaultSerializer", "(", "Class", "type", ",", "SerializerFactory", "serializerFactory", ")", "{", "if", "(", "type", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"type cannot be null.\"", ")", ";", "if", "(", "serial...
Instances of the specified class will use the specified factory to create a serializer when {@link #register(Class)} or {@link #register(Class, int)} are called. @see #setDefaultSerializer(Class)
[ "Instances", "of", "the", "specified", "class", "will", "use", "the", "specified", "factory", "to", "create", "a", "serializer", "when", "{" ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/Kryo.java#L269-L273
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/StructureIO.java
StructureIO.getBiologicalAssemblies
public static List<Structure> getBiologicalAssemblies(String pdbId) throws IOException, StructureException { return getBiologicalAssemblies(pdbId, AtomCache.DEFAULT_BIOASSEMBLY_STYLE); }
java
public static List<Structure> getBiologicalAssemblies(String pdbId) throws IOException, StructureException { return getBiologicalAssemblies(pdbId, AtomCache.DEFAULT_BIOASSEMBLY_STYLE); }
[ "public", "static", "List", "<", "Structure", ">", "getBiologicalAssemblies", "(", "String", "pdbId", ")", "throws", "IOException", ",", "StructureException", "{", "return", "getBiologicalAssemblies", "(", "pdbId", ",", "AtomCache", ".", "DEFAULT_BIOASSEMBLY_STYLE", "...
Returns all biological assemblies for the given PDB id, using multiModel={@value AtomCache#DEFAULT_BIOASSEMBLY_STYLE} <p> If only one biological assembly is required use {@link #getBiologicalAssembly(String)} or {@link #getBiologicalAssembly(String, int)} instead. @param pdbId @return @throws IOException @throws Struct...
[ "Returns", "all", "biological", "assemblies", "for", "the", "given", "PDB", "id", "using", "multiModel", "=", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureIO.java#L265-L267
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java
SpiderSession.addObject
public ObjectResult addObject(String tableName, DBObject dbObj) { Utils.require(!Utils.isEmpty(tableName), "tableName"); Utils.require(dbObj != null, "dbObj"); TableDefinition tableDef = m_appDef.getTableDef(tableName); Utils.require(tableDef != null, "Unknown ...
java
public ObjectResult addObject(String tableName, DBObject dbObj) { Utils.require(!Utils.isEmpty(tableName), "tableName"); Utils.require(dbObj != null, "dbObj"); TableDefinition tableDef = m_appDef.getTableDef(tableName); Utils.require(tableDef != null, "Unknown ...
[ "public", "ObjectResult", "addObject", "(", "String", "tableName", ",", "DBObject", "dbObj", ")", "{", "Utils", ".", "require", "(", "!", "Utils", ".", "isEmpty", "(", "tableName", ")", ",", "\"tableName\"", ")", ";", "Utils", ".", "require", "(", "dbObj",...
Add the given object to the given table, which must be defined for a table that belongs to this session's application. This is a convenience method that bundles the DBObject in a {@link DBObjectBatch} and calls {@link #addBatch(String, DBObjectBatch)}. The {@link ObjectResult} from the batch result is returned. @param...
[ "Add", "the", "given", "object", "to", "the", "given", "table", "which", "must", "be", "defined", "for", "a", "table", "that", "belongs", "to", "this", "session", "s", "application", ".", "This", "is", "a", "convenience", "method", "that", "bundles", "the"...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java#L102-L137
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRAvatar.java
GVRAvatar.loadModel
public void loadModel(GVRAndroidResource avatarResource) { EnumSet<GVRImportSettings> settings = GVRImportSettings.getRecommendedSettingsWith(EnumSet.of(GVRImportSettings.OPTIMIZE_GRAPH, GVRImportSettings.NO_ANIMATION)); GVRContext ctx = mAvatarRoot.getGVRContext(); GVRResourceVolume volume ...
java
public void loadModel(GVRAndroidResource avatarResource) { EnumSet<GVRImportSettings> settings = GVRImportSettings.getRecommendedSettingsWith(EnumSet.of(GVRImportSettings.OPTIMIZE_GRAPH, GVRImportSettings.NO_ANIMATION)); GVRContext ctx = mAvatarRoot.getGVRContext(); GVRResourceVolume volume ...
[ "public", "void", "loadModel", "(", "GVRAndroidResource", "avatarResource", ")", "{", "EnumSet", "<", "GVRImportSettings", ">", "settings", "=", "GVRImportSettings", ".", "getRecommendedSettingsWith", "(", "EnumSet", ".", "of", "(", "GVRImportSettings", ".", "OPTIMIZE...
Load the avatar base model @param avatarResource resource with avatar model
[ "Load", "the", "avatar", "base", "model" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRAvatar.java#L191-L200
google/closure-templates
java/src/com/google/template/soy/passes/ResolveExpressionTypesPass.java
ResolveExpressionTypesPass.getElementType
private SoyType getElementType(SoyType collectionType, ForNonemptyNode node) { Preconditions.checkNotNull(collectionType); switch (collectionType.getKind()) { case UNKNOWN: // If we don't know anything about the base type, then make no assumptions // about the field type. return Un...
java
private SoyType getElementType(SoyType collectionType, ForNonemptyNode node) { Preconditions.checkNotNull(collectionType); switch (collectionType.getKind()) { case UNKNOWN: // If we don't know anything about the base type, then make no assumptions // about the field type. return Un...
[ "private", "SoyType", "getElementType", "(", "SoyType", "collectionType", ",", "ForNonemptyNode", "node", ")", "{", "Preconditions", ".", "checkNotNull", "(", "collectionType", ")", ";", "switch", "(", "collectionType", ".", "getKind", "(", ")", ")", "{", "case"...
Given a collection type, compute the element type. @param collectionType The base type. @param node The ForNonemptyNode being iterated. @return The type of the elements of the collection.
[ "Given", "a", "collection", "type", "compute", "the", "element", "type", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/passes/ResolveExpressionTypesPass.java#L511-L550
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.readXMLFragment
public static DocumentFragment readXMLFragment(URL file) throws IOException, SAXException, ParserConfigurationException { return readXMLFragment(file, false); }
java
public static DocumentFragment readXMLFragment(URL file) throws IOException, SAXException, ParserConfigurationException { return readXMLFragment(file, false); }
[ "public", "static", "DocumentFragment", "readXMLFragment", "(", "URL", "file", ")", "throws", "IOException", ",", "SAXException", ",", "ParserConfigurationException", "{", "return", "readXMLFragment", "(", "file", ",", "false", ")", ";", "}" ]
Read an XML fragment from an XML file. The XML file is well-formed. It means that the fragment will contains a single element: the root element within the input file. @param file is the file to read @return the fragment from the {@code file}. @throws IOException if the stream cannot be read. @throws SAXException if th...
[ "Read", "an", "XML", "fragment", "from", "an", "XML", "file", ".", "The", "XML", "file", "is", "well", "-", "formed", ".", "It", "means", "that", "the", "fragment", "will", "contains", "a", "single", "element", ":", "the", "root", "element", "within", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2137-L2139
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslUtils.java
SslUtils.toBase64
static ByteBuf toBase64(ByteBufAllocator allocator, ByteBuf src) { ByteBuf dst = Base64.encode(src, src.readerIndex(), src.readableBytes(), true, Base64Dialect.STANDARD, allocator); src.readerIndex(src.writerIndex()); return dst; }
java
static ByteBuf toBase64(ByteBufAllocator allocator, ByteBuf src) { ByteBuf dst = Base64.encode(src, src.readerIndex(), src.readableBytes(), true, Base64Dialect.STANDARD, allocator); src.readerIndex(src.writerIndex()); return dst; }
[ "static", "ByteBuf", "toBase64", "(", "ByteBufAllocator", "allocator", ",", "ByteBuf", "src", ")", "{", "ByteBuf", "dst", "=", "Base64", ".", "encode", "(", "src", ",", "src", ".", "readerIndex", "(", ")", ",", "src", ".", "readableBytes", "(", ")", ",",...
Same as {@link Base64#encode(ByteBuf, boolean)} but allows the use of a custom {@link ByteBufAllocator}. @see Base64#encode(ByteBuf, boolean)
[ "Same", "as", "{", "@link", "Base64#encode", "(", "ByteBuf", "boolean", ")", "}", "but", "allows", "the", "use", "of", "a", "custom", "{", "@link", "ByteBufAllocator", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslUtils.java#L375-L380
google/allocation-instrumenter
src/main/java/com/google/monitoring/runtime/instrumentation/ConstructorInstrumenter.java
ConstructorInstrumenter.instrumentClass
public static void instrumentClass(Class<?> c, ConstructorCallback<?> sampler) throws UnmodifiableClassException { // IMPORTANT: Don't forget that other threads may be accessing this // class while this code is running. Specifically, the class may be // executed directly after the retransformClasses ...
java
public static void instrumentClass(Class<?> c, ConstructorCallback<?> sampler) throws UnmodifiableClassException { // IMPORTANT: Don't forget that other threads may be accessing this // class while this code is running. Specifically, the class may be // executed directly after the retransformClasses ...
[ "public", "static", "void", "instrumentClass", "(", "Class", "<", "?", ">", "c", ",", "ConstructorCallback", "<", "?", ">", "sampler", ")", "throws", "UnmodifiableClassException", "{", "// IMPORTANT: Don't forget that other threads may be accessing this", "// class while th...
Ensures that the given sampler will be invoked every time a constructor for class c is invoked. @param c The class to be tracked @param sampler the code to be invoked when an instance of c is constructed @throws UnmodifiableClassException if c cannot be modified.
[ "Ensures", "that", "the", "given", "sampler", "will", "be", "invoked", "every", "time", "a", "constructor", "for", "class", "c", "is", "invoked", "." ]
train
https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/ConstructorInstrumenter.java#L68-L89
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java
SerializationUtils.fromByteArray
public static <T> T fromByteArray(byte[] data, Class<T> clazz, ClassLoader classLoader) { if (data == null) { return null; } if (ReflectionUtils.hasInterface(clazz, ISerializationSupport.class)) { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader()...
java
public static <T> T fromByteArray(byte[] data, Class<T> clazz, ClassLoader classLoader) { if (data == null) { return null; } if (ReflectionUtils.hasInterface(clazz, ISerializationSupport.class)) { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader()...
[ "public", "static", "<", "T", ">", "T", "fromByteArray", "(", "byte", "[", "]", "data", ",", "Class", "<", "T", ">", "clazz", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "null", ";", "}", "if", ...
Deserialize a byte array back to an object, with custom class loader. <p> If the target class implements {@link ISerializationSupport}, this method calls its {@link ISerializationSupport#toBytes()} method; otherwise FST library is used to serialize the object. </p> @param data @param clazz @param classLoader @return ...
[ "Deserialize", "a", "byte", "array", "back", "to", "an", "object", "with", "custom", "class", "loader", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java#L132-L155
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.convert
@Deprecated public static void convert(ImageInputStream srcStream, String formatName, ImageOutputStream destStream) { write(read(srcStream), formatName, destStream); }
java
@Deprecated public static void convert(ImageInputStream srcStream, String formatName, ImageOutputStream destStream) { write(read(srcStream), formatName, destStream); }
[ "@", "Deprecated", "public", "static", "void", "convert", "(", "ImageInputStream", "srcStream", ",", "String", "formatName", ",", "ImageOutputStream", "destStream", ")", "{", "write", "(", "read", "(", "srcStream", ")", ",", "formatName", ",", "destStream", ")",...
图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG<br> 此方法并不关闭流 @param srcStream 源图像流 @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等 @param destStream 目标图像输出流 @since 3.0.9 @deprecated 请使用{@link #write(Image, String, ImageOutputStream)}
[ "图像类型转换:GIF", "=", "》JPG、GIF", "=", "》PNG、PNG", "=", "》JPG、PNG", "=", "》GIF", "(", "X", ")", "、BMP", "=", "》PNG<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L535-L538
ehcache/ehcache3
core/src/main/java/org/ehcache/core/spi/service/ServiceUtils.java
ServiceUtils.findSingletonAmongst
public static <T> T findSingletonAmongst(Class<T> clazz, Object ... instances) { return findSingletonAmongst(clazz, Arrays.asList(instances)); }
java
public static <T> T findSingletonAmongst(Class<T> clazz, Object ... instances) { return findSingletonAmongst(clazz, Arrays.asList(instances)); }
[ "public", "static", "<", "T", ">", "T", "findSingletonAmongst", "(", "Class", "<", "T", ">", "clazz", ",", "Object", "...", "instances", ")", "{", "return", "findSingletonAmongst", "(", "clazz", ",", "Arrays", ".", "asList", "(", "instances", ")", ")", "...
Find the only expected instance of {@code clazz} among the {@code instances}. @param clazz searched class @param instances instances looked at @param <T> type of the searched instance @return the compatible instance or null if none are found @throws IllegalArgumentException if more than one matching instance
[ "Find", "the", "only", "expected", "instance", "of", "{", "@code", "clazz", "}", "among", "the", "{", "@code", "instances", "}", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/core/src/main/java/org/ehcache/core/spi/service/ServiceUtils.java#L105-L107
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java
FileHelper.getOutputStream
@Nullable public static FileOutputStream getOutputStream (@Nonnull final File aFile) { return getOutputStream (aFile, EAppend.DEFAULT); }
java
@Nullable public static FileOutputStream getOutputStream (@Nonnull final File aFile) { return getOutputStream (aFile, EAppend.DEFAULT); }
[ "@", "Nullable", "public", "static", "FileOutputStream", "getOutputStream", "(", "@", "Nonnull", "final", "File", "aFile", ")", "{", "return", "getOutputStream", "(", "aFile", ",", "EAppend", ".", "DEFAULT", ")", ";", "}" ]
Get an output stream for writing to a file. @param aFile The file to write to. May not be <code>null</code>. @return <code>null</code> if the file could not be opened
[ "Get", "an", "output", "stream", "for", "writing", "to", "a", "file", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java#L348-L352
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesApi.java
DevicesApi.updateDevice
public DeviceEnvelope updateDevice(String deviceId, Device device) throws ApiException { ApiResponse<DeviceEnvelope> resp = updateDeviceWithHttpInfo(deviceId, device); return resp.getData(); }
java
public DeviceEnvelope updateDevice(String deviceId, Device device) throws ApiException { ApiResponse<DeviceEnvelope> resp = updateDeviceWithHttpInfo(deviceId, device); return resp.getData(); }
[ "public", "DeviceEnvelope", "updateDevice", "(", "String", "deviceId", ",", "Device", "device", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceEnvelope", ">", "resp", "=", "updateDeviceWithHttpInfo", "(", "deviceId", ",", "device", ")", ";", "retur...
Update Device Updates a device @param deviceId deviceId (required) @param device Device to be updated (required) @return DeviceEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Update", "Device", "Updates", "a", "device" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesApi.java#L846-L849
mangstadt/biweekly
src/main/java/biweekly/io/ParseContext.java
ParseContext.addTimezonedDate
public void addTimezonedDate(String tzid, ICalProperty property, ICalDate date) { timezonedDates.put(tzid, new TimezonedDate(date, property)); }
java
public void addTimezonedDate(String tzid, ICalProperty property, ICalDate date) { timezonedDates.put(tzid, new TimezonedDate(date, property)); }
[ "public", "void", "addTimezonedDate", "(", "String", "tzid", ",", "ICalProperty", "property", ",", "ICalDate", "date", ")", "{", "timezonedDates", ".", "put", "(", "tzid", ",", "new", "TimezonedDate", "(", "date", ",", "property", ")", ")", ";", "}" ]
Keeps track of a date-time property value that uses a timezone so it can be parsed later. Timezones cannot be handled until the entire iCalendar object has been parsed. @param tzid the timezone ID (TZID parameter) @param property the property @param date the date object that was assigned to the property object
[ "Keeps", "track", "of", "a", "date", "-", "time", "property", "value", "that", "uses", "a", "timezone", "so", "it", "can", "be", "parsed", "later", ".", "Timezones", "cannot", "be", "handled", "until", "the", "entire", "iCalendar", "object", "has", "been",...
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/ParseContext.java#L133-L135
RestComm/jain-slee.http
resources/http-client-nio/ra/src/main/java/org/restcomm/slee/ra/httpclient/nio/ra/HttpClientNIOResourceAdaptor.java
HttpClientNIOResourceAdaptor.processResponseEvent
public void processResponseEvent(HttpClientNIOResponseEvent event, HttpClientNIORequestActivityImpl activity) { HttpClientNIORequestActivityHandle ah = new HttpClientNIORequestActivityHandle(activity.getId()); if (tracer.isFineEnabled()) tracer.fine("==== FIRING ResponseEvent EVENT TO...
java
public void processResponseEvent(HttpClientNIOResponseEvent event, HttpClientNIORequestActivityImpl activity) { HttpClientNIORequestActivityHandle ah = new HttpClientNIORequestActivityHandle(activity.getId()); if (tracer.isFineEnabled()) tracer.fine("==== FIRING ResponseEvent EVENT TO...
[ "public", "void", "processResponseEvent", "(", "HttpClientNIOResponseEvent", "event", ",", "HttpClientNIORequestActivityImpl", "activity", ")", "{", "HttpClientNIORequestActivityHandle", "ah", "=", "new", "HttpClientNIORequestActivityHandle", "(", "activity", ".", "getId", "(...
Receives an Event from the HTTP client and sends it to the SLEE. @param event @param activity
[ "Receives", "an", "Event", "from", "the", "HTTP", "client", "and", "sends", "it", "to", "the", "SLEE", "." ]
train
https://github.com/RestComm/jain-slee.http/blob/938e502a60355b988d6998d2539bbb16207674e8/resources/http-client-nio/ra/src/main/java/org/restcomm/slee/ra/httpclient/nio/ra/HttpClientNIOResourceAdaptor.java#L489-L501
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByAddress1
public Iterable<DUser> queryByAddress1(java.lang.String address1) { return queryByField(null, DUserMapper.Field.ADDRESS1.getFieldName(), address1); }
java
public Iterable<DUser> queryByAddress1(java.lang.String address1) { return queryByField(null, DUserMapper.Field.ADDRESS1.getFieldName(), address1); }
[ "public", "Iterable", "<", "DUser", ">", "queryByAddress1", "(", "java", ".", "lang", ".", "String", "address1", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "ADDRESS1", ".", "getFieldName", "(", ")", ",", "addres...
query-by method for field address1 @param address1 the specified attribute @return an Iterable of DUsers for the specified address1
[ "query", "-", "by", "method", "for", "field", "address1" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L70-L72
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/data/LibDaiFgIo.java
LibDaiFgIo.libDaiIxToConfigId
public static int libDaiIxToConfigId(int libDaiIx, int[] dims, Var[] varArray, VarSet vs) { int[] config = Tensor.unravelIndexMatlab(libDaiIx, dims); VarConfig vc = new VarConfig(varArray, config); return vc.getConfigIndexOfSubset(vs); }
java
public static int libDaiIxToConfigId(int libDaiIx, int[] dims, Var[] varArray, VarSet vs) { int[] config = Tensor.unravelIndexMatlab(libDaiIx, dims); VarConfig vc = new VarConfig(varArray, config); return vc.getConfigIndexOfSubset(vs); }
[ "public", "static", "int", "libDaiIxToConfigId", "(", "int", "libDaiIx", ",", "int", "[", "]", "dims", ",", "Var", "[", "]", "varArray", ",", "VarSet", "vs", ")", "{", "int", "[", "]", "config", "=", "Tensor", ".", "unravelIndexMatlab", "(", "libDaiIx", ...
converts the index to the index used in pacaya the difference is that the vars in vs may be reordered compared to varArray and that pacaya representation has the leftmost v in vs be the slowest changing while libdai has the rightmost in varArray be the slowest changing; dims and varArray are assumed to both correspond ...
[ "converts", "the", "index", "to", "the", "index", "used", "in", "pacaya", "the", "difference", "is", "that", "the", "vars", "in", "vs", "may", "be", "reordered", "compared", "to", "varArray", "and", "that", "pacaya", "representation", "has", "the", "leftmost...
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/data/LibDaiFgIo.java#L148-L152
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/ClustersInner.java
ClustersInner.listSkusByResource
public List<AzureResourceSkuInner> listSkusByResource(String resourceGroupName, String clusterName) { return listSkusByResourceWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); }
java
public List<AzureResourceSkuInner> listSkusByResource(String resourceGroupName, String clusterName) { return listSkusByResourceWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); }
[ "public", "List", "<", "AzureResourceSkuInner", ">", "listSkusByResource", "(", "String", "resourceGroupName", ",", "String", "clusterName", ")", "{", "return", "listSkusByResourceWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ")", ".", "toBlocki...
Returns the SKUs available for the provided resource. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejecte...
[ "Returns", "the", "SKUs", "available", "for", "the", "provided", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/ClustersInner.java#L1377-L1379
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.replaceAll
public static String replaceAll(CharSequence content, String regex, String replacementTemplate) { final Pattern pattern = Pattern.compile(regex, Pattern.DOTALL); return replaceAll(content, pattern, replacementTemplate); }
java
public static String replaceAll(CharSequence content, String regex, String replacementTemplate) { final Pattern pattern = Pattern.compile(regex, Pattern.DOTALL); return replaceAll(content, pattern, replacementTemplate); }
[ "public", "static", "String", "replaceAll", "(", "CharSequence", "content", ",", "String", "regex", ",", "String", "replacementTemplate", ")", "{", "final", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "regex", ",", "Pattern", ".", "DOTALL", ")",...
正则替换指定值<br> 通过正则查找到字符串,然后把匹配到的字符串加入到replacementTemplate中,$1表示分组1的字符串 @param content 文本 @param regex 正则 @param replacementTemplate 替换的文本模板,可以使用$1类似的变量提取正则匹配出的内容 @return 处理后的文本
[ "正则替换指定值<br", ">", "通过正则查找到字符串,然后把匹配到的字符串加入到replacementTemplate中,$1表示分组1的字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L600-L603
Netflix/astyanax
astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/Mapping.java
Mapping.initInstance
public T initInstance(T instance, ColumnList<String> columns) { for (com.netflix.astyanax.model.Column<String> column : columns) { Field field = fields.get(column.getName()); if (field != null) { // otherwise it may be a column that was // removed, etc. ...
java
public T initInstance(T instance, ColumnList<String> columns) { for (com.netflix.astyanax.model.Column<String> column : columns) { Field field = fields.get(column.getName()); if (field != null) { // otherwise it may be a column that was // removed, etc. ...
[ "public", "T", "initInstance", "(", "T", "instance", ",", "ColumnList", "<", "String", ">", "columns", ")", "{", "for", "(", "com", ".", "netflix", ".", "astyanax", ".", "model", ".", "Column", "<", "String", ">", "column", ":", "columns", ")", "{", ...
Populate the given instance with the values from the given column list @param instance instance @param columns column this @return instance (as a convenience for chaining)
[ "Populate", "the", "given", "instance", "with", "the", "values", "from", "the", "given", "column", "list" ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/Mapping.java#L273-L282
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.addToClasspath
public static void addToClasspath(final File file, final ClassLoader classLoader) { checkNotNull("file", file); try { addToClasspath(file.toURI().toURL(), classLoader); } catch (final MalformedURLException e) { throw new RuntimeException(e); } }
java
public static void addToClasspath(final File file, final ClassLoader classLoader) { checkNotNull("file", file); try { addToClasspath(file.toURI().toURL(), classLoader); } catch (final MalformedURLException e) { throw new RuntimeException(e); } }
[ "public", "static", "void", "addToClasspath", "(", "final", "File", "file", ",", "final", "ClassLoader", "classLoader", ")", "{", "checkNotNull", "(", "\"file\"", ",", "file", ")", ";", "try", "{", "addToClasspath", "(", "file", ".", "toURI", "(", ")", "."...
Adds a file to the classpath. @param file File to add - Cannot be <code>null</code>. @param classLoader Class loader to use - Cannot be <code>null</code>.
[ "Adds", "a", "file", "to", "the", "classpath", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L227-L234
mikepenz/Android-Iconics
library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java
IconicsDrawable.roundedCornersDp
@NonNull public IconicsDrawable roundedCornersDp(@Dimension(unit = DP) int sizeDp) { return roundedCornersPx(Utils.convertDpToPx(mContext, sizeDp)); }
java
@NonNull public IconicsDrawable roundedCornersDp(@Dimension(unit = DP) int sizeDp) { return roundedCornersPx(Utils.convertDpToPx(mContext, sizeDp)); }
[ "@", "NonNull", "public", "IconicsDrawable", "roundedCornersDp", "(", "@", "Dimension", "(", "unit", "=", "DP", ")", "int", "sizeDp", ")", "{", "return", "roundedCornersPx", "(", "Utils", ".", "convertDpToPx", "(", "mContext", ",", "sizeDp", ")", ")", ";", ...
Set rounded corner from dp @return The current IconicsDrawable for chaining.
[ "Set", "rounded", "corner", "from", "dp" ]
train
https://github.com/mikepenz/Android-Iconics/blob/0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8/library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java#L978-L981
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cp/internal/raft/impl/log/RaftLog.java
RaftLog.truncateEntriesFrom
public List<LogEntry> truncateEntriesFrom(long entryIndex) { if (entryIndex <= snapshotIndex()) { throw new IllegalArgumentException("Illegal index: " + entryIndex + ", snapshot index: " + snapshotIndex()); } if (entryIndex > lastLogOrSnapshotIndex()) { throw new IllegalA...
java
public List<LogEntry> truncateEntriesFrom(long entryIndex) { if (entryIndex <= snapshotIndex()) { throw new IllegalArgumentException("Illegal index: " + entryIndex + ", snapshot index: " + snapshotIndex()); } if (entryIndex > lastLogOrSnapshotIndex()) { throw new IllegalA...
[ "public", "List", "<", "LogEntry", ">", "truncateEntriesFrom", "(", "long", "entryIndex", ")", "{", "if", "(", "entryIndex", "<=", "snapshotIndex", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Illegal index: \"", "+", "entryIndex", "+"...
Truncates log entries with indexes {@code >= entryIndex}. @return truncated log entries @throws IllegalArgumentException If no entries are available to truncate, if {@code entryIndex} is greater than last log index or smaller than snapshot index.
[ "Truncates", "log", "entries", "with", "indexes", "{", "@code", ">", "=", "entryIndex", "}", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/raft/impl/log/RaftLog.java#L129-L147
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.onCheckListAttribute
private <E> boolean onCheckListAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<E> paramClass) { if (pluralAttribute != null) { if (isListAttribute(pluralAttribute) && isBindable(pluralAttribute, paramClass)) { return true; } ...
java
private <E> boolean onCheckListAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<E> paramClass) { if (pluralAttribute != null) { if (isListAttribute(pluralAttribute) && isBindable(pluralAttribute, paramClass)) { return true; } ...
[ "private", "<", "E", ">", "boolean", "onCheckListAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "pluralAttribute", ",", "Class", "<", "E", ">", "paramClass", ")", "{", "if", "(", "pluralAttribute", "!=", "null", ")",...
On check list attribute. @param <E> the element type @param pluralAttribute the plural attribute @param paramClass the param class @return true, if successful
[ "On", "check", "list", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L981-L993
OpenLiberty/open-liberty
dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/CDIContainerImpl.java
CDIContainerImpl.createWebSphereCDIDeployment
private WebSphereCDIDeployment createWebSphereCDIDeployment(Application application, Set<ExtensionArchive> extensionArchives) throws CDIException { WebSphereCDIDeployment webSphereCDIDeployment = new WebSphereCDIDeploymentImpl(application, cdiRunti...
java
private WebSphereCDIDeployment createWebSphereCDIDeployment(Application application, Set<ExtensionArchive> extensionArchives) throws CDIException { WebSphereCDIDeployment webSphereCDIDeployment = new WebSphereCDIDeploymentImpl(application, cdiRunti...
[ "private", "WebSphereCDIDeployment", "createWebSphereCDIDeployment", "(", "Application", "application", ",", "Set", "<", "ExtensionArchive", ">", "extensionArchives", ")", "throws", "CDIException", "{", "WebSphereCDIDeployment", "webSphereCDIDeployment", "=", "new", "WebSpher...
This method creates the Deployment structure with all it's BDAs. @param application @param extensionArchives @return @throws CDIException
[ "This", "method", "creates", "the", "Deployment", "structure", "with", "all", "it", "s", "BDAs", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/CDIContainerImpl.java#L200-L231
google/gson
gson/src/main/java/com/google/gson/Gson.java
Gson.toJsonTree
public JsonElement toJsonTree(Object src) { if (src == null) { return JsonNull.INSTANCE; } return toJsonTree(src, src.getClass()); }
java
public JsonElement toJsonTree(Object src) { if (src == null) { return JsonNull.INSTANCE; } return toJsonTree(src, src.getClass()); }
[ "public", "JsonElement", "toJsonTree", "(", "Object", "src", ")", "{", "if", "(", "src", "==", "null", ")", "{", "return", "JsonNull", ".", "INSTANCE", ";", "}", "return", "toJsonTree", "(", "src", ",", "src", ".", "getClass", "(", ")", ")", ";", "}"...
This method serializes the specified object into its equivalent representation as a tree of {@link JsonElement}s. This method should be used when the specified object is not a generic type. This method uses {@link Class#getClass()} to get the type for the specified object, but the {@code getClass()} loses the generic t...
[ "This", "method", "serializes", "the", "specified", "object", "into", "its", "equivalent", "representation", "as", "a", "tree", "of", "{", "@link", "JsonElement", "}", "s", ".", "This", "method", "should", "be", "used", "when", "the", "specified", "object", ...
train
https://github.com/google/gson/blob/63ee47cb642c8018e5cddd639aa2be143220ad4b/gson/src/main/java/com/google/gson/Gson.java#L572-L577
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/MidaoFactory.java
MidaoFactory.getQueryRunner
public static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds, typeHandlerClazz)); }
java
public static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds, typeHandlerClazz)); }
[ "public", "static", "QueryRunnerService", "getQueryRunner", "(", "DataSource", "ds", ",", "Class", "<", "?", "extends", "TypeHandler", ">", "typeHandlerClazz", ")", "{", "return", "(", "QueryRunnerService", ")", "ProfilerFactory", ".", "newInstance", "(", "new", "...
Returns new {@link org.midao.jdbc.core.service.QueryRunnerService} instance @param ds SQL DataSource @param typeHandlerClazz {@link org.midao.jdbc.core.handlers.type.TypeHandler} implementation @return new {@link org.midao.jdbc.core.service.QueryRunnerService} instance
[ "Returns", "new", "{", "@link", "org", ".", "midao", ".", "jdbc", ".", "core", ".", "service", ".", "QueryRunnerService", "}", "instance" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/MidaoFactory.java#L60-L62
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/CNativePlugin.java
CNativePlugin.execute
public final ReturnValue execute(final ICommandLine cl) { File fProcessFile = new File(cl.getOptionValue("executable")); StreamManager streamMgr = new StreamManager(); if (!fProcessFile.exists()) { return new ReturnValue(Status.UNKNOWN, "Could not exec executable : " + fProcessFile....
java
public final ReturnValue execute(final ICommandLine cl) { File fProcessFile = new File(cl.getOptionValue("executable")); StreamManager streamMgr = new StreamManager(); if (!fProcessFile.exists()) { return new ReturnValue(Status.UNKNOWN, "Could not exec executable : " + fProcessFile....
[ "public", "final", "ReturnValue", "execute", "(", "final", "ICommandLine", "cl", ")", "{", "File", "fProcessFile", "=", "new", "File", "(", "cl", ".", "getOptionValue", "(", "\"executable\"", ")", ")", ";", "StreamManager", "streamMgr", "=", "new", "StreamMana...
The first parameter must be the full path to the executable. The rest of the array is sent to the executable as commands parameters @param cl The parsed command line @return The return value of the plugin
[ "The", "first", "parameter", "must", "be", "the", "full", "path", "to", "the", "executable", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/CNativePlugin.java#L45-L80
datumbox/datumbox-framework
datumbox-framework-applications/src/main/java/com/datumbox/framework/applications/nlp/TextClassifier.java
TextClassifier.fit
public void fit(Map<Object, URI> datasets) { TrainingParameters tp = (TrainingParameters) knowledgeBase.getTrainingParameters(); Dataframe trainingData = Dataframe.Builder.parseTextFiles(datasets, AbstractTextExtractor.newInstance(tp.getTextExtractorParameters()), knowled...
java
public void fit(Map<Object, URI> datasets) { TrainingParameters tp = (TrainingParameters) knowledgeBase.getTrainingParameters(); Dataframe trainingData = Dataframe.Builder.parseTextFiles(datasets, AbstractTextExtractor.newInstance(tp.getTextExtractorParameters()), knowled...
[ "public", "void", "fit", "(", "Map", "<", "Object", ",", "URI", ">", "datasets", ")", "{", "TrainingParameters", "tp", "=", "(", "TrainingParameters", ")", "knowledgeBase", ".", "getTrainingParameters", "(", ")", ";", "Dataframe", "trainingData", "=", "Datafra...
Trains a Machine Learning modeler using the provided dataset files. The data map should have as index the names of each class and as values the URIs of the training files. The training files should contain one training example per row. @param datasets
[ "Trains", "a", "Machine", "Learning", "modeler", "using", "the", "provided", "dataset", "files", ".", "The", "data", "map", "should", "have", "as", "index", "the", "names", "of", "each", "class", "and", "as", "values", "the", "URIs", "of", "the", "training...
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-applications/src/main/java/com/datumbox/framework/applications/nlp/TextClassifier.java#L129-L139
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/DBQuery.java
DBQuery.greaterThan
public static Query greaterThan(String field, Object value) { return new Query().greaterThan(field, value); }
java
public static Query greaterThan(String field, Object value) { return new Query().greaterThan(field, value); }
[ "public", "static", "Query", "greaterThan", "(", "String", "field", ",", "Object", "value", ")", "{", "return", "new", "Query", "(", ")", ".", "greaterThan", "(", "field", ",", "value", ")", ";", "}" ]
The field is greater than the given value @param field The field to compare @param value The value to compare to @return the query
[ "The", "field", "is", "greater", "than", "the", "given", "value" ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/DBQuery.java#L84-L86
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/DefaultPageShell.java
DefaultPageShell.addJsHeadlines
private void addJsHeadlines(final PrintWriter writer, final List jsHeadlines) { if (jsHeadlines == null || jsHeadlines.isEmpty()) { return; } writer.println(); writer.write("\n<!-- Start javascript headlines -->" + "\n<script type=\"" + WebUtilities.CONTENT_TYPE_JS + "\">"); for (Object line : jsHead...
java
private void addJsHeadlines(final PrintWriter writer, final List jsHeadlines) { if (jsHeadlines == null || jsHeadlines.isEmpty()) { return; } writer.println(); writer.write("\n<!-- Start javascript headlines -->" + "\n<script type=\"" + WebUtilities.CONTENT_TYPE_JS + "\">"); for (Object line : jsHead...
[ "private", "void", "addJsHeadlines", "(", "final", "PrintWriter", "writer", ",", "final", "List", "jsHeadlines", ")", "{", "if", "(", "jsHeadlines", "==", "null", "||", "jsHeadlines", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "writer", ".", ...
Add a list of javascript headline entries intended to be added only once to the page. @param writer the writer to write to. @param jsHeadlines a list of javascript entries to be added to the page as a whole.
[ "Add", "a", "list", "of", "javascript", "headline", "entries", "intended", "to", "be", "added", "only", "once", "to", "the", "page", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/DefaultPageShell.java#L162-L177
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java
AwsAsgUtil.getCacheKeys
private Set<CacheKey> getCacheKeys() { Set<CacheKey> cacheKeys = new HashSet<CacheKey>(); Applications apps = registry.getApplicationsFromLocalRegionOnly(); for (Application app : apps.getRegisteredApplications()) { for (InstanceInfo instanceInfo : app.getInstances()) { ...
java
private Set<CacheKey> getCacheKeys() { Set<CacheKey> cacheKeys = new HashSet<CacheKey>(); Applications apps = registry.getApplicationsFromLocalRegionOnly(); for (Application app : apps.getRegisteredApplications()) { for (InstanceInfo instanceInfo : app.getInstances()) { ...
[ "private", "Set", "<", "CacheKey", ">", "getCacheKeys", "(", ")", "{", "Set", "<", "CacheKey", ">", "cacheKeys", "=", "new", "HashSet", "<", "CacheKey", ">", "(", ")", ";", "Applications", "apps", "=", "registry", ".", "getApplicationsFromLocalRegionOnly", "...
Get the cacheKeys of all the ASG to which query AWS for. <p> The names are obtained from the {@link com.netflix.eureka.registry.InstanceRegistry} which is then used for querying the AWS. </p> @return the set of ASG cacheKeys (asgName + accountId).
[ "Get", "the", "cacheKeys", "of", "all", "the", "ASG", "to", "which", "query", "AWS", "for", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java#L424-L439
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/classpath/ClassPathGeneratorHelper.java
ClassPathGeneratorHelper.isDirectChildPath
private boolean isDirectChildPath(String rootEntryPath, String entryPath) { boolean result = false; if (entryPath.length() > rootEntryPath.length() && entryPath.startsWith(rootEntryPath)) { int idx = entryPath.indexOf(URL_SEPARATOR, rootEntryPath.length()); if (idx == -1) { // case where the entry is a child ...
java
private boolean isDirectChildPath(String rootEntryPath, String entryPath) { boolean result = false; if (entryPath.length() > rootEntryPath.length() && entryPath.startsWith(rootEntryPath)) { int idx = entryPath.indexOf(URL_SEPARATOR, rootEntryPath.length()); if (idx == -1) { // case where the entry is a child ...
[ "private", "boolean", "isDirectChildPath", "(", "String", "rootEntryPath", ",", "String", "entryPath", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "entryPath", ".", "length", "(", ")", ">", "rootEntryPath", ".", "length", "(", ")", "&&", "...
Checks if the entry is a direct child of the root Entry isDirectChildPath( '/a/b/c/' , '/a/b/c/d.txt') => true isDirectChildPath( '/a/b/c/' , '/a/b/c/d/') => true isDirectChildPath( '/a/b/c/' , '/a/b/c/d/e.txt') => false @param rootEntryPath the root entry path @param entryPath the entry path to check @return true if ...
[ "Checks", "if", "the", "entry", "is", "a", "direct", "child", "of", "the", "root", "Entry", "isDirectChildPath", "(", "/", "a", "/", "b", "/", "c", "/", "/", "a", "/", "b", "/", "c", "/", "d", ".", "txt", ")", "=", ">", "true", "isDirectChildPath...
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/classpath/ClassPathGeneratorHelper.java#L271-L287
dkpro/dkpro-argumentation
dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java
ArgumentUnitUtils.setIsImplicit
public static void setIsImplicit(ArgumentUnit argumentUnit, boolean implicit) throws IllegalArgumentException { int length = argumentUnit.getEnd() - argumentUnit.getBegin(); if (length > 0) { throw new IllegalArgumentException("Cannot set 'implicit' property to component " +...
java
public static void setIsImplicit(ArgumentUnit argumentUnit, boolean implicit) throws IllegalArgumentException { int length = argumentUnit.getEnd() - argumentUnit.getBegin(); if (length > 0) { throw new IllegalArgumentException("Cannot set 'implicit' property to component " +...
[ "public", "static", "void", "setIsImplicit", "(", "ArgumentUnit", "argumentUnit", ",", "boolean", "implicit", ")", "throws", "IllegalArgumentException", "{", "int", "length", "=", "argumentUnit", ".", "getEnd", "(", ")", "-", "argumentUnit", ".", "getBegin", "(", ...
Sets the implicit value to the argument @param argumentUnit argument unit @param implicit boolean value @throws java.lang.IllegalArgumentException if the length of argument is non-zero
[ "Sets", "the", "implicit", "value", "to", "the", "argument" ]
train
https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-types/src/main/java/org/dkpro/argumentation/types/ArgumentUnitUtils.java#L216-L228
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.beginCreateAsync
public Observable<StorageAccountInner> beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { ...
java
public Observable<StorageAccountInner> beginCreateAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { ...
[ "public", "Observable", "<", "StorageAccountInner", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "StorageAccountCreateParameters", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupNa...
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact sa...
[ "Asynchronously", "creates", "a", "new", "storage", "account", "with", "the", "specified", "parameters", ".", "If", "an", "account", "is", "already", "created", "and", "a", "subsequent", "create", "request", "is", "issued", "with", "different", "properties", "th...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L331-L338
alkacon/opencms-core
src/org/opencms/ui/dialogs/CmsCopyMoveDialog.java
CmsCopyMoveDialog.getTargetName
private String getTargetName(CmsResource source, CmsResource target) throws CmsException { String name; String folderRootPath = target.getRootPath(); if (!folderRootPath.endsWith("/")) { folderRootPath += "/"; } if (folderRootPath.equals(CmsResource.getParentFolder(s...
java
private String getTargetName(CmsResource source, CmsResource target) throws CmsException { String name; String folderRootPath = target.getRootPath(); if (!folderRootPath.endsWith("/")) { folderRootPath += "/"; } if (folderRootPath.equals(CmsResource.getParentFolder(s...
[ "private", "String", "getTargetName", "(", "CmsResource", "source", ",", "CmsResource", "target", ")", "throws", "CmsException", "{", "String", "name", ";", "String", "folderRootPath", "=", "target", ".", "getRootPath", "(", ")", ";", "if", "(", "!", "folderRo...
Gets a name for the target resource.<p> @param source Source @param target Target @return Name @throws CmsException exception
[ "Gets", "a", "name", "for", "the", "target", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/CmsCopyMoveDialog.java#L655-L671
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validation/WValidationErrors.java
WValidationErrors.setTitleText
public void setTitleText(final String title, final Serializable... args) { ValidationErrorsModel model = getOrCreateComponentModel(); model.title = I18nUtilities.asMessage(title, args); }
java
public void setTitleText(final String title, final Serializable... args) { ValidationErrorsModel model = getOrCreateComponentModel(); model.title = I18nUtilities.asMessage(title, args); }
[ "public", "void", "setTitleText", "(", "final", "String", "title", ",", "final", "Serializable", "...", "args", ")", "{", "ValidationErrorsModel", "model", "=", "getOrCreateComponentModel", "(", ")", ";", "model", ".", "title", "=", "I18nUtilities", ".", "asMess...
Sets the message box title. @param title the message box title to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "message", "box", "title", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/validation/WValidationErrors.java#L148-L151
Jasig/uPortal
uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/TransientUserLayoutManagerWrapper.java
TransientUserLayoutManagerWrapper.getTransientNode
private IUserLayoutChannelDescription getTransientNode(String nodeId) throws PortalException { // get fname from subscribe id final String fname = getFname(nodeId); if (null == fname || fname.equals("")) { return null; } try { // check cache first ...
java
private IUserLayoutChannelDescription getTransientNode(String nodeId) throws PortalException { // get fname from subscribe id final String fname = getFname(nodeId); if (null == fname || fname.equals("")) { return null; } try { // check cache first ...
[ "private", "IUserLayoutChannelDescription", "getTransientNode", "(", "String", "nodeId", ")", "throws", "PortalException", "{", "// get fname from subscribe id", "final", "String", "fname", "=", "getFname", "(", "nodeId", ")", ";", "if", "(", "null", "==", "fname", ...
Return an IUserLayoutChannelDescription by way of nodeId @param nodeId the node (subscribe) id to get the channel for. @return a <code>IUserLayoutNodeDescription</code>
[ "Return", "an", "IUserLayoutChannelDescription", "by", "way", "of", "nodeId" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/TransientUserLayoutManagerWrapper.java#L427-L450
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/util/intern/duplex/DuplexExpression.java
DuplexExpression.ensureExistence
@SuppressWarnings("unchecked") public org.w3c.dom.Node ensureExistence(final org.w3c.dom.Node contextNode) { final Document document = DOMHelper.getOwnerDocumentFor(contextNode); final Map<String, String> namespaceMapping = new HashMap<String, String>(userDefinedMapping); namespaceMapping.pu...
java
@SuppressWarnings("unchecked") public org.w3c.dom.Node ensureExistence(final org.w3c.dom.Node contextNode) { final Document document = DOMHelper.getOwnerDocumentFor(contextNode); final Map<String, String> namespaceMapping = new HashMap<String, String>(userDefinedMapping); namespaceMapping.pu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "org", ".", "w3c", ".", "dom", ".", "Node", "ensureExistence", "(", "final", "org", ".", "w3c", ".", "dom", ".", "Node", "contextNode", ")", "{", "final", "Document", "document", "=", "DOMHelper...
Creates nodes until selecting such a path would return something. @param contextNode @return the node that this expression would select.
[ "Creates", "nodes", "until", "selecting", "such", "a", "path", "would", "return", "something", "." ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/util/intern/duplex/DuplexExpression.java#L184-L191
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java
ActorSDK.startChatActivity
public void startChatActivity(Context context, Peer peer, boolean compose) { Bundle b = new Bundle(); b.putLong(Intents.EXTRA_CHAT_PEER, peer.getUnuqueId()); b.putBoolean(Intents.EXTRA_CHAT_COMPOSE, compose); if (!startDelegateActivity(context, delegate.getChatIntent(peer, compose), b, n...
java
public void startChatActivity(Context context, Peer peer, boolean compose) { Bundle b = new Bundle(); b.putLong(Intents.EXTRA_CHAT_PEER, peer.getUnuqueId()); b.putBoolean(Intents.EXTRA_CHAT_COMPOSE, compose); if (!startDelegateActivity(context, delegate.getChatIntent(peer, compose), b, n...
[ "public", "void", "startChatActivity", "(", "Context", "context", ",", "Peer", "peer", ",", "boolean", "compose", ")", "{", "Bundle", "b", "=", "new", "Bundle", "(", ")", ";", "b", ".", "putLong", "(", "Intents", ".", "EXTRA_CHAT_PEER", ",", "peer", ".",...
Method is used internally for starting default activity or activity added in delegate @param context current context
[ "Method", "is", "used", "internally", "for", "starting", "default", "activity", "or", "activity", "added", "in", "delegate" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java#L989-L996
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java
CPDefinitionPersistenceImpl.removeByLtD_S
@Override public void removeByLtD_S(Date displayDate, int status) { for (CPDefinition cpDefinition : findByLtD_S(displayDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinition); } }
java
@Override public void removeByLtD_S(Date displayDate, int status) { for (CPDefinition cpDefinition : findByLtD_S(displayDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinition); } }
[ "@", "Override", "public", "void", "removeByLtD_S", "(", "Date", "displayDate", ",", "int", "status", ")", "{", "for", "(", "CPDefinition", "cpDefinition", ":", "findByLtD_S", "(", "displayDate", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil...
Removes all the cp definitions where displayDate &lt; &#63; and status = &#63; from the database. @param displayDate the display date @param status the status
[ "Removes", "all", "the", "cp", "definitions", "where", "displayDate", "&lt", ";", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java#L5099-L5105
andkulikov/Transitions-Everywhere
library(1.x)/src/main/java/com/transitionseverywhere/Scene.java
Scene.getSceneForLayout
@NonNull public static Scene getSceneForLayout(@NonNull ViewGroup sceneRoot, int layoutId, @NonNull Context context) { SparseArray<Scene> scenes = (SparseArray<Scene>) sceneRoot.getTag(R.id.scene_layoutid_cache); if (scenes == null) { scenes = new SparseArray<Scene>(); sceneR...
java
@NonNull public static Scene getSceneForLayout(@NonNull ViewGroup sceneRoot, int layoutId, @NonNull Context context) { SparseArray<Scene> scenes = (SparseArray<Scene>) sceneRoot.getTag(R.id.scene_layoutid_cache); if (scenes == null) { scenes = new SparseArray<Scene>(); sceneR...
[ "@", "NonNull", "public", "static", "Scene", "getSceneForLayout", "(", "@", "NonNull", "ViewGroup", "sceneRoot", ",", "int", "layoutId", ",", "@", "NonNull", "Context", "context", ")", "{", "SparseArray", "<", "Scene", ">", "scenes", "=", "(", "SparseArray", ...
Returns a Scene described by the resource file associated with the given <code>layoutId</code> parameter. If such a Scene has already been created, that same Scene will be returned. This caching of layoutId-based scenes enables sharing of common scenes between those created in code and those referenced by {@link Transi...
[ "Returns", "a", "Scene", "described", "by", "the", "resource", "file", "associated", "with", "the", "given", "<code", ">", "layoutId<", "/", "code", ">", "parameter", ".", "If", "such", "a", "Scene", "has", "already", "been", "created", "that", "same", "Sc...
train
https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/Scene.java#L61-L76
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java
FDBigInteger.valueOfPow52
public static FDBigInteger valueOfPow52(int p5, int p2) { if (p5 != 0) { if (p2 == 0) { return big5pow(p5); } else if (p5 < SMALL_5_POW.length) { int pow5 = SMALL_5_POW[p5]; int wordcount = p2 >> 5; int bitcount = p2 & 0x1f;...
java
public static FDBigInteger valueOfPow52(int p5, int p2) { if (p5 != 0) { if (p2 == 0) { return big5pow(p5); } else if (p5 < SMALL_5_POW.length) { int pow5 = SMALL_5_POW[p5]; int wordcount = p2 >> 5; int bitcount = p2 & 0x1f;...
[ "public", "static", "FDBigInteger", "valueOfPow52", "(", "int", "p5", ",", "int", "p2", ")", "{", "if", "(", "p5", "!=", "0", ")", "{", "if", "(", "p2", "==", "0", ")", "{", "return", "big5pow", "(", "p5", ")", ";", "}", "else", "if", "(", "p5"...
/*@ @ requires p5 >= 0 && p2 >= 0; @ assignable \nothing; @ ensures \result.value() == \old(pow52(p5, p2)); @
[ "/", "*" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java#L250-L272
ysc/word
src/main/java/org/apdplat/word/WordFrequencyStatistics.java
WordFrequencyStatistics.statistics
private void statistics(Word word, int times, Map<String, AtomicInteger> container){ statistics(word.getText(), times, container); }
java
private void statistics(Word word, int times, Map<String, AtomicInteger> container){ statistics(word.getText(), times, container); }
[ "private", "void", "statistics", "(", "Word", "word", ",", "int", "times", ",", "Map", "<", "String", ",", "AtomicInteger", ">", "container", ")", "{", "statistics", "(", "word", ".", "getText", "(", ")", ",", "times", ",", "container", ")", ";", "}" ]
统计词频 @param word 词 @param times 词频 @param container 内存中保存词频的数据结构
[ "统计词频" ]
train
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/WordFrequencyStatistics.java#L175-L177
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java
JPAUtils.findRoot
public static <T> Root<T> findRoot(CriteriaQuery<T> query) { return findRoot(query, query.getResultType()); }
java
public static <T> Root<T> findRoot(CriteriaQuery<T> query) { return findRoot(query, query.getResultType()); }
[ "public", "static", "<", "T", ">", "Root", "<", "T", ">", "findRoot", "(", "CriteriaQuery", "<", "T", ">", "query", ")", "{", "return", "findRoot", "(", "query", ",", "query", ".", "getResultType", "(", ")", ")", ";", "}" ]
Find Root of result type @param query criteria query @return the root of result type or null if none
[ "Find", "Root", "of", "result", "type" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java#L107-L109
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/persister/MapTilePersisterModel.java
MapTilePersisterModel.saveTiles
private void saveTiles(FileWriting file, int widthInTile, int step, int s) throws IOException { for (int tx = 0; tx < widthInTile; tx++) { for (int ty = 0; ty < map.getInTileHeight(); ty++) { final Tile tile = map.getTile(tx + s * step, ty); ...
java
private void saveTiles(FileWriting file, int widthInTile, int step, int s) throws IOException { for (int tx = 0; tx < widthInTile; tx++) { for (int ty = 0; ty < map.getInTileHeight(); ty++) { final Tile tile = map.getTile(tx + s * step, ty); ...
[ "private", "void", "saveTiles", "(", "FileWriting", "file", ",", "int", "widthInTile", ",", "int", "step", ",", "int", "s", ")", "throws", "IOException", "{", "for", "(", "int", "tx", "=", "0", ";", "tx", "<", "widthInTile", ";", "tx", "++", ")", "{"...
Save the active tiles. @param file The output file. @param widthInTile The horizontal tiles. @param step The step number. @param s The s value. @throws IOException If error on saving.
[ "Save", "the", "active", "tiles", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/persister/MapTilePersisterModel.java#L144-L157
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java
DeterministicKey.ascertainParentFingerprint
private int ascertainParentFingerprint(DeterministicKey parentKey, int parentFingerprint) throws IllegalArgumentException { if (parentFingerprint != 0) { if (parent != null) checkArgument(parent.getFingerprint() == parentFingerprint, "parent fingerpr...
java
private int ascertainParentFingerprint(DeterministicKey parentKey, int parentFingerprint) throws IllegalArgumentException { if (parentFingerprint != 0) { if (parent != null) checkArgument(parent.getFingerprint() == parentFingerprint, "parent fingerpr...
[ "private", "int", "ascertainParentFingerprint", "(", "DeterministicKey", "parentKey", ",", "int", "parentFingerprint", ")", "throws", "IllegalArgumentException", "{", "if", "(", "parentFingerprint", "!=", "0", ")", "{", "if", "(", "parent", "!=", "null", ")", "che...
Return the fingerprint of this key's parent as an int value, or zero if this key is the root node of the key hierarchy. Raise an exception if the arguments are inconsistent. This method exists to avoid code repetition in the constructors.
[ "Return", "the", "fingerprint", "of", "this", "key", "s", "parent", "as", "an", "int", "value", "or", "zero", "if", "this", "key", "is", "the", "root", "node", "of", "the", "key", "hierarchy", ".", "Raise", "an", "exception", "if", "the", "arguments", ...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java#L118-L127
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VirtualFile.java
VirtualFile.asDirectoryURL
public URL asDirectoryURL() throws MalformedURLException { final String pathName = getPathName(false); return new URL(VFSUtils.VFS_PROTOCOL, "", -1, parent == null ? pathName : pathName + "/", VFSUtils.VFS_URL_HANDLER); }
java
public URL asDirectoryURL() throws MalformedURLException { final String pathName = getPathName(false); return new URL(VFSUtils.VFS_PROTOCOL, "", -1, parent == null ? pathName : pathName + "/", VFSUtils.VFS_URL_HANDLER); }
[ "public", "URL", "asDirectoryURL", "(", ")", "throws", "MalformedURLException", "{", "final", "String", "pathName", "=", "getPathName", "(", "false", ")", ";", "return", "new", "URL", "(", "VFSUtils", ".", "VFS_PROTOCOL", ",", "\"\"", ",", "-", "1", ",", "...
Get file's URL as a directory. There will always be a trailing {@code "/"} character. @return the url @throws MalformedURLException if the URL is somehow malformed
[ "Get", "file", "s", "URL", "as", "a", "directory", ".", "There", "will", "always", "be", "a", "trailing", "{", "@code", "/", "}", "character", "." ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VirtualFile.java#L547-L550