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
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java
SchemaService.defineApplication
public void defineApplication(Tenant tenant, ApplicationDefinition appDef) { """ Create the application with the given name in the given Tenant. If the given application already exists, the request is treated as an application update. If the update is successfully validated, its schema is stored in the database,...
java
public void defineApplication(Tenant tenant, ApplicationDefinition appDef) { checkServiceState(); appDef.setTenantName(tenant.getName()); ApplicationDefinition currAppDef = checkApplicationKey(appDef); StorageService storageService = verifyStorageServiceOption(currAppDef, appDef); ...
[ "public", "void", "defineApplication", "(", "Tenant", "tenant", ",", "ApplicationDefinition", "appDef", ")", "{", "checkServiceState", "(", ")", ";", "appDef", ".", "setTenantName", "(", "tenant", ".", "getName", "(", ")", ")", ";", "ApplicationDefinition", "cur...
Create the application with the given name in the given Tenant. If the given application already exists, the request is treated as an application update. If the update is successfully validated, its schema is stored in the database, and the appropriate storage service is notified to implement required physical database...
[ "Create", "the", "application", "with", "the", "given", "name", "in", "the", "given", "Tenant", ".", "If", "the", "given", "application", "already", "exists", "the", "request", "is", "treated", "as", "an", "application", "update", ".", "If", "the", "update",...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java#L134-L141
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/WebProvider.java
WebProvider.resume
public boolean resume(int requestCode, int resultCode, Intent intent) { """ Finishes the authentication flow in the WebAuthProvider @param requestCode the request code received on the onActivityResult method @param resultCode the result code received on the onActivityResult method @param intent the inte...
java
public boolean resume(int requestCode, int resultCode, Intent intent) { return WebAuthProvider.resume(requestCode, resultCode, intent); }
[ "public", "boolean", "resume", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "intent", ")", "{", "return", "WebAuthProvider", ".", "resume", "(", "requestCode", ",", "resultCode", ",", "intent", ")", ";", "}" ]
Finishes the authentication flow in the WebAuthProvider @param requestCode the request code received on the onActivityResult method @param resultCode the result code received on the onActivityResult method @param intent the intent received in the onActivityResult method. @return true if a result was expected and...
[ "Finishes", "the", "authentication", "flow", "in", "the", "WebAuthProvider" ]
train
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/WebProvider.java#L92-L94
jOOQ/jOOX
jOOX-java-6/src/main/java/org/joox/selector/CSS2XPath.java
CSS2XPath.endsWith
private static void endsWith(StringBuilder sb, String attr, String value) { """ XPath 2.0<br/><br/><code>ends-with($str1, $str2)</code><br/><br/> is equivalent to XPath 1.0<br/><br/> <code>$str2 = substring($str1, string-length($str1) - string-length($str2) + 1)</code> """ sb.append("'"); sb.a...
java
private static void endsWith(StringBuilder sb, String attr, String value) { sb.append("'"); sb.append(value.replace("'", "\\'")); sb.append("' = substring(@"); sb.append(attr); sb.append(", string-length(@"); sb.append(attr); sb.append(") - string-length('"); ...
[ "private", "static", "void", "endsWith", "(", "StringBuilder", "sb", ",", "String", "attr", ",", "String", "value", ")", "{", "sb", ".", "append", "(", "\"'\"", ")", ";", "sb", ".", "append", "(", "value", ".", "replace", "(", "\"'\"", ",", "\"\\\\'\""...
XPath 2.0<br/><br/><code>ends-with($str1, $str2)</code><br/><br/> is equivalent to XPath 1.0<br/><br/> <code>$str2 = substring($str1, string-length($str1) - string-length($str2) + 1)</code>
[ "XPath", "2", ".", "0<br", "/", ">", "<br", "/", ">", "<code", ">", "ends", "-", "with", "(", "$str1", "$str2", ")", "<", "/", "code", ">", "<br", "/", ">", "<br", "/", ">", "is", "equivalent", "to", "XPath", "1", ".", "0<br", "/", ">", "<br"...
train
https://github.com/jOOQ/jOOX/blob/3793b96f0cee126f64074da4d7fad63f91d2440e/jOOX-java-6/src/main/java/org/joox/selector/CSS2XPath.java#L219-L229
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java
SeaGlassSynthPainterImpl.paintForeground
private void paintForeground(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) { """ Paint the object's foreground. @param ctx the SynthContext. @param g the Graphics context. @param x the x location corresponding to the upper-left coordinate to paint....
java
private void paintForeground(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) { SeaGlassPainter foregroundPainter = style.getForegroundPainter(ctx); if (foregroundPainter != null) { paint(foregroundPainter, ctx, g, x, y, w, h, transform); } }
[ "private", "void", "paintForeground", "(", "SynthContext", "ctx", ",", "Graphics", "g", ",", "int", "x", ",", "int", "y", ",", "int", "w", ",", "int", "h", ",", "AffineTransform", "transform", ")", "{", "SeaGlassPainter", "foregroundPainter", "=", "style", ...
Paint the object's foreground. @param ctx the SynthContext. @param g the Graphics context. @param x the x location corresponding to the upper-left coordinate to paint. @param y the y location corresponding to the upper left coordinate to paint. @param w the width to paint. @param ...
[ "Paint", "the", "object", "s", "foreground", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java#L164-L170
classgraph/classgraph
src/main/java/io/github/classgraph/ClassInfo.java
ClassInfo.addRelatedClass
boolean addRelatedClass(final RelType relType, final ClassInfo classInfo) { """ Add a class with a given relationship type. Return whether the collection changed as a result of the call. @param relType the {@link RelType} @param classInfo the {@link ClassInfo} @return true, if successful """ Set...
java
boolean addRelatedClass(final RelType relType, final ClassInfo classInfo) { Set<ClassInfo> classInfoSet = relatedClasses.get(relType); if (classInfoSet == null) { relatedClasses.put(relType, classInfoSet = new LinkedHashSet<>(4)); } return classInfoSet.add(classInfo); }
[ "boolean", "addRelatedClass", "(", "final", "RelType", "relType", ",", "final", "ClassInfo", "classInfo", ")", "{", "Set", "<", "ClassInfo", ">", "classInfoSet", "=", "relatedClasses", ".", "get", "(", "relType", ")", ";", "if", "(", "classInfoSet", "==", "n...
Add a class with a given relationship type. Return whether the collection changed as a result of the call. @param relType the {@link RelType} @param classInfo the {@link ClassInfo} @return true, if successful
[ "Add", "a", "class", "with", "a", "given", "relationship", "type", ".", "Return", "whether", "the", "collection", "changed", "as", "a", "result", "of", "the", "call", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L287-L293
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newWasEndedBy
public WasEndedBy newWasEndedBy(QualifiedName id, QualifiedName activity, QualifiedName trigger, QualifiedName ender, XMLGregorianCalendar time, Collection<Attribute> attributes) { """ /* (non-Javadoc) @see org.openprovenance.prov.model.ModelConstructor#newWasEndedBy(org.openprovenance.model.QualifiedName, org.op...
java
public WasEndedBy newWasEndedBy(QualifiedName id, QualifiedName activity, QualifiedName trigger, QualifiedName ender, XMLGregorianCalendar time, Collection<Attribute> attributes) { WasEndedBy res=newWasEndedBy(id,activity,trigger); res.setTime(time); res.setEnder(ender); setAttributes(res, attrib...
[ "public", "WasEndedBy", "newWasEndedBy", "(", "QualifiedName", "id", ",", "QualifiedName", "activity", ",", "QualifiedName", "trigger", ",", "QualifiedName", "ender", ",", "XMLGregorianCalendar", "time", ",", "Collection", "<", "Attribute", ">", "attributes", ")", "...
/* (non-Javadoc) @see org.openprovenance.prov.model.ModelConstructor#newWasEndedBy(org.openprovenance.model.QualifiedName, org.openprovenance.model.QualifiedName, org.openprovenance.model.QualifiedName, org.openprovenance.model.QualifiedName, javax.xml.datatype.XMLGregorianCalendar, java.util.Collection)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L1270-L1276
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansInner.java
DatabaseVulnerabilityAssessmentScansInner.exportAsync
public Observable<DatabaseVulnerabilityAssessmentScansExportInner> exportAsync(String resourceGroupName, String serverName, String databaseName, String scanId) { """ Convert an existing scan result to a human readable format. If already exists nothing happens. @param resourceGroupName The name of the resource g...
java
public Observable<DatabaseVulnerabilityAssessmentScansExportInner> exportAsync(String resourceGroupName, String serverName, String databaseName, String scanId) { return exportWithServiceResponseAsync(resourceGroupName, serverName, databaseName, scanId).map(new Func1<ServiceResponse<DatabaseVulnerabilityAssessme...
[ "public", "Observable", "<", "DatabaseVulnerabilityAssessmentScansExportInner", ">", "exportAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "scanId", ")", "{", "return", "exportWithServiceResponseAsync",...
Convert an existing scan result to a human readable format. If already exists nothing happens. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName T...
[ "Convert", "an", "existing", "scan", "result", "to", "a", "human", "readable", "format", ".", "If", "already", "exists", "nothing", "happens", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansInner.java#L545-L552
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPreferences.java
CmsPreferences.buildSelectCopyFolderMode
public String buildSelectCopyFolderMode(String htmlAttributes) { """ Builds the html for the default copy folder mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default copy folder mode select box """ List<String> options = ne...
java
public String buildSelectCopyFolderMode(String htmlAttributes) { List<String> options = new ArrayList<String>(3); options.add(key(Messages.GUI_PREF_COPY_AS_SIBLINGS_0)); options.add(key(Messages.GUI_PREF_PRESERVE_SIBLINGS_RESOURCES_0)); options.add(key(Messages.GUI_PREF_COPY_AS_NEW_0));...
[ "public", "String", "buildSelectCopyFolderMode", "(", "String", "htmlAttributes", ")", "{", "List", "<", "String", ">", "options", "=", "new", "ArrayList", "<", "String", ">", "(", "3", ")", ";", "options", ".", "add", "(", "key", "(", "Messages", ".", "...
Builds the html for the default copy folder mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default copy folder mode select box
[ "Builds", "the", "html", "for", "the", "default", "copy", "folder", "mode", "select", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L607-L619
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceBuilder.java
ServiceBuilder.withStorageFactory
public ServiceBuilder withStorageFactory(Function<ComponentSetup, StorageFactory> storageFactoryCreator) { """ Attaches the given StorageFactory creator to this ServiceBuilder. The given Function will only not be invoked right away; it will be called when needed. @param storageFactoryCreator The Function to at...
java
public ServiceBuilder withStorageFactory(Function<ComponentSetup, StorageFactory> storageFactoryCreator) { Preconditions.checkNotNull(storageFactoryCreator, "storageFactoryCreator"); this.storageFactoryCreator = storageFactoryCreator; return this; }
[ "public", "ServiceBuilder", "withStorageFactory", "(", "Function", "<", "ComponentSetup", ",", "StorageFactory", ">", "storageFactoryCreator", ")", "{", "Preconditions", ".", "checkNotNull", "(", "storageFactoryCreator", ",", "\"storageFactoryCreator\"", ")", ";", "this",...
Attaches the given StorageFactory creator to this ServiceBuilder. The given Function will only not be invoked right away; it will be called when needed. @param storageFactoryCreator The Function to attach. @return This ServiceBuilder.
[ "Attaches", "the", "given", "StorageFactory", "creator", "to", "this", "ServiceBuilder", ".", "The", "given", "Function", "will", "only", "not", "be", "invoked", "right", "away", ";", "it", "will", "be", "called", "when", "needed", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceBuilder.java#L183-L187
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java
AddMetadataAction.createValue
private Value createValue(Object obj, ValueFactory factory) throws ValueFormatException { """ Creates {@link Value} instance. Supported only {@link String}, {@link Calendar} and {@link Data} types. """ if (obj instanceof String) { return factory.createValue((String)obj); } els...
java
private Value createValue(Object obj, ValueFactory factory) throws ValueFormatException { if (obj instanceof String) { return factory.createValue((String)obj); } else if (obj instanceof Calendar) { return factory.createValue((Calendar)obj); } else if (obj i...
[ "private", "Value", "createValue", "(", "Object", "obj", ",", "ValueFactory", "factory", ")", "throws", "ValueFormatException", "{", "if", "(", "obj", "instanceof", "String", ")", "{", "return", "factory", ".", "createValue", "(", "(", "String", ")", "obj", ...
Creates {@link Value} instance. Supported only {@link String}, {@link Calendar} and {@link Data} types.
[ "Creates", "{" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/metadata/AddMetadataAction.java#L256-L276
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.searchAllParallel
public <T> ESDatas<T> searchAllParallel(String index,ScrollHandler<T> scrollHandler, Class<T> type,int thread) throws ElasticSearchException { """ 并行检索索引所有数据,每批次返回默认为5000条数据, @param index @param scrollHandler 每批数据处理方法 @param type @param <T> @return @throws ElasticSearchException """ return searchAllPa...
java
public <T> ESDatas<T> searchAllParallel(String index,ScrollHandler<T> scrollHandler, Class<T> type,int thread) throws ElasticSearchException{ return searchAllParallel(index, DEFAULT_FETCHSIZE,scrollHandler,type,thread); }
[ "public", "<", "T", ">", "ESDatas", "<", "T", ">", "searchAllParallel", "(", "String", "index", ",", "ScrollHandler", "<", "T", ">", "scrollHandler", ",", "Class", "<", "T", ">", "type", ",", "int", "thread", ")", "throws", "ElasticSearchException", "{", ...
并行检索索引所有数据,每批次返回默认为5000条数据, @param index @param scrollHandler 每批数据处理方法 @param type @param <T> @return @throws ElasticSearchException
[ "并行检索索引所有数据", "每批次返回默认为5000条数据," ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L1840-L1842
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/utils/RefCountedFile.java
RefCountedFile.newFile
public static RefCountedFile newFile( final File file, final OutputStream currentOut) throws IOException { """ ------------------------------ Factory methods for initializing a temporary file ------------------------------ """ return new RefCountedFile(file, currentOut, 0L); }
java
public static RefCountedFile newFile( final File file, final OutputStream currentOut) throws IOException { return new RefCountedFile(file, currentOut, 0L); }
[ "public", "static", "RefCountedFile", "newFile", "(", "final", "File", "file", ",", "final", "OutputStream", "currentOut", ")", "throws", "IOException", "{", "return", "new", "RefCountedFile", "(", "file", ",", "currentOut", ",", "0L", ")", ";", "}" ]
------------------------------ Factory methods for initializing a temporary file ------------------------------
[ "------------------------------", "Factory", "methods", "for", "initializing", "a", "temporary", "file", "------------------------------" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/utils/RefCountedFile.java#L128-L132
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/Trash.java
Trash.createTrashLocation
protected Path createTrashLocation(FileSystem fs, Properties props, String user) throws IOException { """ Create location of Trash directory. Parsed from props at key {@link #TRASH_LOCATION_KEY}, defaulting to /home/directory/_GOBBLIN_TRASH. @param fs {@link org.apache.hadoop.fs.FileSystem} where trash should be...
java
protected Path createTrashLocation(FileSystem fs, Properties props, String user) throws IOException { Path trashLocation; if (props.containsKey(TRASH_LOCATION_KEY)) { trashLocation = new Path(props.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", user)); } else { trashLocation = new Path(fs...
[ "protected", "Path", "createTrashLocation", "(", "FileSystem", "fs", ",", "Properties", "props", ",", "String", "user", ")", "throws", "IOException", "{", "Path", "trashLocation", ";", "if", "(", "props", ".", "containsKey", "(", "TRASH_LOCATION_KEY", ")", ")", ...
Create location of Trash directory. Parsed from props at key {@link #TRASH_LOCATION_KEY}, defaulting to /home/directory/_GOBBLIN_TRASH. @param fs {@link org.apache.hadoop.fs.FileSystem} where trash should be found. @param props {@link java.util.Properties} containing trash configuration. @param user If the trash locati...
[ "Create", "location", "of", "Trash", "directory", ".", "Parsed", "from", "props", "at", "key", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/Trash.java#L95-L109
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java
PathNormalizer.joinPaths
public static String joinPaths(String prefix, String path) { """ Normalizes two paths and joins them as a single path. @param prefix the path prefix @param path the path @return the joined path """ String joinedPath = null; if (prefix.startsWith(JawrConstant.HTTP_URL_PREFIX) || prefix.startsWith(Ja...
java
public static String joinPaths(String prefix, String path) { String joinedPath = null; if (prefix.startsWith(JawrConstant.HTTP_URL_PREFIX) || prefix.startsWith(JawrConstant.HTTPS_URL_PREFIX) || prefix.startsWith("//")) { joinedPath = joinDomainToPath(prefix, path); } else { String normalizedPrefix = P...
[ "public", "static", "String", "joinPaths", "(", "String", "prefix", ",", "String", "path", ")", "{", "String", "joinedPath", "=", "null", ";", "if", "(", "prefix", ".", "startsWith", "(", "JawrConstant", ".", "HTTP_URL_PREFIX", ")", "||", "prefix", ".", "s...
Normalizes two paths and joins them as a single path. @param prefix the path prefix @param path the path @return the joined path
[ "Normalizes", "two", "paths", "and", "joins", "them", "as", "a", "single", "path", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L314-L332
census-instrumentation/opencensus-java
contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java
DropWizardMetrics.collectCounter
private Metric collectCounter(String dropwizardName, Counter counter) { """ Returns a {@code Metric} collected from {@link Counter}. @param dropwizardName the metric name. @param counter the counter object to collect. @return a {@code Metric}. """ String metricName = DropWizardUtils.generateFullMetric...
java
private Metric collectCounter(String dropwizardName, Counter counter) { String metricName = DropWizardUtils.generateFullMetricName(dropwizardName, "counter"); String metricDescription = DropWizardUtils.generateFullMetricDescription(dropwizardName, counter); MetricDescriptor metricDescriptor = ...
[ "private", "Metric", "collectCounter", "(", "String", "dropwizardName", ",", "Counter", "counter", ")", "{", "String", "metricName", "=", "DropWizardUtils", ".", "generateFullMetricName", "(", "dropwizardName", ",", "\"counter\"", ")", ";", "String", "metricDescriptio...
Returns a {@code Metric} collected from {@link Counter}. @param dropwizardName the metric name. @param counter the counter object to collect. @return a {@code Metric}.
[ "Returns", "a", "{", "@code", "Metric", "}", "collected", "from", "{", "@link", "Counter", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java#L141-L159
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.loadChannelFromConfig
public Channel loadChannelFromConfig(String channelName, NetworkConfig networkConfig, NetworkConfig.NetworkConfigAddPeerHandler networkConfigAddPeerHandler, NetworkConfig.NetworkConfigAddOrdererHandler networkConfigAddOrdererHandler) thro...
java
public Channel loadChannelFromConfig(String channelName, NetworkConfig networkConfig, NetworkConfig.NetworkConfigAddPeerHandler networkConfigAddPeerHandler, NetworkConfig.NetworkConfigAddOrdererHandler networkConfigAddOrdererHandler) thro...
[ "public", "Channel", "loadChannelFromConfig", "(", "String", "channelName", ",", "NetworkConfig", "networkConfig", ",", "NetworkConfig", ".", "NetworkConfigAddPeerHandler", "networkConfigAddPeerHandler", ",", "NetworkConfig", ".", "NetworkConfigAddOrdererHandler", "networkConfigA...
Configures a channel based on information loaded from a Network Config file. Note that it is up to the caller to initialize the returned channel. @param channelName The name of the channel to be configured @param networkConfig The network configuration to use to configure the channe...
[ "Configures", "a", "channel", "based", "on", "information", "loaded", "from", "a", "Network", "Config", "file", ".", "Note", "that", "it", "is", "up", "to", "the", "caller", "to", "initialize", "the", "returned", "channel", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L165-L192
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/EventHubConnectionsInner.java
EventHubConnectionsInner.listByDatabaseAsync
public Observable<List<EventHubConnectionInner>> listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName) { """ Returns the list of Event Hub connections of the given Kusto database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clust...
java
public Observable<List<EventHubConnectionInner>> listByDatabaseAsync(String resourceGroupName, String clusterName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1<ServiceResponse<List<EventHubConnectionInner>>, List<EventHubConnect...
[ "public", "Observable", "<", "List", "<", "EventHubConnectionInner", ">", ">", "listByDatabaseAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ")", "{", "return", "listByDatabaseWithServiceResponseAsync", "(", "res...
Returns the list of Event Hub connections of the given Kusto database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @throws IllegalArgumentException thrown if pa...
[ "Returns", "the", "list", "of", "Event", "Hub", "connections", "of", "the", "given", "Kusto", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/EventHubConnectionsInner.java#L139-L146
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/cache/disk/DefaultDiskStorage.java
DefaultDiskStorage.mkdirs
private void mkdirs(File directory, String message) throws IOException { """ Creates the directory (and its parents, if necessary). In case of an exception, log an error message with the relevant parameters @param directory the directory to create @param message message to use @throws IOException """ t...
java
private void mkdirs(File directory, String message) throws IOException { try { FileUtils.mkdirs(directory); } catch (FileUtils.CreateDirectoryException cde) { mCacheErrorLogger.logError( CacheErrorLogger.CacheErrorCategory.WRITE_CREATE_DIR, TAG, message, cde);...
[ "private", "void", "mkdirs", "(", "File", "directory", ",", "String", "message", ")", "throws", "IOException", "{", "try", "{", "FileUtils", ".", "mkdirs", "(", "directory", ")", ";", "}", "catch", "(", "FileUtils", ".", "CreateDirectoryException", "cde", ")...
Creates the directory (and its parents, if necessary). In case of an exception, log an error message with the relevant parameters @param directory the directory to create @param message message to use @throws IOException
[ "Creates", "the", "directory", "(", "and", "its", "parents", "if", "necessary", ")", ".", "In", "case", "of", "an", "exception", "log", "an", "error", "message", "with", "the", "relevant", "parameters" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/cache/disk/DefaultDiskStorage.java#L343-L354
amsa-code/risky
geo-analyzer/src/main/java/au/gov/amsa/geo/model/Bounds.java
Bounds.betweenLongitudes
private static boolean betweenLongitudes(double topLeftLon, double bottomRightLon, double lon) { """ Returns true if and only if lon is between the longitudes topLeftLon and bottomRightLon. @param topLeftLon must be between -180 and 180 @param bottomRightLon must be between -180 and 180 @param lon must be...
java
private static boolean betweenLongitudes(double topLeftLon, double bottomRightLon, double lon) { if (topLeftLon <= bottomRightLon) return lon >= topLeftLon && lon <= bottomRightLon; else return lon >= topLeftLon || lon <= bottomRightLon; }
[ "private", "static", "boolean", "betweenLongitudes", "(", "double", "topLeftLon", ",", "double", "bottomRightLon", ",", "double", "lon", ")", "{", "if", "(", "topLeftLon", "<=", "bottomRightLon", ")", "return", "lon", ">=", "topLeftLon", "&&", "lon", "<=", "bo...
Returns true if and only if lon is between the longitudes topLeftLon and bottomRightLon. @param topLeftLon must be between -180 and 180 @param bottomRightLon must be between -180 and 180 @param lon must be between -180 and 180 @return
[ "Returns", "true", "if", "and", "only", "if", "lon", "is", "between", "the", "longitudes", "topLeftLon", "and", "bottomRightLon", "." ]
train
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/geo-analyzer/src/main/java/au/gov/amsa/geo/model/Bounds.java#L68-L73
h2oai/h2o-3
h2o-core/src/main/java/water/fvec/CStrChunk.java
CStrChunk.asciiLStrip
public NewChunk asciiLStrip(NewChunk nc, String chars) { """ Optimized lstrip() & rstrip() methods to operate across the entire CStrChunk buffer in one pass. NewChunk is the same size as the original, despite trimming. @param nc NewChunk to be filled with strip version of strings in this chunk @param chars ...
java
public NewChunk asciiLStrip(NewChunk nc, String chars) { SetOfBytes set = new SetOfBytes(chars); //update offsets and byte array for(int i=0; i < _len; i++) { int off = intAt(i); if (off != NA) { while (set.contains(byteAt(off))) off++; int len = lengthAtOffset(off); nc.a...
[ "public", "NewChunk", "asciiLStrip", "(", "NewChunk", "nc", ",", "String", "chars", ")", "{", "SetOfBytes", "set", "=", "new", "SetOfBytes", "(", "chars", ")", ";", "//update offsets and byte array", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_len",...
Optimized lstrip() & rstrip() methods to operate across the entire CStrChunk buffer in one pass. NewChunk is the same size as the original, despite trimming. @param nc NewChunk to be filled with strip version of strings in this chunk @param chars chars to strip, treated as ASCII @return Filled NewChunk
[ "Optimized", "lstrip", "()", "&", "rstrip", "()", "methods", "to", "operate", "across", "the", "entire", "CStrChunk", "buffer", "in", "one", "pass", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/fvec/CStrChunk.java#L287-L299
authlete/authlete-java-common
src/main/java/com/authlete/common/dto/AuthorizationIssueRequest.java
AuthorizationIssueRequest.setClaims
public AuthorizationIssueRequest setClaims(Map<String, Object> claims) { """ Set the value of {@code "claims"} which is the claims of the subject. The argument is converted into a JSON string and passed to {@link #setClaims(String)} method. @param claims The claims of the subject. Keys are claim names. @r...
java
public AuthorizationIssueRequest setClaims(Map<String, Object> claims) { if (claims == null || claims.size() == 0) { this.claims = null; return this; } String json = Utils.toJson(claims); return setClaims(json); }
[ "public", "AuthorizationIssueRequest", "setClaims", "(", "Map", "<", "String", ",", "Object", ">", "claims", ")", "{", "if", "(", "claims", "==", "null", "||", "claims", ".", "size", "(", ")", "==", "0", ")", "{", "this", ".", "claims", "=", "null", ...
Set the value of {@code "claims"} which is the claims of the subject. The argument is converted into a JSON string and passed to {@link #setClaims(String)} method. @param claims The claims of the subject. Keys are claim names. @return {@code this} object. @since 1.24
[ "Set", "the", "value", "of", "{", "@code", "claims", "}", "which", "is", "the", "claims", "of", "the", "subject", ".", "The", "argument", "is", "converted", "into", "a", "JSON", "string", "and", "passed", "to", "{", "@link", "#setClaims", "(", "String", ...
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/AuthorizationIssueRequest.java#L517-L528
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLTransaction.java
CQLTransaction.addColumnDelete
private BoundStatement addColumnDelete(String tableName, String key, String colName) { """ Create and return a BoundStatement that deletes the given column. """ PreparedStatement prepState = m_dbservice.getPreparedUpdate(Update.DELETE_COLUMN, tableName); BoundStatement boundState = prepState.bi...
java
private BoundStatement addColumnDelete(String tableName, String key, String colName) { PreparedStatement prepState = m_dbservice.getPreparedUpdate(Update.DELETE_COLUMN, tableName); BoundStatement boundState = prepState.bind(); boundState.setString(0, key); boundState.setString(1, colName...
[ "private", "BoundStatement", "addColumnDelete", "(", "String", "tableName", ",", "String", "key", ",", "String", "colName", ")", "{", "PreparedStatement", "prepState", "=", "m_dbservice", ".", "getPreparedUpdate", "(", "Update", ".", "DELETE_COLUMN", ",", "tableName...
Create and return a BoundStatement that deletes the given column.
[ "Create", "and", "return", "a", "BoundStatement", "that", "deletes", "the", "given", "column", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLTransaction.java#L130-L136
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/Server.java
Server.addWebApplications
public WebApplicationContext[] addWebApplications(String webapps) throws IOException { """ Add Web Applications. Add auto webapplications to the server. The name of the webapp directory or war is used as the context name. If a webapp is called "root" it is added at "/". @param webapps Directory file n...
java
public WebApplicationContext[] addWebApplications(String webapps) throws IOException { return addWebApplications(null,webapps,null,false); }
[ "public", "WebApplicationContext", "[", "]", "addWebApplications", "(", "String", "webapps", ")", "throws", "IOException", "{", "return", "addWebApplications", "(", "null", ",", "webapps", ",", "null", ",", "false", ")", ";", "}" ]
Add Web Applications. Add auto webapplications to the server. The name of the webapp directory or war is used as the context name. If a webapp is called "root" it is added at "/". @param webapps Directory file name or URL to look for auto webapplication. @exception IOException
[ "Add", "Web", "Applications", ".", "Add", "auto", "webapplications", "to", "the", "server", ".", "The", "name", "of", "the", "webapp", "directory", "or", "war", "is", "used", "as", "the", "context", "name", ".", "If", "a", "webapp", "is", "called", "root...
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/Server.java#L275-L279
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.hasProperty
public static MetaProperty hasProperty(Object self, String name) { """ <p>Returns true of the implementing MetaClass has a property of the given name <p>Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing @param ...
java
public static MetaProperty hasProperty(Object self, String name) { return InvokerHelper.getMetaClass(self).hasProperty(self, name); }
[ "public", "static", "MetaProperty", "hasProperty", "(", "Object", "self", ",", "String", "name", ")", "{", "return", "InvokerHelper", ".", "getMetaClass", "(", "self", ")", ".", "hasProperty", "(", "self", ",", "name", ")", ";", "}" ]
<p>Returns true of the implementing MetaClass has a property of the given name <p>Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing @param self The object to inspect @param name The name of the property of interest @retu...
[ "<p", ">", "Returns", "true", "of", "the", "implementing", "MetaClass", "has", "a", "property", "of", "the", "given", "name" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L17601-L17603
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getAllContinentFloorID
public void getAllContinentFloorID(int continentID, Callback<List<Integer>> callback) throws NullPointerException { """ For more info on continents API go <a href="https://wiki.guildwars2.com/wiki/API:2/continents">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callba...
java
public void getAllContinentFloorID(int continentID, Callback<List<Integer>> callback) throws NullPointerException { gw2API.getAllContinentFloorIDs(Integer.toString(continentID)).enqueue(callback); }
[ "public", "void", "getAllContinentFloorID", "(", "int", "continentID", ",", "Callback", "<", "List", "<", "Integer", ">", ">", "callback", ")", "throws", "NullPointerException", "{", "gw2API", ".", "getAllContinentFloorIDs", "(", "Integer", ".", "toString", "(", ...
For more info on continents API go <a href="https://wiki.guildwars2.com/wiki/API:2/continents">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param continentID {@link Continent#id} @param callback cal...
[ "For", "more", "info", "on", "continents", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "continents", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "use...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1046-L1048
aequologica/geppaequo
geppaequo-core/src/main/java/net/aequologica/neo/geppaequo/auth/MethodUtils.java
MethodUtils.getObjectTransformationCost
private static float getObjectTransformationCost(Class<?> srcClass, Class<?> destClass) { """ Gets the number of steps required needed to turn the source class into the destination class. This represents the number of steps in the object hierarchy graph. @param srcClass The source class @param destClass The de...
java
private static float getObjectTransformationCost(Class<?> srcClass, Class<?> destClass) { float cost = 0.0f; while (srcClass != null && !destClass.equals(srcClass)) { if (destClass.isPrimitive()) { Class<?> destClassWrapperClazz = getPrimitiveWrapper(destClass); ...
[ "private", "static", "float", "getObjectTransformationCost", "(", "Class", "<", "?", ">", "srcClass", ",", "Class", "<", "?", ">", "destClass", ")", "{", "float", "cost", "=", "0.0f", ";", "while", "(", "srcClass", "!=", "null", "&&", "!", "destClass", "...
Gets the number of steps required needed to turn the source class into the destination class. This represents the number of steps in the object hierarchy graph. @param srcClass The source class @param destClass The destination class @return The cost of transforming an object
[ "Gets", "the", "number", "of", "steps", "required", "needed", "to", "turn", "the", "source", "class", "into", "the", "destination", "class", ".", "This", "represents", "the", "number", "of", "steps", "in", "the", "object", "hierarchy", "graph", "." ]
train
https://github.com/aequologica/geppaequo/blob/b72e5f6356535fd045a931f8c544d4a8ea6e35a2/geppaequo-core/src/main/java/net/aequologica/neo/geppaequo/auth/MethodUtils.java#L1124-L1155
joniles/mpxj
src/main/java/net/sf/mpxj/utility/DataExportUtility.java
DataExportUtility.process
public void process(Connection connection, String directory) throws Exception { """ Export data base contents to a directory using supplied connection. @param connection database connection @param directory target directory @throws Exception """ connection.setAutoCommit(true); // // Ret...
java
public void process(Connection connection, String directory) throws Exception { connection.setAutoCommit(true); // // Retrieve meta data about the connection // DatabaseMetaData dmd = connection.getMetaData(); String[] types = { "TABLE" }; FileWriter ...
[ "public", "void", "process", "(", "Connection", "connection", ",", "String", "directory", ")", "throws", "Exception", "{", "connection", ".", "setAutoCommit", "(", "true", ")", ";", "//", "// Retrieve meta data about the connection", "//", "DatabaseMetaData", "dmd", ...
Export data base contents to a directory using supplied connection. @param connection database connection @param directory target directory @throws Exception
[ "Export", "data", "base", "contents", "to", "a", "directory", "using", "supplied", "connection", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/DataExportUtility.java#L103-L135
alexvasilkov/AndroidCommons
library/src/main/java/com/alexvasilkov/android/commons/ui/Views.java
Views.duplicateState
public static void duplicateState(@NonNull final View from, @NonNull final View to) { """ Duplicates drawable state from one view to another.<br/> E.g. when 'from' view get pressed 'to' view will be switched to pressed state as well.<br/> State will be duplicated for both background drawable and to ImageView's d...
java
public static void duplicateState(@NonNull final View from, @NonNull final View to) { from.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { @Override public boolean onPreDraw() { final int[] state = from.getDrawableState(); ...
[ "public", "static", "void", "duplicateState", "(", "@", "NonNull", "final", "View", "from", ",", "@", "NonNull", "final", "View", "to", ")", "{", "from", ".", "getViewTreeObserver", "(", ")", ".", "addOnPreDrawListener", "(", "new", "ViewTreeObserver", ".", ...
Duplicates drawable state from one view to another.<br/> E.g. when 'from' view get pressed 'to' view will be switched to pressed state as well.<br/> State will be duplicated for both background drawable and to ImageView's drawable (if 'to' view is an instance of ImageView).
[ "Duplicates", "drawable", "state", "from", "one", "view", "to", "another", ".", "<br", "/", ">", "E", ".", "g", ".", "when", "from", "view", "get", "pressed", "to", "view", "will", "be", "switched", "to", "pressed", "state", "as", "well", ".", "<br", ...
train
https://github.com/alexvasilkov/AndroidCommons/blob/aca9f6d5acfc6bd3694984b7f89956e1a0146ddb/library/src/main/java/com/alexvasilkov/android/commons/ui/Views.java#L118-L139
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/PrefHelper.java
PrefHelper.setString
public void setString(String key, String value) { """ <p>Sets the value of the {@link String} key value supplied in preferences.</p> @param key A {@link String} value containing the key to reference. @param value A {@link String} value to set the preference record to. """ prefHelper_.prefsEditor_...
java
public void setString(String key, String value) { prefHelper_.prefsEditor_.putString(key, value); prefHelper_.prefsEditor_.apply(); }
[ "public", "void", "setString", "(", "String", "key", ",", "String", "value", ")", "{", "prefHelper_", ".", "prefsEditor_", ".", "putString", "(", "key", ",", "value", ")", ";", "prefHelper_", ".", "prefsEditor_", ".", "apply", "(", ")", ";", "}" ]
<p>Sets the value of the {@link String} key value supplied in preferences.</p> @param key A {@link String} value containing the key to reference. @param value A {@link String} value to set the preference record to.
[ "<p", ">", "Sets", "the", "value", "of", "the", "{", "@link", "String", "}", "key", "value", "supplied", "in", "preferences", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/PrefHelper.java#L1003-L1006
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java
AbstractManagerFactoryBuilder.withDefaultWriteConsistencyMap
public T withDefaultWriteConsistencyMap(Map<String, ConsistencyLevel> writeConsistencyMap) { """ Define the default Consistency level map to be used for all WRITE operations The map keys represent table names and values represent the corresponding consistency level @return ManagerFactoryBuilder @see <a href=...
java
public T withDefaultWriteConsistencyMap(Map<String, ConsistencyLevel> writeConsistencyMap) { configMap.put(CONSISTENCY_LEVEL_WRITE_MAP, writeConsistencyMap); return getThis(); }
[ "public", "T", "withDefaultWriteConsistencyMap", "(", "Map", "<", "String", ",", "ConsistencyLevel", ">", "writeConsistencyMap", ")", "{", "configMap", ".", "put", "(", "CONSISTENCY_LEVEL_WRITE_MAP", ",", "writeConsistencyMap", ")", ";", "return", "getThis", "(", ")...
Define the default Consistency level map to be used for all WRITE operations The map keys represent table names and values represent the corresponding consistency level @return ManagerFactoryBuilder @see <a href="https://github.com/doanduyhai/Achilles/wiki/Configuration-Parameters#consistency-level" target="_blank">Co...
[ "Define", "the", "default", "Consistency", "level", "map", "to", "be", "used", "for", "all", "WRITE", "operations", "The", "map", "keys", "represent", "table", "names", "and", "values", "represent", "the", "corresponding", "consistency", "level" ]
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java#L148-L151
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/trees/GraphUtils.java
GraphUtils.printTree
public static <T extends GraphNode<T>> String printTree(T node, Formatter<T> formatter) { """ Creates a string representation of the graph reachable from the given node using the given formatter. @param node the root node @param formatter the node formatter @return a new string """ checkArgNo...
java
public static <T extends GraphNode<T>> String printTree(T node, Formatter<T> formatter) { checkArgNotNull(formatter, "formatter"); return printTree(node, formatter, Predicates.<T>alwaysTrue(), Predicates.<T>alwaysTrue()); }
[ "public", "static", "<", "T", "extends", "GraphNode", "<", "T", ">", ">", "String", "printTree", "(", "T", "node", ",", "Formatter", "<", "T", ">", "formatter", ")", "{", "checkArgNotNull", "(", "formatter", ",", "\"formatter\"", ")", ";", "return", "pri...
Creates a string representation of the graph reachable from the given node using the given formatter. @param node the root node @param formatter the node formatter @return a new string
[ "Creates", "a", "string", "representation", "of", "the", "graph", "reachable", "from", "the", "given", "node", "using", "the", "given", "formatter", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/trees/GraphUtils.java#L104-L107
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplDouble_CustomFieldSerializer.java
OWLLiteralImplDouble_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplDouble instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt....
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplDouble instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLLiteralImplDouble", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplDouble_CustomFieldSerializer.java#L87-L90
QSFT/Doradus
doradus-server/src/examples/java/com/dell/doradus/service/olap/mono/OLAPMonoService.java
OLAPMonoService.addBatch
public BatchResult addBatch(ApplicationDefinition appDef, OlapBatch batch, Map<String, String> options) { """ Add the given batch of object updates for the given application. The updates may be new, updated, or deleted objects. The updates are applied to the application's mono shard. @param appDef Applicat...
java
public BatchResult addBatch(ApplicationDefinition appDef, OlapBatch batch, Map<String, String> options) { return OLAPService.instance().addBatch(appDef, MONO_SHARD_NAME, batch, options); }
[ "public", "BatchResult", "addBatch", "(", "ApplicationDefinition", "appDef", ",", "OlapBatch", "batch", ",", "Map", "<", "String", ",", "String", ">", "options", ")", "{", "return", "OLAPService", ".", "instance", "(", ")", ".", "addBatch", "(", "appDef", ",...
Add the given batch of object updates for the given application. The updates may be new, updated, or deleted objects. The updates are applied to the application's mono shard. @param appDef Application to which update batch is applied. @param batch {@link OlapBatch} of object adds, updates, and/or deletes. @para...
[ "Add", "the", "given", "batch", "of", "object", "updates", "for", "the", "given", "application", ".", "The", "updates", "may", "be", "new", "updated", "or", "deleted", "objects", ".", "The", "updates", "are", "applied", "to", "the", "application", "s", "mo...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/examples/java/com/dell/doradus/service/olap/mono/OLAPMonoService.java#L175-L177
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/ReferencePrefetcher.java
ReferencePrefetcher.associateBatched
protected void associateBatched(Collection owners, Collection children) { """ Associate the batched Children with their owner object. Loop over owners """ ObjectReferenceDescriptor ord = getObjectReferenceDescriptor(); ClassDescriptor cld = getOwnerClassDescriptor(); Object owner; ...
java
protected void associateBatched(Collection owners, Collection children) { ObjectReferenceDescriptor ord = getObjectReferenceDescriptor(); ClassDescriptor cld = getOwnerClassDescriptor(); Object owner; Object relatedObject; Object fkValues[]; Identity id; ...
[ "protected", "void", "associateBatched", "(", "Collection", "owners", ",", "Collection", "children", ")", "{", "ObjectReferenceDescriptor", "ord", "=", "getObjectReferenceDescriptor", "(", ")", ";", "ClassDescriptor", "cld", "=", "getOwnerClassDescriptor", "(", ")", "...
Associate the batched Children with their owner object. Loop over owners
[ "Associate", "the", "batched", "Children", "with", "their", "owner", "object", ".", "Loop", "over", "owners" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/ReferencePrefetcher.java#L56-L89
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java
DeploymentResourceSupport.getDeploymentSubModel
public ModelNode getDeploymentSubModel(final String subsystemName, final PathElement address) { """ Gets the sub-model for a components from the deployment itself. Operations, metrics and descriptions have to be registered as part of the subsystem registration {@link org.jboss.as.controller.ExtensionContext} and ...
java
public ModelNode getDeploymentSubModel(final String subsystemName, final PathElement address) { assert subsystemName != null : "The subsystemName cannot be null"; return getDeploymentSubModel(subsystemName, address, deploymentUnit); }
[ "public", "ModelNode", "getDeploymentSubModel", "(", "final", "String", "subsystemName", ",", "final", "PathElement", "address", ")", "{", "assert", "subsystemName", "!=", "null", ":", "\"The subsystemName cannot be null\"", ";", "return", "getDeploymentSubModel", "(", ...
Gets the sub-model for a components from the deployment itself. Operations, metrics and descriptions have to be registered as part of the subsystem registration {@link org.jboss.as.controller.ExtensionContext} and {@link org.jboss.as.controller.SubsystemRegistration#registerDeploymentModel(org.jboss.as.controller.Resou...
[ "Gets", "the", "sub", "-", "model", "for", "a", "components", "from", "the", "deployment", "itself", ".", "Operations", "metrics", "and", "descriptions", "have", "to", "be", "registered", "as", "part", "of", "the", "subsystem", "registration", "{", "@link", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L156-L159
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.writeGroup
public void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsException { """ Writes an already existing group.<p> The group id has to be a valid OpenCms group id.<br> The group with the given id will be completely overridden by the given data.<p> @param dbc the current database context @param grou...
java
public void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsException { CmsGroup oldGroup = readGroup(dbc, group.getName()); m_monitor.uncacheGroup(oldGroup); getUserDriver(dbc).writeGroup(dbc, group); m_monitor.cacheGroup(group); if (!dbc.getProjectId().isNullUUID()) { ...
[ "public", "void", "writeGroup", "(", "CmsDbContext", "dbc", ",", "CmsGroup", "group", ")", "throws", "CmsException", "{", "CmsGroup", "oldGroup", "=", "readGroup", "(", "dbc", ",", "group", ".", "getName", "(", ")", ")", ";", "m_monitor", ".", "uncacheGroup"...
Writes an already existing group.<p> The group id has to be a valid OpenCms group id.<br> The group with the given id will be completely overridden by the given data.<p> @param dbc the current database context @param group the group that should be written @throws CmsException if operation was not successful
[ "Writes", "an", "already", "existing", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L9842-L9859
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/logging/MyfacesLogger.java
MyfacesLogger.entering
public void entering(String sourceClass, String sourceMethod, Object params[]) { """ Log a method entry, with an array of parameters. <p> This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY" (followed by a format {N} indicator for each entry in the parameter...
java
public void entering(String sourceClass, String sourceMethod, Object params[]) { _log.entering(sourceClass, sourceMethod, params); }
[ "public", "void", "entering", "(", "String", "sourceClass", ",", "String", "sourceMethod", ",", "Object", "params", "[", "]", ")", "{", "_log", ".", "entering", "(", "sourceClass", ",", "sourceMethod", ",", "params", ")", ";", "}" ]
Log a method entry, with an array of parameters. <p> This is a convenience method that can be used to log entry to a method. A LogRecord with message "ENTRY" (followed by a format {N} indicator for each entry in the parameter array), log level FINER, and the given sourceMethod, sourceClass, and parameters is logged. <...
[ "Log", "a", "method", "entry", "with", "an", "array", "of", "parameters", ".", "<p", ">", "This", "is", "a", "convenience", "method", "that", "can", "be", "used", "to", "log", "entry", "to", "a", "method", ".", "A", "LogRecord", "with", "message", "ENT...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/logging/MyfacesLogger.java#L741-L744
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PipelineApi.java
PipelineApi.updatePipelineSchedule
public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath,PipelineSchedule pipelineSchedule) throws GitLabApiException { """ Modifies a pipeline schedule for project. <pre><code>PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre> @param projectIdOrPath projectIdOrPath the proj...
java
public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath,PipelineSchedule pipelineSchedule) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("description", pipelineSchedule.getDescription(), false) .withParam("ref", pipelineSchedul...
[ "public", "PipelineSchedule", "updatePipelineSchedule", "(", "Object", "projectIdOrPath", ",", "PipelineSchedule", "pipelineSchedule", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\...
Modifies a pipeline schedule for project. <pre><code>PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param pipelineSchedule the pipelineSchedule instance that contains...
[ "Modifies", "a", "pipeline", "schedule", "for", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L432-L443
facebook/fresco
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/UI.java
UI.findViewById
@SuppressWarnings("unchecked") public static <T extends View> T findViewById(View containerView, int viewId) { """ This method returns the reference of the View with the given Id in the view passed as parameter @param containerView The container View @param viewId The id of the View we want to get a ...
java
@SuppressWarnings("unchecked") public static <T extends View> T findViewById(View containerView, int viewId) { View foundView = containerView.findViewById(viewId); return (T) foundView; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "View", ">", "T", "findViewById", "(", "View", "containerView", ",", "int", "viewId", ")", "{", "View", "foundView", "=", "containerView", ".", "findViewById", "(", ...
This method returns the reference of the View with the given Id in the view passed as parameter @param containerView The container View @param viewId The id of the View we want to get a reference @return The View with the given id and type
[ "This", "method", "returns", "the", "reference", "of", "the", "View", "with", "the", "given", "Id", "in", "the", "view", "passed", "as", "parameter" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/UI.java#L43-L47
facebookarchive/hadoop-20
src/core/org/apache/hadoop/http/HttpServer.java
HttpServer.addDefaultApps
protected void addDefaultApps(ContextHandlerCollection parent, final String appDir) throws IOException { """ Add default apps. @param appDir The application directory @throws IOException """ // set up the context for "/logs/" if "hadoop.log.dir" property is defined. String logDir = System.getP...
java
protected void addDefaultApps(ContextHandlerCollection parent, final String appDir) throws IOException { // set up the context for "/logs/" if "hadoop.log.dir" property is defined. String logDir = System.getProperty("hadoop.log.dir"); if (logDir != null) { Context logContext = new Context(paren...
[ "protected", "void", "addDefaultApps", "(", "ContextHandlerCollection", "parent", ",", "final", "String", "appDir", ")", "throws", "IOException", "{", "// set up the context for \"/logs/\" if \"hadoop.log.dir\" property is defined. ", "String", "logDir", "=", "System", ".", "...
Add default apps. @param appDir The application directory @throws IOException
[ "Add", "default", "apps", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/http/HttpServer.java#L213-L228
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
CacheableWorkspaceDataManager.initACL
private ItemData initACL(NodeData parent, NodeData node) throws RepositoryException { """ Init ACL of the node. @param parent - a parent, can be null (get item by id) @param node - an item data @return - an item data with ACL was initialized @throws RepositoryException """ return initACL(parent, no...
java
private ItemData initACL(NodeData parent, NodeData node) throws RepositoryException { return initACL(parent, node, null); }
[ "private", "ItemData", "initACL", "(", "NodeData", "parent", ",", "NodeData", "node", ")", "throws", "RepositoryException", "{", "return", "initACL", "(", "parent", ",", "node", ",", "null", ")", ";", "}" ]
Init ACL of the node. @param parent - a parent, can be null (get item by id) @param node - an item data @return - an item data with ACL was initialized @throws RepositoryException
[ "Init", "ACL", "of", "the", "node", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java#L2375-L2378
MGunlogson/CuckooFilter4J
src/main/java/com/github/mgunlogson/cuckoofilter4j/FilterTable.java
FilterTable.swapRandomTagInBucket
long swapRandomTagInBucket(long curIndex, long tag) { """ Replaces a tag in a random position in the given bucket and returns the tag that was replaced. @param curIndex bucket index @param tag tag @return the replaced tag """ int randomBucketPosition = ThreadLocalRandom.current().nextInt(CuckooFilte...
java
long swapRandomTagInBucket(long curIndex, long tag) { int randomBucketPosition = ThreadLocalRandom.current().nextInt(CuckooFilter.BUCKET_SIZE); return readTagAndSet(curIndex, randomBucketPosition, tag); }
[ "long", "swapRandomTagInBucket", "(", "long", "curIndex", ",", "long", "tag", ")", "{", "int", "randomBucketPosition", "=", "ThreadLocalRandom", ".", "current", "(", ")", ".", "nextInt", "(", "CuckooFilter", ".", "BUCKET_SIZE", ")", ";", "return", "readTagAndSet...
Replaces a tag in a random position in the given bucket and returns the tag that was replaced. @param curIndex bucket index @param tag tag @return the replaced tag
[ "Replaces", "a", "tag", "in", "a", "random", "position", "in", "the", "given", "bucket", "and", "returns", "the", "tag", "that", "was", "replaced", "." ]
train
https://github.com/MGunlogson/CuckooFilter4J/blob/e8472aa150b201f05046d1c81cac5a5ca4348db8/src/main/java/com/github/mgunlogson/cuckoofilter4j/FilterTable.java#L114-L117
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java
PluginRepositoryUtil.loadFromXmlPluginPackageDefinitions
public static void loadFromXmlPluginPackageDefinitions(final IPluginRepository repo, final ClassLoader cl, final InputStream in) throws PluginConfigurationException { """ Loads a full repository definition from an XML file. @param repo The repository that must be loaded @param cl The classloader ...
java
public static void loadFromXmlPluginPackageDefinitions(final IPluginRepository repo, final ClassLoader cl, final InputStream in) throws PluginConfigurationException { for (PluginDefinition pd : loadFromXmlPluginPackageDefinitions(cl, in)) { repo.addPluginDefinition(pd); } }
[ "public", "static", "void", "loadFromXmlPluginPackageDefinitions", "(", "final", "IPluginRepository", "repo", ",", "final", "ClassLoader", "cl", ",", "final", "InputStream", "in", ")", "throws", "PluginConfigurationException", "{", "for", "(", "PluginDefinition", "pd", ...
Loads a full repository definition from an XML file. @param repo The repository that must be loaded @param cl The classloader to be used to instantiate the plugin classes @param in The stream to the XML file @throws PluginConfigurationException -
[ "Loads", "a", "full", "repository", "definition", "from", "an", "XML", "file", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/PluginRepositoryUtil.java#L69-L74
ironjacamar/ironjacamar
rarinfo/src/main/java/org/ironjacamar/rarinfo/Main.java
Main.getUrls
private static URL[] getUrls(File directory) throws MalformedURLException, IOException { """ Get the URLs for the directory and all libraries located in the directory @param directory The directory @return The URLs @exception MalformedURLException MalformedURLException @exception IOException IOException ""...
java
private static URL[] getUrls(File directory) throws MalformedURLException, IOException { List<URL> list = new LinkedList<URL>(); if (directory.exists() && directory.isDirectory()) { // Add directory list.add(directory.toURI().toURL()); // Add the contents of the directo...
[ "private", "static", "URL", "[", "]", "getUrls", "(", "File", "directory", ")", "throws", "MalformedURLException", ",", "IOException", "{", "List", "<", "URL", ">", "list", "=", "new", "LinkedList", "<", "URL", ">", "(", ")", ";", "if", "(", "directory",...
Get the URLs for the directory and all libraries located in the directory @param directory The directory @return The URLs @exception MalformedURLException MalformedURLException @exception IOException IOException
[ "Get", "the", "URLs", "for", "the", "directory", "and", "all", "libraries", "located", "in", "the", "directory" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/rarinfo/src/main/java/org/ironjacamar/rarinfo/Main.java#L1426-L1459
knightliao/disconf
disconf-core/src/main/java/com/baidu/disconf/core/common/restful/impl/RestfulMgrImpl.java
RestfulMgrImpl.retry4ConfDownload
private Object retry4ConfDownload(RemoteUrl remoteUrl, File localTmpFile, int retryTimes, int sleepSeconds) throws Exception { """ Retry封装 RemoteUrl 支持多Server的下载 @param remoteUrl @param localTmpFile @param retryTimes @param sleepSeconds @return """ Exception ex = null; for ...
java
private Object retry4ConfDownload(RemoteUrl remoteUrl, File localTmpFile, int retryTimes, int sleepSeconds) throws Exception { Exception ex = null; for (URL url : remoteUrl.getUrls()) { // 可重试的下载 UnreliableInterface unreliableImpl = new FetchConfFile(url, localTmpFil...
[ "private", "Object", "retry4ConfDownload", "(", "RemoteUrl", "remoteUrl", ",", "File", "localTmpFile", ",", "int", "retryTimes", ",", "int", "sleepSeconds", ")", "throws", "Exception", "{", "Exception", "ex", "=", "null", ";", "for", "(", "URL", "url", ":", ...
Retry封装 RemoteUrl 支持多Server的下载 @param remoteUrl @param localTmpFile @param retryTimes @param sleepSeconds @return
[ "Retry封装", "RemoteUrl", "支持多Server的下载" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-core/src/main/java/com/baidu/disconf/core/common/restful/impl/RestfulMgrImpl.java#L217-L240
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.setRow
public Matrix4d setRow(int row, Vector4dc src) throws IndexOutOfBoundsException { """ Set the row at the given <code>row</code> index, starting with <code>0</code>. @param row the row index in <code>[0..3]</code> @param src the row components to set @return this @throws IndexOutOfBoundsException if <code>r...
java
public Matrix4d setRow(int row, Vector4dc src) throws IndexOutOfBoundsException { switch (row) { case 0: this.m00 = src.x(); this.m10 = src.y(); this.m20 = src.z(); this.m30 = src.w(); break; case 1: this.m01 = src.x(); ...
[ "public", "Matrix4d", "setRow", "(", "int", "row", ",", "Vector4dc", "src", ")", "throws", "IndexOutOfBoundsException", "{", "switch", "(", "row", ")", "{", "case", "0", ":", "this", ".", "m00", "=", "src", ".", "x", "(", ")", ";", "this", ".", "m10"...
Set the row at the given <code>row</code> index, starting with <code>0</code>. @param row the row index in <code>[0..3]</code> @param src the row components to set @return this @throws IndexOutOfBoundsException if <code>row</code> is not in <code>[0..3]</code>
[ "Set", "the", "row", "at", "the", "given", "<code", ">", "row<", "/", "code", ">", "index", "starting", "with", "<code", ">", "0<", "/", "code", ">", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L8637-L8668
allure-framework/allure-java
allure-java-commons/src/main/java/io/qameta/allure/AllureLifecycle.java
AllureLifecycle.startStep
public void startStep(final String uuid, final StepResult result) { """ Start a new step as child step of current running test case or step. Shortcut for {@link #startStep(String, String, StepResult)}. @param uuid the uuid of step. @param result the step. """ final Optional<String> current = thr...
java
public void startStep(final String uuid, final StepResult result) { final Optional<String> current = threadContext.getCurrent(); if (!current.isPresent()) { LOGGER.error("Could not start step: no test case running"); return; } final String parentUuid = current.get...
[ "public", "void", "startStep", "(", "final", "String", "uuid", ",", "final", "StepResult", "result", ")", "{", "final", "Optional", "<", "String", ">", "current", "=", "threadContext", ".", "getCurrent", "(", ")", ";", "if", "(", "!", "current", ".", "is...
Start a new step as child step of current running test case or step. Shortcut for {@link #startStep(String, String, StepResult)}. @param uuid the uuid of step. @param result the step.
[ "Start", "a", "new", "step", "as", "child", "step", "of", "current", "running", "test", "case", "or", "step", ".", "Shortcut", "for", "{", "@link", "#startStep", "(", "String", "String", "StepResult", ")", "}", "." ]
train
https://github.com/allure-framework/allure-java/blob/64015ca2b789aa6f7b19c793f1512e2f11d0174e/allure-java-commons/src/main/java/io/qameta/allure/AllureLifecycle.java#L454-L462
finmath/finmath-lib
src/main/java6/net/finmath/functions/AnalyticFormulas.java
AnalyticFormulas.sabrHaganLognormalBlackVolatilityApproximation
public static double sabrHaganLognormalBlackVolatilityApproximation(double alpha, double beta, double rho, double nu, double underlying, double strike, double maturity) { """ Calculated the approximation to the lognormal Black volatility using the standard SABR model and the standard Hagan approximation. @para...
java
public static double sabrHaganLognormalBlackVolatilityApproximation(double alpha, double beta, double rho, double nu, double underlying, double strike, double maturity) { return sabrHaganLognormalBlackVolatilityApproximation(alpha, beta, rho, nu, 0.0, underlying, strike, maturity); }
[ "public", "static", "double", "sabrHaganLognormalBlackVolatilityApproximation", "(", "double", "alpha", ",", "double", "beta", ",", "double", "rho", ",", "double", "nu", ",", "double", "underlying", ",", "double", "strike", ",", "double", "maturity", ")", "{", "...
Calculated the approximation to the lognormal Black volatility using the standard SABR model and the standard Hagan approximation. @param alpha initial value of the stochastic volatility process of the SABR model. @param beta CEV parameter of the SABR model. @param rho Correlation (leverages) of the stochastic volatil...
[ "Calculated", "the", "approximation", "to", "the", "lognormal", "Black", "volatility", "using", "the", "standard", "SABR", "model", "and", "the", "standard", "Hagan", "approximation", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/functions/AnalyticFormulas.java#L998-L1001
i-net-software/jlessc
src/com/inet/lib/less/ColorUtils.java
ColorUtils.colorBlendingDigit
private static long colorBlendingDigit( long longDigit1, long longDigit2, int op ) { """ Color blending operation for a single color channel. @param longDigit1 left digit @param longDigit2 right digit @param op blending operation @return resulting color digit @throws IllegalArgumentException if the operatio...
java
private static long colorBlendingDigit( long longDigit1, long longDigit2, int op ) { switch( op ) { case MULTIPLY: return longDigit1 * longDigit2 / 0xFF00; case SCREEN: return longDigit1 + longDigit2 - longDigit1 * longDigit2 / 0xFF00; case OVE...
[ "private", "static", "long", "colorBlendingDigit", "(", "long", "longDigit1", ",", "long", "longDigit2", ",", "int", "op", ")", "{", "switch", "(", "op", ")", "{", "case", "MULTIPLY", ":", "return", "longDigit1", "*", "longDigit2", "/", "0xFF00", ";", "cas...
Color blending operation for a single color channel. @param longDigit1 left digit @param longDigit2 right digit @param op blending operation @return resulting color digit @throws IllegalArgumentException if the operation is unknown
[ "Color", "blending", "operation", "for", "a", "single", "color", "channel", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/ColorUtils.java#L552-L586
cdk/cdk
base/core/src/main/java/org/openscience/cdk/io/setting/IntegerIOSetting.java
IntegerIOSetting.setSetting
@Override public void setSetting(String setting) throws CDKException { """ Sets the setting for a certain question. The setting is a boolean, and it accepts only "true" and "false". """ try { Integer.parseInt(setting); this.setting = setting; } catch (NumberFormatEx...
java
@Override public void setSetting(String setting) throws CDKException { try { Integer.parseInt(setting); this.setting = setting; } catch (NumberFormatException exception) { throw new CDKException("Setting " + setting + " is not an integer.", exception); } ...
[ "@", "Override", "public", "void", "setSetting", "(", "String", "setting", ")", "throws", "CDKException", "{", "try", "{", "Integer", ".", "parseInt", "(", "setting", ")", ";", "this", ".", "setting", "=", "setting", ";", "}", "catch", "(", "NumberFormatEx...
Sets the setting for a certain question. The setting is a boolean, and it accepts only "true" and "false".
[ "Sets", "the", "setting", "for", "a", "certain", "question", ".", "The", "setting", "is", "a", "boolean", "and", "it", "accepts", "only", "true", "and", "false", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/io/setting/IntegerIOSetting.java#L41-L49
SpartaTech/sparta-spring-web-utils
src/main/java/org/sparta/springwebutils/util/ExternalEntryPointHelper.java
ExternalEntryPointHelper.isAnEntryPoint
public static boolean isAnEntryPoint(Method method, boolean scanEntryPointAnnotation) { """ Returns whether the supplied method is an Entry Point or not. It might be annotated by @ExternalEntryPoint @param method Method to be scanned @param scanEntryPointAnnotation Does it has annotation @return boolean ...
java
public static boolean isAnEntryPoint(Method method, boolean scanEntryPointAnnotation) { return !scanEntryPointAnnotation || scanEntryPointAnnotation && method.isAnnotationPresent(ExternalEntryPoint.class) || scanEntryPointAnnotation && method.getDeclaringClass().isAnnotationPresent(ExternalEntryPoint.class);...
[ "public", "static", "boolean", "isAnEntryPoint", "(", "Method", "method", ",", "boolean", "scanEntryPointAnnotation", ")", "{", "return", "!", "scanEntryPointAnnotation", "||", "scanEntryPointAnnotation", "&&", "method", ".", "isAnnotationPresent", "(", "ExternalEntryPoin...
Returns whether the supplied method is an Entry Point or not. It might be annotated by @ExternalEntryPoint @param method Method to be scanned @param scanEntryPointAnnotation Does it has annotation @return boolean
[ "Returns", "whether", "the", "supplied", "method", "is", "an", "Entry", "Point", "or", "not", ".", "It", "might", "be", "annotated", "by", "@ExternalEntryPoint" ]
train
https://github.com/SpartaTech/sparta-spring-web-utils/blob/f5382474d46a6048d58707fc64e7936277e8b2ce/src/main/java/org/sparta/springwebutils/util/ExternalEntryPointHelper.java#L38-L42
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/base64/Base64.java
Base64.encodeFromFile
@Nonnull public static String encodeFromFile (@Nonnull final String filename) throws IOException { """ Convenience method for reading a binary file and base64-encoding it. <p> As of v 2.3, if there is a error, the method will throw an IOException. <b>This is new to v2.3!</b> In earlier versions, it just retur...
java
@Nonnull public static String encodeFromFile (@Nonnull final String filename) throws IOException { // Setup some useful variables final File file = new File (filename); // Open a stream try (final Base64InputStream bis = new Base64InputStream (FileHelper.getBufferedInputStream (file), ENCODE)) ...
[ "@", "Nonnull", "public", "static", "String", "encodeFromFile", "(", "@", "Nonnull", "final", "String", "filename", ")", "throws", "IOException", "{", "// Setup some useful variables", "final", "File", "file", "=", "new", "File", "(", "filename", ")", ";", "// O...
Convenience method for reading a binary file and base64-encoding it. <p> As of v 2.3, if there is a error, the method will throw an IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it. </p> @param filename Filename for reading bi...
[ "Convenience", "method", "for", "reading", "a", "binary", "file", "and", "base64", "-", "encoding", "it", ".", "<p", ">", "As", "of", "v", "2", ".", "3", "if", "there", "is", "a", "error", "the", "method", "will", "throw", "an", "IOException", ".", "...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/base64/Base64.java#L2460-L2485
landawn/AbacusUtil
src/com/landawn/abacus/util/StringUtil.java
StringUtil.indexOfDifference
public static int indexOfDifference(final String a, final String b) { """ <p> Compares two Strings, and returns the index at which the Stringss begin to differ. </p> <p> For example, {@code indexOfDifference("i am a machine", "i am a robot") -> 7} </p> <pre> N.indexOfDifference(null, null) = -1 N.ind...
java
public static int indexOfDifference(final String a, final String b) { if (N.equals(a, b) || (N.isNullOrEmpty(a) && N.isNullOrEmpty(b))) { return N.INDEX_NOT_FOUND; } if (N.isNullOrEmpty(a) || N.isNullOrEmpty(b)) { return 0; } int i = 0; ...
[ "public", "static", "int", "indexOfDifference", "(", "final", "String", "a", ",", "final", "String", "b", ")", "{", "if", "(", "N", ".", "equals", "(", "a", ",", "b", ")", "||", "(", "N", ".", "isNullOrEmpty", "(", "a", ")", "&&", "N", ".", "isNu...
<p> Compares two Strings, and returns the index at which the Stringss begin to differ. </p> <p> For example, {@code indexOfDifference("i am a machine", "i am a robot") -> 7} </p> <pre> N.indexOfDifference(null, null) = -1 N.indexOfDifference("", "") = -1 N.indexOfDifference("", "abc") = 0 N.indexOfDifference("abc", "...
[ "<p", ">", "Compares", "two", "Strings", "and", "returns", "the", "index", "at", "which", "the", "Stringss", "begin", "to", "differ", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/StringUtil.java#L4065-L4086
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java
ReferenceElement.addMention
public static void addMention(Stanza stanza, int begin, int end, BareJid jid) { """ Add a reference to another users bare jid to a stanza. @param stanza stanza. @param begin start index of the mention in the messages body. @param end end index of the mention in the messages body. @param jid referenced jid. ...
java
public static void addMention(Stanza stanza, int begin, int end, BareJid jid) { URI uri; try { uri = new URI("xmpp:" + jid.toString()); } catch (URISyntaxException e) { throw new AssertionError("Cannot create URI from bareJid."); } ReferenceElement referen...
[ "public", "static", "void", "addMention", "(", "Stanza", "stanza", ",", "int", "begin", ",", "int", "end", ",", "BareJid", "jid", ")", "{", "URI", "uri", ";", "try", "{", "uri", "=", "new", "URI", "(", "\"xmpp:\"", "+", "jid", ".", "toString", "(", ...
Add a reference to another users bare jid to a stanza. @param stanza stanza. @param begin start index of the mention in the messages body. @param end end index of the mention in the messages body. @param jid referenced jid.
[ "Add", "a", "reference", "to", "another", "users", "bare", "jid", "to", "a", "stanza", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/reference/element/ReferenceElement.java#L129-L138
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java
XPathUtils.evaluateAsBoolean
public static Boolean evaluateAsBoolean(Node node, String xPathExpression, NamespaceContext nsContext) { """ Evaluate XPath expression with result type Boolean value. @param node @param xPathExpression @param nsContext @return """ return (Boolean) evaluateExpression(node, xPathExpression, nsContext...
java
public static Boolean evaluateAsBoolean(Node node, String xPathExpression, NamespaceContext nsContext) { return (Boolean) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.BOOLEAN); }
[ "public", "static", "Boolean", "evaluateAsBoolean", "(", "Node", "node", ",", "String", "xPathExpression", ",", "NamespaceContext", "nsContext", ")", "{", "return", "(", "Boolean", ")", "evaluateExpression", "(", "node", ",", "xPathExpression", ",", "nsContext", "...
Evaluate XPath expression with result type Boolean value. @param node @param xPathExpression @param nsContext @return
[ "Evaluate", "XPath", "expression", "with", "result", "type", "Boolean", "value", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L234-L236
haifengl/smile
core/src/main/java/smile/association/ARM.java
ARM.learn
public long learn(double confidence, PrintStream out) { """ Mines the association rules. The discovered rules will be printed out to the provided stream. @param confidence the confidence threshold for association rules. @return the number of discovered association rules. """ long n = 0; ttre...
java
public long learn(double confidence, PrintStream out) { long n = 0; ttree = fim.buildTotalSupportTree(); for (int i = 0; i < ttree.root.children.length; i++) { if (ttree.root.children[i] != null) { int[] itemset = {ttree.root.children[i].id}; n += lear...
[ "public", "long", "learn", "(", "double", "confidence", ",", "PrintStream", "out", ")", "{", "long", "n", "=", "0", ";", "ttree", "=", "fim", ".", "buildTotalSupportTree", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ttree", "."...
Mines the association rules. The discovered rules will be printed out to the provided stream. @param confidence the confidence threshold for association rules. @return the number of discovered association rules.
[ "Mines", "the", "association", "rules", ".", "The", "discovered", "rules", "will", "be", "printed", "out", "to", "the", "provided", "stream", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/ARM.java#L111-L121
redkale/redkale
src/org/redkale/convert/json/JsonByteBufferReader.java
JsonByteBufferReader.hasNext
@Override public boolean hasNext(int startPosition, int contentLength) { """ 判断对象是否存在下一个属性或者数组是否存在下一个元素 @param startPosition 起始位置 @param contentLength 内容大小, 不确定的传-1 @return 是否存在 """ char ch = nextGoodChar(); if (ch == ',') return true; if (ch == '}' || ch == ']' || ch == ...
java
@Override public boolean hasNext(int startPosition, int contentLength) { char ch = nextGoodChar(); if (ch == ',') return true; if (ch == '}' || ch == ']' || ch == 0) return false; backChar(ch); // { [ 交由 readObjectB 或 readMapB 或 readArrayB 读取 return true; }
[ "@", "Override", "public", "boolean", "hasNext", "(", "int", "startPosition", ",", "int", "contentLength", ")", "{", "char", "ch", "=", "nextGoodChar", "(", ")", ";", "if", "(", "ch", "==", "'", "'", ")", "return", "true", ";", "if", "(", "ch", "==",...
判断对象是否存在下一个属性或者数组是否存在下一个元素 @param startPosition 起始位置 @param contentLength 内容大小, 不确定的传-1 @return 是否存在
[ "判断对象是否存在下一个属性或者数组是否存在下一个元素" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/convert/json/JsonByteBufferReader.java#L189-L196
google/closure-templates
java/src/com/google/template/soy/msgs/internal/SoyMsgIdComputer.java
SoyMsgIdComputer.computeMsgId
static long computeMsgId( ImmutableList<SoyMsgPart> msgParts, @Nullable String meaning, @Nullable String contentType) { """ Computes the unique message id for a message, given the message parts, the meaning string (if any), and the content type (if any). These are the only elements incorporated into the mes...
java
static long computeMsgId( ImmutableList<SoyMsgPart> msgParts, @Nullable String meaning, @Nullable String contentType) { return computeMsgIdHelper(msgParts, false, meaning, contentType); }
[ "static", "long", "computeMsgId", "(", "ImmutableList", "<", "SoyMsgPart", ">", "msgParts", ",", "@", "Nullable", "String", "meaning", ",", "@", "Nullable", "String", "contentType", ")", "{", "return", "computeMsgIdHelper", "(", "msgParts", ",", "false", ",", ...
Computes the unique message id for a message, given the message parts, the meaning string (if any), and the content type (if any). These are the only elements incorporated into the message id. <p>In particular, note that the id of a message does not change when its desc changes. @param msgParts The parts of the messa...
[ "Computes", "the", "unique", "message", "id", "for", "a", "message", "given", "the", "message", "parts", "the", "meaning", "string", "(", "if", "any", ")", "and", "the", "content", "type", "(", "if", "any", ")", ".", "These", "are", "the", "only", "ele...
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/msgs/internal/SoyMsgIdComputer.java#L49-L52
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.getEpics
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException { """ Gets all epics of the requested group and its subgroups using the specified page and per page setting. <pr...
java
public List<Epic> getEpics(Object groupIdOrPath, Integer authorId, String labels, EpicOrderBy orderBy, SortOrder sortOrder, String search, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm(page, perPage) .withParam("author_id", authorId) ...
[ "public", "List", "<", "Epic", ">", "getEpics", "(", "Object", "groupIdOrPath", ",", "Integer", "authorId", ",", "String", "labels", ",", "EpicOrderBy", "orderBy", ",", "SortOrder", "sortOrder", ",", "String", "search", ",", "int", "page", ",", "int", "perPa...
Gets all epics of the requested group and its subgroups using the specified page and per page setting. <pre><code>GitLab Endpoint: GET /groups/:id/epics</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param authorId returns epics created by the give...
[ "Gets", "all", "epics", "of", "the", "requested", "group", "and", "its", "subgroups", "using", "the", "specified", "page", "and", "per", "page", "setting", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L124-L134
samskivert/samskivert
src/main/java/com/samskivert/util/PrefsConfig.java
PrefsConfig.setValue
public void setValue (String name, int value) { """ Sets the value of the specified preference, overriding the value defined in the configuration files shipped with the application. """ Integer oldValue = null; if (_prefs.get(name, null) != null || _props.getProperty(name) != null) { ...
java
public void setValue (String name, int value) { Integer oldValue = null; if (_prefs.get(name, null) != null || _props.getProperty(name) != null) { oldValue = Integer.valueOf(_prefs.getInt(name, super.getValue(name, 0))); } _prefs.putInt(name, value); _propsup.fir...
[ "public", "void", "setValue", "(", "String", "name", ",", "int", "value", ")", "{", "Integer", "oldValue", "=", "null", ";", "if", "(", "_prefs", ".", "get", "(", "name", ",", "null", ")", "!=", "null", "||", "_props", ".", "getProperty", "(", "name"...
Sets the value of the specified preference, overriding the value defined in the configuration files shipped with the application.
[ "Sets", "the", "value", "of", "the", "specified", "preference", "overriding", "the", "value", "defined", "in", "the", "configuration", "files", "shipped", "with", "the", "application", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PrefsConfig.java#L69-L78
kenyee/android-ddp-client
src/com/keysolutions/ddpclient/android/DDPStateSingleton.java
DDPStateSingleton.removeDoc
public boolean removeDoc(String collName, String docId) { """ Handles deleting a document in a collection. Override if you want to use your own collection data store. @param collName collection name @param docId document ID @return true if doc was deleted, false otherwise """ if (mCollections.conta...
java
public boolean removeDoc(String collName, String docId) { if (mCollections.containsKey(collName)) { // remove IDs from collection Map<String, Map<String,Object>> collection = mCollections.get(collName); if (BuildConfig.DEBUG) { log.debug("Removed doc: " + docI...
[ "public", "boolean", "removeDoc", "(", "String", "collName", ",", "String", "docId", ")", "{", "if", "(", "mCollections", ".", "containsKey", "(", "collName", ")", ")", "{", "// remove IDs from collection", "Map", "<", "String", ",", "Map", "<", "String", ",...
Handles deleting a document in a collection. Override if you want to use your own collection data store. @param collName collection name @param docId document ID @return true if doc was deleted, false otherwise
[ "Handles", "deleting", "a", "document", "in", "a", "collection", ".", "Override", "if", "you", "want", "to", "use", "your", "own", "collection", "data", "store", "." ]
train
https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L731-L745
LMAX-Exchange/disruptor
src/main/java/com/lmax/disruptor/dsl/Disruptor.java
Disruptor.handleEventsWith
@SafeVarargs public final EventHandlerGroup<T> handleEventsWith(final EventProcessorFactory<T>... eventProcessorFactories) { """ <p>Set up custom event processors to handle events from the ring buffer. The Disruptor will automatically start these processors when {@link #start()} is called.</p> <p>This meth...
java
@SafeVarargs public final EventHandlerGroup<T> handleEventsWith(final EventProcessorFactory<T>... eventProcessorFactories) { final Sequence[] barrierSequences = new Sequence[0]; return createEventProcessors(barrierSequences, eventProcessorFactories); }
[ "@", "SafeVarargs", "public", "final", "EventHandlerGroup", "<", "T", ">", "handleEventsWith", "(", "final", "EventProcessorFactory", "<", "T", ">", "...", "eventProcessorFactories", ")", "{", "final", "Sequence", "[", "]", "barrierSequences", "=", "new", "Sequenc...
<p>Set up custom event processors to handle events from the ring buffer. The Disruptor will automatically start these processors when {@link #start()} is called.</p> <p>This method can be used as the start of a chain. For example if the handler <code>A</code> must process events before handler <code>B</code>:</p> <pre...
[ "<p", ">", "Set", "up", "custom", "event", "processors", "to", "handle", "events", "from", "the", "ring", "buffer", ".", "The", "Disruptor", "will", "automatically", "start", "these", "processors", "when", "{", "@link", "#start", "()", "}", "is", "called", ...
train
https://github.com/LMAX-Exchange/disruptor/blob/4266d00c5250190313446fdd7c8aa7a4edb5c818/src/main/java/com/lmax/disruptor/dsl/Disruptor.java#L188-L193
infinispan/infinispan
core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java
CacheNotifierImpl.addListenerAsync
@Override public <C> CompletionStage<Void> addListenerAsync(Object listener, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, C> converter, ClassLoader classLoader) { """ Adds the listener using the provided filter converter and class loader...
java
@Override public <C> CompletionStage<Void> addListenerAsync(Object listener, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, C> converter, ClassLoader classLoader) { return addListenerInternal(listener, DataConversion.IDENTITY_KEY, DataCon...
[ "@", "Override", "public", "<", "C", ">", "CompletionStage", "<", "Void", ">", "addListenerAsync", "(", "Object", "listener", ",", "CacheEventFilter", "<", "?", "super", "K", ",", "?", "super", "V", ">", "filter", ",", "CacheEventConverter", "<", "?", "sup...
Adds the listener using the provided filter converter and class loader. The provided builder is used to add additional configuration including (clustered, onlyPrimary & identifier) which can be used after this method is completed to see what values were used in the addition of this listener @param listener @param fil...
[ "Adds", "the", "listener", "using", "the", "provided", "filter", "converter", "and", "class", "loader", ".", "The", "provided", "builder", "is", "used", "to", "add", "additional", "configuration", "including", "(", "clustered", "onlyPrimary", "&", "identifier", ...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java#L1183-L1187
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jAliasResolver.java
Neo4jAliasResolver.findAlias
public String findAlias(String entityAlias, List<String> propertyPathWithoutAlias) { """ Given the alias of the entity and the path to the relationship it will return the alias of the component. @param entityAlias the alias of the entity @param propertyPathWithoutAlias the path to the property without the ali...
java
public String findAlias(String entityAlias, List<String> propertyPathWithoutAlias) { RelationshipAliasTree aliasTree = relationshipAliases.get( entityAlias ); if ( aliasTree == null ) { return null; } RelationshipAliasTree associationAlias = aliasTree; for ( int i = 0; i < propertyPathWithoutAlias.size(); ...
[ "public", "String", "findAlias", "(", "String", "entityAlias", ",", "List", "<", "String", ">", "propertyPathWithoutAlias", ")", "{", "RelationshipAliasTree", "aliasTree", "=", "relationshipAliases", ".", "get", "(", "entityAlias", ")", ";", "if", "(", "aliasTree"...
Given the alias of the entity and the path to the relationship it will return the alias of the component. @param entityAlias the alias of the entity @param propertyPathWithoutAlias the path to the property without the alias @return the alias the relationship or null
[ "Given", "the", "alias", "of", "the", "entity", "and", "the", "path", "to", "the", "relationship", "it", "will", "return", "the", "alias", "of", "the", "component", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jAliasResolver.java#L130-L143
googleads/googleads-java-lib
modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/AdManagerJaxWsHeaderHandler.java
AdManagerJaxWsHeaderHandler.constructSoapHeader
private SOAPElement constructSoapHeader( Map<String, Object> headerData, AdManagerServiceDescriptor adManagerServiceDescriptor) { """ Constructs a SOAP header object ready to be attached to a JAX-WS client. @param headerData a map of SOAP header element names to values @param adManagerServiceDescriptor t...
java
private SOAPElement constructSoapHeader( Map<String, Object> headerData, AdManagerServiceDescriptor adManagerServiceDescriptor) { String requestHeaderNamespace = adManagerApiConfiguration.getNamespacePrefix() + "/" + adManagerServiceDescriptor.getVersion(); try { SOA...
[ "private", "SOAPElement", "constructSoapHeader", "(", "Map", "<", "String", ",", "Object", ">", "headerData", ",", "AdManagerServiceDescriptor", "adManagerServiceDescriptor", ")", "{", "String", "requestHeaderNamespace", "=", "adManagerApiConfiguration", ".", "getNamespaceP...
Constructs a SOAP header object ready to be attached to a JAX-WS client. @param headerData a map of SOAP header element names to values @param adManagerServiceDescriptor the descriptor of which service's headers are being created @return a SOAP header object
[ "Constructs", "a", "SOAP", "header", "object", "ready", "to", "be", "attached", "to", "a", "JAX", "-", "WS", "client", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/AdManagerJaxWsHeaderHandler.java#L136-L158
roboconf/roboconf-platform
miscellaneous/roboconf-maven-plugin/src/main/java/net/roboconf/maven/MavenPluginUtils.java
MavenPluginUtils.formatErrors
public static StringBuilder formatErrors( Collection<? extends RoboconfError> errors, Log log ) { """ Formats a Roboconf errors and outputs it in the logs. @param error an error @param log the Maven logger @return a string builder with the output """ StringBuilder result = new StringBuilder(); for( Map...
java
public static StringBuilder formatErrors( Collection<? extends RoboconfError> errors, Log log ) { StringBuilder result = new StringBuilder(); for( Map.Entry<RoboconfError,String> entry : RoboconfErrorHelpers.formatErrors( errors, null, true ).entrySet()) { if( entry.getKey().getErrorCode().getLevel() == ErrorLe...
[ "public", "static", "StringBuilder", "formatErrors", "(", "Collection", "<", "?", "extends", "RoboconfError", ">", "errors", ",", "Log", "log", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", ...
Formats a Roboconf errors and outputs it in the logs. @param error an error @param log the Maven logger @return a string builder with the output
[ "Formats", "a", "Roboconf", "errors", "and", "outputs", "it", "in", "the", "logs", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-maven-plugin/src/main/java/net/roboconf/maven/MavenPluginUtils.java#L56-L70
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.selectTerm
public Term selectTerm(final long id) throws SQLException { """ Selects a term by id. @param id The id. @return The term or {@code null} if none. @throws SQLException on database error. """ Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; Timer.Context ctx ...
java
public Term selectTerm(final long id) throws SQLException { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; Timer.Context ctx = metrics.selectTermTimer.time(); try { conn = connectionSupplier.getConnection(); stmt = conn.prepareStatement(select...
[ "public", "Term", "selectTerm", "(", "final", "long", "id", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "ResultSet", "rs", "=", "null", ";", "Timer", ".", "Context", "ctx", "=",...
Selects a term by id. @param id The id. @return The term or {@code null} if none. @throws SQLException on database error.
[ "Selects", "a", "term", "by", "id", "." ]
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L2179-L2194
apereo/cas
support/cas-server-support-mongo-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/MongoDbTicketRegistry.java
MongoDbTicketRegistry.removeDifferingIndexIfAny
private static void removeDifferingIndexIfAny(final MongoCollection collection, final Index index) { """ Remove any index with the same indexKey but differing indexOptions in anticipation of recreating it. @param collection The collection to check the indexes of @param index The index to find """ ...
java
private static void removeDifferingIndexIfAny(final MongoCollection collection, final Index index) { val indexes = (ListIndexesIterable<Document>) collection.listIndexes(); var indexExistsWithDifferentOptions = false; for (val existingIndex : indexes) { val keyMatches = existingInde...
[ "private", "static", "void", "removeDifferingIndexIfAny", "(", "final", "MongoCollection", "collection", ",", "final", "Index", "index", ")", "{", "val", "indexes", "=", "(", "ListIndexesIterable", "<", "Document", ">", ")", "collection", ".", "listIndexes", "(", ...
Remove any index with the same indexKey but differing indexOptions in anticipation of recreating it. @param collection The collection to check the indexes of @param index The index to find
[ "Remove", "any", "index", "with", "the", "same", "indexKey", "but", "differing", "indexOptions", "in", "anticipation", "of", "recreating", "it", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-mongo-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/MongoDbTicketRegistry.java#L110-L125
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/version/DependsFileParser.java
DependsFileParser.getVersionMap
public static SortedMap<String, String> getVersionMap(final String artifactId) { """ Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR. @param artifactId This plugin's artifactId. @return A SortedMap relating [groupId]/[artifactId] keys to Depende...
java
public static SortedMap<String, String> getVersionMap(final String artifactId) { // Check sanity Validate.notEmpty(artifactId, "artifactNamePart"); Exception extractionException = null; try { // Get the ClassLoader used final ClassLoader contextClassLoader = Th...
[ "public", "static", "SortedMap", "<", "String", ",", "String", ">", "getVersionMap", "(", "final", "String", "artifactId", ")", "{", "// Check sanity", "Validate", ".", "notEmpty", "(", "artifactId", ",", "\"artifactNamePart\"", ")", ";", "Exception", "extractionE...
Extracts all build-time dependency information from a dependencies.properties file embedded in this plugin's JAR. @param artifactId This plugin's artifactId. @return A SortedMap relating [groupId]/[artifactId] keys to DependencyInfo values. @throws java.lang.IllegalStateException if no artifact in the current Thread's...
[ "Extracts", "all", "build", "-", "time", "dependency", "information", "from", "a", "dependencies", ".", "properties", "file", "embedded", "in", "this", "plugin", "s", "JAR", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/version/DependsFileParser.java#L99-L135
CubeEngine/Dirigent
src/main/java/org/cubeengine/dirigent/formatter/DateTimeFormatter.java
DateTimeFormatter.parseDateToString
protected String parseDateToString(Date date, Context context, Arguments args) { """ Parses the given date to a string depending on the context. @param date The date to parse. @param context The context to use. @param args The arguments of the macro. @return The number as a string. """ final Da...
java
protected String parseDateToString(Date date, Context context, Arguments args) { final DateFormat dateFormat = parseFormatter(context, args); dateFormat.setTimeZone(context.get(Contexts.TIMEZONE)); return dateFormat.format(date); }
[ "protected", "String", "parseDateToString", "(", "Date", "date", ",", "Context", "context", ",", "Arguments", "args", ")", "{", "final", "DateFormat", "dateFormat", "=", "parseFormatter", "(", "context", ",", "args", ")", ";", "dateFormat", ".", "setTimeZone", ...
Parses the given date to a string depending on the context. @param date The date to parse. @param context The context to use. @param args The arguments of the macro. @return The number as a string.
[ "Parses", "the", "given", "date", "to", "a", "string", "depending", "on", "the", "context", "." ]
train
https://github.com/CubeEngine/Dirigent/blob/68587a8202754a6a6b629cc15e14c516806badaa/src/main/java/org/cubeengine/dirigent/formatter/DateTimeFormatter.java#L121-L126
looly/hulu
src/main/java/com/xiaoleilu/hulu/Request.java
Request.convertGetMethodParamValue
private static String convertGetMethodParamValue(String value, String charsetOfServlet) { """ 转换值得编码 会根据浏览器类型自动识别GET请求的编码方式从而解码<br> 考虑到Servlet容器中会首先解码,给定的charsetOfServlet就是Servlet设置的解码charset<br> charsetOfServlet为null则默认的ISO_8859_1 @param value 值 @param charsetOfServlet Servlet的编码 @return 转换后的字符串 """ ...
java
private static String convertGetMethodParamValue(String value, String charsetOfServlet) { if (isGetMethod()) { if (null == charsetOfServlet) { charsetOfServlet = CharsetUtil.ISO_8859_1; } String destCharset = CharsetUtil.UTF_8; if (isIE()) { // IE浏览器GET请求使用GBK编码 destCharset = Charset...
[ "private", "static", "String", "convertGetMethodParamValue", "(", "String", "value", ",", "String", "charsetOfServlet", ")", "{", "if", "(", "isGetMethod", "(", ")", ")", "{", "if", "(", "null", "==", "charsetOfServlet", ")", "{", "charsetOfServlet", "=", "Cha...
转换值得编码 会根据浏览器类型自动识别GET请求的编码方式从而解码<br> 考虑到Servlet容器中会首先解码,给定的charsetOfServlet就是Servlet设置的解码charset<br> charsetOfServlet为null则默认的ISO_8859_1 @param value 值 @param charsetOfServlet Servlet的编码 @return 转换后的字符串
[ "转换值得编码", "会根据浏览器类型自动识别GET请求的编码方式从而解码<br", ">", "考虑到Servlet容器中会首先解码,给定的charsetOfServlet就是Servlet设置的解码charset<br", ">", "charsetOfServlet为null则默认的ISO_8859_1" ]
train
https://github.com/looly/hulu/blob/4072de684e2e2f28ac8a3a44c0d5a690b289ef28/src/main/java/com/xiaoleilu/hulu/Request.java#L614-L629
kuujo/vertigo
util/src/main/java/net/kuujo/vertigo/io/FileSender.java
FileSender.sendFile
public FileSender sendFile(final AsyncFile file, final Handler<AsyncResult<Void>> doneHandler) { """ Sends a file on the output port. @param file The file to send. @param doneHandler An asynchronous handler to be called once the file has been sent. @return The file sender. """ output.group("file", "fi...
java
public FileSender sendFile(final AsyncFile file, final Handler<AsyncResult<Void>> doneHandler) { output.group("file", "file", new Handler<OutputGroup>() { @Override public void handle(OutputGroup group) { doSendFile(file, group, doneHandler); } }); return this; }
[ "public", "FileSender", "sendFile", "(", "final", "AsyncFile", "file", ",", "final", "Handler", "<", "AsyncResult", "<", "Void", ">", ">", "doneHandler", ")", "{", "output", ".", "group", "(", "\"file\"", ",", "\"file\"", ",", "new", "Handler", "<", "Outpu...
Sends a file on the output port. @param file The file to send. @param doneHandler An asynchronous handler to be called once the file has been sent. @return The file sender.
[ "Sends", "a", "file", "on", "the", "output", "port", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/util/src/main/java/net/kuujo/vertigo/io/FileSender.java#L65-L73
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/Bootstrap.java
Bootstrap.runAsApplication
public static void runAsApplication(Game game, int width, int height, boolean fullscreen) { """ Start the game as an application @param game The game to be started @param width The width of the window @param height The height of the window @param fullscreen True if the window should be fullscreen """ ...
java
public static void runAsApplication(Game game, int width, int height, boolean fullscreen) { try { AppGameContainer container = new AppGameContainer(game, width, height, fullscreen); container.start(); } catch (Exception e) { e.printStackTrace(); } }
[ "public", "static", "void", "runAsApplication", "(", "Game", "game", ",", "int", "width", ",", "int", "height", ",", "boolean", "fullscreen", ")", "{", "try", "{", "AppGameContainer", "container", "=", "new", "AppGameContainer", "(", "game", ",", "width", ",...
Start the game as an application @param game The game to be started @param width The width of the window @param height The height of the window @param fullscreen True if the window should be fullscreen
[ "Start", "the", "game", "as", "an", "application" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/Bootstrap.java#L21-L28
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/core/ResourcePath.java
ResourcePath.getResource
public String getResource(final int level) { """ Returns the resource at the specified level. @param level resource level @return resource """ if (level < resource.length) { return resource[level]; } // offset is out of bounds... throw new IndexOutOfBoundsE...
java
public String getResource(final int level) { if (level < resource.length) { return resource[level]; } // offset is out of bounds... throw new IndexOutOfBoundsException("Index: " + level + ", Size: " + resource.length); }
[ "public", "String", "getResource", "(", "final", "int", "level", ")", "{", "if", "(", "level", "<", "resource", ".", "length", ")", "{", "return", "resource", "[", "level", "]", ";", "}", "// offset is out of bounds...\r", "throw", "new", "IndexOutOfBoundsExce...
Returns the resource at the specified level. @param level resource level @return resource
[ "Returns", "the", "resource", "at", "the", "specified", "level", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/core/ResourcePath.java#L125-L131
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/CheckedExceptionsFactory.java
CheckedExceptionsFactory.newIOException
public static IOException newIOException(String message, Object... args) { """ Constructs and initializes a new {@link IOException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IOException exception}. @param args...
java
public static IOException newIOException(String message, Object... args) { return newIOException(null, message, args); }
[ "public", "static", "IOException", "newIOException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newIOException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link IOException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IOException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@link String mes...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IOException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/CheckedExceptionsFactory.java#L75-L77
Alluxio/alluxio
underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java
KodoClient.getObject
public InputStream getObject(String key, long startPos, long endPos, long contentLength) throws IOException { """ Gets object from Qiniu kodo. All requests are authenticated by default,default expires 3600s We use okhttp as our HTTP client and support two main parameters in the external adjustment, MAX req...
java
public InputStream getObject(String key, long startPos, long endPos, long contentLength) throws IOException { String baseUrl = String.format("http://%s/%s", mDownloadHost, key); String privateUrl = mAuth.privateDownloadUrl(baseUrl); URL url = new URL(privateUrl); String objectUrl = String.format("...
[ "public", "InputStream", "getObject", "(", "String", "key", ",", "long", "startPos", ",", "long", "endPos", ",", "long", "contentLength", ")", "throws", "IOException", "{", "String", "baseUrl", "=", "String", ".", "format", "(", "\"http://%s/%s\"", ",", "mDown...
Gets object from Qiniu kodo. All requests are authenticated by default,default expires 3600s We use okhttp as our HTTP client and support two main parameters in the external adjustment, MAX request and timeout time. @param key object key @param startPos start index for object @param endPos end index for object @return ...
[ "Gets", "object", "from", "Qiniu", "kodo", ".", "All", "requests", "are", "authenticated", "by", "default,default", "expires", "3600s", "We", "use", "okhttp", "as", "our", "HTTP", "client", "and", "support", "two", "main", "parameters", "in", "the", "external"...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java#L106-L126
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java
Histogram_F64.setRange
public void setRange( int dimension , double min , double max ) { """ Specifies the minimum and maximum values for a specific dimension @param dimension Which dimension @param min The minimum value @param max The maximum value """ valueMin[dimension] = min; valueMax[dimension] = max; }
java
public void setRange( int dimension , double min , double max ) { valueMin[dimension] = min; valueMax[dimension] = max; }
[ "public", "void", "setRange", "(", "int", "dimension", ",", "double", "min", ",", "double", "max", ")", "{", "valueMin", "[", "dimension", "]", "=", "min", ";", "valueMax", "[", "dimension", "]", "=", "max", ";", "}" ]
Specifies the minimum and maximum values for a specific dimension @param dimension Which dimension @param min The minimum value @param max The maximum value
[ "Specifies", "the", "minimum", "and", "maximum", "values", "for", "a", "specific", "dimension" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/color/Histogram_F64.java#L115-L118
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Util.java
Util.getValueByBinStr
protected static int getValueByBinStr(String binaryString, boolean signed) { """ Get a value for specified bits from the binary string. @param fromBit @param toBit @return @throws AisParseException """ Integer value = Integer.parseInt(binaryString, 2); if (signed && binaryString.charAt(0) == '1') { ...
java
protected static int getValueByBinStr(String binaryString, boolean signed) { Integer value = Integer.parseInt(binaryString, 2); if (signed && binaryString.charAt(0) == '1') { char[] invert = new char[binaryString.length()]; Arrays.fill(invert, '1'); value ^= Integer.parseInt(new String(invert), 2); val...
[ "protected", "static", "int", "getValueByBinStr", "(", "String", "binaryString", ",", "boolean", "signed", ")", "{", "Integer", "value", "=", "Integer", ".", "parseInt", "(", "binaryString", ",", "2", ")", ";", "if", "(", "signed", "&&", "binaryString", ".",...
Get a value for specified bits from the binary string. @param fromBit @param toBit @return @throws AisParseException
[ "Get", "a", "value", "for", "specified", "bits", "from", "the", "binary", "string", "." ]
train
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Util.java#L30-L42
wcm-io/wcm-io-handler
richtext/src/main/java/io/wcm/handler/richtext/DefaultRewriteContentHandler.java
DefaultRewriteContentHandler.buildImageElement
private Element buildImageElement(Media media, Element element) { """ Builds image element for given media metadata. @param media Media metadata @param element Original element @return Image element or null if media reference is invalid """ if (media.isValid()) { element.setAttribute("src", media....
java
private Element buildImageElement(Media media, Element element) { if (media.isValid()) { element.setAttribute("src", media.getUrl()); } return element; }
[ "private", "Element", "buildImageElement", "(", "Media", "media", ",", "Element", "element", ")", "{", "if", "(", "media", ".", "isValid", "(", ")", ")", "{", "element", ".", "setAttribute", "(", "\"src\"", ",", "media", ".", "getUrl", "(", ")", ")", "...
Builds image element for given media metadata. @param media Media metadata @param element Original element @return Image element or null if media reference is invalid
[ "Builds", "image", "element", "for", "given", "media", "metadata", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/richtext/src/main/java/io/wcm/handler/richtext/DefaultRewriteContentHandler.java#L416-L421
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.addCol
public static void addCol(Matrix A, int j, double c) { """ Updates the values of column <tt>j</tt> in the given matrix to be A[:,j] = A[:,j]+ c @param A the matrix to perform he update on @param j the row to update @param c the constant to add to each element """ addCol(A, j, 0, A.rows(), c); ...
java
public static void addCol(Matrix A, int j, double c) { addCol(A, j, 0, A.rows(), c); }
[ "public", "static", "void", "addCol", "(", "Matrix", "A", ",", "int", "j", ",", "double", "c", ")", "{", "addCol", "(", "A", ",", "j", ",", "0", ",", "A", ".", "rows", "(", ")", ",", "c", ")", ";", "}" ]
Updates the values of column <tt>j</tt> in the given matrix to be A[:,j] = A[:,j]+ c @param A the matrix to perform he update on @param j the row to update @param c the constant to add to each element
[ "Updates", "the", "values", "of", "column", "<tt", ">", "j<", "/", "tt", ">", "in", "the", "given", "matrix", "to", "be", "A", "[", ":", "j", "]", "=", "A", "[", ":", "j", "]", "+", "c" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L190-L193
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java
SyncMembersInner.beginUpdate
public SyncMemberInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { """ Updates an existing sync member. @param resourceGroupName The name of the resource group that contains the resource. You can obtain ...
java
public SyncMemberInner beginUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).toBlo...
[ "public", "SyncMemberInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ",", "String", "syncMemberName", ",", "SyncMemberInner", "parameters", ")", "{", "return", "begi...
Updates an existing sync member. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hosted. @pa...
[ "Updates", "an", "existing", "sync", "member", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java#L751-L753
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findResult
public static <T, U> T findResult(Iterator<U> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> condition) { """ Iterates through the Iterator calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null,...
java
public static <T, U> T findResult(Iterator<U> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> condition) { while (self.hasNext()) { U next = self.next(); T result = condition.call(next); if (result != null) { return result; } ...
[ "public", "static", "<", "T", ",", "U", ">", "T", "findResult", "(", "Iterator", "<", "U", ">", "self", ",", "@", "ClosureParams", "(", "FirstParam", ".", "FirstGenericType", ".", "class", ")", "Closure", "<", "T", ">", "condition", ")", "{", "while", ...
Iterates through the Iterator calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null, null is returned. @param self an Iterator @param condition a closure that returns a non-null value to indicate that processing sh...
[ "Iterates", "through", "the", "Iterator", "calling", "the", "given", "closure", "condition", "for", "each", "item", "but", "stopping", "once", "the", "first", "non", "-", "null", "result", "is", "found", "and", "returning", "that", "result", ".", "If", "all"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4504-L4513
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPRuleAssetCategoryRelPersistenceImpl.java
CPRuleAssetCategoryRelPersistenceImpl.findByAssetCategoryId
@Override public List<CPRuleAssetCategoryRel> findByAssetCategoryId( long assetCategoryId, int start, int end) { """ Returns a range of all the cp rule asset category rels where assetCategoryId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start<...
java
@Override public List<CPRuleAssetCategoryRel> findByAssetCategoryId( long assetCategoryId, int start, int end) { return findByAssetCategoryId(assetCategoryId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPRuleAssetCategoryRel", ">", "findByAssetCategoryId", "(", "long", "assetCategoryId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByAssetCategoryId", "(", "assetCategoryId", ",", "start", ",", "end", ...
Returns a range of all the cp rule asset category rels where assetCategoryId = &#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> refers to the first r...
[ "Returns", "a", "range", "of", "all", "the", "cp", "rule", "asset", "category", "rels", "where", "assetCategoryId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPRuleAssetCategoryRelPersistenceImpl.java#L655-L659
jiaqi/jcli
src/main/java/org/cyclopsgroup/jcli/impl/SingleValueReference.java
SingleValueReference.setValue
void setValue(T bean, String value) { """ Set a string value to bean based on known conversion rule and value reference @param bean Bean to set value to @param value String expression of value to set """ ref.writeValue(converter.fromCharacters(value), bean); }
java
void setValue(T bean, String value) { ref.writeValue(converter.fromCharacters(value), bean); }
[ "void", "setValue", "(", "T", "bean", ",", "String", "value", ")", "{", "ref", ".", "writeValue", "(", "converter", ".", "fromCharacters", "(", "value", ")", ",", "bean", ")", ";", "}" ]
Set a string value to bean based on known conversion rule and value reference @param bean Bean to set value to @param value String expression of value to set
[ "Set", "a", "string", "value", "to", "bean", "based", "on", "known", "conversion", "rule", "and", "value", "reference" ]
train
https://github.com/jiaqi/jcli/blob/3854b3bb3c26bbe7407bf1b6600d8b25592d398e/src/main/java/org/cyclopsgroup/jcli/impl/SingleValueReference.java#L18-L20
inkstand-io/scribble
scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java
HttpServerBuilder.contentFrom
public HttpServerBuilder contentFrom(final String contextRoot, final TemporaryFolder folder) { """ Defines a folder resource whose content fill be hosted rule. @param contextRoot the root path to the content @param folder the rule that creates the temporary folder that should be hosted by the http server. @...
java
public HttpServerBuilder contentFrom(final String contextRoot, final TemporaryFolder folder) { resources.put(contextRoot, folder); return this; }
[ "public", "HttpServerBuilder", "contentFrom", "(", "final", "String", "contextRoot", ",", "final", "TemporaryFolder", "folder", ")", "{", "resources", ".", "put", "(", "contextRoot", ",", "folder", ")", ";", "return", "this", ";", "}" ]
Defines a folder resource whose content fill be hosted rule. @param contextRoot the root path to the content @param folder the rule that creates the temporary folder that should be hosted by the http server. @return this builder
[ "Defines", "a", "folder", "resource", "whose", "content", "fill", "be", "hosted", "rule", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java#L119-L122
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/clustering/criterion/BaseFunction.java
BaseFunction.subtractedMagnitude
protected static double subtractedMagnitude(DoubleVector c, DoubleVector v) { """ Returns the magnitude of {@code c} as if {@code v} was added to the the vector. We do this because it would be more costly, garbage collection wise, to create a new vector for each alternate cluster and * vector. """ r...
java
protected static double subtractedMagnitude(DoubleVector c, DoubleVector v) { return Math.sqrt(subtractedMagnitudeSqrd(c, v)); }
[ "protected", "static", "double", "subtractedMagnitude", "(", "DoubleVector", "c", ",", "DoubleVector", "v", ")", "{", "return", "Math", ".", "sqrt", "(", "subtractedMagnitudeSqrd", "(", "c", ",", "v", ")", ")", ";", "}" ]
Returns the magnitude of {@code c} as if {@code v} was added to the the vector. We do this because it would be more costly, garbage collection wise, to create a new vector for each alternate cluster and * vector.
[ "Returns", "the", "magnitude", "of", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/clustering/criterion/BaseFunction.java#L414-L416
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.confirmationMatches
public void confirmationMatches(double seconds, String expectedConfirmationPattern) { """ Waits up to the provided wait time for a confirmation present on the page has content matching the expected text. This information will be logged and recorded, with a screenshot for traceability and added debugging support....
java
public void confirmationMatches(double seconds, String expectedConfirmationPattern) { try { double timeTook = popup(seconds); timeTook = popupMatches(seconds - timeTook, expectedConfirmationPattern); checkConfirmationMatches(expectedConfirmationPattern, seconds, timeTook); ...
[ "public", "void", "confirmationMatches", "(", "double", "seconds", ",", "String", "expectedConfirmationPattern", ")", "{", "try", "{", "double", "timeTook", "=", "popup", "(", "seconds", ")", ";", "timeTook", "=", "popupMatches", "(", "seconds", "-", "timeTook",...
Waits up to the provided wait time for a confirmation present on the page has content matching the expected text. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param expectedConfirmationPattern the expected text of the confirmation @param seconds ...
[ "Waits", "up", "to", "the", "provided", "wait", "time", "for", "a", "confirmation", "present", "on", "the", "page", "has", "content", "matching", "the", "expected", "text", ".", "This", "information", "will", "be", "logged", "and", "recorded", "with", "a", ...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L578-L586
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java
ZipUtil.extractFile
private static void extractFile(ZipEntry entry, ZipInputStream zipIn, File file) throws IOException { """ Extracts the file entry to the location specified by {@code file} @param entry the {@link ZipEntry} object for the directory being extracted @param zipIn the zip input stream to read from @param file t...
java
private static void extractFile(ZipEntry entry, ZipInputStream zipIn, File file) throws IOException { final String sourceMethod = "extractFile"; //$NON-NLS-1$ final boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(sourceClass, sourceMethod, new Object[]{entry, zipIn,...
[ "private", "static", "void", "extractFile", "(", "ZipEntry", "entry", ",", "ZipInputStream", "zipIn", ",", "File", "file", ")", "throws", "IOException", "{", "final", "String", "sourceMethod", "=", "\"extractFile\"", ";", "//$NON-NLS-1$\r", "final", "boolean", "is...
Extracts the file entry to the location specified by {@code file} @param entry the {@link ZipEntry} object for the directory being extracted @param zipIn the zip input stream to read from @param file the {@link File} object for the target file @throws IOException
[ "Extracts", "the", "file", "entry", "to", "the", "location", "specified", "by", "{", "@code", "file", "}" ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/ZipUtil.java#L125-L146
liferay/com-liferay-commerce
commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java
CommerceCurrencyPersistenceImpl.removeByG_A
@Override public void removeByG_A(long groupId, boolean active) { """ Removes all the commerce currencies where groupId = &#63; and active = &#63; from the database. @param groupId the group ID @param active the active """ for (CommerceCurrency commerceCurrency : findByG_A(groupId, active, QueryUtil...
java
@Override public void removeByG_A(long groupId, boolean active) { for (CommerceCurrency commerceCurrency : findByG_A(groupId, active, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceCurrency); } }
[ "@", "Override", "public", "void", "removeByG_A", "(", "long", "groupId", ",", "boolean", "active", ")", "{", "for", "(", "CommerceCurrency", "commerceCurrency", ":", "findByG_A", "(", "groupId", ",", "active", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil...
Removes all the commerce currencies where groupId = &#63; and active = &#63; from the database. @param groupId the group ID @param active the active
[ "Removes", "all", "the", "commerce", "currencies", "where", "groupId", "=", "&#63", ";", "and", "active", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L3265-L3271
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java
ServerParams.setLegacy
private static void setLegacy(String moduleName, String... legacyParamNames) { """ Register the given legacy parameter names as owned by the given module name. """ for (String legacyParamName : legacyParamNames) { setLegacy(moduleName, legacyParamName); } }
java
private static void setLegacy(String moduleName, String... legacyParamNames) { for (String legacyParamName : legacyParamNames) { setLegacy(moduleName, legacyParamName); } }
[ "private", "static", "void", "setLegacy", "(", "String", "moduleName", ",", "String", "...", "legacyParamNames", ")", "{", "for", "(", "String", "legacyParamName", ":", "legacyParamNames", ")", "{", "setLegacy", "(", "moduleName", ",", "legacyParamName", ")", ";...
Register the given legacy parameter names as owned by the given module name.
[ "Register", "the", "given", "legacy", "parameter", "names", "as", "owned", "by", "the", "given", "module", "name", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java#L71-L75
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java
FileLister.traverseDirs
private static void traverseDirs(List<FileStatus> fileStatusesList, FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter) throws IOException { """ Recursively traverses the dirs to get the list of files for a given path filtered as per the input path range...
java
private static void traverseDirs(List<FileStatus> fileStatusesList, FileSystem hdfs, Path inputPath, JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter) throws IOException { // get all the files and dirs in the current dir FileStatus allFiles[] = hdfs.listStatus(inputPath); for ...
[ "private", "static", "void", "traverseDirs", "(", "List", "<", "FileStatus", ">", "fileStatusesList", ",", "FileSystem", "hdfs", ",", "Path", "inputPath", ",", "JobFileModifiedRangePathFilter", "jobFileModifiedRangePathFilter", ")", "throws", "IOException", "{", "// get...
Recursively traverses the dirs to get the list of files for a given path filtered as per the input path range filter
[ "Recursively", "traverses", "the", "dirs", "to", "get", "the", "list", "of", "files", "for", "a", "given", "path", "filtered", "as", "per", "the", "input", "path", "range", "filter" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/FileLister.java#L53-L71
xfcjscn/sudoor-server-lib
src/main/java/net/gplatform/sudoor/server/security/model/auth/SSAuth.java
SSAuth.authenticateAndSignin
public void authenticateAndSignin(String username, String password) { """ WARNING: Normally this is used by non-web interface. For web interface, pls use Spring Security config to auto authenticate @param username @param password """ logger.debug("authenticateAndSignin:" + username); Authentication r...
java
public void authenticateAndSignin(String username, String password) { logger.debug("authenticateAndSignin:" + username); Authentication request = new UsernamePasswordAuthenticationToken(username, password); Authentication result = authenticationManager.authenticate(request); SecurityContextHolder.getContext()....
[ "public", "void", "authenticateAndSignin", "(", "String", "username", ",", "String", "password", ")", "{", "logger", ".", "debug", "(", "\"authenticateAndSignin:\"", "+", "username", ")", ";", "Authentication", "request", "=", "new", "UsernamePasswordAuthenticationTok...
WARNING: Normally this is used by non-web interface. For web interface, pls use Spring Security config to auto authenticate @param username @param password
[ "WARNING", ":", "Normally", "this", "is", "used", "by", "non", "-", "web", "interface", ".", "For", "web", "interface", "pls", "use", "Spring", "Security", "config", "to", "auto", "authenticate" ]
train
https://github.com/xfcjscn/sudoor-server-lib/blob/37dc1996eaa9cad25c82abd1de315ba565e32097/src/main/java/net/gplatform/sudoor/server/security/model/auth/SSAuth.java#L141-L147
legsem/legstar.avro
legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslatorMain.java
Xsd2AvroTranslatorMain.processLine
private boolean processLine(final CommandLine line, final Options options) throws Exception { """ Process the command line options selected. @param line the parsed command line @param options available @return false if processing needs to stop, true if its ok to continue @throws Exception if line...
java
private boolean processLine(final CommandLine line, final Options options) throws Exception { if (line.hasOption(OPTION_VERSION)) { log.info(getVersion(true)); return false; } if (line.hasOption(OPTION_HELP)) { produceHelp(options); ret...
[ "private", "boolean", "processLine", "(", "final", "CommandLine", "line", ",", "final", "Options", "options", ")", "throws", "Exception", "{", "if", "(", "line", ".", "hasOption", "(", "OPTION_VERSION", ")", ")", "{", "log", ".", "info", "(", "getVersion", ...
Process the command line options selected. @param line the parsed command line @param options available @return false if processing needs to stop, true if its ok to continue @throws Exception if line cannot be processed
[ "Process", "the", "command", "line", "options", "selected", "." ]
train
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.translator/src/main/java/com/legstar/avro/translator/Xsd2AvroTranslatorMain.java#L171-L192
ManfredTremmel/gwt-commons-lang3
src/main/resources/org/apache/commons/jre/java/util/BitSet.java
BitSet.maskInWord
private static void maskInWord(int[] array, int index, int from, int to) { """ Sets all bits to true in a word within the given bit range. @param array The array. @param index The word index. @param from The lower bit index. @param to The upper bit index. """ if (from == to) { return; } ...
java
private static void maskInWord(int[] array, int index, int from, int to) { if (from == to) { return; } to = 32 - to; int word = wordAt(array, index); word |= ((0xffffffff >>> from) << (from + to)) >>> to; array[index] = word & WORD_MASK; }
[ "private", "static", "void", "maskInWord", "(", "int", "[", "]", "array", ",", "int", "index", ",", "int", "from", ",", "int", "to", ")", "{", "if", "(", "from", "==", "to", ")", "{", "return", ";", "}", "to", "=", "32", "-", "to", ";", "int", ...
Sets all bits to true in a word within the given bit range. @param array The array. @param index The word index. @param from The lower bit index. @param to The upper bit index.
[ "Sets", "all", "bits", "to", "true", "in", "a", "word", "within", "the", "given", "bit", "range", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/resources/org/apache/commons/jre/java/util/BitSet.java#L174-L183
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java
CommerceRegionPersistenceImpl.countByC_C
@Override public int countByC_C(long commerceCountryId, String code) { """ Returns the number of commerce regions where commerceCountryId = &#63; and code = &#63;. @param commerceCountryId the commerce country ID @param code the code @return the number of matching commerce regions """ FinderPath finder...
java
@Override public int countByC_C(long commerceCountryId, String code) { FinderPath finderPath = FINDER_PATH_COUNT_BY_C_C; Object[] finderArgs = new Object[] { commerceCountryId, code }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new S...
[ "@", "Override", "public", "int", "countByC_C", "(", "long", "commerceCountryId", ",", "String", "code", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_C_C", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "commerc...
Returns the number of commerce regions where commerceCountryId = &#63; and code = &#63;. @param commerceCountryId the commerce country ID @param code the code @return the number of matching commerce regions
[ "Returns", "the", "number", "of", "commerce", "regions", "where", "commerceCountryId", "=", "&#63", ";", "and", "code", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java#L2184-L2245
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.resizeArrayIfDifferent
public static Object resizeArrayIfDifferent(Object source, int newsize) { """ Returns the given array if newsize is the same as existing. Returns a new array of given size, containing as many elements of the original array as it can hold. """ int oldsize = Array.getLength(source); if (oldsi...
java
public static Object resizeArrayIfDifferent(Object source, int newsize) { int oldsize = Array.getLength(source); if (oldsize == newsize) { return source; } Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); if (oldsize ...
[ "public", "static", "Object", "resizeArrayIfDifferent", "(", "Object", "source", ",", "int", "newsize", ")", "{", "int", "oldsize", "=", "Array", ".", "getLength", "(", "source", ")", ";", "if", "(", "oldsize", "==", "newsize", ")", "{", "return", "source"...
Returns the given array if newsize is the same as existing. Returns a new array of given size, containing as many elements of the original array as it can hold.
[ "Returns", "the", "given", "array", "if", "newsize", "is", "the", "same", "as", "existing", ".", "Returns", "a", "new", "array", "of", "given", "size", "containing", "as", "many", "elements", "of", "the", "original", "array", "as", "it", "can", "hold", "...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L869-L887
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PhysicalDatabaseParent.java
PhysicalDatabaseParent.init
public void init(Map<String,Object> mapParams) { """ Constructor @param mapParams time The default cache review interval. @param mapParams prefix The prefix on the physical file name. @param mapParams suffix The suffix on the physical file name. @param mapParams app The application object (The application obje...
java
public void init(Map<String,Object> mapParams) { m_htDBList = new Hashtable<Object,PDatabase>(); m_mapParams = mapParams; Object strMinutes = this.getProperty(TIME); int iMinutes = -1; // Default time try { if (strMinutes instanceof String) iMin...
[ "public", "void", "init", "(", "Map", "<", "String", ",", "Object", ">", "mapParams", ")", "{", "m_htDBList", "=", "new", "Hashtable", "<", "Object", ",", "PDatabase", ">", "(", ")", ";", "m_mapParams", "=", "mapParams", ";", "Object", "strMinutes", "=",...
Constructor @param mapParams time The default cache review interval. @param mapParams prefix The prefix on the physical file name. @param mapParams suffix The suffix on the physical file name. @param mapParams app The application object (The application object is used by databases that need information about the locati...
[ "Constructor" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PhysicalDatabaseParent.java#L94-L107
evsinev/ber-tlv
src/main/java/com/payneteasy/tlv/BerTlvBuilder.java
BerTlvBuilder.addText
public BerTlvBuilder addText(BerTag aTag, String aText) { """ Add ASCII text @param aTag tag @param aText text @return builder """ return addText(aTag, aText, ASCII); }
java
public BerTlvBuilder addText(BerTag aTag, String aText) { return addText(aTag, aText, ASCII); }
[ "public", "BerTlvBuilder", "addText", "(", "BerTag", "aTag", ",", "String", "aText", ")", "{", "return", "addText", "(", "aTag", ",", "aText", ",", "ASCII", ")", ";", "}" ]
Add ASCII text @param aTag tag @param aText text @return builder
[ "Add", "ASCII", "text" ]
train
https://github.com/evsinev/ber-tlv/blob/82f980c7a8c1938c890a1e1b320ba383eac343f8/src/main/java/com/payneteasy/tlv/BerTlvBuilder.java#L207-L209
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java
FileUtilities.substituteExtention
public static File substituteExtention( File file, String newExtention ) { """ Substitute the extention of a file. @param file the file. @param newExtention the new extention (without the dot). @return the file with the new extention. """ String path = file.getAbsolutePath(); int...
java
public static File substituteExtention( File file, String newExtention ) { String path = file.getAbsolutePath(); int lastDot = path.lastIndexOf("."); //$NON-NLS-1$ if (lastDot == -1) { path = path + "." + newExtention; //$NON-NLS-1$ } else { path = path.substring(...
[ "public", "static", "File", "substituteExtention", "(", "File", "file", ",", "String", "newExtention", ")", "{", "String", "path", "=", "file", ".", "getAbsolutePath", "(", ")", ";", "int", "lastDot", "=", "path", ".", "lastIndexOf", "(", "\".\"", ")", ";"...
Substitute the extention of a file. @param file the file. @param newExtention the new extention (without the dot). @return the file with the new extention.
[ "Substitute", "the", "extention", "of", "a", "file", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/files/FileUtilities.java#L299-L308
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java
AbstractCasWebflowConfigurer.createTransitionForState
public Transition createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState, final boolean removeExisting) { """ Add transition to action state. @param state the action state @param criteriaOutcome the criteria outcome @param targetState the...
java
public Transition createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState, final boolean removeExisting) { try { if (removeExisting) { val success = (Transition) state.getTransition(criteriaOutcome); if (success...
[ "public", "Transition", "createTransitionForState", "(", "final", "TransitionableState", "state", ",", "final", "String", "criteriaOutcome", ",", "final", "String", "targetState", ",", "final", "boolean", "removeExisting", ")", "{", "try", "{", "if", "(", "removeExi...
Add transition to action state. @param state the action state @param criteriaOutcome the criteria outcome @param targetState the target state @param removeExisting the remove existing @return the transition
[ "Add", "transition", "to", "action", "state", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L308-L324