Dataset Viewer
Auto-converted to Parquet Duplicate
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
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/KriptonXmlContext.java
KriptonXmlContext.createSerializer
public XmlWrapperSerializer createSerializer(File file, JsonEncoding encoding) { try { XMLSerializer xmlStreamWriter=new XMLSerializer(new FileWriter(file)); return new XmlWrapperSerializer(xmlStreamWriter); } catch (Exception e) { e.printStackTrace(); throw new KriptonRuntimeExcep...
java
public XmlWrapperSerializer createSerializer(File file, JsonEncoding encoding) { try { XMLSerializer xmlStreamWriter=new XMLSerializer(new FileWriter(file)); return new XmlWrapperSerializer(xmlStreamWriter); } catch (Exception e) { e.printStackTrace(); throw new KriptonRuntimeExcep...
[ "public", "XmlWrapperSerializer", "createSerializer", "(", "File", "file", ",", "JsonEncoding", "encoding", ")", "{", "try", "{", "XMLSerializer", "xmlStreamWriter", "=", "new", "XMLSerializer", "(", "new", "FileWriter", "(", "file", ")", ")", ";", "return", "ne...
/* (non-Javadoc) @see com.abubusoft.kripton.AbstractContext#createSerializer(java.io.File, com.fasterxml.jackson.core.JsonEncoding)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/KriptonXmlContext.java#L115-L124
train
Create a serializer for the given file.
Of course, here is the Java code you requested: ```java public XmlWrapperSerializer createSerializer(File file, JsonEncoding encoding) { try { XMLSerializer xmlStreamWriter=new XMLSerializer(new FileWriter(file)); return new XmlWrapperSerializer(xmlStreamWriter); } catch (Exception e) {...
rometools/rome
rome-propono/src/main/java/com/rometools/propono/blogclient/atomprotocol/AtomBlog.java
AtomBlog.newResource
@Override public BlogResource newResource(final String name, final String contentType, final byte[] bytes) throws BlogClientException { if (resourcesCollection == null) { throw new BlogClientException("No resource collection"); } return resourcesCollection.newResource(name, conte...
java
@Override public BlogResource newResource(final String name, final String contentType, final byte[] bytes) throws BlogClientException { if (resourcesCollection == null) { throw new BlogClientException("No resource collection"); } return resourcesCollection.newResource(name, conte...
[ "@", "Override", "public", "BlogResource", "newResource", "(", "final", "String", "name", ",", "final", "String", "contentType", ",", "final", "byte", "[", "]", "bytes", ")", "throws", "BlogClientException", "{", "if", "(", "resourcesCollection", "==", "null", ...
{@inheritDoc}
[ "{" ]
5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/blogclient/atomprotocol/AtomBlog.java#L183-L189
train
Create a new resource.
Of course, here is the Java code you requested: ```java @Override public BlogResource newResource(final String name, final String contentType, final byte[] bytes) throws BlogClientException { if (resourcesCollection == null) { throw new BlogClientException("No resource collection"); } ...
aws/aws-sdk-java
aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/AmazonCloudFormationClient.java
AmazonCloudFormationClient.listChangeSets
@Override public ListChangeSetsResult listChangeSets(ListChangeSetsRequest request) { request = beforeClientExecution(request); return executeListChangeSets(request); }
java
@Override public ListChangeSetsResult listChangeSets(ListChangeSetsRequest request) { request = beforeClientExecution(request); return executeListChangeSets(request); }
[ "@", "Override", "public", "ListChangeSetsResult", "listChangeSets", "(", "ListChangeSetsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListChangeSets", "(", "request", ")", ";", "}" ]
<p> Returns the ID and status of each active change set for a stack. For example, AWS CloudFormation lists change sets that are in the <code>CREATE_IN_PROGRESS</code> or <code>CREATE_PENDING</code> state. </p> @param listChangeSetsRequest The input for the <a>ListChangeSets</a> action. @return Result of the ListChange...
[ "<p", ">", "Returns", "the", "ID", "and", "status", "of", "each", "active", "change", "set", "for", "a", "stack", ".", "For", "example", "AWS", "CloudFormation", "lists", "change", "sets", "that", "are", "in", "the", "<code", ">", "CREATE_IN_PROGRESS<", "/...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/AmazonCloudFormationClient.java#L2110-L2114
train
Returns a list of ChangeSets that are contained in a CA.
Of course, here is the Java code you requested: ```java @Override public ListChangeSetsResult listChangeSets(ListChangeSetsRequest request) { request = beforeClientExecution(request); return executeListChangeSets(request); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/PmiDataInfo.java
PmiDataInfo.setType
public void setType(int type) { this.type = type; if (level == LEVEL_UNDEFINED) { switch (type) { case TYPE_INT: case TYPE_LONG: case TYPE_DOUBLE: level = LEVEL_LOW; break; case TYPE_STAT:...
java
public void setType(int type) { this.type = type; if (level == LEVEL_UNDEFINED) { switch (type) { case TYPE_INT: case TYPE_LONG: case TYPE_DOUBLE: level = LEVEL_LOW; break; case TYPE_STAT:...
[ "public", "void", "setType", "(", "int", "type", ")", "{", "this", ".", "type", "=", "type", ";", "if", "(", "level", "==", "LEVEL_UNDEFINED", ")", "{", "switch", "(", "type", ")", "{", "case", "TYPE_INT", ":", "case", "TYPE_LONG", ":", "case", "TYPE...
(WebSphere internal use only)
[ "(", "WebSphere", "internal", "use", "only", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/PmiDataInfo.java#L123-L146
train
Sets the type of the class.
Of course, here is the Java code you requested: ```java public void setType(int type) { this.type = type; if (level == LEVEL_UNDEFINED) { switch (type) { case TYPE_INT: case TYPE_LONG: case TYPE_DOUBLE: level = LEVEL_LOW; ...
kaazing/java.client
ws/ws/src/main/java/org/kaazing/net/sse/impl/legacy/EventSourceImpl.java
EventSourceImpl.getReadyState
public ReadyState getReadyState() { if (stream == null) { return EventSource.ReadyState.CONNECTING; } else { switch (stream.getReadyState()) { case CONNECTING: return EventSource.ReadyState.CONNECTING; case OPEN: ...
java
public ReadyState getReadyState() { if (stream == null) { return EventSource.ReadyState.CONNECTING; } else { switch (stream.getReadyState()) { case CONNECTING: return EventSource.ReadyState.CONNECTING; case OPEN: ...
[ "public", "ReadyState", "getReadyState", "(", ")", "{", "if", "(", "stream", "==", "null", ")", "{", "return", "EventSource", ".", "ReadyState", ".", "CONNECTING", ";", "}", "else", "{", "switch", "(", "stream", ".", "getReadyState", "(", ")", ")", "{", ...
The ready state indicates the stream status, Possible values are 0 (CONNECTING), 1 (OPEN) and 2 (CLOSED) @return current state
[ "The", "ready", "state", "indicates", "the", "stream", "status", "Possible", "values", "are", "0", "(", "CONNECTING", ")", "1", "(", "OPEN", ")", "and", "2", "(", "CLOSED", ")" ]
25ad2ae5bb24aa9d6b79400fce649b518dcfbe26
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/net/sse/impl/legacy/EventSourceImpl.java#L54-L72
train
Gets the ReadyState of the EventSource.
Of course, here is the Java code you requested: ```java public ReadyState getReadyState() { if (stream == null) { return EventSource.ReadyState.CONNECTING; } else { switch (stream.getReadyState()) { case CONNECTING: return EventSource.ReadySta...
alibaba/ARouter
arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java
RouteProcessor.extractDocInfo
private RouteDoc extractDocInfo(RouteMeta routeMeta) { RouteDoc routeDoc = new RouteDoc(); routeDoc.setGroup(routeMeta.getGroup()); routeDoc.setPath(routeMeta.getPath()); routeDoc.setDescription(routeMeta.getName()); routeDoc.setType(routeMeta.getType().name().toLowerCase()); ...
java
private RouteDoc extractDocInfo(RouteMeta routeMeta) { RouteDoc routeDoc = new RouteDoc(); routeDoc.setGroup(routeMeta.getGroup()); routeDoc.setPath(routeMeta.getPath()); routeDoc.setDescription(routeMeta.getName()); routeDoc.setType(routeMeta.getType().name().toLowerCase()); ...
[ "private", "RouteDoc", "extractDocInfo", "(", "RouteMeta", "routeMeta", ")", "{", "RouteDoc", "routeDoc", "=", "new", "RouteDoc", "(", ")", ";", "routeDoc", ".", "setGroup", "(", "routeMeta", ".", "getGroup", "(", ")", ")", ";", "routeDoc", ".", "setPath", ...
Extra doc info from route meta @param routeMeta meta @return doc
[ "Extra", "doc", "info", "from", "route", "meta" ]
1a06912a6e14a57112db1204b43f81c43d721732
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java#L384-L393
train
Extract doc info from RouteMeta
Of course, here is the Java code you requested: ```java private RouteDoc extractDocInfo(RouteMeta routeMeta) { RouteDoc routeDoc = new RouteDoc(); routeDoc.setGroup(routeMeta.getGroup()); routeDoc.setPath(routeMeta.getPath()); routeDoc.setDescription(routeMeta.getName()); routeD...
aws/aws-sdk-java
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/AmazonIdentityManagementClient.java
AmazonIdentityManagementClient.getAccountPasswordPolicy
@Override public GetAccountPasswordPolicyResult getAccountPasswordPolicy(GetAccountPasswordPolicyRequest request) { request = beforeClientExecution(request); return executeGetAccountPasswordPolicy(request); }
java
@Override public GetAccountPasswordPolicyResult getAccountPasswordPolicy(GetAccountPasswordPolicyRequest request) { request = beforeClientExecution(request); return executeGetAccountPasswordPolicy(request); }
[ "@", "Override", "public", "GetAccountPasswordPolicyResult", "getAccountPasswordPolicy", "(", "GetAccountPasswordPolicyRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetAccountPasswordPolicy", "(", "request"...
<p> Retrieves the password policy for the AWS account. For more information about using a password policy, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html">Managing an IAM Password Policy</a>. </p> @param getAccountPasswordPolicyRequest @return Result of the GetAccou...
[ "<p", ">", "Retrieves", "the", "password", "policy", "for", "the", "AWS", "account", ".", "For", "more", "information", "about", "using", "a", "password", "policy", "go", "to", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", "...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/AmazonIdentityManagementClient.java#L4249-L4253
train
Retrieves the password policy for an account.
Of course, here is the Java code you requested: ```java @Override public GetAccountPasswordPolicyResult getAccountPasswordPolicy(GetAccountPasswordPolicyRequest request) { request = beforeClientExecution(request); return executeGetAccountPasswordPolicy(request); } ``` Hope this helps!
incodehq-legacy/incode-module-document
dom/src/main/java/org/incode/module/document/dom/impl/types/DocumentTypeRepository.java
DocumentTypeRepository.create
@Programmatic public DocumentType create( final String reference, final String name) { final DocumentType documentType = new DocumentType(reference, name); repositoryService.persistAndFlush(documentType); return documentType; }
java
@Programmatic public DocumentType create( final String reference, final String name) { final DocumentType documentType = new DocumentType(reference, name); repositoryService.persistAndFlush(documentType); return documentType; }
[ "@", "Programmatic", "public", "DocumentType", "create", "(", "final", "String", "reference", ",", "final", "String", "name", ")", "{", "final", "DocumentType", "documentType", "=", "new", "DocumentType", "(", "reference", ",", "name", ")", ";", "repositoryServi...
region > create
[ "region", ">", "create" ]
c62f064e96d6e6007f7fd6a4bc06e03b78b1816c
https://github.com/incodehq-legacy/incode-module-document/blob/c62f064e96d6e6007f7fd6a4bc06e03b78b1816c/dom/src/main/java/org/incode/module/document/dom/impl/types/DocumentTypeRepository.java#L42-L49
train
Create a new document type.
Of course, here is the Java code you requested: ```java @Programmatic public DocumentType create( final String reference, final String name) { final DocumentType documentType = new DocumentType(reference, name); repositoryService.persistAndFlush(documentType); return...
line/armeria
thrift/src/main/java/com/linecorp/armeria/internal/thrift/TApplicationExceptions.java
TApplicationExceptions.read
public static TApplicationException read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); String message = null; int type = TApplicationException.UNKNOWN; while (true) { field = iprot.readFieldBegin(); if (field.type == TType.S...
java
public static TApplicationException read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); String message = null; int type = TApplicationException.UNKNOWN; while (true) { field = iprot.readFieldBegin(); if (field.type == TType.S...
[ "public", "static", "TApplicationException", "read", "(", "TProtocol", "iprot", ")", "throws", "TException", "{", "TField", "field", ";", "iprot", ".", "readStructBegin", "(", ")", ";", "String", "message", "=", "null", ";", "int", "type", "=", "TApplicationEx...
Reads a {@link TApplicationException} from the specified {@link TProtocol}. <p>Note: This has been copied from {@link TApplicationException#read(TProtocol)} due to API differences between libthrift 0.9.x and 0.10.x.
[ "Reads", "a", "{", "@link", "TApplicationException", "}", "from", "the", "specified", "{", "@link", "TProtocol", "}", "." ]
67d29e019fd35a35f89c45cc8f9119ff9b12b44d
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/thrift/src/main/java/com/linecorp/armeria/internal/thrift/TApplicationExceptions.java#L34-L70
train
read a TApplicationException object from the TProtocol.
Of course, here is the Java code you requested: ```java public static TApplicationException read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); String message = null; int type = TApplicationException.UNKNOWN; while (true) { field = ipro...
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipFileUtil.java
ZipFileUtil.isCharsetSupported
static boolean isCharsetSupported() throws IOException { try { ZipFile.class.getConstructor(new Class[] { File.class, Charset.class }); return true; } catch (NoSuchMethodException e) { return false; } }
java
static boolean isCharsetSupported() throws IOException { try { ZipFile.class.getConstructor(new Class[] { File.class, Charset.class }); return true; } catch (NoSuchMethodException e) { return false; } }
[ "static", "boolean", "isCharsetSupported", "(", ")", "throws", "IOException", "{", "try", "{", "ZipFile", ".", "class", ".", "getConstructor", "(", "new", "Class", "[", "]", "{", "File", ".", "class", ",", "Charset", ".", "class", "}", ")", ";", "return"...
Returns <code>true</code> if charsets are supported in this JRE.
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "charsets", "are", "supported", "in", "this", "JRE", "." ]
abb4dc43583e4d19339c0c021035019798970a13
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipFileUtil.java#L119-L127
train
Check if the charset is supported by the ZipFile.
Of course, here is the Java code you requested: ```java static boolean isCharsetSupported() throws IOException { try { ZipFile.class.getConstructor(new Class[] { File.class, Charset.class }); return true; } catch (NoSuchMethodException e) { return false; } } ``` Hope this helps!
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java
TypedInstanceToGraphMapper.mapPrimitiveOrEnumToVertex
private void mapPrimitiveOrEnumToVertex(ITypedInstance typedInstance, AtlasVertex instanceVertex, AttributeInfo attributeInfo) throws AtlasException { Object attrValue = typedInstance.get(attributeInfo.name); final String vertexPropertyName = GraphHelper.getQ...
java
private void mapPrimitiveOrEnumToVertex(ITypedInstance typedInstance, AtlasVertex instanceVertex, AttributeInfo attributeInfo) throws AtlasException { Object attrValue = typedInstance.get(attributeInfo.name); final String vertexPropertyName = GraphHelper.getQ...
[ "private", "void", "mapPrimitiveOrEnumToVertex", "(", "ITypedInstance", "typedInstance", ",", "AtlasVertex", "instanceVertex", ",", "AttributeInfo", "attributeInfo", ")", "throws", "AtlasException", "{", "Object", "attrValue", "=", "typedInstance", ".", "get", "(", "att...
****************************************** PRIMITIVES *************************************************
[ "******************************************", "PRIMITIVES", "*************************************************" ]
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java#L800-L842
train
Map primitiveOrEnum to vertex.
Of course, here is the Java code you requested: ```java private void mapPrimitiveOrEnumToVertex(ITypedInstance typedInstance, AtlasVertex instanceVertex, AttributeInfo attributeInfo) throws AtlasException { Object attrValue = typedInstance.get(attributeInfo.name); ...
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/loader/PersistenceXMLLoader.java
PersistenceXMLLoader.findPersistenceUnits
public static List<PersistenceUnitMetadata> findPersistenceUnits(final URL url, final String[] persistenceUnits, PersistenceUnitTransactionType defaultTransactionType) throws InvalidConfigurationException { Document doc; try { doc = getDocument(url); } ...
java
public static List<PersistenceUnitMetadata> findPersistenceUnits(final URL url, final String[] persistenceUnits, PersistenceUnitTransactionType defaultTransactionType) throws InvalidConfigurationException { Document doc; try { doc = getDocument(url); } ...
[ "public", "static", "List", "<", "PersistenceUnitMetadata", ">", "findPersistenceUnits", "(", "final", "URL", "url", ",", "final", "String", "[", "]", "persistenceUnits", ",", "PersistenceUnitTransactionType", "defaultTransactionType", ")", "throws", "InvalidConfiguration...
Find persistence units. @param url the url @param defaultTransactionType the default transaction type @return the list @throws Exception the exception
[ "Find", "persistence", "units", "." ]
268958ab1ec09d14ec4d9184f0c8ded7a9158908
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/loader/PersistenceXMLLoader.java#L264-L303
train
Returns a list of persistence unit metadata from the URL.
Of course, here is the Java code you requested: ```java public static List<PersistenceUnitMetadata> findPersistenceUnits(final URL url, final String[] persistenceUnits, PersistenceUnitTransactionType defaultTransactionType) throws InvalidConfigurationException { Document doc; try ...
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java
SimpleTimeZone.setEndRule
public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) { if (after) { setEndRule(endMonth, endDay, -endDayOfWeek, endTime); } else { setEndRule(endMonth, -endDay, -endDayOfWeek, endTime); } }
java
public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) { if (after) { setEndRule(endMonth, endDay, -endDayOfWeek, endTime); } else { setEndRule(endMonth, -endDay, -endDayOfWeek, endTime); } }
[ "public", "void", "setEndRule", "(", "int", "endMonth", ",", "int", "endDay", ",", "int", "endDayOfWeek", ",", "int", "endTime", ",", "boolean", "after", ")", "{", "if", "(", "after", ")", "{", "setEndRule", "(", "endMonth", ",", "endDay", ",", "-", "e...
Sets the daylight saving time end rule to a weekday before or after the given date within a month, e.g., the first Monday on or after the 8th. @param endMonth The daylight saving time ending month. Month is a {@link Calendar#MONTH MONTH} field value (0-based. e.g., 9 for October). @param endDay The day...
[ "Sets", "the", "daylight", "saving", "time", "end", "rule", "to", "a", "weekday", "before", "or", "after", "the", "given", "date", "within", "a", "month", "e", ".", "g", ".", "the", "first", "Monday", "on", "or", "after", "the", "8th", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L518-L525
train
Set the EndRule attribute of the CrazDa disposition.
Of course, here is the Java code you requested: ```java public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) { if (after) { setEndRule(endMonth, endDay, -endDayOfWeek, endTime); } else { setEndRule(endMonth, -endDay, -endDayOfWeek, e...
aws/aws-sdk-java
aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/model/DescribeHapgResult.java
DescribeHapgResult.setHsmsPendingDeletion
public void setHsmsPendingDeletion(java.util.Collection<String> hsmsPendingDeletion) { if (hsmsPendingDeletion == null) { this.hsmsPendingDeletion = null; return; } this.hsmsPendingDeletion = new com.amazonaws.internal.SdkInternalList<String>(hsmsPendingDeletion); }
java
public void setHsmsPendingDeletion(java.util.Collection<String> hsmsPendingDeletion) { if (hsmsPendingDeletion == null) { this.hsmsPendingDeletion = null; return; } this.hsmsPendingDeletion = new com.amazonaws.internal.SdkInternalList<String>(hsmsPendingDeletion); }
[ "public", "void", "setHsmsPendingDeletion", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "hsmsPendingDeletion", ")", "{", "if", "(", "hsmsPendingDeletion", "==", "null", ")", "{", "this", ".", "hsmsPendingDeletion", "=", "null", ";", "retur...
<p/> @param hsmsPendingDeletion
[ "<p", "/", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/model/DescribeHapgResult.java#L233-L240
train
Sets the value of the hsmsPendingDeletion property.
Of course, here is the Java code you requested: ```java public void setHsmsPendingDeletion(java.util.Collection<String> hsmsPendingDeletion) { if (hsmsPendingDeletion == null) { this.hsmsPendingDeletion = null; return; } this.hsmsPendingDeletion = new com.amazonaws.inte...
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java
ClassifiedTBoxImpl.classify
static ClassifiedTBox classify(OntologyImpl.UnclassifiedOntologyTBox onto) { DefaultDirectedGraph<ObjectPropertyExpression, DefaultEdge> objectPropertyGraph = getObjectPropertyGraph(onto); EquivalencesDAGImpl<ObjectPropertyExpression> objectPropertyDAG = EquivalencesDAGImpl.getEquivalencesDAG(objectPropert...
java
static ClassifiedTBox classify(OntologyImpl.UnclassifiedOntologyTBox onto) { DefaultDirectedGraph<ObjectPropertyExpression, DefaultEdge> objectPropertyGraph = getObjectPropertyGraph(onto); EquivalencesDAGImpl<ObjectPropertyExpression> objectPropertyDAG = EquivalencesDAGImpl.getEquivalencesDAG(objectPropert...
[ "static", "ClassifiedTBox", "classify", "(", "OntologyImpl", ".", "UnclassifiedOntologyTBox", "onto", ")", "{", "DefaultDirectedGraph", "<", "ObjectPropertyExpression", ",", "DefaultEdge", ">", "objectPropertyGraph", "=", "getObjectPropertyGraph", "(", "onto", ")", ";", ...
constructs a TBox reasoner from an ontology @param onto: ontology
[ "constructs", "a", "TBox", "reasoner", "from", "an", "ontology" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java#L75-L118
train
Classify an ontology.
Of course, here is the Java code you requested: ```java static ClassifiedTBox classify(OntologyImpl.UnclassifiedOntologyTBox onto) { DefaultDirectedGraph<ObjectPropertyExpression, DefaultEdge> objectPropertyGraph = getObjectPropertyGraph(onto); EquivalencesDAGImpl<ObjectPropertyExpression> objectPropertyDAG =...
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractTermExtractor.java
AbstractTermExtractor.collect
public List<String> collect(@NonNull HString hString) { return stream(hString).collect(Collectors.toList()); }
java
public List<String> collect(@NonNull HString hString) { return stream(hString).collect(Collectors.toList()); }
[ "public", "List", "<", "String", ">", "collect", "(", "@", "NonNull", "HString", "hString", ")", "{", "return", "stream", "(", "hString", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ")", ")", ";", "}" ]
Executes the TermSpec returning a list of stringified terms. This method does not use the TermSpec's {@link com.davidbracewell.hermes.ml.feature.ValueCalculator} @param hString the HString to process @return a list of term counts
[ "Executes", "the", "TermSpec", "returning", "a", "list", "of", "stringified", "terms", ".", "This", "method", "does", "not", "use", "the", "TermSpec", "s", "{", "@link", "com", ".", "davidbracewell", ".", "hermes", ".", "ml", ".", "feature", ".", "ValueCal...
9ebefe7ad5dea1b731ae6931a30771eb75325ea3
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractTermExtractor.java#L85-L87
train
Collect a list of HString
Of course, here is the Java code you requested: ```java public List<String> collect(@NonNull HString hString) { return stream(hString).collect(Collectors.toList()); } ``` Hope this helps!
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/Tensor.java
Tensor.elemAdd
@Override public void elemAdd(MVec addend) { if (addend instanceof Tensor) { elemAdd((Tensor)addend); } else { throw new IllegalArgumentException("Addend must be of type " + this.getClass()); } }
java
@Override public void elemAdd(MVec addend) { if (addend instanceof Tensor) { elemAdd((Tensor)addend); } else { throw new IllegalArgumentException("Addend must be of type " + this.getClass()); } }
[ "@", "Override", "public", "void", "elemAdd", "(", "MVec", "addend", ")", "{", "if", "(", "addend", "instanceof", "Tensor", ")", "{", "elemAdd", "(", "(", "Tensor", ")", "addend", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(...
Implements {@link MVec#elemAdd(MVec)}.
[ "Implements", "{" ]
786294cbac7cc65dbc32210c10acc32ed0c69233
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/Tensor.java#L314-L321
train
Add a vector to the Sequence.
Of course, here is the Java code you requested: ```java @Override public void elemAdd(MVec addend) { if (addend instanceof Tensor) { elemAdd((Tensor)addend); } else { throw new IllegalArgumentException("Addend must be of type " + this.getClass()); } } ``` Hope t...
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.processAnonymousField
public void processAnonymousField(Properties attributes) throws XDocletException { if (!attributes.containsKey(ATTRIBUTE_NAME)) { throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class, XDocletModulesOjbMessages.PARAMET...
java
public void processAnonymousField(Properties attributes) throws XDocletException { if (!attributes.containsKey(ATTRIBUTE_NAME)) { throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class, XDocletModulesOjbMessages.PARAMET...
[ "public", "void", "processAnonymousField", "(", "Properties", "attributes", ")", "throws", "XDocletException", "{", "if", "(", "!", "attributes", ".", "containsKey", "(", "ATTRIBUTE_NAME", ")", ")", "{", "throw", "new", "XDocletException", "(", "Translator", ".", ...
Processes an anonymous field definition specified at the class level. @param attributes The attributes of the tag @exception XDocletException if an error occurs @doc.tag type="content" @doc.param name="attributes" optional="true" description="Attributes of the field as...
[ "Processes", "an", "anonymous", "field", "definition", "specified", "at", "the", "class", "level", "." ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L677-L705
train
Processes an anonymous field.
Of course, here is the Java code you requested: ```java public void processAnonymousField(Properties attributes) throws XDocletException { if (!attributes.containsKey(ATTRIBUTE_NAME)) { throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class, ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/linkedlist2/LinkedList.java
LinkedList.getLast
public Entry getLast() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getLast"); SibTr.exit(tc, "getLast", last); } return last; }
java
public Entry getLast() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getLast"); SibTr.exit(tc, "getLast", last); } return last; }
[ "public", "Entry", "getLast", "(", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "(", "tc", ",", "\"getLast\"", ")", ";", "SibTr", ".", "exit", "(", "tc", ",", "\"getLast\"", ",", "last", ")", ";", "...
Synchronized. Get the last entry in the list. @return the last entry in the list.
[ "Synchronized", ".", "Get", "the", "last", "entry", "in", "the", "list", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/linkedlist2/LinkedList.java#L322-L331
train
Get the last entry in the list of the list.
Of course, here is the Java code you requested: ```java public Entry getLast() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getLast"); SibTr.exit(tc, "getLast", last); } return last; } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPPort.java
TCPPort.destroyServerSocket
protected synchronized void destroyServerSocket() { if (null == this.serverSocket) { // already closed return; } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "ServerSocket being closed for port " + this.listenPort); }...
java
protected synchronized void destroyServerSocket() { if (null == this.serverSocket) { // already closed return; } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "ServerSocket being closed for port " + this.listenPort); }...
[ "protected", "synchronized", "void", "destroyServerSocket", "(", ")", "{", "if", "(", "null", "==", "this", ".", "serverSocket", ")", "{", "// already closed", "return", ";", "}", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ...
Destroys the server socket associated with this end point.
[ "Destroys", "the", "server", "socket", "associated", "with", "this", "end", "point", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/TCPPort.java#L306-L316
train
Destroy the serverSocket.
Of course, here is the Java code you requested: ```java protected synchronized void destroyServerSocket() { if (null == this.serverSocket) { // already closed return; } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "ServerSoc...
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/UtilColor.java
UtilColor.multiplyRgb
public static int multiplyRgb(int rgb, double fr, double fg, double fb) { if (rgb == 0) { return rgb; } final int a = rgb >> Constant.BYTE_4 & 0xFF; final int r = (int) UtilMath.clamp((rgb >> Constant.BYTE_3 & 0xFF) * fr, 0, 255); final int g = (...
java
public static int multiplyRgb(int rgb, double fr, double fg, double fb) { if (rgb == 0) { return rgb; } final int a = rgb >> Constant.BYTE_4 & 0xFF; final int r = (int) UtilMath.clamp((rgb >> Constant.BYTE_3 & 0xFF) * fr, 0, 255); final int g = (...
[ "public", "static", "int", "multiplyRgb", "(", "int", "rgb", ",", "double", "fr", ",", "double", "fg", ",", "double", "fb", ")", "{", "if", "(", "rgb", "==", "0", ")", "{", "return", "rgb", ";", "}", "final", "int", "a", "=", "rgb", ">>", "Consta...
Apply an rgb factor. @param rgb The original rgb. @param fr The red factor. @param fg The green factor. @param fb The blue factor. @return The multiplied rgb.
[ "Apply", "an", "rgb", "factor", "." ]
cac3d5578532cf11724a737b9f09e71bf9995ab2
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/UtilColor.java#L42-L59
train
Multiply the RGB value of a single SHORT attribute.
Of course, here is the Java code you requested: ```java public static int multiplyRgb(int rgb, double fr, double fg, double fb) { if (rgb == 0) { return rgb; } final int a = rgb >> Constant.BYTE_4 & 0xFF; final int r = (int) UtilMath.clamp((rgb >> Consta...
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.rewriteMethodSignature
public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { SignatureParser parser = new SignatureParser(methodSignature); StringBuilder buf = new StringBuilder(); ...
java
public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { SignatureParser parser = new SignatureParser(methodSignature); StringBuilder buf = new StringBuilder(); ...
[ "public", "static", "String", "rewriteMethodSignature", "(", "ClassNameRewriter", "classNameRewriter", ",", "String", "methodSignature", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", ")", "{", "SignatureParser", ...
Rewrite a method signature. @param classNameRewriter a ClassNameRewriter @param methodSignature a method signature @return the rewritten method signature
[ "Rewrite", "a", "method", "signature", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L44-L62
train
Rewrite method signature.
Of course, here is the Java code you requested: ```java public static String rewriteMethodSignature(ClassNameRewriter classNameRewriter, String methodSignature) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { SignatureParser parser = new SignatureParser(methodSignature); ...
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/EntityFinder.java
EntityFinder.getProteinSequence
private static ProteinSequence getProteinSequence(String str) { try { ProteinSequence s = new ProteinSequence(str); return s; } catch (CompoundNotFoundException e) { logger.error("Unexpected error when creating ProteinSequence",e); } return null; }
java
private static ProteinSequence getProteinSequence(String str) { try { ProteinSequence s = new ProteinSequence(str); return s; } catch (CompoundNotFoundException e) { logger.error("Unexpected error when creating ProteinSequence",e); } return null; }
[ "private", "static", "ProteinSequence", "getProteinSequence", "(", "String", "str", ")", "{", "try", "{", "ProteinSequence", "s", "=", "new", "ProteinSequence", "(", "str", ")", ";", "return", "s", ";", "}", "catch", "(", "CompoundNotFoundException", "e", ")",...
Returns the ProteinSequence or null if one can't be created @param str @return
[ "Returns", "the", "ProteinSequence", "or", "null", "if", "one", "can", "t", "be", "created" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/EntityFinder.java#L498-L507
train
Get a ProteinSequence from a String
Of course, here is the Java code you requested: ```java private static ProteinSequence getProteinSequence(String str) { try { ProteinSequence s = new ProteinSequence(str); return s; } catch (CompoundNotFoundException e) { logger.error("Unexpected error when creating ProteinSequence",e); } return null...
google/guava
android/guava/src/com/google/common/net/InetAddresses.java
InetAddresses.isMappedIPv4Address
public static boolean isMappedIPv4Address(String ipString) { byte[] bytes = ipStringToBytes(ipString); if (bytes != null && bytes.length == 16) { for (int i = 0; i < 10; i++) { if (bytes[i] != 0) { return false; } } for (int i = 10; i < 12; i++) { if (bytes[i]...
java
public static boolean isMappedIPv4Address(String ipString) { byte[] bytes = ipStringToBytes(ipString); if (bytes != null && bytes.length == 16) { for (int i = 0; i < 10; i++) { if (bytes[i] != 0) { return false; } } for (int i = 10; i < 12; i++) { if (bytes[i]...
[ "public", "static", "boolean", "isMappedIPv4Address", "(", "String", "ipString", ")", "{", "byte", "[", "]", "bytes", "=", "ipStringToBytes", "(", "ipString", ")", ";", "if", "(", "bytes", "!=", "null", "&&", "bytes", ".", "length", "==", "16", ")", "{",...
Evaluates whether the argument is an "IPv4 mapped" IPv6 address. <p>An "IPv4 mapped" address is anything in the range ::ffff:0:0/96 (sometimes written as ::ffff:0.0.0.0/96), with the last 32 bits interpreted as an IPv4 address. <p>For more on IPv4 mapped addresses see section 2.5.5.2 of <a target="_parent" href="http...
[ "Evaluates", "whether", "the", "argument", "is", "an", "IPv4", "mapped", "IPv6", "address", "." ]
7155d12b70a2406fa84d94d4b8b3bc108e89abfd
https://github.com/google/guava/blob/7155d12b70a2406fa84d94d4b8b3bc108e89abfd/android/guava/src/com/google/common/net/InetAddresses.java#L795-L811
valid
Checks if the given string is a mapped IPv4 address.
Of course, here is the Java code you requested: ```java public static boolean isMappedIPv4Address(String ipString) { byte[] bytes = ipStringToBytes(ipString); if (bytes != null && bytes.length == 16) { for (int i = 0; i < 10; i++) { if (bytes[i] != 0) { return false; } } ...
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/GOMention.java
GOMention.getCategories
public String getCategories(int i) { if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null) jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((GOMention_Type)jcasType).casF...
java
public String getCategories(int i) { if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null) jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((GOMention_Type)jcasType).casF...
[ "public", "String", "getCategories", "(", "int", "i", ")", "{", "if", "(", "GOMention_Type", ".", "featOkTst", "&&", "(", "(", "GOMention_Type", ")", "jcasType", ")", ".", "casFeat_categories", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissi...
indexed getter for categories - gets an indexed value - created for the shared task, here we add the group @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "categories", "-", "gets", "an", "indexed", "value", "-", "created", "for", "the", "shared", "task", "here", "we", "add", "the", "group" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/GOMention.java#L105-L109
train
indexed getter for categories - gets an indexed value -
Of course, here is the Java code you requested: ```java public String getCategories(int i) { if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null) jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention"); jcasType.jcas.checkArrayBounds(jcasType.ll...
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java
CommerceSubscriptionEntryPersistenceImpl.fetchByPrimaryKey
@Override public CommerceSubscriptionEntry fetchByPrimaryKey(Serializable primaryKey) { Serializable serializable = entityCache.getResult(CommerceSubscriptionEntryModelImpl.ENTITY_CACHE_ENABLED, CommerceSubscriptionEntryImpl.class, primaryKey); if (serializable == nullModel) { return null; } CommerceS...
java
@Override public CommerceSubscriptionEntry fetchByPrimaryKey(Serializable primaryKey) { Serializable serializable = entityCache.getResult(CommerceSubscriptionEntryModelImpl.ENTITY_CACHE_ENABLED, CommerceSubscriptionEntryImpl.class, primaryKey); if (serializable == nullModel) { return null; } CommerceS...
[ "@", "Override", "public", "CommerceSubscriptionEntry", "fetchByPrimaryKey", "(", "Serializable", "primaryKey", ")", "{", "Serializable", "serializable", "=", "entityCache", ".", "getResult", "(", "CommerceSubscriptionEntryModelImpl", ".", "ENTITY_CACHE_ENABLED", ",", "Comm...
Returns the commerce subscription entry with the primary key or returns <code>null</code> if it could not be found. @param primaryKey the primary key of the commerce subscription entry @return the commerce subscription entry, or <code>null</code> if a commerce subscription entry with the primary key could not be found
[ "Returns", "the", "commerce", "subscription", "entry", "with", "the", "primary", "key", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceSubscriptionEntryPersistenceImpl.java#L3970-L4011
train
Returns the commerce subscription entry with the primary key.
Of course, here is the Java code you requested: ```java @Override public CommerceSubscriptionEntry fetchByPrimaryKey(Serializable primaryKey) { Serializable serializable = entityCache.getResult(CommerceSubscriptionEntryModelImpl.ENTITY_CACHE_ENABLED, CommerceSubscriptionEntryImpl.class, primaryKey); if (seri...
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.closureCollector
public Collector<Type, ClosureHolder, List<Type>> closureCollector(boolean minClosure, BiPredicate<Type, Type> shouldSkip) { return Collector.of(() -> new ClosureHolder(minClosure, shouldSkip), ClosureHolder::add, ClosureHolder::merge, ClosureHolder::closure); ...
java
public Collector<Type, ClosureHolder, List<Type>> closureCollector(boolean minClosure, BiPredicate<Type, Type> shouldSkip) { return Collector.of(() -> new ClosureHolder(minClosure, shouldSkip), ClosureHolder::add, ClosureHolder::merge, ClosureHolder::closure); ...
[ "public", "Collector", "<", "Type", ",", "ClosureHolder", ",", "List", "<", "Type", ">", ">", "closureCollector", "(", "boolean", "minClosure", ",", "BiPredicate", "<", "Type", ",", "Type", ">", "shouldSkip", ")", "{", "return", "Collector", ".", "of", "("...
Collect types into a new closure (using a @code{ClosureHolder})
[ "Collect", "types", "into", "a", "new", "closure", "(", "using", "a" ]
a53d069bbdb2c60232ed3811c19b65e41c3e60e0
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L3436-L3441
train
Collect a list of types to a closure.
Of course, here is the Java code you requested: ```java public Collector<Type, ClosureHolder, List<Type>> closureCollector(boolean minClosure, BiPredicate<Type, Type> shouldSkip) { return Collector.of(() -> new ClosureHolder(minClosure, shouldSkip), ClosureHolder::add, ClosureHo...
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.copyTypeParametersFromJvmOperation
public static void copyTypeParametersFromJvmOperation(List<JvmTypeParameter> inputParameters, List<JvmTypeParameter> outputParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder, TypeReferences typeReferences, TypesFacto...
java
public static void copyTypeParametersFromJvmOperation(List<JvmTypeParameter> inputParameters, List<JvmTypeParameter> outputParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder, TypeReferences typeReferences, TypesFacto...
[ "public", "static", "void", "copyTypeParametersFromJvmOperation", "(", "List", "<", "JvmTypeParameter", ">", "inputParameters", ",", "List", "<", "JvmTypeParameter", ">", "outputParameters", ",", "Map", "<", "String", ",", "JvmTypeReference", ">", "superTypeParameterMap...
Copy the type parameters from a JvmOperation. <p>This function differs from {@link XtendJvmModelInferrer#copyAndFixTypeParameters(List, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator)} and {@link XtendJvmModelInferrer#copyTypeParameters(List, org.eclipse.xtext.common.types.JvmTypeParameterDeclarator)} in th...
[ "Copy", "the", "type", "parameters", "from", "a", "JvmOperation", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1655-L1687
train
Copy the type parameters from the jvm operation.
Of course, here is the Java code you requested: ```java public static void copyTypeParametersFromJvmOperation(List<JvmTypeParameter> inputParameters, List<JvmTypeParameter> outputParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder ...
jboss/jboss-saaj-api_spec
src/main/java/javax/xml/soap/FactoryFinder.java
FactoryFinder.find
static Object find(String factoryId) throws SOAPException { ClassLoader classLoader; try { classLoader = getContextClassLoader(); } catch (Exception x) { throw new SOAPException(x.toString(), x); } // Use the system property first try ...
java
static Object find(String factoryId) throws SOAPException { ClassLoader classLoader; try { classLoader = getContextClassLoader(); } catch (Exception x) { throw new SOAPException(x.toString(), x); } // Use the system property first try ...
[ "static", "Object", "find", "(", "String", "factoryId", ")", "throws", "SOAPException", "{", "ClassLoader", "classLoader", ";", "try", "{", "classLoader", "=", "getContextClassLoader", "(", ")", ";", "}", "catch", "(", "Exception", "x", ")", "{", "throw", "n...
Finds the implementation <code>Class</code> object for the given factory name, or null if that fails. <P> This method is package private so that this code can be shared. @return the <code>Class</code> object of the specified message factory; or <code>null</code> @param factoryId the name of the factory to...
[ "Finds", "the", "implementation", "<code", ">", "Class<", "/", "code", ">", "object", "for", "the", "given", "factory", "name", "or", "null", "if", "that", "fails", ".", "<P", ">", "This", "method", "is", "package", "private", "so", "that", "this", "code...
2dda4e662e4f99b289f3a8d944a68cf537c78dd4
https://github.com/jboss/jboss-saaj-api_spec/blob/2dda4e662e4f99b289f3a8d944a68cf537c78dd4/src/main/java/javax/xml/soap/FactoryFinder.java#L83-L202
train
Find a single instance of the class with the specified factory id.
Of course, here is the Java code you requested: ```java static Object find(String factoryId) throws SOAPException { ClassLoader classLoader; try { classLoader = getContextClassLoader(); } catch (Exception x) { throw new SOAPException(x.toString(), x); ...
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/RolesInner.java
RolesInner.createOrUpdate
public RoleInner createOrUpdate(String deviceName, String name, String resourceGroupName, RoleInner role) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).toBlocking().last().body(); }
java
public RoleInner createOrUpdate(String deviceName, String name, String resourceGroupName, RoleInner role) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).toBlocking().last().body(); }
[ "public", "RoleInner", "createOrUpdate", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "RoleInner", "role", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "resourceGroup...
Create or update a role. @param deviceName The device name. @param name The role name. @param resourceGroupName The resource group name. @param role The role properties. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws ...
[ "Create", "or", "update", "a", "role", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/RolesInner.java#L322-L324
train
Creates or updates a role.
Of course, here is the Java code you requested: ```java public RoleInner createOrUpdate(String deviceName, String name, String resourceGroupName, RoleInner role) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).toBlocking().last().body(); } ``` Hope this helps!
tobato/FastDFS_Client
src/main/java/com/github/tobato/fastdfs/domain/proto/tracker/internal/TrackerListStoragesResponse.java
TrackerListStoragesResponse.decodeContent
@Override public List<StorageState> decodeContent(InputStream in, Charset charset) throws IOException { // 解析报文内容 byte[] bytes = new byte[(int) getContentLength()]; int contentSize = in.read(bytes); if (contentSize != getContentLength()) { throw new IOException("读取到的数据长度与...
java
@Override public List<StorageState> decodeContent(InputStream in, Charset charset) throws IOException { // 解析报文内容 byte[] bytes = new byte[(int) getContentLength()]; int contentSize = in.read(bytes); if (contentSize != getContentLength()) { throw new IOException("读取到的数据长度与...
[ "@", "Override", "public", "List", "<", "StorageState", ">", "decodeContent", "(", "InputStream", "in", ",", "Charset", "charset", ")", "throws", "IOException", "{", "// 解析报文内容", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "(", "int", ")", "getCont...
解析反馈内容
[ "解析反馈内容" ]
8e3bfe712f1739028beed7f3a6b2cc4579a231e4
https://github.com/tobato/FastDFS_Client/blob/8e3bfe712f1739028beed7f3a6b2cc4579a231e4/src/main/java/com/github/tobato/fastdfs/domain/proto/tracker/internal/TrackerListStoragesResponse.java#L24-L34
train
Decode content.
Of course, here is the Java code you requested: ```java @Override public List<StorageState> decodeContent(InputStream in, Charset charset) throws IOException { // 解析报文内容 byte[] bytes = new byte[(int) getContentLength()]; int contentSize = in.read(bytes); if (contentSize != getConten...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
XmlUtil.createDocumentBuilder
public static DocumentBuilder createDocumentBuilder() { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); disableXXE(dbf); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (Exception e) { throw new UtilException(e, "Create xml document error...
java
public static DocumentBuilder createDocumentBuilder() { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); disableXXE(dbf); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (Exception e) { throw new UtilException(e, "Create xml document error...
[ "public", "static", "DocumentBuilder", "createDocumentBuilder", "(", ")", "{", "final", "DocumentBuilderFactory", "dbf", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "disableXXE", "(", "dbf", ")", ";", "DocumentBuilder", "builder", "=", "null", ...
创建 DocumentBuilder @return DocumentBuilder @since 4.1.2
[ "创建", "DocumentBuilder" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java#L386-L396
train
Create a DocumentBuilder object.
Of course, here is the Java code you requested: ```java public static DocumentBuilder createDocumentBuilder() { final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); disableXXE(dbf); DocumentBuilder builder = null; try { builder = dbf.newDocumentBuilder(); } catch (Exception e) { ...
nextreports/nextreports-engine
src/ro/nextreports/engine/exporter/XlsxExporter.java
XlsxExporter.updateSubreportBandElementStyle
private XSSFCellStyle updateSubreportBandElementStyle(XSSFCellStyle cellStyle, BandElement bandElement, Object value, int gridRow, int gridColumn, int colSpan) { if (subreportCellStyle == null) { return cellStyle; } if (gridColumn == 0) { cellStyle.setBorderLeft(sub...
java
private XSSFCellStyle updateSubreportBandElementStyle(XSSFCellStyle cellStyle, BandElement bandElement, Object value, int gridRow, int gridColumn, int colSpan) { if (subreportCellStyle == null) { return cellStyle; } if (gridColumn == 0) { cellStyle.setBorderLeft(sub...
[ "private", "XSSFCellStyle", "updateSubreportBandElementStyle", "(", "XSSFCellStyle", "cellStyle", ",", "BandElement", "bandElement", ",", "Object", "value", ",", "int", "gridRow", ",", "int", "gridColumn", ",", "int", "colSpan", ")", "{", "if", "(", "subreportCellSt...
If a border style is set on a ReportBandElement we must apply it to all subreport cells
[ "If", "a", "border", "style", "is", "set", "on", "a", "ReportBandElement", "we", "must", "apply", "it", "to", "all", "subreport", "cells" ]
a847575a9298b5fce63b88961190c5b83ddccc44
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/exporter/XlsxExporter.java#L470-L492
train
Update the subreport band element style
Of course, here is the Java code you requested: ```java private XSSFCellStyle updateSubreportBandElementStyle(XSSFCellStyle cellStyle, BandElement bandElement, Object value, int gridRow, int gridColumn, int colSpan) { if (subreportCellStyle == null) { return cellStyle; } if (g...
datoin/http-requests
src/main/java/org/datoin/net/http/Request.java
Request.acceptEncoding
public Request acceptEncoding(String encoding){ final String acceptEncoding = RequestHeaderFields.ACCEPT_ENCODING.getName(); String encodingValue = headers.get(acceptEncoding); if (encodingValue == null){ encodingValue = encoding; } else { encodingValue = encoding...
java
public Request acceptEncoding(String encoding){ final String acceptEncoding = RequestHeaderFields.ACCEPT_ENCODING.getName(); String encodingValue = headers.get(acceptEncoding); if (encodingValue == null){ encodingValue = encoding; } else { encodingValue = encoding...
[ "public", "Request", "acceptEncoding", "(", "String", "encoding", ")", "{", "final", "String", "acceptEncoding", "=", "RequestHeaderFields", ".", "ACCEPT_ENCODING", ".", "getName", "(", ")", ";", "String", "encodingValue", "=", "headers", ".", "get", "(", "accep...
sets the accept encoding header for the request, if exists then appends @param encoding : header field value to add @return : Request Object with accept encoding header value set
[ "sets", "the", "accept", "encoding", "header", "for", "the", "request", "if", "exists", "then", "appends" ]
660a4bc516c594f321019df94451fead4dea19b6
https://github.com/datoin/http-requests/blob/660a4bc516c594f321019df94451fead4dea19b6/src/main/java/org/datoin/net/http/Request.java#L209-L218
train
Sets the request header to accept the given encoding.
Of course, here is the Java code you requested: ```java public Request acceptEncoding(String encoding){ final String acceptEncoding = RequestHeaderFields.ACCEPT_ENCODING.getName(); String encodingValue = headers.get(acceptEncoding); if (encodingValue == null){ encodingValue = encodi...
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/transform/APNSSandboxChannelResponseMarshaller.java
APNSSandboxChannelResponseMarshaller.marshall
public void marshall(APNSSandboxChannelResponse aPNSSandboxChannelResponse, ProtocolMarshaller protocolMarshaller) { if (aPNSSandboxChannelResponse == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(a...
java
public void marshall(APNSSandboxChannelResponse aPNSSandboxChannelResponse, ProtocolMarshaller protocolMarshaller) { if (aPNSSandboxChannelResponse == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(a...
[ "public", "void", "marshall", "(", "APNSSandboxChannelResponse", "aPNSSandboxChannelResponse", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "aPNSSandboxChannelResponse", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/transform/APNSSandboxChannelResponseMarshaller.java#L64-L86
train
marshalls the given APNSSandboxChannelResponse to the JSON file.
Of course, here is the Java code you requested: ```java public void marshall(APNSSandboxChannelResponse aPNSSandboxChannelResponse, ProtocolMarshaller protocolMarshaller) { if (aPNSSandboxChannelResponse == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); }...
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/LiveReloadServer.java
LiveReloadServer.createConnection
protected Connection createConnection(Socket socket, InputStream inputStream, OutputStream outputStream) throws IOException { return new Connection(socket, inputStream, outputStream); }
java
protected Connection createConnection(Socket socket, InputStream inputStream, OutputStream outputStream) throws IOException { return new Connection(socket, inputStream, outputStream); }
[ "protected", "Connection", "createConnection", "(", "Socket", "socket", ",", "InputStream", "inputStream", ",", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "return", "new", "Connection", "(", "socket", ",", "inputStream", ",", "outputStream", ...
Factory method used to create the {@link Connection}. @param socket the source socket @param inputStream the socket input stream @param outputStream the socket output stream @return a connection @throws IOException in case of I/O errors
[ "Factory", "method", "used", "to", "create", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/LiveReloadServer.java#L236-L239
train
Creates a new connection to the server.
Of course, here is the Java code you requested: ```java protected Connection createConnection(Socket socket, InputStream inputStream, OutputStream outputStream) throws IOException { return new Connection(socket, inputStream, outputStream); } ``` Hope this helps!
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java
FormField.getFirstValueAsDate
public Date getFirstValueAsDate() throws ParseException { String valueString = getFirstValue(); if (valueString == null) { return null; } return XmppDateTime.parseXEP0082Date(valueString); }
java
public Date getFirstValueAsDate() throws ParseException { String valueString = getFirstValue(); if (valueString == null) { return null; } return XmppDateTime.parseXEP0082Date(valueString); }
[ "public", "Date", "getFirstValueAsDate", "(", ")", "throws", "ParseException", "{", "String", "valueString", "=", "getFirstValue", "(", ")", ";", "if", "(", "valueString", "==", "null", ")", "{", "return", "null", ";", "}", "return", "XmppDateTime", ".", "pa...
Parses the first value of this form field as XEP-0082 date/time format and returns a date instance or {@code null}. @return a Date instance representing the date/time information of the first value of this field. @throws ParseException if parsing fails. @since 4.3.0
[ "Parses", "the", "first", "value", "of", "this", "form", "field", "as", "XEP", "-", "0082", "date", "/", "time", "format", "and", "returns", "a", "date", "instance", "or", "{", "@code", "null", "}", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormField.java#L283-L289
train
Gets the first value as a Date.
Of course, here is the Java code you requested: ```java public Date getFirstValueAsDate() throws ParseException { String valueString = getFirstValue(); if (valueString == null) { return null; } return XmppDateTime.parseXEP0082Date(valueString); } ``` Hope this helps!
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.getPermissions
public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException { // reading permissions is allowed even if the resource is marked as deleted CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL); CmsUser user = readUser(userName); ret...
java
public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException { // reading permissions is allowed even if the resource is marked as deleted CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL); CmsUser user = readUser(userName); ret...
[ "public", "CmsPermissionSet", "getPermissions", "(", "String", "resourceName", ",", "String", "userName", ")", "throws", "CmsException", "{", "// reading permissions is allowed even if the resource is marked as deleted", "CmsResource", "resource", "=", "readResource", "(", "res...
Returns the set of permissions of a given user for a given resource.<p> @param resourceName the name of the resource @param userName the name of the user @return the current permissions on this resource @throws CmsException if something goes wrong
[ "Returns", "the", "set", "of", "permissions", "of", "a", "given", "user", "for", "a", "given", "resource", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1677-L1683
train
Returns the permissions for the given resource and user.
Of course, here is the Java code you requested: ```java public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException { // reading permissions is allowed even if the resource is marked as deleted CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL...
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarWeek.java
ProjectCalendarWeek.addCalendarHours
public ProjectCalendarHours addCalendarHours(Day day) { ProjectCalendarHours bch = new ProjectCalendarHours(this); bch.setDay(day); m_hours[day.getValue() - 1] = bch; return (bch); }
java
public ProjectCalendarHours addCalendarHours(Day day) { ProjectCalendarHours bch = new ProjectCalendarHours(this); bch.setDay(day); m_hours[day.getValue() - 1] = bch; return (bch); }
[ "public", "ProjectCalendarHours", "addCalendarHours", "(", "Day", "day", ")", "{", "ProjectCalendarHours", "bch", "=", "new", "ProjectCalendarHours", "(", "this", ")", ";", "bch", ".", "setDay", "(", "day", ")", ";", "m_hours", "[", "day", ".", "getValue", "...
Used to add working hours to the calendar. Note that the MPX file definition allows a maximum of 7 calendar hours records to be added to a single calendar. @param day day number @return new ProjectCalendarHours instance
[ "Used", "to", "add", "working", "hours", "to", "the", "calendar", ".", "Note", "that", "the", "MPX", "file", "definition", "allows", "a", "maximum", "of", "7", "calendar", "hours", "records", "to", "be", "added", "to", "a", "single", "calendar", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L222-L228
train
Add calendar hours to this calendar.
Of course, here is the Java code you requested: ```java public ProjectCalendarHours addCalendarHours(Day day) { ProjectCalendarHours bch = new ProjectCalendarHours(this); bch.setDay(day); m_hours[day.getValue() - 1] = bch; return (bch); } ``` Hope this helps!
spring-projects/spring-analytics
src/main/java/org/springframework/analytics/rest/controller/AggregateCounterController.java
AggregateCounterController.providedOrDefaultFromValue
private DateTime providedOrDefaultFromValue(DateTime from, DateTime to, AggregateCounterResolution resolution) { if (from != null) { return from; } switch (resolution) { case minute: return to.minusMinutes(59); case hour: return to.minusHours(23); case day: return to.minusDays(6); case mont...
java
private DateTime providedOrDefaultFromValue(DateTime from, DateTime to, AggregateCounterResolution resolution) { if (from != null) { return from; } switch (resolution) { case minute: return to.minusMinutes(59); case hour: return to.minusHours(23); case day: return to.minusDays(6); case mont...
[ "private", "DateTime", "providedOrDefaultFromValue", "(", "DateTime", "from", ",", "DateTime", "to", ",", "AggregateCounterResolution", "resolution", ")", "{", "if", "(", "from", "!=", "null", ")", "{", "return", "from", ";", "}", "switch", "(", "resolution", ...
Return a default value for the interval start if none has been provided.
[ "Return", "a", "default", "value", "for", "the", "interval", "start", "if", "none", "has", "been", "provided", "." ]
e3ef19d2b794d6dc10265c171bba46cd757b1abd
https://github.com/spring-projects/spring-analytics/blob/e3ef19d2b794d6dc10265c171bba46cd757b1abd/src/main/java/org/springframework/analytics/rest/controller/AggregateCounterController.java#L177-L197
train
Given two dates return the value of the provided value.
Of course, here is the Java code you requested: ```java private DateTime providedOrDefaultFromValue(DateTime from, DateTime to, AggregateCounterResolution resolution) { if (from != null) { return from; } switch (resolution) { case minute: return to.minusMinutes(59); case hour: return to.minusHour...
cdk/cdk
display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java
HighlightGenerator.generate
@Override public IRenderingElement generate(IAtomContainer container, RendererModel model) { final Map<IChemObject, Integer> highlight = container.getProperty(ID_MAP); if (highlight == null) return null; final Palette palette = model.getParameter(HighlightPalette.class).getValue(); ...
java
@Override public IRenderingElement generate(IAtomContainer container, RendererModel model) { final Map<IChemObject, Integer> highlight = container.getProperty(ID_MAP); if (highlight == null) return null; final Palette palette = model.getParameter(HighlightPalette.class).getValue(); ...
[ "@", "Override", "public", "IRenderingElement", "generate", "(", "IAtomContainer", "container", ",", "RendererModel", "model", ")", "{", "final", "Map", "<", "IChemObject", ",", "Integer", ">", "highlight", "=", "container", ".", "getProperty", "(", "ID_MAP", ")...
{@inheritDoc}
[ "{" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java#L122-L181
train
Generate the CRS for the given atom container.
Of course, here is the Java code you requested: ```java @Override public IRenderingElement generate(IAtomContainer container, RendererModel model) { final Map<IChemObject, Integer> highlight = container.getProperty(ID_MAP); if (highlight == null) return null; final Palette palette = mode...
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java
CPDefinitionLocalizationPersistenceImpl.fetchByCPDefinitionId_Last
@Override public CPDefinitionLocalization fetchByCPDefinitionId_Last( long CPDefinitionId, OrderByComparator<CPDefinitionLocalization> orderByComparator) { int count = countByCPDefinitionId(CPDefinitionId); if (count == 0) { return null; } List<CPDefinitionLocalization> list = findByCPDefinitionId(CPD...
java
@Override public CPDefinitionLocalization fetchByCPDefinitionId_Last( long CPDefinitionId, OrderByComparator<CPDefinitionLocalization> orderByComparator) { int count = countByCPDefinitionId(CPDefinitionId); if (count == 0) { return null; } List<CPDefinitionLocalization> list = findByCPDefinitionId(CPD...
[ "@", "Override", "public", "CPDefinitionLocalization", "fetchByCPDefinitionId_Last", "(", "long", "CPDefinitionId", ",", "OrderByComparator", "<", "CPDefinitionLocalization", ">", "orderByComparator", ")", "{", "int", "count", "=", "countByCPDefinitionId", "(", "CPDefinitio...
Returns the last cp definition localization in the ordered set where CPDefinitionId = &#63;. @param CPDefinitionId the cp definition ID @param orderByComparator the comparator to order the set by (optionally <code>null</code>) @return the last matching cp definition localization, or <code>null</code> if a matching cp ...
[ "Returns", "the", "last", "cp", "definition", "localization", "in", "the", "ordered", "set", "where", "CPDefinitionId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java#L380-L398
train
Returns the last cp definition localization in the ordered set.
Of course, here is the Java code you requested: ```java @Override public CPDefinitionLocalization fetchByCPDefinitionId_Last( long CPDefinitionId, OrderByComparator<CPDefinitionLocalization> orderByComparator) { int count = countByCPDefinitionId(CPDefinitionId); if (count == 0) { return null; } List<...
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java
SparkDl4jMultiLayer.evaluateRegression
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data, int minibatchSize) { long nOut = ((FeedForwardLayer) network.getOutputLayer().conf().getLayer()).getNOut(); return (T)doEvaluation(data, new org.deeplearning4j.eval.RegressionEvaluation(nOut), minibatchSize); }
java
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data, int minibatchSize) { long nOut = ((FeedForwardLayer) network.getOutputLayer().conf().getLayer()).getNOut(); return (T)doEvaluation(data, new org.deeplearning4j.eval.RegressionEvaluation(nOut), minibatchSize); }
[ "public", "<", "T", "extends", "RegressionEvaluation", ">", "T", "evaluateRegression", "(", "JavaRDD", "<", "DataSet", ">", "data", ",", "int", "minibatchSize", ")", "{", "long", "nOut", "=", "(", "(", "FeedForwardLayer", ")", "network", ".", "getOutputLayer",...
Evaluate the network (regression performance) in a distributed manner on the provided data @param data Data to evaluate @param minibatchSize Minibatch size to use when doing performing evaluation @return {@link RegressionEvaluation} instance with regression performance
[ "Evaluate", "the", "network", "(", "regression", "performance", ")", "in", "a", "distributed", "manner", "on", "the", "provided", "data" ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java#L581-L584
train
Evaluates a regression model.
Of course, here is the Java code you requested: ```java public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data, int minibatchSize) { long nOut = ((FeedForwardLayer) network.getOutputLayer().conf().getLayer()).getNOut(); return (T)doEvaluation(data, new org.deeplearning4j.eva...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java
AfplibPackageImpl.getObjectClassificationStrucFlgs
public EEnum getObjectClassificationStrucFlgs() { if (objectClassificationStrucFlgsEEnum == null) { objectClassificationStrucFlgsEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(101); } return objectClassificationStrucFlgsEEnum; }
java
public EEnum getObjectClassificationStrucFlgs() { if (objectClassificationStrucFlgsEEnum == null) { objectClassificationStrucFlgsEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(101); } return objectClassificationStrucFlgsEEnum; }
[ "public", "EEnum", "getObjectClassificationStrucFlgs", "(", ")", "{", "if", "(", "objectClassificationStrucFlgsEEnum", "==", "null", ")", "{", "objectClassificationStrucFlgsEEnum", "=", "(", "EEnum", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java#L17158-L17163
train
Get the object classification StrucFlgs attribute.
Of course, here is the Java code you requested: ```java public EEnum getObjectClassificationStrucFlgs() { if (objectClassificationStrucFlgsEEnum == null) { objectClassificationStrucFlgsEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(101); } return objectClass...
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java
JingleSession.startNegotiators
private void startNegotiators() { for (ContentNegotiator contentNegotiator : contentNegotiators) { TransportNegotiator transNeg = contentNegotiator.getTransportNegotiator(); transNeg.start(); } }
java
private void startNegotiators() { for (ContentNegotiator contentNegotiator : contentNegotiators) { TransportNegotiator transNeg = contentNegotiator.getTransportNegotiator(); transNeg.start(); } }
[ "private", "void", "startNegotiators", "(", ")", "{", "for", "(", "ContentNegotiator", "contentNegotiator", ":", "contentNegotiators", ")", "{", "TransportNegotiator", "transNeg", "=", "contentNegotiator", ".", "getTransportNegotiator", "(", ")", ";", "transNeg", ".",...
When we initiate a session we need to start a bunch of negotiators right after we receive the result stanza for our session-initiate. This is where we start them.
[ "When", "we", "initiate", "a", "session", "we", "need", "to", "start", "a", "bunch", "of", "negotiators", "right", "after", "we", "receive", "the", "result", "stanza", "for", "our", "session", "-", "initiate", ".", "This", "is", "where", "we", "start", "...
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java#L1159-L1165
train
Start all the negotiators.
Of course, here is the Java code you requested: ```java private void startNegotiators() { for (ContentNegotiator contentNegotiator : contentNegotiators) { TransportNegotiator transNeg = contentNegotiator.getTransportNegotiator(); transNeg.start(); } } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/AWSOpsWorksClient.java
AWSOpsWorksClient.deleteInstance
@Override public DeleteInstanceResult deleteInstance(DeleteInstanceRequest request) { request = beforeClientExecution(request); return executeDeleteInstance(request); }
java
@Override public DeleteInstanceResult deleteInstance(DeleteInstanceRequest request) { request = beforeClientExecution(request); return executeDeleteInstance(request); }
[ "@", "Override", "public", "DeleteInstanceResult", "deleteInstance", "(", "DeleteInstanceRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeleteInstance", "(", "request", ")", ";", "}" ]
<p> Deletes a specified instance, which terminates the associated Amazon EC2 instance. You must stop an instance before you can delete it. </p> <p> For more information, see <a href="http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-delete.html">Deleting Instances</a>. </p> <p> <b>Required Permissio...
[ "<p", ">", "Deletes", "a", "specified", "instance", "which", "terminates", "the", "associated", "Amazon", "EC2", "instance", ".", "You", "must", "stop", "an", "instance", "before", "you", "can", "delete", "it", ".", "<", "/", "p", ">", "<p", ">", "For", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/AWSOpsWorksClient.java#L1261-L1265
train
Deletes an instance.
Of course, here is the Java code you requested: ```java @Override public DeleteInstanceResult deleteInstance(DeleteInstanceRequest request) { request = beforeClientExecution(request); return executeDeleteInstance(request); } ``` Hope this helps!
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Error.java
Error.printSystemOut
public static void printSystemOut(String message1, long message2) { if (TRACESYSTEMOUT) { System.out.print(message1); System.out.println(message2); } }
java
public static void printSystemOut(String message1, long message2) { if (TRACESYSTEMOUT) { System.out.print(message1); System.out.println(message2); } }
[ "public", "static", "void", "printSystemOut", "(", "String", "message1", ",", "long", "message2", ")", "{", "if", "(", "TRACESYSTEMOUT", ")", "{", "System", ".", "out", ".", "print", "(", "message1", ")", ";", "System", ".", "out", ".", "println", "(", ...
Used to print messages to System.out @param message1 message to print @param message2 message to print
[ "Used", "to", "print", "messages", "to", "System", ".", "out" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Error.java#L264-L270
train
Print the system out.
Of course, here is the Java code you requested: ```java public static void printSystemOut(String message1, long message2) { if (TRACESYSTEMOUT) { System.out.print(message1); System.out.println(message2); } } ``` Hope this helps!
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
20