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
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java
Ifc2x3tc1PackageImpl.getIfcStructuralAnalysisModel
public EClass getIfcStructuralAnalysisModel() { if (ifcStructuralAnalysisModelEClass == null) { ifcStructuralAnalysisModelEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(536); } return ifcStructuralAnalysisModelEClass; }
java
public EClass getIfcStructuralAnalysisModel() { if (ifcStructuralAnalysisModelEClass == null) { ifcStructuralAnalysisModelEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(536); } return ifcStructuralAnalysisModelEClass; }
[ "public", "EClass", "getIfcStructuralAnalysisModel", "(", ")", "{", "if", "(", "ifcStructuralAnalysisModelEClass", "==", "null", ")", "{", "ifcStructuralAnalysisModelEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", ...
<!-- 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#L26983-L26989
train
Get the IfcStructuralAnalysisModelEClass attribute of the interface.
Of course, here is the Java code you requested: ```java public EClass getIfcStructuralAnalysisModel() { if (ifcStructuralAnalysisModelEClass == null) { ifcStructuralAnalysisModelEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(536); } return i...
rackerlabs/clouddocs-maven-plugin
src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java
PDFBuilder.main
public static void main(String[] args) { try { System.out.println("setting up fonts and images directories\n"); System.out.println("FOP ExampleFO2PDF\n"); System.out.println("Preparing..."); //Setup directories File sourceDir = new File("/Users/salmanqureshi/Projects/Rackspace/Dev/compute-api-final/o...
java
public static void main(String[] args) { try { System.out.println("setting up fonts and images directories\n"); System.out.println("FOP ExampleFO2PDF\n"); System.out.println("Preparing..."); //Setup directories File sourceDir = new File("/Users/salmanqureshi/Projects/Rackspace/Dev/compute-api-final/o...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "try", "{", "System", ".", "out", ".", "println", "(", "\"setting up fonts and images directories\\n\"", ")", ";", "System", ".", "out", ".", "println", "(", "\"FOP ExampleFO2PDF\\n...
Main method. @param args command-line arguments
[ "Main", "method", "." ]
ba8554dc340db674307efdaac647c6fd2b58a34b
https://github.com/rackerlabs/clouddocs-maven-plugin/blob/ba8554dc340db674307efdaac647c6fd2b58a34b/src/main/java/com/rackspace/cloud/api/docs/builders/PDFBuilder.java#L1152-L1197
train
Main method for the application.
Of course, here is the Java code you requested: ```java public static void main(String[] args) { try { System.out.println("setting up fonts and images directories\n"); System.out.println("FOP ExampleFO2PDF\n"); System.out.println("Preparing..."); //Setup directories File sourceDir = new File("/Users...
goodow/realtime-channel
src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java
FutureResultImpl.setFailure
@Override public FutureResultImpl<T> setFailure(Throwable throwable) { this.throwable = throwable; failed = true; checkCallHandler(); return this; }
java
@Override public FutureResultImpl<T> setFailure(Throwable throwable) { this.throwable = throwable; failed = true; checkCallHandler(); return this; }
[ "@", "Override", "public", "FutureResultImpl", "<", "T", ">", "setFailure", "(", "Throwable", "throwable", ")", "{", "this", ".", "throwable", "=", "throwable", ";", "failed", "=", "true", ";", "checkCallHandler", "(", ")", ";", "return", "this", ";", "}" ...
Set the failure. Any handler will be called, if there is one
[ "Set", "the", "failure", ".", "Any", "handler", "will", "be", "called", "if", "there", "is", "one" ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java#L90-L96
train
Sets the failure.
Of course, here is the Java code you requested: ```java @Override public FutureResultImpl<T> setFailure(Throwable throwable) { this.throwable = throwable; failed = true; checkCallHandler(); return this; } ``` Hope this helps!
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.classifyAndWriteAnswers
public void classifyAndWriteAnswers(String testFile, DocumentReaderAndWriter<IN> readerWriter) throws IOException { ObjectBank<List<IN>> documents = makeObjectBankFromFile(testFile, readerWriter); classifyAndWriteAnswers(documents, readerWriter); }
java
public void classifyAndWriteAnswers(String testFile, DocumentReaderAndWriter<IN> readerWriter) throws IOException { ObjectBank<List<IN>> documents = makeObjectBankFromFile(testFile, readerWriter); classifyAndWriteAnswers(documents, readerWriter); }
[ "public", "void", "classifyAndWriteAnswers", "(", "String", "testFile", ",", "DocumentReaderAndWriter", "<", "IN", ">", "readerWriter", ")", "throws", "IOException", "{", "ObjectBank", "<", "List", "<", "IN", ">>", "documents", "=", "makeObjectBankFromFile", "(", ...
Load a test file, run the classifier on it, and then print the answers to stdout (with timing to stderr). This uses the value of flags.documentReader to determine testFile format. @param testFile The file to test on. @param readerWriter A reader and writer to use for the output
[ "Load", "a", "test", "file", "run", "the", "classifier", "on", "it", "and", "then", "print", "the", "answers", "to", "stdout", "(", "with", "timing", "to", "stderr", ")", ".", "This", "uses", "the", "value", "of", "flags", ".", "documentReader", "to", ...
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1061-L1068
train
Classify and write a single CRS file
Of course, here is the Java code you requested: ```java public void classifyAndWriteAnswers(String testFile, DocumentReaderAndWriter<IN> readerWriter) throws IOException { ObjectBank<List<IN>> documents = makeObjectBankFromFile(testFile, readerWriter); cl...
b3log/latke
latke-core/src/main/java/org/b3log/latke/Latkes.java
Latkes.getServerPort
public static String getServerPort() { String ret = getLatkeProperty("serverPort"); if (null == ret) { final RequestContext requestContext = REQUEST_CONTEXT.get(); if (null != requestContext) { ret = requestContext.getRequest().getServerPort() + ""; } ...
java
public static String getServerPort() { String ret = getLatkeProperty("serverPort"); if (null == ret) { final RequestContext requestContext = REQUEST_CONTEXT.get(); if (null != requestContext) { ret = requestContext.getRequest().getServerPort() + ""; } ...
[ "public", "static", "String", "getServerPort", "(", ")", "{", "String", "ret", "=", "getLatkeProperty", "(", "\"serverPort\"", ")", ";", "if", "(", "null", "==", "ret", ")", "{", "final", "RequestContext", "requestContext", "=", "REQUEST_CONTEXT", ".", "get", ...
Gets server port. @return server port
[ "Gets", "server", "port", "." ]
f7e08a47eeecea5f7c94006382c24f353585de33
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/Latkes.java#L359-L369
train
Gets the server port.
Of course, here is the Java code you requested: ```java public static String getServerPort() { String ret = getLatkeProperty("serverPort"); if (null == ret) { final RequestContext requestContext = REQUEST_CONTEXT.get(); if (null != requestContext) { ret = request...
google/closure-templates
java/src/com/google/template/soy/types/SoyTypes.java
SoyTypes.tryRemoveNull
public static SoyType tryRemoveNull(SoyType soyType) { if (soyType == NullType.getInstance()) { return NullType.getInstance(); } return removeNull(soyType); }
java
public static SoyType tryRemoveNull(SoyType soyType) { if (soyType == NullType.getInstance()) { return NullType.getInstance(); } return removeNull(soyType); }
[ "public", "static", "SoyType", "tryRemoveNull", "(", "SoyType", "soyType", ")", "{", "if", "(", "soyType", "==", "NullType", ".", "getInstance", "(", ")", ")", "{", "return", "NullType", ".", "getInstance", "(", ")", ";", "}", "return", "removeNull", "(", ...
If the type is nullable, makes it non-nullable. <p>If the type is the null type, then it returns the null type.
[ "If", "the", "type", "is", "nullable", "makes", "it", "non", "-", "nullable", "." ]
cc61e1dff70ae97f24f417a57410081bc498bd56
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/types/SoyTypes.java#L83-L88
train
Try to remove null from a SoyType.
Of course, here is the Java code you requested: ```java public static SoyType tryRemoveNull(SoyType soyType) { if (soyType == NullType.getInstance()) { return NullType.getInstance(); } return removeNull(soyType); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java
SRTServletRequest.getDirectConnectionPeerCertificates
public X509Certificate[] getDirectConnectionPeerCertificates() { if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){ checkRequestObjectInUse(); } Class<? extends IRequest> requestClass = _request.getClass(); X509Certificate[] certs = null; //PI75166 if(ch...
java
public X509Certificate[] getDirectConnectionPeerCertificates() { if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){ checkRequestObjectInUse(); } Class<? extends IRequest> requestClass = _request.getClass(); X509Certificate[] certs = null; //PI75166 if(ch...
[ "public", "X509Certificate", "[", "]", "getDirectConnectionPeerCertificates", "(", ")", "{", "if", "(", "WCCustomProperties", ".", "CHECK_REQUEST_OBJECT_IN_USE", ")", "{", "checkRequestObjectInUse", "(", ")", ";", "}", "Class", "<", "?", "extends", "IRequest", ">", ...
Return the peer (i.e. the client) certificates. This must be an SSL connection with mutual authentication; else, null is returned. @return the peer certificates, or null if none.
[ "Return", "the", "peer", "(", "i", ".", "e", ".", "the", "client", ")", "certificates", ".", "This", "must", "be", "an", "SSL", "connection", "with", "mutual", "authentication", ";", "else", "null", "is", "returned", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java#L962-L993
train
Gets the direct connection peer certificates.
Of course, here is the Java code you requested: ```java public X509Certificate[] getDirectConnectionPeerCertificates() { if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){ checkRequestObjectInUse(); } Class<? extends IRequest> requestClass = _request.getClass(); X509Ce...
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
SystemViewImporter.endPrimaryType
private ImportPropertyData endPrimaryType() throws PathNotFoundException, RepositoryException, NoSuchNodeTypeException { ImportPropertyData propertyData; String sName = propertyInfo.getValues().get(0).toString(); InternalQName primaryTypeName = locationFactory.parseJCRName(sName).getInternalN...
java
private ImportPropertyData endPrimaryType() throws PathNotFoundException, RepositoryException, NoSuchNodeTypeException { ImportPropertyData propertyData; String sName = propertyInfo.getValues().get(0).toString(); InternalQName primaryTypeName = locationFactory.parseJCRName(sName).getInternalN...
[ "private", "ImportPropertyData", "endPrimaryType", "(", ")", "throws", "PathNotFoundException", ",", "RepositoryException", ",", "NoSuchNodeTypeException", "{", "ImportPropertyData", "propertyData", ";", "String", "sName", "=", "propertyInfo", ".", "getValues", "(", ")", ...
endPrimaryType. @return @throws PathNotFoundException @throws RepositoryException @throws NoSuchNodeTypeException
[ "endPrimaryType", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java#L445-L486
train
End primary type.
Of course, here is the Java code you requested: ```java private ImportPropertyData endPrimaryType() throws PathNotFoundException, RepositoryException, NoSuchNodeTypeException { ImportPropertyData propertyData; String sName = propertyInfo.getValues().get(0).toString(); InternalQName primaryTy...
FaritorKang/unmz-common-util
src/main/java/net/unmz/java/util/unicode/UnicodeUtils.java
UnicodeUtils.decodeUnicode
public static String decodeUnicode(final String dataStr) { int start = 0; int end = 0; final StringBuffer buffer = new StringBuffer(); while (start > -1) { end = dataStr.indexOf("\\u", start + 2); String charStr = ""; if (end == -1) { c...
java
public static String decodeUnicode(final String dataStr) { int start = 0; int end = 0; final StringBuffer buffer = new StringBuffer(); while (start > -1) { end = dataStr.indexOf("\\u", start + 2); String charStr = ""; if (end == -1) { c...
[ "public", "static", "String", "decodeUnicode", "(", "final", "String", "dataStr", ")", "{", "int", "start", "=", "0", ";", "int", "end", "=", "0", ";", "final", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "while", "(", "start", ...
Unicode转字符 @param dataStr @return
[ "Unicode转字符" ]
2912b8889b85ed910d536f85b24b6fa68035814a
https://github.com/FaritorKang/unmz-common-util/blob/2912b8889b85ed910d536f85b24b6fa68035814a/src/main/java/net/unmz/java/util/unicode/UnicodeUtils.java#L38-L55
train
Decode unicode.
Of course, here is the Java code you requested: ```java public static String decodeUnicode(final String dataStr) { int start = 0; int end = 0; final StringBuffer buffer = new StringBuffer(); while (start > -1) { end = dataStr.indexOf("\\u", start + 2); String cha...
sporniket/core
sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/paper/SheetOfPaperRaw.java
SheetOfPaperRaw.setUnitPerMillimeter
public void setUnitPerMillimeter(int unitPerMillimeter) { if (1 > unitPerMillimeter) { String _message = "The specified unitPerMillimetre ({0}) is incorrect, it must be greater or equal than 1."; Object[] _parameters = { new Integer(unitPerMillimeter) }; throw new IllegalArgumentException(Messag...
java
public void setUnitPerMillimeter(int unitPerMillimeter) { if (1 > unitPerMillimeter) { String _message = "The specified unitPerMillimetre ({0}) is incorrect, it must be greater or equal than 1."; Object[] _parameters = { new Integer(unitPerMillimeter) }; throw new IllegalArgumentException(Messag...
[ "public", "void", "setUnitPerMillimeter", "(", "int", "unitPerMillimeter", ")", "{", "if", "(", "1", ">", "unitPerMillimeter", ")", "{", "String", "_message", "=", "\"The specified unitPerMillimetre ({0}) is incorrect, it must be greater or equal than 1.\"", ";", "Object", ...
/* (non-Javadoc) @see com.sporniket.libre.ui.swing.paper.SheetOfPaper#setUnitPerMillimeter(int)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
3480ebd72a07422fcc09971be2607ee25efb2c26
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/paper/SheetOfPaperRaw.java#L198-L210
train
Sets the unitPerMillimeter.
Of course, here is the Java code you requested: ```java public void setUnitPerMillimeter(int unitPerMillimeter) { if (1 > unitPerMillimeter) { String _message = "The specified unitPerMillimetre ({0}) is incorrect, it must be greater or equal than 1."; Object[] _parameters = { new Integer(unitPerMilli...
OpenEstate/OpenEstate-IO
OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_5.java
OpenImmo_1_2_5.upgradeFromPreviousVersion
@Override @SuppressWarnings("Duplicates") public void upgradeFromPreviousVersion(OpenImmoDocument doc) { doc.setDocumentVersion(OpenImmoVersion.V1_2_5); if (doc instanceof OpenImmoTransferDocument) { try { this.upgradeEnergiepassElements(doc.getDocument()); ...
java
@Override @SuppressWarnings("Duplicates") public void upgradeFromPreviousVersion(OpenImmoDocument doc) { doc.setDocumentVersion(OpenImmoVersion.V1_2_5); if (doc instanceof OpenImmoTransferDocument) { try { this.upgradeEnergiepassElements(doc.getDocument()); ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"Duplicates\"", ")", "public", "void", "upgradeFromPreviousVersion", "(", "OpenImmoDocument", "doc", ")", "{", "doc", ".", "setDocumentVersion", "(", "OpenImmoVersion", ".", "V1_2_5", ")", ";", "if", "(", "doc", "...
Upgrade an OpenImmo document from version 1.2.4 to 1.2.5. @param doc OpenImmo document in version 1.2.4
[ "Upgrade", "an", "OpenImmo", "document", "from", "version", "1", ".", "2", ".", "4", "to", "1", ".", "2", ".", "5", "." ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_5.java#L164-L177
test
Upgrade from previous version of the document.
Of course, here is the Java code you requested: ```java @Override @SuppressWarnings("Duplicates") public void upgradeFromPreviousVersion(OpenImmoDocument doc) { doc.setDocumentVersion(OpenImmoVersion.V1_2_5); if (doc instanceof OpenImmoTransferDocument) { try { this...
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java
AbstractMapBasedWALDAO.internalCreateItem
@MustBeLocked (ELockType.WRITE) @Nonnull protected final IMPLTYPE internalCreateItem (@Nonnull final IMPLTYPE aNewItem) { return internalCreateItem (aNewItem, true); }
java
@MustBeLocked (ELockType.WRITE) @Nonnull protected final IMPLTYPE internalCreateItem (@Nonnull final IMPLTYPE aNewItem) { return internalCreateItem (aNewItem, true); }
[ "@", "MustBeLocked", "(", "ELockType", ".", "WRITE", ")", "@", "Nonnull", "protected", "final", "IMPLTYPE", "internalCreateItem", "(", "@", "Nonnull", "final", "IMPLTYPE", "aNewItem", ")", "{", "return", "internalCreateItem", "(", "aNewItem", ",", "true", ")", ...
Add an item including invoking the callback. Must only be invoked inside a write-lock. @param aNewItem The item to be added. May not be <code>null</code>. @return The passed parameter as-is. Never <code>null</code>. @throws IllegalArgumentException If an item with the same ID is already contained
[ "Add", "an", "item", "including", "invoking", "the", "callback", ".", "Must", "only", "be", "invoked", "inside", "a", "write", "-", "lock", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java#L294-L299
train
Create a new item in the node.
Of course, here is the Java code you requested: ```java @MustBeLocked (ELockType.WRITE) @Nonnull protected final IMPLTYPE internalCreateItem (@Nonnull final IMPLTYPE aNewItem) { return internalCreateItem (aNewItem, true); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/AWSWAFRegionalClient.java
AWSWAFRegionalClient.deletePermissionPolicy
@Override public DeletePermissionPolicyResult deletePermissionPolicy(DeletePermissionPolicyRequest request) { request = beforeClientExecution(request); return executeDeletePermissionPolicy(request); }
java
@Override public DeletePermissionPolicyResult deletePermissionPolicy(DeletePermissionPolicyRequest request) { request = beforeClientExecution(request); return executeDeletePermissionPolicy(request); }
[ "@", "Override", "public", "DeletePermissionPolicyResult", "deletePermissionPolicy", "(", "DeletePermissionPolicyRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeletePermissionPolicy", "(", "request", ")",...
<p> Permanently deletes an IAM policy from the specified RuleGroup. </p> <p> The user making the request must be the owner of the RuleGroup. </p> @param deletePermissionPolicyRequest @return Result of the DeletePermissionPolicy operation returned by the service. @throws WAFInternalErrorException The operation failed b...
[ "<p", ">", "Permanently", "deletes", "an", "IAM", "policy", "from", "the", "specified", "RuleGroup", ".", "<", "/", "p", ">", "<p", ">", "The", "user", "making", "the", "request", "must", "be", "the", "owner", "of", "the", "RuleGroup", ".", "<", "/", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/AWSWAFRegionalClient.java#L2722-L2726
train
Deletes a Permission Policy.
Of course, here is the Java code you requested: ```java @Override public DeletePermissionPolicyResult deletePermissionPolicy(DeletePermissionPolicyRequest request) { request = beforeClientExecution(request); return executeDeletePermissionPolicy(request); } ``` Hope this helps!
youseries/urule
urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java
DbPersistenceManager.getAllNodeInfos
@Override public synchronized Map<NodeId, NodeInfo> getAllNodeInfos(NodeId bigger, int maxCount) throws ItemStateException { ResultSet rs = null; try { String sql = bundleSelectAllBundlesSQL; NodeId lowId = null; Object[] keys = new Object[0]; if (bigg...
java
@Override public synchronized Map<NodeId, NodeInfo> getAllNodeInfos(NodeId bigger, int maxCount) throws ItemStateException { ResultSet rs = null; try { String sql = bundleSelectAllBundlesSQL; NodeId lowId = null; Object[] keys = new Object[0]; if (bigg...
[ "@", "Override", "public", "synchronized", "Map", "<", "NodeId", ",", "NodeInfo", ">", "getAllNodeInfos", "(", "NodeId", "bigger", ",", "int", "maxCount", ")", "throws", "ItemStateException", "{", "ResultSet", "rs", "=", "null", ";", "try", "{", "String", "s...
{@inheritDoc}
[ "{" ]
3fa0eb4439e97aa292e744bcbd88a9faa36661d8
https://github.com/youseries/urule/blob/3fa0eb4439e97aa292e744bcbd88a9faa36661d8/urule-console/src/main/java/com/bstek/urule/console/repository/database/DbPersistenceManager.java#L807-L855
train
Get all node infos from the database.
Of course, here is the Java code you requested: ```java @Override public synchronized Map<NodeId, NodeInfo> getAllNodeInfos(NodeId bigger, int maxCount) throws ItemStateException { ResultSet rs = null; try { String sql = bundleSelectAllBundlesSQL; NodeId lowId = null; ...
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/reporting/AbstractFileReporter.java
AbstractFileReporter.createReport
@Override public synchronized void createReport() throws IOException { if (reportLines.isEmpty()) { log.debug("No data to report. Skipping report generation."); return; } File reportFile = new File(archiveDir.get(), createFileName()); log.debug("Writing report to file: {}", reportFile); String heade...
java
@Override public synchronized void createReport() throws IOException { if (reportLines.isEmpty()) { log.debug("No data to report. Skipping report generation."); return; } File reportFile = new File(archiveDir.get(), createFileName()); log.debug("Writing report to file: {}", reportFile); String heade...
[ "@", "Override", "public", "synchronized", "void", "createReport", "(", ")", "throws", "IOException", "{", "if", "(", "reportLines", ".", "isEmpty", "(", ")", ")", "{", "log", ".", "debug", "(", "\"No data to report. Skipping report generation.\"", ")", ";", "re...
Writes the report to a file. The report is written to the archive direcory as specified by the property {@link JFunkConstants#ARCHIVE_DIR}.
[ "Writes", "the", "report", "to", "a", "file", ".", "The", "report", "is", "written", "to", "the", "archive", "direcory", "as", "specified", "by", "the", "property", "{" ]
5b9fecac5778b988bb458085ded39ea9a4c7c2ae
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/reporting/AbstractFileReporter.java#L101-L119
train
Creates a report file.
Of course, here is the Java code you requested: ```java @Override public synchronized void createReport() throws IOException { if (reportLines.isEmpty()) { log.debug("No data to report. Skipping report generation."); return; } File reportFile = new File(archiveDir.get(), createFileName()); log.debug("...
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/index/GeometryIndexDao.java
GeometryIndexDao.populate
public GeometryIndex populate(TableIndex tableIndex, long geomId, GeometryEnvelope envelope) { GeometryIndex geometryIndex = new GeometryIndex(); geometryIndex.setTableIndex(tableIndex); geometryIndex.setGeomId(geomId); geometryIndex.setMinX(envelope.getMinX()); geometryIndex.setMaxX(envelope.getMaxX()); ...
java
public GeometryIndex populate(TableIndex tableIndex, long geomId, GeometryEnvelope envelope) { GeometryIndex geometryIndex = new GeometryIndex(); geometryIndex.setTableIndex(tableIndex); geometryIndex.setGeomId(geomId); geometryIndex.setMinX(envelope.getMinX()); geometryIndex.setMaxX(envelope.getMaxX()); ...
[ "public", "GeometryIndex", "populate", "(", "TableIndex", "tableIndex", ",", "long", "geomId", ",", "GeometryEnvelope", "envelope", ")", "{", "GeometryIndex", "geometryIndex", "=", "new", "GeometryIndex", "(", ")", ";", "geometryIndex", ".", "setTableIndex", "(", ...
Populate a new geometry index from an envelope @param tableIndex table index @param geomId geometry id @param envelope geometry envelope @return geometry index
[ "Populate", "a", "new", "geometry", "index", "from", "an", "envelope" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/index/GeometryIndexDao.java#L220-L239
train
Populates a GeometryIndex object with the data from the given GeometryEnvelope.
Of course, here is the Java code you requested: ```java public GeometryIndex populate(TableIndex tableIndex, long geomId, GeometryEnvelope envelope) { GeometryIndex geometryIndex = new GeometryIndex(); geometryIndex.setTableIndex(tableIndex); geometryIndex.setGeomId(geomId); geometryIndex.setMinX(envelope....
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/model/ModelAdapter.java
ModelAdapter.adaptResult
public ChatResult adaptResult(ComapiResult<?> result, Boolean success) { return new ChatResult(result.isSuccessful() && success, result.isSuccessful() ? null : new ChatResult.Error(result)); }
java
public ChatResult adaptResult(ComapiResult<?> result, Boolean success) { return new ChatResult(result.isSuccessful() && success, result.isSuccessful() ? null : new ChatResult.Error(result)); }
[ "public", "ChatResult", "adaptResult", "(", "ComapiResult", "<", "?", ">", "result", ",", "Boolean", "success", ")", "{", "return", "new", "ChatResult", "(", "result", ".", "isSuccessful", "(", ")", "&&", "success", ",", "result", ".", "isSuccessful", "(", ...
Translates Foundation result to Chat SDK result. @param result Foundation result. @param success True if required Chat SDK processing was successful. @return Chat SDK result.
[ "Translates", "Foundation", "result", "to", "Chat", "SDK", "result", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/model/ModelAdapter.java#L126-L129
train
Adapts a comapi result to a ChatResult.
Of course, here is the Java code you requested: ```java public ChatResult adaptResult(ComapiResult<?> result, Boolean success) { return new ChatResult(result.isSuccessful() && success, result.isSuccessful() ? null : new ChatResult.Error(result)); } ``` Hope this helps!
lviggiano/owner
owner-java8-extras/src/main/java/org/aeonbits/owner/converters/DurationConverter.java
DurationConverter.parseDuration
private static Duration parseDuration(String input) { String[] parts = ConverterUtil.splitNumericAndChar(input); String numberString = parts[0]; String originalUnitString = parts[1]; String unitString = originalUnitString; if (numberString.length() == 0) { throw new ...
java
private static Duration parseDuration(String input) { String[] parts = ConverterUtil.splitNumericAndChar(input); String numberString = parts[0]; String originalUnitString = parts[1]; String unitString = originalUnitString; if (numberString.length() == 0) { throw new ...
[ "private", "static", "Duration", "parseDuration", "(", "String", "input", ")", "{", "String", "[", "]", "parts", "=", "ConverterUtil", ".", "splitNumericAndChar", "(", "input", ")", ";", "String", "numberString", "=", "parts", "[", "0", "]", ";", "String", ...
Parses a duration string. If no units are specified in the string, it is assumed to be in milliseconds. This implementation was blatantly stolen/adapted from the typesafe-config project: https://github.com/typesafehub/config/blob/v1.3.0/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java#L551-L624 @param ...
[ "Parses", "a", "duration", "string", ".", "If", "no", "units", "are", "specified", "in", "the", "string", "it", "is", "assumed", "to", "be", "in", "milliseconds", "." ]
1223ecfbe3c275b3b7c5ec13e9238c9bb888754f
https://github.com/lviggiano/owner/blob/1223ecfbe3c275b3b7c5ec13e9238c9bb888754f/owner-java8-extras/src/main/java/org/aeonbits/owner/converters/DurationConverter.java#L74-L130
train
Parses a duration string.
Of course, here is the Java code you requested: ```java private static Duration parseDuration(String input) { String[] parts = ConverterUtil.splitNumericAndChar(input); String numberString = parts[0]; String originalUnitString = parts[1]; String unitString = originalUnitString; ...
bozaro/git-lfs-java
gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java
Pointer.parsePointer
@Nullable public static Map<String, String> parsePointer(@NotNull InputStream stream) throws IOException { byte[] buffer = new byte[Constants.POINTER_MAX_SIZE]; int size = 0; while (size < buffer.length) { int len = stream.read(buffer, size, buffer.length - size); if (len <= 0) { retur...
java
@Nullable public static Map<String, String> parsePointer(@NotNull InputStream stream) throws IOException { byte[] buffer = new byte[Constants.POINTER_MAX_SIZE]; int size = 0; while (size < buffer.length) { int len = stream.read(buffer, size, buffer.length - size); if (len <= 0) { retur...
[ "@", "Nullable", "public", "static", "Map", "<", "String", ",", "String", ">", "parsePointer", "(", "@", "NotNull", "InputStream", "stream", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "Constants", ".", "POINTER_...
Read pointer data. @param stream Input stream. @return Return pointer info or null if blob is not a pointer data.
[ "Read", "pointer", "data", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java#L91-L103
train
Parses a CID pointer from an input stream.
Of course, here is the Java code you requested: ```java @Nullable public static Map<String, String> parsePointer(@NotNull InputStream stream) throws IOException { byte[] buffer = new byte[Constants.POINTER_MAX_SIZE]; int size = 0; while (size < buffer.length) { int len = stream.read(buffer, size, b...
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/JaiDebug.java
JaiDebug.dumpTexCoords
public static void dumpTexCoords(AiMesh mesh, int coords) { if (!mesh.hasTexCoords(coords)) { System.out.println("mesh has no texture coordinate set " + coords); return; } for (int i = 0; i < mesh.getNumVertices(); i++) { int numComponents = mesh.getN...
java
public static void dumpTexCoords(AiMesh mesh, int coords) { if (!mesh.hasTexCoords(coords)) { System.out.println("mesh has no texture coordinate set " + coords); return; } for (int i = 0; i < mesh.getNumVertices(); i++) { int numComponents = mesh.getN...
[ "public", "static", "void", "dumpTexCoords", "(", "AiMesh", "mesh", ",", "int", "coords", ")", "{", "if", "(", "!", "mesh", ".", "hasTexCoords", "(", "coords", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"mesh has no texture coordinate set \"...
Dumps a texture coordinate set of a mesh to stdout. @param mesh the mesh @param coords the coordinates
[ "Dumps", "a", "texture", "coordinate", "set", "of", "a", "mesh", "to", "stdout", "." ]
05034d465a7b0a494fabb9e9f2971ac19392f32d
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/JaiDebug.java#L139-L159
train
Dump the texture coordinates of a given mesh.
Of course, here is the Java code you requested: ```java public static void dumpTexCoords(AiMesh mesh, int coords) { if (!mesh.hasTexCoords(coords)) { System.out.println("mesh has no texture coordinate set " + coords); return; } for (int i = 0; i < mesh.getNumVer...
pugwoo/nimble-orm
src/main/java/com/pugwoo/dbhelper/sql/SQLUtils.java
SQLUtils.getUpdateSQL
public static <T> String getUpdateSQL(T t, List<Object> values, boolean withNull, String postSql) { StringBuilder sql = new StringBuilder(); sql.append("UPDATE "); Table table = DOInfoReader.getTable(t.getClass()); List<Field> keyFields = DOInfoReader.getKeyColumns(t.getClass()); List<Field> notKe...
java
public static <T> String getUpdateSQL(T t, List<Object> values, boolean withNull, String postSql) { StringBuilder sql = new StringBuilder(); sql.append("UPDATE "); Table table = DOInfoReader.getTable(t.getClass()); List<Field> keyFields = DOInfoReader.getKeyColumns(t.getClass()); List<Field> notKe...
[ "public", "static", "<", "T", ">", "String", "getUpdateSQL", "(", "T", "t", ",", "List", "<", "Object", ">", "values", ",", "boolean", "withNull", ",", "String", "postSql", ")", "{", "StringBuilder", "sql", "=", "new", "StringBuilder", "(", ")", ";", "...
生成update语句 @param t @param values @param withNull @param postSql @return 返回值为null表示不需要更新操作,这个是这个方法特别之处
[ "生成update语句" ]
dd496f3e57029e4f22f9a2f00d18a6513ef94d08
https://github.com/pugwoo/nimble-orm/blob/dd496f3e57029e4f22f9a2f00d18a6513ef94d08/src/main/java/com/pugwoo/dbhelper/sql/SQLUtils.java#L263-L321
train
Update SQL.
Of course, here is the Java code you requested: ```java public static <T> String getUpdateSQL(T t, List<Object> values, boolean withNull, String postSql) { StringBuilder sql = new StringBuilder(); sql.append("UPDATE "); Table table = DOInfoReader.getTable(t.getClass()); List<Field> keyFields = DOInfoR...
indeedeng/proctor
proctor-common/src/main/java/com/indeed/proctor/common/Proctor.java
Proctor.construct
@Nonnull public static Proctor construct(@Nonnull final TestMatrixArtifact matrix, ProctorLoadResult loadResult, FunctionMapper functionMapper) { final ExpressionFactory expressionFactory = RuleEvaluator.EXPRESSION_FACTORY; final Map<String, TestChooser<?>> testChoosers = Maps.newLinkedHashMap(); ...
java
@Nonnull public static Proctor construct(@Nonnull final TestMatrixArtifact matrix, ProctorLoadResult loadResult, FunctionMapper functionMapper) { final ExpressionFactory expressionFactory = RuleEvaluator.EXPRESSION_FACTORY; final Map<String, TestChooser<?>> testChoosers = Maps.newLinkedHashMap(); ...
[ "@", "Nonnull", "public", "static", "Proctor", "construct", "(", "@", "Nonnull", "final", "TestMatrixArtifact", "matrix", ",", "ProctorLoadResult", "loadResult", ",", "FunctionMapper", "functionMapper", ")", "{", "final", "ExpressionFactory", "expressionFactory", "=", ...
Factory method to do the setup and transformation of inputs @param matrix a {@link TestMatrixArtifact} loaded by ProctorLoader @param loadResult a {@link ProctorLoadResult} which contains result of validation of test definition @param functionMapper a given el {@link FunctionMapper} @return constructed Proctor object
[ "Factory", "method", "to", "do", "the", "setup", "and", "transformation", "of", "inputs" ]
b7795acfc26a30d013655d0e0fa1d3f8d0576571
https://github.com/indeedeng/proctor/blob/b7795acfc26a30d013655d0e0fa1d3f8d0576571/proctor-common/src/main/java/com/indeed/proctor/common/Proctor.java#L45-L67
train
Construct a new instance of a Proctor class.
Of course, here is the Java code you requested: ```java @Nonnull public static Proctor construct(@Nonnull final TestMatrixArtifact matrix, ProctorLoadResult loadResult, FunctionMapper functionMapper) { final ExpressionFactory expressionFactory = RuleEvaluator.EXPRESSION_FACTORY; final Map<String, ...
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/CommerceOrderLocalServiceUtil.java
CommerceOrderLocalServiceUtil.getCommerceOrdersByUuidAndCompanyId
public static java.util.List<com.liferay.commerce.model.CommerceOrder> getCommerceOrdersByUuidAndCompanyId( String uuid, long companyId) { return getService().getCommerceOrdersByUuidAndCompanyId(uuid, companyId); }
java
public static java.util.List<com.liferay.commerce.model.CommerceOrder> getCommerceOrdersByUuidAndCompanyId( String uuid, long companyId) { return getService().getCommerceOrdersByUuidAndCompanyId(uuid, companyId); }
[ "public", "static", "java", ".", "util", ".", "List", "<", "com", ".", "liferay", ".", "commerce", ".", "model", ".", "CommerceOrder", ">", "getCommerceOrdersByUuidAndCompanyId", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "return", "getService"...
Returns all the commerce orders matching the UUID and company. @param uuid the UUID of the commerce orders @param companyId the primary key of the company @return the matching commerce orders, or an empty list if no matches were found
[ "Returns", "all", "the", "commerce", "orders", "matching", "the", "UUID", "and", "company", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/CommerceOrderLocalServiceUtil.java#L413-L416
train
Returns a list of commerce orders matching the UUID and company.
Of course, here is the Java code you requested: ```java public static java.util.List<com.liferay.commerce.model.CommerceOrder> getCommerceOrdersByUuidAndCompanyId( String uuid, long companyId) { return getService().getCommerceOrdersByUuidAndCompanyId(uuid, companyId); } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-notification-api/src/main/java/com/liferay/commerce/notification/service/persistence/CommerceNotificationTemplateUtil.java
CommerceNotificationTemplateUtil.findByGroupId
public static List<CommerceNotificationTemplate> findByGroupId( long groupId, int start, int end) { return getPersistence().findByGroupId(groupId, start, end); }
java
public static List<CommerceNotificationTemplate> findByGroupId( long groupId, int start, int end) { return getPersistence().findByGroupId(groupId, start, end); }
[ "public", "static", "List", "<", "CommerceNotificationTemplate", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "getPersistence", "(", ")", ".", "findByGroupId", "(", "groupId", ",", "start", ",", "e...
Returns a range of all the commerce notification templates where groupId = &#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 resul...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-api/src/main/java/com/liferay/commerce/notification/service/persistence/CommerceNotificationTemplateUtil.java#L541-L544
train
Returns a range of commerce notification templates where groupId = &#63 ; and start = 0 and end = 0.
Of course, here is the Java code you requested: ```java public static List<CommerceNotificationTemplate> findByGroupId( long groupId, int start, int end) { return getPersistence().findByGroupId(groupId, start, end); } ``` Hope this helps!
FasterXML/woodstox
src/main/java/com/ctc/wstx/sw/SimpleNsStreamWriter.java
SimpleNsStreamWriter.writeDefaultNamespace
@Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setDefaultNamespace(nsURI); do...
java
@Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } // 27-Mar-2007, TSa: Apparently TCK expects a binding to be added setDefaultNamespace(nsURI); do...
[ "@", "Override", "public", "void", "writeDefaultNamespace", "(", "String", "nsURI", ")", "throws", "XMLStreamException", "{", "if", "(", "!", "mStartElementOpen", ")", "{", "throwOutputError", "(", "ERR_NSDECL_WRONG_STATE", ")", ";", "}", "// 27-Mar-2007, TSa: Apparen...
public void writeEndElement() throws XMLStreamException
[ "public", "void", "writeEndElement", "()", "throws", "XMLStreamException" ]
ffcaabdc06672d9564c48c25d601d029b7fd6548
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sw/SimpleNsStreamWriter.java#L99-L109
train
Write the default namespace.
Of course, here is the Java code you requested: ```java @Override public void writeDefaultNamespace(String nsURI) throws XMLStreamException { if (!mStartElementOpen) { throwOutputError(ERR_NSDECL_WRONG_STATE); } // 27-Mar-2007, TSa: Apparently TCK expects a binding t...
streamsets/datacollector
cluster-bootstrap-api/src/main/java/com/streamsets/pipeline/hadoop/HadoopMapReduceBinding.java
HadoopMapReduceBinding.getMapMemoryMb
public static Integer getMapMemoryMb(String javaOpts, Configuration conf) { String[] javaOptsArray = javaOpts.split(" "); Integer upperLimitMemory = null; for (String opts : javaOptsArray) { if (opts.contains("-Xmx")) { Integer memoryMb = Integer.valueOf(opts.substring(4, opts.length() - 1)); ...
java
public static Integer getMapMemoryMb(String javaOpts, Configuration conf) { String[] javaOptsArray = javaOpts.split(" "); Integer upperLimitMemory = null; for (String opts : javaOptsArray) { if (opts.contains("-Xmx")) { Integer memoryMb = Integer.valueOf(opts.substring(4, opts.length() - 1)); ...
[ "public", "static", "Integer", "getMapMemoryMb", "(", "String", "javaOpts", ",", "Configuration", "conf", ")", "{", "String", "[", "]", "javaOptsArray", "=", "javaOpts", ".", "split", "(", "\" \"", ")", ";", "Integer", "upperLimitMemory", "=", "null", ";", "...
visible for testing (can't annotate as can't depend on Guava)
[ "visible", "for", "testing", "(", "can", "t", "annotate", "as", "can", "t", "depend", "on", "Guava", ")" ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/cluster-bootstrap-api/src/main/java/com/streamsets/pipeline/hadoop/HadoopMapReduceBinding.java#L97-L132
test
Get the upper limit of the map memory in MB
Of course, here is the Java code you requested: ```java public static Integer getMapMemoryMb(String javaOpts, Configuration conf) { String[] javaOptsArray = javaOpts.split(" "); Integer upperLimitMemory = null; for (String opts : javaOptsArray) { if (opts.contains("-Xmx")) { Integer memoryMb ...
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20AccessTokenAuthenticator.java
OAuth20AccessTokenAuthenticator.buildUserProfile
protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials, final WebContext webContext, final AccessToken accessToken) { val userProfile = new CommonProfile(true); val authentication = access...
java
protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials, final WebContext webContext, final AccessToken accessToken) { val userProfile = new CommonProfile(true); val authentication = access...
[ "protected", "CommonProfile", "buildUserProfile", "(", "final", "TokenCredentials", "tokenCredentials", ",", "final", "WebContext", "webContext", ",", "final", "AccessToken", "accessToken", ")", "{", "val", "userProfile", "=", "new", "CommonProfile", "(", "true", ")",...
Build user profile common profile. @param tokenCredentials the token credentials @param webContext the web context @param accessToken the access token @return the common profile
[ "Build", "user", "profile", "common", "profile", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20AccessTokenAuthenticator.java#L54-L69
train
Build user profile.
Of course, here is the Java code you requested: ```java protected CommonProfile buildUserProfile(final TokenCredentials tokenCredentials, final WebContext webContext, final AccessToken accessToken) { val userProfile = new...
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/settings/checkout/PaymentSettingsUrl.java
PaymentSettingsUrl.addThirdPartyPaymentWorkflowUrl
public static MozuUrl addThirdPartyPaymentWorkflowUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
java
public static MozuUrl addThirdPartyPaymentWorkflowUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
[ "public", "static", "MozuUrl", "addThirdPartyPaymentWorkflowUrl", "(", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows\"", ")", ";", "return", "new", "MozuUrl", "(", "formatter", ...
Get Resource Url for AddThirdPartyPaymentWorkflow @return String Resource Url
[ "Get", "Resource", "Url", "for", "AddThirdPartyPaymentWorkflow" ]
5beadde73601a859f845e3e2fc1077b39c8bea83
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/settings/checkout/PaymentSettingsUrl.java#L44-L48
train
Get Resource Url for AddThirdPartyPaymentWorkflow
Of course, here is the Java code you requested: ```java public static MozuUrl addThirdPartyPaymentWorkflowUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; ...
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/db/SQLUtils.java
SQLUtils.querySingleInteger
private static int querySingleInteger(Connection connection, String sql, String[] args, boolean allowEmptyResults) { int result = 0; Object value = querySingleResult(connection, sql, args, 0, GeoPackageDataType.MEDIUMINT); if (value != null) { result = ((Number) value).intValue(); } else if (!allowE...
java
private static int querySingleInteger(Connection connection, String sql, String[] args, boolean allowEmptyResults) { int result = 0; Object value = querySingleResult(connection, sql, args, 0, GeoPackageDataType.MEDIUMINT); if (value != null) { result = ((Number) value).intValue(); } else if (!allowE...
[ "private", "static", "int", "querySingleInteger", "(", "Connection", "connection", ",", "String", "sql", ",", "String", "[", "]", "args", ",", "boolean", "allowEmptyResults", ")", "{", "int", "result", "=", "0", ";", "Object", "value", "=", "querySingleResult"...
Query the SQL for a single integer result @param connection connection @param sql sql @param args query arguments @param allowEmptyResults true to accept empty results as a 0 return @return Integer result, null if no result
[ "Query", "the", "SQL", "for", "a", "single", "integer", "result" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/db/SQLUtils.java#L223-L238
train
Query a single integer
Of course, here is the Java code you requested: ```java private static int querySingleInteger(Connection connection, String sql, String[] args, boolean allowEmptyResults) { int result = 0; Object value = querySingleResult(connection, sql, args, 0, GeoPackageDataType.MEDIUMINT); if (value != null) { r...
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/TextsearchQueryNode.java
TextsearchQueryNode.setRelativePath
public void setRelativePath(QPath relPath) { if (relPath != null && relPath.isAbsolute()) { throw new IllegalArgumentException("relPath must be relative"); } this.relPath = relPath; if (relPath == null) { // context node is never a property propertyRef...
java
public void setRelativePath(QPath relPath) { if (relPath != null && relPath.isAbsolute()) { throw new IllegalArgumentException("relPath must be relative"); } this.relPath = relPath; if (relPath == null) { // context node is never a property propertyRef...
[ "public", "void", "setRelativePath", "(", "QPath", "relPath", ")", "{", "if", "(", "relPath", "!=", "null", "&&", "relPath", ".", "isAbsolute", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"relPath must be relative\"", ")", ";", "}", ...
Sets the relative path to the item where the textsearch is performed. If <code>relPath</code> is <code>null</code> the textsearch is performed on the context node. @param relPath the relative path to an item. @throws IllegalArgumentException if <code>relPath</code> is absolute.
[ "Sets", "the", "relative", "path", "to", "the", "item", "where", "the", "textsearch", "is", "performed", ".", "If", "<code", ">", "relPath<", "/", "code", ">", "is", "<code", ">", "null<", "/", "code", ">", "the", "textsearch", "is", "performed", "on", ...
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/TextsearchQueryNode.java#L109-L118
train
Sets the relative path of the context node.
Of course, here is the Java code you requested: ```java public void setRelativePath(QPath relPath) { if (relPath != null && relPath.isAbsolute()) { throw new IllegalArgumentException("relPath must be relative"); } this.relPath = relPath; if (relPath == null) { //...
zutnop/telekom-workflow-engine
telekom-workflow-engine/src/main/java/ee/telekom/workflow/facade/WorkflowEngineFacadeImpl.java
WorkflowEngineFacadeImpl.validateClusterNameOfWorkItem
private void validateClusterNameOfWorkItem( long woitRefNum ){ WorkItem woit = workItemDao.findByRefNum( woitRefNum ); validateClusterNameOfWorkflowInstance( woit.getWoinRefNum() ); }
java
private void validateClusterNameOfWorkItem( long woitRefNum ){ WorkItem woit = workItemDao.findByRefNum( woitRefNum ); validateClusterNameOfWorkflowInstance( woit.getWoinRefNum() ); }
[ "private", "void", "validateClusterNameOfWorkItem", "(", "long", "woitRefNum", ")", "{", "WorkItem", "woit", "=", "workItemDao", ".", "findByRefNum", "(", "woitRefNum", ")", ";", "validateClusterNameOfWorkflowInstance", "(", "woit", ".", "getWoinRefNum", "(", ")", "...
Please see the class level documentation for a reasoning on this method.
[ "Please", "see", "the", "class", "level", "documentation", "for", "a", "reasoning", "on", "this", "method", "." ]
f471f1f94013b3e2d56b4c9380e86e3a92c2ee29
https://github.com/zutnop/telekom-workflow-engine/blob/f471f1f94013b3e2d56b4c9380e86e3a92c2ee29/telekom-workflow-engine/src/main/java/ee/telekom/workflow/facade/WorkflowEngineFacadeImpl.java#L366-L369
train
Validate the name of a workflow instance.
Of course, here is the Java code you requested: ```java private void validateClusterNameOfWorkItem( long woitRefNum ){ WorkItem woit = workItemDao.findByRefNum( woitRefNum ); validateClusterNameOfWorkflowInstance( woit.getWoinRefNum() ); } ``` Hope this helps!
apache/parquet-mr
parquet-column/src/main/java/org/apache/parquet/io/ValidatingRecordConsumer.java
ValidatingRecordConsumer.startGroup
public void startGroup() { previousField.push(-1); types.push(types.peek().asGroupType().getType(fields.peek())); delegate.startGroup(); }
java
public void startGroup() { previousField.push(-1); types.push(types.peek().asGroupType().getType(fields.peek())); delegate.startGroup(); }
[ "public", "void", "startGroup", "(", ")", "{", "previousField", ".", "push", "(", "-", "1", ")", ";", "types", ".", "push", "(", "types", ".", "peek", "(", ")", ".", "asGroupType", "(", ")", ".", "getType", "(", "fields", ".", "peek", "(", ")", "...
{@inheritDoc}
[ "{" ]
62dcc68acaf64012bf731e103be780956f1f446d
https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/io/ValidatingRecordConsumer.java#L111-L115
test
Start a group.
Of course, here is the Java code you requested: ```java public void startGroup() { previousField.push(-1); types.push(types.peek().asGroupType().getType(fields.peek())); delegate.startGroup(); } ``` Hope this helps!
aws/aws-sdk-java
jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathFilter.java
JmesPathFilter.accept
@Override public <Input, Output> Output accept(JmesPathVisitor<Input, Output> visitor, Input input) throws InvalidTypeException { return visitor.visit(this, input); }
java
@Override public <Input, Output> Output accept(JmesPathVisitor<Input, Output> visitor, Input input) throws InvalidTypeException { return visitor.visit(this, input); }
[ "@", "Override", "public", "<", "Input", ",", "Output", ">", "Output", "accept", "(", "JmesPathVisitor", "<", "Input", ",", "Output", ">", "visitor", ",", "Input", "input", ")", "throws", "InvalidTypeException", "{", "return", "visitor", ".", "visit", "(", ...
Delegates to either the CodeGen visitor(JmesPathFilter) or Evaluation visitor(JmesPathFilter) based on the type of JmesPath visitor @param visitor CodeGen visitor or Evaluation visitor @param input Input expression that needs to be evaluated @param <Input> Input type for the visitor CodeGen visitor: Void Evaluati...
[ "Delegates", "to", "either", "the", "CodeGen", "visitor", "(", "JmesPathFilter", ")", "or", "Evaluation", "visitor", "(", "JmesPathFilter", ")", "based", "on", "the", "type", "of", "JmesPath", "visitor" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathFilter.java#L76-L79
train
Visit a CID .
Of course, here is the Java code you requested: ```java @Override public <Input, Output> Output accept(JmesPathVisitor<Input, Output> visitor, Input input) throws InvalidTypeException { return visitor.visit(this, input); } ``` Hope this helps!
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/SortedMapWritable.java
SortedMapWritable.write
@Override public void write(DataOutput out) throws IOException { super.write(out); // Write out the number of entries in the map out.writeInt(instance.size()); // Then write out each key/value pair for (Map.Entry<WritableComparable, Writable> e: instance.entrySet()) { out...
java
@Override public void write(DataOutput out) throws IOException { super.write(out); // Write out the number of entries in the map out.writeInt(instance.size()); // Then write out each key/value pair for (Map.Entry<WritableComparable, Writable> e: instance.entrySet()) { out...
[ "@", "Override", "public", "void", "write", "(", "DataOutput", "out", ")", "throws", "IOException", "{", "super", ".", "write", "(", "out", ")", ";", "// Write out the number of entries in the map", "out", ".", "writeInt", "(", "instance", ".", "size", "(", ")...
{@inheritDoc}
[ "{" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/SortedMapWritable.java#L189-L205
train
Write the contents of the CIDCTYPE.
Of course, here is the Java code you requested: ```java @Override public void write(DataOutput out) throws IOException { super.write(out); // Write out the number of entries in the map out.writeInt(instance.size()); // Then write out each key/value pair for (Map.Entry<Writable...
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeArrayDeque.java
KTypeArrayDeque.addFirst
@Override public void addFirst(KType e1) { int h = oneLeft(head, buffer.length); if (h == tail) { ensureBufferSpace(1); h = oneLeft(head, buffer.length); } buffer[head = h] = e1; }
java
@Override public void addFirst(KType e1) { int h = oneLeft(head, buffer.length); if (h == tail) { ensureBufferSpace(1); h = oneLeft(head, buffer.length); } buffer[head = h] = e1; }
[ "@", "Override", "public", "void", "addFirst", "(", "KType", "e1", ")", "{", "int", "h", "=", "oneLeft", "(", "head", ",", "buffer", ".", "length", ")", ";", "if", "(", "h", "==", "tail", ")", "{", "ensureBufferSpace", "(", "1", ")", ";", "h", "=...
{@inheritDoc}
[ "{" ]
e359e9da358e846fcbffc64a765611df954ba3f6
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeArrayDeque.java#L95-L103
train
Add a new element to the end of the list.
Of course, here is the Java code you requested: ```java @Override public void addFirst(KType e1) { int h = oneLeft(head, buffer.length); if (h == tail) { ensureBufferSpace(1); h = oneLeft(head, buffer.length); } buffer[head = h] = e1; } ``` Hope this helps!
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.lockImmutabilityPolicyAsync
public Observable<ImmutabilityPolicyInner> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1<ServiceResponseWithHeaders<Immu...
java
public Observable<ImmutabilityPolicyInner> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).map(new Func1<ServiceResponseWithHeaders<Immu...
[ "public", "Observable", "<", "ImmutabilityPolicyInner", ">", "lockImmutabilityPolicyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ",", "String", "ifMatch", ")", "{", "return", "lockImmutabilityPolicyWithServiceResp...
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name ...
[ "Sets", "the", "ImmutabilityPolicy", "to", "Locked", "state", ".", "The", "only", "action", "allowed", "on", "a", "Locked", "policy", "is", "ExtendImmutabilityPolicy", "action", ".", "ETag", "in", "If", "-", "Match", "is", "required", "for", "this", "operation...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L1515-L1522
train
Locks an immutability policy.
Of course, here is the Java code you requested: ```java public Observable<ImmutabilityPolicyInner> lockImmutabilityPolicyAsync(String resourceGroupName, String accountName, String containerName, String ifMatch) { return lockImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerNam...
aws/aws-sdk-java
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnectClient.java
AmazonConnectClient.getCurrentMetricData
@Override public GetCurrentMetricDataResult getCurrentMetricData(GetCurrentMetricDataRequest request) { request = beforeClientExecution(request); return executeGetCurrentMetricData(request); }
java
@Override public GetCurrentMetricDataResult getCurrentMetricData(GetCurrentMetricDataRequest request) { request = beforeClientExecution(request); return executeGetCurrentMetricData(request); }
[ "@", "Override", "public", "GetCurrentMetricDataResult", "getCurrentMetricData", "(", "GetCurrentMetricDataRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetCurrentMetricData", "(", "request", ")", ";", ...
<p> The <code>GetCurrentMetricData</code> operation retrieves current metric data from your Amazon Connect instance. </p> <p> If you are using an IAM account, it must have permission to the <code>connect:GetCurrentMetricData</code> action. </p> @param getCurrentMetricDataRequest @return Result of the GetCurrentMetricD...
[ "<p", ">", "The", "<code", ">", "GetCurrentMetricData<", "/", "code", ">", "operation", "retrieves", "current", "metric", "data", "from", "your", "Amazon", "Connect", "instance", ".", "<", "/", "p", ">", "<p", ">", "If", "you", "are", "using", "an", "IAM...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnectClient.java#L580-L584
train
Retrieves the current data for a specific CA.
Of course, here is the Java code you requested: ```java @Override public GetCurrentMetricDataResult getCurrentMetricData(GetCurrentMetricDataRequest request) { request = beforeClientExecution(request); return executeGetCurrentMetricData(request); } ``` Hope this helps!
ChannelFinder/javaCFClient
src/main/java/gov/bnl/channelfinder/api/XmlProperty.java
XmlProperty.toLog
public static String toLog(XmlProperty data) { if (data.channels == null) { return data.getName() + "(" + data.getOwner() + ")"; } else { return data.getName() + "(" + data.getOwner() + ")" + (data.channels); } }
java
public static String toLog(XmlProperty data) { if (data.channels == null) { return data.getName() + "(" + data.getOwner() + ")"; } else { return data.getName() + "(" + data.getOwner() + ")" + (data.channels); } }
[ "public", "static", "String", "toLog", "(", "XmlProperty", "data", ")", "{", "if", "(", "data", ".", "channels", "==", "null", ")", "{", "return", "data", ".", "getName", "(", ")", "+", "\"(\"", "+", "data", ".", "getOwner", "(", ")", "+", "\")\"", ...
Creates a compact string representation for the log. @param data the XmlProperty to log @return string representation for log
[ "Creates", "a", "compact", "string", "representation", "for", "the", "log", "." ]
000fce53ad2b8f8c38ef24fec5b5ec65e383ac9d
https://github.com/ChannelFinder/javaCFClient/blob/000fce53ad2b8f8c38ef24fec5b5ec65e383ac9d/src/main/java/gov/bnl/channelfinder/api/XmlProperty.java#L142-L149
train
To log.
Of course, here is the Java code you requested: ```java public static String toLog(XmlProperty data) { if (data.channels == null) { return data.getName() + "(" + data.getOwner() + ")"; } else { return data.getName() + "(" + data.getOwner() + ")" + (data.chan...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompoundTransliterator.java
CompoundTransliterator.safeClone
public Transliterator safeClone() { UnicodeFilter filter = getFilter(); if (filter != null && filter instanceof UnicodeSet) { filter = new UnicodeSet((UnicodeSet)filter); } return new CompoundTransliterator(getID(), filter, trans, numAnonymousRBTs); }
java
public Transliterator safeClone() { UnicodeFilter filter = getFilter(); if (filter != null && filter instanceof UnicodeSet) { filter = new UnicodeSet((UnicodeSet)filter); } return new CompoundTransliterator(getID(), filter, trans, numAnonymousRBTs); }
[ "public", "Transliterator", "safeClone", "(", ")", "{", "UnicodeFilter", "filter", "=", "getFilter", "(", ")", ";", "if", "(", "filter", "!=", "null", "&&", "filter", "instanceof", "UnicodeSet", ")", "{", "filter", "=", "new", "UnicodeSet", "(", "(", "Unic...
Temporary hack for registry problem. Needs to be replaced by better architecture.
[ "Temporary", "hack", "for", "registry", "problem", ".", "Needs", "to", "be", "replaced", "by", "better", "architecture", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompoundTransliterator.java#L529-L535
train
Returns a copy of this Transliterator.
Of course, here is the Java code you requested: ```java public Transliterator safeClone() { UnicodeFilter filter = getFilter(); if (filter != null && filter instanceof UnicodeSet) { filter = new UnicodeSet((UnicodeSet)filter); } return new CompoundTransliterator(getID(), fil...
tminglei/form-binder-java
src/main/java/com/github/tminglei/bind/Mappings.java
Mappings.floatv
public static Mapping<Float> floatv(Constraint... constraints) { return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? 0.0f : Float.parseFloat(s) ), new MappingMeta(MAPPING_FLOAT, Float.class) ).constrain...
java
public static Mapping<Float> floatv(Constraint... constraints) { return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? 0.0f : Float.parseFloat(s) ), new MappingMeta(MAPPING_FLOAT, Float.class) ).constrain...
[ "public", "static", "Mapping", "<", "Float", ">", "floatv", "(", "Constraint", "...", "constraints", ")", "{", "return", "new", "FieldMapping", "(", "InputMode", ".", "SINGLE", ",", "mkSimpleConverter", "(", "s", "->", "isEmptyStr", "(", "s", ")", "?", "0....
(convert to Float) mapping @param constraints constraints @return new created mapping
[ "(", "convert", "to", "Float", ")", "mapping" ]
4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab
https://github.com/tminglei/form-binder-java/blob/4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab/src/main/java/com/github/tminglei/bind/Mappings.java#L92-L100
train
Creates a mapping from float to float.
Of course, here is the Java code you requested: ```java public static Mapping<Float> floatv(Constraint... constraints) { return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? 0.0f : Float.parseFloat(s) ), new Mappin...
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrResultMerge.java
MtasSolrResultMerge.mergeResponsesSortedSet
private void mergeResponsesSortedSet(SortedSet<Object> originalList, SortedSet<Object> shardList) { for (Object item : shardList) { originalList.add(item); } }
java
private void mergeResponsesSortedSet(SortedSet<Object> originalList, SortedSet<Object> shardList) { for (Object item : shardList) { originalList.add(item); } }
[ "private", "void", "mergeResponsesSortedSet", "(", "SortedSet", "<", "Object", ">", "originalList", ",", "SortedSet", "<", "Object", ">", "shardList", ")", "{", "for", "(", "Object", "item", ":", "shardList", ")", "{", "originalList", ".", "add", "(", "item"...
Merge responses sorted set. @param originalList the original list @param shardList the shard list
[ "Merge", "responses", "sorted", "set", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrResultMerge.java#L239-L243
train
Merge responses sorted set.
Of course, here is the Java code you requested: ```java private void mergeResponsesSortedSet(SortedSet<Object> originalList, SortedSet<Object> shardList) { for (Object item : shardList) { originalList.add(item); } } ``` Hope this helps!
lamydev/Android-Notification
core/src/zemin/notification/NotificationView.java
NotificationView.animateContentViewRotationY
public void animateContentViewRotationY(float degree, float alpha, Animator.AnimatorListener listener, int duration) { if (DBG) Log.v(TAG, "animateContentViewRotationY - " + "degree=" + degree + ", al...
java
public void animateContentViewRotationY(float degree, float alpha, Animator.AnimatorListener listener, int duration) { if (DBG) Log.v(TAG, "animateContentViewRotationY - " + "degree=" + degree + ", al...
[ "public", "void", "animateContentViewRotationY", "(", "float", "degree", ",", "float", "alpha", ",", "Animator", ".", "AnimatorListener", "listener", ",", "int", "duration", ")", "{", "if", "(", "DBG", ")", "Log", ".", "v", "(", "TAG", ",", "\"animateContent...
Rotate the contentView to y degree with animation. @param degree @param alpha @param listener @param duration
[ "Rotate", "the", "contentView", "to", "y", "degree", "with", "animation", "." ]
6d6571d2862cb6edbacf9a78125418f7d621c3f8
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationView.java#L963-L977
train
Method animateContentViewRotationY.
Of course, here is the Java code you requested: ```java public void animateContentViewRotationY(float degree, float alpha, Animator.AnimatorListener listener, int duration) { if (DBG) Log.v(TAG, "animateContentViewRotation...
ixa-ehu/ixa-pipe-pos
src/main/java/eus/ixa/ixa/pipe/pos/Annotate.java
Annotate.getAllTagsLemmasToCoNLL
public final String getAllTagsLemmasToCoNLL(final KAFDocument kaf) { final StringBuilder sb = new StringBuilder(); final List<List<WF>> sentences = kaf.getSentences(); for (final List<WF> wfs : sentences) { final List<ixa.kaflib.Span<WF>> tokenSpans = new ArrayList<ixa.kaflib.Span<WF>>(); final...
java
public final String getAllTagsLemmasToCoNLL(final KAFDocument kaf) { final StringBuilder sb = new StringBuilder(); final List<List<WF>> sentences = kaf.getSentences(); for (final List<WF> wfs : sentences) { final List<ixa.kaflib.Span<WF>> tokenSpans = new ArrayList<ixa.kaflib.Span<WF>>(); final...
[ "public", "final", "String", "getAllTagsLemmasToCoNLL", "(", "final", "KAFDocument", "kaf", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "final", "List", "<", "List", "<", "WF", ">", ">", "sentences", "=", "kaf", "....
Give all lemmas and tags possible for a sentence in conll tabulated format. @param kaf the NAF document @return the output in tabulated format
[ "Give", "all", "lemmas", "and", "tags", "possible", "for", "a", "sentence", "in", "conll", "tabulated", "format", "." ]
083c986103f95ae8063b8ddc89a2caa8047d29b9
https://github.com/ixa-ehu/ixa-pipe-pos/blob/083c986103f95ae8063b8ddc89a2caa8047d29b9/src/main/java/eus/ixa/ixa/pipe/pos/Annotate.java#L365-L392
train
Get all tags lemmas to CoNLL.
Of course, here is the Java code you requested: ```java public final String getAllTagsLemmasToCoNLL(final KAFDocument kaf) { final StringBuilder sb = new StringBuilder(); final List<List<WF>> sentences = kaf.getSentences(); for (final List<WF> wfs : sentences) { final List<ixa.kaflib.Span<WF>> token...
getsentry/sentry-java
sentry-android/src/main/java/io/sentry/android/event/helper/AndroidEventBuilderHelper.java
AndroidEventBuilderHelper.getBatteryLevel
protected static Float getBatteryLevel(Context ctx) { try { Intent intent = ctx.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); if (intent == null) { return null; } int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL...
java
protected static Float getBatteryLevel(Context ctx) { try { Intent intent = ctx.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); if (intent == null) { return null; } int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL...
[ "protected", "static", "Float", "getBatteryLevel", "(", "Context", "ctx", ")", "{", "try", "{", "Intent", "intent", "=", "ctx", ".", "registerReceiver", "(", "null", ",", "new", "IntentFilter", "(", "Intent", ".", "ACTION_BATTERY_CHANGED", ")", ")", ";", "if...
Get the device's current battery level (as a percentage of total). @param ctx Android application context @return the device's current battery level (as a percentage of total), or null if unknown
[ "Get", "the", "device", "s", "current", "battery", "level", "(", "as", "a", "percentage", "of", "total", ")", "." ]
2e01461775cbd5951ff82b566069c349146d8aca
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry-android/src/main/java/io/sentry/android/event/helper/AndroidEventBuilderHelper.java#L282-L305
train
Get the battery level from the device.
Of course, here is the Java code you requested: ```java protected static Float getBatteryLevel(Context ctx) { try { Intent intent = ctx.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); if (intent == null) { return null; } ...
alkacon/opencms-core
src/org/opencms/util/CmsPathTree.java
CmsPathTree.getChildValues
public List<V> getChildValues() { List<V> result = Lists.newArrayList(); for (CmsPathTree<P, V> child : m_children.values()) { if (child.m_value != null) { result.add(child.m_value); } } return result; }
java
public List<V> getChildValues() { List<V> result = Lists.newArrayList(); for (CmsPathTree<P, V> child : m_children.values()) { if (child.m_value != null) { result.add(child.m_value); } } return result; }
[ "public", "List", "<", "V", ">", "getChildValues", "(", ")", "{", "List", "<", "V", ">", "result", "=", "Lists", ".", "newArrayList", "(", ")", ";", "for", "(", "CmsPathTree", "<", "P", ",", "V", ">", "child", ":", "m_children", ".", "values", "(",...
Returns the values for the direct children of this node.<p> @return the values for the direct children
[ "Returns", "the", "values", "for", "the", "direct", "children", "of", "this", "node", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsPathTree.java#L105-L114
train
Returns the list of all child values.
Of course, here is the Java code you requested: ```java public List<V> getChildValues() { List<V> result = Lists.newArrayList(); for (CmsPathTree<P, V> child : m_children.values()) { if (child.m_value != null) { result.add(child.m_value); } } ret...
lightblueseas/xml-extensions
src/main/java/de/alpharogroup/xml/ObjectToXmlExtensions.java
ObjectToXmlExtensions.toXmlWithXStream
public static <T> String toXmlWithXStream(final XStream xstream, final T objectToXML) { return toXmlWithXStream(xstream, objectToXML, null); }
java
public static <T> String toXmlWithXStream(final XStream xstream, final T objectToXML) { return toXmlWithXStream(xstream, objectToXML, null); }
[ "public", "static", "<", "T", ">", "String", "toXmlWithXStream", "(", "final", "XStream", "xstream", ",", "final", "T", "objectToXML", ")", "{", "return", "toXmlWithXStream", "(", "xstream", ",", "objectToXML", ",", "null", ")", ";", "}" ]
Creates from the given Object an xml string. @param <T> the generic type of the object that will be transformed to xml @param xstream the xstream object. @param objectToXML the object to xml @return the xml string
[ "Creates", "from", "the", "given", "Object", "an", "xml", "string", "." ]
4c79d3b2a27349cc7b682d88ce55ac06025e6612
https://github.com/lightblueseas/xml-extensions/blob/4c79d3b2a27349cc7b682d88ce55ac06025e6612/src/main/java/de/alpharogroup/xml/ObjectToXmlExtensions.java#L104-L107
valid
To xml with xstream.
Of course, here is the Java code you requested: ```java public static <T> String toXmlWithXStream(final XStream xstream, final T objectToXML) { return toXmlWithXStream(xstream, objectToXML, null); } ``` Hope this helps!
scala/scala
src/library/scala/runtime/BoxesRunTime.java
BoxesRunTime.unboxToBoolean
public static boolean unboxToBoolean(Object b) { return b == null ? false : ((java.lang.Boolean)b).booleanValue(); }
java
public static boolean unboxToBoolean(Object b) { return b == null ? false : ((java.lang.Boolean)b).booleanValue(); }
[ "public", "static", "boolean", "unboxToBoolean", "(", "Object", "b", ")", "{", "return", "b", "==", "null", "?", "false", ":", "(", "(", "java", ".", "lang", ".", "Boolean", ")", "b", ")", ".", "booleanValue", "(", ")", ";", "}" ]
/* UNBOXING ... UNBOXING ... UNBOXING ... UNBOXING ... UNBOXING ... UNBOXING ... UNBOXING
[ "/", "*", "UNBOXING", "...", "UNBOXING", "...", "UNBOXING", "...", "UNBOXING", "...", "UNBOXING", "...", "UNBOXING", "...", "UNBOXING" ]
bec2441a24cbf3159a1118049b857a5ae7c452eb
https://github.com/scala/scala/blob/bec2441a24cbf3159a1118049b857a5ae7c452eb/src/library/scala/runtime/BoxesRunTime.java#L83-L85
train
Unbox a boolean object to a boolean.
Of course, here is the Java code you requested: ```java public static boolean unboxToBoolean(Object b) { return b == null ? false : ((java.lang.Boolean)b).booleanValue(); } ``` Hope this helps!
google/j2objc
jre_emul/Classes/com/google/j2objc/io/AsyncPipedNSInputStreamAdapter.java
AsyncPipedNSInputStreamAdapter.create
public static Object create(Delegate delegate, int bufferSize) { if (bufferSize < 1) { throw new IllegalArgumentException("Invalid buffer size: " + bufferSize); } if (delegate == null) { throw new IllegalArgumentException("Delegate must not be null"); } return nativeCreate(delegate, bu...
java
public static Object create(Delegate delegate, int bufferSize) { if (bufferSize < 1) { throw new IllegalArgumentException("Invalid buffer size: " + bufferSize); } if (delegate == null) { throw new IllegalArgumentException("Delegate must not be null"); } return nativeCreate(delegate, bu...
[ "public", "static", "Object", "create", "(", "Delegate", "delegate", ",", "int", "bufferSize", ")", "{", "if", "(", "bufferSize", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid buffer size: \"", "+", "bufferSize", ")", ";", "}"...
Creates a native NSInputStream that is piped to a NSOutpuStream, which in turn requests data from the supplied delegate asynchronously. <p>Please note that the returned NSInputStream is not yet open. This is to allow the stream to be used by other Foundation API (such as NSMutableURLRequest) and is consistent with oth...
[ "Creates", "a", "native", "NSInputStream", "that", "is", "piped", "to", "a", "NSOutpuStream", "which", "in", "turn", "requests", "data", "from", "the", "supplied", "delegate", "asynchronously", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/io/AsyncPipedNSInputStreamAdapter.java#L308-L318
train
Create an object of the specified type using the specified delegate and buffer size.
Of course, here is the Java code you requested: ```java public static Object create(Delegate delegate, int bufferSize) { if (bufferSize < 1) { throw new IllegalArgumentException("Invalid buffer size: " + bufferSize); } if (delegate == null) { throw new IllegalArgumentException("Delegate must n...
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/DatasourceJBossASClient.java
DatasourceJBossASClient.isXADatasource
public boolean isXADatasource(String datasourceName) throws Exception { Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES); String haystack = XA_DATA_SOURCE; return null != findNodeInList(addr, haystack, datasourceName); }
java
public boolean isXADatasource(String datasourceName) throws Exception { Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES); String haystack = XA_DATA_SOURCE; return null != findNodeInList(addr, haystack, datasourceName); }
[ "public", "boolean", "isXADatasource", "(", "String", "datasourceName", ")", "throws", "Exception", "{", "Address", "addr", "=", "Address", ".", "root", "(", ")", ".", "add", "(", "SUBSYSTEM", ",", "SUBSYSTEM_DATASOURCES", ")", ";", "String", "haystack", "=", ...
Checks to see if there is already a XA datasource with the given name. @param datasourceName the name to check @return true if there is a XA datasource with the given name already in existence @throws Exception any error
[ "Checks", "to", "see", "if", "there", "is", "already", "a", "XA", "datasource", "with", "the", "given", "name", "." ]
a7a88fc7e4f12302e4c4306d1c91e11f81c8b811
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/DatasourceJBossASClient.java#L175-L179
train
Checks if the XA_DATA_SOURCE is a node in the XA_DATA_SOURCE list.
Of course, here is the Java code you requested: ```java public boolean isXADatasource(String datasourceName) throws Exception { Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES); String haystack = XA_DATA_SOURCE; return null != findNodeInList(addr, haystack, datasourceName); ...
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/system/exec/AbstractProcessTracker.java
AbstractProcessTracker.copy
protected Thread copy(final InputStream in, final Writer out) { Runnable r = () -> { try { StreamUtil.streamCopy(in, out); } catch (IOException e) { try { out.flush(); } catch (Throwable t) { } unexpectedFailure(e); } }; Thread t = new Thread(r); t.setNa...
java
protected Thread copy(final InputStream in, final Writer out) { Runnable r = () -> { try { StreamUtil.streamCopy(in, out); } catch (IOException e) { try { out.flush(); } catch (Throwable t) { } unexpectedFailure(e); } }; Thread t = new Thread(r); t.setNa...
[ "protected", "Thread", "copy", "(", "final", "InputStream", "in", ",", "final", "Writer", "out", ")", "{", "Runnable", "r", "=", "(", ")", "->", "{", "try", "{", "StreamUtil", ".", "streamCopy", "(", "in", ",", "out", ")", ";", "}", "catch", "(", "...
Commence a background copy
[ "Commence", "a", "background", "copy" ]
d4025d2f881bc0542b1e004c5f65a1ccaf895836
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/system/exec/AbstractProcessTracker.java#L253-L280
train
Copy the contents of the given input stream to the given output stream.
Of course, here is the Java code you requested: ```java protected Thread copy(final InputStream in, final Writer out) { Runnable r = () -> { try { StreamUtil.streamCopy(in, out); } catch (IOException e) { try { out.flush(); } catch (Throwable t) { } unexpectedFai...
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/EJBWrapper.java
EJBWrapper.loadContainer
private static void loadContainer(GeneratorAdapter mg, String className, EJBWrapperType wrapperType) { loadWrapperBase(mg, className, wrapperType); mg.visitFieldInsn(GETFIELD, "com/ibm/ejs/container/EJSWrapperBase", "contain...
java
private static void loadContainer(GeneratorAdapter mg, String className, EJBWrapperType wrapperType) { loadWrapperBase(mg, className, wrapperType); mg.visitFieldInsn(GETFIELD, "com/ibm/ejs/container/EJSWrapperBase", "contain...
[ "private", "static", "void", "loadContainer", "(", "GeneratorAdapter", "mg", ",", "String", "className", ",", "EJBWrapperType", "wrapperType", ")", "{", "loadWrapperBase", "(", "mg", ",", "className", ",", "wrapperType", ")", ";", "mg", ".", "visitFieldInsn", "(...
F743-1756
[ "F743", "-", "1756" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/EJBWrapper.java#L2229-L2235
train
loadContainer loads the container.
Of course, here is the Java code you requested: ```java private static void loadContainer(GeneratorAdapter mg, String className, EJBWrapperType wrapperType) { loadWrapperBase(mg, className, wrapperType); mg.visitFieldInsn(G...
ModeShape/modeshape
web/modeshape-webdav/src/main/java/org/modeshape/webdav/methods/AbstractMethod.java
AbstractMethod.getParentPath
protected String getParentPath( String path ) { int slash = path.lastIndexOf('/'); if (slash != -1) { return path.substring(0, slash); } return null; }
java
protected String getParentPath( String path ) { int slash = path.lastIndexOf('/'); if (slash != -1) { return path.substring(0, slash); } return null; }
[ "protected", "String", "getParentPath", "(", "String", "path", ")", "{", "int", "slash", "=", "path", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "slash", "!=", "-", "1", ")", "{", "return", "path", ".", "substring", "(", "0", ",", "sla...
creates the parent path from the given path by removing the last '/' and everything after that @param path the path @return parent path
[ "creates", "the", "parent", "path", "from", "the", "given", "path", "by", "removing", "the", "last", "/", "and", "everything", "after", "that" ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-webdav/src/main/java/org/modeshape/webdav/methods/AbstractMethod.java#L163-L169
train
Get the parent path of the path.
Of course, here is the Java code you requested: ```java protected String getParentPath( String path ) { int slash = path.lastIndexOf('/'); if (slash != -1) { return path.substring(0, slash); } return null; } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java
CPDefinitionVirtualSettingPersistenceImpl.cacheResult
@Override public void cacheResult( CPDefinitionVirtualSetting cpDefinitionVirtualSetting) { entityCache.putResult(CPDefinitionVirtualSettingModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionVirtualSettingImpl.class, cpDefinitionVirtualSetting.getPrimaryKey(), cpDefinitionVirtualSetting); finderCache.putResul...
java
@Override public void cacheResult( CPDefinitionVirtualSetting cpDefinitionVirtualSetting) { entityCache.putResult(CPDefinitionVirtualSettingModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionVirtualSettingImpl.class, cpDefinitionVirtualSetting.getPrimaryKey(), cpDefinitionVirtualSetting); finderCache.putResul...
[ "@", "Override", "public", "void", "cacheResult", "(", "CPDefinitionVirtualSetting", "cpDefinitionVirtualSetting", ")", "{", "entityCache", ".", "putResult", "(", "CPDefinitionVirtualSettingModelImpl", ".", "ENTITY_CACHE_ENABLED", ",", "CPDefinitionVirtualSettingImpl", ".", "...
Caches the cp definition virtual setting in the entity cache if it is enabled. @param cpDefinitionVirtualSetting the cp definition virtual setting
[ "Caches", "the", "cp", "definition", "virtual", "setting", "in", "the", "entity", "cache", "if", "it", "is", "enabled", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-service/src/main/java/com/liferay/commerce/product/type/virtual/service/persistence/impl/CPDefinitionVirtualSettingPersistenceImpl.java#L1757-L1778
train
Caches the commerce definition virtual setting in the entity cache if it is enabled.
Of course, here is the Java code you requested: ```java @Override public void cacheResult( CPDefinitionVirtualSetting cpDefinitionVirtualSetting) { entityCache.putResult(CPDefinitionVirtualSettingModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionVirtualSettingImpl.class, cpDefinitionVirtualSetting.getPrimaryKey()...
bwkimmel/java-util
src/main/java/ca/eandb/util/io/FileUtil.java
FileUtil.writeObjectToFile
public static void writeObjectToFile(File file, Object object) throws IOException { FileOutputStream fs = new FileOutputStream(file); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(object); os.close(); }
java
public static void writeObjectToFile(File file, Object object) throws IOException { FileOutputStream fs = new FileOutputStream(file); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(object); os.close(); }
[ "public", "static", "void", "writeObjectToFile", "(", "File", "file", ",", "Object", "object", ")", "throws", "IOException", "{", "FileOutputStream", "fs", "=", "new", "FileOutputStream", "(", "file", ")", ";", "ObjectOutputStream", "os", "=", "new", "ObjectOutp...
Writes a single object to a file. @param file The <code>File</code> to write to. @param object The <code>Object</code> to write. @throws IOException If the file could not be written.
[ "Writes", "a", "single", "object", "to", "a", "file", "." ]
0c03664d42f0e6b111f64447f222aa73c2819e5c
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/io/FileUtil.java#L161-L166
train
Write object to file.
Of course, here is the Java code you requested: ```java public static void writeObjectToFile(File file, Object object) throws IOException { FileOutputStream fs = new FileOutputStream(file); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(object); os.close(); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-mechanicalturkrequester/src/main/java/com/amazonaws/services/mturk/AmazonMTurkClient.java
AmazonMTurkClient.createWorkerBlock
@Override public CreateWorkerBlockResult createWorkerBlock(CreateWorkerBlockRequest request) { request = beforeClientExecution(request); return executeCreateWorkerBlock(request); }
java
@Override public CreateWorkerBlockResult createWorkerBlock(CreateWorkerBlockRequest request) { request = beforeClientExecution(request); return executeCreateWorkerBlock(request); }
[ "@", "Override", "public", "CreateWorkerBlockResult", "createWorkerBlock", "(", "CreateWorkerBlockRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateWorkerBlock", "(", "request", ")", ";", "}" ]
<p> The <code>CreateWorkerBlock</code> operation allows you to prevent a Worker from working on your HITs. For example, you can block a Worker who is producing poor quality work. You can block up to 100,000 Workers. </p> @param createWorkerBlockRequest @return Result of the CreateWorkerBlock operation returned by the ...
[ "<p", ">", "The", "<code", ">", "CreateWorkerBlock<", "/", "code", ">", "operation", "allows", "you", "to", "prevent", "a", "Worker", "from", "working", "on", "your", "HITs", ".", "For", "example", "you", "can", "block", "a", "Worker", "who", "is", "prod...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mechanicalturkrequester/src/main/java/com/amazonaws/services/mturk/AmazonMTurkClient.java#L717-L721
train
Creates a worker block.
Of course, here is the Java code you requested: ```java @Override public CreateWorkerBlockResult createWorkerBlock(CreateWorkerBlockRequest request) { request = beforeClientExecution(request); return executeCreateWorkerBlock(request); } ``` Hope this helps!
lightblue-platform/lightblue-client
core/src/main/java/com/redhat/lightblue/client/request/DataBulkRequest.java
DataBulkRequest.insertBefore
public DataBulkRequest insertBefore(CRUDRequest request, CRUDRequest before) { this.requests.add(requests.indexOf(before), request); return this; }
java
public DataBulkRequest insertBefore(CRUDRequest request, CRUDRequest before) { this.requests.add(requests.indexOf(before), request); return this; }
[ "public", "DataBulkRequest", "insertBefore", "(", "CRUDRequest", "request", ",", "CRUDRequest", "before", ")", "{", "this", ".", "requests", ".", "add", "(", "requests", ".", "indexOf", "(", "before", ")", ",", "request", ")", ";", "return", "this", ";", "...
Inserts a request before another specified request. This guarantees that the first request parameter will be executed, sequentially, before the second request parameter. It does not guarantee consecutive execution. @param request @param before @return
[ "Inserts", "a", "request", "before", "another", "specified", "request", ".", "This", "guarantees", "that", "the", "first", "request", "parameter", "will", "be", "executed", "sequentially", "before", "the", "second", "request", "parameter", ".", "It", "does", "no...
03790aff34e90d3889f60fd6c603c21a21dc1a40
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/core/src/main/java/com/redhat/lightblue/client/request/DataBulkRequest.java#L85-L88
train
Insert a CRUDRequest before another one.
Of course, here is the Java code you requested: ```java public DataBulkRequest insertBefore(CRUDRequest request, CRUDRequest before) { this.requests.add(requests.indexOf(before), request); return this; } ``` Hope this helps!
boonproject/boon
slumberdb/slumberdb-leveldb/src/main/java/org/boon/slumberdb/leveldb/LevelDBKeyValueStore.java
LevelDBKeyValueStore.loadAllByKeys
@Override public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) { if (keys == null || keys.size() == 0) { return Collections.EMPTY_MAP; } Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size()); DBIterator iterator = null; try { ...
java
@Override public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) { if (keys == null || keys.size() == 0) { return Collections.EMPTY_MAP; } Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size()); DBIterator iterator = null; try { ...
[ "@", "Override", "public", "Map", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "loadAllByKeys", "(", "Collection", "<", "byte", "[", "]", ">", "keys", ")", "{", "if", "(", "keys", "==", "null", "||", "keys", ".", "size", "(", ")", "==", "...
Keys are expected to be sorted @param keys @return
[ "Keys", "are", "expected", "to", "be", "sorted" ]
9bc6870dbe5dd58c45c18d8edb493e8efc089463
https://github.com/boonproject/boon/blob/9bc6870dbe5dd58c45c18d8edb493e8efc089463/slumberdb/slumberdb-leveldb/src/main/java/org/boon/slumberdb/leveldb/LevelDBKeyValueStore.java#L376-L407
test
Load all by keys.
Of course, here is the Java code you requested: ```java @Override public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) { if (keys == null || keys.size() == 0) { return Collections.EMPTY_MAP; } Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size()); ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/ShortIdAllocator.java
ShortIdAllocator.allocate
private void allocate(short id) throws IdAllocatorException { if (tc.isEntryEnabled()) SibTr.entry(tc, "allocate", ""+id); // Find the position in the allocation map byte array and set its bit on int bitToSet = (id % 8) + 1; int allocMapPos = (int) Math.floor((float) (id) / (float) 8);...
java
private void allocate(short id) throws IdAllocatorException { if (tc.isEntryEnabled()) SibTr.entry(tc, "allocate", ""+id); // Find the position in the allocation map byte array and set its bit on int bitToSet = (id % 8) + 1; int allocMapPos = (int) Math.floor((float) (id) / (float) 8);...
[ "private", "void", "allocate", "(", "short", "id", ")", "throws", "IdAllocatorException", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"allocate\"", ",", "\"\"", "+", "id", ")", ";", "// Find the po...
Private method to save away in the byte array that we have allocated the id. <p> The byte array is managed in such away that bits representing 0-7 are in array position 0, 8-15 are in position 1 etc. Therefore, this method will do the maths and then modify the array element by setting the appropriate bit on. <p> The bi...
[ "Private", "method", "to", "save", "away", "in", "the", "byte", "array", "that", "we", "have", "allocated", "the", "id", ".", "<p", ">", "The", "byte", "array", "is", "managed", "in", "such", "away", "that", "bits", "representing", "0", "-", "7", "are"...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/ShortIdAllocator.java#L290-L345
train
Allocate a single ID from the allocation map.
Of course, here is the Java code you requested: ```java private void allocate(short id) throws IdAllocatorException { if (tc.isEntryEnabled()) SibTr.entry(tc, "allocate", ""+id); // Find the position in the allocation map byte array and set its bit on int bitToSet = (id % 8) + 1; int ...
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/util/ResourceManager.java
ResourceManager.get
public static ResourceManager get(Class<?> clazz) { String bundleName = clazz.getName() + "RB"; return get(bundleName); }
java
public static ResourceManager get(Class<?> clazz) { String bundleName = clazz.getName() + "RB"; return get(bundleName); }
[ "public", "static", "ResourceManager", "get", "(", "Class", "<", "?", ">", "clazz", ")", "{", "String", "bundleName", "=", "clazz", ".", "getName", "(", ")", "+", "\"RB\"", ";", "return", "get", "(", "bundleName", ")", ";", "}" ]
Gets the ResourceManager associated with <code>clazz</code>. It looks for a ResourceBundle named against the class name plus the string "RB". For example, for the com.mypackage.Main, the ResourceBundle com.mypackage.MainRB will be looked up. @param clazz @return the ResourceManager associated with the class
[ "Gets", "the", "ResourceManager", "associated", "with", "<code", ">", "clazz<", "/", "code", ">", ".", "It", "looks", "for", "a", "ResourceBundle", "named", "against", "the", "class", "name", "plus", "the", "string", "RB", ".", "For", "example", "for", "th...
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/util/ResourceManager.java#L50-L53
train
Get the ResourceManager for the given class.
Of course, here is the Java code you requested: ```java public static ResourceManager get(Class<?> clazz) { String bundleName = clazz.getName() + "RB"; return get(bundleName); } ``` Hope this helps!
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java
AbstractAzkabanServlet.newPage
protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final String template) { final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template); page.add("version", jarVersion); page.add("azkaban_name", this.name); page.add...
java
protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final String template) { final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template); page.add("version", jarVersion); page.add("azkaban_name", this.name); page.add...
[ "protected", "Page", "newPage", "(", "final", "HttpServletRequest", "req", ",", "final", "HttpServletResponse", "resp", ",", "final", "Session", "session", ",", "final", "String", "template", ")", "{", "final", "Page", "page", "=", "new", "Page", "(", "req", ...
Creates a new velocity page to use. With session.
[ "Creates", "a", "new", "velocity", "page", "to", "use", ".", "With", "session", "." ]
d258ea7d6e66807c6eff79c5325d6d3443618dff
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java#L282-L329
train
Create a new page.
Of course, here is the Java code you requested: ```java protected Page newPage(final HttpServletRequest req, final HttpServletResponse resp, final Session session, final String template) { final Page page = new Page(req, resp, getApplication().getVelocityEngine(), template); page.add("version", jarVersio...
square/okhttp
okhttp/src/main/java/okhttp3/internal/cache2/Relay.java
Relay.edit
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize); // Write a dirty header. That wa...
java
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize); // Write a dirty header. That wa...
[ "public", "static", "Relay", "edit", "(", "File", "file", ",", "Source", "upstream", ",", "ByteString", "metadata", ",", "long", "bufferMaxSize", ")", "throws", "IOException", "{", "RandomAccessFile", "randomAccessFile", "=", "new", "RandomAccessFile", "(", "file"...
Creates a new relay that reads a live stream from {@code upstream}, using {@code file} to share that data with other sources. <p><strong>Warning:</strong> callers to this method must immediately call {@link #newSource} to create a source and close that when they're done. Otherwise a handle to {@code file} will be leak...
[ "Creates", "a", "new", "relay", "that", "reads", "a", "live", "stream", "from", "{", "@code", "upstream", "}", "using", "{", "@code", "file", "}", "to", "share", "that", "data", "with", "other", "sources", "." ]
a8c65a822dd6cadd2de7d115bf94adf312e67868
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/cache2/Relay.java#L124-L134
train
Edit a single block of bytes from the upstream source to the file.
Of course, here is the Java code you requested: ```java public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metada...
dmurph/jgoogleanalyticstracker
src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java
JGoogleAnalyticsTracker.startBackgroundThread
private synchronized static void startBackgroundThread() { if (backgroundThread == null) { backgroundThreadMayRun = true; backgroundThread = new Thread(asyncThreadGroup, "AnalyticsBackgroundThread") { public void run() { logger.debug("AnalyticsBackgrou...
java
private synchronized static void startBackgroundThread() { if (backgroundThread == null) { backgroundThreadMayRun = true; backgroundThread = new Thread(asyncThreadGroup, "AnalyticsBackgroundThread") { public void run() { logger.debug("AnalyticsBackgrou...
[ "private", "synchronized", "static", "void", "startBackgroundThread", "(", ")", "{", "if", "(", "backgroundThread", "==", "null", ")", "{", "backgroundThreadMayRun", "=", "true", ";", "backgroundThread", "=", "new", "Thread", "(", "asyncThreadGroup", ",", "\"Analy...
If the background thread for 'queued' mode is not running, start it now.
[ "If", "the", "background", "thread", "for", "queued", "mode", "is", "not", "running", "start", "it", "now", "." ]
69f68caf8e09a53e6f6076477bf05b84bc80e386
https://github.com/dmurph/jgoogleanalyticstracker/blob/69f68caf8e09a53e6f6076477bf05b84bc80e386/src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java#L489-L533
train
Start the background thread.
Of course, here is the Java code you requested: ```java private synchronized static void startBackgroundThread() { if (backgroundThread == null) { backgroundThreadMayRun = true; backgroundThread = new Thread(asyncThreadGroup, "AnalyticsBackgroundThread") { public void ru...
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_BACKGROUND_Image
protected BufferedImage create_BACKGROUND_Image(final int WIDTH, final String TITLE, final String UNIT_STRING) { return create_BACKGROUND_Image(WIDTH, TITLE, UNIT_STRING, null); }
java
protected BufferedImage create_BACKGROUND_Image(final int WIDTH, final String TITLE, final String UNIT_STRING) { return create_BACKGROUND_Image(WIDTH, TITLE, UNIT_STRING, null); }
[ "protected", "BufferedImage", "create_BACKGROUND_Image", "(", "final", "int", "WIDTH", ",", "final", "String", "TITLE", ",", "final", "String", "UNIT_STRING", ")", "{", "return", "create_BACKGROUND_Image", "(", "WIDTH", ",", "TITLE", ",", "UNIT_STRING", ",", "null...
Returns the background image with the currently active backgroundcolor with the given width, title and unitstring. @param WIDTH @param TITLE @param UNIT_STRING @return buffered image containing the background with the selected background design
[ "Returns", "the", "background", "image", "with", "the", "currently", "active", "backgroundcolor", "with", "the", "given", "width", "title", "and", "unitstring", "." ]
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1292-L1294
train
Create a background image.
Of course, here is the Java code you requested: ```java protected BufferedImage create_BACKGROUND_Image(final int WIDTH, final String TITLE, final String UNIT_STRING) { return create_BACKGROUND_Image(WIDTH, TITLE, UNIT_STRING, null); } ``` Hope this helps!
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/Exceptions.java
Exceptions.peel
public static Throwable peel(Throwable throwable) { requireNonNull(throwable, "throwable"); Throwable cause = throwable.getCause(); while (cause != null && cause != throwable && (throwable instanceof CompletionException || throwable instanceof ExecutionException || ...
java
public static Throwable peel(Throwable throwable) { requireNonNull(throwable, "throwable"); Throwable cause = throwable.getCause(); while (cause != null && cause != throwable && (throwable instanceof CompletionException || throwable instanceof ExecutionException || ...
[ "public", "static", "Throwable", "peel", "(", "Throwable", "throwable", ")", "{", "requireNonNull", "(", "throwable", ",", "\"throwable\"", ")", ";", "Throwable", "cause", "=", "throwable", ".", "getCause", "(", ")", ";", "while", "(", "cause", "!=", "null",...
Returns the cause of the specified {@code throwable} peeling it recursively, if it is one of the {@link CompletionException}, {@link ExecutionException}, {@link InvocationTargetException} or {@link ExceptionInInitializerError}. Otherwise returns the {@code throwable}.
[ "Returns", "the", "cause", "of", "the", "specified", "{" ]
67d29e019fd35a35f89c45cc8f9119ff9b12b44d
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/Exceptions.java#L226-L237
train
Get the first exception that is not a CompletionException ExecutionException or ExceptionInInitializerError.
Of course, here is the Java code you requested: ```java public static Throwable peel(Throwable throwable) { requireNonNull(throwable, "throwable"); Throwable cause = throwable.getCause(); while (cause != null && cause != throwable && (throwable instanceof CompletionException || t...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
MetadataOperation.convertPattern
private String convertPattern(final String pattern, boolean datanucleusFormat) { String wStr; if (datanucleusFormat) { wStr = "*"; } else { wStr = ".*"; } return pattern .replaceAll("([^\\\\])%", "$1" + wStr).replaceAll("\\\\%", "%").replaceAll("^%", wStr) .replaceAll("([...
java
private String convertPattern(final String pattern, boolean datanucleusFormat) { String wStr; if (datanucleusFormat) { wStr = "*"; } else { wStr = ".*"; } return pattern .replaceAll("([^\\\\])%", "$1" + wStr).replaceAll("\\\\%", "%").replaceAll("^%", wStr) .replaceAll("([...
[ "private", "String", "convertPattern", "(", "final", "String", "pattern", ",", "boolean", "datanucleusFormat", ")", "{", "String", "wStr", ";", "if", "(", "datanucleusFormat", ")", "{", "wStr", "=", "\"*\"", ";", "}", "else", "{", "wStr", "=", "\".*\"", ";...
Convert a pattern containing JDBC catalog search wildcards into Java regex patterns. @param pattern input which may contain '%' or '_' wildcard characters, or these characters escaped using {@link #getSearchStringEscape()}. @return replace %/_ with regex search characters, also handle escaped characters. The datanucl...
[ "Convert", "a", "pattern", "containing", "JDBC", "catalog", "search", "wildcards", "into", "Java", "regex", "patterns", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java#L97-L107
train
Convert a pattern to a CIS pattern.
Of course, here is the Java code you requested: ```java private String convertPattern(final String pattern, boolean datanucleusFormat) { String wStr; if (datanucleusFormat) { wStr = "*"; } else { wStr = ".*"; } return pattern .replaceAll("([^\\\\])%", "$1" + wStr).replaceAll("\\...
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java
GPXPoint.setAttribute
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { setMagvar(contentBuffer); } else if (currentElem...
java
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { setMagvar(contentBuffer); } else if (currentElem...
[ "public", "final", "void", "setAttribute", "(", "String", "currentElement", ",", "StringBuilder", "contentBuffer", ")", "{", "if", "(", "currentElement", ".", "equalsIgnoreCase", "(", "GPXTags", ".", "TIME", ")", ")", "{", "setTime", "(", "contentBuffer", ")", ...
Set an attribute for a point. The String currentElement gives the information of which attribute have to be setted. The attribute to set is given by the StringBuilder contentBuffer. @param currentElement a string presenting the text of the current markup. @param contentBuffer it contains all informations about the cur...
[ "Set", "an", "attribute", "for", "a", "point", ".", "The", "String", "currentElement", "gives", "the", "information", "of", "which", "attribute", "have", "to", "be", "setted", ".", "The", "attribute", "to", "set", "is", "given", "by", "the", "StringBuilder",...
9cd70b447e6469cecbc2fc64b16774b59491df3b
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXPoint.java#L61-L97
train
Method setAttribute.
Of course, here is the Java code you requested: ```java public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { ...
box/box-java-sdk
src/main/java/com/box/sdk/InMemoryLRUAccessTokenCache.java
InMemoryLRUAccessTokenCache.put
public void put(String key, String value) { synchronized (this.cache) { this.cache.put(key, value); } }
java
public void put(String key, String value) { synchronized (this.cache) { this.cache.put(key, value); } }
[ "public", "void", "put", "(", "String", "key", ",", "String", "value", ")", "{", "synchronized", "(", "this", ".", "cache", ")", "{", "this", ".", "cache", ".", "put", "(", "key", ",", "value", ")", ";", "}", "}" ]
Add an entry to the cache. @param key key to use. @param value access token information to store.
[ "Add", "an", "entry", "to", "the", "cache", "." ]
35b4ba69417f9d6a002c19dfaab57527750ef349
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/InMemoryLRUAccessTokenCache.java#L33-L37
train
Put a value into the cache.
Of course, here is the Java code you requested: ```java public void put(String key, String value) { synchronized (this.cache) { this.cache.put(key, value); } } ``` Hope this helps!
inferred/FreeBuilder
generated/main/java/org/inferred/freebuilder/processor/Datatype_Builder.java
Datatype_Builder.clear
public Datatype.Builder clear() { Datatype_Builder defaults = new Datatype.Builder(); type = defaults.type; interfaceType = defaults.interfaceType; builder = defaults.builder; extensible = defaults.extensible; builderFactory = defaults.builderFactory; generatedBuilder = defaults.generatedBui...
java
public Datatype.Builder clear() { Datatype_Builder defaults = new Datatype.Builder(); type = defaults.type; interfaceType = defaults.interfaceType; builder = defaults.builder; extensible = defaults.extensible; builderFactory = defaults.builderFactory; generatedBuilder = defaults.generatedBui...
[ "public", "Datatype", ".", "Builder", "clear", "(", ")", "{", "Datatype_Builder", "defaults", "=", "new", "Datatype", ".", "Builder", "(", ")", ";", "type", "=", "defaults", ".", "type", ";", "interfaceType", "=", "defaults", ".", "interfaceType", ";", "bu...
Resets the state of this builder. @return this {@code Builder} object
[ "Resets", "the", "state", "of", "this", "builder", "." ]
d5a222f90648aece135da4b971c55a60afe8649c
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/generated/main/java/org/inferred/freebuilder/processor/Datatype_Builder.java#L1198-L1220
train
Clear the contents of this Datatype.
Of course, here is the Java code you requested: ```java public Datatype.Builder clear() { Datatype_Builder defaults = new Datatype.Builder(); type = defaults.type; interfaceType = defaults.interfaceType; builder = defaults.builder; extensible = defaults.extensible; builderFactory = defaults.bui...
jmxtrans/jmxtrans
jmxtrans-core/src/main/java/com/googlecode/jmxtrans/model/Server.java
Server.getServerConnection
@Override @JsonIgnore public JMXConnector getServerConnection() throws IOException { JMXServiceURL url = getJmxServiceURL(); return JMXConnectorFactory.connect(url, this.getEnvironment()); }
java
@Override @JsonIgnore public JMXConnector getServerConnection() throws IOException { JMXServiceURL url = getJmxServiceURL(); return JMXConnectorFactory.connect(url, this.getEnvironment()); }
[ "@", "Override", "@", "JsonIgnore", "public", "JMXConnector", "getServerConnection", "(", ")", "throws", "IOException", "{", "JMXServiceURL", "url", "=", "getJmxServiceURL", "(", ")", ";", "return", "JMXConnectorFactory", ".", "connect", "(", "url", ",", "this", ...
Helper method for connecting to a Server. You need to close the resulting connection.
[ "Helper", "method", "for", "connecting", "to", "a", "Server", ".", "You", "need", "to", "close", "the", "resulting", "connection", "." ]
496f342de3bcf2c2226626374b7a16edf8f4ba2a
https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-core/src/main/java/com/googlecode/jmxtrans/model/Server.java#L343-L348
train
Get a connection to the server.
Of course, here is the Java code you requested: ```java @Override @JsonIgnore public JMXConnector getServerConnection() throws IOException { JMXServiceURL url = getJmxServiceURL(); return JMXConnectorFactory.connect(url, this.getEnvironment()); } ``` Hope this helps!
eclipse/xtext-core
org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/CrossReferenceImpl.java
CrossReferenceImpl.eInverseRemove
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XtextPackage.CROSS_REFERENCE__TYPE: return basicSetType(null, msgs); case XtextPackage.CROSS_REFERENCE__TERMINAL: return basicSetTerminal(null, msgs); } ret...
java
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XtextPackage.CROSS_REFERENCE__TYPE: return basicSetType(null, msgs); case XtextPackage.CROSS_REFERENCE__TERMINAL: return basicSetTerminal(null, msgs); } ret...
[ "@", "Override", "public", "NotificationChain", "eInverseRemove", "(", "InternalEObject", "otherEnd", ",", "int", "featureID", ",", "NotificationChain", "msgs", ")", "{", "switch", "(", "featureID", ")", "{", "case", "XtextPackage", ".", "CROSS_REFERENCE__TYPE", ":"...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
bac941cb75cb24706519845ec174cfef874d7557
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/emf-gen/org/eclipse/xtext/impl/CrossReferenceImpl.java#L163-L172
train
Remove the inverse of the given feature.
Of course, here is the Java code you requested: ```java @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XtextPackage.CROSS_REFERENCE__TYPE: return basicSetType(null, msgs); case XtextPackage.CROSS_REFERENCE__TER...
TooTallNate/Java-WebSocket
src/main/java/org/java_websocket/drafts/Draft_6455.java
Draft_6455.translateSingleFrameCheckLengthLimit
private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException { if( length > Integer.MAX_VALUE ) { log.trace("Limit exedeed: Payloadsize is to big..."); throw new LimitExceededException("Payloadsize is to big..."); } if( length > maxFrameSize) { log.trace( "Payload limit re...
java
private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException { if( length > Integer.MAX_VALUE ) { log.trace("Limit exedeed: Payloadsize is to big..."); throw new LimitExceededException("Payloadsize is to big..."); } if( length > maxFrameSize) { log.trace( "Payload limit re...
[ "private", "void", "translateSingleFrameCheckLengthLimit", "(", "long", "length", ")", "throws", "LimitExceededException", "{", "if", "(", "length", ">", "Integer", ".", "MAX_VALUE", ")", "{", "log", ".", "trace", "(", "\"Limit exedeed: Payloadsize is to big...\"", ")...
Check if the frame size exceeds the allowed limit @param length the current payload length @throws LimitExceededException if the payload length is to big
[ "Check", "if", "the", "frame", "size", "exceeds", "the", "allowed", "limit" ]
73c6805ca2c7801b2828ffd3ec12e5cb0daefcf9
https://github.com/TooTallNate/Java-WebSocket/blob/73c6805ca2c7801b2828ffd3ec12e5cb0daefcf9/src/main/java/org/java_websocket/drafts/Draft_6455.java#L560-L573
test
Translate single frame check length limit.
Of course, here is the Java code you requested: ```java private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException { if( length > Integer.MAX_VALUE ) { log.trace("Limit exedeed: Payloadsize is to big..."); throw new LimitExceededException("Payloadsize is to big..."); } if(...
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheListUtil.java
CacheListUtil.getRange
@SuppressWarnings("all") public static Single<List<String>> getRange(CacheConfigBean cacheConfigBean, String cacheKey, int startIndex, int endIndex) { return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListRange", new JSONObject() {{ put("cacheConfig", cacheConfigBean); put("...
java
@SuppressWarnings("all") public static Single<List<String>> getRange(CacheConfigBean cacheConfigBean, String cacheKey, int startIndex, int endIndex) { return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListRange", new JSONObject() {{ put("cacheConfig", cacheConfigBean); put("...
[ "@", "SuppressWarnings", "(", "\"all\"", ")", "public", "static", "Single", "<", "List", "<", "String", ">", ">", "getRange", "(", "CacheConfigBean", "cacheConfigBean", ",", "String", "cacheKey", ",", "int", "startIndex", ",", "int", "endIndex", ")", "{", "r...
指定获取范围 (返回的类型是raw string,所以不推荐使用)
[ "指定获取范围", "(", "返回的类型是raw", "string,所以不推荐使用", ")" ]
1948e088545553d2745b2c86d8b5a64988bb850e
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheListUtil.java#L310-L323
train
Get range of a single page of text from cache.
Of course, here is the Java code you requested: ```java @SuppressWarnings("all") public static Single<List<String>> getRange(CacheConfigBean cacheConfigBean, String cacheKey, int startIndex, int endIndex) { return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListRange", new JSONObject() {{ ...
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java
IOUtils.copy
public static void copy( InputStream inputStream, OutputStream outputStream, boolean closeInputStream) throws IOException { try { ByteStreams.copy(inputStream, outputStream); } finally { if (closeInputStream) { inputStream.close(); } } }
java
public static void copy( InputStream inputStream, OutputStream outputStream, boolean closeInputStream) throws IOException { try { ByteStreams.copy(inputStream, outputStream); } finally { if (closeInputStream) { inputStream.close(); } } }
[ "public", "static", "void", "copy", "(", "InputStream", "inputStream", ",", "OutputStream", "outputStream", ",", "boolean", "closeInputStream", ")", "throws", "IOException", "{", "try", "{", "ByteStreams", ".", "copy", "(", "inputStream", ",", "outputStream", ")",...
Writes the content provided by the given source input stream into the given destination output stream, optionally closing the input stream. <p>Sample use: <pre> static void copy(InputStream inputStream, File file) throws IOException { FileOutputStream out = new FileOutputStream(file); try { IOUtils.copy(inputStream, ...
[ "Writes", "the", "content", "provided", "by", "the", "given", "source", "input", "stream", "into", "the", "given", "destination", "output", "stream", "optionally", "closing", "the", "input", "stream", "." ]
0988ae4e0f26a80f579b6adb2b276dd8254928de
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L83-L93
train
Copy a single XML document from an input stream to an output stream.
Of course, here is the Java code you requested: ```java public static void copy( InputStream inputStream, OutputStream outputStream, boolean closeInputStream) throws IOException { try { ByteStreams.copy(inputStream, outputStream); } finally { if (closeInputStream) { inputStream....
aws/aws-sdk-java
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/AmazonIdentityManagementClient.java
AmazonIdentityManagementClient.uploadServerCertificate
@Override public UploadServerCertificateResult uploadServerCertificate(UploadServerCertificateRequest request) { request = beforeClientExecution(request); return executeUploadServerCertificate(request); }
java
@Override public UploadServerCertificateResult uploadServerCertificate(UploadServerCertificateRequest request) { request = beforeClientExecution(request); return executeUploadServerCertificate(request); }
[ "@", "Override", "public", "UploadServerCertificateResult", "uploadServerCertificate", "(", "UploadServerCertificateRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeUploadServerCertificate", "(", "request", ...
<p> Uploads a server certificate entity for the AWS account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded. </p> <p> We recommend that you use <a href="https://docs.aws.amazon.com/acm/">AWS Certificate Manager</a> to pr...
[ "<p", ">", "Uploads", "a", "server", "certificate", "entity", "for", "the", "AWS", "account", ".", "The", "server", "certificate", "entity", "includes", "a", "public", "key", "certificate", "a", "private", "key", "and", "an", "optional", "certificate", "chain"...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/AmazonIdentityManagementClient.java#L10169-L10173
train
Uploads a server certificate.
Of course, here is the Java code you requested: ```java @Override public UploadServerCertificateResult uploadServerCertificate(UploadServerCertificateRequest request) { request = beforeClientExecution(request); return executeUploadServerCertificate(request); } ``` Hope this helps!
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/ScanningQueryEngine.java
ScanningQueryEngine.createSortingExtractor
protected ExtractFromRow createSortingExtractor( List<Ordering> orderings, Map<SelectorName, SelectorName> sourceNamesByAlias, QueryContext context, Columns colu...
java
protected ExtractFromRow createSortingExtractor( List<Ordering> orderings, Map<SelectorName, SelectorName> sourceNamesByAlias, QueryContext context, Columns colu...
[ "protected", "ExtractFromRow", "createSortingExtractor", "(", "List", "<", "Ordering", ">", "orderings", ",", "Map", "<", "SelectorName", ",", "SelectorName", ">", "sourceNamesByAlias", ",", "QueryContext", "context", ",", "Columns", "columns", ",", "QuerySources", ...
Create an {@link ExtractFromRow} instance that produces for given row a single object that can be used to sort all rows in the specified order. @param orderings the specification of the sort order; may not be null or empty @param sourceNamesByAlias the map of selector names keyed by their aliases; may not be null but ...
[ "Create", "an", "{", "@link", "ExtractFromRow", "}", "instance", "that", "produces", "for", "given", "row", "a", "single", "object", "that", "can", "be", "used", "to", "sort", "all", "rows", "in", "the", "specified", "order", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/ScanningQueryEngine.java#L1036-L1067
train
Create a sorting extractor from the row.
Of course, here is the Java code you requested: ```java protected ExtractFromRow createSortingExtractor( List<Ordering> orderings, Map<SelectorName, SelectorName> sourceNamesByAlias, QueryContext context, ...
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetsInner.java
SubnetsInner.createOrUpdateAsync
public ServiceFuture<SubnetInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters, final ServiceCallback<SubnetInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNet...
java
public ServiceFuture<SubnetInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters, final ServiceCallback<SubnetInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNet...
[ "public", "ServiceFuture", "<", "SubnetInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "String", "subnetName", ",", "SubnetInner", "subnetParameters", ",", "final", "ServiceCallback", "<", "SubnetInner", ...
Creates or updates a subnet in the specified virtual network. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param subnetName The name of the subnet. @param subnetParameters Parameters supplied to the create or update subnet operation. @param servic...
[ "Creates", "or", "updates", "a", "subnet", "in", "the", "specified", "virtual", "network", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetsInner.java#L466-L468
train
Creates or updates a network subnet.
Of course, here is the Java code you requested: ```java public ServiceFuture<SubnetInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters, final ServiceCallback<SubnetInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpd...
Unidata/thredds
legacy/src/main/java/ucar/nc2/dt/point/CFPointObWriter.java
CFPointObWriter.writePointFeatureCollection
public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException { // extract the PointFeatureCollection PointFeatureCollection pointFeatureCollection = null; List<DsgFeatureCollection> featureCollectionList = pfDataset.getPointFeatureCollectionList(); for ...
java
public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException { // extract the PointFeatureCollection PointFeatureCollection pointFeatureCollection = null; List<DsgFeatureCollection> featureCollectionList = pfDataset.getPointFeatureCollectionList(); for ...
[ "public", "static", "int", "writePointFeatureCollection", "(", "FeatureDatasetPoint", "pfDataset", ",", "String", "fileOut", ")", "throws", "IOException", "{", "// extract the PointFeatureCollection", "PointFeatureCollection", "pointFeatureCollection", "=", "null", ";", "List...
Write a ucar.nc2.ft.PointFeatureCollection in CF point format. @param pfDataset find the first PointFeatureCollection, and write all data from it @param fileOut write to this netcdf-3 file @return number of records written @throws IOException on read/write error, or if no PointFeatureCollection in pfDataset
[ "Write", "a", "ucar", ".", "nc2", ".", "ft", ".", "PointFeatureCollection", "in", "CF", "point", "format", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/dt/point/CFPointObWriter.java#L304-L354
test
Write a feature dataset point to a file
Of course, here is the Java code you requested: ```java public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException { // extract the PointFeatureCollection PointFeatureCollection pointFeatureCollection = null; List<DsgFeatureCollection> featureCollectionL...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java
NettyProtocol.getServerChannelHandlers
public ChannelHandler[] getServerChannelHandlers() { PartitionRequestQueue queueOfPartitionQueues = new PartitionRequestQueue(); PartitionRequestServerHandler serverHandler = new PartitionRequestServerHandler( partitionProvider, taskEventPublisher, queueOfPartitionQueues, creditBasedEnabled); return new Chann...
java
public ChannelHandler[] getServerChannelHandlers() { PartitionRequestQueue queueOfPartitionQueues = new PartitionRequestQueue(); PartitionRequestServerHandler serverHandler = new PartitionRequestServerHandler( partitionProvider, taskEventPublisher, queueOfPartitionQueues, creditBasedEnabled); return new Chann...
[ "public", "ChannelHandler", "[", "]", "getServerChannelHandlers", "(", ")", "{", "PartitionRequestQueue", "queueOfPartitionQueues", "=", "new", "PartitionRequestQueue", "(", ")", ";", "PartitionRequestServerHandler", "serverHandler", "=", "new", "PartitionRequestServerHandler...
Returns the server channel handlers. <pre> +-------------------------------------------------------------------+ | SERVER CHANNEL PIPELINE | | | | +----------+----------+ (3) write +----------------------+ ...
[ "Returns", "the", "server", "channel", "handlers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyProtocol.java#L79-L90
train
Returns an array of channel handlers for the server.
Of course, here is the Java code you requested: ```java public ChannelHandler[] getServerChannelHandlers() { PartitionRequestQueue queueOfPartitionQueues = new PartitionRequestQueue(); PartitionRequestServerHandler serverHandler = new PartitionRequestServerHandler( partitionProvider, taskEventPublisher, queueOf...
haifengl/smile
interpolation/src/main/java/smile/interpolation/LaplaceInterpolation.java
LaplaceInterpolation.interpolate
public static double interpolate(double[][] matrix, double tol, int maxIter) { int nrows = matrix.length; int ncols = matrix[0].length; int n = nrows * ncols; double[] b = new double[n]; double[] y = new double[n]; boolean[] mask = new boolean[n]; double vl = 0....
java
public static double interpolate(double[][] matrix, double tol, int maxIter) { int nrows = matrix.length; int ncols = matrix[0].length; int n = nrows * ncols; double[] b = new double[n]; double[] y = new double[n]; boolean[] mask = new boolean[n]; double vl = 0....
[ "public", "static", "double", "interpolate", "(", "double", "[", "]", "[", "]", "matrix", ",", "double", "tol", ",", "int", "maxIter", ")", "{", "int", "nrows", "=", "matrix", ".", "length", ";", "int", "ncols", "=", "matrix", "[", "0", "]", ".", "...
Laplace interpolation. @param matrix on input, values of NaN are deemed to be missing data. On output, they are refilled with the interpolated solution. @param tol the desired convergence tolerance. @param maxIter the maximum number of allowed iterations. @return the estimated error.
[ "Laplace", "interpolation", "." ]
e27e43e90fbaacce3f99d30120cf9dd6a764c33d
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/interpolation/src/main/java/smile/interpolation/LaplaceInterpolation.java#L59-L91
train
Interpolate a matrix using the Solve algorithm.
Of course, here is the Java code you requested: ```java public static double interpolate(double[][] matrix, double tol, int maxIter) { int nrows = matrix.length; int ncols = matrix[0].length; int n = nrows * ncols; double[] b = new double[n]; double[] y = new double[n]; ...
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
AbstractIoSession.isIdle
public final boolean isIdle(IdleStatus status) { if (status == IdleStatus.BOTH_IDLE) { return idleCountForBoth.get() > 0; } if (status == IdleStatus.READER_IDLE) { return idleCountForRead.get() > 0; } if (status == IdleStatus.WRITER_IDLE) { r...
java
public final boolean isIdle(IdleStatus status) { if (status == IdleStatus.BOTH_IDLE) { return idleCountForBoth.get() > 0; } if (status == IdleStatus.READER_IDLE) { return idleCountForRead.get() > 0; } if (status == IdleStatus.WRITER_IDLE) { r...
[ "public", "final", "boolean", "isIdle", "(", "IdleStatus", "status", ")", "{", "if", "(", "status", "==", "IdleStatus", ".", "BOTH_IDLE", ")", "{", "return", "idleCountForBoth", ".", "get", "(", ")", ">", "0", ";", "}", "if", "(", "status", "==", "Idle...
{@inheritDoc}
[ "{" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java#L962-L976
train
Check if the record is idle.
Of course, here is the Java code you requested: ```java public final boolean isIdle(IdleStatus status) { if (status == IdleStatus.BOTH_IDLE) { return idleCountForBoth.get() > 0; } if (status == IdleStatus.READER_IDLE) { return idleCountForRead.get() > 0; } ...
alkacon/opencms-core
src/org/opencms/file/collectors/CmsSolrCollector.java
CmsSolrCollector.getParamsAsMap
private Map<String, String> getParamsAsMap(String param) { Map<String, String> result = new HashMap<String, String>(); if (param != null) { int in = (param.indexOf('|')); if (in != -1) { String solrPart = param.substring(0, in); String cmsPart = p...
java
private Map<String, String> getParamsAsMap(String param) { Map<String, String> result = new HashMap<String, String>(); if (param != null) { int in = (param.indexOf('|')); if (in != -1) { String solrPart = param.substring(0, in); String cmsPart = p...
[ "private", "Map", "<", "String", ",", "String", ">", "getParamsAsMap", "(", "String", "param", ")", "{", "Map", "<", "String", ",", "String", ">", "result", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "if", "(", "param", ...
Splits the given parameter String into the query part and the cms specific arguments.<p> @param param the parameter String to parse @return a map containing the arguments
[ "Splits", "the", "given", "parameter", "String", "into", "the", "query", "part", "and", "the", "cms", "specific", "arguments", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/collectors/CmsSolrCollector.java#L207-L223
train
Returns the parameters as map.
Of course, here is the Java code you requested: ```java private Map<String, String> getParamsAsMap(String param) { Map<String, String> result = new HashMap<String, String>(); if (param != null) { int in = (param.indexOf('|')); if (in != -1) { String solrPart = p...
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java
StylesheetComposed.recomposeImports
void recomposeImports() { m_importNumber = getStylesheetRoot().getImportNumber(this); StylesheetRoot root = getStylesheetRoot(); int globalImportCount = root.getGlobalImportCount(); m_importCountComposed = (globalImportCount - m_importNumber) - 1; // Now get the count of composed imports f...
java
void recomposeImports() { m_importNumber = getStylesheetRoot().getImportNumber(this); StylesheetRoot root = getStylesheetRoot(); int globalImportCount = root.getGlobalImportCount(); m_importCountComposed = (globalImportCount - m_importNumber) - 1; // Now get the count of composed imports f...
[ "void", "recomposeImports", "(", ")", "{", "m_importNumber", "=", "getStylesheetRoot", "(", ")", ".", "getImportNumber", "(", "this", ")", ";", "StylesheetRoot", "root", "=", "getStylesheetRoot", "(", ")", ";", "int", "globalImportCount", "=", "root", ".", "ge...
Recalculate the precedence of this stylesheet in the global import list. The lowest precedence stylesheet is 0. A higher number has a higher precedence.
[ "Recalculate", "the", "precedence", "of", "this", "stylesheet", "in", "the", "global", "import", "list", ".", "The", "lowest", "precedence", "stylesheet", "is", "0", ".", "A", "higher", "number", "has", "a", "higher", "precedence", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java#L182-L212
train
Recompose the imports of this stylesheet.
Of course, here is the Java code you requested: ```java void recomposeImports() { m_importNumber = getStylesheetRoot().getImportNumber(this); StylesheetRoot root = getStylesheetRoot(); int globalImportCount = root.getGlobalImportCount(); m_importCountComposed = (globalImportCount - m_importNumber)...
kiegroup/droolsjbpm-tools
drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java
HttpConnection.getResponseHeaderFieldValue
public String getResponseHeaderFieldValue(int position) throws IOException { Assert.isTrue(position >= 0); sendRequest(); return responseHeader.getFieldValue(position); }
java
public String getResponseHeaderFieldValue(int position) throws IOException { Assert.isTrue(position >= 0); sendRequest(); return responseHeader.getFieldValue(position); }
[ "public", "String", "getResponseHeaderFieldValue", "(", "int", "position", ")", "throws", "IOException", "{", "Assert", ".", "isTrue", "(", "position", ">=", "0", ")", ";", "sendRequest", "(", ")", ";", "return", "responseHeader", ".", "getFieldValue", "(", "p...
Returns the response header field value at the given position, or <code>null</code> if there is no value at that position. @param position a position in the response header greater than or equal to zero @return the response header field value at the given postion @exception IOException if an I/O error occurs while sen...
[ "Returns", "the", "response", "header", "field", "value", "at", "the", "given", "position", "or", "<code", ">", "null<", "/", "code", ">", "if", "there", "is", "no", "value", "at", "that", "position", "." ]
05e1f73c591178360a198dca29f99d73918991db
https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java#L870-L874
test
Gets the value of a single field from the response header.
Of course, here is the Java code you requested: ```java public String getResponseHeaderFieldValue(int position) throws IOException { Assert.isTrue(position >= 0); sendRequest(); return responseHeader.getFieldValue(position); } ``` Hope this helps!
Azure/azure-sdk-for-java
signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java
SignalRsInner.createOrUpdateAsync
public Observable<SignalRResourceInner> createOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<SignalRResourceInner>, SignalRResourceInner>()...
java
public Observable<SignalRResourceInner> createOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<SignalRResourceInner>, SignalRResourceInner>()...
[ "public", "Observable", "<", "SignalRResourceInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "SignalRCreateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupN...
Create a new SignalR service and update an exiting SignalR service. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param resourceName The name of the SignalR resource. @param parameters Parameters for the...
[ "Create", "a", "new", "SignalR", "service", "and", "update", "an", "exiting", "SignalR", "service", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/signalr/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/signalr/v2018_03_01_preview/implementation/SignalRsInner.java#L1087-L1094
train
Creates or updates a SignalR resource.
Of course, here is the Java code you requested: ```java public Observable<SignalRResourceInner> createOrUpdateAsync(String resourceGroupName, String resourceName, SignalRCreateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<Servi...
Ekryd/sortpom
sorter/src/main/java/sortpom/XmlProcessor.java
XmlProcessor.sortXml
public void sortXml() { newDocument = (Document) originalDocument.clone(); final Element rootElement = (Element) originalDocument.getRootElement().clone(); HierarchyRootWrapper rootWrapper = factory.createFromRootElement(rootElement); rootWrapper.createWrappedStructure(factory); ...
java
public void sortXml() { newDocument = (Document) originalDocument.clone(); final Element rootElement = (Element) originalDocument.getRootElement().clone(); HierarchyRootWrapper rootWrapper = factory.createFromRootElement(rootElement); rootWrapper.createWrappedStructure(factory); ...
[ "public", "void", "sortXml", "(", ")", "{", "newDocument", "=", "(", "Document", ")", "originalDocument", ".", "clone", "(", ")", ";", "final", "Element", "rootElement", "=", "(", "Element", ")", "originalDocument", ".", "getRootElement", "(", ")", ".", "c...
Creates a new dom document that contains the sorted xml.
[ "Creates", "a", "new", "dom", "document", "that", "contains", "the", "sorted", "xml", "." ]
27056420803ed04001e4149b04a719fbac774c5d
https://github.com/Ekryd/sortpom/blob/27056420803ed04001e4149b04a719fbac774c5d/sorter/src/main/java/sortpom/XmlProcessor.java#L44-L57
train
Sort the XML.
Of course, here is the Java code you requested: ```java public void sortXml() { newDocument = (Document) originalDocument.clone(); final Element rootElement = (Element) originalDocument.getRootElement().clone(); HierarchyRootWrapper rootWrapper = factory.createFromRootElement(rootElement); ...
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/AbstractSequence.java
AbstractSequence.setProxySequenceReader
public void setProxySequenceReader(SequenceReader<C> proxyLoader) { this.sequenceStorage = proxyLoader; if (proxyLoader instanceof FeaturesKeyWordInterface) { this.setFeaturesKeyWord((FeaturesKeyWordInterface) sequenceStorage); } if (proxyLoader instanceof DatabaseReferenceInterface) { this.setDatabaseRef...
java
public void setProxySequenceReader(SequenceReader<C> proxyLoader) { this.sequenceStorage = proxyLoader; if (proxyLoader instanceof FeaturesKeyWordInterface) { this.setFeaturesKeyWord((FeaturesKeyWordInterface) sequenceStorage); } if (proxyLoader instanceof DatabaseReferenceInterface) { this.setDatabaseRef...
[ "public", "void", "setProxySequenceReader", "(", "SequenceReader", "<", "C", ">", "proxyLoader", ")", "{", "this", ".", "sequenceStorage", "=", "proxyLoader", ";", "if", "(", "proxyLoader", "instanceof", "FeaturesKeyWordInterface", ")", "{", "this", ".", "setFeatu...
Very important method that allows external mappings of sequence data and features. This method will gain additional interface inspection that allows external data sources with knowledge of features for a sequence to be supported. @param proxyLoader
[ "Very", "important", "method", "that", "allows", "external", "mappings", "of", "sequence", "data", "and", "features", ".", "This", "method", "will", "gain", "additional", "interface", "inspection", "that", "allows", "external", "data", "sources", "with", "knowledg...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/template/AbstractSequence.java#L118-L146
train
Sets the sequence reader that will be used for the proxy.
Of course, here is the Java code you requested: ```java public void setProxySequenceReader(SequenceReader<C> proxyLoader) { this.sequenceStorage = proxyLoader; if (proxyLoader instanceof FeaturesKeyWordInterface) { this.setFeaturesKeyWord((FeaturesKeyWordInterface) sequenceStorage); } if (proxyLoader instan...
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/collector/BytesRefTermStream.java
BytesRefTermStream.get
public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) { if (indexFieldData instanceof IndexNumericFieldData) { IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFieldData; switch (numFieldData.getNumericType()) { case INT: return new I...
java
public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) { if (indexFieldData instanceof IndexNumericFieldData) { IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFieldData; switch (numFieldData.getNumericType()) { case INT: return new I...
[ "public", "static", "BytesRefTermStream", "get", "(", "IndexReader", "reader", ",", "IndexFieldData", "indexFieldData", ")", "{", "if", "(", "indexFieldData", "instanceof", "IndexNumericFieldData", ")", "{", "IndexNumericFieldData", "numFieldData", "=", "(", "IndexNumer...
Instantiates a new reusable {@link BytesRefTermStream} based on the field type.
[ "Instantiates", "a", "new", "reusable", "{" ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/collector/BytesRefTermStream.java#L164-L183
train
Gets the BytesRefTermStream.
Of course, here is the Java code you requested: ```java public static BytesRefTermStream get(IndexReader reader, IndexFieldData indexFieldData) { if (indexFieldData instanceof IndexNumericFieldData) { IndexNumericFieldData numFieldData = (IndexNumericFieldData) indexFieldData; switch (numFieldData.getN...
magro/memcached-session-manager
core/src/main/java/de/javakaffee/web/msm/MemcachedNodesManager.java
MemcachedNodesManager.getNodeId
@Nonnull public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException { if ( socketAddress == null ) { throw new IllegalArgumentException("SocketAddress must not be null."); } final String result = _address2Ids.get( socketAddress ); if ( result == null ) { throw new Ille...
java
@Nonnull public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException { if ( socketAddress == null ) { throw new IllegalArgumentException("SocketAddress must not be null."); } final String result = _address2Ids.get( socketAddress ); if ( result == null ) { throw new Ille...
[ "@", "Nonnull", "public", "String", "getNodeId", "(", "final", "InetSocketAddress", "socketAddress", ")", "throws", "IllegalArgumentException", "{", "if", "(", "socketAddress", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"SocketAddress m...
Return the nodeId for the given socket address. Returns <code>null</code> if the socket address is not known. @throws IllegalArgumentException thrown when the socketAddress is <code>null</code> or not registered with this {@link MemcachedNodesManager}.
[ "Return", "the", "nodeId", "for", "the", "given", "socket", "address", ".", "Returns", "<code", ">", "null<", "/", "code", ">", "if", "the", "socket", "address", "is", "not", "known", "." ]
716e147c9840ab10298c4d2b9edd0662058331e6
https://github.com/magro/memcached-session-manager/blob/716e147c9840ab10298c4d2b9edd0662058331e6/core/src/main/java/de/javakaffee/web/msm/MemcachedNodesManager.java#L329-L339
train
Returns the node id associated with the given socket address.
Of course, here is the Java code you requested: ```java @Nonnull public String getNodeId(final InetSocketAddress socketAddress) throws IllegalArgumentException { if ( socketAddress == null ) { throw new IllegalArgumentException("SocketAddress must not be null."); } final String result = _address2Ids.get( soc...
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsTouch.java
CmsTouch.hardTouch
private static void hardTouch(CmsObject cms, CmsResource resource) throws CmsException { CmsFile file = cms.readFile(resource); file.setContents(file.getContents()); cms.writeFile(file); }
java
private static void hardTouch(CmsObject cms, CmsResource resource) throws CmsException { CmsFile file = cms.readFile(resource); file.setContents(file.getContents()); cms.writeFile(file); }
[ "private", "static", "void", "hardTouch", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsFile", "file", "=", "cms", ".", "readFile", "(", "resource", ")", ";", "file", ".", "setContents", "(", "file", ".", ...
Rewrites the content of the given file.<p> @param resource the resource to rewrite the content for @throws CmsException if something goes wrong
[ "Rewrites", "the", "content", "of", "the", "given", "file", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsTouch.java#L160-L165
train
Hard touch the resource.
Of course, here is the Java code you requested: ```java private static void hardTouch(CmsObject cms, CmsResource resource) throws CmsException { CmsFile file = cms.readFile(resource); file.setContents(file.getContents()); cms.writeFile(file); } ``` Hope this helps!
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java
RequestTracker.addRequest
public static void addRequest (@Nonnull @Nonempty final String sRequestID, @Nonnull final IRequestWebScope aRequestScope) { getInstance ().m_aRequestTrackingMgr.addRequest (sRequestID, aRequestScope, s_aParallelRunningCallbacks); }
java
public static void addRequest (@Nonnull @Nonempty final String sRequestID, @Nonnull final IRequestWebScope aRequestScope) { getInstance ().m_aRequestTrackingMgr.addRequest (sRequestID, aRequestScope, s_aParallelRunningCallbacks); }
[ "public", "static", "void", "addRequest", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sRequestID", ",", "@", "Nonnull", "final", "IRequestWebScope", "aRequestScope", ")", "{", "getInstance", "(", ")", ".", "m_aRequestTrackingMgr", ".", "addRequest", ...
Add new request to the tracking @param sRequestID The unique request ID. @param aRequestScope The request scope itself.
[ "Add", "new", "request", "to", "the", "tracking" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/requesttrack/RequestTracker.java#L166-L170
train
Add a request to the request tracking manager.
Of course, here is the Java code you requested: ```java public static void addRequest (@Nonnull @Nonempty final String sRequestID, @Nonnull final IRequestWebScope aRequestScope) { getInstance ().m_aRequestTrackingMgr.addRequest (sRequestID, aRequestScope, s_aParallelRunningCallba...
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java
RandomVariableDifferentiableAADPathwise.addProduct
@Override public RandomVariable addProduct(RandomVariable factor1, double factor2) { return new RandomVariableDifferentiableAADPathwise( getValues().addProduct(factor1, factor2), Arrays.asList(this, factor1, new RandomVariableFromDoubleArray(factor2)), OperatorType.ADDPRODUCT); }
java
@Override public RandomVariable addProduct(RandomVariable factor1, double factor2) { return new RandomVariableDifferentiableAADPathwise( getValues().addProduct(factor1, factor2), Arrays.asList(this, factor1, new RandomVariableFromDoubleArray(factor2)), OperatorType.ADDPRODUCT); }
[ "@", "Override", "public", "RandomVariable", "addProduct", "(", "RandomVariable", "factor1", ",", "double", "factor2", ")", "{", "return", "new", "RandomVariableDifferentiableAADPathwise", "(", "getValues", "(", ")", ".", "addProduct", "(", "factor1", ",", "factor2"...
/* (non-Javadoc) @see net.finmath.stochastic.RandomVariable#addProduct(net.finmath.stochastic.RandomVariable, double)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
a3c067d52dd33feb97d851df6cab130e4116759f
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java#L893-L899
train
Adds the product of this random variable with another.
Of course, here is the Java code you requested: ```java @Override public RandomVariable addProduct(RandomVariable factor1, double factor2) { return new RandomVariableDifferentiableAADPathwise( getValues().addProduct(factor1, factor2), Arrays.asList(this, factor1, new RandomVariableFromDoubleArray(factor...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/datebox/CmsDateBox.java
CmsDateBox.fireChange
protected void fireChange(Date newValue, boolean isTyping) { ValueChangeEvent.<Date> fireIfNotEqual(this, m_oldValue, CalendarUtil.copyDate(newValue)); CmsDateBoxEvent.fire(this, newValue, isTyping); m_oldValue = newValue; }
java
protected void fireChange(Date newValue, boolean isTyping) { ValueChangeEvent.<Date> fireIfNotEqual(this, m_oldValue, CalendarUtil.copyDate(newValue)); CmsDateBoxEvent.fire(this, newValue, isTyping); m_oldValue = newValue; }
[ "protected", "void", "fireChange", "(", "Date", "newValue", ",", "boolean", "isTyping", ")", "{", "ValueChangeEvent", ".", "<", "Date", ">", "fireIfNotEqual", "(", "this", ",", "m_oldValue", ",", "CalendarUtil", ".", "copyDate", "(", "newValue", ")", ")", ";...
Fires the value change event if needed.<p> @param newValue the new value @param isTyping true if the user is currently typing
[ "Fires", "the", "value", "change", "event", "if", "needed", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/datebox/CmsDateBox.java#L681-L686
train
Fire the change event.
Of course, here is the Java code you requested: ```java protected void fireChange(Date newValue, boolean isTyping) { ValueChangeEvent.<Date> fireIfNotEqual(this, m_oldValue, CalendarUtil.copyDate(newValue)); CmsDateBoxEvent.fire(this, newValue, isTyping); m_oldValue = newValue; } ``` Hope...
mongodb/mongo-java-driver
driver-core/src/main/com/mongodb/ConnectionString.java
ConnectionString.getCredentialList
@Deprecated public List<MongoCredential> getCredentialList() { return credential != null ? singletonList(credential) : Collections.<MongoCredential>emptyList(); }
java
@Deprecated public List<MongoCredential> getCredentialList() { return credential != null ? singletonList(credential) : Collections.<MongoCredential>emptyList(); }
[ "@", "Deprecated", "public", "List", "<", "MongoCredential", ">", "getCredentialList", "(", ")", "{", "return", "credential", "!=", "null", "?", "singletonList", "(", "credential", ")", ":", "Collections", ".", "<", "MongoCredential", ">", "emptyList", "(", ")...
Gets the credentials in an immutable list. The list will be empty if no credentials were specified in the connection string. @return the credentials in an immutable list @deprecated Prefer {@link #getCredential()}
[ "Gets", "the", "credentials", "in", "an", "immutable", "list", ".", "The", "list", "will", "be", "empty", "if", "no", "credentials", "were", "specified", "in", "the", "connection", "string", "." ]
a92d47e2e9f2fca55d09229a0a2e2cdc714db085
https://github.com/mongodb/mongo-java-driver/blob/a92d47e2e9f2fca55d09229a0a2e2cdc714db085/driver-core/src/main/com/mongodb/ConnectionString.java#L1107-L1110
valid
Returns a list of credential objects.
Of course, here is the Java code you requested: ```java @Deprecated public List<MongoCredential> getCredentialList() { return credential != null ? singletonList(credential) : Collections.<MongoCredential>emptyList(); } ``` Hope this helps!
geomajas/geomajas-project-server
plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java
AuthenticationTokenService.getAuthentication
public Authentication getAuthentication(String token) { if (null != token) { TokenContainer container = tokens.get(token); if (null != container) { if (container.isValid()) { return container.getAuthentication(); } else { logout(token); } } } return null; }
java
public Authentication getAuthentication(String token) { if (null != token) { TokenContainer container = tokens.get(token); if (null != container) { if (container.isValid()) { return container.getAuthentication(); } else { logout(token); } } } return null; }
[ "public", "Authentication", "getAuthentication", "(", "String", "token", ")", "{", "if", "(", "null", "!=", "token", ")", "{", "TokenContainer", "container", "=", "tokens", ".", "get", "(", "token", ")", ";", "if", "(", "null", "!=", "container", ")", "{...
Get the authentication for a specific token. @param token token @return authentication if any
[ "Get", "the", "authentication", "for", "a", "specific", "token", "." ]
904b7d7deed1350d28955589098dd1e0a786d76e
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java#L49-L61
train
Get the Authentication object for the given token.
Of course, here is the Java code you requested: ```java public Authentication getAuthentication(String token) { if (null != token) { TokenContainer container = tokens.get(token); if (null != container) { if (container.isValid()) { return container.getAuthentication(); } else { logout(token); ...
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/impl/BatchKernelImpl.java
BatchKernelImpl.getJobExecutionIdFromExecutingSubWorkUnitKey
private long getJobExecutionIdFromExecutingSubWorkUnitKey(String comparisonKey) { try { return Long.parseLong(comparisonKey.split("::")[0]); } catch (NumberFormatException e) { throw new IllegalStateException("Sub Work Unit found without a parent Execution Id"); } }
java
private long getJobExecutionIdFromExecutingSubWorkUnitKey(String comparisonKey) { try { return Long.parseLong(comparisonKey.split("::")[0]); } catch (NumberFormatException e) { throw new IllegalStateException("Sub Work Unit found without a parent Execution Id"); } }
[ "private", "long", "getJobExecutionIdFromExecutingSubWorkUnitKey", "(", "String", "comparisonKey", ")", "{", "try", "{", "return", "Long", ".", "parseLong", "(", "comparisonKey", ".", "split", "(", "\"::\"", ")", "[", "0", "]", ")", ";", "}", "catch", "(", "...
/* Gets a jobExecutionId from the SubWorkUnitComparisonHelper comparisonKey If subWorkUnit is a step, key format is "jobExecutionId:StepName:PartitionNumber" If subWorkUnit is a split-flow, key format is "jobExecutionId:flowName" @param the key used in executingSubWorkUnits. @return jobExecutionId
[ "/", "*", "Gets", "a", "jobExecutionId", "from", "the", "SubWorkUnitComparisonHelper", "comparisonKey", "If", "subWorkUnit", "is", "a", "step", "key", "format", "is", "jobExecutionId", ":", "StepName", ":", "PartitionNumber", "If", "subWorkUnit", "is", "a", "split...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/impl/BatchKernelImpl.java#L701-L707
train
Get the execution id from the execution key
Of course, here is the Java code you requested: ```java private long getJobExecutionIdFromExecutingSubWorkUnitKey(String comparisonKey) { try { return Long.parseLong(comparisonKey.split("::")[0]); } catch (NumberFormatException e) { throw new IllegalStateException("Sub Work Unit...
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRootValue.java
PactDslRootValue.integerType
public static PactDslRootValue integerType(Long number) { PactDslRootValue value = new PactDslRootValue(); value.setValue(number); value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER)); return value; }
java
public static PactDslRootValue integerType(Long number) { PactDslRootValue value = new PactDslRootValue(); value.setValue(number); value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER)); return value; }
[ "public", "static", "PactDslRootValue", "integerType", "(", "Long", "number", ")", "{", "PactDslRootValue", "value", "=", "new", "PactDslRootValue", "(", ")", ";", "value", ".", "setValue", "(", "number", ")", ";", "value", ".", "setMatcher", "(", "new", "Nu...
Value that must be an integer @param number example integer value to use for generated bodies
[ "Value", "that", "must", "be", "an", "integer" ]
2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRootValue.java#L320-L325
train
Creates a value representing an integer type.
Of course, here is the Java code you requested: ```java public static PactDslRootValue integerType(Long number) { PactDslRootValue value = new PactDslRootValue(); value.setValue(number); value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER)); return value; } ``` Hope this help...
sebastiangraf/jSCSI
bundles/target/src/main/java/org/jscsi/target/scsi/ScsiResponseDataSegment.java
ScsiResponseDataSegment.uncroppedSize
public int uncroppedSize () { if (uncroppedSize < 0) { if (senseData == null && responseData == null) return 0; int size = SENSE_LENGTH_FIELD_LENGTH; if (senseData != null) size += senseData.size(); if (responseData != null) size += responseData.size(); ...
java
public int uncroppedSize () { if (uncroppedSize < 0) { if (senseData == null && responseData == null) return 0; int size = SENSE_LENGTH_FIELD_LENGTH; if (senseData != null) size += senseData.size(); if (responseData != null) size += responseData.size(); ...
[ "public", "int", "uncroppedSize", "(", ")", "{", "if", "(", "uncroppedSize", "<", "0", ")", "{", "if", "(", "senseData", "==", "null", "&&", "responseData", "==", "null", ")", "return", "0", ";", "int", "size", "=", "SENSE_LENGTH_FIELD_LENGTH", ";", "if"...
The length of the {@link ScsiResponseDataSegment}, without considering any limitations due to {@link #allocationLength}. <p> The returned value is calculated just once, and then stored in {@link #uncroppedSize}. This summation is performed only if {@link #uncroppedSize} is negative. @return length of the {@link ScsiRe...
[ "The", "length", "of", "the", "{", "@link", "ScsiResponseDataSegment", "}", "without", "considering", "any", "limitations", "due", "to", "{", "@link", "#allocationLength", "}", ".", "<p", ">", "The", "returned", "value", "is", "calculated", "just", "once", "an...
6169bfe73f0b15de7d6485453555389e782ae888
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/scsi/ScsiResponseDataSegment.java#L165-L174
train
Returns the number of elements that were uncropped in this tag.
Of course, here is the Java code you requested: ```java public int uncroppedSize () { if (uncroppedSize < 0) { if (senseData == null && responseData == null) return 0; int size = SENSE_LENGTH_FIELD_LENGTH; if (senseData != null) size += senseData.size(); if ...
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/TreeGraphNode.java
TreeGraphNode.arcLabelToNode
public Class<? extends GrammaticalRelationAnnotation> arcLabelToNode(TreeGraphNode destNode) { Set<Class<? extends GrammaticalRelationAnnotation>> arcLabels = arcLabelsToNode(destNode); if (arcLabels == null) { return null; } return (new ArrayList<Class<? extends GrammaticalRelationAnnotation...
java
public Class<? extends GrammaticalRelationAnnotation> arcLabelToNode(TreeGraphNode destNode) { Set<Class<? extends GrammaticalRelationAnnotation>> arcLabels = arcLabelsToNode(destNode); if (arcLabels == null) { return null; } return (new ArrayList<Class<? extends GrammaticalRelationAnnotation...
[ "public", "Class", "<", "?", "extends", "GrammaticalRelationAnnotation", ">", "arcLabelToNode", "(", "TreeGraphNode", "destNode", ")", "{", "Set", "<", "Class", "<", "?", "extends", "GrammaticalRelationAnnotation", ">", ">", "arcLabels", "=", "arcLabelsToNode", "(",...
Returns the label of a single arc between this node and <code>destNode</code>, or <code>null</code> if no such arc exists. If more than one such arc exists, this method will return an arbitrary arc label from among them; if this is a possibility, you might want to use {@link TreeGraphNode#arcLabelsToNode <code>arcLabe...
[ "Returns", "the", "label", "of", "a", "single", "arc", "between", "this", "node", "and", "<code", ">", "destNode<", "/", "code", ">", "or", "<code", ">", "null<", "/", "code", ">", "if", "no", "such", "arc", "exists", ".", "If", "more", "than", "one"...
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/TreeGraphNode.java#L441-L447
train
Returns the GrammaticalRelationAnnotation class that is associated with the given node.
Of course, here is the Java code you requested: ```java public Class<? extends GrammaticalRelationAnnotation> arcLabelToNode(TreeGraphNode destNode) { Set<Class<? extends GrammaticalRelationAnnotation>> arcLabels = arcLabelsToNode(destNode); if (arcLabels == null) { return null; } return (ne...
googlemaps/google-maps-services-java
src/main/java/com/google/maps/GeocodingApi.java
GeocodingApi.geocode
public static GeocodingApiRequest geocode(GeoApiContext context, String address) { GeocodingApiRequest request = new GeocodingApiRequest(context); request.address(address); return request; }
java
public static GeocodingApiRequest geocode(GeoApiContext context, String address) { GeocodingApiRequest request = new GeocodingApiRequest(context); request.address(address); return request; }
[ "public", "static", "GeocodingApiRequest", "geocode", "(", "GeoApiContext", "context", ",", "String", "address", ")", "{", "GeocodingApiRequest", "request", "=", "new", "GeocodingApiRequest", "(", "context", ")", ";", "request", ".", "address", "(", "address", ")"...
Requests the latitude and longitude of an {@code address}. @param context The {@link GeoApiContext} to make requests through. @param address The address to geocode. @return Returns the request, ready to run.
[ "Requests", "the", "latitude", "and", "longitude", "of", "an", "{", "@code", "address", "}", "." ]
23d20d1930f80e310d856d2da51d72ee0db4476b
https://github.com/googlemaps/google-maps-services-java/blob/23d20d1930f80e310d856d2da51d72ee0db4476b/src/main/java/com/google/maps/GeocodingApi.java#L52-L56
train
Geocode a single address
Of course, here is the Java code you requested: ```java public static GeocodingApiRequest geocode(GeoApiContext context, String address) { GeocodingApiRequest request = new GeocodingApiRequest(context); request.address(address); return request; } ``` Hope this helps!
b3dgs/lionengine
lionengine-network/src/main/java/com/b3dgs/lionengine/network/NetworkModel.java
NetworkModel.decodeMessage
protected void decodeMessage(byte type, byte from, byte dest, DataInputStream buffer) throws IOException { final NetworkMessage message = decoder.getNetworkMessageFromType(type); if (message != null) { final int skip = 3; if (buffer.skipBytes(skip) == skip) ...
java
protected void decodeMessage(byte type, byte from, byte dest, DataInputStream buffer) throws IOException { final NetworkMessage message = decoder.getNetworkMessageFromType(type); if (message != null) { final int skip = 3; if (buffer.skipBytes(skip) == skip) ...
[ "protected", "void", "decodeMessage", "(", "byte", "type", ",", "byte", "from", ",", "byte", "dest", ",", "DataInputStream", "buffer", ")", "throws", "IOException", "{", "final", "NetworkMessage", "message", "=", "decoder", ".", "getNetworkMessageFromType", "(", ...
Decode a message from its type. @param type The message type. @param from The client id source. @param dest The client id destination (-1 if all). @param buffer The data. @throws IOException Error on reading.
[ "Decode", "a", "message", "from", "its", "type", "." ]
cac3d5578532cf11724a737b9f09e71bf9995ab2
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-network/src/main/java/com/b3dgs/lionengine/network/NetworkModel.java#L66-L78
train
Decodes a single message.
Of course, here is the Java code you requested: ```java protected void decodeMessage(byte type, byte from, byte dest, DataInputStream buffer) throws IOException { final NetworkMessage message = decoder.getNetworkMessageFromType(type); if (message != null) { final int skip =...