repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
jenkinsci/jenkins
core/src/main/java/jenkins/util/AntClassLoader.java
AntClassLoader.defineClassFromData
protected Class defineClassFromData(File container, byte[] classData, String classname) throws IOException { """ Define a class given its bytes @param container the container from which the class data has been read may be a directory or a jar/zip file. @param classData the bytecode data for the ...
java
protected Class defineClassFromData(File container, byte[] classData, String classname) throws IOException { definePackage(container, classname); ProtectionDomain currentPd = Project.class.getProtectionDomain(); String classResource = getClassFilename(classname); CodeSource s...
[ "protected", "Class", "defineClassFromData", "(", "File", "container", ",", "byte", "[", "]", "classData", ",", "String", "classname", ")", "throws", "IOException", "{", "definePackage", "(", "container", ",", "classname", ")", ";", "ProtectionDomain", "currentPd"...
Define a class given its bytes @param container the container from which the class data has been read may be a directory or a jar/zip file. @param classData the bytecode data for the class @param classname the name of the class @return the Class instance created from the given data @throws IOException if the class ...
[ "Define", "a", "class", "given", "its", "bytes" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/AntClassLoader.java#L1127-L1141
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java
InputUtils.getClassName
public static String getClassName(Map<String, Object> map) { """ InputHandler converts every object into Map. This function returns Class name of object from which this Map was created. @param map Map from which Class name would be returned @return Class name from which Map was built """ String cl...
java
public static String getClassName(Map<String, Object> map) { String className = null; if (map.containsKey(MAP_CLASS_NAME) == true) { className = (String) map.get(MAP_CLASS_NAME); } return className; }
[ "public", "static", "String", "getClassName", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "String", "className", "=", "null", ";", "if", "(", "map", ".", "containsKey", "(", "MAP_CLASS_NAME", ")", "==", "true", ")", "{", "className", ...
InputHandler converts every object into Map. This function returns Class name of object from which this Map was created. @param map Map from which Class name would be returned @return Class name from which Map was built
[ "InputHandler", "converts", "every", "object", "into", "Map", ".", "This", "function", "returns", "Class", "name", "of", "object", "from", "which", "this", "Map", "was", "created", "." ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/InputUtils.java#L58-L66
geomajas/geomajas-project-client-gwt
plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/SearchCommService.java
SearchCommService.buildGeometryCriterion
public static GeometryCriterion buildGeometryCriterion(final Geometry geometry, final MapWidget mapWidget, VectorLayer layer) { """ Build {@link GeometryCriterion} for the map widget, geometry and optional layer. @param geometry geometry @param mapWidget map widget @param layer layer @return geometry crit...
java
public static GeometryCriterion buildGeometryCriterion(final Geometry geometry, final MapWidget mapWidget, VectorLayer layer) { List<String> layers; if (null == layer) { layers = getVisibleServerLayerIds(mapWidget.getMapModel()); } else { layers = new ArrayList<String>(); layers.add(layer.getServerLay...
[ "public", "static", "GeometryCriterion", "buildGeometryCriterion", "(", "final", "Geometry", "geometry", ",", "final", "MapWidget", "mapWidget", ",", "VectorLayer", "layer", ")", "{", "List", "<", "String", ">", "layers", ";", "if", "(", "null", "==", "layer", ...
Build {@link GeometryCriterion} for the map widget, geometry and optional layer. @param geometry geometry @param mapWidget map widget @param layer layer @return geometry criterion
[ "Build", "{", "@link", "GeometryCriterion", "}", "for", "the", "map", "widget", "geometry", "and", "optional", "layer", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/SearchCommService.java#L175-L185
Azure/azure-sdk-for-java
signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java
SignalRsInner.beginUpdateAsync
public Observable<SignalRResourceInner> beginUpdateAsync(String resourceGroupName, String resourceName) { """ Operation to update an exiting SignalR service. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the p...
java
public Observable<SignalRResourceInner> beginUpdateAsync(String resourceGroupName, String resourceName) { return beginUpdateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<SignalRResourceInner>, SignalRResourceInner>() { @Override public SignalRRes...
[ "public", "Observable", "<", "SignalRResourceInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map", "(...
Operation to update an exiting SignalR service. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param resourceName The name of the SignalR resource. @throws IllegalArgumentException thrown if parameters fa...
[ "Operation", "to", "update", "an", "exiting", "SignalR", "service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java#L1606-L1613
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Recur.java
Recur.getDates
public final DateList getDates(final Date seed, final Period period, final Value value) { """ Convenience method for retrieving recurrences in a specified period. @param seed a seed date for generating recurrence instances @param period the period of returned recurrence dat...
java
public final DateList getDates(final Date seed, final Period period, final Value value) { return getDates(seed, period.getStart(), period.getEnd(), value, -1); }
[ "public", "final", "DateList", "getDates", "(", "final", "Date", "seed", ",", "final", "Period", "period", ",", "final", "Value", "value", ")", "{", "return", "getDates", "(", "seed", ",", "period", ".", "getStart", "(", ")", ",", "period", ".", "getEnd"...
Convenience method for retrieving recurrences in a specified period. @param seed a seed date for generating recurrence instances @param period the period of returned recurrence dates @param value type of dates to generate @return a list of dates
[ "Convenience", "method", "for", "retrieving", "recurrences", "in", "a", "specified", "period", "." ]
train
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Recur.java#L640-L643
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/UtilColor.java
UtilColor.multiplyRgb
public static int multiplyRgb(int rgb, double fr, double fg, double fb) { """ Apply an rgb factor. @param rgb The original rgb. @param fr The red factor. @param fg The green factor. @param fb The blue factor. @return The multiplied rgb. """ if (rgb == 0) { return rgb; ...
java
public static int multiplyRgb(int rgb, double fr, double fg, double fb) { if (rgb == 0) { return rgb; } final int a = rgb >> Constant.BYTE_4 & 0xFF; final int r = (int) UtilMath.clamp((rgb >> Constant.BYTE_3 & 0xFF) * fr, 0, 255); final int g = (...
[ "public", "static", "int", "multiplyRgb", "(", "int", "rgb", ",", "double", "fr", ",", "double", "fg", ",", "double", "fb", ")", "{", "if", "(", "rgb", "==", "0", ")", "{", "return", "rgb", ";", "}", "final", "int", "a", "=", "rgb", ">>", "Consta...
Apply an rgb factor. @param rgb The original rgb. @param fr The red factor. @param fg The green factor. @param fb The blue factor. @return The multiplied rgb.
[ "Apply", "an", "rgb", "factor", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/UtilColor.java#L42-L59
plaid/plaid-java
src/main/java/com/plaid/client/internal/Util.java
Util.arrayToMap
public static Map<String, String> arrayToMap(String[] args) { """ Helper to convert an alternating key1,value1,key2,value2,... array into a map. @param args Alternating arguments. @return Resulting map. """ if (args.length % 2 != 0) { throw new IllegalArgumentException("Must pass in an even numb...
java
public static Map<String, String> arrayToMap(String[] args) { if (args.length % 2 != 0) { throw new IllegalArgumentException("Must pass in an even number of args, one key per value."); } Map<String, String> ret = new HashMap<>(); for (int i = 0; i < args.length; i += 2) { ret.put(args[i], ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "arrayToMap", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "%", "2", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Must pass in an ev...
Helper to convert an alternating key1,value1,key2,value2,... array into a map. @param args Alternating arguments. @return Resulting map.
[ "Helper", "to", "convert", "an", "alternating", "key1", "value1", "key2", "value2", "...", "array", "into", "a", "map", "." ]
train
https://github.com/plaid/plaid-java/blob/360f1f8a5178fa0c3c2c2e07a58f8ccec5f33117/src/main/java/com/plaid/client/internal/Util.java#L107-L119
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/PropertyUtil.java
PropertyUtil.getProperty
public static String getProperty(String name, String def) { """ This method returns the named property, first checking the system properties and if not found, checking the environment. @param name The name @param def The default if not found @return The property, or the default value if not found """ ...
java
public static String getProperty(String name, String def) { String ret = System.getProperty(name, System.getenv(name)); if (ret != null) { return ret; } return def; }
[ "public", "static", "String", "getProperty", "(", "String", "name", ",", "String", "def", ")", "{", "String", "ret", "=", "System", ".", "getProperty", "(", "name", ",", "System", ".", "getenv", "(", "name", ")", ")", ";", "if", "(", "ret", "!=", "nu...
This method returns the named property, first checking the system properties and if not found, checking the environment. @param name The name @param def The default if not found @return The property, or the default value if not found
[ "This", "method", "returns", "the", "named", "property", "first", "checking", "the", "system", "properties", "and", "if", "not", "found", "checking", "the", "environment", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/PropertyUtil.java#L261-L267
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/dynamic/ProxyUtils.java
ProxyUtils.createInstance
public static <T> T createInstance(T impl, String name, String category, String subsystem, IOnDemandCallHandler handler, IOnDemandStatsFactory<? extends IStats> statsFactory, boolean attachLoggers, Class<T> interf, Class<?>... additionalInterfaces) { """ Creates a new proxied instance for an existing implementati...
java
public static <T> T createInstance(T impl, String name, String category, String subsystem, IOnDemandCallHandler handler, IOnDemandStatsFactory<? extends IStats> statsFactory, boolean attachLoggers, Class<T> interf, Class<?>... additionalInterfaces){ if (name==null) name = extractName(interf); Class<?>[] interf...
[ "public", "static", "<", "T", ">", "T", "createInstance", "(", "T", "impl", ",", "String", "name", ",", "String", "category", ",", "String", "subsystem", ",", "IOnDemandCallHandler", "handler", ",", "IOnDemandStatsFactory", "<", "?", "extends", "IStats", ">", ...
Creates a new proxied instance for an existing implementation. @param <T> interface type. @param impl the implementation of the interface. @param name name of the producer. @param category category of the producer, i.e. service, dao, api, controller. @param subsystem subsystem of the producer, i.e. messaging, payment, ...
[ "Creates", "a", "new", "proxied", "instance", "for", "an", "existing", "implementation", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/dynamic/ProxyUtils.java#L44-L68
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.iPv4Address
public static Validator<CharSequence> iPv4Address(@NonNull final Context context, @StringRes final int resourceId) { """ Creates and returns a validator, which allows to validate texts to ensure, that they represent valid IPv4 addresses. Empty texts are also a...
java
public static Validator<CharSequence> iPv4Address(@NonNull final Context context, @StringRes final int resourceId) { return new IPv4AddressValidator(context, resourceId); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "iPv4Address", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ")", "{", "return", "new", "IPv4AddressValidator", "(", "context", ",", "resourceId...
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid IPv4 addresses. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param resourceId ...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "represent", "valid", "IPv4", "addresses", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L910-L913
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java
DefaultOptionParser.handleLongOptionWithoutEqual
private void handleLongOptionWithoutEqual(String token) throws OptionParserException { """ Handles the following tokens: <pre> --L -L --l -l </pre> @param token the command line token to handle @throws OptionParserException if option parsing fails """ List<String> matchingOpts = getMatchingLo...
java
private void handleLongOptionWithoutEqual(String token) throws OptionParserException { List<String> matchingOpts = getMatchingLongOptions(token); if (matchingOpts.isEmpty()) { handleUnknownToken(currentToken); } else if (matchingOpts.size() > 1 && !options.hasLongOption(token)) { ...
[ "private", "void", "handleLongOptionWithoutEqual", "(", "String", "token", ")", "throws", "OptionParserException", "{", "List", "<", "String", ">", "matchingOpts", "=", "getMatchingLongOptions", "(", "token", ")", ";", "if", "(", "matchingOpts", ".", "isEmpty", "(...
Handles the following tokens: <pre> --L -L --l -l </pre> @param token the command line token to handle @throws OptionParserException if option parsing fails
[ "Handles", "the", "following", "tokens", ":", "<pre", ">", "--", "L", "-", "L", "--", "l", "-", "l", "<", "/", "pre", ">" ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java#L266-L276
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getIntensity
public double getIntensity( double dlat, double dlong, double year, double altitude ) { """ Returns the magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date ...
java
public double getIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return ti; }
[ "public", "double", "getIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "ti", ";", "}" ]
Returns the magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers. @retur...
[ "Returns", "the", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L968-L972
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java
WorkItemConfigurationsInner.createAsync
public Observable<WorkItemConfigurationInner> createAsync(String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { """ Create a work item configuration for an Application Insights component. @param resourceGroupName The name of the resource group. @param res...
java
public Observable<WorkItemConfigurationInner> createAsync(String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { return createWithServiceResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties).map(new Func1<ServiceResponse<WorkItemCo...
[ "public", "Observable", "<", "WorkItemConfigurationInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "WorkItemCreateConfiguration", "workItemConfigurationProperties", ")", "{", "return", "createWithServiceResponseAsync", "(", ...
Create a work item configuration for an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration o...
[ "Create", "a", "work", "item", "configuration", "for", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java#L208-L215
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/JdbcControlImpl.java
JdbcControlImpl.onAquire
@EventHandler(field = "_resourceContext", eventSet = ResourceEvents.class, eventName = "onAcquire") public void onAquire() { """ Invoked by the controls runtime when a new instance of this class is aquired by the runtime """ if (LOGGER.isDebugEnabled()) { LOGGER.debug("Enter: onAquire(...
java
@EventHandler(field = "_resourceContext", eventSet = ResourceEvents.class, eventName = "onAcquire") public void onAquire() { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Enter: onAquire()"); } try { getConnection(); } catch (SQLException se) { th...
[ "@", "EventHandler", "(", "field", "=", "\"_resourceContext\"", ",", "eventSet", "=", "ResourceEvents", ".", "class", ",", "eventName", "=", "\"onAcquire\"", ")", "public", "void", "onAquire", "(", ")", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", "...
Invoked by the controls runtime when a new instance of this class is aquired by the runtime
[ "Invoked", "by", "the", "controls", "runtime", "when", "a", "new", "instance", "of", "this", "class", "is", "aquired", "by", "the", "runtime" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/JdbcControlImpl.java#L103-L115
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setObject
@Override public void setObject(int parameterIndex, Object x) throws SQLException { """ Sets the value of the designated parameter using the given object. """ checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
java
@Override public void setObject(int parameterIndex, Object x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x; }
[ "@", "Override", "public", "void", "setObject", "(", "int", "parameterIndex", ",", "Object", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", "=",...
Sets the value of the designated parameter using the given object.
[ "Sets", "the", "value", "of", "the", "designated", "parameter", "using", "the", "given", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L461-L466
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java
Context2.declarePrefix
void declarePrefix (String prefix, String uri) { """ Declare a Namespace prefix for this context. @param prefix The prefix to declare. @param uri The associated Namespace URI. @see org.xml.sax.helpers.NamespaceSupport2#declarePrefix """ // Lazy processing... if (!ta...
java
void declarePrefix (String prefix, String uri) { // Lazy processing... if (!tablesDirty) { copyTables(); } if (declarations == null) { declarations = new Vector(); } prefix = prefix.intern(); uri = u...
[ "void", "declarePrefix", "(", "String", "prefix", ",", "String", "uri", ")", "{", "// Lazy processing...", "if", "(", "!", "tablesDirty", ")", "{", "copyTables", "(", ")", ";", "}", "if", "(", "declarations", "==", "null", ")", "{", "declarations", "=", ...
Declare a Namespace prefix for this context. @param prefix The prefix to declare. @param uri The associated Namespace URI. @see org.xml.sax.helpers.NamespaceSupport2#declarePrefix
[ "Declare", "a", "Namespace", "prefix", "for", "this", "context", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L535-L558
jbossws/jbossws-cxf
modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java
CXFMAPBuilder.inboundMap
public MAP inboundMap(Map<String, Object> ctx) { """ retrieve the inbound server message address properties attached to a message context @param ctx the server message context @return """ AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_IN...
java
public MAP inboundMap(Map<String, Object> ctx) { AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND); return newMap(implementation); }
[ "public", "MAP", "inboundMap", "(", "Map", "<", "String", ",", "Object", ">", "ctx", ")", "{", "AddressingProperties", "implementation", "=", "(", "AddressingProperties", ")", "ctx", ".", "get", "(", "CXFMAPConstants", ".", "SERVER_ADDRESSING_PROPERTIES_INBOUND", ...
retrieve the inbound server message address properties attached to a message context @param ctx the server message context @return
[ "retrieve", "the", "inbound", "server", "message", "address", "properties", "attached", "to", "a", "message", "context" ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAPBuilder.java#L71-L75
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/CertificatesInner.java
CertificatesInner.listByIntegrationAccountsWithServiceResponseAsync
public Observable<ServiceResponse<Page<IntegrationAccountCertificateInner>>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top) { """ Gets a list of integration account certificates. @param resourceGroupName The resource grou...
java
public Observable<ServiceResponse<Page<IntegrationAccountCertificateInner>>> listByIntegrationAccountsWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final Integer top) { return listByIntegrationAccountsSinglePageAsync(resourceGroupName, integrationAccountName, top)...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "IntegrationAccountCertificateInner", ">", ">", ">", "listByIntegrationAccountsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "integrationAccountName", ",", "f...
Gets a list of integration account certificates. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param top The number of items to be included in the result. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to...
[ "Gets", "a", "list", "of", "integration", "account", "certificates", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/CertificatesInner.java#L274-L286
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/TopicManagerImpl.java
TopicManagerImpl.sendSubscriptionEvent
void sendSubscriptionEvent(String topic, int nb) { """ Send subscription event to all client @param topic @param session """ Collection<Session> sessions = getSessionsForTopic(topic); if (!sessions.isEmpty()) { MessageToClient messageToClient = new MessageToClient(); messageToClient.setId(top...
java
void sendSubscriptionEvent(String topic, int nb) { Collection<Session> sessions = getSessionsForTopic(topic); if (!sessions.isEmpty()) { MessageToClient messageToClient = new MessageToClient(); messageToClient.setId(topic); messageToClient.setType(MessageType.MESSAGE); messageToClient.setResponse(...
[ "void", "sendSubscriptionEvent", "(", "String", "topic", ",", "int", "nb", ")", "{", "Collection", "<", "Session", ">", "sessions", "=", "getSessionsForTopic", "(", "topic", ")", ";", "if", "(", "!", "sessions", ".", "isEmpty", "(", ")", ")", "{", "Messa...
Send subscription event to all client @param topic @param session
[ "Send", "subscription", "event", "to", "all", "client" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/TopicManagerImpl.java#L202-L219
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/AbstractBundleLinkRenderer.java
AbstractBundleLinkRenderer.addComment
protected void addComment(String commentText, Writer out) throws IOException { """ Adds an HTML comment to the output stream. @param commentText the comment @param out Writer @throws IOException if an IO exception occurs """ StringBuilder sb = new StringBuilder("<script type=\"text/javascript\">/* ")...
java
protected void addComment(String commentText, Writer out) throws IOException { StringBuilder sb = new StringBuilder("<script type=\"text/javascript\">/* "); sb.append(commentText).append(" */</script>").append("\n"); out.write(sb.toString()); }
[ "protected", "void", "addComment", "(", "String", "commentText", ",", "Writer", "out", ")", "throws", "IOException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"<script type=\\\"text/javascript\\\">/* \"", ")", ";", "sb", ".", "append", "(", "...
Adds an HTML comment to the output stream. @param commentText the comment @param out Writer @throws IOException if an IO exception occurs
[ "Adds", "an", "HTML", "comment", "to", "the", "output", "stream", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/AbstractBundleLinkRenderer.java#L351-L355
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.getClockWise
private static LineString getClockWise(final LineString lineString) { """ Reverse the LineString to be oriented clockwise. All NaN z values are replaced by a zero value. @param lineString @return """ final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoor...
java
private static LineString getClockWise(final LineString lineString) { final Coordinate c0 = lineString.getCoordinateN(0); final Coordinate c1 = lineString.getCoordinateN(1); final Coordinate c2 = lineString.getCoordinateN(2); lineString.apply(new UpdateZCoordinateSequenceFilter(0, 3)); ...
[ "private", "static", "LineString", "getClockWise", "(", "final", "LineString", "lineString", ")", "{", "final", "Coordinate", "c0", "=", "lineString", ".", "getCoordinateN", "(", "0", ")", ";", "final", "Coordinate", "c1", "=", "lineString", ".", "getCoordinateN...
Reverse the LineString to be oriented clockwise. All NaN z values are replaced by a zero value. @param lineString @return
[ "Reverse", "the", "LineString", "to", "be", "oriented", "clockwise", ".", "All", "NaN", "z", "values", "are", "replaced", "by", "a", "zero", "value", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L187-L197
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/SchemasInner.java
SchemasInner.getAsync
public Observable<IntegrationAccountSchemaInner> getAsync(String resourceGroupName, String integrationAccountName, String schemaName) { """ Gets an integration account schema. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param schemaName The in...
java
public Observable<IntegrationAccountSchemaInner> getAsync(String resourceGroupName, String integrationAccountName, String schemaName) { return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName).map(new Func1<ServiceResponse<IntegrationAccountSchemaInner>, IntegrationAccountSchema...
[ "public", "Observable", "<", "IntegrationAccountSchemaInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "schemaName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "inte...
Gets an integration account schema. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param schemaName The integration account schema name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the IntegrationAcc...
[ "Gets", "an", "integration", "account", "schema", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/SchemasInner.java#L381-L388
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java
RedirectionActionHelper.buildFormPostContentAction
public static RedirectionAction buildFormPostContentAction(final WebContext context, final String content) { """ Build the appropriate redirection action for a content which is a form post. @param context the web context @param content the content @return the appropriate redirection action """ if ...
java
public static RedirectionAction buildFormPostContentAction(final WebContext context, final String content) { if (ContextHelper.isPost(context) && useModernHttpCodes) { return new TemporaryRedirectAction(content); } else { return new OkAction(content); } }
[ "public", "static", "RedirectionAction", "buildFormPostContentAction", "(", "final", "WebContext", "context", ",", "final", "String", "content", ")", "{", "if", "(", "ContextHelper", ".", "isPost", "(", "context", ")", "&&", "useModernHttpCodes", ")", "{", "return...
Build the appropriate redirection action for a content which is a form post. @param context the web context @param content the content @return the appropriate redirection action
[ "Build", "the", "appropriate", "redirection", "action", "for", "a", "content", "which", "is", "a", "form", "post", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java#L40-L46
Netflix/frigga
src/main/java/com/netflix/frigga/cluster/ClusterGrouper.java
ClusterGrouper.groupAsgNamesByClusterName
public static Map<String, List<String>> groupAsgNamesByClusterName(List<String> asgNames) { """ Groups a list of ASG names by cluster name. @param asgNames list of asg names @return map of cluster name to list of ASG names in that cluster """ return groupByClusterName(asgNames, new AsgNameProvider<...
java
public static Map<String, List<String>> groupAsgNamesByClusterName(List<String> asgNames) { return groupByClusterName(asgNames, new AsgNameProvider<String>() { public String extractAsgName(String asgName) { return asgName; } }); }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "groupAsgNamesByClusterName", "(", "List", "<", "String", ">", "asgNames", ")", "{", "return", "groupByClusterName", "(", "asgNames", ",", "new", "AsgNameProvider", "<", "String", ...
Groups a list of ASG names by cluster name. @param asgNames list of asg names @return map of cluster name to list of ASG names in that cluster
[ "Groups", "a", "list", "of", "ASG", "names", "by", "cluster", "name", "." ]
train
https://github.com/Netflix/frigga/blob/38afefd1726116f3431b95fcb96a6af640b99d10/src/main/java/com/netflix/frigga/cluster/ClusterGrouper.java#L57-L63
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.existsResource
public boolean existsResource(CmsUUID structureId, CmsResourceFilter filter) { """ Checks the availability of a resource in the VFS, using the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> A resource may be of type <code>{@link CmsFile}</code> or <code>{@link CmsFolder}</code>.<p> The specified...
java
public boolean existsResource(CmsUUID structureId, CmsResourceFilter filter) { return m_securityManager.existsResource(m_context, structureId, filter); }
[ "public", "boolean", "existsResource", "(", "CmsUUID", "structureId", ",", "CmsResourceFilter", "filter", ")", "{", "return", "m_securityManager", ".", "existsResource", "(", "m_context", ",", "structureId", ",", "filter", ")", ";", "}" ]
Checks the availability of a resource in the VFS, using the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> A resource may be of type <code>{@link CmsFile}</code> or <code>{@link CmsFolder}</code>.<p> The specified filter controls what kind of resources should be "found" during the read operation. This will...
[ "Checks", "the", "availability", "of", "a", "resource", "in", "the", "VFS", "using", "the", "<code", ">", "{", "@link", "CmsResourceFilter#DEFAULT", "}", "<", "/", "code", ">", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1176-L1179
Ecwid/ecwid-mailchimp
src/main/java/com/ecwid/mailchimp/MailChimpObject.java
MailChimpObject.fromJson
public static <T extends MailChimpObject> T fromJson(String json, Class<T> clazz) { """ Deserializes an object from JSON. @throws IllegalArgumentException if <code>json</code> cannot be deserialized to an object of class <code>clazz</code>. """ try { return MailChimpGsonFactory.createGson().fromJson(js...
java
public static <T extends MailChimpObject> T fromJson(String json, Class<T> clazz) { try { return MailChimpGsonFactory.createGson().fromJson(json, clazz); } catch(JsonParseException e) { throw new IllegalArgumentException(e); } }
[ "public", "static", "<", "T", "extends", "MailChimpObject", ">", "T", "fromJson", "(", "String", "json", ",", "Class", "<", "T", ">", "clazz", ")", "{", "try", "{", "return", "MailChimpGsonFactory", ".", "createGson", "(", ")", ".", "fromJson", "(", "jso...
Deserializes an object from JSON. @throws IllegalArgumentException if <code>json</code> cannot be deserialized to an object of class <code>clazz</code>.
[ "Deserializes", "an", "object", "from", "JSON", "." ]
train
https://github.com/Ecwid/ecwid-mailchimp/blob/8acb37d7677bd494879d4db11f3c42ba4c85eb36/src/main/java/com/ecwid/mailchimp/MailChimpObject.java#L383-L389
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java
IssuesTrackerHelper.setIssueTrackerInfo
public void setIssueTrackerInfo(BuildInfoBuilder builder) { """ Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor """ Issues issues = new Issues(); issues.setAggregateBuildIssues(aggregateBuildIssues); issues.setAggregati...
java
public void setIssueTrackerInfo(BuildInfoBuilder builder) { Issues issues = new Issues(); issues.setAggregateBuildIssues(aggregateBuildIssues); issues.setAggregationBuildStatus(aggregationBuildStatus); issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion)); Set<Issue> a...
[ "public", "void", "setIssueTrackerInfo", "(", "BuildInfoBuilder", "builder", ")", "{", "Issues", "issues", "=", "new", "Issues", "(", ")", ";", "issues", ".", "setAggregateBuildIssues", "(", "aggregateBuildIssues", ")", ";", "issues", ".", "setAggregationBuildStatus...
Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor
[ "Apply", "issues", "tracker", "info", "to", "a", "build", "info", "builder", "(", "used", "by", "generic", "tasks", "and", "maven2", "which", "doesn", "t", "use", "the", "extractor" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java#L103-L113
grpc/grpc-java
alts/src/main/java/io/grpc/alts/ComputeEngineChannelBuilder.java
ComputeEngineChannelBuilder.forAddress
public static ComputeEngineChannelBuilder forAddress(String name, int port) { """ "Overrides" the static method in {@link ManagedChannelBuilder}. """ return forTarget(GrpcUtil.authorityFromHostAndPort(name, port)); }
java
public static ComputeEngineChannelBuilder forAddress(String name, int port) { return forTarget(GrpcUtil.authorityFromHostAndPort(name, port)); }
[ "public", "static", "ComputeEngineChannelBuilder", "forAddress", "(", "String", "name", ",", "int", "port", ")", "{", "return", "forTarget", "(", "GrpcUtil", ".", "authorityFromHostAndPort", "(", "name", ",", "port", ")", ")", ";", "}" ]
"Overrides" the static method in {@link ManagedChannelBuilder}.
[ "Overrides", "the", "static", "method", "in", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/alts/src/main/java/io/grpc/alts/ComputeEngineChannelBuilder.java#L72-L74
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java
RouteTablesInner.beginUpdateTagsAsync
public Observable<RouteTableInner> beginUpdateTagsAsync(String resourceGroupName, String routeTableName) { """ Updates a route table tags. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @throws IllegalArgumentException thrown if parameters fail the ...
java
public Observable<RouteTableInner> beginUpdateTagsAsync(String resourceGroupName, String routeTableName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1<ServiceResponse<RouteTableInner>, RouteTableInner>() { @Override public RouteTableInn...
[ "public", "Observable", "<", "RouteTableInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "routeTableName", ")", ".", "map...
Updates a route table tags. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RouteTableInner object
[ "Updates", "a", "route", "table", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L779-L786
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java
AuditUtils.contractCreatedToApi
public static AuditEntryBean contractCreatedToApi(ContractBean bean, ISecurityContext securityContext) { """ Creates an audit entry for the 'contract created' event. @param bean the bean @param securityContext the security context @return the audit entry """ AuditEntryBean entry = newEntry(bean.getA...
java
public static AuditEntryBean contractCreatedToApi(ContractBean bean, ISecurityContext securityContext) { AuditEntryBean entry = newEntry(bean.getApi().getApi().getOrganization().getId(), AuditEntityType.Api, securityContext); // Ensure the order of contract-created events are deterministic by adding 1 m...
[ "public", "static", "AuditEntryBean", "contractCreatedToApi", "(", "ContractBean", "bean", ",", "ISecurityContext", "securityContext", ")", "{", "AuditEntryBean", "entry", "=", "newEntry", "(", "bean", ".", "getApi", "(", ")", ".", "getApi", "(", ")", ".", "getO...
Creates an audit entry for the 'contract created' event. @param bean the bean @param securityContext the security context @return the audit entry
[ "Creates", "an", "audit", "entry", "for", "the", "contract", "created", "event", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java#L440-L450
palaima/DebugDrawer
debugdrawer-timber/src/main/java/io/palaima/debugdrawer/timber/util/Intents.java
Intents.hasHandler
public static boolean hasHandler(Context context, Intent intent) { """ Queries on-device packages for a handler for the supplied {@link Intent}. """ List<ResolveInfo> handlers = context.getPackageManager().queryIntentActivities(intent, 0); return !handlers.isEmpty(); }
java
public static boolean hasHandler(Context context, Intent intent) { List<ResolveInfo> handlers = context.getPackageManager().queryIntentActivities(intent, 0); return !handlers.isEmpty(); }
[ "public", "static", "boolean", "hasHandler", "(", "Context", "context", ",", "Intent", "intent", ")", "{", "List", "<", "ResolveInfo", ">", "handlers", "=", "context", ".", "getPackageManager", "(", ")", ".", "queryIntentActivities", "(", "intent", ",", "0", ...
Queries on-device packages for a handler for the supplied {@link Intent}.
[ "Queries", "on", "-", "device", "packages", "for", "a", "handler", "for", "the", "supplied", "{" ]
train
https://github.com/palaima/DebugDrawer/blob/49b5992a1148757bd740c4a0b7df10ef70ade6d8/debugdrawer-timber/src/main/java/io/palaima/debugdrawer/timber/util/Intents.java#L29-L32
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/util/I18nUtil.java
I18nUtil.getText
public static String getText(String key, ResourceBundle bundle, Object... arguments) { """ <p>getText.</p> @param key a {@link java.lang.String} object. @param bundle a {@link java.util.ResourceBundle} object. @param arguments a {@link java.lang.Object} object. @return a {@link java.lang.String} object. ...
java
public static String getText(String key, ResourceBundle bundle, Object... arguments) { try { String value = bundle.getString(key); return MessageFormat.format(value, arguments); } catch (MissingResourceException ex) { return key; } }
[ "public", "static", "String", "getText", "(", "String", "key", ",", "ResourceBundle", "bundle", ",", "Object", "...", "arguments", ")", "{", "try", "{", "String", "value", "=", "bundle", ".", "getString", "(", "key", ")", ";", "return", "MessageFormat", "....
<p>getText.</p> @param key a {@link java.lang.String} object. @param bundle a {@link java.util.ResourceBundle} object. @param arguments a {@link java.lang.Object} object. @return a {@link java.lang.String} object.
[ "<p", ">", "getText", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/util/I18nUtil.java#L48-L60
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.createRemoteEnvironment
public static ExecutionEnvironment createRemoteEnvironment(String host, int port, String... jarFiles) { """ Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the cluster. The ex...
java
public static ExecutionEnvironment createRemoteEnvironment(String host, int port, String... jarFiles) { return new RemoteEnvironment(host, port, jarFiles); }
[ "public", "static", "ExecutionEnvironment", "createRemoteEnvironment", "(", "String", "host", ",", "int", "port", ",", "String", "...", "jarFiles", ")", "{", "return", "new", "RemoteEnvironment", "(", "host", ",", "port", ",", "jarFiles", ")", ";", "}" ]
Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the cluster. The execution will use the cluster's default parallelism, unless the parallelism is set explicitly via {@link ExecutionEn...
[ "Creates", "a", "{", "@link", "RemoteEnvironment", "}", ".", "The", "remote", "environment", "sends", "(", "parts", "of", ")", "the", "program", "to", "a", "cluster", "for", "execution", ".", "Note", "that", "all", "file", "paths", "used", "in", "the", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L1172-L1174
google/truth
core/src/main/java/com/google/common/truth/Correspondence.java
Correspondence.formatDiff
@NullableDecl public String formatDiff(@NullableDecl A actual, @NullableDecl E expected) { """ Returns a {@link String} describing the difference between the {@code actual} and {@code expected} values, if possible, or {@code null} if not. <p>The implementation on the {@link Correspondence} base class always ...
java
@NullableDecl public String formatDiff(@NullableDecl A actual, @NullableDecl E expected) { return null; }
[ "@", "NullableDecl", "public", "String", "formatDiff", "(", "@", "NullableDecl", "A", "actual", ",", "@", "NullableDecl", "E", "expected", ")", "{", "return", "null", ";", "}" ]
Returns a {@link String} describing the difference between the {@code actual} and {@code expected} values, if possible, or {@code null} if not. <p>The implementation on the {@link Correspondence} base class always returns {@code null}. To enable diffing, use {@link #formattingDiffsUsing} (or override this method in a ...
[ "Returns", "a", "{", "@link", "String", "}", "describing", "the", "difference", "between", "the", "{", "@code", "actual", "}", "and", "{", "@code", "expected", "}", "values", "if", "possible", "or", "{", "@code", "null", "}", "if", "not", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/Correspondence.java#L709-L712
avarabyeu/restendpoint
src/main/java/com/github/avarabyeu/restendpoint/http/DefaultErrorHandler.java
DefaultErrorHandler.handleError
protected void handleError(URI requestUri, HttpMethod requestMethod, int statusCode, String statusMessage, ByteSource errorBody) throws RestEndpointIOException { """ Handler methods for HTTP client errors @param requestUri - Request URI @param requestMethod - Request HTTP Method @param statusCo...
java
protected void handleError(URI requestUri, HttpMethod requestMethod, int statusCode, String statusMessage, ByteSource errorBody) throws RestEndpointIOException { throw new RestEndpointException(requestUri, requestMethod, statusCode, statusMessage, errorBody); }
[ "protected", "void", "handleError", "(", "URI", "requestUri", ",", "HttpMethod", "requestMethod", ",", "int", "statusCode", ",", "String", "statusMessage", ",", "ByteSource", "errorBody", ")", "throws", "RestEndpointIOException", "{", "throw", "new", "RestEndpointExce...
Handler methods for HTTP client errors @param requestUri - Request URI @param requestMethod - Request HTTP Method @param statusCode - HTTP status code @param statusMessage - HTTP status message @param errorBody - HTTP response body
[ "Handler", "methods", "for", "HTTP", "client", "errors" ]
train
https://github.com/avarabyeu/restendpoint/blob/e11fc0813ea4cefbe4d8bca292cd48b40abf185d/src/main/java/com/github/avarabyeu/restendpoint/http/DefaultErrorHandler.java#L69-L72
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/DbPro.java
DbPro.deleteById
public boolean deleteById(String tableName, Object idValue) { """ Delete record by id with default primary key. <pre> Example: Db.use().deleteById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record @return true if delete succeed otherwise false """...
java
public boolean deleteById(String tableName, Object idValue) { return deleteByIds(tableName, config.dialect.getDefaultPrimaryKey(), idValue); }
[ "public", "boolean", "deleteById", "(", "String", "tableName", ",", "Object", "idValue", ")", "{", "return", "deleteByIds", "(", "tableName", ",", "config", ".", "dialect", ".", "getDefaultPrimaryKey", "(", ")", ",", "idValue", ")", ";", "}" ]
Delete record by id with default primary key. <pre> Example: Db.use().deleteById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record @return true if delete succeed otherwise false
[ "Delete", "record", "by", "id", "with", "default", "primary", "key", ".", "<pre", ">", "Example", ":", "Db", ".", "use", "()", ".", "deleteById", "(", "user", "15", ")", ";", "<", "/", "pre", ">" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/DbPro.java#L415-L417
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.isSubtype
public static boolean isSubtype(@DottedClassName String clsName, @DottedClassName String possibleSupertypeClassName) throws ClassNotFoundException { """ Determine whether one class (or reference type) is a subtype of another. @param clsName the name of the class or reference type @param possibleSupertypeClass...
java
public static boolean isSubtype(@DottedClassName String clsName, @DottedClassName String possibleSupertypeClassName) throws ClassNotFoundException { Subtypes2 subtypes2 = Global.getAnalysisCache().getDatabase(Subtypes2.class); return subtypes2.isSubtype(DescriptorFactory.createClassDescriptorFromDottedC...
[ "public", "static", "boolean", "isSubtype", "(", "@", "DottedClassName", "String", "clsName", ",", "@", "DottedClassName", "String", "possibleSupertypeClassName", ")", "throws", "ClassNotFoundException", "{", "Subtypes2", "subtypes2", "=", "Global", ".", "getAnalysisCac...
Determine whether one class (or reference type) is a subtype of another. @param clsName the name of the class or reference type @param possibleSupertypeClassName the name of the possible superclass @return true if clsName is a subtype of possibleSupertypeClassName, false if not
[ "Determine", "whether", "one", "class", "(", "or", "reference", "type", ")", "is", "a", "subtype", "of", "another", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L95-L98
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java
CommerceOrderNotePersistenceImpl.findByC_R
@Override public List<CommerceOrderNote> findByC_R(long commerceOrderId, boolean restricted, int start, int end) { """ Returns a range of all the commerce order notes where commerceOrderId = &#63; and restricted = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> insta...
java
@Override public List<CommerceOrderNote> findByC_R(long commerceOrderId, boolean restricted, int start, int end) { return findByC_R(commerceOrderId, restricted, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderNote", ">", "findByC_R", "(", "long", "commerceOrderId", ",", "boolean", "restricted", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByC_R", "(", "commerceOrderId", ",", "restricted", ","...
Returns a range of all the commerce order notes where commerceOrderId = &#63; and restricted = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refer...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "order", "notes", "where", "commerceOrderId", "=", "&#63", ";", "and", "restricted", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java#L665-L669
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java
MapCircle.calcBounds
@Override @Pure protected Rectangle2d calcBounds() { """ Compute the bounds of this element. This function does not update the internal attribute replied by {@link #getBoundingBox()} """ double x = this.getX(); double y = this.getY(); final double w = this.radius * 2; final double h = w; x -= w...
java
@Override @Pure protected Rectangle2d calcBounds() { double x = this.getX(); double y = this.getY(); final double w = this.radius * 2; final double h = w; x -= w / 2.; y -= h / 2.; return new Rectangle2d(x, y, w, h); }
[ "@", "Override", "@", "Pure", "protected", "Rectangle2d", "calcBounds", "(", ")", "{", "double", "x", "=", "this", ".", "getX", "(", ")", ";", "double", "y", "=", "this", ".", "getY", "(", ")", ";", "final", "double", "w", "=", "this", ".", "radius...
Compute the bounds of this element. This function does not update the internal attribute replied by {@link #getBoundingBox()}
[ "Compute", "the", "bounds", "of", "this", "element", ".", "This", "function", "does", "not", "update", "the", "internal", "attribute", "replied", "by", "{" ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java#L349-L362
Nexmo/nexmo-java
src/main/java/com/nexmo/client/insight/InsightClient.java
InsightClient.getBasicNumberInsight
public BasicInsightResponse getBasicNumberInsight(String number, String country) throws IOException, NexmoClientException { """ Perform a Basic Insight Request with a number and country. @param number A single phone number that you need insight about in national or international format @param country If a num...
java
public BasicInsightResponse getBasicNumberInsight(String number, String country) throws IOException, NexmoClientException { return getBasicNumberInsight(BasicInsightRequest.withNumberAndCountry(number, country)); }
[ "public", "BasicInsightResponse", "getBasicNumberInsight", "(", "String", "number", ",", "String", "country", ")", "throws", "IOException", ",", "NexmoClientException", "{", "return", "getBasicNumberInsight", "(", "BasicInsightRequest", ".", "withNumberAndCountry", "(", "...
Perform a Basic Insight Request with a number and country. @param number A single phone number that you need insight about in national or international format @param country If a number does not have a country code or it is uncertain, set the two-character country code. @return A {@link BasicInsightResponse} represe...
[ "Perform", "a", "Basic", "Insight", "Request", "with", "a", "number", "and", "country", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/insight/InsightClient.java#L78-L80
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebUtil.java
CareWebUtil.showMessage
public static void showMessage(String message, String caption) { """ Sends an informational message for display by desktop. @param message Text of the message. @param caption Optional caption text. """ getShell().getMessageWindow().showMessage(message, caption); }
java
public static void showMessage(String message, String caption) { getShell().getMessageWindow().showMessage(message, caption); }
[ "public", "static", "void", "showMessage", "(", "String", "message", ",", "String", "caption", ")", "{", "getShell", "(", ")", ".", "getMessageWindow", "(", ")", ".", "showMessage", "(", "message", ",", "caption", ")", ";", "}" ]
Sends an informational message for display by desktop. @param message Text of the message. @param caption Optional caption text.
[ "Sends", "an", "informational", "message", "for", "display", "by", "desktop", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebUtil.java#L83-L85
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasInner.java
ProviderOperationsMetadatasInner.getAsync
public Observable<ProviderOperationsMetadataInner> getAsync(String resourceProviderNamespace, String apiVersion) { """ Gets provider operations metadata for the specified resource provider. @param resourceProviderNamespace The namespace of the resource provider. @param apiVersion The API version to use for the...
java
public Observable<ProviderOperationsMetadataInner> getAsync(String resourceProviderNamespace, String apiVersion) { return getWithServiceResponseAsync(resourceProviderNamespace, apiVersion).map(new Func1<ServiceResponse<ProviderOperationsMetadataInner>, ProviderOperationsMetadataInner>() { @Override ...
[ "public", "Observable", "<", "ProviderOperationsMetadataInner", ">", "getAsync", "(", "String", "resourceProviderNamespace", ",", "String", "apiVersion", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceProviderNamespace", ",", "apiVersion", ")", ".", "map...
Gets provider operations metadata for the specified resource provider. @param resourceProviderNamespace The namespace of the resource provider. @param apiVersion The API version to use for the operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ProviderOpe...
[ "Gets", "provider", "operations", "metadata", "for", "the", "specified", "resource", "provider", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/ProviderOperationsMetadatasInner.java#L109-L116
amsa-code/risky
behaviour-detector/src/main/java/au/gov/amsa/navigation/VesselPosition.java
VesselPosition.intersectionTimes
public Optional<Times> intersectionTimes(VesselPosition vp) { """ Returns absent if no intersection occurs else return the one or two times of intersection of circles around the vessel relative to this.time(). @param vp @return """ // TODO handle vp doesn't have speed or cog but is within collisi...
java
public Optional<Times> intersectionTimes(VesselPosition vp) { // TODO handle vp doesn't have speed or cog but is within collision // distance given any cog and max speed Optional<VesselPosition> p = vp.predict(time); if (!p.isPresent()) { return Optional.absent(); }...
[ "public", "Optional", "<", "Times", ">", "intersectionTimes", "(", "VesselPosition", "vp", ")", "{", "// TODO handle vp doesn't have speed or cog but is within collision", "// distance given any cog and max speed", "Optional", "<", "VesselPosition", ">", "p", "=", "vp", ".", ...
Returns absent if no intersection occurs else return the one or two times of intersection of circles around the vessel relative to this.time(). @param vp @return
[ "Returns", "absent", "if", "no", "intersection", "occurs", "else", "return", "the", "one", "or", "two", "times", "of", "intersection", "of", "circles", "around", "the", "vessel", "relative", "to", "this", ".", "time", "()", "." ]
train
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/behaviour-detector/src/main/java/au/gov/amsa/navigation/VesselPosition.java#L337-L377
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/StorageKeyFormat.java
StorageKeyFormat.of
public static StorageKeyFormat of(final String config, final String host, final String context, final String webappVersion) { """ Creates a new {@link StorageKeyFormat} for the given configuration. The configuration has the form <code>$token,$token</code> Some examples which config would create which output fo...
java
public static StorageKeyFormat of(final String config, final String host, final String context, final String webappVersion) { if(config == null || config.trim().isEmpty()) return EMPTY; final String[] tokens = config.split(","); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < tokens.lengt...
[ "public", "static", "StorageKeyFormat", "of", "(", "final", "String", "config", ",", "final", "String", "host", ",", "final", "String", "context", ",", "final", "String", "webappVersion", ")", "{", "if", "(", "config", "==", "null", "||", "config", ".", "t...
Creates a new {@link StorageKeyFormat} for the given configuration. The configuration has the form <code>$token,$token</code> Some examples which config would create which output for the key / session id "foo" with context path "ctxt" and host "hst": <dl> <dt>static:x</dt><dd>x_foo</dd> <dt>host</dt><dd>hst_foo</dd> <...
[ "Creates", "a", "new", "{", "@link", "StorageKeyFormat", "}", "for", "the", "given", "configuration", ".", "The", "configuration", "has", "the", "form", "<code", ">", "$token", "$token<", "/", "code", ">" ]
train
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/StorageKeyFormat.java#L71-L88
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java
NonplanarBonds.findBond
private IBond findBond(IAtom beg1, IAtom beg2, IAtom end) { """ Find a bond between two possible atoms. For example beg1 - end or beg2 - end. @param beg1 begin 1 @param beg2 begin 2 @param end end @return the bond (or null if none) """ IBond bond = container.getBond(beg1, end); if (bond !=...
java
private IBond findBond(IAtom beg1, IAtom beg2, IAtom end) { IBond bond = container.getBond(beg1, end); if (bond != null) return bond; return container.getBond(beg2, end); }
[ "private", "IBond", "findBond", "(", "IAtom", "beg1", ",", "IAtom", "beg2", ",", "IAtom", "end", ")", "{", "IBond", "bond", "=", "container", ".", "getBond", "(", "beg1", ",", "end", ")", ";", "if", "(", "bond", "!=", "null", ")", "return", "bond", ...
Find a bond between two possible atoms. For example beg1 - end or beg2 - end. @param beg1 begin 1 @param beg2 begin 2 @param end end @return the bond (or null if none)
[ "Find", "a", "bond", "between", "two", "possible", "atoms", ".", "For", "example", "beg1", "-", "end", "or", "beg2", "-", "end", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/NonplanarBonds.java#L401-L406
citrusframework/citrus
modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java
JmsSyncProducer.createMessageConsumer
private MessageConsumer createMessageConsumer(Destination replyToDestination, String messageId) throws JMSException { """ Creates a message consumer on temporary/durable queue or topic. Durable queue/topic destinations require a message selector to be set. @param replyToDestination the reply destination. @par...
java
private MessageConsumer createMessageConsumer(Destination replyToDestination, String messageId) throws JMSException { MessageConsumer messageConsumer; if (replyToDestination instanceof Queue) { messageConsumer = session.createConsumer(replyToDestination, "JMSCorrelationI...
[ "private", "MessageConsumer", "createMessageConsumer", "(", "Destination", "replyToDestination", ",", "String", "messageId", ")", "throws", "JMSException", "{", "MessageConsumer", "messageConsumer", ";", "if", "(", "replyToDestination", "instanceof", "Queue", ")", "{", ...
Creates a message consumer on temporary/durable queue or topic. Durable queue/topic destinations require a message selector to be set. @param replyToDestination the reply destination. @param messageId the messageId used for optional message selector. @return @throws JMSException
[ "Creates", "a", "message", "consumer", "on", "temporary", "/", "durable", "queue", "or", "topic", ".", "Durable", "queue", "/", "topic", "destinations", "require", "a", "message", "selector", "to", "be", "set", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L236-L248
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Snappy.java
Snappy.encodeLiteral
static void encodeLiteral(ByteBuf in, ByteBuf out, int length) { """ Writes a literal to the supplied output buffer by directly copying from the input buffer. The literal is taken from the current readerIndex up to the supplied length. @param in The input buffer to copy from @param out The output buffer to ...
java
static void encodeLiteral(ByteBuf in, ByteBuf out, int length) { if (length < 61) { out.writeByte(length - 1 << 2); } else { int bitLength = bitsToEncode(length - 1); int bytesToEncode = 1 + bitLength / 8; out.writeByte(59 + bytesToEncode << 2); ...
[ "static", "void", "encodeLiteral", "(", "ByteBuf", "in", ",", "ByteBuf", "out", ",", "int", "length", ")", "{", "if", "(", "length", "<", "61", ")", "{", "out", ".", "writeByte", "(", "length", "-", "1", "<<", "2", ")", ";", "}", "else", "{", "in...
Writes a literal to the supplied output buffer by directly copying from the input buffer. The literal is taken from the current readerIndex up to the supplied length. @param in The input buffer to copy from @param out The output buffer to copy to @param length The length of the literal to copy
[ "Writes", "a", "literal", "to", "the", "supplied", "output", "buffer", "by", "directly", "copying", "from", "the", "input", "buffer", ".", "The", "literal", "is", "taken", "from", "the", "current", "readerIndex", "up", "to", "the", "supplied", "length", "." ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Snappy.java#L223-L236
knightliao/disconf
disconf-client/src/main/java/com/baidu/disconf/client/addons/properties/ReloadingPropertyPlaceholderConfigurer.java
ReloadingPropertyPlaceholderConfigurer.getDynamic
private DynamicProperty getDynamic(String currentBeanName, String currentPropertyName, String orgStrVal) { """ @param currentBeanName 当前的bean name @param currentPropertyName 当前它的属性 @param orgStrVal 原来的值 @return """ DynamicProperty dynamic = new DynamicProperty(currentBeanName, curren...
java
private DynamicProperty getDynamic(String currentBeanName, String currentPropertyName, String orgStrVal) { DynamicProperty dynamic = new DynamicProperty(currentBeanName, currentPropertyName, orgStrVal); DynamicProperty found = dynamicProperties.get(dynamic); if (found != null) { retu...
[ "private", "DynamicProperty", "getDynamic", "(", "String", "currentBeanName", ",", "String", "currentPropertyName", ",", "String", "orgStrVal", ")", "{", "DynamicProperty", "dynamic", "=", "new", "DynamicProperty", "(", "currentBeanName", ",", "currentPropertyName", ","...
@param currentBeanName 当前的bean name @param currentPropertyName 当前它的属性 @param orgStrVal 原来的值 @return
[ "@param", "currentBeanName", "当前的bean", "name", "@param", "currentPropertyName", "当前它的属性", "@param", "orgStrVal", "原来的值" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-client/src/main/java/com/baidu/disconf/client/addons/properties/ReloadingPropertyPlaceholderConfigurer.java#L107-L115
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/UndoOperationAction.java
UndoOperationAction.execute
public boolean execute(Canvas target, Menu menu, MenuItem item) { """ This function tries to find out whether or not this menu item should be enabled. Only if there are more then 1 operations in the feature transaction operation queue, will this menu item be enabled. """ FeatureTransaction featureTransactio...
java
public boolean execute(Canvas target, Menu menu, MenuItem item) { FeatureTransaction featureTransaction = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction(); if (featureTransaction != null) { boolean operationCount = featureTransaction.getOperationQueue().size() > 0; if (operationCount) { ...
[ "public", "boolean", "execute", "(", "Canvas", "target", ",", "Menu", "menu", ",", "MenuItem", "item", ")", "{", "FeatureTransaction", "featureTransaction", "=", "mapWidget", ".", "getMapModel", "(", ")", ".", "getFeatureEditor", "(", ")", ".", "getFeatureTransa...
This function tries to find out whether or not this menu item should be enabled. Only if there are more then 1 operations in the feature transaction operation queue, will this menu item be enabled.
[ "This", "function", "tries", "to", "find", "out", "whether", "or", "not", "this", "menu", "item", "should", "be", "enabled", ".", "Only", "if", "there", "are", "more", "then", "1", "operations", "in", "the", "feature", "transaction", "operation", "queue", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/UndoOperationAction.java#L75-L92
google/flogger
api/src/main/java/com/google/common/flogger/backend/FormatOptions.java
FormatOptions.filter
public FormatOptions filter(int allowedFlags, boolean allowWidth, boolean allowPrecision) { """ Returns a possibly new FormatOptions instance possibly containing a subset of the formatting information. This is useful if a backend implementation wishes to create formatting options that ignore some of the specifie...
java
public FormatOptions filter(int allowedFlags, boolean allowWidth, boolean allowPrecision) { if (isDefault()) { return this; } int newFlags = allowedFlags & flags; int newWidth = allowWidth ? width : UNSET; int newPrecision = allowPrecision ? precision : UNSET; // Remember that we must neve...
[ "public", "FormatOptions", "filter", "(", "int", "allowedFlags", ",", "boolean", "allowWidth", ",", "boolean", "allowPrecision", ")", "{", "if", "(", "isDefault", "(", ")", ")", "{", "return", "this", ";", "}", "int", "newFlags", "=", "allowedFlags", "&", ...
Returns a possibly new FormatOptions instance possibly containing a subset of the formatting information. This is useful if a backend implementation wishes to create formatting options that ignore some of the specified formatting information. @param allowedFlags A mask of flag values to be retained in the returned ins...
[ "Returns", "a", "possibly", "new", "FormatOptions", "instance", "possibly", "containing", "a", "subset", "of", "the", "formatting", "information", ".", "This", "is", "useful", "if", "a", "backend", "implementation", "wishes", "to", "create", "formatting", "options...
train
https://github.com/google/flogger/blob/a164967a93a9f4ce92f34319fc0cc7c91a57321c/api/src/main/java/com/google/common/flogger/backend/FormatOptions.java#L278-L297
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectStringOrNumberOrSymbol
void expectStringOrNumberOrSymbol(Node n, JSType type, String msg) { """ Expect the type to be a number or string or symbol, or a type convertible to a number or string. If the expectation is not met, issue a warning at the provided node's source code position. """ if (!type.matchesNumberContext() ...
java
void expectStringOrNumberOrSymbol(Node n, JSType type, String msg) { if (!type.matchesNumberContext() && !type.matchesStringContext() && !type.matchesSymbolContext()) { mismatch(n, msg, type, NUMBER_STRING_SYMBOL); } else { expectStringOrNumberOrSymbolStrict(n, type, msg); } }
[ "void", "expectStringOrNumberOrSymbol", "(", "Node", "n", ",", "JSType", "type", ",", "String", "msg", ")", "{", "if", "(", "!", "type", ".", "matchesNumberContext", "(", ")", "&&", "!", "type", ".", "matchesStringContext", "(", ")", "&&", "!", "type", "...
Expect the type to be a number or string or symbol, or a type convertible to a number or string. If the expectation is not met, issue a warning at the provided node's source code position.
[ "Expect", "the", "type", "to", "be", "a", "number", "or", "string", "or", "symbol", "or", "a", "type", "convertible", "to", "a", "number", "or", "string", ".", "If", "the", "expectation", "is", "not", "met", "issue", "a", "warning", "at", "the", "provi...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L456-L464
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/utils/TernaryPatcher.java
TernaryPatcher.post
public static void post(OpcodeStack stack, int opcode) { """ called after the execution of the parent OpcodeStack.sawOpcode, to restore the user values after the GOTO or GOTO_W's mergeJumps were processed @param stack the OpcodeStack with the items containing user values @param opcode the opcode currently se...
java
public static void post(OpcodeStack stack, int opcode) { if (!sawGOTO || (opcode == Const.GOTO) || (opcode == Const.GOTO_W)) { return; } int depth = stack.getStackDepth(); for (int i = 0; i < depth && i < userValues.size(); i++) { OpcodeStack.Item item = stack.get...
[ "public", "static", "void", "post", "(", "OpcodeStack", "stack", ",", "int", "opcode", ")", "{", "if", "(", "!", "sawGOTO", "||", "(", "opcode", "==", "Const", ".", "GOTO", ")", "||", "(", "opcode", "==", "Const", ".", "GOTO_W", ")", ")", "{", "ret...
called after the execution of the parent OpcodeStack.sawOpcode, to restore the user values after the GOTO or GOTO_W's mergeJumps were processed @param stack the OpcodeStack with the items containing user values @param opcode the opcode currently seen
[ "called", "after", "the", "execution", "of", "the", "parent", "OpcodeStack", ".", "sawOpcode", "to", "restore", "the", "user", "values", "after", "the", "GOTO", "or", "GOTO_W", "s", "mergeJumps", "were", "processed" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/utils/TernaryPatcher.java#L76-L90
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java
AbstractNotification.appendText
private void appendText(StringBuilder sb, String text, String format) { """ Appends a text element if it is not null or empty. @param sb String builder. @param text Text value to append. @param format Format specifier. """ if (text != null && !text.isEmpty()) { format = "@vistanotifica...
java
private void appendText(StringBuilder sb, String text, String format) { if (text != null && !text.isEmpty()) { format = "@vistanotification.detail." + format + ".label"; sb.append(StrUtil.formatMessage(format, text)).append("\n"); } }
[ "private", "void", "appendText", "(", "StringBuilder", "sb", ",", "String", "text", ",", "String", "format", ")", "{", "if", "(", "text", "!=", "null", "&&", "!", "text", ".", "isEmpty", "(", ")", ")", "{", "format", "=", "\"@vistanotification.detail.\"", ...
Appends a text element if it is not null or empty. @param sb String builder. @param text Text value to append. @param format Format specifier.
[ "Appends", "a", "text", "element", "if", "it", "is", "not", "null", "or", "empty", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java#L327-L332
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_network_public_GET
public ArrayList<OvhNetwork> project_serviceName_network_public_GET(String serviceName) throws IOException { """ Get public networks REST: GET /cloud/project/{serviceName}/network/public @param serviceName [required] Service name """ String qPath = "/cloud/project/{serviceName}/network/public"; StringB...
java
public ArrayList<OvhNetwork> project_serviceName_network_public_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/network/public"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t7); }
[ "public", "ArrayList", "<", "OvhNetwork", ">", "project_serviceName_network_public_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/network/public\"", ";", "StringBuilder", "sb", "=", "path", "(...
Get public networks REST: GET /cloud/project/{serviceName}/network/public @param serviceName [required] Service name
[ "Get", "public", "networks" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L861-L866
epam/parso
src/main/java/com/epam/parso/impl/SasFileParser.java
SasFileParser.processPageMetadata
private void processPageMetadata(int bitOffset, List<SubheaderPointer> subheaderPointers) throws IOException { """ The method to parse and read metadata of a page, used for pages of the {@link SasFileConstants#PAGE_META_TYPE_1} {@link SasFileConstants#PAGE_META_TYPE_1}, and {@link SasFileConstants#PAG...
java
private void processPageMetadata(int bitOffset, List<SubheaderPointer> subheaderPointers) throws IOException { subheaderPointers.clear(); for (int subheaderPointerIndex = 0; subheaderPointerIndex < currentPageSubheadersCount; subheaderPointerIndex++) { SubheaderPoint...
[ "private", "void", "processPageMetadata", "(", "int", "bitOffset", ",", "List", "<", "SubheaderPointer", ">", "subheaderPointers", ")", "throws", "IOException", "{", "subheaderPointers", ".", "clear", "(", ")", ";", "for", "(", "int", "subheaderPointerIndex", "=",...
The method to parse and read metadata of a page, used for pages of the {@link SasFileConstants#PAGE_META_TYPE_1} {@link SasFileConstants#PAGE_META_TYPE_1}, and {@link SasFileConstants#PAGE_MIX_TYPE} types. The method goes through subheaders, one by one, and calls the processing functions depending on their signatures. ...
[ "The", "method", "to", "parse", "and", "read", "metadata", "of", "a", "page", "used", "for", "pages", "of", "the", "{", "@link", "SasFileConstants#PAGE_META_TYPE_1", "}", "{", "@link", "SasFileConstants#PAGE_META_TYPE_1", "}", "and", "{", "@link", "SasFileConstant...
train
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/SasFileParser.java#L383-L409
icode/ameba-utils
src/main/java/ameba/util/Assert.java
Assert.notEmpty
public static void notEmpty(Map map, String message) { """ Assert that a Map has entries; that is, it must not be {@code null} and must have at least one entry. <pre class="code">Assert.notEmpty(map, "Map must have entries");</pre> @param map the map to check @param message the exception message to use if th...
java
public static void notEmpty(Map map, String message) { if (MapUtils.isEmpty(map)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "notEmpty", "(", "Map", "map", ",", "String", "message", ")", "{", "if", "(", "MapUtils", ".", "isEmpty", "(", "map", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that a Map has entries; that is, it must not be {@code null} and must have at least one entry. <pre class="code">Assert.notEmpty(map, "Map must have entries");</pre> @param map the map to check @param message the exception message to use if the assertion fails @throws java.lang.IllegalArgumentException if the m...
[ "Assert", "that", "a", "Map", "has", "entries", ";", "that", "is", "it", "must", "not", "be", "{", "@code", "null", "}", "and", "must", "have", "at", "least", "one", "entry", ".", "<pre", "class", "=", "code", ">", "Assert", ".", "notEmpty", "(", "...
train
https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/Assert.java#L298-L302
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java
StaxUtils.readQName
public static QName readQName(XMLStreamReader reader) throws XMLStreamException { """ Reads a QName from the element text. Reader must be positioned at the start tag. """ String value = reader.getElementText(); if (value == null) { return null; } value = value.trim(...
java
public static QName readQName(XMLStreamReader reader) throws XMLStreamException { String value = reader.getElementText(); if (value == null) { return null; } value = value.trim(); int index = value.indexOf(":"); if (index == -1) { return new QNam...
[ "public", "static", "QName", "readQName", "(", "XMLStreamReader", "reader", ")", "throws", "XMLStreamException", "{", "String", "value", "=", "reader", ".", "getElementText", "(", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", ...
Reads a QName from the element text. Reader must be positioned at the start tag.
[ "Reads", "a", "QName", "from", "the", "element", "text", ".", "Reader", "must", "be", "positioned", "at", "the", "start", "tag", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java#L1851-L1877
coursera/courier
generator-api/src/main/java/org/coursera/courier/api/CourierTemplateSpecGenerator.java
CourierTemplateSpecGenerator.enclosingClassAndMemberNameToString
private static String enclosingClassAndMemberNameToString(ClassTemplateSpec enclosingClass, String memberName) { """ /* Generate human consumable representation of enclosing class and field name. """ final StringBuilder sb = new StringBuilder(); if (memberName != null) { sb.append(" in "); ...
java
private static String enclosingClassAndMemberNameToString(ClassTemplateSpec enclosingClass, String memberName) { final StringBuilder sb = new StringBuilder(); if (memberName != null) { sb.append(" in "); sb.append(memberName); } if (enclosingClass != null) { sb.append(" in ")...
[ "private", "static", "String", "enclosingClassAndMemberNameToString", "(", "ClassTemplateSpec", "enclosingClass", ",", "String", "memberName", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "memberName", "!=", "null"...
/* Generate human consumable representation of enclosing class and field name.
[ "/", "*", "Generate", "human", "consumable", "representation", "of", "enclosing", "class", "and", "field", "name", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/generator-api/src/main/java/org/coursera/courier/api/CourierTemplateSpecGenerator.java#L268-L282
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java
AbstractClassFileWriter.generateServiceDescriptor
protected void generateServiceDescriptor(String className, GeneratedFile generatedFile) throws IOException { """ Generates a service discovery for the given class name and file. @param className The class name @param generatedFile The generated file @throws IOException An exception if an error occurs ...
java
protected void generateServiceDescriptor(String className, GeneratedFile generatedFile) throws IOException { CharSequence contents = generatedFile.getTextContent(); if (contents != null) { String[] entries = contents.toString().split("\\n"); if (!Arrays.asList(entries).contains(c...
[ "protected", "void", "generateServiceDescriptor", "(", "String", "className", ",", "GeneratedFile", "generatedFile", ")", "throws", "IOException", "{", "CharSequence", "contents", "=", "generatedFile", ".", "getTextContent", "(", ")", ";", "if", "(", "contents", "!=...
Generates a service discovery for the given class name and file. @param className The class name @param generatedFile The generated file @throws IOException An exception if an error occurs
[ "Generates", "a", "service", "discovery", "for", "the", "given", "class", "name", "and", "file", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java#L1086-L1101
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.jreFile
public static boolean jreFile(final File file) { """ Determines if the file is a file from the Java runtime and exists. @param file File to test. @return TRUE if the file is in the 'java.home' directory. """ final String javaHome = System.getProperty("java.home"); try { re...
java
public static boolean jreFile(final File file) { final String javaHome = System.getProperty("java.home"); try { return file.getCanonicalPath().startsWith(javaHome) && file.isFile(); } catch (final IOException ex) { throw new RuntimeException("Error reading canonical ...
[ "public", "static", "boolean", "jreFile", "(", "final", "File", "file", ")", "{", "final", "String", "javaHome", "=", "System", ".", "getProperty", "(", "\"java.home\"", ")", ";", "try", "{", "return", "file", ".", "getCanonicalPath", "(", ")", ".", "start...
Determines if the file is a file from the Java runtime and exists. @param file File to test. @return TRUE if the file is in the 'java.home' directory.
[ "Determines", "if", "the", "file", "is", "a", "file", "from", "the", "Java", "runtime", "and", "exists", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L1625-L1632
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Utilities.java
Utilities.findElement
public static WebElement findElement(PageElement element, Object... args) { """ Find the first {@link WebElement} using the given method. This method is affected by the 'implicit wait' times in force at the time of execution. The findElement(..) invocation will return a matching row, or try again repeatedly unti...
java
public static WebElement findElement(PageElement element, Object... args) { return Context.getDriver().findElement(getLocator(element.getPage().getApplication(), element.getPage().getPageKey() + element.getKey(), args)); }
[ "public", "static", "WebElement", "findElement", "(", "PageElement", "element", ",", "Object", "...", "args", ")", "{", "return", "Context", ".", "getDriver", "(", ")", ".", "findElement", "(", "getLocator", "(", "element", ".", "getPage", "(", ")", ".", "...
Find the first {@link WebElement} using the given method. This method is affected by the 'implicit wait' times in force at the time of execution. The findElement(..) invocation will return a matching row, or try again repeatedly until the configured timeout is reached. @param element is PageElement find in page. @para...
[ "Find", "the", "first", "{", "@link", "WebElement", "}", "using", "the", "given", "method", ".", "This", "method", "is", "affected", "by", "the", "implicit", "wait", "times", "in", "force", "at", "the", "time", "of", "execution", ".", "The", "findElement",...
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Utilities.java#L193-L195
kkopacz/agiso-tempel
bundles/tempel-core/src/main/java/org/agiso/tempel/core/DefaultTemplateExecutor.java
DefaultTemplateExecutor.executeTemplate
@Override public void executeTemplate(String templateName, Map<String, Object> properties, String workDir) { """ Uruchamia proces generacji treści w oparciu o szablon. @param templateName Szablon do uruchomienia. @param properties Mapa parametrów uruchomienia szablonu. @param workDir Ścieżka do katalogu robo...
java
@Override public void executeTemplate(String templateName, Map<String, Object> properties, String workDir) { // Pobieranie definicji szablonu do użycia: Template<?> template = templateProvider.get(templateName, null, null, null); if(template == null) { throw new RuntimeException("Nie znaleziono szablonu " + t...
[ "@", "Override", "public", "void", "executeTemplate", "(", "String", "templateName", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "workDir", ")", "{", "// Pobieranie definicji szablonu do użycia:", "Template", "<", "?", ">", "templat...
Uruchamia proces generacji treści w oparciu o szablon. @param templateName Szablon do uruchomienia. @param properties Mapa parametrów uruchomienia szablonu. @param workDir Ścieżka do katalogu roboczego.
[ "Uruchamia", "proces", "generacji", "treści", "w", "oparciu", "o", "szablon", "." ]
train
https://github.com/kkopacz/agiso-tempel/blob/ff7a96153153b6bc07212d776816b87d9538f6fa/bundles/tempel-core/src/main/java/org/agiso/tempel/core/DefaultTemplateExecutor.java#L125-L144
kiegroup/drools
drools-core/src/main/java/org/drools/core/factmodel/DefaultBeanClassBuilder.java
DefaultBeanClassBuilder.buildDynamicPropertyMap
protected void buildDynamicPropertyMap( ClassWriter cw, ClassDefinition def ) { """ A traitable class is a special class with support for dynamic properties and types. This method builds the property map, containing the key/values pairs to implement any property defined in a trait interface but not supported b...
java
protected void buildDynamicPropertyMap( ClassWriter cw, ClassDefinition def ) { FieldVisitor fv = cw.visitField( Opcodes.ACC_PRIVATE, TraitableBean.MAP_FIELD_NAME, Type.getDescriptor( Map.class ) , "Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;", ...
[ "protected", "void", "buildDynamicPropertyMap", "(", "ClassWriter", "cw", ",", "ClassDefinition", "def", ")", "{", "FieldVisitor", "fv", "=", "cw", ".", "visitField", "(", "Opcodes", ".", "ACC_PRIVATE", ",", "TraitableBean", ".", "MAP_FIELD_NAME", ",", "Type", "...
A traitable class is a special class with support for dynamic properties and types. This method builds the property map, containing the key/values pairs to implement any property defined in a trait interface but not supported by the traited class fields. @param cw @param def
[ "A", "traitable", "class", "is", "a", "special", "class", "with", "support", "for", "dynamic", "properties", "and", "types", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/factmodel/DefaultBeanClassBuilder.java#L765-L801
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.loadClass
Symbol loadClass(Env<AttrContext> env, Name name) { """ Load toplevel or member class with given fully qualified name and verify that it is accessible. @param env The current environment. @param name The fully qualified name of the class to be loaded. """ try { ClassSymbol c =...
java
Symbol loadClass(Env<AttrContext> env, Name name) { try { ClassSymbol c = reader.loadClass(name); return isAccessible(env, c) ? c : new AccessError(c); } catch (ClassReader.BadClassFile err) { throw err; } catch (CompletionFailure ex) { return type...
[ "Symbol", "loadClass", "(", "Env", "<", "AttrContext", ">", "env", ",", "Name", "name", ")", "{", "try", "{", "ClassSymbol", "c", "=", "reader", ".", "loadClass", "(", "name", ")", ";", "return", "isAccessible", "(", "env", ",", "c", ")", "?", "c", ...
Load toplevel or member class with given fully qualified name and verify that it is accessible. @param env The current environment. @param name The fully qualified name of the class to be loaded.
[ "Load", "toplevel", "or", "member", "class", "with", "given", "fully", "qualified", "name", "and", "verify", "that", "it", "is", "accessible", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Resolve.java#L1905-L1914
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.elementDecl
public void elementDecl (String name, String model) throws SAXException { """ Report an element type declaration. <p>The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that ...
java
public void elementDecl (String name, String model) throws SAXException { if (null != m_resultDeclHandler) m_resultDeclHandler.elementDecl(name, model); }
[ "public", "void", "elementDecl", "(", "String", "name", ",", "String", "model", ")", "throws", "SAXException", "{", "if", "(", "null", "!=", "m_resultDeclHandler", ")", "m_resultDeclHandler", ".", "elementDecl", "(", "name", ",", "model", ")", ";", "}" ]
Report an element type declaration. <p>The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all whitespace is removed,and will include the enclosing parentheses.</p> @param name The eleme...
[ "Report", "an", "element", "type", "declaration", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L1342-L1347
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java
FieldInfo.setValue
public void setValue(Object obj, Object value) { """ Sets this field in the given object to the given value using reflection. <p>If the field is final, it checks that the value being set is identical to the existing value. """ if (setters.length > 0) { for (Method method : setters) { if (...
java
public void setValue(Object obj, Object value) { if (setters.length > 0) { for (Method method : setters) { if (value == null || method.getParameterTypes()[0].isAssignableFrom(value.getClass())) { try { method.invoke(obj, value); return; } catch (IllegalAcces...
[ "public", "void", "setValue", "(", "Object", "obj", ",", "Object", "value", ")", "{", "if", "(", "setters", ".", "length", ">", "0", ")", "{", "for", "(", "Method", "method", ":", "setters", ")", "{", "if", "(", "value", "==", "null", "||", "method...
Sets this field in the given object to the given value using reflection. <p>If the field is final, it checks that the value being set is identical to the existing value.
[ "Sets", "this", "field", "in", "the", "given", "object", "to", "the", "given", "value", "using", "reflection", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java#L219-L233
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java
AbstractRepositoryClient.getAssetsWithUnboundedMaxVersion
@Override public Collection<Asset> getAssetsWithUnboundedMaxVersion(final Collection<ResourceType> types, final Collection<String> rightProductIds, final Visibility visibility) throws IOException, RequestFailureException { """ This method will retur...
java
@Override public Collection<Asset> getAssetsWithUnboundedMaxVersion(final Collection<ResourceType> types, final Collection<String> rightProductIds, final Visibility visibility) throws IOException, RequestFailureException { return getFilteredAsset...
[ "@", "Override", "public", "Collection", "<", "Asset", ">", "getAssetsWithUnboundedMaxVersion", "(", "final", "Collection", "<", "ResourceType", ">", "types", ",", "final", "Collection", "<", "String", ">", "rightProductIds", ",", "final", "Visibility", "visibility"...
This method will return all of the assets matching specific filters in Massive that do not have a maximum version in their applies to filter info. It will just return a summary of each asset and not include any {@link Attachment}s. @param types The types to look for or <code>null</code> will return all types @param pr...
[ "This", "method", "will", "return", "all", "of", "the", "assets", "matching", "specific", "filters", "in", "Massive", "that", "do", "not", "have", "a", "maximum", "version", "in", "their", "applies", "to", "filter", "info", ".", "It", "will", "just", "retu...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java#L67-L71
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java
RefinePolygonToGrayLine.optimize
protected boolean optimize( Point2D_F64 a , Point2D_F64 b , LineGeneral2D_F64 found ) { """ Fits a line defined by the two points. When fitting the line the weight of the edge is used to determine how influential the point is @param a Corner point in image coordinates. @param b Corner point in image coordinates...
java
protected boolean optimize( Point2D_F64 a , Point2D_F64 b , LineGeneral2D_F64 found ) { computeAdjustedEndPoints(a, b); return snapToEdge.refine(adjA, adjB, found); }
[ "protected", "boolean", "optimize", "(", "Point2D_F64", "a", ",", "Point2D_F64", "b", ",", "LineGeneral2D_F64", "found", ")", "{", "computeAdjustedEndPoints", "(", "a", ",", "b", ")", ";", "return", "snapToEdge", ".", "refine", "(", "adjA", ",", "adjB", ",",...
Fits a line defined by the two points. When fitting the line the weight of the edge is used to determine how influential the point is @param a Corner point in image coordinates. @param b Corner point in image coordinates. @param found (output) Line in image coordinates @return true if successful or false if it failed
[ "Fits", "a", "line", "defined", "by", "the", "two", "points", ".", "When", "fitting", "the", "line", "the", "weight", "of", "the", "edge", "is", "used", "to", "determine", "how", "influential", "the", "point", "is" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/RefinePolygonToGrayLine.java#L271-L276
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/Timecode.java
Timecode.getSmpteTimecode
@Deprecated public static final Timecode getSmpteTimecode(final String smpte, final Timebase timebase) { """ Part an SMPTE formatted timecode (<code>[-][dd:]hh:mm:ss:ff</code> -or <code>[-][dd:]hh:mm:ss;ff</code> for drop-frame timecode alongside a timebase @param smpte @param timebase @return """ ...
java
@Deprecated public static final Timecode getSmpteTimecode(final String smpte, final Timebase timebase) { return getInstance(smpte, timebase); }
[ "@", "Deprecated", "public", "static", "final", "Timecode", "getSmpteTimecode", "(", "final", "String", "smpte", ",", "final", "Timebase", "timebase", ")", "{", "return", "getInstance", "(", "smpte", ",", "timebase", ")", ";", "}" ]
Part an SMPTE formatted timecode (<code>[-][dd:]hh:mm:ss:ff</code> -or <code>[-][dd:]hh:mm:ss;ff</code> for drop-frame timecode alongside a timebase @param smpte @param timebase @return
[ "Part", "an", "SMPTE", "formatted", "timecode", "(", "<code", ">", "[", "-", "]", "[", "dd", ":", "]", "hh", ":", "mm", ":", "ss", ":", "ff<", "/", "code", ">", "-", "or", "<code", ">", "[", "-", "]", "[", "dd", ":", "]", "hh", ":", "mm", ...
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/Timecode.java#L837-L841
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSSourceAuditor.java
XDSSourceAuditor.auditProvideAndRegisterEvent
protected void auditProvideAndRegisterEvent( IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String repositoryEndpointUri, String userName, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse, List<CodedValueType> u...
java
protected void auditProvideAndRegisterEvent( IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, String repositoryEndpointUri, String userName, String submissionSetUniqueId, String patientId, List<CodedValueType> purposesOfUse, List<CodedValueType> u...
[ "protected", "void", "auditProvideAndRegisterEvent", "(", "IHETransactionEventTypeCodes", "transaction", ",", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "repositoryEndpointUri", ",", "String", "userName", ",", "String", "submissionSetUniqueId", ",", "String", ...
Generically sends audit messages for XDS Document Source Provide And Register Document Set events @param transaction The specific IHE Transaction (ITI-15 or ITI-41) @param eventOutcome The event outcome indicator @param repositoryEndpointUri The endpoint of the repository in this transaction @param submissionSetUnique...
[ "Generically", "sends", "audit", "messages", "for", "XDS", "Document", "Source", "Provide", "And", "Register", "Document", "Set", "events" ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSSourceAuditor.java#L110-L138
camunda/camunda-bpm-platform
engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/jsf/TaskForm.java
TaskForm.startProcessInstanceByIdForm
@Deprecated public void startProcessInstanceByIdForm(String processDefinitionId, String callbackUrl) { """ @deprecated use {@link startProcessInstanceByIdForm()} instead @param processDefinitionId @param callbackUrl """ this.url = callbackUrl; this.processDefinitionId = processDefinitionId; b...
java
@Deprecated public void startProcessInstanceByIdForm(String processDefinitionId, String callbackUrl) { this.url = callbackUrl; this.processDefinitionId = processDefinitionId; beginConversation(); }
[ "@", "Deprecated", "public", "void", "startProcessInstanceByIdForm", "(", "String", "processDefinitionId", ",", "String", "callbackUrl", ")", "{", "this", ".", "url", "=", "callbackUrl", ";", "this", ".", "processDefinitionId", "=", "processDefinitionId", ";", "begi...
@deprecated use {@link startProcessInstanceByIdForm()} instead @param processDefinitionId @param callbackUrl
[ "@deprecated", "use", "{", "@link", "startProcessInstanceByIdForm", "()", "}", "instead" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/jsf/TaskForm.java#L127-L132
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java
PropertyUtils.getPropertyDescriptor
private static PropertyDescriptor getPropertyDescriptor(Object bean, String name) { """ <p> Retrieve the property descriptor for the specified property of the specified bean, or return <code>null</code> if there is no such descriptor. This method resolves indexed and nested property references in the same mann...
java
private static PropertyDescriptor getPropertyDescriptor(Object bean, String name) { PropertyDescriptor descriptor = null; PropertyDescriptor descriptors[] = getPropertyDescriptors(bean.getClass()); if (descriptors != null) { for (PropertyDescriptor descriptor1 : descriptors) { if (name.equals(descriptor1....
[ "private", "static", "PropertyDescriptor", "getPropertyDescriptor", "(", "Object", "bean", ",", "String", "name", ")", "{", "PropertyDescriptor", "descriptor", "=", "null", ";", "PropertyDescriptor", "descriptors", "[", "]", "=", "getPropertyDescriptors", "(", "bean",...
<p> Retrieve the property descriptor for the specified property of the specified bean, or return <code>null</code> if there is no such descriptor. This method resolves indexed and nested property references in the same manner as other methods in this class, except that if the last (or only) name element is indexed, the...
[ "<p", ">", "Retrieve", "the", "property", "descriptor", "for", "the", "specified", "property", "of", "the", "specified", "bean", "or", "return", "<code", ">", "null<", "/", "code", ">", "if", "there", "is", "no", "such", "descriptor", ".", "This", "method"...
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/PropertyUtils.java#L116-L128
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.lastIndexOf
public int lastIndexOf(final char ch, int startIndex) { """ Searches the string builder to find the last reference to the specified char. @param ch the character to find @param startIndex the index to start at, invalid index rounded to edge @return the last index of the character, or -1 if not found """...
java
public int lastIndexOf(final char ch, int startIndex) { startIndex = (startIndex >= size ? size - 1 : startIndex); if (startIndex < 0) { return -1; } for (int i = startIndex; i >= 0; i--) { if (buffer[i] == ch) { return i; } } ...
[ "public", "int", "lastIndexOf", "(", "final", "char", "ch", ",", "int", "startIndex", ")", "{", "startIndex", "=", "(", "startIndex", ">=", "size", "?", "size", "-", "1", ":", "startIndex", ")", ";", "if", "(", "startIndex", "<", "0", ")", "{", "retu...
Searches the string builder to find the last reference to the specified char. @param ch the character to find @param startIndex the index to start at, invalid index rounded to edge @return the last index of the character, or -1 if not found
[ "Searches", "the", "string", "builder", "to", "find", "the", "last", "reference", "to", "the", "specified", "char", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L2541-L2552
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitConfigMonitor.java
GitConfigMonitor.addChange
@Override public void addChange(DiffEntry change) { """ Add a {@link FlowSpec} for an added, updated, or modified flow config @param change """ if (checkConfigFilePath(change.getNewPath())) { Path configFilePath = new Path(this.repositoryDir, change.getNewPath()); try { Config flowC...
java
@Override public void addChange(DiffEntry change) { if (checkConfigFilePath(change.getNewPath())) { Path configFilePath = new Path(this.repositoryDir, change.getNewPath()); try { Config flowConfig = loadConfigFileWithFlowNameOverrides(configFilePath); this.flowCatalog.put(FlowSpec.bu...
[ "@", "Override", "public", "void", "addChange", "(", "DiffEntry", "change", ")", "{", "if", "(", "checkConfigFilePath", "(", "change", ".", "getNewPath", "(", ")", ")", ")", "{", "Path", "configFilePath", "=", "new", "Path", "(", "this", ".", "repositoryDi...
Add a {@link FlowSpec} for an added, updated, or modified flow config @param change
[ "Add", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitConfigMonitor.java#L94-L111
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/clienthandler/ClientEventHandler.java
ClientEventHandler.checkUserAgent
private Object checkUserAgent(RequestResponseClass clazz, ApiUser userAgent) { """ For each listener, we may use a class of user agent, so we need check it @param clazz structure of listener class @param userAgent user agent object @return instance of user agent """ if(clazz.getUserClass().isAssig...
java
private Object checkUserAgent(RequestResponseClass clazz, ApiUser userAgent) { if(clazz.getUserClass().isAssignableFrom(userAgent.getClass())) return userAgent; return UserAgentUtil.getGameUser(userAgent, clazz.getUserClass()); }
[ "private", "Object", "checkUserAgent", "(", "RequestResponseClass", "clazz", ",", "ApiUser", "userAgent", ")", "{", "if", "(", "clazz", ".", "getUserClass", "(", ")", ".", "isAssignableFrom", "(", "userAgent", ".", "getClass", "(", ")", ")", ")", "return", "...
For each listener, we may use a class of user agent, so we need check it @param clazz structure of listener class @param userAgent user agent object @return instance of user agent
[ "For", "each", "listener", "we", "may", "use", "a", "class", "of", "user", "agent", "so", "we", "need", "check", "it" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/clienthandler/ClientEventHandler.java#L133-L137
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/producible/ProducibleConfig.java
ProducibleConfig.imports
public static ProducibleConfig imports(Xml root) { """ Create the producible data from node. @param root The root reference (must not be <code>null</code>). @return The producible data. @throws LionEngineException If unable to read node. """ Check.notNull(root); final Xml node = root.g...
java
public static ProducibleConfig imports(Xml root) { Check.notNull(root); final Xml node = root.getChild(NODE_PRODUCIBLE); final SizeConfig size = SizeConfig.imports(root); final int time = node.readInteger(ATT_STEPS); return new ProducibleConfig(time, size.getWidth()...
[ "public", "static", "ProducibleConfig", "imports", "(", "Xml", "root", ")", "{", "Check", ".", "notNull", "(", "root", ")", ";", "final", "Xml", "node", "=", "root", ".", "getChild", "(", "NODE_PRODUCIBLE", ")", ";", "final", "SizeConfig", "size", "=", "...
Create the producible data from node. @param root The root reference (must not be <code>null</code>). @return The producible data. @throws LionEngineException If unable to read node.
[ "Create", "the", "producible", "data", "from", "node", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/producible/ProducibleConfig.java#L63-L72
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/ping.java
ping.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ ping_responses result = (ping_responses) service.get_payload_formatter(...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ping_responses result = (ping_responses) service.get_payload_formatter().string_to_resource(ping_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS)...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ping_responses", "result", "=", "(", "ping_responses", ")", "service", ".", "get_payload_formatter", "(", ...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/ping.java#L203-L220
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSUtils.java
COSUtils.translateException
public static IOException translateException(String operation, Path path, AmazonClientException exception) { """ Translate an exception raised in an operation into an IOException. The specific type of IOException depends on the class of {@link AmazonClientException} passed in, and any status codes included...
java
public static IOException translateException(String operation, Path path, AmazonClientException exception) { return translateException(operation, path.toString(), exception); }
[ "public", "static", "IOException", "translateException", "(", "String", "operation", ",", "Path", "path", ",", "AmazonClientException", "exception", ")", "{", "return", "translateException", "(", "operation", ",", "path", ".", "toString", "(", ")", ",", "exception...
Translate an exception raised in an operation into an IOException. The specific type of IOException depends on the class of {@link AmazonClientException} passed in, and any status codes included in the operation. That is: HTTP error codes are examined and can be used to build a more specific response. @param operation...
[ "Translate", "an", "exception", "raised", "in", "an", "operation", "into", "an", "IOException", ".", "The", "specific", "type", "of", "IOException", "depends", "on", "the", "class", "of", "{", "@link", "AmazonClientException", "}", "passed", "in", "and", "any"...
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSUtils.java#L72-L75
szpak/mockito-java8
src/main/java/info/solidsoft/mockito/java8/LambdaMatcher.java
LambdaMatcher.argLambdaThrowing
@Incubating public static <T> T argLambdaThrowing(ThrowingPredicate<T> throwingLambda, String description) { """ A variant of argLambda(Predicate) for lambdas declaring checked exceptions. """ return argThat(new LambdaMatcher<>(throwingLambda.uncheck(), description)); }
java
@Incubating public static <T> T argLambdaThrowing(ThrowingPredicate<T> throwingLambda, String description) { return argThat(new LambdaMatcher<>(throwingLambda.uncheck(), description)); }
[ "@", "Incubating", "public", "static", "<", "T", ">", "T", "argLambdaThrowing", "(", "ThrowingPredicate", "<", "T", ">", "throwingLambda", ",", "String", "description", ")", "{", "return", "argThat", "(", "new", "LambdaMatcher", "<>", "(", "throwingLambda", "....
A variant of argLambda(Predicate) for lambdas declaring checked exceptions.
[ "A", "variant", "of", "argLambda", "(", "Predicate", ")", "for", "lambdas", "declaring", "checked", "exceptions", "." ]
train
https://github.com/szpak/mockito-java8/blob/0aa342d5887515c185f0affaa83d4a456b0e9dab/src/main/java/info/solidsoft/mockito/java8/LambdaMatcher.java#L130-L133
diffplug/JMatIO
src/main/java/ca/mjdsystems/jmatio/io/OSArrayTag.java
OSArrayTag.writeTo
public void writeTo(DataOutputStream os) throws IOException { """ Writes tag and data to <code>DataOutputStream</code>. Wites padding if neccesary. @param os @throws IOException """ int padding; if (size<=4 && size>0) { // Use small data element format (Page 1-10 in "MATLAB 7 MAT-File Format...
java
public void writeTo(DataOutputStream os) throws IOException { int padding; if (size<=4 && size>0) { // Use small data element format (Page 1-10 in "MATLAB 7 MAT-File Format", September 2010 revision) os.writeShort(size); os.writeShort(type); padding = getPadding(data.limit(), ...
[ "public", "void", "writeTo", "(", "DataOutputStream", "os", ")", "throws", "IOException", "{", "int", "padding", ";", "if", "(", "size", "<=", "4", "&&", "size", ">", "0", ")", "{", "// Use small data element format (Page 1-10 in \"MATLAB 7 MAT-File Format\", Septembe...
Writes tag and data to <code>DataOutputStream</code>. Wites padding if neccesary. @param os @throws IOException
[ "Writes", "tag", "and", "data", "to", "<code", ">", "DataOutputStream<", "/", "code", ">", ".", "Wites", "padding", "if", "neccesary", "." ]
train
https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/io/OSArrayTag.java#L45-L74
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.authenticate
public void authenticate(URI aSite, String aLogin, char[] aPwd) { """ Register this root URI for authentication. Whenever a URL is requested that starts with this root, the credentials given are used for HTTP AUTH. Note that currently authentication information is shared across all Resty instances. This is due to...
java
public void authenticate(URI aSite, String aLogin, char[] aPwd) { rath.addSite(aSite, aLogin, aPwd); }
[ "public", "void", "authenticate", "(", "URI", "aSite", ",", "String", "aLogin", ",", "char", "[", "]", "aPwd", ")", "{", "rath", ".", "addSite", "(", "aSite", ",", "aLogin", ",", "aPwd", ")", ";", "}" ]
Register this root URI for authentication. Whenever a URL is requested that starts with this root, the credentials given are used for HTTP AUTH. Note that currently authentication information is shared across all Resty instances. This is due to the shortcomings of the java.net authentication mechanism. This might chang...
[ "Register", "this", "root", "URI", "for", "authentication", ".", "Whenever", "a", "URL", "is", "requested", "that", "starts", "with", "this", "root", "the", "credentials", "given", "are", "used", "for", "HTTP", "AUTH", ".", "Note", "that", "currently", "auth...
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L136-L138
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemDatasetRepository.java
FileSystemDatasetRepository.partitionKeyForPath
@SuppressWarnings( { """ Get a {@link org.kitesdk.data.spi.PartitionKey} corresponding to a partition's filesystem path represented as a {@link URI}. If the path is not a valid partition, then {@link IllegalArgumentException} is thrown. Note that the partition does not have to exist. @param dataset the filesys...
java
@SuppressWarnings({"unchecked", "deprecation"}) public static PartitionKey partitionKeyForPath(Dataset dataset, URI partitionPath) { Preconditions.checkState(dataset.getDescriptor().isPartitioned(), "Attempt to get a partition on a non-partitioned dataset (name:%s)", dataset.getName()); Preco...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"deprecation\"", "}", ")", "public", "static", "PartitionKey", "partitionKeyForPath", "(", "Dataset", "dataset", ",", "URI", "partitionPath", ")", "{", "Preconditions", ".", "checkState", "(", "dataset", "...
Get a {@link org.kitesdk.data.spi.PartitionKey} corresponding to a partition's filesystem path represented as a {@link URI}. If the path is not a valid partition, then {@link IllegalArgumentException} is thrown. Note that the partition does not have to exist. @param dataset the filesystem dataset @param partitionPath a...
[ "Get", "a", "{" ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemDatasetRepository.java#L332-L384
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedU8.java
InterleavedU8.get32
public int get32( int x , int y ) { """ Returns an integer formed from 4 bands. a[i]<<24 | a[i+1] << 16 | a[i+2]<<8 | a[3] @param x column @param y row @return 32 bit integer """ int i = startIndex + y*stride+x*4; return ((data[i]&0xFF) << 24) | ((data[i+1]&0xFF) << 16) | ((data[i+2]&0xFF) << 8) | (da...
java
public int get32( int x , int y ) { int i = startIndex + y*stride+x*4; return ((data[i]&0xFF) << 24) | ((data[i+1]&0xFF) << 16) | ((data[i+2]&0xFF) << 8) | (data[i+3]&0xFF); }
[ "public", "int", "get32", "(", "int", "x", ",", "int", "y", ")", "{", "int", "i", "=", "startIndex", "+", "y", "*", "stride", "+", "x", "*", "4", ";", "return", "(", "(", "data", "[", "i", "]", "&", "0xFF", ")", "<<", "24", ")", "|", "(", ...
Returns an integer formed from 4 bands. a[i]<<24 | a[i+1] << 16 | a[i+2]<<8 | a[3] @param x column @param y row @return 32 bit integer
[ "Returns", "an", "integer", "formed", "from", "4", "bands", ".", "a", "[", "i", "]", "<<24", "|", "a", "[", "i", "+", "1", "]", "<<", "16", "|", "a", "[", "i", "+", "2", "]", "<<8", "|", "a", "[", "3", "]" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedU8.java#L56-L59
johncarl81/transfuse
transfuse-api/src/main/java/org/androidtransfuse/util/InjectionUtil.java
InjectionUtil.callMethod
public static <T> T callMethod(Class<T> retClass, Class<?> targetClass, Object target, String method, Class[] argClasses, Object[] args) { """ Calls a method with the provided arguments as parameters. @param retClass the method return value @param targetClass the instance class @param target the instance cont...
java
public static <T> T callMethod(Class<T> retClass, Class<?> targetClass, Object target, String method, Class[] argClasses, Object[] args) { try { Method classMethod = targetClass.getDeclaredMethod(method, argClasses); return AccessController.doPrivileged( new SetMetho...
[ "public", "static", "<", "T", ">", "T", "callMethod", "(", "Class", "<", "T", ">", "retClass", ",", "Class", "<", "?", ">", "targetClass", ",", "Object", "target", ",", "String", "method", ",", "Class", "[", "]", "argClasses", ",", "Object", "[", "]"...
Calls a method with the provided arguments as parameters. @param retClass the method return value @param targetClass the instance class @param target the instance containing the method @param method the method name @param argClasses types of the method arguments @param args method arguments used during invocation @par...
[ "Calls", "a", "method", "with", "the", "provided", "arguments", "as", "parameters", "." ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-api/src/main/java/org/androidtransfuse/util/InjectionUtil.java#L144-L158
webjars/webjars-locator
src/main/java/org/webjars/RequireJS.java
RequireJS.requireJsConfigErrorMessage
private static String requireJsConfigErrorMessage(Map.Entry<String, String> webJar) { """ A generic error message for when the RequireJS config could not be parsed out of the WebJar's pom.xml meta-data. @param webJar A tuple (artifactId -> version) representing the WebJar. @return The error message. """ ...
java
private static String requireJsConfigErrorMessage(Map.Entry<String, String> webJar) { return "Could not read WebJar RequireJS config for: " + webJar.getKey() + " " + webJar.getValue() + "\n" + "Please file a bug at: http://github.com/webjars/" + webJar.getKey() + "/issues/new"; }
[ "private", "static", "String", "requireJsConfigErrorMessage", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "webJar", ")", "{", "return", "\"Could not read WebJar RequireJS config for: \"", "+", "webJar", ".", "getKey", "(", ")", "+", "\" \"", "+", ...
A generic error message for when the RequireJS config could not be parsed out of the WebJar's pom.xml meta-data. @param webJar A tuple (artifactId -> version) representing the WebJar. @return The error message.
[ "A", "generic", "error", "message", "for", "when", "the", "RequireJS", "config", "could", "not", "be", "parsed", "out", "of", "the", "WebJar", "s", "pom", ".", "xml", "meta", "-", "data", "." ]
train
https://github.com/webjars/webjars-locator/blob/8796fb3ff1b9ad5c0d433ecf63a60520c715e3a0/src/main/java/org/webjars/RequireJS.java#L551-L554
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/jhlabs/image/Gradient.java
Gradient.setColor
public void setColor(int n, int color) { """ Set a knot color. @param n the knot index @param color the color """ int firstColor = map[0]; int lastColor = map[256-1]; if (n > 0) for (int i = 0; i < n; i++) map[i] = ImageMath.mixColors((float)i/n, firstColor, color); if (n < 256-1) for (int ...
java
public void setColor(int n, int color) { int firstColor = map[0]; int lastColor = map[256-1]; if (n > 0) for (int i = 0; i < n; i++) map[i] = ImageMath.mixColors((float)i/n, firstColor, color); if (n < 256-1) for (int i = n; i < 256; i++) map[i] = ImageMath.mixColors((float)(i-n)/(256-n), color, l...
[ "public", "void", "setColor", "(", "int", "n", ",", "int", "color", ")", "{", "int", "firstColor", "=", "map", "[", "0", "]", ";", "int", "lastColor", "=", "map", "[", "256", "-", "1", "]", ";", "if", "(", "n", ">", "0", ")", "for", "(", "int...
Set a knot color. @param n the knot index @param color the color
[ "Set", "a", "knot", "color", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/jhlabs/image/Gradient.java#L151-L160
threerings/nenya
core/src/main/java/com/threerings/media/util/AStarPathUtil.java
AStarPathUtil.considerStep
protected static void considerStep (Info info, Node n, int x, int y, int cost) { """ Consider the step <code>(n.x, n.y)</code> to <code>(x, y)</code> for possible inclusion in the path. @param info the info object. @param n the originating node for the step. @param x the x-coordinate for the destination step...
java
protected static void considerStep (Info info, Node n, int x, int y, int cost) { // skip node if it's outside the map bounds or otherwise impassable if (!info.isStepValid(n.x, n.y, x, y)) { return; } // calculate the new cost for this node int newg = n.g + cost; ...
[ "protected", "static", "void", "considerStep", "(", "Info", "info", ",", "Node", "n", ",", "int", "x", ",", "int", "y", ",", "int", "cost", ")", "{", "// skip node if it's outside the map bounds or otherwise impassable", "if", "(", "!", "info", ".", "isStepValid...
Consider the step <code>(n.x, n.y)</code> to <code>(x, y)</code> for possible inclusion in the path. @param info the info object. @param n the originating node for the step. @param x the x-coordinate for the destination step. @param y the y-coordinate for the destination step.
[ "Consider", "the", "step", "<code", ">", "(", "n", ".", "x", "n", ".", "y", ")", "<", "/", "code", ">", "to", "<code", ">", "(", "x", "y", ")", "<", "/", "code", ">", "for", "possible", "inclusion", "in", "the", "path", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/AStarPathUtil.java#L226-L267
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.readString
private String readString(byte stringTag, String stringName, String enc) throws IOException { """ Private helper routine to read an encoded string from the input stream. @param stringTag the tag for the type of string to read @param stringName a name to display in error messages @...
java
private String readString(byte stringTag, String stringName, String enc) throws IOException { if (buffer.read() != stringTag) throw new IOException("DER input not a " + stringName + " string"); int length = getLength(buffer); ...
[ "private", "String", "readString", "(", "byte", "stringTag", ",", "String", "stringName", ",", "String", "enc", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "read", "(", ")", "!=", "stringTag", ")", "throw", "new", "IOException", "(", "\"DE...
Private helper routine to read an encoded string from the input stream. @param stringTag the tag for the type of string to read @param stringName a name to display in error messages @param enc the encoder to use to interpret the data. Should correspond to the stringTag above.
[ "Private", "helper", "routine", "to", "read", "an", "encoded", "string", "from", "the", "input", "stream", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L514-L528
appium/java-client
src/main/java/io/appium/java_client/MobileCommand.java
MobileCommand.pushFileCommand
public static Map.Entry<String, Map<String, ?>> pushFileCommand(String remotePath, byte[] base64Data) { """ This method forms a {@link java.util.Map} of parameters for the file pushing. @param remotePath Path to file to write data to on remote device @param base64Data Base64 encoded byte array of data to writ...
java
public static Map.Entry<String, Map<String, ?>> pushFileCommand(String remotePath, byte[] base64Data) { String[] parameters = new String[]{"path", "data"}; Object[] values = new Object[]{remotePath, new String(base64Data, StandardCharsets.UTF_8)}; return new AbstractMap.SimpleEntry<>(PUSH_FILE, ...
[ "public", "static", "Map", ".", "Entry", "<", "String", ",", "Map", "<", "String", ",", "?", ">", ">", "pushFileCommand", "(", "String", "remotePath", ",", "byte", "[", "]", "base64Data", ")", "{", "String", "[", "]", "parameters", "=", "new", "String"...
This method forms a {@link java.util.Map} of parameters for the file pushing. @param remotePath Path to file to write data to on remote device @param base64Data Base64 encoded byte array of data to write to remote device @return a key-value pair. The key is the command name. The value is a {@link java.util.Map} comman...
[ "This", "method", "forms", "a", "{", "@link", "java", ".", "util", ".", "Map", "}", "of", "parameters", "for", "the", "file", "pushing", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/MobileCommand.java#L480-L484
codegist/crest
core/src/main/java/org/codegist/crest/CRest.java
CRest.basicAuth
public static CRestBuilder basicAuth(String username, String password) { """ <p>Configures the resulting <b>CRest</b> instance to authenticate all requests using Basic Auth</p> @param username user name to authenticate the requests with @param password password to authenticate the requests with @return a CRestB...
java
public static CRestBuilder basicAuth(String username, String password){ return new CRestBuilder().basicAuth(username, password); }
[ "public", "static", "CRestBuilder", "basicAuth", "(", "String", "username", ",", "String", "password", ")", "{", "return", "new", "CRestBuilder", "(", ")", ".", "basicAuth", "(", "username", ",", "password", ")", ";", "}" ]
<p>Configures the resulting <b>CRest</b> instance to authenticate all requests using Basic Auth</p> @param username user name to authenticate the requests with @param password password to authenticate the requests with @return a CRestBuilder instance @see org.codegist.crest.CRestBuilder#basicAuth(String, String)
[ "<p", ">", "Configures", "the", "resulting", "<b", ">", "CRest<", "/", "b", ">", "instance", "to", "authenticate", "all", "requests", "using", "Basic", "Auth<", "/", "p", ">" ]
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/CRest.java#L207-L209
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/xml/ObjectTreeParser.java
ObjectTreeParser.invoke
private void invoke(Method method, Object instance, Object[] params) throws SlickXMLException { """ Call a method on a object @param method The method to call @param instance The objet to call the method on @param params The parameters to pass @throws SlickXMLException Indicates a failure to call or access t...
java
private void invoke(Method method, Object instance, Object[] params) throws SlickXMLException { try { method.setAccessible(true); method.invoke(instance, params); } catch (IllegalArgumentException e) { throw new SlickXMLException("Failed to invoke: "+method+" for an XML attribute, is it valid?", e); ...
[ "private", "void", "invoke", "(", "Method", "method", ",", "Object", "instance", ",", "Object", "[", "]", "params", ")", "throws", "SlickXMLException", "{", "try", "{", "method", ".", "setAccessible", "(", "true", ")", ";", "method", ".", "invoke", "(", ...
Call a method on a object @param method The method to call @param instance The objet to call the method on @param params The parameters to pass @throws SlickXMLException Indicates a failure to call or access the method
[ "Call", "a", "method", "on", "a", "object" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/xml/ObjectTreeParser.java#L450-L463
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/linear/kernelized/OSKL.java
OSKL.scoreSaveEval
private double scoreSaveEval(Vec x, List<Double> qi) { """ Computes the score and saves the results of the kernel computations in {@link #inputKEvals}. The first value in the list will be the self kernel product @param x the input vector @param qi the query information for the vector @return the dot product i...
java
private double scoreSaveEval(Vec x, List<Double> qi) { inputKEvals.clear(); inputKEvals.add(k.eval(0, 0, Arrays.asList(x), qi)); double sum = 0; for(int i = 0; i < alphas.size(); i++) { double k_ix = k.eval(i, x, qi, vecs, accelCache); inputKEvals.add(...
[ "private", "double", "scoreSaveEval", "(", "Vec", "x", ",", "List", "<", "Double", ">", "qi", ")", "{", "inputKEvals", ".", "clear", "(", ")", ";", "inputKEvals", ".", "add", "(", "k", ".", "eval", "(", "0", ",", "0", ",", "Arrays", ".", "asList", ...
Computes the score and saves the results of the kernel computations in {@link #inputKEvals}. The first value in the list will be the self kernel product @param x the input vector @param qi the query information for the vector @return the dot product in the kernel space
[ "Computes", "the", "score", "and", "saves", "the", "results", "of", "the", "kernel", "computations", "in", "{" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/kernelized/OSKL.java#L376-L388
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java
WebDriverTool.findAll
@Deprecated public List<WebElement> findAll(final By by, final Predicate<WebElement> condition) { """ Finds all elements. Uses the internal {@link WebElementFinder}, which tries to apply the specified {@code condition} until it times out. @param by the {@link By} used to locate the element @param condition ...
java
@Deprecated public List<WebElement> findAll(final By by, final Predicate<WebElement> condition) { return findElements(by, condition); }
[ "@", "Deprecated", "public", "List", "<", "WebElement", ">", "findAll", "(", "final", "By", "by", ",", "final", "Predicate", "<", "WebElement", ">", "condition", ")", "{", "return", "findElements", "(", "by", ",", "condition", ")", ";", "}" ]
Finds all elements. Uses the internal {@link WebElementFinder}, which tries to apply the specified {@code condition} until it times out. @param by the {@link By} used to locate the element @param condition a condition the found elements must meet @return the list of elements @deprecated Use {@link #findElements(By, Pr...
[ "Finds", "all", "elements", ".", "Uses", "the", "internal", "{", "@link", "WebElementFinder", "}", "which", "tries", "to", "apply", "the", "specified", "{", "@code", "condition", "}", "until", "it", "times", "out", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L226-L229
alkacon/opencms-core
src/org/opencms/xml/types/CmsXmlVfsImageValue.java
CmsXmlVfsImageValue.setParameterValue
private void setParameterValue(CmsObject cms, String key, String value) { """ Sets a parameter for the image with the provided key as name and the value.<p> @param cms the current users context @param key the parameter name to set @param value the value of the parameter """ if (m_parameters == nu...
java
private void setParameterValue(CmsObject cms, String key, String value) { if (m_parameters == null) { m_parameters = getParameterMap(getStringValue(cms)); } if (CmsStringUtil.isEmptyOrWhitespaceOnly(value) && m_parameters.containsKey(key)) { m_parameters.remove(key); ...
[ "private", "void", "setParameterValue", "(", "CmsObject", "cms", ",", "String", "key", ",", "String", "value", ")", "{", "if", "(", "m_parameters", "==", "null", ")", "{", "m_parameters", "=", "getParameterMap", "(", "getStringValue", "(", "cms", ")", ")", ...
Sets a parameter for the image with the provided key as name and the value.<p> @param cms the current users context @param key the parameter name to set @param value the value of the parameter
[ "Sets", "a", "parameter", "for", "the", "image", "with", "the", "provided", "key", "as", "name", "and", "the", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/types/CmsXmlVfsImageValue.java#L381-L394
craftercms/core
src/main/java/org/craftercms/core/xml/mergers/impl/resolvers/MetaDataMergeStrategyResolver.java
MetaDataMergeStrategyResolver.getStrategy
public DescriptorMergeStrategy getStrategy(String descriptorUrl, Document descriptorDom) throws XmlException { """ Returns a {@link DescriptorMergeStrategy} for a given descriptor. The strategy chosen is the one defined in the descriptor document. @param descriptorUrl the URL that identifies the descriptor @p...
java
public DescriptorMergeStrategy getStrategy(String descriptorUrl, Document descriptorDom) throws XmlException { if (descriptorDom != null) { Node element = descriptorDom.selectSingleNode(mergeStrategyElementXPathQuery); if (element != null) { DescriptorMergeStrategy strate...
[ "public", "DescriptorMergeStrategy", "getStrategy", "(", "String", "descriptorUrl", ",", "Document", "descriptorDom", ")", "throws", "XmlException", "{", "if", "(", "descriptorDom", "!=", "null", ")", "{", "Node", "element", "=", "descriptorDom", ".", "selectSingleN...
Returns a {@link DescriptorMergeStrategy} for a given descriptor. The strategy chosen is the one defined in the descriptor document. @param descriptorUrl the URL that identifies the descriptor @param descriptorDom the XML DOM of the descriptor @return the {@link DescriptorMergeStrategy} for the descriptor, or null if ...
[ "Returns", "a", "{", "@link", "DescriptorMergeStrategy", "}", "for", "a", "given", "descriptor", ".", "The", "strategy", "chosen", "is", "the", "one", "defined", "in", "the", "descriptor", "document", "." ]
train
https://github.com/craftercms/core/blob/d3ec74d669d3f8cfcf995177615d5f126edfa237/src/main/java/org/craftercms/core/xml/mergers/impl/resolvers/MetaDataMergeStrategyResolver.java#L60-L77
aehrc/snorocket
snorocket-core/src/main/java/au/csiro/snorocket/core/R.java
R1.getB
protected IConceptSet getB(int A, int r) { """ Returns {B | A [ r.B} or {B | (A,B) in R(r)} @param A @param r @return """ if (A >= CONCEPTS) { resizeConcepts(A); } if (r >= ROLES) { resizeRoles(r); } final int index = indexOf(A, r); ...
java
protected IConceptSet getB(int A, int r) { if (A >= CONCEPTS) { resizeConcepts(A); } if (r >= ROLES) { resizeRoles(r); } final int index = indexOf(A, r); if (null == data[index]) { data[index] = new SparseConceptSet(); ...
[ "protected", "IConceptSet", "getB", "(", "int", "A", ",", "int", "r", ")", "{", "if", "(", "A", ">=", "CONCEPTS", ")", "{", "resizeConcepts", "(", "A", ")", ";", "}", "if", "(", "r", ">=", "ROLES", ")", "{", "resizeRoles", "(", "r", ")", ";", "...
Returns {B | A [ r.B} or {B | (A,B) in R(r)} @param A @param r @return
[ "Returns", "{", "B", "|", "A", "[", "r", ".", "B", "}", "or", "{", "B", "|", "(", "A", "B", ")", "in", "R", "(", "r", ")", "}" ]
train
https://github.com/aehrc/snorocket/blob/e33c1e216f8a66d6502e3a14e80876811feedd8b/snorocket-core/src/main/java/au/csiro/snorocket/core/R.java#L143-L160
alkacon/opencms-core
src/org/opencms/flex/CmsFlexCache.java
CmsFlexCache.getCachedKey
public CmsFlexCacheKey getCachedKey(String key, CmsObject cms) { """ Returns the CmsFlexCacheKey data structure for a given key (i.e. resource name).<p> Useful if you want to show the cache key for a resources, like on the FlexCache administration page.<p> Only users with administrator permissions are allo...
java
public CmsFlexCacheKey getCachedKey(String key, CmsObject cms) { if (!isEnabled() || !OpenCms.getRoleManager().hasRole(cms, CmsRole.WORKPLACE_MANAGER)) { return null; } Object o = m_keyCache.get(key); if (o != null) { return ((CmsFlexCacheVariation)o).m_key; ...
[ "public", "CmsFlexCacheKey", "getCachedKey", "(", "String", "key", ",", "CmsObject", "cms", ")", "{", "if", "(", "!", "isEnabled", "(", ")", "||", "!", "OpenCms", ".", "getRoleManager", "(", ")", ".", "hasRole", "(", "cms", ",", "CmsRole", ".", "WORKPLAC...
Returns the CmsFlexCacheKey data structure for a given key (i.e. resource name).<p> Useful if you want to show the cache key for a resources, like on the FlexCache administration page.<p> Only users with administrator permissions are allowed to perform this operation.<p> @param key the resource name for which to loo...
[ "Returns", "the", "CmsFlexCacheKey", "data", "structure", "for", "a", "given", "key", "(", "i", ".", "e", ".", "resource", "name", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexCache.java#L504-L514
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.availabilities_GET
public ArrayList<OvhAvailabilities> availabilities_GET(OvhOvhSubsidiaryEnum country, String hardware) throws IOException { """ List the availability of dedicated server REST: GET /dedicated/server/availabilities @param country [required] The subsidiary company where the availability is requested @param hardwa...
java
public ArrayList<OvhAvailabilities> availabilities_GET(OvhOvhSubsidiaryEnum country, String hardware) throws IOException { String qPath = "/dedicated/server/availabilities"; StringBuilder sb = path(qPath); query(sb, "country", country); query(sb, "hardware", hardware); String resp = execN(qPath, "GET", sb.toS...
[ "public", "ArrayList", "<", "OvhAvailabilities", ">", "availabilities_GET", "(", "OvhOvhSubsidiaryEnum", "country", ",", "String", "hardware", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/availabilities\"", ";", "StringBuilder", "sb", ...
List the availability of dedicated server REST: GET /dedicated/server/availabilities @param country [required] The subsidiary company where the availability is requested @param hardware [required] The kind of hardware which is requested API beta
[ "List", "the", "availability", "of", "dedicated", "server" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2377-L2384
basho/riak-java-client
src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java
AnnotationUtil.getUsermetaData
public static <T> RiakUserMetadata getUsermetaData(RiakUserMetadata metaContainer, T domainObject) { """ Attempts to get the riak user metadata from a domain object by looking for a {@literal @RiakUsermeta} annotated field or getter method. @param <T> the type of the domain object @param metaContainer the Ria...
java
public static <T> RiakUserMetadata getUsermetaData(RiakUserMetadata metaContainer, T domainObject) { return AnnotationHelper.getInstance().getUsermetaData(metaContainer, domainObject); }
[ "public", "static", "<", "T", ">", "RiakUserMetadata", "getUsermetaData", "(", "RiakUserMetadata", "metaContainer", ",", "T", "domainObject", ")", "{", "return", "AnnotationHelper", ".", "getInstance", "(", ")", ".", "getUsermetaData", "(", "metaContainer", ",", "...
Attempts to get the riak user metadata from a domain object by looking for a {@literal @RiakUsermeta} annotated field or getter method. @param <T> the type of the domain object @param metaContainer the RiakUserMetadata container @param domainObject the domain object @return a Map containing the user metadata.
[ "Attempts", "to", "get", "the", "riak", "user", "metadata", "from", "a", "domain", "object", "by", "looking", "for", "a", "{", "@literal", "@RiakUsermeta", "}", "annotated", "field", "or", "getter", "method", "." ]
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/reflection/AnnotationUtil.java#L265-L268
caspervg/SC4D-LEX4J
lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java
SearchRoute.addFilter
public void addFilter(Filter filter, Object value) { """ Adds a parameter to the search operation @param filter the filter to be added @param value value of the filter to be added. String.valueOf() of this Object is used for the search. """ if (filter.getParameterClass().isInstance(value)) { ...
java
public void addFilter(Filter filter, Object value) { if (filter.getParameterClass().isInstance(value)) { parameters.put(filter.repr(), value); } else { String msg = "You need to supply the correct parameter for the " + filter + " filter. Expecting a(n) " + filt...
[ "public", "void", "addFilter", "(", "Filter", "filter", ",", "Object", "value", ")", "{", "if", "(", "filter", ".", "getParameterClass", "(", ")", ".", "isInstance", "(", "value", ")", ")", "{", "parameters", ".", "put", "(", "filter", ".", "repr", "("...
Adds a parameter to the search operation @param filter the filter to be added @param value value of the filter to be added. String.valueOf() of this Object is used for the search.
[ "Adds", "a", "parameter", "to", "the", "search", "operation" ]
train
https://github.com/caspervg/SC4D-LEX4J/blob/3d086ec70c817119a88573c2e23af27276cdb1d6/lex4j/src/main/java/net/caspervg/lex4j/route/SearchRoute.java#L45-L53