repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
Unidata/thredds
ui/src/main/java/ucar/nc2/ui/util/SwingUtils.java
SwingUtils.getUIDefaultsOfClass
public static UIDefaults getUIDefaultsOfClass(String className) { UIDefaults retVal = new UIDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key instanceof String && ((String) ke...
java
public static UIDefaults getUIDefaultsOfClass(String className) { UIDefaults retVal = new UIDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key instanceof String && ((String) ke...
[ "public", "static", "UIDefaults", "getUIDefaultsOfClass", "(", "String", "className", ")", "{", "UIDefaults", "retVal", "=", "new", "UIDefaults", "(", ")", ";", "UIDefaults", "defaults", "=", "UIManager", ".", "getLookAndFeelDefaults", "(", ")", ";", "List", "<"...
Convenience method for retrieving a subset of the UIDefaults pertaining to a particular class. @param className fully qualified name of the class of interest @return the UIDefaults of the class named
[ "Convenience", "method", "for", "retrieving", "a", "subset", "of", "the", "UIDefaults", "pertaining", "to", "a", "particular", "class", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/util/SwingUtils.java#L325-L340
test
Get the UIDefaults of a class
Of course, here is the Java code you requested: ```java public static UIDefaults getUIDefaultsOfClass(String className) { UIDefaults retVal = new UIDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listK...
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Reporter.java
Reporter.generatePdf
private void generatePdf() { File pdfFile = new File(directory, filename + ".pdf"); try (OutputStream os = new FileOutputStream(pdfFile)) { PdfRendererBuilder builder = new PdfRendererBuilder(); builder.withHtmlContent(getHtmlForPDFConversion(), "file://" + pdfFile.getAbsolutePat...
java
private void generatePdf() { File pdfFile = new File(directory, filename + ".pdf"); try (OutputStream os = new FileOutputStream(pdfFile)) { PdfRendererBuilder builder = new PdfRendererBuilder(); builder.withHtmlContent(getHtmlForPDFConversion(), "file://" + pdfFile.getAbsolutePat...
[ "private", "void", "generatePdf", "(", ")", "{", "File", "pdfFile", "=", "new", "File", "(", "directory", ",", "filename", "+", "\".pdf\"", ")", ";", "try", "(", "OutputStream", "os", "=", "new", "FileOutputStream", "(", "pdfFile", ")", ")", "{", "PdfRen...
Generates a pdf report in the same directory as the html report
[ "Generates", "a", "pdf", "report", "in", "the", "same", "directory", "as", "the", "html", "report" ]
396cc1f010dd69eed33cc5061c41253de246a4cd
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Reporter.java#L741-L752
train
Generate PDF.
Of course, here is the Java code you requested: ```java private void generatePdf() { File pdfFile = new File(directory, filename + ".pdf"); try (OutputStream os = new FileOutputStream(pdfFile)) { PdfRendererBuilder builder = new PdfRendererBuilder(); builder.withHtmlContent(getH...
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/attr/CodeAttribute.java
CodeAttribute.setAttributes
public void setAttributes(ArrayList<Attribute> attributes) { if (_attributes != attributes) { _attributes.clear(); _attributes.addAll(attributes); } }
java
public void setAttributes(ArrayList<Attribute> attributes) { if (_attributes != attributes) { _attributes.clear(); _attributes.addAll(attributes); } }
[ "public", "void", "setAttributes", "(", "ArrayList", "<", "Attribute", ">", "attributes", ")", "{", "if", "(", "_attributes", "!=", "attributes", ")", "{", "_attributes", ".", "clear", "(", ")", ";", "_attributes", ".", "addAll", "(", "attributes", ")", ";...
Returns the exceptions.
[ "Returns", "the", "exceptions", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/attr/CodeAttribute.java#L147-L153
train
Sets the attributes of the CRA.
Of course, here is the Java code you requested: ```java public void setAttributes(ArrayList<Attribute> attributes) { if (_attributes != attributes) { _attributes.clear(); _attributes.addAll(attributes); } } ``` Hope this helps!
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/formatting2/AbstractFormatter2.java
AbstractFormatter2._format
protected void _format(XtextResource resource, IFormattableDocument document) { List<EObject> contents = resource.getContents(); if (!contents.isEmpty()) { EObject model = contents.get(0); document.format(model); } }
java
protected void _format(XtextResource resource, IFormattableDocument document) { List<EObject> contents = resource.getContents(); if (!contents.isEmpty()) { EObject model = contents.get(0); document.format(model); } }
[ "protected", "void", "_format", "(", "XtextResource", "resource", ",", "IFormattableDocument", "document", ")", "{", "List", "<", "EObject", ">", "contents", "=", "resource", ".", "getContents", "(", ")", ";", "if", "(", "!", "contents", ".", "isEmpty", "(",...
For {@link XtextResource resources}, assume we want to format the first EObject from the contents list only. Because that's where the parser puts the semantic model.
[ "For", "{" ]
bac941cb75cb24706519845ec174cfef874d7557
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/formatting2/AbstractFormatter2.java#L204-L210
train
Format the resource.
Of course, here is the Java code you requested: ```java protected void _format(XtextResource resource, IFormattableDocument document) { List<EObject> contents = resource.getContents(); if (!contents.isEmpty()) { EObject model = contents.get(0); document.format(model); } } ``` Hope this helps!
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/HeapSort.java
HeapSort.sort
public void sort(final IndexedSortable s, final int p, final int r, final Progressable rep) { final int N = r - p; // build heap w/ reverse comparator, then write in-place from end final int t = Integer.highestOneBit(N); for (int i = t; i > 1; i >>>= 1) { for (int j = i >>> 1; j < i; ++j) { ...
java
public void sort(final IndexedSortable s, final int p, final int r, final Progressable rep) { final int N = r - p; // build heap w/ reverse comparator, then write in-place from end final int t = Integer.highestOneBit(N); for (int i = t; i > 1; i >>>= 1) { for (int j = i >>> 1; j < i; ++j) { ...
[ "public", "void", "sort", "(", "final", "IndexedSortable", "s", ",", "final", "int", "p", ",", "final", "int", "r", ",", "final", "Progressable", "rep", ")", "{", "final", "int", "N", "=", "r", "-", "p", ";", "// build heap w/ reverse comparator, then write ...
{@inheritDoc}
[ "{" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/HeapSort.java#L53-L70
train
Sort the given array of indices.
Of course, here is the Java code you requested: ```java public void sort(final IndexedSortable s, final int p, final int r, final Progressable rep) { final int N = r - p; // build heap w/ reverse comparator, then write in-place from end final int t = Integer.highestOneBit(N); for (int i = t; i > ...
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/EffectivePatchMarshaller.java
EffectivePatchMarshaller.marshall
public void marshall(EffectivePatch effectivePatch, ProtocolMarshaller protocolMarshaller) { if (effectivePatch == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(effectivePatch.getPatch(), PATCH_BIND...
java
public void marshall(EffectivePatch effectivePatch, ProtocolMarshaller protocolMarshaller) { if (effectivePatch == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(effectivePatch.getPatch(), PATCH_BIND...
[ "public", "void", "marshall", "(", "EffectivePatch", "effectivePatch", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "effectivePatch", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshall(...)\""...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/EffectivePatchMarshaller.java#L44-L56
train
marshalls the effectivePatch object to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(EffectivePatch effectivePatch, ProtocolMarshaller protocolMarshaller) { if (effectivePatch == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
s1-platform/s1
s1-mongodb/src/java/org/s1/mongodb/MongoDBQueryHelper.java
MongoDBQueryHelper.get
public static Map<String, Object> get(CollectionId c, Map<String,Object> search) throws NotFoundException, MoreThanOneFoundException { ensureOnlyOne(c, search); DBCollection coll = MongoDBConnectionHelper.getConnection(c.getDatabase()).getCollection(c.getCollection()); Map<String,Object> m ...
java
public static Map<String, Object> get(CollectionId c, Map<String,Object> search) throws NotFoundException, MoreThanOneFoundException { ensureOnlyOne(c, search); DBCollection coll = MongoDBConnectionHelper.getConnection(c.getDatabase()).getCollection(c.getCollection()); Map<String,Object> m ...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "get", "(", "CollectionId", "c", ",", "Map", "<", "String", ",", "Object", ">", "search", ")", "throws", "NotFoundException", ",", "MoreThanOneFoundException", "{", "ensureOnlyOne", "(", "c", ",",...
Select exactly one record from collection @param c @param search @throws NotFoundException @throws MoreThanOneFoundException @return
[ "Select", "exactly", "one", "record", "from", "collection" ]
370101c13fef01af524bc171bcc1a97e5acc76e8
https://github.com/s1-platform/s1/blob/370101c13fef01af524bc171bcc1a97e5acc76e8/s1-mongodb/src/java/org/s1/mongodb/MongoDBQueryHelper.java#L65-L74
train
Gets a single record from a collection.
Of course, here is the Java code you requested: ```java public static Map<String, Object> get(CollectionId c, Map<String,Object> search) throws NotFoundException, MoreThanOneFoundException { ensureOnlyOne(c, search); DBCollection coll = MongoDBConnectionHelper.getConnection(c.getDatabase()).getCol...
Unidata/thredds
cdm/src/main/java/ucar/nc2/iosp/netcdf3/N3iosp.java
N3iosp.readRecordDataSubset
private ucar.ma2.Array readRecordDataSubset(ucar.nc2.Structure s, Section section) throws java.io.IOException { Range recordRange = section.getRange(0); int nrecords = recordRange.length(); // create the ArrayStructureMA StructureMembers members = s.makeStructureMembers(); for (StructureMembers.Mem...
java
private ucar.ma2.Array readRecordDataSubset(ucar.nc2.Structure s, Section section) throws java.io.IOException { Range recordRange = section.getRange(0); int nrecords = recordRange.length(); // create the ArrayStructureMA StructureMembers members = s.makeStructureMembers(); for (StructureMembers.Mem...
[ "private", "ucar", ".", "ma2", ".", "Array", "readRecordDataSubset", "(", "ucar", ".", "nc2", ".", "Structure", "s", ",", "Section", "section", ")", "throws", "java", ".", "io", ".", "IOException", "{", "Range", "recordRange", "=", "section", ".", "getRang...
Read data from record structure, that has been subsetted. Read one record at at time, put requested variable into ArrayStructureMA. @param s the record structure @param section the record range to read @return an ArrayStructure, with all the data read in. @throws IOException on error
[ "Read", "data", "from", "record", "structure", "that", "has", "been", "subsetted", ".", "Read", "one", "record", "at", "at", "time", "put", "requested", "variable", "into", "ArrayStructureMA", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/netcdf3/N3iosp.java#L523-L572
test
Read the data subset of a N3 section.
Of course, here is the Java code you requested: ```java private ucar.ma2.Array readRecordDataSubset(ucar.nc2.Structure s, Section section) throws java.io.IOException { Range recordRange = section.getRange(0); int nrecords = recordRange.length(); // create the ArrayStructureMA StructureMembers members ...
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java
CPAttachmentFileEntryPersistenceImpl.findByUuid_PrevAndNext
@Override public CPAttachmentFileEntry[] findByUuid_PrevAndNext( long CPAttachmentFileEntryId, String uuid, OrderByComparator<CPAttachmentFileEntry> orderByComparator) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEntry = findByPrimaryKey(CPAttachmentFileEntryId); Sessi...
java
@Override public CPAttachmentFileEntry[] findByUuid_PrevAndNext( long CPAttachmentFileEntryId, String uuid, OrderByComparator<CPAttachmentFileEntry> orderByComparator) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEntry = findByPrimaryKey(CPAttachmentFileEntryId); Sessi...
[ "@", "Override", "public", "CPAttachmentFileEntry", "[", "]", "findByUuid_PrevAndNext", "(", "long", "CPAttachmentFileEntryId", ",", "String", "uuid", ",", "OrderByComparator", "<", "CPAttachmentFileEntry", ">", "orderByComparator", ")", "throws", "NoSuchCPAttachmentFileEnt...
Returns the cp attachment file entries before and after the current cp attachment file entry in the ordered set where uuid = &#63;. @param CPAttachmentFileEntryId the primary key of the current cp attachment file entry @param uuid the uuid @param orderByComparator the comparator to order the set by (optionally <code>n...
[ "Returns", "the", "cp", "attachment", "file", "entries", "before", "and", "after", "the", "current", "cp", "attachment", "file", "entry", "in", "the", "ordered", "set", "where", "uuid", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java#L419-L449
train
Returns the cp attachment file entry in the ordered set where uuid = &#63 ; and orderByComparator = null.
Of course, here is the Java code you requested: ```java @Override public CPAttachmentFileEntry[] findByUuid_PrevAndNext( long CPAttachmentFileEntryId, String uuid, OrderByComparator<CPAttachmentFileEntry> orderByComparator) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEn...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java
Ifc2x3tc1PackageImpl.getIfcTrimmingSelect
public EClass getIfcTrimmingSelect() { if (ifcTrimmingSelectEClass == null) { ifcTrimmingSelectEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(978); } return ifcTrimmingSelectEClass; }
java
public EClass getIfcTrimmingSelect() { if (ifcTrimmingSelectEClass == null) { ifcTrimmingSelectEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(978); } return ifcTrimmingSelectEClass; }
[ "public", "EClass", "getIfcTrimmingSelect", "(", ")", "{", "if", "(", "ifcTrimmingSelectEClass", "==", "null", ")", "{", "ifcTrimmingSelectEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "Ifc2x3tc1Package", ...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java#L36258-L36264
train
Get the IfcTrimmingSelectEClass for this feature.
Of course, here is the Java code you requested: ```java public EClass getIfcTrimmingSelect() { if (ifcTrimmingSelectEClass == null) { ifcTrimmingSelectEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(978); } return ifcTrimmingSelectEClass; }...
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java
CurationManager.curation
private JsonSimple curation(JsonSimple message, String task, String oid) throws TransactionException { JsonSimple response = new JsonSimple(); // ******************* // Collect object data // Transformer config JsonSimple itemConfig = getConfigFromStorage(oid); if (itemConfig == null) { log.error("Erro...
java
private JsonSimple curation(JsonSimple message, String task, String oid) throws TransactionException { JsonSimple response = new JsonSimple(); // ******************* // Collect object data // Transformer config JsonSimple itemConfig = getConfigFromStorage(oid); if (itemConfig == null) { log.error("Erro...
[ "private", "JsonSimple", "curation", "(", "JsonSimple", "message", ",", "String", "task", ",", "String", "oid", ")", "throws", "TransactionException", "{", "JsonSimple", "response", "=", "new", "JsonSimple", "(", ")", ";", "// *******************", "// Collect objec...
This method encapsulates the logic for curation in ReDBox @param oid The object ID being curated @throws TransactionException @returns JsonSimple The response object to send back to the queue consumer
[ "This", "method", "encapsulates", "the", "logic", "for", "curation", "in", "ReDBox" ]
1db230f218031b85c48c8603cbb04fce7ac6de0c
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java#L544-L927
train
This method is used to perform a curation of an object.
Of course, here is the Java code you requested: ```java private JsonSimple curation(JsonSimple message, String task, String oid) throws TransactionException { JsonSimple response = new JsonSimple(); // ******************* // Collect object data // Transformer config JsonSimple itemConfig = getConfigFromSto...
authlete/authlete-java-common
src/main/java/com/authlete/common/util/TypedProperties.java
TypedProperties.setString
public void setString(Enum<?> key, String value) { if (key == null) { return; } setString(key.name(), value); }
java
public void setString(Enum<?> key, String value) { if (key == null) { return; } setString(key.name(), value); }
[ "public", "void", "setString", "(", "Enum", "<", "?", ">", "key", ",", "String", "value", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", ";", "}", "setString", "(", "key", ".", "name", "(", ")", ",", "value", ")", ";", "}" ]
Equivalent to {@link #setString(String, String) setString}{@code (key.name(), value)}. If {@code key} is null, nothing is done.
[ "Equivalent", "to", "{" ]
49c94c483713cbf5a04d805ff7dbd83766c9c964
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/util/TypedProperties.java#L815-L823
train
Sets the value of a CRACTYPE attribute.
Of course, here is the Java code you requested: ```java public void setString(Enum<?> key, String value) { if (key == null) { return; } setString(key.name(), value); } ``` Hope this helps!
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java
KeyAgreement.init
public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { init(key, params, JceSecurity.RANDOM); }
java
public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { init(key, params, JceSecurity.RANDOM); }
[ "public", "final", "void", "init", "(", "Key", "key", ",", "AlgorithmParameterSpec", "params", ")", "throws", "InvalidKeyException", ",", "InvalidAlgorithmParameterException", "{", "init", "(", "key", ",", "params", ",", "JceSecurity", ".", "RANDOM", ")", ";", "...
Initializes this key agreement with the given key and set of algorithm parameters. <p> If this key agreement requires any random bytes, it will get them using the {@link java.security.SecureRandom} implementation of the highest-priority installed provider as the source of randomness. (If none of the installed provider...
[ "Initializes", "this", "key", "agreement", "with", "the", "given", "key", "and", "set", "of", "algorithm", "parameters", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/KeyAgreement.java#L497-L501
train
Initializes the base class with a key and algorithm parameter spec.
Of course, here is the Java code you requested: ```java public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { init(key, params, JceSecurity.RANDOM); } ``` Hope this helps!
abel533/DBMetadata
DBMetadata-core/src/main/java/com/github/abel533/database/introspector/DatabaseIntrospector.java
DatabaseIntrospector.introspectTables
public List<IntrospectedTable> introspectTables(DatabaseConfig config) throws SQLException { if (config.hasProcess()) { config.getDatabaseProcess().processStart(); } List<IntrospectedTable> introspectedTables = null; try { DatabaseConfig localConfig = ...
java
public List<IntrospectedTable> introspectTables(DatabaseConfig config) throws SQLException { if (config.hasProcess()) { config.getDatabaseProcess().processStart(); } List<IntrospectedTable> introspectedTables = null; try { DatabaseConfig localConfig = ...
[ "public", "List", "<", "IntrospectedTable", ">", "introspectTables", "(", "DatabaseConfig", "config", ")", "throws", "SQLException", "{", "if", "(", "config", ".", "hasProcess", "(", ")", ")", "{", "config", ".", "getDatabaseProcess", "(", ")", ".", "processSt...
获取表信息 @param config @return @throws SQLException
[ "获取表信息" ]
6dc127077c55dc43680bf2003f60caccfe7798b5
https://github.com/abel533/DBMetadata/blob/6dc127077c55dc43680bf2003f60caccfe7798b5/DBMetadata-core/src/main/java/com/github/abel533/database/introspector/DatabaseIntrospector.java#L251-L280
valid
Introspects the database.
Of course, here is the Java code you requested: ```java public List<IntrospectedTable> introspectTables(DatabaseConfig config) throws SQLException { if (config.hasProcess()) { config.getDatabaseProcess().processStart(); } List<IntrospectedTable> introspectedTables = null...
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.mergeCompleted
private void mergeCompleted(SegmentProperties segmentProperties, UpdateableSegmentMetadata transactionMetadata, MergeSegmentOperation mergeOp) { // We have processed a MergeSegmentOperation, pop the first operation off and decrement the counter. StorageOperation processedOperation = this.operations.remo...
java
private void mergeCompleted(SegmentProperties segmentProperties, UpdateableSegmentMetadata transactionMetadata, MergeSegmentOperation mergeOp) { // We have processed a MergeSegmentOperation, pop the first operation off and decrement the counter. StorageOperation processedOperation = this.operations.remo...
[ "private", "void", "mergeCompleted", "(", "SegmentProperties", "segmentProperties", ",", "UpdateableSegmentMetadata", "transactionMetadata", ",", "MergeSegmentOperation", "mergeOp", ")", "{", "// We have processed a MergeSegmentOperation, pop the first operation off and decrement the cou...
Executes post-Storage merge tasks, including state and metadata updates.
[ "Executes", "post", "-", "Storage", "merge", "tasks", "including", "state", "and", "metadata", "updates", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L987-L1011
train
Merge completed.
Of course, here is the Java code you requested: ```java private void mergeCompleted(SegmentProperties segmentProperties, UpdateableSegmentMetadata transactionMetadata, MergeSegmentOperation mergeOp) { // We have processed a MergeSegmentOperation, pop the first operation off and decrement the counter. S...
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWComponent.java
AbstractWComponent.copyChildren
private static List<WComponent> copyChildren(final List<WComponent> children) { ArrayList<WComponent> copy; if (children == null) { copy = new ArrayList<>(1); } else { copy = new ArrayList<>(children); } return copy; }
java
private static List<WComponent> copyChildren(final List<WComponent> children) { ArrayList<WComponent> copy; if (children == null) { copy = new ArrayList<>(1); } else { copy = new ArrayList<>(children); } return copy; }
[ "private", "static", "List", "<", "WComponent", ">", "copyChildren", "(", "final", "List", "<", "WComponent", ">", "children", ")", "{", "ArrayList", "<", "WComponent", ">", "copy", ";", "if", "(", "children", "==", "null", ")", "{", "copy", "=", "new", ...
Creates a copy of the given list of components. @param children the list to copy. @return a copy of the list.
[ "Creates", "a", "copy", "of", "the", "given", "list", "of", "components", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractWComponent.java#L1460-L1470
train
Copy children list.
Of course, here is the Java code you requested: ```java private static List<WComponent> copyChildren(final List<WComponent> children) { ArrayList<WComponent> copy; if (children == null) { copy = new ArrayList<>(1); } else { copy = new ArrayList<>(children); } return copy; } ``` Hope this helps!
oblac/jodd
jodd-db/src/main/java/jodd/db/oom/sqlgen/chunks/SqlChunk.java
SqlChunk.defineParameter
protected void defineParameter(final StringBuilder query, String name, final Object value, final DbEntityColumnDescriptor dec) { if (name == null) { name = templateData.getNextParameterName(); } query.append(':').append(name); templateData.addParameter(name, value, dec); }
java
protected void defineParameter(final StringBuilder query, String name, final Object value, final DbEntityColumnDescriptor dec) { if (name == null) { name = templateData.getNextParameterName(); } query.append(':').append(name); templateData.addParameter(name, value, dec); }
[ "protected", "void", "defineParameter", "(", "final", "StringBuilder", "query", ",", "String", "name", ",", "final", "Object", "value", ",", "final", "DbEntityColumnDescriptor", "dec", ")", "{", "if", "(", "name", "==", "null", ")", "{", "name", "=", "templa...
Defines parameter with name and its value.
[ "Defines", "parameter", "with", "name", "and", "its", "value", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/oom/sqlgen/chunks/SqlChunk.java#L226-L232
test
Define a parameter.
Of course, here is the Java code you requested: ```java protected void defineParameter(final StringBuilder query, String name, final Object value, final DbEntityColumnDescriptor dec) { if (name == null) { name = templateData.getNextParameterName(); } query.append(':').append(name); templateData.addParameter...
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java
BTools.getMtLvESS
public static String getMtLvESS( int mtLv ) { // MtLvESS = Method Level External Shift String // if ( mtLv < 0 ) return "?"; // String Result = ""; // // String LvS = ". "; String LvS = "."; // for ( int K = 1; K <= mtLv; K ++ ) { // Result = Result + LvS; } // return Result; }
java
public static String getMtLvESS( int mtLv ) { // MtLvESS = Method Level External Shift String // if ( mtLv < 0 ) return "?"; // String Result = ""; // // String LvS = ". "; String LvS = "."; // for ( int K = 1; K <= mtLv; K ++ ) { // Result = Result + LvS; } // return Result; }
[ "public", "static", "String", "getMtLvESS", "(", "int", "mtLv", ")", "{", "// MtLvESS = Method Level External Shift String ", "//", "if", "(", "mtLv", "<", "0", ")", "return", "\"?\"", ";", "//", "String", "Result", "=", "\"\"", ";", "//", "//\tString LvS = \"....
<b>getMtLvESS</b><br> public static String getMtLvESS( int mtLv )<br> Returns string. String length create indentation(shift) of other text.<br> Indentation depends on method level - great method level, great indentation.<br> Main method has method level 0.<br> Other called method has method level 1, 2,...N.<br> @param...
[ "<b", ">", "getMtLvESS<", "/", "b", ">", "<br", ">", "public", "static", "String", "getMtLvESS", "(", "int", "mtLv", ")", "<br", ">", "Returns", "string", ".", "String", "length", "create", "indentation", "(", "shift", ")", "of", "other", "text", ".", ...
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java#L47-L63
train
Get the MtLvESS.
Of course, here is the Java code you requested: ```java public static String getMtLvESS( int mtLv ) { // MtLvESS = Method Level External Shift String // if ( mtLv < 0 ) return "?"; // String Result = ""; // // String LvS = ". "; String LvS = "."; // for ( int K = 1; K <= mtLv; K ++ ) { // Re...
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/util/PropertyCollectorUtil.java
PropertyCollectorUtil.buildFullTraversalV2NoFolder
private static List<TraversalSpec> buildFullTraversalV2NoFolder() { // Recurse through all ResourcePools TraversalSpec rpToRp = createTraversalSpec("rpToRp", "ResourcePool", "resourcePool", new String[]{"rpToRp", "rpToVm"}); // Recurse through all ResourcePools ...
java
private static List<TraversalSpec> buildFullTraversalV2NoFolder() { // Recurse through all ResourcePools TraversalSpec rpToRp = createTraversalSpec("rpToRp", "ResourcePool", "resourcePool", new String[]{"rpToRp", "rpToVm"}); // Recurse through all ResourcePools ...
[ "private", "static", "List", "<", "TraversalSpec", ">", "buildFullTraversalV2NoFolder", "(", ")", "{", "// Recurse through all ResourcePools\r", "TraversalSpec", "rpToRp", "=", "createTraversalSpec", "(", "\"rpToRp\"", ",", "\"ResourcePool\"", ",", "\"resourcePool\"", ",", ...
This method creates basic set of TraveralSpec without visitFolders spec @return The TraversalSpec[]
[ "This", "method", "creates", "basic", "set", "of", "TraveralSpec", "without", "visitFolders", "spec" ]
27fd2c5826115782d5eeb934f86e3e39240179cd
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/util/PropertyCollectorUtil.java#L277-L313
train
Builds the full traversal specs for a V2 traversal.
Of course, here is the Java code you requested: ```java private static List<TraversalSpec> buildFullTraversalV2NoFolder() { // Recurse through all ResourcePools TraversalSpec rpToRp = createTraversalSpec("rpToRp", "ResourcePool", "resourcePool", new String[]{"rpToRp", "rpToV...
santhosh-tekuri/jlibs
xsd/src/main/java/jlibs/xml/xsd/XSParser.java
XSParser.parseString
public XSModel parseString(String schema, String baseURI){ return xsLoader.load(new DOMInputImpl(null, null, baseURI, schema, null)); }
java
public XSModel parseString(String schema, String baseURI){ return xsLoader.load(new DOMInputImpl(null, null, baseURI, schema, null)); }
[ "public", "XSModel", "parseString", "(", "String", "schema", ",", "String", "baseURI", ")", "{", "return", "xsLoader", ".", "load", "(", "new", "DOMInputImpl", "(", "null", ",", "null", ",", "baseURI", ",", "schema", ",", "null", ")", ")", ";", "}" ]
Parse an XML Schema document from String specified @param schema String data to parse. If provided, this will always be treated as a sequence of 16-bit units (UTF-16 encoded characters). If an XML declaration is present, the value of the encoding attribute will be ignored. @param baseURI The base URI to be used f...
[ "Parse", "an", "XML", "Schema", "document", "from", "String", "specified" ]
59c28719f054123cf778278154e1b92e943ad232
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/xsd/src/main/java/jlibs/xml/xsd/XSParser.java#L121-L123
train
Parse a XML document into an XSModel.
Of course, here is the Java code you requested: ```java public XSModel parseString(String schema, String baseURI){ return xsLoader.load(new DOMInputImpl(null, null, baseURI, schema, null)); } ``` Hope this helps!
xebialabs/overcast
src/main/java/com/xebialabs/overcast/support/virtualbox/VirtualboxDriver.java
VirtualboxDriver.setExtraData
public void setExtraData(String vm, String k, String v) { execute("setextradata", vm, k, v); }
java
public void setExtraData(String vm, String k, String v) { execute("setextradata", vm, k, v); }
[ "public", "void", "setExtraData", "(", "String", "vm", ",", "String", "k", ",", "String", "v", ")", "{", "execute", "(", "\"setextradata\"", ",", "vm", ",", "k", ",", "v", ")", ";", "}" ]
Sets extra data on the VM
[ "Sets", "extra", "data", "on", "the", "VM" ]
716e57b66870c9afe51edc3b6045863a34fb0061
https://github.com/xebialabs/overcast/blob/716e57b66870c9afe51edc3b6045863a34fb0061/src/main/java/com/xebialabs/overcast/support/virtualbox/VirtualboxDriver.java#L103-L105
train
Set extra data for a virtual machine.
Of course, here is the Java code you requested: ```java public void setExtraData(String vm, String k, String v) { execute("setextradata", vm, k, v); } ``` Hope this helps!
phax/ph-bdve
ph-bdve-teapps/src/main/java/com/helger/bdve/teapps/TEAPPSValidation.java
TEAPPSValidation.initTEAPPS
public static void initTEAPPS (@Nonnull final ValidationExecutorSetRegistry aRegistry) { ValueEnforcer.notNull (aRegistry, "Registry"); final boolean bNotDeprecated = false; // No Schematrons here aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_TEAPPS_272, ...
java
public static void initTEAPPS (@Nonnull final ValidationExecutorSetRegistry aRegistry) { ValueEnforcer.notNull (aRegistry, "Registry"); final boolean bNotDeprecated = false; // No Schematrons here aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (VID_TEAPPS_272, ...
[ "public", "static", "void", "initTEAPPS", "(", "@", "Nonnull", "final", "ValidationExecutorSetRegistry", "aRegistry", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aRegistry", ",", "\"Registry\"", ")", ";", "final", "boolean", "bNotDeprecated", "=", "false", ";...
Register all standard TEAPPS validation execution sets to the provided registry. @param aRegistry The registry to add the artefacts. May not be <code>null</code>.
[ "Register", "all", "standard", "TEAPPS", "validation", "execution", "sets", "to", "the", "provided", "registry", "." ]
2438f491174cd8989567fcdf129b273bd217e89f
https://github.com/phax/ph-bdve/blob/2438f491174cd8989567fcdf129b273bd217e89f/ph-bdve-teapps/src/main/java/com/helger/bdve/teapps/TEAPPSValidation.java#L52-L67
train
Register all TEAPPS validation executor sets to the provided registry.
Of course, here is the Java code you requested: ```java public static void initTEAPPS (@Nonnull final ValidationExecutorSetRegistry aRegistry) { ValueEnforcer.notNull (aRegistry, "Registry"); final boolean bNotDeprecated = false; // No Schematrons here aRegistry.registerValidationExecutorSet (Valid...
demidenko05/beigesoft-webcrud-jar
src/main/java/org/beigesoft/web/servlet/WReportPdf.java
WReportPdf.doReportPdf
public final void doReportPdf(final HttpServletRequest pReq, final HttpServletResponse pResp) throws ServletException, IOException { pReq.setCharacterEncoding("UTF-8"); try { HashMap<String, Object> reqVars = new HashMap<String, Object>(); String nameHandler = pReq.getParameter("nmHnd"); I...
java
public final void doReportPdf(final HttpServletRequest pReq, final HttpServletResponse pResp) throws ServletException, IOException { pReq.setCharacterEncoding("UTF-8"); try { HashMap<String, Object> reqVars = new HashMap<String, Object>(); String nameHandler = pReq.getParameter("nmHnd"); I...
[ "public", "final", "void", "doReportPdf", "(", "final", "HttpServletRequest", "pReq", ",", "final", "HttpServletResponse", "pResp", ")", "throws", "ServletException", ",", "IOException", "{", "pReq", ".", "setCharacterEncoding", "(", "\"UTF-8\"", ")", ";", "try", ...
<p>Delegate request and servlet output stream to file-reporter handler.<p> @param pReq HttpServletRequest @param pResp HttpServletResponse @throws ServletException ServletException @throws IOException IOException
[ "<p", ">", "Delegate", "request", "and", "servlet", "output", "stream", "to", "file", "-", "reporter", "handler", ".", "<p", ">" ]
e973170f8fc1f164f0b67af9bb6a52b04579b64a
https://github.com/demidenko05/beigesoft-webcrud-jar/blob/e973170f8fc1f164f0b67af9bb6a52b04579b64a/src/main/java/org/beigesoft/web/servlet/WReportPdf.java#L85-L139
train
Report a PDF file.
Of course, here is the Java code you requested: ```java public final void doReportPdf(final HttpServletRequest pReq, final HttpServletResponse pResp) throws ServletException, IOException { pReq.setCharacterEncoding("UTF-8"); try { HashMap<String, Object> reqVars = new HashMap<String, Object>(); ...
phax/ph-css
ph-css/src/main/java/com/helger/css/reader/CSSReaderSettings.java
CSSReaderSettings.setCSSVersion
@Nonnull public CSSReaderSettings setCSSVersion (@Nonnull final ECSSVersion eCSSVersion) { ValueEnforcer.notNull (eCSSVersion, "CSSVersion"); m_eCSSVersion = eCSSVersion; return this; }
java
@Nonnull public CSSReaderSettings setCSSVersion (@Nonnull final ECSSVersion eCSSVersion) { ValueEnforcer.notNull (eCSSVersion, "CSSVersion"); m_eCSSVersion = eCSSVersion; return this; }
[ "@", "Nonnull", "public", "CSSReaderSettings", "setCSSVersion", "(", "@", "Nonnull", "final", "ECSSVersion", "eCSSVersion", ")", "{", "ValueEnforcer", ".", "notNull", "(", "eCSSVersion", ",", "\"CSSVersion\"", ")", ";", "m_eCSSVersion", "=", "eCSSVersion", ";", "r...
Set the CSS version to be read. @param eCSSVersion The version number to use. May not be <code>null</code>. @return this
[ "Set", "the", "CSS", "version", "to", "be", "read", "." ]
c9da5bb4decc681de6e27ce31712aad4c00adafa
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/reader/CSSReaderSettings.java#L88-L94
train
Set the CSS version.
Of course, here is the Java code you requested: ```java @Nonnull public CSSReaderSettings setCSSVersion (@Nonnull final ECSSVersion eCSSVersion) { ValueEnforcer.notNull (eCSSVersion, "CSSVersion"); m_eCSSVersion = eCSSVersion; return this; } ``` Hope this helps!
jboss/jboss-common-core
src/main/java/org/jboss/util/property/PropertyContainer.java
PropertyContainer.bindMethod
protected void bindMethod(final String name, final String propertyName) { if (name == null || name.equals("")) throw new IllegalArgumentException("name"); if (propertyName == null || propertyName.equals("")) throw new IllegalArgumentException("propertyName"); addPropertyListener // ...
java
protected void bindMethod(final String name, final String propertyName) { if (name == null || name.equals("")) throw new IllegalArgumentException("name"); if (propertyName == null || propertyName.equals("")) throw new IllegalArgumentException("propertyName"); addPropertyListener // ...
[ "protected", "void", "bindMethod", "(", "final", "String", "name", ",", "final", "String", "propertyName", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "equals", "(", "\"\"", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"na...
Creates a {@link MethodBoundPropertyListener} for the method and property name and adds it the underlying property group. @param name The method name to bind values to. @param propertyName The property name to bind to. @throws IllegalArgumentException Method of property name is null or empty.
[ "Creates", "a", "{", "@link", "MethodBoundPropertyListener", "}", "for", "the", "method", "and", "property", "name", "and", "adds", "it", "the", "underlying", "property", "group", "." ]
c191bb18db83fa106c6913cf34ed47989b65dc97
https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/property/PropertyContainer.java#L106-L114
test
Binds a method to a property.
Of course, here is the Java code you requested: ```java protected void bindMethod(final String name, final String propertyName) { if (name == null || name.equals("")) throw new IllegalArgumentException("name"); if (propertyName == null || propertyName.equals("")) throw new IllegalArgument...
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.annotationType
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) { return new AnnotationTypeMatcher<T>(matcher); }
java
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) { return new AnnotationTypeMatcher<T>(matcher); }
[ "public", "static", "<", "T", "extends", "AnnotationDescription", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "annotationType", "(", "ElementMatcher", "<", "?", "super", "TypeDescription", ">", "matcher", ")", "{", "return", "new", "AnnotationTypeMatche...
Matches if an annotation's type matches the supplied matcher. @param matcher The matcher to match the annotation's type against. @param <T> The type of the matched object. @return A matcher that matches the annotation's type.
[ "Matches", "if", "an", "annotation", "s", "type", "matches", "the", "supplied", "matcher", "." ]
4d2dac80efb6bed89367567260f6811c2f712d12
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2143-L2145
train
Create an annotation type matcher.
Of course, here is the Java code you requested: ```java public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) { return new AnnotationTypeMatcher<T>(matcher); } ``` Hope this helps!
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java
SegmentFelzenszwalbHuttenlocher04.mergeSmallRegions
protected void mergeSmallRegions() { for( int i = 0; i < edgesNotMatched.size(); i++ ) { Edge e = edgesNotMatched.get(i); int rootA = find(e.indexA); int rootB = find(e.indexB); // see if they are already part of the same segment if( rootA == rootB ) continue; int sizeA = regionSize.get(rootA...
java
protected void mergeSmallRegions() { for( int i = 0; i < edgesNotMatched.size(); i++ ) { Edge e = edgesNotMatched.get(i); int rootA = find(e.indexA); int rootB = find(e.indexB); // see if they are already part of the same segment if( rootA == rootB ) continue; int sizeA = regionSize.get(rootA...
[ "protected", "void", "mergeSmallRegions", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "edgesNotMatched", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Edge", "e", "=", "edgesNotMatched", ".", "get", "(", "i", ")", ";", "in...
Look at the remaining regions and if there are any small ones marge them into a larger region
[ "Look", "at", "the", "remaining", "regions", "and", "if", "there", "are", "any", "small", "ones", "marge", "them", "into", "a", "larger", "region" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/fh04/SegmentFelzenszwalbHuttenlocher04.java#L245-L269
train
Merge the small regions of the graph.
Of course, here is the Java code you requested: ```java protected void mergeSmallRegions() { for( int i = 0; i < edgesNotMatched.size(); i++ ) { Edge e = edgesNotMatched.get(i); int rootA = find(e.indexA); int rootB = find(e.indexB); // see if they are already part of the same segment if( rootA == r...
nominanuda/zen-project
zen-webservice/src/main/java/com/nominanuda/urispec/StringListModelAdapter.java
StringListModelAdapter.getAsList
public List<String> getAsList(Map<String,Object> model, String key) { return multivalue(model.get(key)); }
java
public List<String> getAsList(Map<String,Object> model, String key) { return multivalue(model.get(key)); }
[ "public", "List", "<", "String", ">", "getAsList", "(", "Map", "<", "String", ",", "Object", ">", "model", ",", "String", "key", ")", "{", "return", "multivalue", "(", "model", ".", "get", "(", "key", ")", ")", ";", "}" ]
/*@Nullable
[ "/", "*" ]
fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d
https://github.com/nominanuda/zen-project/blob/fe48ae8da198eb7066c2b56bf2ffafe4cdfc451d/zen-webservice/src/main/java/com/nominanuda/urispec/StringListModelAdapter.java#L116-L118
train
Get the value of the key as a list.
Of course, here is the Java code you requested: ```java public List<String> getAsList(Map<String,Object> model, String key) { return multivalue(model.get(key)); } ``` Hope this helps!
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201902/TimeSeries.java
TimeSeries.getValuePeriodType
public com.google.api.ads.admanager.axis.v201902.PeriodType getValuePeriodType() { return valuePeriodType; }
java
public com.google.api.ads.admanager.axis.v201902.PeriodType getValuePeriodType() { return valuePeriodType; }
[ "public", "com", ".", "google", ".", "api", ".", "ads", ".", "admanager", ".", "axis", ".", "v201902", ".", "PeriodType", "getValuePeriodType", "(", ")", "{", "return", "valuePeriodType", ";", "}" ]
Gets the valuePeriodType value for this TimeSeries. @return valuePeriodType * The period of each time series value (e.g. daily or custom).
[ "Gets", "the", "valuePeriodType", "value", "for", "this", "TimeSeries", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201902/TimeSeries.java#L136-L138
train
Gets the valuePeriodType value for this CIDCTYPE.
Of course, here is the Java code you requested: ```java public com.google.api.ads.admanager.axis.v201902.PeriodType getValuePeriodType() { return valuePeriodType; } ``` Hope this helps!
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.createOptionalParameters
public Node createOptionalParameters(JSType... parameterTypes) { FunctionParamBuilder builder = new FunctionParamBuilder(this); builder.addOptionalParams(parameterTypes); return builder.build(); }
java
public Node createOptionalParameters(JSType... parameterTypes) { FunctionParamBuilder builder = new FunctionParamBuilder(this); builder.addOptionalParams(parameterTypes); return builder.build(); }
[ "public", "Node", "createOptionalParameters", "(", "JSType", "...", "parameterTypes", ")", "{", "FunctionParamBuilder", "builder", "=", "new", "FunctionParamBuilder", "(", "this", ")", ";", "builder", ".", "addOptionalParams", "(", "parameterTypes", ")", ";", "retur...
Creates a tree hierarchy representing a typed parameter list in which every parameter is optional.
[ "Creates", "a", "tree", "hierarchy", "representing", "a", "typed", "parameter", "list", "in", "which", "every", "parameter", "is", "optional", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1694-L1698
train
Create an optional parameter list.
Of course, here is the Java code you requested: ```java public Node createOptionalParameters(JSType... parameterTypes) { FunctionParamBuilder builder = new FunctionParamBuilder(this); builder.addOptionalParams(parameterTypes); return builder.build(); } ``` Hope this helps!
datumbox/datumbox-framework
datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/AssociativeArray2D.java
AssociativeArray2D.put2d
public final Object put2d(Object key1, Object key2, Object value) { AssociativeArray tmp = internalData.get(key1); if(tmp == null) { internalData.put(key1, new AssociativeArray()); } return internalData.get(key1).internalData.put(key2, value); }
java
public final Object put2d(Object key1, Object key2, Object value) { AssociativeArray tmp = internalData.get(key1); if(tmp == null) { internalData.put(key1, new AssociativeArray()); } return internalData.get(key1).internalData.put(key2, value); }
[ "public", "final", "Object", "put2d", "(", "Object", "key1", ",", "Object", "key2", ",", "Object", "value", ")", "{", "AssociativeArray", "tmp", "=", "internalData", ".", "get", "(", "key1", ")", ";", "if", "(", "tmp", "==", "null", ")", "{", "internal...
Convenience function used to put a value in a particular key positions. @param key1 @param key2 @param value @return
[ "Convenience", "function", "used", "to", "put", "a", "value", "in", "a", "particular", "key", "positions", "." ]
909dff0476e80834f05ecdde0624dd2390e9b0ca
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/AssociativeArray2D.java#L144-L151
train
Put the 2D value into the cache.
Of course, here is the Java code you requested: ```java public final Object put2d(Object key1, Object key2, Object value) { AssociativeArray tmp = internalData.get(key1); if(tmp == null) { internalData.put(key1, new AssociativeArray()); } return internalData.get(key...
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/FeatureResourceImpl.java
FeatureResourceImpl.getType
@Override public SubsystemContentType getType() { SubsystemContentType result = _type; if (result == null) { result = _type = SubsystemContentType.fromString(getRawType()); } return result; }
java
@Override public SubsystemContentType getType() { SubsystemContentType result = _type; if (result == null) { result = _type = SubsystemContentType.fromString(getRawType()); } return result; }
[ "@", "Override", "public", "SubsystemContentType", "getType", "(", ")", "{", "SubsystemContentType", "result", "=", "_type", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "_type", "=", "SubsystemContentType", ".", "fromString", "(", "getRawT...
{@inheritDoc}
[ "{" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/FeatureResourceImpl.java#L171-L178
train
Gets the type of the subtype.
Of course, here is the Java code you requested: ```java @Override public SubsystemContentType getType() { SubsystemContentType result = _type; if (result == null) { result = _type = SubsystemContentType.fromString(getRawType()); } return result; } ``` Hope this help...
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.registry/src/com/ibm/ws/security/wim/registry/util/TypeMappings.java
TypeMappings.getOutputGroupSecurityName
public String getOutputGroupSecurityName(String inputVirtualRealm) { // initialize the return value String returnValue = getOutputMapping(inputVirtualRealm, Service.CONFIG_DO_GROUP_SECURITY_NAME_MAPPING, OUTPUT_GROUP_SECURITY_NAME_DEFAULT); return re...
java
public String getOutputGroupSecurityName(String inputVirtualRealm) { // initialize the return value String returnValue = getOutputMapping(inputVirtualRealm, Service.CONFIG_DO_GROUP_SECURITY_NAME_MAPPING, OUTPUT_GROUP_SECURITY_NAME_DEFAULT); return re...
[ "public", "String", "getOutputGroupSecurityName", "(", "String", "inputVirtualRealm", ")", "{", "// initialize the return value", "String", "returnValue", "=", "getOutputMapping", "(", "inputVirtualRealm", ",", "Service", ".", "CONFIG_DO_GROUP_SECURITY_NAME_MAPPING", ",", "OU...
Get the output group security name mapping for the UserRegistry. @param inputVirtualRealm Virtual realm to find the mappings. @return The output group security name property. @pre inputVirtualRealm != null @pre inputVirtualRealm != "" @post $return != "" @post $return != null
[ "Get", "the", "output", "group", "security", "name", "mapping", "for", "the", "UserRegistry", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.registry/src/com/ibm/ws/security/wim/registry/util/TypeMappings.java#L243-L248
train
Get the output group security name mapping for the CNS2 security class.
Of course, here is the Java code you requested: ```java public String getOutputGroupSecurityName(String inputVirtualRealm) { // initialize the return value String returnValue = getOutputMapping(inputVirtualRealm, Service.CONFIG_DO_GROUP_SECURITY_NAME_MAPPING, ...
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/i/Vector2i.java
Vector2i.convert
public static Vector2i convert(Tuple2D<?> tuple) { if (tuple instanceof Vector2i) { return (Vector2i) tuple; } return new Vector2i(tuple.getX(), tuple.getY()); }
java
public static Vector2i convert(Tuple2D<?> tuple) { if (tuple instanceof Vector2i) { return (Vector2i) tuple; } return new Vector2i(tuple.getX(), tuple.getY()); }
[ "public", "static", "Vector2i", "convert", "(", "Tuple2D", "<", "?", ">", "tuple", ")", "{", "if", "(", "tuple", "instanceof", "Vector2i", ")", "{", "return", "(", "Vector2i", ")", "tuple", ";", "}", "return", "new", "Vector2i", "(", "tuple", ".", "get...
Convert the given tuple to a real Vector2i. <p>If the given tuple is already a Vector2i, it is replied. @param tuple the tuple. @return the Vector2i. @since 14.0
[ "Convert", "the", "given", "tuple", "to", "a", "real", "Vector2i", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/i/Vector2i.java#L113-L118
train
Convert the given tuple to a Vector2i.
Of course, here is the Java code you requested: ```java public static Vector2i convert(Tuple2D<?> tuple) { if (tuple instanceof Vector2i) { return (Vector2i) tuple; } return new Vector2i(tuple.getX(), tuple.getY()); } ``` Hope this helps!
iorga-group/iraj
iraj/src/main/java/com/iorga/iraj/servlet/CacheAwareServlet.java
CacheAwareServlet.checkIfUnmodifiedSince
protected boolean checkIfUnmodifiedSince(final HttpServletRequest request, final HttpServletResponse response, final Attributes resourceAttributes) throws IOException { try { final long lastModified = resourceAttributes.getLastModified(); final long headerValue = request.getDateHeader("If-Unmodified-Since");...
java
protected boolean checkIfUnmodifiedSince(final HttpServletRequest request, final HttpServletResponse response, final Attributes resourceAttributes) throws IOException { try { final long lastModified = resourceAttributes.getLastModified(); final long headerValue = request.getDateHeader("If-Unmodified-Since");...
[ "protected", "boolean", "checkIfUnmodifiedSince", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ",", "final", "Attributes", "resourceAttributes", ")", "throws", "IOException", "{", "try", "{", "final", "long", "lastModif...
Check if the if-unmodified-since condition is satisfied. @param request The servlet request we are processing @param response The servlet response we are creating @param resourceAttributes File object @return boolean true if the resource meets the specified condition, and false if the condition is not satisfied, in wh...
[ "Check", "if", "the", "if", "-", "unmodified", "-", "since", "condition", "is", "satisfied", "." ]
5fdee26464248f29833610de402275eb64505542
https://github.com/iorga-group/iraj/blob/5fdee26464248f29833610de402275eb64505542/iraj/src/main/java/com/iorga/iraj/servlet/CacheAwareServlet.java#L792-L809
train
Check if the if - unmodified - since header is present in the request.
Of course, here is the Java code you requested: ```java protected boolean checkIfUnmodifiedSince(final HttpServletRequest request, final HttpServletResponse response, final Attributes resourceAttributes) throws IOException { try { final long lastModified = resourceAttributes.getLastModified(); final long he...
ef-labs/vertx-jersey
vertx-jersey/src/main/java/com/englishtown/vertx/jersey/impl/VertxResponseWriter.java
VertxResponseWriter.failure
@Override public void failure(Throwable error) { logger.error(error.getMessage(), error); HttpServerResponse response = vertxRequest.response(); // Set error status and end Response.Status status = Response.Status.INTERNAL_SERVER_ERROR; response.setStatusCode(status.getStat...
java
@Override public void failure(Throwable error) { logger.error(error.getMessage(), error); HttpServerResponse response = vertxRequest.response(); // Set error status and end Response.Status status = Response.Status.INTERNAL_SERVER_ERROR; response.setStatusCode(status.getStat...
[ "@", "Override", "public", "void", "failure", "(", "Throwable", "error", ")", "{", "logger", ".", "error", "(", "error", ".", "getMessage", "(", ")", ",", "error", ")", ";", "HttpServerResponse", "response", "=", "vertxRequest", ".", "response", "(", ")", ...
{@inheritDoc}
[ "{" ]
733482a8a5afb1fb257c682b3767655e56f7a0fe
https://github.com/ef-labs/vertx-jersey/blob/733482a8a5afb1fb257c682b3767655e56f7a0fe/vertx-jersey/src/main/java/com/englishtown/vertx/jersey/impl/VertxResponseWriter.java#L361-L373
train
Called when the request fails.
Of course, here is the Java code you requested: ```java @Override public void failure(Throwable error) { logger.error(error.getMessage(), error); HttpServerResponse response = vertxRequest.response(); // Set error status and end Response.Status status = Response.Status.INTERNAL_SE...
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/util/box/MutableShort.java
MutableShort.mapInputToObj
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Short> fn) { final MutableShort host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); return this; } }; ...
java
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Short> fn) { final MutableShort host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); return this; } }; ...
[ "public", "<", "T1", ">", "Mutable", "<", "T1", ">", "mapInputToObj", "(", "final", "Function", "<", "T1", ",", "Short", ">", "fn", ")", "{", "final", "MutableShort", "host", "=", "this", ";", "return", "new", "Mutable", "<", "T1", ">", "(", ")", "...
Use the supplied function to perform a lazy transform operation when getValue is called <pre> {@code MutableShort mutable = MutableShort.fromExternal(()->!this.value,val->!this.value); Mutable<Short> withOverride = mutable.mapInputToObj(b->{ if(override) return 1s; return b; }); } </pre> @param fn Map function to be...
[ "Use", "the", "supplied", "function", "to", "perform", "a", "lazy", "transform", "operation", "when", "getValue", "is", "called", "<pre", ">", "{", "@code", "MutableShort", "mutable", "=", "MutableShort", ".", "fromExternal", "((", ")", "-", ">", "!this", "....
59a9fde30190a4d1faeb9f6d9851d209d82b81dd
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/util/box/MutableShort.java#L148-L158
train
Maps input to object Mutable.
Of course, here is the Java code you requested: ```java public <T1> Mutable<T1> mapInputToObj(final Function<T1, Short> fn) { final MutableShort host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); ...
jeluard/semantic-versioning
api/src/main/java/org/osjava/jardiff/JarDiff.java
JarDiff.cloneDeprecated
private static FieldInfo cloneDeprecated(FieldInfo fieldInfo) { return new FieldInfo(fieldInfo.getAccess() | Opcodes.ACC_DEPRECATED, fieldInfo.getName(), fieldInfo.getDesc(), fieldInfo.getSignature(), fieldInfo.getValue()); }
java
private static FieldInfo cloneDeprecated(FieldInfo fieldInfo) { return new FieldInfo(fieldInfo.getAccess() | Opcodes.ACC_DEPRECATED, fieldInfo.getName(), fieldInfo.getDesc(), fieldInfo.getSignature(), fieldInfo.getValue()); }
[ "private", "static", "FieldInfo", "cloneDeprecated", "(", "FieldInfo", "fieldInfo", ")", "{", "return", "new", "FieldInfo", "(", "fieldInfo", ".", "getAccess", "(", ")", "|", "Opcodes", ".", "ACC_DEPRECATED", ",", "fieldInfo", ".", "getName", "(", ")", ",", ...
Clones the field info, but changes access, setting deprecated flag. @param fieldInfo the original field info @return the cloned and deprecated field info.
[ "Clones", "the", "field", "info", "but", "changes", "access", "setting", "deprecated", "flag", "." ]
d0bfbeddca8ac4202f5225810227c72a708360a9
https://github.com/jeluard/semantic-versioning/blob/d0bfbeddca8ac4202f5225810227c72a708360a9/api/src/main/java/org/osjava/jardiff/JarDiff.java#L548-L552
train
Clones a deprecated field.
Of course, here is the Java code you requested: ```java private static FieldInfo cloneDeprecated(FieldInfo fieldInfo) { return new FieldInfo(fieldInfo.getAccess() | Opcodes.ACC_DEPRECATED, fieldInfo.getName(), fieldInfo.getDesc(), fieldInfo.getSignature(), fieldInfo.getValue()); } ``` Hope this helps!
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/tensor/Exp.java
Exp.forward
@Override public Tensor forward() { Tensor x = modInX.getOutput(); y = new Tensor(x); // copy y.exp(); return y; }
java
@Override public Tensor forward() { Tensor x = modInX.getOutput(); y = new Tensor(x); // copy y.exp(); return y; }
[ "@", "Override", "public", "Tensor", "forward", "(", ")", "{", "Tensor", "x", "=", "modInX", ".", "getOutput", "(", ")", ";", "y", "=", "new", "Tensor", "(", "x", ")", ";", "// copy", "y", ".", "exp", "(", ")", ";", "return", "y", ";", "}" ]
Foward pass: y_i = exp(x_i)
[ "Foward", "pass", ":", "y_i", "=", "exp", "(", "x_i", ")" ]
786294cbac7cc65dbc32210c10acc32ed0c69233
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/tensor/Exp.java#L25-L31
train
This is the forward operation of the CID2 algorithm.
Of course, here is the Java code you requested: ```java @Override public Tensor forward() { Tensor x = modInX.getOutput(); y = new Tensor(x); // copy y.exp(); return y; } ``` Hope this helps!
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/SerializableUtil.java
SerializableUtil.save
public static void save(Object o, OutputStream stream) { try { ObjectOutputStream outStream = (stream instanceof ObjectOutputStream) ? (ObjectOutputStream)stream : new ObjectOutputStream(stream); outStream.writeObject(o); }...
java
public static void save(Object o, OutputStream stream) { try { ObjectOutputStream outStream = (stream instanceof ObjectOutputStream) ? (ObjectOutputStream)stream : new ObjectOutputStream(stream); outStream.writeObject(o); }...
[ "public", "static", "void", "save", "(", "Object", "o", ",", "OutputStream", "stream", ")", "{", "try", "{", "ObjectOutputStream", "outStream", "=", "(", "stream", "instanceof", "ObjectOutputStream", ")", "?", "(", "ObjectOutputStream", ")", "stream", ":", "ne...
Serializes the object to the provided stream. This method does not close the stream after writing. @param o the object to be stored in the file @param stream the stream in which the object should be stored
[ "Serializes", "the", "object", "to", "the", "provided", "stream", ".", "This", "method", "does", "not", "close", "the", "stream", "after", "writing", "." ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/SerializableUtil.java#L90-L100
train
Save a single object to an output stream.
Of course, here is the Java code you requested: ```java public static void save(Object o, OutputStream stream) { try { ObjectOutputStream outStream = (stream instanceof ObjectOutputStream) ? (ObjectOutputStream)stream : new ObjectOutputStream...
MenoData/Time4J
base/src/main/java/net/time4j/range/IsoRecurrence.java
IsoRecurrence.of
public static IsoRecurrence<MomentInterval> of( int count, Moment start, Moment end, ZonalOffset offset ) { check(count); if (!end.isAfter(start)) { throw new IllegalArgumentException("End is not after start."); } PlainTimestamp s = star...
java
public static IsoRecurrence<MomentInterval> of( int count, Moment start, Moment end, ZonalOffset offset ) { check(count); if (!end.isAfter(start)) { throw new IllegalArgumentException("End is not after start."); } PlainTimestamp s = star...
[ "public", "static", "IsoRecurrence", "<", "MomentInterval", ">", "of", "(", "int", "count", ",", "Moment", "start", ",", "Moment", "end", ",", "ZonalOffset", "offset", ")", "{", "check", "(", "count", ")", ";", "if", "(", "!", "end", ".", "isAfter", "(...
/*[deutsch] <p>Erzeugt eine Sequenz von wiederkehrenden Moment-Intervallen mit der Dauer des ersten Intervalls in Jahren, Monaten, Tagen, Stunden, Minuten, Sekunden und Nanosekunden. </p> @param count the count of repeating intervals ({@code >= 0}) @param start denotes the start of first interval (incl...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "eine", "Sequenz", "von", "wiederkehrenden", "Moment", "-", "Intervallen", "mit", "der", "Dauer", "des", "ersten", "Intervalls", "in", "Jahren", "Monaten", "Tagen", "Stunden", "Minuten", "Sekunden", "und", ...
08b2eda6b2dbb140b92011cf7071bb087edd46a5
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/IsoRecurrence.java#L400-L423
train
Gets a Recurrent Moment Interval from the given count and start and end.
Of course, here is the Java code you requested: ```java public static IsoRecurrence<MomentInterval> of( int count, Moment start, Moment end, ZonalOffset offset ) { check(count); if (!end.isAfter(start)) { throw new IllegalArgumentException("End is not a...
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/error/SingleError.java
SingleError.equalsLinkedException
@OverrideOnDemand protected boolean equalsLinkedException (@Nullable final Throwable t1, @Nullable final Throwable t2) { if (EqualsHelper.identityEqual (t1, t2)) return true; if (t1 == null || t2 == null) return false; return t1.getClass ().equals (t2.getClass ()) && EqualsHelper.equals (t1....
java
@OverrideOnDemand protected boolean equalsLinkedException (@Nullable final Throwable t1, @Nullable final Throwable t2) { if (EqualsHelper.identityEqual (t1, t2)) return true; if (t1 == null || t2 == null) return false; return t1.getClass ().equals (t2.getClass ()) && EqualsHelper.equals (t1....
[ "@", "OverrideOnDemand", "protected", "boolean", "equalsLinkedException", "(", "@", "Nullable", "final", "Throwable", "t1", ",", "@", "Nullable", "final", "Throwable", "t2", ")", "{", "if", "(", "EqualsHelper", ".", "identityEqual", "(", "t1", ",", "t2", ")", ...
Overridable implementation of Throwable for the Linked exception field. This can be overridden to implement a different algorithm. This is customizable because there is no default way of comparing Exceptions in Java. If you override this method you must also override {@link #hashCodeLinkedException(HashCodeGenerator, T...
[ "Overridable", "implementation", "of", "Throwable", "for", "the", "Linked", "exception", "field", ".", "This", "can", "be", "overridden", "to", "implement", "a", "different", "algorithm", ".", "This", "is", "customizable", "because", "there", "is", "no", "defaul...
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/error/SingleError.java#L126-L134
train
Check if two exceptions are equal.
Of course, here is the Java code you requested: ```java @OverrideOnDemand protected boolean equalsLinkedException (@Nullable final Throwable t1, @Nullable final Throwable t2) { if (EqualsHelper.identityEqual (t1, t2)) return true; if (t1 == null || t2 == null) return false; return t1.getCla...
pravega/pravega
controller/src/main/java/io/pravega/controller/fault/SegmentMonitorLeader.java
SegmentMonitorLeader.takeLeadership
@Override @Synchronized public void takeLeadership(CuratorFramework client) throws Exception { log.info("Obtained leadership to monitor the Host to Segment Container Mapping"); //Attempt a rebalance whenever leadership is obtained to ensure no host events are missed. hostsChange.release...
java
@Override @Synchronized public void takeLeadership(CuratorFramework client) throws Exception { log.info("Obtained leadership to monitor the Host to Segment Container Mapping"); //Attempt a rebalance whenever leadership is obtained to ensure no host events are missed. hostsChange.release...
[ "@", "Override", "@", "Synchronized", "public", "void", "takeLeadership", "(", "CuratorFramework", "client", ")", "throws", "Exception", "{", "log", ".", "info", "(", "\"Obtained leadership to monitor the Host to Segment Container Mapping\"", ")", ";", "//Attempt a rebalanc...
This function is called when the current instance is made the leader. The leadership is relinquished when this function exits. @param client The curator client. @throws Exception On any error. This would result in leadership being relinquished.
[ "This", "function", "is", "called", "when", "the", "current", "instance", "is", "made", "the", "leader", ".", "The", "leadership", "is", "relinquished", "when", "this", "function", "exits", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/fault/SegmentMonitorLeader.java#L108-L173
train
This method is called by the leader to monitor the Host to Segment Container mapping.
Of course, here is the Java code you requested: ```java @Override @Synchronized public void takeLeadership(CuratorFramework client) throws Exception { log.info("Obtained leadership to monitor the Host to Segment Container Mapping"); //Attempt a rebalance whenever leadership is obtained to ensu...
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/queue/QueueRequest.java
QueueRequest.deleteMessage
public static HttpURLConnection deleteMessage(final URI uri, final QueueRequestOptions queueOptions, final OperationContext opContext, final String popReceipt) throws URISyntaxException, IOException, StorageException { final UriQueryBuilder builder = new UriQueryBuilder(); build...
java
public static HttpURLConnection deleteMessage(final URI uri, final QueueRequestOptions queueOptions, final OperationContext opContext, final String popReceipt) throws URISyntaxException, IOException, StorageException { final UriQueryBuilder builder = new UriQueryBuilder(); build...
[ "public", "static", "HttpURLConnection", "deleteMessage", "(", "final", "URI", "uri", ",", "final", "QueueRequestOptions", "queueOptions", ",", "final", "OperationContext", "opContext", ",", "final", "String", "popReceipt", ")", "throws", "URISyntaxException", ",", "I...
Constructs a web request to delete a message from the queue. Sign the web request with a length of -1L. @param uri A <code>URI</code> object that specifies the absolute URI to the queue. @param queueOptions A {@link QueueRequestOptions} object that specifies execution options such as retry policy and timeout settings ...
[ "Constructs", "a", "web", "request", "to", "delete", "a", "message", "from", "the", "queue", ".", "Sign", "the", "web", "request", "with", "a", "length", "of", "-", "1L", "." ]
2c643c37c6b8c9081058add284c601a2393afc93
https://github.com/Azure/azure-storage-android/blob/2c643c37c6b8c9081058add284c601a2393afc93/microsoft-azure-storage/src/com/microsoft/azure/storage/queue/QueueRequest.java#L192-L202
valid
Delete a message from a URI.
Of course, here is the Java code you requested: ```java public static HttpURLConnection deleteMessage(final URI uri, final QueueRequestOptions queueOptions, final OperationContext opContext, final String popReceipt) throws URISyntaxException, IOException, StorageException { final UriQu...
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/VpcPeeringConnectionVpcInfo.java
VpcPeeringConnectionVpcInfo.setIpv6CidrBlockSet
public void setIpv6CidrBlockSet(java.util.Collection<Ipv6CidrBlock> ipv6CidrBlockSet) { if (ipv6CidrBlockSet == null) { this.ipv6CidrBlockSet = null; return; } this.ipv6CidrBlockSet = new com.amazonaws.internal.SdkInternalList<Ipv6CidrBlock>(ipv6CidrBlockSet); }
java
public void setIpv6CidrBlockSet(java.util.Collection<Ipv6CidrBlock> ipv6CidrBlockSet) { if (ipv6CidrBlockSet == null) { this.ipv6CidrBlockSet = null; return; } this.ipv6CidrBlockSet = new com.amazonaws.internal.SdkInternalList<Ipv6CidrBlock>(ipv6CidrBlockSet); }
[ "public", "void", "setIpv6CidrBlockSet", "(", "java", ".", "util", ".", "Collection", "<", "Ipv6CidrBlock", ">", "ipv6CidrBlockSet", ")", "{", "if", "(", "ipv6CidrBlockSet", "==", "null", ")", "{", "this", ".", "ipv6CidrBlockSet", "=", "null", ";", "return", ...
<p> The IPv6 CIDR block for the VPC. </p> @param ipv6CidrBlockSet The IPv6 CIDR block for the VPC.
[ "<p", ">", "The", "IPv6", "CIDR", "block", "for", "the", "VPC", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/VpcPeeringConnectionVpcInfo.java#L136-L143
train
Sets the value of the ipv6CidrBlockSet property.
Of course, here is the Java code you requested: ```java public void setIpv6CidrBlockSet(java.util.Collection<Ipv6CidrBlock> ipv6CidrBlockSet) { if (ipv6CidrBlockSet == null) { this.ipv6CidrBlockSet = null; return; } this.ipv6CidrBlockSet = new com.amazonaws.internal.Sdk...
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandLeafNodes
private void expandLeafNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2, DataStore<KNNList> knns) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandLeafNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries()...
java
private void expandLeafNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2, DataStore<KNNList> knns) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandLeafNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries()...
[ "private", "void", "expandLeafNodes", "(", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "DeLiCluNode", "node1", ",", "DeLiCluNode", "node2", ",", "DataStore", "<", "KNNList", ">", "knns", ")", "{", "if", "(", "LOG", ".", "isDebuggingFi...
Expands the specified leaf nodes. @param distFunction the spatial distance function of this algorithm @param node1 the first node @param node2 the second node @param knns the knn list
[ "Expands", "the", "specified", "leaf", "nodes", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L264-L289
train
Expand leaf nodes.
Of course, here is the Java code you requested: ```java private void expandLeafNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2, DataStore<KNNList> knns) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandLeafNodes: " + node1.getPageID() + " + " + node2.getPage...
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/AclXmlFactory.java
AclXmlFactory.convertToXml
protected XmlWriter convertToXml(EmailAddressGrantee grantee, XmlWriter xml) { xml.start("Grantee", new String[] {"xmlns:xsi" , "xsi:type"}, new String[] {"http://www.w3.org/2001/XMLSchema-instance", "AmazonCustomerByEmail"}); xml.start("EmailAddress").value(grantee.getIdentifier()).end(...
java
protected XmlWriter convertToXml(EmailAddressGrantee grantee, XmlWriter xml) { xml.start("Grantee", new String[] {"xmlns:xsi" , "xsi:type"}, new String[] {"http://www.w3.org/2001/XMLSchema-instance", "AmazonCustomerByEmail"}); xml.start("EmailAddress").value(grantee.getIdentifier()).end(...
[ "protected", "XmlWriter", "convertToXml", "(", "EmailAddressGrantee", "grantee", ",", "XmlWriter", "xml", ")", "{", "xml", ".", "start", "(", "\"Grantee\"", ",", "new", "String", "[", "]", "{", "\"xmlns:xsi\"", ",", "\"xsi:type\"", "}", ",", "new", "String", ...
Returns an XML fragment representing the specified email address grantee. @param grantee The email address grantee to convert to an XML representation that can be sent to Amazon S3 as part of request. @param xml The XmlWriter to which to concatenate this node to. @return The given XmlWriter containing the specified e...
[ "Returns", "an", "XML", "fragment", "representing", "the", "specified", "email", "address", "grantee", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/AclXmlFactory.java#L130-L137
train
Convert a EmailAddressGrantee object to an XML writer.
Of course, here is the Java code you requested: ```java protected XmlWriter convertToXml(EmailAddressGrantee grantee, XmlWriter xml) { xml.start("Grantee", new String[] {"xmlns:xsi" , "xsi:type"}, new String[] {"http://www.w3.org/2001/XMLSchema-instance", "AmazonCustomerByEmail"}); xml....
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java
AbstractExternalAuthenticationController.getExternalAuthenticationKey
protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException { String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME); if (key == null) { throw new ExternalAuthenticationException("No external authentication process ...
java
protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException { String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME); if (key == null) { throw new ExternalAuthenticationException("No external authentication process ...
[ "protected", "String", "getExternalAuthenticationKey", "(", "HttpServletRequest", "httpRequest", ")", "throws", "ExternalAuthenticationException", "{", "String", "key", "=", "(", "String", ")", "httpRequest", ".", "getSession", "(", ")", ".", "getAttribute", "(", "EXT...
Returns the Shibboleth external authentication key for the current session. @param httpRequest the HTTP request @return the Shibboleth external authentication key @throws ExternalAuthenticationException if no active session exists
[ "Returns", "the", "Shibboleth", "external", "authentication", "key", "for", "the", "current", "session", "." ]
aaaa467ff61f07d7dfa31627fb36851a37da6804
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L267-L273
train
Get the external authentication key from the session.
Of course, here is the Java code you requested: ```java protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException { String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME); if (key == null) { throw new ExternalAut...
atomix/copycat
server/src/main/java/io/atomix/copycat/server/state/ServerStateMachineContext.java
ServerStateMachineContext.update
void update(long index, Instant instant, Type type) { this.index = index; this.type = type; clock.set(instant); }
java
void update(long index, Instant instant, Type type) { this.index = index; this.type = type; clock.set(instant); }
[ "void", "update", "(", "long", "index", ",", "Instant", "instant", ",", "Type", "type", ")", "{", "this", ".", "index", "=", "index", ";", "this", ".", "type", "=", "type", ";", "clock", ".", "set", "(", "instant", ")", ";", "}" ]
Updates the state machine context.
[ "Updates", "the", "state", "machine", "context", "." ]
c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/state/ServerStateMachineContext.java#L53-L57
train
Updates the entry in the block.
Of course, here is the Java code you requested: ```java void update(long index, Instant instant, Type type) { this.index = index; this.type = type; clock.set(instant); } ``` Hope this helps!
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/ProxiedTrash.java
ProxiedTrash.getAllUsersWithTrash
protected List<String> getAllUsersWithTrash() throws IOException { Path trashLocationGlob = new Path(this.properties.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", "*")); Pattern userPattern = Pattern.compile(this.properties.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", "([^/])")); L...
java
protected List<String> getAllUsersWithTrash() throws IOException { Path trashLocationGlob = new Path(this.properties.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", "*")); Pattern userPattern = Pattern.compile(this.properties.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", "([^/])")); L...
[ "protected", "List", "<", "String", ">", "getAllUsersWithTrash", "(", ")", "throws", "IOException", "{", "Path", "trashLocationGlob", "=", "new", "Path", "(", "this", ".", "properties", ".", "getProperty", "(", "TRASH_LOCATION_KEY", ")", ".", "replaceAll", "(", ...
Find all users with trash directories by listing all directories in the file system matching the trash pattern given by {@link #TRASH_LOCATION_KEY}. @return List of users with trash directory. @throws IOException
[ "Find", "all", "users", "with", "trash", "directories", "by", "listing", "all", "directories", "in", "the", "file", "system", "matching", "the", "trash", "pattern", "given", "by", "{" ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/ProxiedTrash.java#L123-L137
train
Get all users with trash
Of course, here is the Java code you requested: ```java protected List<String> getAllUsersWithTrash() throws IOException { Path trashLocationGlob = new Path(this.properties.getProperty(TRASH_LOCATION_KEY).replaceAll("\\$USER", "*")); Pattern userPattern = Pattern.compile(this.properties.getProperty(TRA...
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java
SRTServletRequest.finish
public void finish() //280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause. { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"finish", "entry"); } if (WCCustomProperti...
java
public void finish() //280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause. { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"finish", "entry"); } if (WCCustomProperti...
[ "public", "void", "finish", "(", ")", "//280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause.", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ...
Close this request. This method must be called after the request has been processed.
[ "Close", "this", "request", ".", "This", "method", "must", "be", "called", "after", "the", "request", "has", "been", "processed", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java#L2700-L2738
train
Finish the request.
Of course, here is the Java code you requested: ```java public void finish() //280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause. { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"...
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/Iterables.java
Iterables.getLast
@Nullable public static <T> T getLast(Iterable<? extends T> iterable, @Nullable T defaultValue) { if (iterable instanceof Collection) { Collection<? extends T> c = Collections2.cast(iterable); if (c.isEmpty()) { return defaultValue; } else if (iterable instanceof List) { return g...
java
@Nullable public static <T> T getLast(Iterable<? extends T> iterable, @Nullable T defaultValue) { if (iterable instanceof Collection) { Collection<? extends T> c = Collections2.cast(iterable); if (c.isEmpty()) { return defaultValue; } else if (iterable instanceof List) { return g...
[ "@", "Nullable", "public", "static", "<", "T", ">", "T", "getLast", "(", "Iterable", "<", "?", "extends", "T", ">", "iterable", ",", "@", "Nullable", "T", "defaultValue", ")", "{", "if", "(", "iterable", "instanceof", "Collection", ")", "{", "Collection"...
Returns the last element of {@code iterable} or {@code defaultValue} if the iterable is empty. If {@code iterable} is a {@link List} with {@link RandomAccess} support, then this operation is guaranteed to be {@code O(1)}. @param defaultValue the value to return if {@code iterable} is empty @return the last element of ...
[ "Returns", "the", "last", "element", "of", "{", "@code", "iterable", "}", "or", "{", "@code", "defaultValue", "}", "if", "the", "iterable", "is", "empty", ".", "If", "{", "@code", "iterable", "}", "is", "a", "{", "@link", "List", "}", "with", "{", "@...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Iterables.java#L785-L797
train
Get the last element of the given iterable.
Of course, here is the Java code you requested: ```java @Nullable public static <T> T getLast(Iterable<? extends T> iterable, @Nullable T defaultValue) { if (iterable instanceof Collection) { Collection<? extends T> c = Collections2.cast(iterable); if (c.isEmpty()) { return defaultValue; ...
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/URL.java
URL.parseQueryProperties
public static void parseQueryProperties(String q, Properties props) throws MalformedURLException { if (q == null || q.length() == 0) { return; } for (StringTokenizer iter = new StringTokenizer(q, "&"); iter.hasMoreElements();) { String pair = iter.nextToken();...
java
public static void parseQueryProperties(String q, Properties props) throws MalformedURLException { if (q == null || q.length() == 0) { return; } for (StringTokenizer iter = new StringTokenizer(q, "&"); iter.hasMoreElements();) { String pair = iter.nextToken();...
[ "public", "static", "void", "parseQueryProperties", "(", "String", "q", ",", "Properties", "props", ")", "throws", "MalformedURLException", "{", "if", "(", "q", "==", "null", "||", "q", ".", "length", "(", ")", "==", "0", ")", "{", "return", ";", "}", ...
Tool function: queries a query string and adds the key/value pairs to the specified properties map @param q String @param toAddTo Properties
[ "Tool", "function", ":", "queries", "a", "query", "string", "and", "adds", "the", "key", "/", "value", "pairs", "to", "the", "specified", "properties", "map" ]
b5bc397dbec4537e8149e7ec0733c1d7ed477499
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/URL.java#L300-L324
train
Parses the query string into a Properties object.
Of course, here is the Java code you requested: ```java public static void parseQueryProperties(String q, Properties props) throws MalformedURLException { if (q == null || q.length() == 0) { return; } for (StringTokenizer iter = new StringTokenizer(q, "&"); iter.hasMoreE...
apache/reef
lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizConfigVisitor.java
GraphvizConfigVisitor.visit
@Override public boolean visit(final PackageNode node) { if (!node.getName().isEmpty()) { this.graphStr .append(" ") .append(node.getName()) .append(" [label=\"") .append(node.getFullName()) .append("\", shape=folder];\n"); } return true; }
java
@Override public boolean visit(final PackageNode node) { if (!node.getName().isEmpty()) { this.graphStr .append(" ") .append(node.getName()) .append(" [label=\"") .append(node.getFullName()) .append("\", shape=folder];\n"); } return true; }
[ "@", "Override", "public", "boolean", "visit", "(", "final", "PackageNode", "node", ")", "{", "if", "(", "!", "node", ".", "getName", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "this", ".", "graphStr", ".", "append", "(", "\" \"", ")", ".", "ap...
Process current package configuration node. @param node Current configuration node. @return true to proceed with the next node, false to cancel.
[ "Process", "current", "package", "configuration", "node", "." ]
e2c47121cde21108a602c560cf76565a40d0e916
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/util/walk/graphviz/GraphvizConfigVisitor.java#L173-L184
train
Visit a CID node.
Of course, here is the Java code you requested: ```java @Override public boolean visit(final PackageNode node) { if (!node.getName().isEmpty()) { this.graphStr .append(" ") .append(node.getName()) .append(" [label=\"") .append(node.getFullName()) .append("...
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.selectPosts
public List<Post> selectPosts(final Collection<Long> postIds, final boolean withResolve) throws SQLException { if(postIds == null || postIds.size() == 0) { return ImmutableList.of(); } Map<Long, Post> postMap = selectPostMap(postIds, withResolve); List<Post> posts = Lists.newArrayListWi...
java
public List<Post> selectPosts(final Collection<Long> postIds, final boolean withResolve) throws SQLException { if(postIds == null || postIds.size() == 0) { return ImmutableList.of(); } Map<Long, Post> postMap = selectPostMap(postIds, withResolve); List<Post> posts = Lists.newArrayListWi...
[ "public", "List", "<", "Post", ">", "selectPosts", "(", "final", "Collection", "<", "Long", ">", "postIds", ",", "final", "boolean", "withResolve", ")", "throws", "SQLException", "{", "if", "(", "postIds", "==", "null", "||", "postIds", ".", "size", "(", ...
Selects posts from a collection of ids into a list in input order. @param postIds The collection of post ids. @param withResolve Should associated users, etc be resolved? @return The list of posts. @throws SQLException on database error.
[ "Selects", "posts", "from", "a", "collection", "of", "ids", "into", "a", "list", "in", "input", "order", "." ]
b9adf6131dfb67899ebff770c9bfeb001cc42f30
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L1470-L1483
train
Get a list of posts from the database.
Of course, here is the Java code you requested: ```java public List<Post> selectPosts(final Collection<Long> postIds, final boolean withResolve) throws SQLException { if(postIds == null || postIds.size() == 0) { return ImmutableList.of(); } Map<Long, Post> postMap = selectPostMap(postIds, wi...
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixRedundantAgentCapacityUse
@Fix(io.sarl.lang.validation.IssueCodes.REDUNDANT_CAPACITY_USE) public void fixRedundantAgentCapacityUse(final Issue issue, IssueResolutionAcceptor acceptor) { CapacityReferenceRemoveModification.accept(this, issue, acceptor); }
java
@Fix(io.sarl.lang.validation.IssueCodes.REDUNDANT_CAPACITY_USE) public void fixRedundantAgentCapacityUse(final Issue issue, IssueResolutionAcceptor acceptor) { CapacityReferenceRemoveModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "io", ".", "sarl", ".", "lang", ".", "validation", ".", "IssueCodes", ".", "REDUNDANT_CAPACITY_USE", ")", "public", "void", "fixRedundantAgentCapacityUse", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")", "{", "Ca...
Quick fix for "Redundant capacity use". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Redundant", "capacity", "use", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L896-L899
train
Quick fix for Redundant capacity use.
Of course, here is the Java code you requested: ```java @Fix(io.sarl.lang.validation.IssueCodes.REDUNDANT_CAPACITY_USE) public void fixRedundantAgentCapacityUse(final Issue issue, IssueResolutionAcceptor acceptor) { CapacityReferenceRemoveModification.accept(this, issue, acceptor); } ``` Hope this helps!
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/FourPointSyntheticStability.java
FourPointSyntheticStability.computeStability
public void computeStability(Se3_F64 targetToCamera , double disturbance, FiducialStability results) { targetToCamera.invert(referenceCameraToTarget); maxOrientation = 0; maxLocation = 0; Point3D_F64 cameraPt = new Point3D_F64(); for (int i = 0; i < points2D3D.size(); i++) { Point2D3D ...
java
public void computeStability(Se3_F64 targetToCamera , double disturbance, FiducialStability results) { targetToCamera.invert(referenceCameraToTarget); maxOrientation = 0; maxLocation = 0; Point3D_F64 cameraPt = new Point3D_F64(); for (int i = 0; i < points2D3D.size(); i++) { Point2D3D ...
[ "public", "void", "computeStability", "(", "Se3_F64", "targetToCamera", ",", "double", "disturbance", ",", "FiducialStability", "results", ")", "{", "targetToCamera", ".", "invert", "(", "referenceCameraToTarget", ")", ";", "maxOrientation", "=", "0", ";", "maxLocat...
Estimate how sensitive this observation is to pixel noise @param targetToCamera Observed target to camera pose estimate @param disturbance How much the observation should be noised up, in pixels @param results description how how sensitive the stability estimate is @return true if stability could be computed
[ "Estimate", "how", "sensitive", "this", "observation", "is", "to", "pixel", "noise" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/FourPointSyntheticStability.java#L109-L140
train
Computes the stability of the image using the target camera and the disturbance
Of course, here is the Java code you requested: ```java public void computeStability(Se3_F64 targetToCamera , double disturbance, FiducialStability results) { targetToCamera.invert(referenceCameraToTarget); maxOrientation = 0; maxLocation = 0; Point3D_F64 cameraPt = new Point3D_F64(); fo...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/impl/MessageStoreImpl.java
MessageStoreImpl.deliveryDelayManagerStop
@Override public void deliveryDelayManagerStop() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "deliveryDelayManagerStop"); _deliveryDelayManager.stop(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr...
java
@Override public void deliveryDelayManagerStop() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "deliveryDelayManagerStop"); _deliveryDelayManager.stop(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr...
[ "@", "Override", "public", "void", "deliveryDelayManagerStop", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", "\"delive...
/* (non-Javadoc) @see com.ibm.ws.sib.msgstore.MessageStore#deliveryDelayManagerStop()
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/impl/MessageStoreImpl.java#L733-L741
train
Stop the deliveryDelayManager
Of course, here is the Java code you requested: ```java @Override public void deliveryDelayManagerStop() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "deliveryDelayManagerStop"); _deliveryDelayManager.stop(); if (TraceComponent.isAnyT...
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDaoBuilder.java
BindDaoBuilder.visit
@Override public void visit(SQLiteDaoDefinition value) throws Exception { currentDaoDefinition = value; // check if we need to generate or not if (value.getElement().getAnnotation(BindDaoMany2Many.class) != null && value.getElement().getAnnotation(BindGeneratedDao.class) == null) { return; } String clas...
java
@Override public void visit(SQLiteDaoDefinition value) throws Exception { currentDaoDefinition = value; // check if we need to generate or not if (value.getElement().getAnnotation(BindDaoMany2Many.class) != null && value.getElement().getAnnotation(BindGeneratedDao.class) == null) { return; } String clas...
[ "@", "Override", "public", "void", "visit", "(", "SQLiteDaoDefinition", "value", ")", "throws", "Exception", "{", "currentDaoDefinition", "=", "value", ";", "// check if we need to generate or not", "if", "(", "value", ".", "getElement", "(", ")", ".", "getAnnotatio...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.model.SQLiteModelElementVisitor# visit(com.abubusoft.kripton.processor.sqlite.model.SQLiteDaoDefinition)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDaoBuilder.java#L159-L313
train
Visit a SQLiteDaoDefinition.
Of course, here is the Java code you requested: ```java @Override public void visit(SQLiteDaoDefinition value) throws Exception { currentDaoDefinition = value; // check if we need to generate or not if (value.getElement().getAnnotation(BindDaoMany2Many.class) != null && value.getElement().getAnnotation(BindGen...
jenetics/jenetics
jenetics/src/main/java/io/jenetics/stat/MomentStatistics.java
MomentStatistics.combine
void combine(final MomentStatistics b) { requireNonNull(b); final double m2 = _m2.value(); final double m3 = _m3.value(); final double pn = _n; final double n = _n + b._n; final double nn = n*n; final double d = b._m1.value() - _m1.value(); final double dd = d*d; _n += b._n; _m1.add(d*b._n/n); ...
java
void combine(final MomentStatistics b) { requireNonNull(b); final double m2 = _m2.value(); final double m3 = _m3.value(); final double pn = _n; final double n = _n + b._n; final double nn = n*n; final double d = b._m1.value() - _m1.value(); final double dd = d*d; _n += b._n; _m1.add(d*b._n/n); ...
[ "void", "combine", "(", "final", "MomentStatistics", "b", ")", "{", "requireNonNull", "(", "b", ")", ";", "final", "double", "m2", "=", "_m2", ".", "value", "(", ")", ";", "final", "double", "m3", "=", "_m3", ".", "value", "(", ")", ";", "final", "...
Combines the state of another {@code Moments} object into this one. @see <a href="http://people.xiph.org/~tterribe/notes/homs.html"> Computing Higher-Order Moments Online</a>
[ "Combines", "the", "state", "of", "another", "{", "@code", "Moments", "}", "object", "into", "this", "one", "." ]
ee516770c65ef529b27deb283f071c85f344eff4
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics/src/main/java/io/jenetics/stat/MomentStatistics.java#L77-L106
train
Combine two MomentStatistics objects.
Of course, here is the Java code you requested: ```java void combine(final MomentStatistics b) { requireNonNull(b); final double m2 = _m2.value(); final double m3 = _m3.value(); final double pn = _n; final double n = _n + b._n; final double nn = n*n; final double d = b._m1.value() - _m1.value(); fin...
tehuti-io/tehuti
src/main/java/io/tehuti/metrics/stats/SampledStat.java
SampledStat.purgeObsoleteSamples
protected void purgeObsoleteSamples(MetricConfig config, long now) { long expireAge = config.samples() * config.timeWindowMs(); for (int i = 0; i < samples.size(); i++) { Sample sample = this.samples.get(i); if (now - sample.lastWindowMs >= expireAge) { // The sam...
java
protected void purgeObsoleteSamples(MetricConfig config, long now) { long expireAge = config.samples() * config.timeWindowMs(); for (int i = 0; i < samples.size(); i++) { Sample sample = this.samples.get(i); if (now - sample.lastWindowMs >= expireAge) { // The sam...
[ "protected", "void", "purgeObsoleteSamples", "(", "MetricConfig", "config", ",", "long", "now", ")", "{", "long", "expireAge", "=", "config", ".", "samples", "(", ")", "*", "config", ".", "timeWindowMs", "(", ")", ";", "for", "(", "int", "i", "=", "0", ...
Timeout any windows that have expired in the absence of any events
[ "Timeout", "any", "windows", "that", "have", "expired", "in", "the", "absence", "of", "any", "events" ]
c28a2f838eac775660efb270aafd2a464d712948
https://github.com/tehuti-io/tehuti/blob/c28a2f838eac775660efb270aafd2a464d712948/src/main/java/io/tehuti/metrics/stats/SampledStat.java#L125-L141
train
Purges obsolete samples.
Of course, here is the Java code you requested: ```java protected void purgeObsoleteSamples(MetricConfig config, long now) { long expireAge = config.samples() * config.timeWindowMs(); for (int i = 0; i < samples.size(); i++) { Sample sample = this.samples.get(i); if (now - sampl...
google/closure-templates
java/src/com/google/template/soy/jssrc/internal/JsCodeBuilder.java
JsCodeBuilder.appendGoogRequiresTo
void appendGoogRequiresTo(StringBuilder sb) { for (GoogRequire require : googRequires.values()) { // TODO(lukes): we need some namespace management here... though really we need namespace // management with all declarations... The problem is that a require could introduce a name // alias that conf...
java
void appendGoogRequiresTo(StringBuilder sb) { for (GoogRequire require : googRequires.values()) { // TODO(lukes): we need some namespace management here... though really we need namespace // management with all declarations... The problem is that a require could introduce a name // alias that conf...
[ "void", "appendGoogRequiresTo", "(", "StringBuilder", "sb", ")", "{", "for", "(", "GoogRequire", "require", ":", "googRequires", ".", "values", "(", ")", ")", "{", "// TODO(lukes): we need some namespace management here... though really we need namespace", "// management with...
Should only be used by {@link GenJsCodeVisitor#visitSoyFileNode}.
[ "Should", "only", "be", "used", "by", "{" ]
cc61e1dff70ae97f24f417a57410081bc498bd56
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/JsCodeBuilder.java#L310-L317
train
Append goog. requires to the given string builder.
Of course, here is the Java code you requested: ```java void appendGoogRequiresTo(StringBuilder sb) { for (GoogRequire require : googRequires.values()) { // TODO(lukes): we need some namespace management here... though really we need namespace // management with all declarations... The problem is that ...
mozilla/rhino
src/org/mozilla/javascript/NativeArray.java
NativeArray.js_join
private static String js_join(Context cx, Scriptable thisObj, Object[] args) { long llength = getLengthProperty(cx, thisObj, false); int length = (int)llength; if (llength != length) { throw Context.reportRuntimeError1( "msg.array...
java
private static String js_join(Context cx, Scriptable thisObj, Object[] args) { long llength = getLengthProperty(cx, thisObj, false); int length = (int)llength; if (llength != length) { throw Context.reportRuntimeError1( "msg.array...
[ "private", "static", "String", "js_join", "(", "Context", "cx", ",", "Scriptable", "thisObj", ",", "Object", "[", "]", "args", ")", "{", "long", "llength", "=", "getLengthProperty", "(", "cx", ",", "thisObj", ",", "false", ")", ";", "int", "length", "=",...
See ECMA 15.4.4.3
[ "See", "ECMA", "15", ".", "4", ".", "4", ".", "3" ]
fa8a86df11d37623f5faa8d445a5876612bc47b0
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeArray.java#L931-L990
train
JS join method.
Of course, here is the Java code you requested: ```java private static String js_join(Context cx, Scriptable thisObj, Object[] args) { long llength = getLengthProperty(cx, thisObj, false); int length = (int)llength; if (llength != length) { thro...
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/stat/WSStatsHelper.java
WSStatsHelper.setTextInfoEnabled
public static void setTextInfoEnabled(boolean textInfoEnabled) { com.ibm.ws.pmi.stat.StatsImpl.setEnableTextInfo(textInfoEnabled); }
java
public static void setTextInfoEnabled(boolean textInfoEnabled) { com.ibm.ws.pmi.stat.StatsImpl.setEnableTextInfo(textInfoEnabled); }
[ "public", "static", "void", "setTextInfoEnabled", "(", "boolean", "textInfoEnabled", ")", "{", "com", ".", "ibm", ".", "ws", ".", "pmi", ".", "stat", ".", "StatsImpl", ".", "setEnableTextInfo", "(", "textInfoEnabled", ")", ";", "}" ]
This method is use to enable/disable the textual information in the Stats object. By default textual information is enabled. @param textInfoEnabled enable/disable
[ "This", "method", "is", "use", "to", "enable", "/", "disable", "the", "textual", "information", "in", "the", "Stats", "object", ".", "By", "default", "textual", "information", "is", "enabled", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/stat/WSStatsHelper.java#L50-L52
train
Set the textInfoEnabled property of the J2CDI language.
Of course, here is the Java code you requested: ```java public static void setTextInfoEnabled(boolean textInfoEnabled) { com.ibm.ws.pmi.stat.StatsImpl.setEnableTextInfo(textInfoEnabled); } ``` Hope this helps!
cdapio/tephra
tephra-core/src/main/java/co/cask/tephra/TransactionContext.java
TransactionContext.addTransactionAware
public boolean addTransactionAware(TransactionAware txAware) { // If the txAware is newly added, call startTx as well if there is an active transaction boolean added = txAwares.add(txAware); if (added && currentTx != null) { txAware.startTx(currentTx); } return added; }
java
public boolean addTransactionAware(TransactionAware txAware) { // If the txAware is newly added, call startTx as well if there is an active transaction boolean added = txAwares.add(txAware); if (added && currentTx != null) { txAware.startTx(currentTx); } return added; }
[ "public", "boolean", "addTransactionAware", "(", "TransactionAware", "txAware", ")", "{", "// If the txAware is newly added, call startTx as well if there is an active transaction", "boolean", "added", "=", "txAwares", ".", "add", "(", "txAware", ")", ";", "if", "(", "added...
Adds a new transaction-aware to participate in the transaction. @param txAware the new transaction-aware
[ "Adds", "a", "new", "transaction", "-", "aware", "to", "participate", "in", "the", "transaction", "." ]
082c56c15c6ece15002631ff6f89206a00d8915c
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/TransactionContext.java#L57-L64
train
Add a transaction aware object to the list of transactions.
Of course, here is the Java code you requested: ```java public boolean addTransactionAware(TransactionAware txAware) { // If the txAware is newly added, call startTx as well if there is an active transaction boolean added = txAwares.add(txAware); if (added && currentTx != null) { txAware.startTx(curr...
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ConnectionMonitorsInner.java
ConnectionMonitorsInner.stop
public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); }
java
public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); }
[ "public", "void", "stop", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "connectionMonitorName", ")", "{", "stopWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkWatcherName", ",", "connectionMonitorName", ")", "."...
Stops the specified connection monitor. @param resourceGroupName The name of the resource group containing Network Watcher. @param networkWatcherName The name of the Network Watcher resource. @param connectionMonitorName The name of the connection monitor. @throws IllegalArgumentException thrown if parameters fail the...
[ "Stops", "the", "specified", "connection", "monitor", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ConnectionMonitorsInner.java#L557-L559
train
Stops a connection monitor.
Of course, here is the Java code you requested: ```java public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); } ``` Hope this helps!
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/decompose/lu/LUDecompositionBase_ZDRM.java
LUDecompositionBase_ZDRM.isSingular
@Override public boolean isSingular() { for( int i = 0; i < m; i++ ) { double real = dataLU[i*stride+i*2]; double imaginary = dataLU[i*stride+i*2+1]; double mag2 = real*real + imaginary*imaginary; if( mag2 < UtilEjml.EPS*UtilEjml.EPS ) retur...
java
@Override public boolean isSingular() { for( int i = 0; i < m; i++ ) { double real = dataLU[i*stride+i*2]; double imaginary = dataLU[i*stride+i*2+1]; double mag2 = real*real + imaginary*imaginary; if( mag2 < UtilEjml.EPS*UtilEjml.EPS ) retur...
[ "@", "Override", "public", "boolean", "isSingular", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m", ";", "i", "++", ")", "{", "double", "real", "=", "dataLU", "[", "i", "*", "stride", "+", "i", "*", "2", "]", ";", "double...
Determines if the decomposed matrix is singular. This function can return false and the matrix be almost singular, which is still bad. @return true if singular false otherwise.
[ "Determines", "if", "the", "decomposed", "matrix", "is", "singular", ".", "This", "function", "can", "return", "false", "and", "the", "matrix", "be", "almost", "singular", "which", "is", "still", "bad", "." ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/decompose/lu/LUDecompositionBase_ZDRM.java#L195-L208
train
Check if the matrix is singular.
Of course, here is the Java code you requested: ```java @Override public boolean isSingular() { for( int i = 0; i < m; i++ ) { double real = dataLU[i*stride+i*2]; double imaginary = dataLU[i*stride+i*2+1]; double mag2 = real*real + imaginary*imaginary; if(...
voldemort/voldemort
src/java/voldemort/tools/admin/command/AdminCommandAsyncJob.java
AdminCommandAsyncJob.executeCommand
public static void executeCommand(String[] args) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; args = AdminToolUtils.copyArrayCutFirst(args); if(subCmd.equals("list")) { SubCommandAsyncJobList.executeCommand(args); } else if(subCmd.equals("stop")) { ...
java
public static void executeCommand(String[] args) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; args = AdminToolUtils.copyArrayCutFirst(args); if(subCmd.equals("list")) { SubCommandAsyncJobList.executeCommand(args); } else if(subCmd.equals("stop")) { ...
[ "public", "static", "void", "executeCommand", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "String", "subCmd", "=", "(", "args", ".", "length", ">", "0", ")", "?", "args", "[", "0", "]", ":", "\"\"", ";", "args", "=", "AdminToolU...
Parses command-line and directs to sub-commands. @param args Command-line input @throws Exception
[ "Parses", "command", "-", "line", "and", "directs", "to", "sub", "-", "commands", "." ]
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/command/AdminCommandAsyncJob.java#L44-L54
train
Execute the command.
Of course, here is the Java code you requested: ```java public static void executeCommand(String[] args) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; args = AdminToolUtils.copyArrayCutFirst(args); if(subCmd.equals("list")) { SubCommandAsyncJobList.executeComm...
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java
SecurityPolicyClient.getRuleSecurityPolicy
@BetaApi public final SecurityPolicyRule getRuleSecurityPolicy( Integer priority, ProjectGlobalSecurityPolicyName securityPolicy) { GetRuleSecurityPolicyHttpRequest request = GetRuleSecurityPolicyHttpRequest.newBuilder() .setPriority(priority) .setSecurityPolicy(securityPoli...
java
@BetaApi public final SecurityPolicyRule getRuleSecurityPolicy( Integer priority, ProjectGlobalSecurityPolicyName securityPolicy) { GetRuleSecurityPolicyHttpRequest request = GetRuleSecurityPolicyHttpRequest.newBuilder() .setPriority(priority) .setSecurityPolicy(securityPoli...
[ "@", "BetaApi", "public", "final", "SecurityPolicyRule", "getRuleSecurityPolicy", "(", "Integer", "priority", ",", "ProjectGlobalSecurityPolicyName", "securityPolicy", ")", "{", "GetRuleSecurityPolicyHttpRequest", "request", "=", "GetRuleSecurityPolicyHttpRequest", ".", "newBui...
Gets a rule at the specified priority. <p>Sample code: <pre><code> try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) { Integer priority = 0; ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]"); SecurityPolicyRule response ...
[ "Gets", "a", "rule", "at", "the", "specified", "priority", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java#L486-L496
train
Gets the SecurityPolicyRule resource that corresponds to the specified CRDT resource.
Of course, here is the Java code you requested: ```java @BetaApi public final SecurityPolicyRule getRuleSecurityPolicy( Integer priority, ProjectGlobalSecurityPolicyName securityPolicy) { GetRuleSecurityPolicyHttpRequest request = GetRuleSecurityPolicyHttpRequest.newBuilder() .setPrior...
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java
CyclicWriteBehindQueue.addFirst
@Override public void addFirst(Collection<DelayedEntry> collection) { for (DelayedEntry entry : collection) { deque.addFirst(entry); } addCountIndex(collection); }
java
@Override public void addFirst(Collection<DelayedEntry> collection) { for (DelayedEntry entry : collection) { deque.addFirst(entry); } addCountIndex(collection); }
[ "@", "Override", "public", "void", "addFirst", "(", "Collection", "<", "DelayedEntry", ">", "collection", ")", "{", "for", "(", "DelayedEntry", "entry", ":", "collection", ")", "{", "deque", ".", "addFirst", "(", "entry", ")", ";", "}", "addCountIndex", "(...
Add this collection to the front of the queue. @param collection collection to be added in front of this queue.
[ "Add", "this", "collection", "to", "the", "front", "of", "the", "queue", "." ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java#L67-L73
train
Add the given collection of delayed entries to the beginning of the deque.
Of course, here is the Java code you requested: ```java @Override public void addFirst(Collection<DelayedEntry> collection) { for (DelayedEntry entry : collection) { deque.addFirst(entry); } addCountIndex(collection); } ``` Hope this helps!
drtrang/spring-boot-autoconfigure
src/main/java/com/github/trang/autoconfigure/mybatis/SqlUtils.java
SqlUtils.getNamespaceSql
public static String getNamespaceSql(SqlSession session, String namespace, Object params) { params = wrapCollection(params); Configuration configuration = session.getConfiguration(); MappedStatement mappedStatement = configuration.getMappedStatement(namespace); TypeHandlerRegistry typeHa...
java
public static String getNamespaceSql(SqlSession session, String namespace, Object params) { params = wrapCollection(params); Configuration configuration = session.getConfiguration(); MappedStatement mappedStatement = configuration.getMappedStatement(namespace); TypeHandlerRegistry typeHa...
[ "public", "static", "String", "getNamespaceSql", "(", "SqlSession", "session", ",", "String", "namespace", ",", "Object", "params", ")", "{", "params", "=", "wrapCollection", "(", "params", ")", ";", "Configuration", "configuration", "=", "session", ".", "getCon...
通过命名空间方式获取sql
[ "通过命名空间方式获取sql" ]
6c9aa6352c22d3eb44f1edf93e89e8442d3f3efa
https://github.com/drtrang/spring-boot-autoconfigure/blob/6c9aa6352c22d3eb44f1edf93e89e8442d3f3efa/src/main/java/com/github/trang/autoconfigure/mybatis/SqlUtils.java#L109-L142
train
Gets the SQL for a namespace.
Of course, here is the Java code you requested: ```java public static String getNamespaceSql(SqlSession session, String namespace, Object params) { params = wrapCollection(params); Configuration configuration = session.getConfiguration(); MappedStatement mappedStatement = configuration.getMappe...
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/AttributePredicate.java
AttributePredicate.isMatchingAttribute
public boolean isMatchingAttribute(org.xml.sax.Attributes a) { String attValue = a.getValue("", attribute); return (attValue != null && attValue.equals(target)); }
java
public boolean isMatchingAttribute(org.xml.sax.Attributes a) { String attValue = a.getValue("", attribute); return (attValue != null && attValue.equals(target)); }
[ "public", "boolean", "isMatchingAttribute", "(", "org", ".", "xml", ".", "sax", ".", "Attributes", "a", ")", "{", "String", "attValue", "=", "a", ".", "getValue", "(", "\"\"", ",", "attribute", ")", ";", "return", "(", "attValue", "!=", "null", "&&", "...
Returns true if the given SAX AttributeList is suitable, given our attribute name and target; returns false otherwise.
[ "Returns", "true", "if", "the", "given", "SAX", "AttributeList", "is", "suitable", "given", "our", "attribute", "name", "and", "target", ";", "returns", "false", "otherwise", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/AttributePredicate.java#L94-L97
train
Checks if the given attribute is a matching attribute.
Of course, here is the Java code you requested: ```java public boolean isMatchingAttribute(org.xml.sax.Attributes a) { String attValue = a.getValue("", attribute); return (attValue != null && attValue.equals(target)); } ``` Hope this helps!
alkacon/opencms-core
src/org/opencms/rmi/CmsRemoteShellServer.java
CmsRemoteShellServer.initialize
public static CmsRemoteShellServer initialize(CmsSystemConfiguration systemConfiguration) { CmsRemoteShellServer result = null; if ((systemConfiguration.getShellServerOptions() != null) && systemConfiguration.getShellServerOptions().isEnabled()) { result = new CmsRemoteShellSe...
java
public static CmsRemoteShellServer initialize(CmsSystemConfiguration systemConfiguration) { CmsRemoteShellServer result = null; if ((systemConfiguration.getShellServerOptions() != null) && systemConfiguration.getShellServerOptions().isEnabled()) { result = new CmsRemoteShellSe...
[ "public", "static", "CmsRemoteShellServer", "initialize", "(", "CmsSystemConfiguration", "systemConfiguration", ")", "{", "CmsRemoteShellServer", "result", "=", "null", ";", "if", "(", "(", "systemConfiguration", ".", "getShellServerOptions", "(", ")", "!=", "null", "...
Initializes the remote shell server.<p> @param systemConfiguration the OpenCms system configuration read from opencms-system.xml @return the initialized remote shell server, or <code>null</code> if the server is disabled
[ "Initializes", "the", "remote", "shell", "server", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/rmi/CmsRemoteShellServer.java#L76-L98
train
Initialize the remote shell server.
Of course, here is the Java code you requested: ```java public static CmsRemoteShellServer initialize(CmsSystemConfiguration systemConfiguration) { CmsRemoteShellServer result = null; if ((systemConfiguration.getShellServerOptions() != null) && systemConfiguration.getShellServerOptions()....
ngageoint/simple-features-wkb-java
src/main/java/mil/nga/sf/wkb/GeometryReader.java
GeometryReader.readGeometryCollection
public static GeometryCollection<Geometry> readGeometryCollection( ByteReader reader, boolean hasZ, boolean hasM) { GeometryCollection<Geometry> geometryCollection = new GeometryCollection<Geometry>( hasZ, hasM); int numGeometries = reader.readInt(); for (int i = 0; i < numGeometries; i++) { Geometry...
java
public static GeometryCollection<Geometry> readGeometryCollection( ByteReader reader, boolean hasZ, boolean hasM) { GeometryCollection<Geometry> geometryCollection = new GeometryCollection<Geometry>( hasZ, hasM); int numGeometries = reader.readInt(); for (int i = 0; i < numGeometries; i++) { Geometry...
[ "public", "static", "GeometryCollection", "<", "Geometry", ">", "readGeometryCollection", "(", "ByteReader", "reader", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "GeometryCollection", "<", "Geometry", ">", "geometryCollection", "=", "new", "GeometryCo...
Read a Geometry Collection @param reader @param hasZ @param hasM @return geometry collection
[ "Read", "a", "Geometry", "Collection" ]
7197c4cd455a6ed6d5a9f66a600572c09efc432b
https://github.com/ngageoint/simple-features-wkb-java/blob/7197c4cd455a6ed6d5a9f66a600572c09efc432b/src/main/java/mil/nga/sf/wkb/GeometryReader.java#L341-L356
valid
Read a GeometryCollection from a byte reader.
Of course, here is the Java code you requested: ```java public static GeometryCollection<Geometry> readGeometryCollection( ByteReader reader, boolean hasZ, boolean hasM) { GeometryCollection<Geometry> geometryCollection = new GeometryCollection<Geometry>( hasZ, hasM); int numGeometries = reader.readInt();...
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.updateTextWithRamdomValueMatchRegexp
@Conditioned @Quand("Je mets à jour le texte '(.*)-(.*)' avec une valeur aléatoire qui vérifie '(.*)'[\\.|\\?]") @When("I update text '(.*)-(.*)' with ramdom match '(.*)'[\\.|\\?]") public void updateTextWithRamdomValueMatchRegexp(String page, String elementName, String randRegex, List<GherkinStepConditi...
java
@Conditioned @Quand("Je mets à jour le texte '(.*)-(.*)' avec une valeur aléatoire qui vérifie '(.*)'[\\.|\\?]") @When("I update text '(.*)-(.*)' with ramdom match '(.*)'[\\.|\\?]") public void updateTextWithRamdomValueMatchRegexp(String page, String elementName, String randRegex, List<GherkinStepConditi...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je mets à jour le texte '(.*)-(.*)' avec une valeur aléatoire qui vérifie '(.*)'[\\\\.|\\\\?]\")\r", "", "@", "When", "(", "\"I update text '(.*)-(.*)' with ramdom match '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "updateTextWithRamdomValueMat...
Update a html input text with a random text. @param page The concerned page of elementName @param elementName Is target element @param randRegex Is the new data (random value generated and match with randRegex) @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin....
[ "Update", "a", "html", "input", "text", "with", "a", "random", "text", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L606-L611
train
Update text with ramdom value match regular expression.
Of course, here is the Java code you requested: ```java @Conditioned @Quand("Je mets à jour le texte '(.*)-(.*)' avec une valeur aléatoire qui vérifie '(.*)'[\\.|\\?]") @When("I update text '(.*)-(.*)' with ramdom match '(.*)'[\\.|\\?]") public void updateTextWithRamdomValueMatchRegexp(String page, Stri...
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.findByU_T
@Override public List<CommerceAccount> findByU_T(long userId, int type, int start, int end) { return findByU_T(userId, type, start, end, null); }
java
@Override public List<CommerceAccount> findByU_T(long userId, int type, int start, int end) { return findByU_T(userId, type, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccount", ">", "findByU_T", "(", "long", "userId", ",", "int", "type", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByU_T", "(", "userId", ",", "type", ",", "start", ",", "end", ",", ...
Returns a range of all the commerce accounts where userId = &#63; and type = &#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 res...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "accounts", "where", "userId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L1018-L1022
train
Returns a range of commerce accounts where userId = &#63 ; and type = &#63 ;.
Of course, here is the Java code you requested: ```java @Override public List<CommerceAccount> findByU_T(long userId, int type, int start, int end) { return findByU_T(userId, type, start, end, null); } ``` Hope this helps!
gallandarakhneorg/afc
core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java
MeasureUnitUtil.fromMetersPerSecond
@Pure public static double fromMetersPerSecond(double value, SpeedUnit outputUnit) { switch (outputUnit) { case KILOMETERS_PER_HOUR: return value / 3.6; case MILLIMETERS_PER_SECOND: return value * 1000.; case METERS_PER_SECOND: default: } return value; }
java
@Pure public static double fromMetersPerSecond(double value, SpeedUnit outputUnit) { switch (outputUnit) { case KILOMETERS_PER_HOUR: return value / 3.6; case MILLIMETERS_PER_SECOND: return value * 1000.; case METERS_PER_SECOND: default: } return value; }
[ "@", "Pure", "public", "static", "double", "fromMetersPerSecond", "(", "double", "value", ",", "SpeedUnit", "outputUnit", ")", "{", "switch", "(", "outputUnit", ")", "{", "case", "KILOMETERS_PER_HOUR", ":", "return", "value", "/", "3.6", ";", "case", "MILLIMET...
Convert the given value expressed in meters per second to the given unit. @param value is the value to convert @param outputUnit is the unit of result. @return the result of the convertion.
[ "Convert", "the", "given", "value", "expressed", "in", "meters", "per", "second", "to", "the", "given", "unit", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java#L658-L669
train
Convert the given value from meters per second to the given unit.
Of course, here is the Java code you requested: ```java @Pure public static double fromMetersPerSecond(double value, SpeedUnit outputUnit) { switch (outputUnit) { case KILOMETERS_PER_HOUR: return value / 3.6; case MILLIMETERS_PER_SECOND: return value * 1000.; case METERS_PER_SECOND: default: } ret...
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDirectTypeQualifierAnnotation
public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualif...
java
public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualif...
[ "public", "static", "@", "CheckForNull", "@", "CheckReturnValue", "TypeQualifierAnnotation", "getDirectTypeQualifierAnnotation", "(", "XMethod", "xmethod", ",", "int", "parameter", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "XMethod", "bri...
Get the TypeQualifierAnnotation directly applied to given method parameter. @param xmethod a method @param parameter a parameter (0 == first parameter) @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return TypeQualifierAnnotation directly applied to the parameter, or null if there is no d...
[ "Get", "the", "TypeQualifierAnnotation", "directly", "applied", "to", "given", "method", "parameter", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L924-L937
train
Get a TypeQualifierAnnotation for a given type qualifier value.
Of course, here is the Java code you requested: ```java public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { ...
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.get3x3
public FloatBuffer get3x3(int index, FloatBuffer buffer) { MemUtil.INSTANCE.put3x3(this, index, buffer); return buffer; }
java
public FloatBuffer get3x3(int index, FloatBuffer buffer) { MemUtil.INSTANCE.put3x3(this, index, buffer); return buffer; }
[ "public", "FloatBuffer", "get3x3", "(", "int", "index", ",", "FloatBuffer", "buffer", ")", "{", "MemUtil", ".", "INSTANCE", ".", "put3x3", "(", "this", ",", "index", ",", "buffer", ")", ";", "return", "buffer", ";", "}" ]
Store this matrix as an equivalent 3x3 matrix in column-major order into the supplied {@link FloatBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given FloatBuffer. @param index the absolute position into the FloatBuffer @param buffer will receiv...
[ "Store", "this", "matrix", "as", "an", "equivalent", "3x3", "matrix", "in", "column", "-", "major", "order", "into", "the", "supplied", "{", "@link", "FloatBuffer", "}", "starting", "at", "the", "specified", "absolute", "buffer", "position", "/", "index", "....
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L912-L915
train
Get a 3x3 array from the buffer.
Of course, here is the Java code you requested: ```java public FloatBuffer get3x3(int index, FloatBuffer buffer) { MemUtil.INSTANCE.put3x3(this, index, buffer); return buffer; } ``` Hope this helps!
ironjacamar/ironjacamar
rarinfo/src/main/java/org/ironjacamar/rarinfo/RaImpl.java
RaImpl.buildResourceAdapterImpl
public void buildResourceAdapterImpl() throws Exception { raImpl = new ActivationImpl(null, rarName, transactionSupport, connectionDefinitions, adminObjects, raConfigProperties, null, null, null, null); }
java
public void buildResourceAdapterImpl() throws Exception { raImpl = new ActivationImpl(null, rarName, transactionSupport, connectionDefinitions, adminObjects, raConfigProperties, null, null, null, null); }
[ "public", "void", "buildResourceAdapterImpl", "(", ")", "throws", "Exception", "{", "raImpl", "=", "new", "ActivationImpl", "(", "null", ",", "rarName", ",", "transactionSupport", ",", "connectionDefinitions", ",", "adminObjects", ",", "raConfigProperties", ",", "nu...
buildResourceAdapterImpl @throws Exception exception
[ "buildResourceAdapterImpl" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/rarinfo/src/main/java/org/ironjacamar/rarinfo/RaImpl.java#L71-L75
train
Build the resource adapter implementation.
Of course, here is the Java code you requested: ```java public void buildResourceAdapterImpl() throws Exception { raImpl = new ActivationImpl(null, rarName, transactionSupport, connectionDefinitions, adminObjects, raConfigProperties, null, null, null, null); } ``` Hope t...
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/AbstractRedisClient.java
AbstractRedisClient.getConnection
protected <T> T getConnection(ConnectionFuture<T> connectionFuture) { try { return connectionFuture.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw RedisConnectionException.create(connectionFuture.getRemoteAddress(), e); } ...
java
protected <T> T getConnection(ConnectionFuture<T> connectionFuture) { try { return connectionFuture.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw RedisConnectionException.create(connectionFuture.getRemoteAddress(), e); } ...
[ "protected", "<", "T", ">", "T", "getConnection", "(", "ConnectionFuture", "<", "T", ">", "connectionFuture", ")", "{", "try", "{", "return", "connectionFuture", ".", "get", "(", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "Thread",...
Retrieve the connection from {@link ConnectionFuture}. Performs a blocking {@link ConnectionFuture#get()} to synchronize the channel/connection initialization. Any exception is rethrown as {@link RedisConnectionException}. @param connectionFuture must not be null. @param <T> Connection type. @return the connection. @t...
[ "Retrieve", "the", "connection", "from", "{", "@link", "ConnectionFuture", "}", ".", "Performs", "a", "blocking", "{", "@link", "ConnectionFuture#get", "()", "}", "to", "synchronize", "the", "channel", "/", "connection", "initialization", ".", "Any", "exception", ...
b6de74e384dea112e3656684ca3f50cdfd6c8e0d
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/AbstractRedisClient.java#L224-L239
train
Gets a connection from the connection future.
Of course, here is the Java code you requested: ```java protected <T> T getConnection(ConnectionFuture<T> connectionFuture) { try { return connectionFuture.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw RedisConnectionException.c...
sanskrit-coders/indic-transliteration
src/main/java/com/sktutilities/transliteration/Latin.java
Latin.transform
public String transform(String s1) { transformed = ""; unicode.put("Q", "ph"); // q in KEYBOARD, u in e-latin/kruti_Deva unicode.put("W", ""); // w unicode.put("E", "m"); //e unicode.put("R", "t");//r unicode.put("T", "j");//t unicode.put("Y", "l");//y unicode.put("U", "n");//u unicode.put("I", "p");//i ...
java
public String transform(String s1) { transformed = ""; unicode.put("Q", "ph"); // q in KEYBOARD, u in e-latin/kruti_Deva unicode.put("W", ""); // w unicode.put("E", "m"); //e unicode.put("R", "t");//r unicode.put("T", "j");//t unicode.put("Y", "l");//y unicode.put("U", "n");//u unicode.put("I", "p");//i ...
[ "public", "String", "transform", "(", "String", "s1", ")", "{", "transformed", "=", "\"\"", ";", "unicode", ".", "put", "(", "\"Q\"", ",", "\"ph\"", ")", ";", "// q in KEYBOARD, u in e-latin/kruti_Deva", "unicode", ".", "put", "(", "\"W\"", ",", "\"\"", ")",...
*******************BEGINNING OF FUNCTION********************//
[ "*******************", "BEGINNING", "OF", "FUNCTION", "********************", "//" ]
774a16a48d0a691a092510af76dfcb153e6d5fd6
https://github.com/sanskrit-coders/indic-transliteration/blob/774a16a48d0a691a092510af76dfcb153e6d5fd6/src/main/java/com/sktutilities/transliteration/Latin.java#L28-L124
train
Transform a String s1 into a String s2.
Of course, here is the Java code you requested: ```java public String transform(String s1) { transformed = ""; unicode.put("Q", "ph"); // q in KEYBOARD, u in e-latin/kruti_Deva unicode.put("W", ""); // w unicode.put("E", "m"); //e unicode.put("R", "t");//r unicode.put("T", "j");//t unicode.put("Y", "l");//...
wildfly/wildfly
legacy/jacorb/src/main/java/org/jboss/as/jacorb/JacORBSubsystemParser.java
JacORBSubsystemParser.writeORBConfig
private void writeORBConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeORB = this.isWritable(node, JacORBSubsystemDefinitions.ORB_ATTRIBUTES); boolean writeORBConnection = this.isWritable(node, JacORBSubsystemDefinitions.ORB_CONN_ATTRIBUTES); boolea...
java
private void writeORBConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeORB = this.isWritable(node, JacORBSubsystemDefinitions.ORB_ATTRIBUTES); boolean writeORBConnection = this.isWritable(node, JacORBSubsystemDefinitions.ORB_CONN_ATTRIBUTES); boolea...
[ "private", "void", "writeORBConfig", "(", "XMLExtendedStreamWriter", "writer", ",", "ModelNode", "node", ")", "throws", "XMLStreamException", "{", "boolean", "writeORB", "=", "this", ".", "isWritable", "(", "node", ",", "JacORBSubsystemDefinitions", ".", "ORB_ATTRIBUT...
<p> Writes the {@code orb} section of the JacORB subsystem configuration using the contents of the provided {@code ModelNode}. </p> @param writer the {@code XMLExtendedStreamWriter} used to write the configuration XML. @param node the {@code ModelNode} that might contain ORB configuration properties. @throws XMLStre...
[ "<p", ">", "Writes", "the", "{", "@code", "orb", "}", "section", "of", "the", "JacORB", "subsystem", "configuration", "using", "the", "contents", "of", "the", "provided", "{", "@code", "ModelNode", "}", ".", "<", "/", "p", ">" ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/legacy/jacorb/src/main/java/org/jboss/as/jacorb/JacORBSubsystemParser.java#L818-L845
test
Write the ORB configuration.
Of course, here is the Java code you requested: ```java private void writeORBConfig(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException { boolean writeORB = this.isWritable(node, JacORBSubsystemDefinitions.ORB_ATTRIBUTES); boolean writeORBConnection = this.isWritable(node, JacORB...
ocpsoft/rewrite
config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/dynaview/DynaviewEngine.java
DynaviewEngine.buildDynaViewId
public String buildDynaViewId(final String facesServletMapping) { StringBuffer result = new StringBuffer(); Map<Pattern, String> patterns = new LinkedHashMap<Pattern, String>(); Pattern pathMapping = Pattern.compile("^(/.*/)\\*$"); Pattern extensionMapping = Pattern.compile("^\\*(\\..*)$");...
java
public String buildDynaViewId(final String facesServletMapping) { StringBuffer result = new StringBuffer(); Map<Pattern, String> patterns = new LinkedHashMap<Pattern, String>(); Pattern pathMapping = Pattern.compile("^(/.*/)\\*$"); Pattern extensionMapping = Pattern.compile("^\\*(\\..*)$");...
[ "public", "String", "buildDynaViewId", "(", "final", "String", "facesServletMapping", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "Map", "<", "Pattern", ",", "String", ">", "patterns", "=", "new", "LinkedHashMap", "<", "Patte...
Given the string value of the Faces Servlet mapping, return a string that is guaranteed to match when a servlet forward is issued. It doesn't matter which FacesServlet we get to, as long as we get to one.
[ "Given", "the", "string", "value", "of", "the", "Faces", "Servlet", "mapping", "return", "a", "string", "that", "is", "guaranteed", "to", "match", "when", "a", "servlet", "forward", "is", "issued", ".", "It", "doesn", "t", "matter", "which", "FacesServlet", ...
eded0bad0101d119a3a1e67ed3f97a3bc9a8222e
https://github.com/ocpsoft/rewrite/blob/eded0bad0101d119a3a1e67ed3f97a3bc9a8222e/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/dynaview/DynaviewEngine.java#L47-L82
valid
Build a DynaView id from a faces servlet mapping.
Of course, here is the Java code you requested: ```java public String buildDynaViewId(final String facesServletMapping) { StringBuffer result = new StringBuffer(); Map<Pattern, String> patterns = new LinkedHashMap<Pattern, String>(); Pattern pathMapping = Pattern.compile("^(/.*/)\\*$"); Pa...
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/modules/CmsExportpointsEdit.java
CmsExportpointsEdit.getDestinations
private List getDestinations() { List result = new ArrayList(); result.add(new CmsSelectWidgetOption("WEB-INF/classes/")); result.add(new CmsSelectWidgetOption("WEB-INF/lib/")); return result; }
java
private List getDestinations() { List result = new ArrayList(); result.add(new CmsSelectWidgetOption("WEB-INF/classes/")); result.add(new CmsSelectWidgetOption("WEB-INF/lib/")); return result; }
[ "private", "List", "getDestinations", "(", ")", "{", "List", "result", "=", "new", "ArrayList", "(", ")", ";", "result", ".", "add", "(", "new", "CmsSelectWidgetOption", "(", "\"WEB-INF/classes/\"", ")", ")", ";", "result", ".", "add", "(", "new", "CmsSele...
Returns the list of default destinations for export points.<p> The result list elements are of type <code>{@link org.opencms.widgets.CmsSelectWidgetOption}</code>.<p> @return the list of default destinations for export points
[ "Returns", "the", "list", "of", "default", "destinations", "for", "export", "points", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/modules/CmsExportpointsEdit.java#L386-L392
train
Returns the destinations of the resource files.
Of course, here is the Java code you requested: ```java private List getDestinations() { List result = new ArrayList(); result.add(new CmsSelectWidgetOption("WEB-INF/classes/")); result.add(new CmsSelectWidgetOption("WEB-INF/lib/")); return result; } ``` Hope this helps!
puniverse/galaxy
src/main/java/co/paralleluniverse/galaxy/Server.java
Server.start
public static void start(URL configFile, URL propertiesFile) { Resource configResource = configFile != null ? new UrlResource(configFile) : null; Resource propertiesResource = propertiesFile != null ? new UrlResource(propertiesFile) : null; start(configResource, propertiesResource); }
java
public static void start(URL configFile, URL propertiesFile) { Resource configResource = configFile != null ? new UrlResource(configFile) : null; Resource propertiesResource = propertiesFile != null ? new UrlResource(propertiesFile) : null; start(configResource, propertiesResource); }
[ "public", "static", "void", "start", "(", "URL", "configFile", ",", "URL", "propertiesFile", ")", "{", "Resource", "configResource", "=", "configFile", "!=", "null", "?", "new", "UrlResource", "(", "configFile", ")", ":", "null", ";", "Resource", "propertiesRe...
Starts the galaxy server. @param configFile The path to the xml (spring) configuration file {@code null} null for default. @param propertiesFile The name of the properties file containing the grid's properties. You may, of course use Spring's {@code <context:property-placeholder location="classpath:com/foo/bar.properti...
[ "Starts", "the", "galaxy", "server", "." ]
1d077532c4a5bcd6c52ff670770c31e98420ff63
https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/galaxy/Server.java#L60-L64
train
Start a application from the given configuration and properties files.
Of course, here is the Java code you requested: ```java public static void start(URL configFile, URL propertiesFile) { Resource configResource = configFile != null ? new UrlResource(configFile) : null; Resource propertiesResource = propertiesFile != null ? new UrlResource(propertiesFile) : null; ...
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/CacheSimpleConfig.java
CacheSimpleConfig.setCacheWriter
public CacheSimpleConfig setCacheWriter(String cacheWriter) { if (cacheWriter != null && cacheWriterFactory != null) { throw new IllegalStateException("Cannot set cacheWriter to '" + cacheWriter + "', because cacheWriterFactory is already set to '" + cacheWriterFactory + "'."); ...
java
public CacheSimpleConfig setCacheWriter(String cacheWriter) { if (cacheWriter != null && cacheWriterFactory != null) { throw new IllegalStateException("Cannot set cacheWriter to '" + cacheWriter + "', because cacheWriterFactory is already set to '" + cacheWriterFactory + "'."); ...
[ "public", "CacheSimpleConfig", "setCacheWriter", "(", "String", "cacheWriter", ")", "{", "if", "(", "cacheWriter", "!=", "null", "&&", "cacheWriterFactory", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot set cacheWriter to '\"", "+", ...
Set classname of a class to be used as {@link javax.cache.integration.CacheWriter}. @param cacheWriter classname to be used as {@link javax.cache.integration.CacheWriter} @return the current cache config instance
[ "Set", "classname", "of", "a", "class", "to", "be", "used", "as", "{", "@link", "javax", ".", "cache", ".", "integration", ".", "CacheWriter", "}", "." ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/CacheSimpleConfig.java#L391-L398
train
Sets the cacheWriter to use.
Of course, here is the Java code you requested: ```java public CacheSimpleConfig setCacheWriter(String cacheWriter) { if (cacheWriter != null && cacheWriterFactory != null) { throw new IllegalStateException("Cannot set cacheWriter to '" + cacheWriter + "', because cacheWriterFac...
teknux-org/jetty-bootstrap
jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java
JettyBootstrap.addWarApp
public WebAppContext addWarApp(String war, String contextPath) throws JettyBootstrapException { WarAppJettyHandler warAppJettyHandler = new WarAppJettyHandler(getInitializedConfiguration()); warAppJettyHandler.setWar(war); warAppJettyHandler.setContextPath(contextPath); WebAppContext we...
java
public WebAppContext addWarApp(String war, String contextPath) throws JettyBootstrapException { WarAppJettyHandler warAppJettyHandler = new WarAppJettyHandler(getInitializedConfiguration()); warAppJettyHandler.setWar(war); warAppJettyHandler.setContextPath(contextPath); WebAppContext we...
[ "public", "WebAppContext", "addWarApp", "(", "String", "war", ",", "String", "contextPath", ")", "throws", "JettyBootstrapException", "{", "WarAppJettyHandler", "warAppJettyHandler", "=", "new", "WarAppJettyHandler", "(", "getInitializedConfiguration", "(", ")", ")", ";...
Add a War application specifying the context path. @param war the path to a war file @param contextPath the path (base URL) to make the war available @return WebAppContext @throws JettyBootstrapException on failure
[ "Add", "a", "War", "application", "specifying", "the", "context", "path", "." ]
c16e710b833084c650fce35aa8c1ccaf83cd93ef
https://github.com/teknux-org/jetty-bootstrap/blob/c16e710b833084c650fce35aa8c1ccaf83cd93ef/jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java#L248-L257
train
Add a WAR application to the application list.
Of course, here is the Java code you requested: ```java public WebAppContext addWarApp(String war, String contextPath) throws JettyBootstrapException { WarAppJettyHandler warAppJettyHandler = new WarAppJettyHandler(getInitializedConfiguration()); warAppJettyHandler.setWar(war); warAppJettyHandl...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/log/impl/LogPackageImpl.java
LogPackageImpl.getDownload
public EClass getDownload() { if (downloadEClass == null) { downloadEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI).getEClassifiers() .get(15); } return downloadEClass; }
java
public EClass getDownload() { if (downloadEClass == null) { downloadEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI).getEClassifiers() .get(15); } return downloadEClass; }
[ "public", "EClass", "getDownload", "(", ")", "{", "if", "(", "downloadEClass", "==", "null", ")", "{", "downloadEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "LogPackage", ".", "eNS_URI", ")", ".",...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/log/impl/LogPackageImpl.java#L687-L693
train
Get the downloadEClass.
Of course, here is the Java code you requested: ```java public EClass getDownload() { if (downloadEClass == null) { downloadEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI).getEClassifiers() .get(15); } return downloadEClass; } ``` Hope this helps!
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel2.java
BaseLevel2.sbmv
@Override public void sbmv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y) { if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL) OpProfiler.getInstance().processBlasCall(false, A, X, Y); // FIXME: int cast if (X...
java
@Override public void sbmv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y) { if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL) OpProfiler.getInstance().processBlasCall(false, A, X, Y); // FIXME: int cast if (X...
[ "@", "Override", "public", "void", "sbmv", "(", "char", "order", ",", "char", "Uplo", ",", "double", "alpha", ",", "INDArray", "A", ",", "INDArray", "X", ",", "double", "beta", ",", "INDArray", "Y", ")", "{", "if", "(", "Nd4j", ".", "getExecutioner", ...
sbmv computes a matrix-vector product using a symmetric band matrix: y := alpha*a*x + beta*y. Here a is an n-by-n symmetric band matrix with k superdiagonals, x and y are n-element vectors, alpha and beta are scalars. @param order @param Uplo @param alpha @param A @param X @param beta @param Y
[ "sbmv", "computes", "a", "matrix", "-", "vector", "product", "using", "a", "symmetric", "band", "matrix", ":", "y", ":", "=", "alpha", "*", "a", "*", "x", "+", "beta", "*", "y", ".", "Here", "a", "is", "an", "n", "-", "by", "-", "n", "symmetric",...
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel2.java#L362-L380
test
SBBV method for double vector vector
Of course, here is the Java code you requested: ```java @Override public void sbmv(char order, char Uplo, double alpha, INDArray A, INDArray X, double beta, INDArray Y) { if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL) OpProfiler.getInstance().processBlasCall(fa...
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsResultsTab.java
CmsResultsTab.addContentItems
protected void addContentItems(List<CmsResultItemBean> list, boolean front, boolean showPath) { if (front) { list = Lists.reverse(list); } for (CmsResultItemBean resultItem : list) { addSingleResult(resultItem, front, showPath); } if (isTilingViewAllowed(...
java
protected void addContentItems(List<CmsResultItemBean> list, boolean front, boolean showPath) { if (front) { list = Lists.reverse(list); } for (CmsResultItemBean resultItem : list) { addSingleResult(resultItem, front, showPath); } if (isTilingViewAllowed(...
[ "protected", "void", "addContentItems", "(", "List", "<", "CmsResultItemBean", ">", "list", ",", "boolean", "front", ",", "boolean", "showPath", ")", "{", "if", "(", "front", ")", "{", "list", "=", "Lists", ".", "reverse", "(", "list", ")", ";", "}", "...
Adds list items for a list of search results.<p> @param list the list of search results @param front if true, list items will be added to the front of the list, else at the back @param showPath <code>true</code> to show the resource path in sub title
[ "Adds", "list", "items", "for", "a", "list", "of", "search", "results", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsResultsTab.java#L517-L533
train
Add content items.
Of course, here is the Java code you requested: ```java protected void addContentItems(List<CmsResultItemBean> list, boolean front, boolean showPath) { if (front) { list = Lists.reverse(list); } for (CmsResultItemBean resultItem : list) { addSingleResult(resultItem, fro...
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAWebhook.java
CMAWebhook.addHeader
public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; }
java
public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; }
[ "public", "CMAWebhook", "addHeader", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "this", ".", "headers", "==", "null", ")", "{", "this", ".", "headers", "=", "new", "ArrayList", "<", "CMAWebhookHeader", ">", "(", ")", ";", "}", ...
Adds a custom http header to the call done by this webhook. @param key HTTP header key to be used (aka 'X-My-Header-Name') @param value HTTP header value to be used (aka 'this-is-my-name') @return this webhook for chaining.
[ "Adds", "a", "custom", "http", "header", "to", "the", "call", "done", "by", "this", "webhook", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAWebhook.java#L115-L122
train
Add a new header to the webhook.
Of course, here is the Java code you requested: ```java public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; } ``` Hope this helps!
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/DataSet.java
DataSet.merge
public static DataSet merge(List<DataSet> data) { if (data.isEmpty()) throw new IllegalArgumentException("Unable to merge empty dataset"); int nonEmpty = 0; boolean anyFeaturesPreset = false; boolean anyLabelsPreset = false; boolean first = true; for(DataSet ...
java
public static DataSet merge(List<DataSet> data) { if (data.isEmpty()) throw new IllegalArgumentException("Unable to merge empty dataset"); int nonEmpty = 0; boolean anyFeaturesPreset = false; boolean anyLabelsPreset = false; boolean first = true; for(DataSet ...
[ "public", "static", "DataSet", "merge", "(", "List", "<", "DataSet", ">", "data", ")", "{", "if", "(", "data", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"Unable to merge empty dataset\"", ")", ";", "int", "nonEmpty", "...
Merge the list of datasets in to one list. All the rows are merged in to one dataset @param data the data to merge @return a single dataset
[ "Merge", "the", "list", "of", "datasets", "in", "to", "one", "list", ".", "All", "the", "rows", "are", "merged", "in", "to", "one", "dataset" ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/DataSet.java#L145-L228
test
Merge a list of data sets into a single DataSet.
Of course, here is the Java code you requested: ```java public static DataSet merge(List<DataSet> data) { if (data.isEmpty()) throw new IllegalArgumentException("Unable to merge empty dataset"); int nonEmpty = 0; boolean anyFeaturesPreset = false; boolean anyLabelsPreset = ...
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/AffordanceModel.java
AffordanceModel.pointsToTargetOf
public boolean pointsToTargetOf(Link link) { Assert.notNull(link, "Link must not be null!"); return getURI().equals(link.expand().getHref()); }
java
public boolean pointsToTargetOf(Link link) { Assert.notNull(link, "Link must not be null!"); return getURI().equals(link.expand().getHref()); }
[ "public", "boolean", "pointsToTargetOf", "(", "Link", "link", ")", "{", "Assert", ".", "notNull", "(", "link", ",", "\"Link must not be null!\"", ")", ";", "return", "getURI", "(", ")", ".", "equals", "(", "link", ".", "expand", "(", ")", ".", "getHref", ...
Returns whether the {@link Affordance} points to the target of the given {@link Link}. @param link must not be {@literal null}. @return
[ "Returns", "whether", "the", "{", "@link", "Affordance", "}", "points", "to", "the", "target", "of", "the", "given", "{", "@link", "Link", "}", "." ]
70ebff9309f086cd8d6a97daf67e0dc215c87d9c
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/AffordanceModel.java#L97-L102
train
Checks if this link points to the target of the given link.
Of course, here is the Java code you requested: ```java public boolean pointsToTargetOf(Link link) { Assert.notNull(link, "Link must not be null!"); return getURI().equals(link.expand().getHref()); } ``` Hope this helps!
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java
MainProjectWizardPage.getOutputLocation
public IPath getOutputLocation() { IPath outputLocationPath = new Path(getProjectName()).makeAbsolute(); outputLocationPath = outputLocationPath.append( Path.fromPortableString(SARLConfig.FOLDER_BIN)); return outputLocationPath; }
java
public IPath getOutputLocation() { IPath outputLocationPath = new Path(getProjectName()).makeAbsolute(); outputLocationPath = outputLocationPath.append( Path.fromPortableString(SARLConfig.FOLDER_BIN)); return outputLocationPath; }
[ "public", "IPath", "getOutputLocation", "(", ")", "{", "IPath", "outputLocationPath", "=", "new", "Path", "(", "getProjectName", "(", ")", ")", ".", "makeAbsolute", "(", ")", ";", "outputLocationPath", "=", "outputLocationPath", ".", "append", "(", "Path", "."...
Returns the source class path entries to be added on new projects. The underlying resource may not exist. @return returns the default class path entries
[ "Returns", "the", "source", "class", "path", "entries", "to", "be", "added", "on", "new", "projects", ".", "The", "underlying", "resource", "may", "not", "exist", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/newproject/MainProjectWizardPage.java#L406-L413
train
Replies the output location.
Of course, here is the Java code you requested: ```java public IPath getOutputLocation() { IPath outputLocationPath = new Path(getProjectName()).makeAbsolute(); outputLocationPath = outputLocationPath.append( Path.fromPortableString(SARLConfig.FOLDER_BIN)); return outputLocationPath; } ``` Hope this help...
aoindustries/semanticcms-core-model
src/main/java/com/semanticcms/core/model/Page.java
Page.checkDates
private void checkDates() { DateTime created = this.dateCreated; DateTime published = this.datePublished; DateTime modified = this.dateModified; DateTime reviewed = this.dateReviewed; if( created != null && published != null && published.compareTo(created) < 0 ) throw new IllegalArgumentException("...
java
private void checkDates() { DateTime created = this.dateCreated; DateTime published = this.datePublished; DateTime modified = this.dateModified; DateTime reviewed = this.dateReviewed; if( created != null && published != null && published.compareTo(created) < 0 ) throw new IllegalArgumentException("...
[ "private", "void", "checkDates", "(", ")", "{", "DateTime", "created", "=", "this", ".", "dateCreated", ";", "DateTime", "published", "=", "this", ".", "datePublished", ";", "DateTime", "modified", "=", "this", ".", "dateModified", ";", "DateTime", "reviewed",...
Checks the dates for consistency.
[ "Checks", "the", "dates", "for", "consistency", "." ]
14bdbe3f3d69b2b337129c5b1afcaa9e87cb5624
https://github.com/aoindustries/semanticcms-core-model/blob/14bdbe3f3d69b2b337129c5b1afcaa9e87cb5624/src/main/java/com/semanticcms/core/model/Page.java#L233-L253
train
Checks if the dates are valid.
Of course, here is the Java code you requested: ```java private void checkDates() { DateTime created = this.dateCreated; DateTime published = this.datePublished; DateTime modified = this.dateModified; DateTime reviewed = this.dateReviewed; if( created != null && published != null && published.compar...
geomajas/geomajas-project-client-gwt
plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/AttributeCriterionUtil.java
AttributeCriterionUtil.getSearchCriterion
public static AttributeCriterion getSearchCriterion(String serverLayerId, AbstractReadOnlyAttributeInfo selectedAttribute, FormItem valueFormItem, String operationCode) { Object value = valueFormItem.getValue(); if (selectedAttribute != null && operationCode != null) { ...
java
public static AttributeCriterion getSearchCriterion(String serverLayerId, AbstractReadOnlyAttributeInfo selectedAttribute, FormItem valueFormItem, String operationCode) { Object value = valueFormItem.getValue(); if (selectedAttribute != null && operationCode != null) { ...
[ "public", "static", "AttributeCriterion", "getSearchCriterion", "(", "String", "serverLayerId", ",", "AbstractReadOnlyAttributeInfo", "selectedAttribute", ",", "FormItem", "valueFormItem", ",", "String", "operationCode", ")", "{", "Object", "value", "=", "valueFormItem", ...
Return a search criterion object, or null if not all fields have been properly filled. @param serverLayerId server id of the vector layer that will be searched in @param selectedAttribute the attributeInfo of the attribute that is subject of the criterion @param valueFormItem the form element that contains the value of...
[ "Return", "a", "search", "criterion", "object", "or", "null", "if", "not", "all", "fields", "have", "been", "properly", "filled", "." ]
1c1adc48deb192ed825265eebcc74d70bbf45670
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/AttributeCriterionUtil.java#L140-L207
train
Returns an AttributeCriterion object for the given server layer ID and operation code.
Of course, here is the Java code you requested: ```java public static AttributeCriterion getSearchCriterion(String serverLayerId, AbstractReadOnlyAttributeInfo selectedAttribute, FormItem valueFormItem, String operationCode) { Object value = valueFormItem.getValue(); if (...
apiman/apiman
common/util/src/main/java/io/apiman/common/util/ApimanPathUtils.java
ApimanPathUtils.parseApiRequestPath
public static final ApiRequestPathInfo parseApiRequestPath(String apiVersionHeader, String acceptHeader, String pathInfo) { ApiRequestPathInfo info = new ApiRequestPathInfo(); boolean versionFound = false; if (apiVersionHeader != null && apiVersionHeader.trim().length() > 0) { info...
java
public static final ApiRequestPathInfo parseApiRequestPath(String apiVersionHeader, String acceptHeader, String pathInfo) { ApiRequestPathInfo info = new ApiRequestPathInfo(); boolean versionFound = false; if (apiVersionHeader != null && apiVersionHeader.trim().length() > 0) { info...
[ "public", "static", "final", "ApiRequestPathInfo", "parseApiRequestPath", "(", "String", "apiVersionHeader", ",", "String", "acceptHeader", ",", "String", "pathInfo", ")", "{", "ApiRequestPathInfo", "info", "=", "new", "ApiRequestPathInfo", "(", ")", ";", "boolean", ...
Parses the HTTP request and returns an object containing all of the API information (Org, Id, Version). @param apiVersionHeader the API Version header @param acceptHeader the accept header @param pathInfo the path info @return the parsed object containing API information.
[ "Parses", "the", "HTTP", "request", "and", "returns", "an", "object", "containing", "all", "of", "the", "API", "information", "(", "Org", "Id", "Version", ")", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/util/src/main/java/io/apiman/common/util/ApimanPathUtils.java#L37-L79
train
Parses an API request path.
Of course, here is the Java code you requested: ```java public static final ApiRequestPathInfo parseApiRequestPath(String apiVersionHeader, String acceptHeader, String pathInfo) { ApiRequestPathInfo info = new ApiRequestPathInfo(); boolean versionFound = false; if (apiVersionHeader != null &&...
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/DefaultClusterManager.java
DefaultClusterManager.doMultiMapRemove
private void doMultiMapRemove(final Message<JsonObject> message) { final String name = message.body().getString("name"); if (name == null) { message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified.")); return; } final Object key = message.body().g...
java
private void doMultiMapRemove(final Message<JsonObject> message) { final String name = message.body().getString("name"); if (name == null) { message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified.")); return; } final Object key = message.body().g...
[ "private", "void", "doMultiMapRemove", "(", "final", "Message", "<", "JsonObject", ">", "message", ")", "{", "final", "String", "name", "=", "message", ".", "body", "(", ")", ".", "getString", "(", "\"name\"", ")", ";", "if", "(", "name", "==", "null", ...
Handles a cluster multi-map remove command.
[ "Handles", "a", "cluster", "multi", "-", "map", "remove", "command", "." ]
c5869dbc5fff89eb5262e83f7a81719b01a5ba6f
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/DefaultClusterManager.java#L1588-L1635
train
Remove a single map entry.
Of course, here is the Java code you requested: ```java private void doMultiMapRemove(final Message<JsonObject> message) { final String name = message.body().getString("name"); if (name == null) { message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified.")); ...
spring-projects/spring-security
oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveRemoteJWKSource.java
ReactiveRemoteJWKSource.getJWKSet
private Mono<JWKSet> getJWKSet() { return this.webClient.get() .uri(this.jwkSetURL) .retrieve() .bodyToMono(String.class) .map(this::parse) .doOnNext(jwkSet -> this.cachedJWKSet.set(Mono.just(jwkSet))) .cache(); }
java
private Mono<JWKSet> getJWKSet() { return this.webClient.get() .uri(this.jwkSetURL) .retrieve() .bodyToMono(String.class) .map(this::parse) .doOnNext(jwkSet -> this.cachedJWKSet.set(Mono.just(jwkSet))) .cache(); }
[ "private", "Mono", "<", "JWKSet", ">", "getJWKSet", "(", ")", "{", "return", "this", ".", "webClient", ".", "get", "(", ")", ".", "uri", "(", "this", ".", "jwkSetURL", ")", ".", "retrieve", "(", ")", ".", "bodyToMono", "(", "String", ".", "class", ...
Updates the cached JWK set from the configured URL. @return The updated JWK set. @throws RemoteKeySourceException If JWK retrieval failed.
[ "Updates", "the", "cached", "JWK", "set", "from", "the", "configured", "URL", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveRemoteJWKSource.java#L98-L106
test
Gets the RAWKSet.
Of course, here is the Java code you requested: ```java private Mono<JWKSet> getJWKSet() { return this.webClient.get() .uri(this.jwkSetURL) .retrieve() .bodyToMono(String.class) .map(this::parse) .doOnNext(jwkSet -> this.cachedJWKSet.set(Mono.just(jwkSet))) .cache(); } ``` Hope this helps!