repo
stringlengths
7
59
path
stringlengths
3
222
func_name
stringlengths
3
127
original_string
stringlengths
0
466k
language
stringclasses
1 value
code
stringlengths
0
466k
code_tokens
listlengths
0
68.3k
docstring
stringlengths
0
21.3k
docstring_tokens
listlengths
0
1.93k
sha
stringlengths
0
40
url
stringlengths
0
339
partition
stringclasses
3 values
summary
stringlengths
0
250
instruction
stringlengths
38
3.13k
input
stringclasses
1 value
output
stringlengths
146
466k
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FilterFileSystem.java
FilterFileSystem.append
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { return fs.append(f, bufferSize, progress); }
java
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { return fs.append(f, bufferSize, progress); }
[ "public", "FSDataOutputStream", "append", "(", "Path", "f", ",", "int", "bufferSize", ",", "Progressable", "progress", ")", "throws", "IOException", "{", "return", "fs", ".", "append", "(", "f", ",", "bufferSize", ",", "progress", ")", ";", "}" ]
{@inheritDoc}
[ "{" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FilterFileSystem.java#L111-L114
train
Append to the file.
Create a Java method that does the following: "Append to the file.".
Of course, here is the Java code you requested: ```java public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { return fs.append(f, bufferSize, progress); } ``` Hope this helps!
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/datatypes/scancollection/impl/ScanCollectionDefault.java
ScanCollectionDefault.getScansInSubsetByNumber
private NavigableMap<Integer, IScan> getScansInSubsetByNumber( NavigableMap<Integer, IScan> scanMap, LCMSDataSubset subset) { NavigableMap<Integer, IScan> scansInSubsetByNumber = scanMap; if (subset.getScanNumLo() != null) { scansInSubsetByNumber .subMap(subset.getScanNumLo(), true, scansI...
java
private NavigableMap<Integer, IScan> getScansInSubsetByNumber( NavigableMap<Integer, IScan> scanMap, LCMSDataSubset subset) { NavigableMap<Integer, IScan> scansInSubsetByNumber = scanMap; if (subset.getScanNumLo() != null) { scansInSubsetByNumber .subMap(subset.getScanNumLo(), true, scansI...
[ "private", "NavigableMap", "<", "Integer", ",", "IScan", ">", "getScansInSubsetByNumber", "(", "NavigableMap", "<", "Integer", ",", "IScan", ">", "scanMap", ",", "LCMSDataSubset", "subset", ")", "{", "NavigableMap", "<", "Integer", ",", "IScan", ">", "scansInSub...
It won't filter the scanMap according the the full subset predicate, it only selects scan number range. Further checks for ms-levels and precursor ranges is required. It's just a convenience method. @param scanMap use {@link #getMapNum2scan() } for the broadest use @param subset only scan numbers will be used for filt...
[ "It", "won", "t", "filter", "the", "scanMap", "according", "the", "the", "full", "subset", "predicate", "it", "only", "selects", "scan", "number", "range", ".", "Further", "checks", "for", "ms", "-", "levels", "and", "precursor", "ranges", "is", "required", ...
e53ae6be982e2de3123292be7d5297715bec70bb
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/scancollection/impl/ScanCollectionDefault.java#L750-L762
train
Get the scans in subset by number.
Create a Java method that does the following: "Get the scans in subset by number.".
Of course, here is the Java code you requested: ```java private NavigableMap<Integer, IScan> getScansInSubsetByNumber( NavigableMap<Integer, IScan> scanMap, LCMSDataSubset subset) { NavigableMap<Integer, IScan> scansInSubsetByNumber = scanMap; if (subset.getScanNumLo() != null) { scansInSubsetByNum...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/dnd/CmsDNDHandler.java
CmsDNDHandler.stopDragging
protected void stopDragging() { clearScrollTimer(); m_dragging = false; if (m_previewHandlerRegistration != null) { m_previewHandlerRegistration.removeHandler(); m_previewHandlerRegistration = null; } }
java
protected void stopDragging() { clearScrollTimer(); m_dragging = false; if (m_previewHandlerRegistration != null) { m_previewHandlerRegistration.removeHandler(); m_previewHandlerRegistration = null; } }
[ "protected", "void", "stopDragging", "(", ")", "{", "clearScrollTimer", "(", ")", ";", "m_dragging", "=", "false", ";", "if", "(", "m_previewHandlerRegistration", "!=", "null", ")", "{", "m_previewHandlerRegistration", ".", "removeHandler", "(", ")", ";", "m_pre...
Sets dragging to false and removes the event preview handler.<p>
[ "Sets", "dragging", "to", "false", "and", "removes", "the", "event", "preview", "handler", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/dnd/CmsDNDHandler.java#L944-L952
train
Stop the dragging process.
Create a Java method that does the following: "Stop the dragging process.".
Of course, here is the Java code you requested: ```java protected void stopDragging() { clearScrollTimer(); m_dragging = false; if (m_previewHandlerRegistration != null) { m_previewHandlerRegistration.removeHandler(); m_previewHandlerRegistration = null; } }...
tvesalainen/lpg
src/main/java/org/vesalainen/parser/GenClassFactory.java
GenClassFactory.loadGenClass
public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException { Class<?> parserClass = map.get(cls); if (parserClass == null) { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { ...
java
public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException { Class<?> parserClass = map.get(cls); if (parserClass == null) { GenClassname genClassname = cls.getAnnotation(GenClassname.class); if (genClassname == null) { ...
[ "public", "static", "Class", "<", "?", ">", "loadGenClass", "(", "Class", "<", "?", ">", "cls", ")", "throws", "ClassNotFoundException", "{", "Class", "<", "?", ">", "parserClass", "=", "map", ".", "get", "(", "cls", ")", ";", "if", "(", "parserClass",...
Creates generated class by using ClassLoader. Return null if unable to load class @param cls Annotated class acting also as superclass for created parser @return @throws ClassNotFoundException
[ "Creates", "generated", "class", "by", "using", "ClassLoader", ".", "Return", "null", "if", "unable", "to", "load", "class" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/GenClassFactory.java#L193-L207
train
Load a single SECTYPE class from the specified class.
Create a Java method that does the following: "Load a single SECTYPE class from the specified class.".
Of course, here is the Java code you requested: ```java public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException { Class<?> parserClass = map.get(cls); if (parserClass == null) { GenClassname genClassname = cls.getAnnotation(GenClassname.class); ...
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/universal/UniversalIdIntMessage.java
UniversalIdIntMessage.newInstance
public static UniversalIdIntMessage newInstance(byte[] content) { UniversalIdIntMessage msg = newInstance(); msg.setContent(content); return msg; }
java
public static UniversalIdIntMessage newInstance(byte[] content) { UniversalIdIntMessage msg = newInstance(); msg.setContent(content); return msg; }
[ "public", "static", "UniversalIdIntMessage", "newInstance", "(", "byte", "[", "]", "content", ")", "{", "UniversalIdIntMessage", "msg", "=", "newInstance", "(", ")", ";", "msg", ".", "setContent", "(", "content", ")", ";", "return", "msg", ";", "}" ]
Create a new {@link UniversalIdIntMessage} object with specified content. @param content @return
[ "Create", "a", "new", "{", "@link", "UniversalIdIntMessage", "}", "object", "with", "specified", "content", "." ]
b20776850d23111d3d71fc8ed6023c590bc3621f
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/pubsub/impl/universal/UniversalIdIntMessage.java#L62-L66
train
Create a new UniversalIdIntMessage with the specified content.
Create a Java method that does the following: "Create a new UniversalIdIntMessage with the specified content.".
Of course, here is the Java code you requested: ```java public static UniversalIdIntMessage newInstance(byte[] content) { UniversalIdIntMessage msg = newInstance(); msg.setContent(content); return msg; } ``` Hope this helps!
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.copyFromBytes
public static void copyFromBytes( MemorySegment[] segments, int offset, byte[] bytes, int bytesOffset, int numBytes) { if (segments.length == 1) { segments[0].put(offset, bytes, bytesOffset, numBytes); } else { copyMultiSegmentsFromBytes(segments, offset, bytes, bytesOffset, numBytes); } }
java
public static void copyFromBytes( MemorySegment[] segments, int offset, byte[] bytes, int bytesOffset, int numBytes) { if (segments.length == 1) { segments[0].put(offset, bytes, bytesOffset, numBytes); } else { copyMultiSegmentsFromBytes(segments, offset, bytes, bytesOffset, numBytes); } }
[ "public", "static", "void", "copyFromBytes", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "byte", "[", "]", "bytes", ",", "int", "bytesOffset", ",", "int", "numBytes", ")", "{", "if", "(", "segments", ".", "length", "==", "1", ...
Copy target segments from source byte[]. @param segments target segments. @param offset target segments offset. @param bytes source byte[]. @param bytesOffset source byte[] offset. @param numBytes the number bytes to copy.
[ "Copy", "target", "segments", "from", "source", "byte", "[]", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L249-L257
train
Copies the bytes from the given array of bytes to the given memory segment.
Create a Java method that does the following: "Copies the bytes from the given array of bytes to the given memory segment.".
Of course, here is the Java code you requested: ```java public static void copyFromBytes( MemorySegment[] segments, int offset, byte[] bytes, int bytesOffset, int numBytes) { if (segments.length == 1) { segments[0].put(offset, bytes, bytesOffset, numBytes); } else { copyMultiSegmentsFromBytes(segments,...
OpenEstate/OpenEstate-IO
IS24-XML/src/main/jaxb/org/openestate/io/is24_xml/xml/ObjectFactory.java
ObjectFactory.createGrundstueckEmpfohleneNutzungReihenhaus
@XmlElementDecl(namespace = "http://www.immobilienscout24.de/immobilientransfer", name = "Reihenhaus", scope = GrundstueckEmpfohleneNutzung.class) public JAXBElement<Object> createGrundstueckEmpfohleneNutzungReihenhaus(Object value) { return new JAXBElement<Object>(_GrundstueckEmpfohleneNutzungReihenhaus_QN...
java
@XmlElementDecl(namespace = "http://www.immobilienscout24.de/immobilientransfer", name = "Reihenhaus", scope = GrundstueckEmpfohleneNutzung.class) public JAXBElement<Object> createGrundstueckEmpfohleneNutzungReihenhaus(Object value) { return new JAXBElement<Object>(_GrundstueckEmpfohleneNutzungReihenhaus_QN...
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"http://www.immobilienscout24.de/immobilientransfer\"", ",", "name", "=", "\"Reihenhaus\"", ",", "scope", "=", "GrundstueckEmpfohleneNutzung", ".", "class", ")", "public", "JAXBElement", "<", "Object", ">", "createGrundstuec...
Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "Object", "}", "{", "@code", ">", "}}" ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/IS24-XML/src/main/jaxb/org/openestate/io/is24_xml/xml/ObjectFactory.java#L1143-L1146
test
Create an instance of the JAXBElement class which is a sub - class of GrundstueckEmpfohleneNutzung.
Create a Java method that does the following: "Create an instance of the JAXBElement class which is a sub - class of GrundstueckEmpfohleneNutzung.".
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://www.immobilienscout24.de/immobilientransfer", name = "Reihenhaus", scope = GrundstueckEmpfohleneNutzung.class) public JAXBElement<Object> createGrundstueckEmpfohleneNutzungReihenhaus(Object value) { return new JAXBE...
Domo42/saga-lib
saga-lib/src/main/java/com/codebullets/sagalib/processing/SagaTypeCacheLoader.java
SagaTypeCacheLoader.containsItem
private SagaType containsItem(final Iterable<SagaType> source, final Class itemToSearch) { SagaType containedItem = null; for (SagaType sagaType : source) { if (sagaType.getSagaClass().equals(itemToSearch)) { containedItem = sagaType; break; } ...
java
private SagaType containsItem(final Iterable<SagaType> source, final Class itemToSearch) { SagaType containedItem = null; for (SagaType sagaType : source) { if (sagaType.getSagaClass().equals(itemToSearch)) { containedItem = sagaType; break; } ...
[ "private", "SagaType", "containsItem", "(", "final", "Iterable", "<", "SagaType", ">", "source", ",", "final", "Class", "itemToSearch", ")", "{", "SagaType", "containedItem", "=", "null", ";", "for", "(", "SagaType", "sagaType", ":", "source", ")", "{", "if"...
Checks whether the source list contains a saga type matching the input class.
[ "Checks", "whether", "the", "source", "list", "contains", "a", "saga", "type", "matching", "the", "input", "class", "." ]
c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef
https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib/src/main/java/com/codebullets/sagalib/processing/SagaTypeCacheLoader.java#L120-L131
train
Check if the source Iterable contains the itemToSearch
Create a Java method that does the following: "Check if the source Iterable contains the itemToSearch".
Of course, here is the Java code you requested: ```java private SagaType containsItem(final Iterable<SagaType> source, final Class itemToSearch) { SagaType containedItem = null; for (SagaType sagaType : source) { if (sagaType.getSagaClass().equals(itemToSearch)) { contained...
ldp4j/ldp4j
framework/application/kernel/mem/src/main/java/org/ldp4j/application/kernel/impl/InMemoryResource.java
InMemoryResource.attachments
@Override public Set<InMemoryAttachment> attachments() { return Collections.unmodifiableSet(new LinkedHashSet<InMemoryAttachment>(this.attachments.values())); }
java
@Override public Set<InMemoryAttachment> attachments() { return Collections.unmodifiableSet(new LinkedHashSet<InMemoryAttachment>(this.attachments.values())); }
[ "@", "Override", "public", "Set", "<", "InMemoryAttachment", ">", "attachments", "(", ")", "{", "return", "Collections", ".", "unmodifiableSet", "(", "new", "LinkedHashSet", "<", "InMemoryAttachment", ">", "(", "this", ".", "attachments", ".", "values", "(", "...
{@inheritDoc}
[ "{" ]
4236dfb3a746be390155c1056bbb5a8d4dccc49f
https://github.com/ldp4j/ldp4j/blob/4236dfb3a746be390155c1056bbb5a8d4dccc49f/framework/application/kernel/mem/src/main/java/org/ldp4j/application/kernel/impl/InMemoryResource.java#L263-L266
valid
Returns a set of all in - memory attachments.
Create a Java method that does the following: "Returns a set of all in - memory attachments.".
Of course, here is the Java code you requested: ```java @Override public Set<InMemoryAttachment> attachments() { return Collections.unmodifiableSet(new LinkedHashSet<InMemoryAttachment>(this.attachments.values())); } ``` Hope this helps!
oblac/jodd
jodd-core/src/main/java/jodd/io/StreamUtil.java
StreamUtil.copy
public static FastCharArrayWriter copy(final Reader input, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, count); return output; } }
java
public static FastCharArrayWriter copy(final Reader input, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, count); return output; } }
[ "public", "static", "FastCharArrayWriter", "copy", "(", "final", "Reader", "input", ",", "final", "int", "count", ")", "throws", "IOException", "{", "try", "(", "FastCharArrayWriter", "output", "=", "createFastCharArrayWriter", "(", ")", ")", "{", "copy", "(", ...
Copies {@link Reader} to a new {@link FastCharArrayWriter} using buffer and specified encoding. @see #copy(Reader, Writer, int)
[ "Copies", "{", "@link", "Reader", "}", "to", "a", "new", "{", "@link", "FastCharArrayWriter", "}", "using", "buffer", "and", "specified", "encoding", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/io/StreamUtil.java#L406-L411
test
Copy the contents of the Reader to a FastCharArrayWriter.
Create a Java method that does the following: "Copy the contents of the Reader to a FastCharArrayWriter.".
Of course, here is the Java code you requested: ```java public static FastCharArrayWriter copy(final Reader input, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, count); return output; } } ``` Hope this helps!
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/table/CloudTableClient.java
CloudTableClient.listTablesSegmented
@DoesServiceRequest public ResultSegment<String> listTablesSegmented(final String prefix) throws StorageException { return this.listTablesSegmented(prefix, null /* maxResults */, null /* continuationToken */, null /* options */, null /* opContext */); }
java
@DoesServiceRequest public ResultSegment<String> listTablesSegmented(final String prefix) throws StorageException { return this.listTablesSegmented(prefix, null /* maxResults */, null /* continuationToken */, null /* options */, null /* opContext */); }
[ "@", "DoesServiceRequest", "public", "ResultSegment", "<", "String", ">", "listTablesSegmented", "(", "final", "String", "prefix", ")", "throws", "StorageException", "{", "return", "this", ".", "listTablesSegmented", "(", "prefix", ",", "null", "/* maxResults */", "...
Lists the table names in the storage account that match the specified prefix in segmented mode. This method allows listing of tables to be resumed after returning a partial set of results, using information returned by the server in the {@link ResultSegment} object. <p> This method invokes the <a href="http://msdn.micr...
[ "Lists", "the", "table", "names", "in", "the", "storage", "account", "that", "match", "the", "specified", "prefix", "in", "segmented", "mode", ".", "This", "method", "allows", "listing", "of", "tables", "to", "be", "resumed", "after", "returning", "a", "part...
2c643c37c6b8c9081058add284c601a2393afc93
https://github.com/Azure/azure-storage-android/blob/2c643c37c6b8c9081058add284c601a2393afc93/microsoft-azure-storage/src/com/microsoft/azure/storage/table/CloudTableClient.java#L243-L247
valid
List all the segmented tables.
Create a Java method that does the following: "List all the segmented tables.".
Of course, here is the Java code you requested: ```java @DoesServiceRequest public ResultSegment<String> listTablesSegmented(final String prefix) throws StorageException { return this.listTablesSegmented(prefix, null /* maxResults */, null /* continuationToken */, null /* options */, null /...
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/BioVerb.java
BioVerb.setMatchedText
public void setMatchedText(String v) { if (BioVerb_Type.featOkTst && ((BioVerb_Type)jcasType).casFeat_matchedText == null) jcasType.jcas.throwFeatMissing("matchedText", "ch.epfl.bbp.uima.types.BioVerb"); jcasType.ll_cas.ll_setStringValue(addr, ((BioVerb_Type)jcasType).casFeatCode_matchedText, v);}
java
public void setMatchedText(String v) { if (BioVerb_Type.featOkTst && ((BioVerb_Type)jcasType).casFeat_matchedText == null) jcasType.jcas.throwFeatMissing("matchedText", "ch.epfl.bbp.uima.types.BioVerb"); jcasType.ll_cas.ll_setStringValue(addr, ((BioVerb_Type)jcasType).casFeatCode_matchedText, v);}
[ "public", "void", "setMatchedText", "(", "String", "v", ")", "{", "if", "(", "BioVerb_Type", ".", "featOkTst", "&&", "(", "(", "BioVerb_Type", ")", "jcasType", ")", ".", "casFeat_matchedText", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissin...
setter for matchedText - sets @generated @param v value to set into the feature
[ "setter", "for", "matchedText", "-", "sets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/BioVerb.java#L165-L168
train
setter for matchedText - sets
Create a Java method that does the following: "setter for matchedText - sets".
Of course, here is the Java code you requested: ```java public void setMatchedText(String v) { if (BioVerb_Type.featOkTst && ((BioVerb_Type)jcasType).casFeat_matchedText == null) jcasType.jcas.throwFeatMissing("matchedText", "ch.epfl.bbp.uima.types.BioVerb"); jcasType.ll_cas.ll_setStringValue(addr, ((Bio...
spotify/styx
styx-service-common/src/main/java/com/spotify/styx/util/MDCUtil.java
MDCUtil.withMDC
public static Runnable withMDC(Runnable r) { return new Runnable() { private final Map<String, String> contextMap = safeCopyOfContextMap(); @Override public void run() { safeSetContextMap(contextMap); try { r.run(); } finally { safeResetContextMap(); ...
java
public static Runnable withMDC(Runnable r) { return new Runnable() { private final Map<String, String> contextMap = safeCopyOfContextMap(); @Override public void run() { safeSetContextMap(contextMap); try { r.run(); } finally { safeResetContextMap(); ...
[ "public", "static", "Runnable", "withMDC", "(", "Runnable", "r", ")", "{", "return", "new", "Runnable", "(", ")", "{", "private", "final", "Map", "<", "String", ",", "String", ">", "contextMap", "=", "safeCopyOfContextMap", "(", ")", ";", "@", "Override", ...
Wrap a {@link Runnable} to use the {@link MDC} from the calling thread.
[ "Wrap", "a", "{" ]
0d63999beeb93a17447e3bbccaa62175b74cf6e4
https://github.com/spotify/styx/blob/0d63999beeb93a17447e3bbccaa62175b74cf6e4/styx-service-common/src/main/java/com/spotify/styx/util/MDCUtil.java#L59-L74
train
Creates a Runnable that will run the given Runnable in the context map.
Create a Java method that does the following: "Creates a Runnable that will run the given Runnable in the context map.".
Of course, here is the Java code you requested: ```java public static Runnable withMDC(Runnable r) { return new Runnable() { private final Map<String, String> contextMap = safeCopyOfContextMap(); @Override public void run() { safeSetContextMap(contextMap); try { r.run(...
aws/aws-sdk-java
aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java
AmazonRekognitionClient.describeCollection
@Override public DescribeCollectionResult describeCollection(DescribeCollectionRequest request) { request = beforeClientExecution(request); return executeDescribeCollection(request); }
java
@Override public DescribeCollectionResult describeCollection(DescribeCollectionRequest request) { request = beforeClientExecution(request); return executeDescribeCollection(request); }
[ "@", "Override", "public", "DescribeCollectionResult", "describeCollection", "(", "DescribeCollectionRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeCollection", "(", "request", ")", ";", "}" ]
<p> Describes the specified collection. You can use <code>DescribeCollection</code> to get information, such as the number of faces indexed into a collection and the version of the model used by the collection for face detection. </p> <p> For more information, see Describing a Collection in the Amazon Rekognition Devel...
[ "<p", ">", "Describes", "the", "specified", "collection", ".", "You", "can", "use", "<code", ">", "DescribeCollection<", "/", "code", ">", "to", "get", "information", "such", "as", "the", "number", "of", "faces", "indexed", "into", "a", "collection", "and", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java#L833-L837
train
Returns a description of a single entity type.
Create a Java method that does the following: "Returns a description of a single entity type.".
Of course, here is the Java code you requested: ```java @Override public DescribeCollectionResult describeCollection(DescribeCollectionRequest request) { request = beforeClientExecution(request); return executeDescribeCollection(request); } ``` Hope this helps!
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectNumeric
public void expectNumeric(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!StringUtils.isNumeric(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.NUMERIC_KEY.name(), name))); } }
java
public void expectNumeric(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!StringUtils.isNumeric(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.NUMERIC_KEY.name(), name))); } }
[ "public", "void", "expectNumeric", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "!", "StringUtils",...
Validates that a given field has a numeric value @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "that", "a", "given", "field", "has", "a", "numeric", "value" ]
b3beb6d09510dbbab0ed947d5069c463e1fda6e7
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L136-L142
train
Expect that the value of the name to be a numeric value.
Create a Java method that does the following: "Expect that the value of the name to be a numeric value.".
Of course, here is the Java code you requested: ```java public void expectNumeric(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!StringUtils.isNumeric(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.NUMERIC...
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/DitaIndexWriter.java
DitaIndexWriter.checkMatch
private boolean checkMatch() { if (matchList == null) { return true; } final int matchSize = matchList.size(); final int ancestorSize = topicIdList.size(); final List<String> tail = topicIdList.subList(ancestorSize - matchSize, ancestorSize); return matchList....
java
private boolean checkMatch() { if (matchList == null) { return true; } final int matchSize = matchList.size(); final int ancestorSize = topicIdList.size(); final List<String> tail = topicIdList.subList(ancestorSize - matchSize, ancestorSize); return matchList....
[ "private", "boolean", "checkMatch", "(", ")", "{", "if", "(", "matchList", "==", "null", ")", "{", "return", "true", ";", "}", "final", "int", "matchSize", "=", "matchList", ".", "size", "(", ")", ";", "final", "int", "ancestorSize", "=", "topicIdList", ...
check whether the hierarchy of current node match the matchList
[ "check", "whether", "the", "hierarchy", "of", "current", "node", "match", "the", "matchList" ]
ea776b3c60c03d9f033b6f7ea072349e49dbcdd2
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/DitaIndexWriter.java#L95-L103
train
Check if the topic list is the same as the topic list.
Create a Java method that does the following: "Check if the topic list is the same as the topic list.".
Of course, here is the Java code you requested: ```java private boolean checkMatch() { if (matchList == null) { return true; } final int matchSize = matchList.size(); final int ancestorSize = topicIdList.size(); final List<String> tail = topicIdList.subList(ancestorS...
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/smile/ShanksAgentBayesianReasoningCapability.java
ShanksAgentBayesianReasoningCapability.loadNetwork
public static Network loadNetwork(String networkPath) throws ShanksException { Network net = new Network(); net.readFile(networkPath); net.setBayesianAlgorithm(BayesianAlgorithmType.Lauritzen); net.updateBeliefs(); return net; }
java
public static Network loadNetwork(String networkPath) throws ShanksException { Network net = new Network(); net.readFile(networkPath); net.setBayesianAlgorithm(BayesianAlgorithmType.Lauritzen); net.updateBeliefs(); return net; }
[ "public", "static", "Network", "loadNetwork", "(", "String", "networkPath", ")", "throws", "ShanksException", "{", "Network", "net", "=", "new", "Network", "(", ")", ";", "net", ".", "readFile", "(", "networkPath", ")", ";", "net", ".", "setBayesianAlgorithm",...
Load a Bayesian network and return the probabilistic network object @param networkPath @return @throws ShanksException
[ "Load", "a", "Bayesian", "network", "and", "return", "the", "probabilistic", "network", "object" ]
35d87a81c22731f4f83bbd0571c9c6d466bd16be
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/smile/ShanksAgentBayesianReasoningCapability.java#L55-L62
train
Load a network from a file path.
Create a Java method that does the following: "Load a network from a file path.".
Of course, here is the Java code you requested: ```java public static Network loadNetwork(String networkPath) throws ShanksException { Network net = new Network(); net.readFile(networkPath); net.setBayesianAlgorithm(BayesianAlgorithmType.Lauritzen); net.updateBeliefs(); ...
stanfy/enroscar
net/src/main/java/com/stanfy/enroscar/net/operation/BaseRequestBuilder.java
BaseRequestBuilder.addBitmap
protected void addBitmap(final String name, final Bitmap bitmap, final String fileName) { final BitmapBinaryData bdata = new BitmapBinaryData(); bdata.setName(name); bdata.setContentName(fileName); bdata.setBitmap(bitmap); result.addBinaryData(bdata); }
java
protected void addBitmap(final String name, final Bitmap bitmap, final String fileName) { final BitmapBinaryData bdata = new BitmapBinaryData(); bdata.setName(name); bdata.setContentName(fileName); bdata.setBitmap(bitmap); result.addBinaryData(bdata); }
[ "protected", "void", "addBitmap", "(", "final", "String", "name", ",", "final", "Bitmap", "bitmap", ",", "final", "String", "fileName", ")", "{", "final", "BitmapBinaryData", "bdata", "=", "new", "BitmapBinaryData", "(", ")", ";", "bdata", ".", "setName", "(...
Setup binary content with the bitmap. @param name parameter name @param bitmap bitmap object @param fileName file name
[ "Setup", "binary", "content", "with", "the", "bitmap", "." ]
0e64f3c309d62e359b55ddcba10e3cc592f5e083
https://github.com/stanfy/enroscar/blob/0e64f3c309d62e359b55ddcba10e3cc592f5e083/net/src/main/java/com/stanfy/enroscar/net/operation/BaseRequestBuilder.java#L206-L212
test
Add a bitmap to the result.
Create a Java method that does the following: "Add a bitmap to the result.".
Of course, here is the Java code you requested: ```java protected void addBitmap(final String name, final Bitmap bitmap, final String fileName) { final BitmapBinaryData bdata = new BitmapBinaryData(); bdata.setName(name); bdata.setContentName(fileName); bdata.setBitmap(bitmap); result.addBinar...
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/spec/JobExecutionPlanDagFactory.java
JobExecutionPlanDagFactory.getDependencies
private static List<String> getDependencies(Config config) { return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays .asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>(); }
java
private static List<String> getDependencies(Config config) { return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays .asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>(); }
[ "private", "static", "List", "<", "String", ">", "getDependencies", "(", "Config", "config", ")", "{", "return", "config", ".", "hasPath", "(", "ConfigurationKeys", ".", "JOB_DEPENDENCIES", ")", "?", "Arrays", ".", "asList", "(", "config", ".", "getString", ...
Get job dependencies of a given job from its config. @param config of a job. @return a list of dependencies of the job.
[ "Get", "job", "dependencies", "of", "a", "given", "job", "from", "its", "config", "." ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/spec/JobExecutionPlanDagFactory.java#L90-L93
train
Get the dependencies from the configuration
Create a Java method that does the following: "Get the dependencies from the configuration".
Of course, here is the Java code you requested: ```java private static List<String> getDependencies(Config config) { return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays .asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>(); } ``` Hope this helps!
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/contents/ContentsIdExtension.java
ContentsIdExtension.delete
public boolean delete(String tableName) { boolean deleted = false; try { if (contentsIdDao.isTableExists()) { deleted = contentsIdDao.deleteByTableName(tableName) > 0; } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Contents Id extension table. GeoPackage: " ...
java
public boolean delete(String tableName) { boolean deleted = false; try { if (contentsIdDao.isTableExists()) { deleted = contentsIdDao.deleteByTableName(tableName) > 0; } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Contents Id extension table. GeoPackage: " ...
[ "public", "boolean", "delete", "(", "String", "tableName", ")", "{", "boolean", "deleted", "=", "false", ";", "try", "{", "if", "(", "contentsIdDao", ".", "isTableExists", "(", ")", ")", "{", "deleted", "=", "contentsIdDao", ".", "deleteByTableName", "(", ...
Delete the contents id for the table @param tableName table name @return true if deleted
[ "Delete", "the", "contents", "id", "for", "the", "table" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/contents/ContentsIdExtension.java#L297-L310
train
Delete the Contents Id extension table
Create a Java method that does the following: "Delete the Contents Id extension table".
Of course, here is the Java code you requested: ```java public boolean delete(String tableName) { boolean deleted = false; try { if (contentsIdDao.isTableExists()) { deleted = contentsIdDao.deleteByTableName(tableName) > 0; } } catch (SQLException e) { throw new GeoPackageException( "Failed to ...
apptik/JustJson
json-schema/src/main/java/io/apptik/json/schema/validation/CommonMatchers.java
CommonMatchers.isOfType
public static Matcher<JsonElement> isOfType(final String type) { return new TypeSafeDiagnosingMatcher<JsonElement>() { @Override protected boolean matchesSafely(JsonElement item, Description mismatchDescription) { if (type.equals(item.getJsonType())) r...
java
public static Matcher<JsonElement> isOfType(final String type) { return new TypeSafeDiagnosingMatcher<JsonElement>() { @Override protected boolean matchesSafely(JsonElement item, Description mismatchDescription) { if (type.equals(item.getJsonType())) r...
[ "public", "static", "Matcher", "<", "JsonElement", ">", "isOfType", "(", "final", "String", "type", ")", "{", "return", "new", "TypeSafeDiagnosingMatcher", "<", "JsonElement", ">", "(", ")", "{", "@", "Override", "protected", "boolean", "matchesSafely", "(", "...
==> COMMON ==>
[ "==", ">", "COMMON", "==", ">" ]
c90f0dd7f84df26da4749be8cd9b026fff499a79
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-schema/src/main/java/io/apptik/json/schema/validation/CommonMatchers.java#L220-L237
train
Returns a matcher that matches any element of the given type.
Create a Java method that does the following: "Returns a matcher that matches any element of the given type.".
Of course, here is the Java code you requested: ```java public static Matcher<JsonElement> isOfType(final String type) { return new TypeSafeDiagnosingMatcher<JsonElement>() { @Override protected boolean matchesSafely(JsonElement item, Description mismatchDescription) { i...
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion7.java
CmsImportVersion7.setFlags
public void setFlags(String flags) { try { m_flags = Integer.parseInt(flags); } catch (Throwable e) { setThrowable(e); } }
java
public void setFlags(String flags) { try { m_flags = Integer.parseInt(flags); } catch (Throwable e) { setThrowable(e); } }
[ "public", "void", "setFlags", "(", "String", "flags", ")", "{", "try", "{", "m_flags", "=", "Integer", ".", "parseInt", "(", "flags", ")", ";", "}", "catch", "(", "Throwable", "e", ")", "{", "setThrowable", "(", "e", ")", ";", "}", "}" ]
Sets the flags.<p> @param flags the flags to set @see #N_FLAGS @see #addResourceAttributesRules(Digester, String)
[ "Sets", "the", "flags", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion7.java#L2455-L2462
train
Sets the flags.
Create a Java method that does the following: "Sets the flags.".
Of course, here is the Java code you requested: ```java public void setFlags(String flags) { try { m_flags = Integer.parseInt(flags); } catch (Throwable e) { setThrowable(e); } } ``` Hope this helps!
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.createMDAGNode
private void createMDAGNode(SimpleMDAGNode current, int fromIndex, MDAGNode[] toNodeArray, MDAGNode[] fromNodeArray) { MDAGNode from = (fromIndex == -1 ? sourceNode : toNodeArray[fromIndex]); int transitionSetBegin = current.getTransitionSetBeginIndex(); int onePastTransitionSetEnd = transit...
java
private void createMDAGNode(SimpleMDAGNode current, int fromIndex, MDAGNode[] toNodeArray, MDAGNode[] fromNodeArray) { MDAGNode from = (fromIndex == -1 ? sourceNode : toNodeArray[fromIndex]); int transitionSetBegin = current.getTransitionSetBeginIndex(); int onePastTransitionSetEnd = transit...
[ "private", "void", "createMDAGNode", "(", "SimpleMDAGNode", "current", ",", "int", "fromIndex", ",", "MDAGNode", "[", "]", "toNodeArray", ",", "MDAGNode", "[", "]", "fromNodeArray", ")", "{", "MDAGNode", "from", "=", "(", "fromIndex", "==", "-", "1", "?", ...
递归创建节点<br> @param current 当前简易节点 @param fromIndex 起点下标 @param toNodeArray 终点数组 @param fromNodeArray 起点数组,它们两个按照下标一一对应
[ "递归创建节点<br", ">" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L804-L823
train
Create the MDAGNode.
Create a Java method that does the following: "Create the MDAGNode.".
Of course, here is the Java code you requested: ```java private void createMDAGNode(SimpleMDAGNode current, int fromIndex, MDAGNode[] toNodeArray, MDAGNode[] fromNodeArray) { MDAGNode from = (fromIndex == -1 ? sourceNode : toNodeArray[fromIndex]); int transitionSetBegin = current.getTransitionSetBe...
dita-ot/dita-ot
src/main/java/org/dita/dost/reader/KeyrefReader.java
KeyrefReader.read
public void read(final URI filename, final Document doc) { currentFile = filename; rootScope = null; // TODO: use KeyScope implementation that retains order KeyScope keyScope = readScopes(doc); keyScope = cascadeChildKeys(keyScope); // TODO: determine effective key defini...
java
public void read(final URI filename, final Document doc) { currentFile = filename; rootScope = null; // TODO: use KeyScope implementation that retains order KeyScope keyScope = readScopes(doc); keyScope = cascadeChildKeys(keyScope); // TODO: determine effective key defini...
[ "public", "void", "read", "(", "final", "URI", "filename", ",", "final", "Document", "doc", ")", "{", "currentFile", "=", "filename", ";", "rootScope", "=", "null", ";", "// TODO: use KeyScope implementation that retains order", "KeyScope", "keyScope", "=", "readSco...
Read key definitions @param filename absolute URI to DITA map with key definitions @param doc key definition DITA map
[ "Read", "key", "definitions" ]
ea776b3c60c03d9f033b6f7ea072349e49dbcdd2
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L100-L109
train
Read a single document from the specified file.
Create a Java method that does the following: "Read a single document from the specified file.".
Of course, here is the Java code you requested: ```java public void read(final URI filename, final Document doc) { currentFile = filename; rootScope = null; // TODO: use KeyScope implementation that retains order KeyScope keyScope = readScopes(doc); keyScope = cascadeChildKeys(k...
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/views/filters/Toggle.java
Toggle.setAttribute
public final void setAttribute(@NonNull String newAttribute) { searcher.removeFacet(attribute).addFacet(newAttribute); updateRefinementWithNewName(newAttribute); attribute = newAttribute; }
java
public final void setAttribute(@NonNull String newAttribute) { searcher.removeFacet(attribute).addFacet(newAttribute); updateRefinementWithNewName(newAttribute); attribute = newAttribute; }
[ "public", "final", "void", "setAttribute", "(", "@", "NonNull", "String", "newAttribute", ")", "{", "searcher", ".", "removeFacet", "(", "attribute", ")", ".", "addFacet", "(", "newAttribute", ")", ";", "updateRefinementWithNewName", "(", "newAttribute", ")", ";...
Changes the Toggle's attribute, updating facet refinements accordingly. @param newAttribute the attribute's new name.
[ "Changes", "the", "Toggle", "s", "attribute", "updating", "facet", "refinements", "accordingly", "." ]
12092ec30140df9ffc2bf916339b433372034616
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/views/filters/Toggle.java#L68-L72
train
Sets the attribute of the class.
Create a Java method that does the following: "Sets the attribute of the class.".
Of course, here is the Java code you requested: ```java public final void setAttribute(@NonNull String newAttribute) { searcher.removeFacet(attribute).addFacet(newAttribute); updateRefinementWithNewName(newAttribute); attribute = newAttribute; } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/TimeStatisticImpl.java
TimeStatisticImpl.rateOfChange
public WSStatistic rateOfChange(WSStatistic otherStat) { if (!validate(otherStat)) { return null; } TimeStatisticImpl other = (TimeStatisticImpl) otherStat; TimeStatisticImpl newData = new TimeStatisticImpl(id); long timeDiff = lastSampleTime - other.lastSampleTime; ...
java
public WSStatistic rateOfChange(WSStatistic otherStat) { if (!validate(otherStat)) { return null; } TimeStatisticImpl other = (TimeStatisticImpl) otherStat; TimeStatisticImpl newData = new TimeStatisticImpl(id); long timeDiff = lastSampleTime - other.lastSampleTime; ...
[ "public", "WSStatistic", "rateOfChange", "(", "WSStatistic", "otherStat", ")", "{", "if", "(", "!", "validate", "(", "otherStat", ")", ")", "{", "return", "null", ";", "}", "TimeStatisticImpl", "other", "=", "(", "TimeStatisticImpl", ")", "otherStat", ";", "...
Can just invoke super(), but for casting purposes, reimplement. @see com.ibm.websphere.pmi.stat.WSStatistic#rateOfChange(com.ibm.websphere.pmi.stat.WSStatistic)
[ "Can", "just", "invoke", "super", "()", "but", "for", "casting", "purposes", "reimplement", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/TimeStatisticImpl.java#L149-L173
train
Rate of change.
Create a Java method that does the following: "Rate of change.".
Of course, here is the Java code you requested: ```java public WSStatistic rateOfChange(WSStatistic otherStat) { if (!validate(otherStat)) { return null; } TimeStatisticImpl other = (TimeStatisticImpl) otherStat; TimeStatisticImpl newData = new TimeStatisticImpl(id); ...
michael-rapp/AndroidMaterialViews
library/src/main/java/de/mrapp/android/view/FloatingActionButton.java
FloatingActionButton.createDisabledBackgroundDrawable
private Drawable createDisabledBackgroundDrawable() { Drawable drawable = createBackgroundDrawable(getColor()); Drawable hoverDrawable = createBackgroundDrawable(getDisabledColor()); return new LayerDrawable(new Drawable[]{drawable, hoverDrawable}); }
java
private Drawable createDisabledBackgroundDrawable() { Drawable drawable = createBackgroundDrawable(getColor()); Drawable hoverDrawable = createBackgroundDrawable(getDisabledColor()); return new LayerDrawable(new Drawable[]{drawable, hoverDrawable}); }
[ "private", "Drawable", "createDisabledBackgroundDrawable", "(", ")", "{", "Drawable", "drawable", "=", "createBackgroundDrawable", "(", "getColor", "(", ")", ")", ";", "Drawable", "hoverDrawable", "=", "createBackgroundDrawable", "(", "getDisabledColor", "(", ")", ")"...
Creates and returns a drawable, which can be used as the floating action button's background, when it is disabled. @return The drawable, which has been created, as an instance of the class {@link Drawable}
[ "Creates", "and", "returns", "a", "drawable", "which", "can", "be", "used", "as", "the", "floating", "action", "button", "s", "background", "when", "it", "is", "disabled", "." ]
398421be462fe5793c7e3a9212949e06236a7c2f
https://github.com/michael-rapp/AndroidMaterialViews/blob/398421be462fe5793c7e3a9212949e06236a7c2f/library/src/main/java/de/mrapp/android/view/FloatingActionButton.java#L407-L411
valid
Create a background drawable that is disabled.
Create a Java method that does the following: "Create a background drawable that is disabled.".
Of course, here is the Java code you requested: ```java private Drawable createDisabledBackgroundDrawable() { Drawable drawable = createBackgroundDrawable(getColor()); Drawable hoverDrawable = createBackgroundDrawable(getDisabledColor()); return new LayerDrawable(new Drawable[]{drawable, hoverD...
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java
BasicModMixer.setNewInstrumentAndPeriod
protected void setNewInstrumentAndPeriod(final ChannelMemory aktMemo) { final PatternElement element = aktMemo.currentElement; // if ((element.getPeriod()>0 || element.getNoteIndex()>0) && !isPorta) // New Note Effekt // { // checkForNNA(aktMemo); // } Sample newSample = null; // If we have an instrument se...
java
protected void setNewInstrumentAndPeriod(final ChannelMemory aktMemo) { final PatternElement element = aktMemo.currentElement; // if ((element.getPeriod()>0 || element.getNoteIndex()>0) && !isPorta) // New Note Effekt // { // checkForNNA(aktMemo); // } Sample newSample = null; // If we have an instrument se...
[ "protected", "void", "setNewInstrumentAndPeriod", "(", "final", "ChannelMemory", "aktMemo", ")", "{", "final", "PatternElement", "element", "=", "aktMemo", ".", "currentElement", ";", "//\t\tif ((element.getPeriod()>0 || element.getNoteIndex()>0) && !isPorta) // New Note Effekt", ...
}
[ "}" ]
cda4fe943a589dc49415f4413453e2eece72076a
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java#L876-L966
train
Sets the New Instrument and Period values
Create a Java method that does the following: "Sets the New Instrument and Period values".
Of course, here is the Java code you requested: ```java protected void setNewInstrumentAndPeriod(final ChannelMemory aktMemo) { final PatternElement element = aktMemo.currentElement; // if ((element.getPeriod()>0 || element.getNoteIndex()>0) && !isPorta) // New Note Effekt // { // checkForNNA(aktMemo); // } ...
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/o/MonthlySearchVolumeAttribute.java
MonthlySearchVolumeAttribute.getValue
public com.google.api.ads.adwords.axis.v201809.o.MonthlySearchVolume[] getValue() { return value; }
java
public com.google.api.ads.adwords.axis.v201809.o.MonthlySearchVolume[] getValue() { return value; }
[ "public", "com", ".", "google", ".", "api", ".", "ads", ".", "adwords", ".", "axis", ".", "v201809", ".", "o", ".", "MonthlySearchVolume", "[", "]", "getValue", "(", ")", "{", "return", "value", ";", "}" ]
Gets the value value for this MonthlySearchVolumeAttribute. @return value * List of {@link MonthlySearchVolume} values contained by this {@link Attribute}. The list contains the data for the past 12 months (excluding the current month) in sorted order started with the most recent month. <span class="constraint Requi...
[ "Gets", "the", "value", "value", "for", "this", "MonthlySearchVolumeAttribute", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/o/MonthlySearchVolumeAttribute.java#L74-L76
train
Gets the value for this CIDCTYPE.
Create a Java method that does the following: "Gets the value for this CIDCTYPE.".
Of course, here is the Java code you requested: ```java public com.google.api.ads.adwords.axis.v201809.o.MonthlySearchVolume[] getValue() { return value; } ``` Hope this helps!
h2oai/h2o-2
src/main/java/water/fvec/NewChunk.java
NewChunk.chunkUUID
private Chunk chunkUUID() { final byte [] bs = MemoryManager.malloc1(_len*16,true); int j = 0; for( int i = 0; i < _len; ++i ) { long lo = 0, hi=0; if(_id == null || _id.length == 0 || (j < _id.length && _id[j] == i ) ) { lo = _ls[j]; hi = Double.doubleToRawLongBits(_ds[j++]); ...
java
private Chunk chunkUUID() { final byte [] bs = MemoryManager.malloc1(_len*16,true); int j = 0; for( int i = 0; i < _len; ++i ) { long lo = 0, hi=0; if(_id == null || _id.length == 0 || (j < _id.length && _id[j] == i ) ) { lo = _ls[j]; hi = Double.doubleToRawLongBits(_ds[j++]); ...
[ "private", "Chunk", "chunkUUID", "(", ")", "{", "final", "byte", "[", "]", "bs", "=", "MemoryManager", ".", "malloc1", "(", "_len", "*", "16", ",", "true", ")", ";", "int", "j", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Compute a compressed UUID buffer
[ "Compute", "a", "compressed", "UUID", "buffer" ]
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/fvec/NewChunk.java#L917-L934
train
Returns a Chunk of UUIDs.
Create a Java method that does the following: "Returns a Chunk of UUIDs.".
Of course, here is the Java code you requested: ```java private Chunk chunkUUID() { final byte [] bs = MemoryManager.malloc1(_len*16,true); int j = 0; for( int i = 0; i < _len; ++i ) { long lo = 0, hi=0; if(_id == null || _id.length == 0 || (j < _id.length && _id[j] == i ) ) { lo = _ls[...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerSICoreConnectionListener.java
ServerSICoreConnectionListener.sendMeNotificationEvent
private void sendMeNotificationEvent(short eventId, SICoreConnection conn, ConsumerSession sess, Throwable t) throws SIConnectionLostException, SIConnectionDroppedException, SIConnectionUnavailableException { if (TraceComponent.isAnyTracingEnabled() &&...
java
private void sendMeNotificationEvent(short eventId, SICoreConnection conn, ConsumerSession sess, Throwable t) throws SIConnectionLostException, SIConnectionDroppedException, SIConnectionUnavailableException { if (TraceComponent.isAnyTracingEnabled() &&...
[ "private", "void", "sendMeNotificationEvent", "(", "short", "eventId", ",", "SICoreConnection", "conn", ",", "ConsumerSession", "sess", ",", "Throwable", "t", ")", "throws", "SIConnectionLostException", ",", "SIConnectionDroppedException", ",", "SIConnectionUnavailableExcep...
This private method will actually send the notification to the client using the specified event Id. @param eventId The event ID @param conn The core connection that is dieing @param sess The Consumer Session that generated the exception @param t The exception to be sent back @throws SIConnectionLostException @throws ...
[ "This", "private", "method", "will", "actually", "send", "the", "notification", "to", "the", "client", "using", "the", "specified", "event", "Id", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerSICoreConnectionListener.java#L321-L447
train
This method is called by the SIBConnection when a notification is received from a ME.
Create a Java method that does the following: "This method is called by the SIBConnection when a notification is received from a ME.".
Of course, here is the Java code you requested: ```java private void sendMeNotificationEvent(short eventId, SICoreConnection conn, ConsumerSession sess, Throwable t) throws SIConnectionLostException, SIConnectionDroppedException, SIConnectionUnavailableExcept...
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/MathExpressions.java
MathExpressions.random
public static NumberExpression<Double> random(int seed) { return Expressions.numberOperation(Double.class, MathOps.RANDOM2, ConstantImpl.create(seed)); }
java
public static NumberExpression<Double> random(int seed) { return Expressions.numberOperation(Double.class, MathOps.RANDOM2, ConstantImpl.create(seed)); }
[ "public", "static", "NumberExpression", "<", "Double", ">", "random", "(", "int", "seed", ")", "{", "return", "Expressions", ".", "numberOperation", "(", "Double", ".", "class", ",", "MathOps", ".", "RANDOM2", ",", "ConstantImpl", ".", "create", "(", "seed",...
Return a random number expression with the given seed @param seed seed @return random(seed)
[ "Return", "a", "random", "number", "expression", "with", "the", "given", "seed" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/MathExpressions.java#L222-L224
train
Create a random number expression
Create a Java method that does the following: "Create a random number expression".
Of course, here is the Java code you requested: ```java public static NumberExpression<Double> random(int seed) { return Expressions.numberOperation(Double.class, MathOps.RANDOM2, ConstantImpl.create(seed)); } ``` Hope this helps!
dita-ot/dita-ot
src/main/java/org/dita/dost/module/ChunkModule.java
ChunkModule.hasChanges
private boolean hasChanges(final Map<URI, URI> changeTable) { if (changeTable.isEmpty()) { return false; } for (Map.Entry<URI, URI> e : changeTable.entrySet()) { if (!e.getKey().equals(e.getValue())) { return true; } } return fa...
java
private boolean hasChanges(final Map<URI, URI> changeTable) { if (changeTable.isEmpty()) { return false; } for (Map.Entry<URI, URI> e : changeTable.entrySet()) { if (!e.getKey().equals(e.getValue())) { return true; } } return fa...
[ "private", "boolean", "hasChanges", "(", "final", "Map", "<", "URI", ",", "URI", ">", "changeTable", ")", "{", "if", "(", "changeTable", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "Map", ".", "Entry", "<", "URI", "...
Test whether there are changes that require topic rewriting.
[ "Test", "whether", "there", "are", "changes", "that", "require", "topic", "rewriting", "." ]
ea776b3c60c03d9f033b6f7ea072349e49dbcdd2
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/ChunkModule.java#L102-L112
train
Check if the change table contains changes.
Create a Java method that does the following: "Check if the change table contains changes.".
Of course, here is the Java code you requested: ```java private boolean hasChanges(final Map<URI, URI> changeTable) { if (changeTable.isEmpty()) { return false; } for (Map.Entry<URI, URI> e : changeTable.entrySet()) { if (!e.getKey().equals(e.getValue())) { ...
pushtorefresh/storio
storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/execute/PreparedExecuteSQL.java
PreparedExecuteSQL.executeAsBlocking
@WorkerThread @NonNull @Override public Object executeAsBlocking() { return buildChain(storIOSQLite.interceptors(), new RealCallInterceptor()) .proceed(this); }
java
@WorkerThread @NonNull @Override public Object executeAsBlocking() { return buildChain(storIOSQLite.interceptors(), new RealCallInterceptor()) .proceed(this); }
[ "@", "WorkerThread", "@", "NonNull", "@", "Override", "public", "Object", "executeAsBlocking", "(", ")", "{", "return", "buildChain", "(", "storIOSQLite", ".", "interceptors", "(", ")", ",", "new", "RealCallInterceptor", "(", ")", ")", ".", "proceed", "(", "...
Executes SQL Operation immediately in current thread. <p> Notice: This is blocking I/O operation that should not be executed on the Main Thread, it can cause ANR (Activity Not Responding dialog), block the UI and drop animations frames. So please, call this method on some background thread. See {@link WorkerThread}. @...
[ "Executes", "SQL", "Operation", "immediately", "in", "current", "thread", ".", "<p", ">", "Notice", ":", "This", "is", "blocking", "I", "/", "O", "operation", "that", "should", "not", "be", "executed", "on", "the", "Main", "Thread", "it", "can", "cause", ...
58f53d81bcc7b069c8bb271c46a90e37775abe8d
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/execute/PreparedExecuteSQL.java#L53-L59
train
Execute as blocking.
Create a Java method that does the following: "Execute as blocking.".
Of course, here is the Java code you requested: ```java @WorkerThread @NonNull @Override public Object executeAsBlocking() { return buildChain(storIOSQLite.interceptors(), new RealCallInterceptor()) .proceed(this); } ``` Hope this helps!
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/jdbc/Util.java
Util.autoMap
@SuppressWarnings("unchecked") static <T> T autoMap(ResultSet rs, Class<T> cls) { try { if (cls.isInterface()) { return autoMapInterface(rs, cls); } else { int n = rs.getMetaData().getColumnCount(); for (Constructor<?> c : cls.getDeclar...
java
@SuppressWarnings("unchecked") static <T> T autoMap(ResultSet rs, Class<T> cls) { try { if (cls.isInterface()) { return autoMapInterface(rs, cls); } else { int n = rs.getMetaData().getColumnCount(); for (Constructor<?> c : cls.getDeclar...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "<", "T", ">", "T", "autoMap", "(", "ResultSet", "rs", ",", "Class", "<", "T", ">", "cls", ")", "{", "try", "{", "if", "(", "cls", ".", "isInterface", "(", ")", ")", "{", "return", "auto...
Converts the ResultSet column values into parameters to the constructor (with number of parameters equals the number of columns) of type <code>T</code> then returns an instance of type <code>T</code>. See See {@link Builder#autoMap(Class)}. @param cls the class of the resultant instance @return an automapped instance
[ "Converts", "the", "ResultSet", "column", "values", "into", "parameters", "to", "the", "constructor", "(", "with", "number", "of", "parameters", "equals", "the", "number", "of", "columns", ")", "of", "type", "<code", ">", "T<", "/", "code", ">", "then", "r...
81e157d7071a825086bde81107b8694684cdff14
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/jdbc/Util.java#L275-L293
train
A method to auto map a class to an object.
Create a Java method that does the following: "A method to auto map a class to an object.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") static <T> T autoMap(ResultSet rs, Class<T> cls) { try { if (cls.isInterface()) { return autoMapInterface(rs, cls); } else { int n = rs.getMetaData().getColumnCount...
Unidata/thredds
cdm/src/main/java/ucar/unidata/geoloc/projection/proj4/LambertConformalConicEllipse.java
LambertConformalConicEllipse.paramsToString
public String paramsToString() { Formatter f = new Formatter(); f.format("origin lat,lon=%f,%f parellels=%f,%f earth=%s", lat0deg, lon0deg, par1deg, par2deg, earth ); return f.toString(); }
java
public String paramsToString() { Formatter f = new Formatter(); f.format("origin lat,lon=%f,%f parellels=%f,%f earth=%s", lat0deg, lon0deg, par1deg, par2deg, earth ); return f.toString(); }
[ "public", "String", "paramsToString", "(", ")", "{", "Formatter", "f", "=", "new", "Formatter", "(", ")", ";", "f", ".", "format", "(", "\"origin lat,lon=%f,%f parellels=%f,%f earth=%s\"", ",", "lat0deg", ",", "lon0deg", ",", "par1deg", ",", "par2deg", ",", "e...
Create a String of the parameters. @return a String of the parameters
[ "Create", "a", "String", "of", "the", "parameters", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/unidata/geoloc/projection/proj4/LambertConformalConicEllipse.java#L375-L379
test
Returns a string representation of the parameters.
Create a Java method that does the following: "Returns a string representation of the parameters.".
Of course, here is the Java code you requested: ```java public String paramsToString() { Formatter f = new Formatter(); f.format("origin lat,lon=%f,%f parellels=%f,%f earth=%s", lat0deg, lon0deg, par1deg, par2deg, earth ); return f.toString(); } ``` Hope this helps!
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java
GetImageServlet.setVerificationHeaders
public static void setVerificationHeaders(HttpServletResponse response, File file) throws IOException { response.setHeader(TransferFsImage.CONTENT_LENGTH, String.valueOf(file.length())); MD5Hash hash = MD5FileUtils.readStoredMd5ForFile(file); if (hash != null) { response.setHeader(TransferFs...
java
public static void setVerificationHeaders(HttpServletResponse response, File file) throws IOException { response.setHeader(TransferFsImage.CONTENT_LENGTH, String.valueOf(file.length())); MD5Hash hash = MD5FileUtils.readStoredMd5ForFile(file); if (hash != null) { response.setHeader(TransferFs...
[ "public", "static", "void", "setVerificationHeaders", "(", "HttpServletResponse", "response", ",", "File", "file", ")", "throws", "IOException", "{", "response", ".", "setHeader", "(", "TransferFsImage", ".", "CONTENT_LENGTH", ",", "String", ".", "valueOf", "(", "...
Set headers for content length, and, if available, md5. @throws IOException
[ "Set", "headers", "for", "content", "length", "and", "if", "available", "md5", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java#L168-L176
train
Set the verification headers for the file
Create a Java method that does the following: "Set the verification headers for the file".
Of course, here is the Java code you requested: ```java public static void setVerificationHeaders(HttpServletResponse response, File file) throws IOException { response.setHeader(TransferFsImage.CONTENT_LENGTH, String.valueOf(file.length())); MD5Hash hash = MD5FileUtils.readStoredMd5ForFile(file); ...
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/graph/AbstractGraph.java
AbstractGraph.remove
public boolean remove(Edge e) { EdgeSet<T> from = getEdgeSet(e.from()); EdgeSet<T> to = getEdgeSet(e.to()); int before = numEdges; if (from != null && from.remove(e)) { numEdges--; assert to.contains(e) : "Complementary edge set " + to + "...
java
public boolean remove(Edge e) { EdgeSet<T> from = getEdgeSet(e.from()); EdgeSet<T> to = getEdgeSet(e.to()); int before = numEdges; if (from != null && from.remove(e)) { numEdges--; assert to.contains(e) : "Complementary edge set " + to + "...
[ "public", "boolean", "remove", "(", "Edge", "e", ")", "{", "EdgeSet", "<", "T", ">", "from", "=", "getEdgeSet", "(", "e", ".", "from", "(", ")", ")", ";", "EdgeSet", "<", "T", ">", "to", "=", "getEdgeSet", "(", "e", ".", "to", "(", ")", ")", ...
{@inheritDoc} <p> This method is sensitive to the vertex ordering; a call will remove the vertex for {@code e.to()} from the edge for {@code e.from()}. Subclasses should override this method if their {@link EdgeSet} implementations are sensitive to the ordering of the vertex indices, or if a more advanced behavior is ...
[ "{", "@inheritDoc", "}" ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/graph/AbstractGraph.java#L356-L371
train
Remove an edge from the set.
Create a Java method that does the following: "Remove an edge from the set.".
Of course, here is the Java code you requested: ```java public boolean remove(Edge e) { EdgeSet<T> from = getEdgeSet(e.from()); EdgeSet<T> to = getEdgeSet(e.to()); int before = numEdges; if (from != null && from.remove(e)) { numEdges--; assert to.contain...
voldemort/voldemort
src/java/voldemort/tools/admin/AdminParserUtils.java
AdminParserUtils.acceptsStoreSingle
public static void acceptsStoreSingle(OptionParser parser) { parser.acceptsAll(Arrays.asList(OPT_S, OPT_STORE), "store name") .withRequiredArg() .describedAs("store-name") .ofType(String.class); }
java
public static void acceptsStoreSingle(OptionParser parser) { parser.acceptsAll(Arrays.asList(OPT_S, OPT_STORE), "store name") .withRequiredArg() .describedAs("store-name") .ofType(String.class); }
[ "public", "static", "void", "acceptsStoreSingle", "(", "OptionParser", "parser", ")", "{", "parser", ".", "acceptsAll", "(", "Arrays", ".", "asList", "(", "OPT_S", ",", "OPT_STORE", ")", ",", "\"store name\"", ")", ".", "withRequiredArg", "(", ")", ".", "des...
Adds OPT_S | OPT_STORE option to OptionParser, with one argument. @param parser OptionParser to be modified @param required Tells if this option is required or optional
[ "Adds", "OPT_S", "|", "OPT_STORE", "option", "to", "OptionParser", "with", "one", "argument", "." ]
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/AdminParserUtils.java#L200-L205
train
Adds OPT_S | OPT_STORE option to OptionParser with one argument.
Create a Java method that does the following: "Adds OPT_S | OPT_STORE option to OptionParser with one argument.".
Of course, here is the Java code you requested: ```java public static void acceptsStoreSingle(OptionParser parser) { parser.acceptsAll(Arrays.asList(OPT_S, OPT_STORE), "store name") .withRequiredArg() .describedAs("store-name") .ofType(String.class); } ``` Hope th...
aws/aws-sdk-java
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListBillingGroupsResult.java
ListBillingGroupsResult.withBillingGroups
public ListBillingGroupsResult withBillingGroups(GroupNameAndArn... billingGroups) { if (this.billingGroups == null) { setBillingGroups(new java.util.ArrayList<GroupNameAndArn>(billingGroups.length)); } for (GroupNameAndArn ele : billingGroups) { this.billingGroups.add(el...
java
public ListBillingGroupsResult withBillingGroups(GroupNameAndArn... billingGroups) { if (this.billingGroups == null) { setBillingGroups(new java.util.ArrayList<GroupNameAndArn>(billingGroups.length)); } for (GroupNameAndArn ele : billingGroups) { this.billingGroups.add(el...
[ "public", "ListBillingGroupsResult", "withBillingGroups", "(", "GroupNameAndArn", "...", "billingGroups", ")", "{", "if", "(", "this", ".", "billingGroups", "==", "null", ")", "{", "setBillingGroups", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "Grou...
<p> The list of billing groups. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setBillingGroups(java.util.Collection)} or {@link #withBillingGroups(java.util.Collection)} if you want to override the existing values. </p> @param billingGroups The list of billing groups. ...
[ "<p", ">", "The", "list", "of", "billing", "groups", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", ".", "Use...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListBillingGroupsResult.java#L79-L87
train
A list of the billing groups.
Create a Java method that does the following: "A list of the billing groups.".
Of course, here is the Java code you requested: ```java public ListBillingGroupsResult withBillingGroups(GroupNameAndArn... billingGroups) { if (this.billingGroups == null) { setBillingGroups(new java.util.ArrayList<GroupNameAndArn>(billingGroups.length)); } for (GroupNameAndArn ele...
dashbuilder/dashbuilder
dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java
AbstractDisplayer.filterApply
public void filterApply(String columnId, List<Interval> intervalList) { if (displayerSettings.isFilterEnabled()) { // For string column filters, init the group interval selection operation. DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId); groupOp.setSelecte...
java
public void filterApply(String columnId, List<Interval> intervalList) { if (displayerSettings.isFilterEnabled()) { // For string column filters, init the group interval selection operation. DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId); groupOp.setSelecte...
[ "public", "void", "filterApply", "(", "String", "columnId", ",", "List", "<", "Interval", ">", "intervalList", ")", "{", "if", "(", "displayerSettings", ".", "isFilterEnabled", "(", ")", ")", "{", "// For string column filters, init the group interval selection operatio...
Filter the values of the given column. @param columnId The name of the column to filter. @param intervalList A list of interval selections to filter for.
[ "Filter", "the", "values", "of", "the", "given", "column", "." ]
50ef88210726b4f2f33f1a82eaf0f542e38dedd9
https://github.com/dashbuilder/dashbuilder/blob/50ef88210726b4f2f33f1a82eaf0f542e38dedd9/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java#L651-L670
train
Filter apply method.
Create a Java method that does the following: "Filter apply method.".
Of course, here is the Java code you requested: ```java public void filterApply(String columnId, List<Interval> intervalList) { if (displayerSettings.isFilterEnabled()) { // For string column filters, init the group interval selection operation. DataSetGroup groupOp = dataSetHandler.ge...
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/SQSConnection.java
SQSConnection.createConnectionConsumer
@Override public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { throw new JMSException(SQSMessagingClientConstants.UNSUPPORTED_METHOD); }
java
@Override public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { throw new JMSException(SQSMessagingClientConstants.UNSUPPORTED_METHOD); }
[ "@", "Override", "public", "ConnectionConsumer", "createConnectionConsumer", "(", "Destination", "destination", ",", "String", "messageSelector", ",", "ServerSessionPool", "sessionPool", ",", "int", "maxMessages", ")", "throws", "JMSException", "{", "throw", "new", "JMS...
This method is not supported.
[ "This", "method", "is", "not", "supported", "." ]
efa716d34d51ef1c5572790626cdb795419cb342
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/SQSConnection.java#L494-L498
train
Create a connection consumer.
Create a Java method that does the following: "Create a connection consumer.".
Of course, here is the Java code you requested: ```java @Override public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { throw new JMSException(SQSMessagingClientConstants.UNSUPPOR...
kaichunlin/android-transition
core/src/main/java/com/kaichunlin/transition/ViewTransitionBuilder.java
ViewTransitionBuilder.animator
public ViewTransitionBuilder animator(@NonNull final Animator animator) { addSetup(new ViewTransition.Setup() { @Override public void setupAnimation(@NonNull final TransitionControllerManager manager) { Animator animator2 = animator.clone(); if (animator2 ...
java
public ViewTransitionBuilder animator(@NonNull final Animator animator) { addSetup(new ViewTransition.Setup() { @Override public void setupAnimation(@NonNull final TransitionControllerManager manager) { Animator animator2 = animator.clone(); if (animator2 ...
[ "public", "ViewTransitionBuilder", "animator", "(", "@", "NonNull", "final", "Animator", "animator", ")", "{", "addSetup", "(", "new", "ViewTransition", ".", "Setup", "(", ")", "{", "@", "Override", "public", "void", "setupAnimation", "(", "@", "NonNull", "fin...
TODO Current support is rudimentary, may expand support if there are enough demand for this. <p> Converts an animator to ITransition when built, note that not all functions of Animator are supported. <p> Non-working functions: repeatMode, repeatCount, delay, duration (when in a set), Interpolator. <p> Furthermore, {@li...
[ "TODO", "Current", "support", "is", "rudimentary", "may", "expand", "support", "if", "there", "are", "enough", "demand", "for", "this", ".", "<p", ">", "Converts", "an", "animator", "to", "ITransition", "when", "built", "note", "that", "not", "all", "functio...
7b53074206622f5cf5d82091d891a7ed8b9f06cd
https://github.com/kaichunlin/android-transition/blob/7b53074206622f5cf5d82091d891a7ed8b9f06cd/core/src/main/java/com/kaichunlin/transition/ViewTransitionBuilder.java#L459-L472
train
Add an animator to the view transition.
Create a Java method that does the following: "Add an animator to the view transition.".
Of course, here is the Java code you requested: ```java public ViewTransitionBuilder animator(@NonNull final Animator animator) { addSetup(new ViewTransition.Setup() { @Override public void setupAnimation(@NonNull final TransitionControllerManager manager) { Animator ani...
aws/aws-sdk-java
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/Workteam.java
Workteam.setProductListingIds
public void setProductListingIds(java.util.Collection<String> productListingIds) { if (productListingIds == null) { this.productListingIds = null; return; } this.productListingIds = new java.util.ArrayList<String>(productListingIds); }
java
public void setProductListingIds(java.util.Collection<String> productListingIds) { if (productListingIds == null) { this.productListingIds = null; return; } this.productListingIds = new java.util.ArrayList<String>(productListingIds); }
[ "public", "void", "setProductListingIds", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "productListingIds", ")", "{", "if", "(", "productListingIds", "==", "null", ")", "{", "this", ".", "productListingIds", "=", "null", ";", "return", ";...
<p> The Amazon Marketplace identifier for a vendor's work team. </p> @param productListingIds The Amazon Marketplace identifier for a vendor's work team.
[ "<p", ">", "The", "Amazon", "Marketplace", "identifier", "for", "a", "vendor", "s", "work", "team", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/Workteam.java#L251-L258
train
Sets the value of the productListingIds property.
Create a Java method that does the following: "Sets the value of the productListingIds property.".
Of course, here is the Java code you requested: ```java public void setProductListingIds(java.util.Collection<String> productListingIds) { if (productListingIds == null) { this.productListingIds = null; return; } this.productListingIds = new java.util.ArrayList<String>(...
apache/reef
lang/java/reef-utils/src/main/java/org/apache/reef/util/MultiAsyncToSync.java
MultiAsyncToSync.block
public boolean block(final long identifier, final Runnable asyncProcessor) throws InterruptedException, InvalidIdentifierException { final ComplexCondition call = allocate(); if (call.isHeldByCurrentThread()) { throw new RuntimeException("release() must not be called on same thread as block() to ...
java
public boolean block(final long identifier, final Runnable asyncProcessor) throws InterruptedException, InvalidIdentifierException { final ComplexCondition call = allocate(); if (call.isHeldByCurrentThread()) { throw new RuntimeException("release() must not be called on same thread as block() to ...
[ "public", "boolean", "block", "(", "final", "long", "identifier", ",", "final", "Runnable", "asyncProcessor", ")", "throws", "InterruptedException", ",", "InvalidIdentifierException", "{", "final", "ComplexCondition", "call", "=", "allocate", "(", ")", ";", "if", ...
Put the caller to sleep on a specific release identifier. @param identifier The identifier required to awake the caller via the {@code release()} method. @param asyncProcessor A {@code Runnable} object that initiates the asynchronous processing associated with the call. This will occur inside the condition lock to prev...
[ "Put", "the", "caller", "to", "sleep", "on", "a", "specific", "release", "identifier", "." ]
e2c47121cde21108a602c560cf76565a40d0e916
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-utils/src/main/java/org/apache/reef/util/MultiAsyncToSync.java#L83-L121
train
Block on the specified identifier.
Create a Java method that does the following: "Block on the specified identifier.".
Of course, here is the Java code you requested: ```java public boolean block(final long identifier, final Runnable asyncProcessor) throws InterruptedException, InvalidIdentifierException { final ComplexCondition call = allocate(); if (call.isHeldByCurrentThread()) { throw new RuntimeException("r...
Kadvin/spring-component-framework
sustain/src/main/java/net/happyonroad/component/container/support/DefaultComponentRepository.java
DefaultComponentRepository.addComponent
@Override public void addComponent(Component component) { logger.debug("Register {} into repository", component); components.add(component); }
java
@Override public void addComponent(Component component) { logger.debug("Register {} into repository", component); components.add(component); }
[ "@", "Override", "public", "void", "addComponent", "(", "Component", "component", ")", "{", "logger", ".", "debug", "(", "\"Register {} into repository\"", ",", "component", ")", ";", "components", ".", "add", "(", "component", ")", ";", "}" ]
------------------------------------------------------------
[ "------------------------------------------------------------" ]
07432d0aef6781d9943c80a0c15957b08433b5bd
https://github.com/Kadvin/spring-component-framework/blob/07432d0aef6781d9943c80a0c15957b08433b5bd/sustain/src/main/java/net/happyonroad/component/container/support/DefaultComponentRepository.java#L434-L438
valid
Register a new component into the repository.
Create a Java method that does the following: "Register a new component into the repository.".
Of course, here is the Java code you requested: ```java @Override public void addComponent(Component component) { logger.debug("Register {} into repository", component); components.add(component); } ``` Hope this helps!
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/QueryBasedExtractor.java
QueryBasedExtractor.build
public Extractor<S, D> build() throws ExtractPrepareException { String watermarkColumn = this.workUnitState.getProp(ConfigurationKeys.EXTRACT_DELTA_FIELDS_KEY); long lwm = partition.getLowWatermark(); long hwm = partition.getHighWatermark(); log.info("Low water mark: " + lwm + "; and High water mark: " ...
java
public Extractor<S, D> build() throws ExtractPrepareException { String watermarkColumn = this.workUnitState.getProp(ConfigurationKeys.EXTRACT_DELTA_FIELDS_KEY); long lwm = partition.getLowWatermark(); long hwm = partition.getHighWatermark(); log.info("Low water mark: " + lwm + "; and High water mark: " ...
[ "public", "Extractor", "<", "S", ",", "D", ">", "build", "(", ")", "throws", "ExtractPrepareException", "{", "String", "watermarkColumn", "=", "this", ".", "workUnitState", ".", "getProp", "(", "ConfigurationKeys", ".", "EXTRACT_DELTA_FIELDS_KEY", ")", ";", "lon...
build schema, record count and high water mark
[ "build", "schema", "record", "count", "and", "high", "water", "mark" ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/QueryBasedExtractor.java#L285-L346
train
Build the extractor.
Create a Java method that does the following: "Build the extractor.".
Of course, here is the Java code you requested: ```java public Extractor<S, D> build() throws ExtractPrepareException { String watermarkColumn = this.workUnitState.getProp(ConfigurationKeys.EXTRACT_DELTA_FIELDS_KEY); long lwm = partition.getLowWatermark(); long hwm = partition.getHighWatermark(); log.i...
alibaba/canal
sink/src/main/java/com/alibaba/otter/canal/sink/entry/group/TimelineBarrier.java
TimelineBarrier.await
public void await(Event event, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { long timestamp = getTimestamp(event); try { lock.lockInterruptibly(); single(timestamp); while (isPermit(event, timestamp) == false) { condition...
java
public void await(Event event, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { long timestamp = getTimestamp(event); try { lock.lockInterruptibly(); single(timestamp); while (isPermit(event, timestamp) == false) { condition...
[ "public", "void", "await", "(", "Event", "event", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "long", "timestamp", "=", "getTimestamp", "(", "event", ")", ";", "try", "{", "lock", ".",...
判断自己的timestamp是否可以通过,带超时控制 @throws InterruptedException @throws TimeoutException
[ "判断自己的timestamp是否可以通过", "带超时控制" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/sink/src/main/java/com/alibaba/otter/canal/sink/entry/group/TimelineBarrier.java#L66-L77
train
Await for an event.
Create a Java method that does the following: "Await for an event.".
Of course, here is the Java code you requested: ```java public void await(Event event, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { long timestamp = getTimestamp(event); try { lock.lockInterruptibly(); single(timestamp); while (isPermi...
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/XExtensionParser.java
XExtensionParser.parse
public XExtension parse(URI uri) throws IOException, ParserConfigurationException, SAXException { BufferedInputStream is = new BufferedInputStream(uri.toURL().openStream()); // set up a specialized SAX2 handler to fill the container XExtensionHandler handler = new XExtensionHandler(); // set up SAX parser and p...
java
public XExtension parse(URI uri) throws IOException, ParserConfigurationException, SAXException { BufferedInputStream is = new BufferedInputStream(uri.toURL().openStream()); // set up a specialized SAX2 handler to fill the container XExtensionHandler handler = new XExtensionHandler(); // set up SAX parser and p...
[ "public", "XExtension", "parse", "(", "URI", "uri", ")", "throws", "IOException", ",", "ParserConfigurationException", ",", "SAXException", "{", "BufferedInputStream", "is", "=", "new", "BufferedInputStream", "(", "uri", ".", "toURL", "(", ")", ".", "openStream", ...
Parses an extension from a URI. @param file The URI which represents the extension definition file. @return The extension object, as defined in the file referenced by the given URI.
[ "Parses", "an", "extension", "from", "a", "URI", "." ]
e791cb07a6e62ecf837d760d58a25f32fbf6bbca
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/XExtensionParser.java#L111-L121
train
Parse the provided log file into an XExtension object.
Create a Java method that does the following: "Parse the provided log file into an XExtension object.".
Of course, here is the Java code you requested: ```java public XExtension parse(URI uri) throws IOException, ParserConfigurationException, SAXException { BufferedInputStream is = new BufferedInputStream(uri.toURL().openStream()); // set up a specialized SAX2 handler to fill the container XExtensionHandler handle...
liquibase/liquibase
liquibase-core/src/main/java/liquibase/integration/commandline/Main.java
Main.main
public static void main(String[] args) { int errorLevel = 0; try { errorLevel = run(args); } catch (Throwable e) { System.exit(-1); } System.exit(errorLevel); }
java
public static void main(String[] args) { int errorLevel = 0; try { errorLevel = run(args); } catch (Throwable e) { System.exit(-1); } System.exit(errorLevel); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "int", "errorLevel", "=", "0", ";", "try", "{", "errorLevel", "=", "run", "(", "args", ")", ";", "}", "catch", "(", "Throwable", "e", ")", "{", "System", ".", "exit", ...
Entry point. This is what gets executes when starting this program from the command line. This is actually a simple wrapper so that an errorlevel of != 0 is guaranteed in case of an uncaught exception. @param args the command line arguments
[ "Entry", "point", ".", "This", "is", "what", "gets", "executes", "when", "starting", "this", "program", "from", "the", "command", "line", ".", "This", "is", "actually", "a", "simple", "wrapper", "so", "that", "an", "errorlevel", "of", "!", "=", "0", "is"...
86a3b30fa6821ac981056f252f918557f5ebcc60
https://github.com/liquibase/liquibase/blob/86a3b30fa6821ac981056f252f918557f5ebcc60/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java#L120-L128
valid
Main method for the ACSCTYPE class.
Create a Java method that does the following: "Main method for the ACSCTYPE class.".
Of course, here is the Java code you requested: ```java public static void main(String[] args) { int errorLevel = 0; try { errorLevel = run(args); } catch (Throwable e) { System.exit(-1); } System.exit(errorLevel); } ``` Hope this helps!
undertow-io/undertow
core/src/main/java/io/undertow/protocols/ssl/SslConduit.java
SslConduit.doUnwrap
private long doUnwrap(ByteBuffer[] userBuffers, int off, int len) throws IOException { if(anyAreSet(state, FLAG_CLOSED)) { throw new ClosedChannelException(); } if(outstandingTasks > 0) { return 0; } if(anyAreSet(state, FLAG_READ_REQUIRES_WRITE)) { ...
java
private long doUnwrap(ByteBuffer[] userBuffers, int off, int len) throws IOException { if(anyAreSet(state, FLAG_CLOSED)) { throw new ClosedChannelException(); } if(outstandingTasks > 0) { return 0; } if(anyAreSet(state, FLAG_READ_REQUIRES_WRITE)) { ...
[ "private", "long", "doUnwrap", "(", "ByteBuffer", "[", "]", "userBuffers", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "if", "(", "anyAreSet", "(", "state", ",", "FLAG_CLOSED", ")", ")", "{", "throw", "new", "ClosedChannelExcep...
Unwrap channel data into the user buffers. If no user buffer is supplied (e.g. during handshaking) then the unwrap will happen into the channels unwrap buffer. If some data has already been unwrapped it will simply be copied into the user buffers and no unwrap will actually take place. @return true if the unwrap oper...
[ "Unwrap", "channel", "data", "into", "the", "user", "buffers", ".", "If", "no", "user", "buffer", "is", "supplied", "(", "e", ".", "g", ".", "during", "handshaking", ")", "then", "the", "unwrap", "will", "happen", "into", "the", "channels", "unwrap", "bu...
87de0b856a7a4ba8faf5b659537b9af07b763263
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/protocols/ssl/SslConduit.java#L663-L860
train
Unwrap the data in the underlying source.
Create a Java method that does the following: "Unwrap the data in the underlying source.".
Of course, here is the Java code you requested: ```java private long doUnwrap(ByteBuffer[] userBuffers, int off, int len) throws IOException { if(anyAreSet(state, FLAG_CLOSED)) { throw new ClosedChannelException(); } if(outstandingTasks > 0) { return 0; } ...
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/SharedFlowController.java
SharedFlowController.savePreviousPageInfo
public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward ) { // // Special case: if the given forwar...
java
public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward ) { // // Special case: if the given forwar...
[ "public", "void", "savePreviousPageInfo", "(", "ActionForward", "forward", ",", "ActionForm", "form", ",", "ActionMapping", "mapping", ",", "HttpServletRequest", "request", ",", "ServletContext", "servletContext", ",", "boolean", "isSpecialForward", ")", "{", "//", "/...
Store information about recent pages displayed. This is a framework-invoked method that should not normally be called directly.
[ "Store", "information", "about", "recent", "pages", "displayed", ".", "This", "is", "a", "framework", "-", "invoked", "method", "that", "should", "not", "normally", "be", "called", "directly", "." ]
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/SharedFlowController.java#L182-L202
train
Save the previous page info on the page.
Create a Java method that does the following: "Save the previous page info on the page.".
Of course, here is the Java code you requested: ```java public void savePreviousPageInfo( ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward ) ...
znerd/xmlenc
src/main/java/org/znerd/xmlenc/XMLChecker.java
XMLChecker.isExtender
private static final boolean isExtender(char c) { int n = c; return n == 0x00B7 || n == 0x02D0 || n == 0x02D1 || n == 0x0387 || n == 0x0640 || n == 0x0E46 || n == 0x0EC6 || n == 0x3005 || n >= 0x3031 && n <= 0x3035 || n >= 0x309D && n <= 0x309E || n >= 0x30FC && n <= 0x30FE; }
java
private static final boolean isExtender(char c) { int n = c; return n == 0x00B7 || n == 0x02D0 || n == 0x02D1 || n == 0x0387 || n == 0x0640 || n == 0x0E46 || n == 0x0EC6 || n == 0x3005 || n >= 0x3031 && n <= 0x3035 || n >= 0x309D && n <= 0x309E || n >= 0x30FC && n <= 0x30FE; }
[ "private", "static", "final", "boolean", "isExtender", "(", "char", "c", ")", "{", "int", "n", "=", "c", ";", "return", "n", "==", "0x00B7", "||", "n", "==", "0x02D0", "||", "n", "==", "0x02D1", "||", "n", "==", "0x0387", "||", "n", "==", "0x0640",...
Determines if the specified character matches the <em>Extender</em> production. See: <a href="http://www.w3.org/TR/REC-xml#NT-Extender">Definition of Extender</a>. @param c the character to check. @return <code>true</code> if the character matches the production, or <code>false</code> if it does not.
[ "Determines", "if", "the", "specified", "character", "matches", "the", "<em", ">", "Extender<", "/", "em", ">", "production", ".", "See", ":", "<a", "href", "=", "http", ":", "//", "www", ".", "w3", ".", "org", "/", "TR", "/", "REC", "-", "xml#NT", ...
6ff483777d9467db9990b7c7ae0158f21a243c31
https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLChecker.java#L383-L386
train
Is the specified character an extended class of a ?
Create a Java method that does the following: "Is the specified character an extended class of a ?".
Of course, here is the Java code you requested: ```java private static final boolean isExtender(char c) { int n = c; return n == 0x00B7 || n == 0x02D0 || n == 0x02D1 || n == 0x0387 || n == 0x0640 || n == 0x0E46 || n == 0x0EC6 || n == 0x3005 || n >= 0x3031 && n <= 0x3035 || n >= 0x309D && n <= 0x309E ||...
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/rest/DocumentValues.java
DocumentValues.get
@Override @Path("/{documentId}") public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException { WorkflowServices workflowServices = ServiceLocator.getWorkflowServices(); String docId = getSegment(path, 1); if (docId == null) { thro...
java
@Override @Path("/{documentId}") public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException { WorkflowServices workflowServices = ServiceLocator.getWorkflowServices(); String docId = getSegment(path, 1); if (docId == null) { thro...
[ "@", "Override", "@", "Path", "(", "\"/{documentId}\"", ")", "public", "JSONObject", "get", "(", "String", "path", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "ServiceException", ",", "JSONException", "{", "WorkflowServices", "work...
Retrieve a document string value
[ "Retrieve", "a", "document", "string", "value" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/DocumentValues.java#L45-L62
train
Override the get method for a single resource in the Cadmium service.
Create a Java method that does the following: "Override the get method for a single resource in the Cadmium service.".
Of course, here is the Java code you requested: ```java @Override @Path("/{documentId}") public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException { WorkflowServices workflowServices = ServiceLocator.getWorkflowServices(); String docId = getSegmen...
intellimate/IzouSDK
src/main/java/org/intellimate/izou/sdk/frameworks/music/player/template/CommandHandler.java
CommandHandler.setPlayPauseController
public void setPlayPauseController(Consumer<String> controller) { if (controller == null) return; this.playPause = controller; capabilities.setPlayPauseControl(true); }
java
public void setPlayPauseController(Consumer<String> controller) { if (controller == null) return; this.playPause = controller; capabilities.setPlayPauseControl(true); }
[ "public", "void", "setPlayPauseController", "(", "Consumer", "<", "String", ">", "controller", ")", "{", "if", "(", "controller", "==", "null", ")", "return", ";", "this", ".", "playPause", "=", "controller", ";", "capabilities", ".", "setPlayPauseControl", "(...
adds the ability for the Play/Pause requests @param controller the controller for callback
[ "adds", "the", "ability", "for", "the", "Play", "/", "Pause", "requests" ]
bc8705ad48a6ca12a722f2b787be435949fa5d08
https://github.com/intellimate/IzouSDK/blob/bc8705ad48a6ca12a722f2b787be435949fa5d08/src/main/java/org/intellimate/izou/sdk/frameworks/music/player/template/CommandHandler.java#L59-L64
test
Sets the controller to be used to play pause the application.
Create a Java method that does the following: "Sets the controller to be used to play pause the application.".
Of course, here is the Java code you requested: ```java public void setPlayPauseController(Consumer<String> controller) { if (controller == null) return; this.playPause = controller; capabilities.setPlayPauseControl(true); } ``` Hope this helps!
jayantk/jklol
src/com/jayantkrish/jklol/models/loglinear/IndicatorLogLinearFactor.java
IndicatorLogLinearFactor.getNewSufficientStatistics
@Override public TensorSufficientStatistics getNewSufficientStatistics() { return new TensorSufficientStatistics(featureVars, new DenseTensorBuilder(new int[] { 0 }, new int[] { initialWeights.getWeights().getValues().length })); }
java
@Override public TensorSufficientStatistics getNewSufficientStatistics() { return new TensorSufficientStatistics(featureVars, new DenseTensorBuilder(new int[] { 0 }, new int[] { initialWeights.getWeights().getValues().length })); }
[ "@", "Override", "public", "TensorSufficientStatistics", "getNewSufficientStatistics", "(", ")", "{", "return", "new", "TensorSufficientStatistics", "(", "featureVars", ",", "new", "DenseTensorBuilder", "(", "new", "int", "[", "]", "{", "0", "}", ",", "new", "int"...
///////////////////////////////////////////////////////////
[ "///////////////////////////////////////////////////////////" ]
d27532ca83e212d51066cf28f52621acc3fd44cc
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/loglinear/IndicatorLogLinearFactor.java#L71-L75
train
Returns a new tensor of the type n - grams.
Create a Java method that does the following: "Returns a new tensor of the type n - grams.".
Of course, here is the Java code you requested: ```java @Override public TensorSufficientStatistics getNewSufficientStatistics() { return new TensorSufficientStatistics(featureVars, new DenseTensorBuilder(new int[] { 0 }, new int[] { initialWeights.getWeights().getValues().length })); } ``` Hope this ...
jenetics/jenetics
jenetics/src/main/java/io/jenetics/BitChromosome.java
BitChromosome.of
public static BitChromosome of(final CharSequence value, final double p) { final byte[] bits = toByteArray(requireNonNull(value, "Input")); return new BitChromosome(bits, bits.length*8, require.probability(p)); }
java
public static BitChromosome of(final CharSequence value, final double p) { final byte[] bits = toByteArray(requireNonNull(value, "Input")); return new BitChromosome(bits, bits.length*8, require.probability(p)); }
[ "public", "static", "BitChromosome", "of", "(", "final", "CharSequence", "value", ",", "final", "double", "p", ")", "{", "final", "byte", "[", "]", "bits", "=", "toByteArray", "(", "requireNonNull", "(", "value", ",", "\"Input\"", ")", ")", ";", "return", ...
Create a new {@code BitChromosome} from the given character sequence containing '0' and '1'; as created with the {@link #toCanonicalString()} method. @param value the input string. @param p Probability of the TRUEs in the BitChromosome. @return a new {@code BitChromosome} with the given parameter @throws NullPointerEx...
[ "Create", "a", "new", "{", "@code", "BitChromosome", "}", "from", "the", "given", "character", "sequence", "containing", "0", "and", "1", ";", "as", "created", "with", "the", "{", "@link", "#toCanonicalString", "()", "}", "method", "." ]
ee516770c65ef529b27deb283f071c85f344eff4
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics/src/main/java/io/jenetics/BitChromosome.java#L601-L604
train
Create a bit chromosome from a CharSequence.
Create a Java method that does the following: "Create a bit chromosome from a CharSequence.".
Of course, here is the Java code you requested: ```java public static BitChromosome of(final CharSequence value, final double p) { final byte[] bits = toByteArray(requireNonNull(value, "Input")); return new BitChromosome(bits, bits.length*8, require.probability(p)); } ``` Hope this helps!
jhalterman/failsafe
src/main/java/net/jodah/failsafe/RetryPolicy.java
RetryPolicy.onRetry
public RetryPolicy<R> onRetry(CheckedConsumer<? extends ExecutionAttemptedEvent<R>> listener) { retryListener = EventListener.ofAttempt(Assert.notNull(listener, "listener")); return this; }
java
public RetryPolicy<R> onRetry(CheckedConsumer<? extends ExecutionAttemptedEvent<R>> listener) { retryListener = EventListener.ofAttempt(Assert.notNull(listener, "listener")); return this; }
[ "public", "RetryPolicy", "<", "R", ">", "onRetry", "(", "CheckedConsumer", "<", "?", "extends", "ExecutionAttemptedEvent", "<", "R", ">", ">", "listener", ")", "{", "retryListener", "=", "EventListener", ".", "ofAttempt", "(", "Assert", ".", "notNull", "(", ...
Registers the {@code listener} to be called before an execution is retried.
[ "Registers", "the", "{" ]
65fcd3a82f7b232d2ff59bc525a59d693dd8e223
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/RetryPolicy.java#L284-L287
train
Sets the listener to be notified when a retry occurs.
Create a Java method that does the following: "Sets the listener to be notified when a retry occurs.".
Of course, here is the Java code you requested: ```java public RetryPolicy<R> onRetry(CheckedConsumer<? extends ExecutionAttemptedEvent<R>> listener) { retryListener = EventListener.ofAttempt(Assert.notNull(listener, "listener")); return this; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateVpcEndpointConnectionNotificationRequest.java
CreateVpcEndpointConnectionNotificationRequest.getDryRunRequest
@Override public Request<CreateVpcEndpointConnectionNotificationRequest> getDryRunRequest() { Request<CreateVpcEndpointConnectionNotificationRequest> request = new CreateVpcEndpointConnectionNotificationRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); ...
java
@Override public Request<CreateVpcEndpointConnectionNotificationRequest> getDryRunRequest() { Request<CreateVpcEndpointConnectionNotificationRequest> request = new CreateVpcEndpointConnectionNotificationRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); ...
[ "@", "Override", "public", "Request", "<", "CreateVpcEndpointConnectionNotificationRequest", ">", "getDryRunRequest", "(", ")", "{", "Request", "<", "CreateVpcEndpointConnectionNotificationRequest", ">", "request", "=", "new", "CreateVpcEndpointConnectionNotificationRequestMarsha...
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
[ "This", "method", "is", "intended", "for", "internal", "use", "only", ".", "Returns", "the", "marshaled", "request", "configured", "with", "additional", "parameters", "to", "enable", "operation", "dry", "-", "run", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateVpcEndpointConnectionNotificationRequest.java#L323-L328
train
Gets the request configured to create a DryRun vpc endpoint connection notification request.
Create a Java method that does the following: "Gets the request configured to create a DryRun vpc endpoint connection notification request.".
Of course, here is the Java code you requested: ```java @Override public Request<CreateVpcEndpointConnectionNotificationRequest> getDryRunRequest() { Request<CreateVpcEndpointConnectionNotificationRequest> request = new CreateVpcEndpointConnectionNotificationRequestMarshaller().marshall(this); requ...
jeffreyning/nh-micro
nh-micro-datasource/src/main/java/com/nh/micro/datasource/MicroXaDataSource.java
MicroXaDataSource.freeMicroConnection
private void freeMicroConnection(MicroPooledConnection microConn) { Connection tempConn=null; try { tempConn = microConn.getConnection(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(tempConn!=null){ int totalSize=getConnCount(); if(tota...
java
private void freeMicroConnection(MicroPooledConnection microConn) { Connection tempConn=null; try { tempConn = microConn.getConnection(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(tempConn!=null){ int totalSize=getConnCount(); if(tota...
[ "private", "void", "freeMicroConnection", "(", "MicroPooledConnection", "microConn", ")", "{", "Connection", "tempConn", "=", "null", ";", "try", "{", "tempConn", "=", "microConn", ".", "getConnection", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")...
连接归池 @param conn
[ "连接归池" ]
f1cb420a092f8ba94317519ede739974decb5617
https://github.com/jeffreyning/nh-micro/blob/f1cb420a092f8ba94317519ede739974decb5617/nh-micro-datasource/src/main/java/com/nh/micro/datasource/MicroXaDataSource.java#L368-L384
train
Free a managed connection.
Create a Java method that does the following: "Free a managed connection.".
Of course, here is the Java code you requested: ```java private void freeMicroConnection(MicroPooledConnection microConn) { Connection tempConn=null; try { tempConn = microConn.getConnection(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(tempC...
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonArray.java
JsonArray.optJsonObject
public JsonObject optJsonObject(int index) { JsonElement el; try { el = get(index); } catch (JsonException e) { return null; } if (!el.isJsonObject()) { return null; } return el.asJsonObject(); }
java
public JsonObject optJsonObject(int index) { JsonElement el; try { el = get(index); } catch (JsonException e) { return null; } if (!el.isJsonObject()) { return null; } return el.asJsonObject(); }
[ "public", "JsonObject", "optJsonObject", "(", "int", "index", ")", "{", "JsonElement", "el", ";", "try", "{", "el", "=", "get", "(", "index", ")", ";", "}", "catch", "(", "JsonException", "e", ")", "{", "return", "null", ";", "}", "if", "(", "!", "...
Returns the value at {@code index} if it exists and is a {@code JsonObject}. Returns null otherwise.
[ "Returns", "the", "value", "at", "{" ]
c90f0dd7f84df26da4749be8cd9b026fff499a79
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonArray.java#L628-L639
train
Get the optional JsonObject associated with an index.
Create a Java method that does the following: "Get the optional JsonObject associated with an index.".
Of course, here is the Java code you requested: ```java public JsonObject optJsonObject(int index) { JsonElement el; try { el = get(index); } catch (JsonException e) { return null; } if (!el.isJsonObject()) { return null; } ret...
contentful/contentful.java
src/main/java/com/contentful/java/cda/TransformQuery.java
TransformQuery.one
public CDACallback<Transformed> one(String id, CDACallback<Transformed> callback) { return Callbacks.subscribeAsync( baseQuery() .one(id) .filter(new Predicate<CDAEntry>() { @Override public boolean test(CDAEntry entry) { return entry.conte...
java
public CDACallback<Transformed> one(String id, CDACallback<Transformed> callback) { return Callbacks.subscribeAsync( baseQuery() .one(id) .filter(new Predicate<CDAEntry>() { @Override public boolean test(CDAEntry entry) { return entry.conte...
[ "public", "CDACallback", "<", "Transformed", ">", "one", "(", "String", "id", ",", "CDACallback", "<", "Transformed", ">", "callback", ")", "{", "return", "Callbacks", ".", "subscribeAsync", "(", "baseQuery", "(", ")", ".", "one", "(", "id", ")", ".", "f...
Retrieve the transformed entry from Contentful by using the given callback. @param id the id of the entry of type transformed. @return the input callback for chaining. @throws CDAResourceNotFoundException if no such resource was found. @throws IllegalStateException if the transformed class could not be created....
[ "Retrieve", "the", "transformed", "entry", "from", "Contentful", "by", "using", "the", "given", "callback", "." ]
6ecc2ace454c674b218b99489dc50697b1dbffcb
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/TransformQuery.java#L179-L192
train
Get a single entry in the content type hierarchy.
Create a Java method that does the following: "Get a single entry in the content type hierarchy.".
Of course, here is the Java code you requested: ```java public CDACallback<Transformed> one(String id, CDACallback<Transformed> callback) { return Callbacks.subscribeAsync( baseQuery() .one(id) .filter(new Predicate<CDAEntry>() { @Override public boolean ...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java
AfplibPackageImpl.getSVI
public EClass getSVI() { if (sviEClass == null) { sviEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(341); } return sviEClass; }
java
public EClass getSVI() { if (sviEClass == null) { sviEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(341); } return sviEClass; }
[ "public", "EClass", "getSVI", "(", ")", "{", "if", "(", "sviEClass", "==", "null", ")", "{", "sviEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "AfplibPackage", ".", "eNS_URI", ")", ".", "getEClas...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java#L9202-L9207
train
Get the SVI.
Create a Java method that does the following: "Get the SVI.".
Of course, here is the Java code you requested: ```java public EClass getSVI() { if (sviEClass == null) { sviEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(341); } return sviEClass; } ``` Hope this helps!
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ConverterManager.java
ConverterManager.checkAlterIntervalConverters
private void checkAlterIntervalConverters() throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission("ConverterManager.alterIntervalConverters")); } }
java
private void checkAlterIntervalConverters() throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission("ConverterManager.alterIntervalConverters")); } }
[ "private", "void", "checkAlterIntervalConverters", "(", ")", "throws", "SecurityException", "{", "SecurityManager", "sm", "=", "System", ".", "getSecurityManager", "(", ")", ";", "if", "(", "sm", "!=", "null", ")", "{", "sm", ".", "checkPermission", "(", "new"...
Checks whether the user has permission 'ConverterManager.alterIntervalConverters'. @throws SecurityException if the user does not have the permission
[ "Checks", "whether", "the", "user", "has", "permission", "ConverterManager", ".", "alterIntervalConverters", "." ]
bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ConverterManager.java#L577-L582
train
Check if the user has permission to alter the IntervalConverters.
Create a Java method that does the following: "Check if the user has permission to alter the IntervalConverters.".
Of course, here is the Java code you requested: ```java private void checkAlterIntervalConverters() throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission("ConverterManager.alterIntervalConverters")); ...
google/guice
core/src/com/google/inject/internal/ConstructorInjectorStore.java
ConstructorInjectorStore.get
public ConstructorInjector<?> get(InjectionPoint constructorInjector, Errors errors) throws ErrorsException { return cache.get(constructorInjector, errors); }
java
public ConstructorInjector<?> get(InjectionPoint constructorInjector, Errors errors) throws ErrorsException { return cache.get(constructorInjector, errors); }
[ "public", "ConstructorInjector", "<", "?", ">", "get", "(", "InjectionPoint", "constructorInjector", ",", "Errors", "errors", ")", "throws", "ErrorsException", "{", "return", "cache", ".", "get", "(", "constructorInjector", ",", "errors", ")", ";", "}" ]
Returns a new complete constructor injector with injection listeners registered.
[ "Returns", "a", "new", "complete", "constructor", "injector", "with", "injection", "listeners", "registered", "." ]
a0552a16d813ead98fe73737fb001db336650251
https://github.com/google/guice/blob/a0552a16d813ead98fe73737fb001db336650251/core/src/com/google/inject/internal/ConstructorInjectorStore.java#L47-L50
test
Get a constructor injector from the cache.
Create a Java method that does the following: "Get a constructor injector from the cache.".
Of course, here is the Java code you requested: ```java public ConstructorInjector<?> get(InjectionPoint constructorInjector, Errors errors) throws ErrorsException { return cache.get(constructorInjector, errors); } ``` Hope this helps!
wildfly/wildfly
iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/InterfaceAnalysis.java
InterfaceAnalysis.getContainedEntries
protected ArrayList getContainedEntries() { final ArrayList ret = new ArrayList(constants.length + attributes.length + operations.length); for (int i = 0; i < constants.length; ++i) ret.add(constants[i]); for (int i = 0; i < attributes.length; ++i) ret.add(attributes[i])...
java
protected ArrayList getContainedEntries() { final ArrayList ret = new ArrayList(constants.length + attributes.length + operations.length); for (int i = 0; i < constants.length; ++i) ret.add(constants[i]); for (int i = 0; i < attributes.length; ++i) ret.add(attributes[i])...
[ "protected", "ArrayList", "getContainedEntries", "(", ")", "{", "final", "ArrayList", "ret", "=", "new", "ArrayList", "(", "constants", ".", "length", "+", "attributes", ".", "length", "+", "operations", ".", "length", ")", ";", "for", "(", "int", "i", "="...
Return a list of all the entries contained here.
[ "Return", "a", "list", "of", "all", "the", "entries", "contained", "here", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/InterfaceAnalysis.java#L86-L97
test
Get the contained entries.
Create a Java method that does the following: "Get the contained entries.".
Of course, here is the Java code you requested: ```java protected ArrayList getContainedEntries() { final ArrayList ret = new ArrayList(constants.length + attributes.length + operations.length); for (int i = 0; i < constants.length; ++i) ret.add(constants[i]); for (int i = 0; i < a...
aws/aws-sdk-java
aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/model/transform/ModifyLunaClientRequestMarshaller.java
ModifyLunaClientRequestMarshaller.marshall
public void marshall(ModifyLunaClientRequest modifyLunaClientRequest, ProtocolMarshaller protocolMarshaller) { if (modifyLunaClientRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(modifyLuna...
java
public void marshall(ModifyLunaClientRequest modifyLunaClientRequest, ProtocolMarshaller protocolMarshaller) { if (modifyLunaClientRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(modifyLuna...
[ "public", "void", "marshall", "(", "ModifyLunaClientRequest", "modifyLunaClientRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "modifyLunaClientRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudhsm/src/main/java/com/amazonaws/services/cloudhsm/model/transform/ModifyLunaClientRequestMarshaller.java#L44-L56
train
Creates the given parameter object.
Create a Java method that does the following: "Creates the given parameter object.".
Of course, here is the Java code you requested: ```java public void marshall(ModifyLunaClientRequest modifyLunaClientRequest, ProtocolMarshaller protocolMarshaller) { if (modifyLunaClientRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } ...
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/N1qlParams.java
N1qlParams.durationToN1qlFormat
public static String durationToN1qlFormat(long duration, TimeUnit unit) { switch (unit) { case NANOSECONDS: return duration + "ns"; case MICROSECONDS: return duration + "us"; case MILLISECONDS: return duration + "ms"; ...
java
public static String durationToN1qlFormat(long duration, TimeUnit unit) { switch (unit) { case NANOSECONDS: return duration + "ns"; case MICROSECONDS: return duration + "us"; case MILLISECONDS: return duration + "ms"; ...
[ "public", "static", "String", "durationToN1qlFormat", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "switch", "(", "unit", ")", "{", "case", "NANOSECONDS", ":", "return", "duration", "+", "\"ns\"", ";", "case", "MICROSECONDS", ":", "return", "d...
Helper method to convert a duration into the n1ql (golang) format.
[ "Helper", "method", "to", "convert", "a", "duration", "into", "the", "n1ql", "(", "golang", ")", "format", "." ]
f36a0ee0c66923bdde47838ca543e50cbaa99e14
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/N1qlParams.java#L164-L182
train
Duration to n1ql format.
Create a Java method that does the following: "Duration to n1ql format.".
Of course, here is the Java code you requested: ```java public static String durationToN1qlFormat(long duration, TimeUnit unit) { switch (unit) { case NANOSECONDS: return duration + "ns"; case MICROSECONDS: return duration + "us"; case MILLISE...
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java
ExtendedMessageFormat.seekNonWs
private void seekNonWs(final String pattern, final ParsePosition pos) { int len = 0; final char[] buffer = pattern.toCharArray(); do { len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex()); pos.setIndex(pos.getIndex() + len); } while (len > 0 && pos.getI...
java
private void seekNonWs(final String pattern, final ParsePosition pos) { int len = 0; final char[] buffer = pattern.toCharArray(); do { len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex()); pos.setIndex(pos.getIndex() + len); } while (len > 0 && pos.getI...
[ "private", "void", "seekNonWs", "(", "final", "String", "pattern", ",", "final", "ParsePosition", "pos", ")", "{", "int", "len", "=", "0", ";", "final", "char", "[", "]", "buffer", "=", "pattern", ".", "toCharArray", "(", ")", ";", "do", "{", "len", ...
Consume whitespace from the current parse position. @param pattern String to read @param pos current position
[ "Consume", "whitespace", "from", "the", "current", "parse", "position", "." ]
9e2dfbbda3668cfa5d935fe76479d1426c294504
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java#L449-L456
train
Seeks to the first non - WS entry in the given pattern.
Create a Java method that does the following: "Seeks to the first non - WS entry in the given pattern.".
Of course, here is the Java code you requested: ```java private void seekNonWs(final String pattern, final ParsePosition pos) { int len = 0; final char[] buffer = pattern.toCharArray(); do { len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex()); pos.setIndex(po...
DDTH/ddth-kafka
src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java
KafkaHelper.createKafkaProducer
public static KafkaProducer<String, byte[]> createKafkaProducer(ProducerType type, String bootstrapServers) { return createKafkaProducer(type, bootstrapServers, null); }
java
public static KafkaProducer<String, byte[]> createKafkaProducer(ProducerType type, String bootstrapServers) { return createKafkaProducer(type, bootstrapServers, null); }
[ "public", "static", "KafkaProducer", "<", "String", ",", "byte", "[", "]", ">", "createKafkaProducer", "(", "ProducerType", "type", ",", "String", "bootstrapServers", ")", "{", "return", "createKafkaProducer", "(", "type", ",", "bootstrapServers", ",", "null", "...
Creates a new {@link KafkaProducer} instance, with default configurations. @param type @param bootstrapServers @return
[ "Creates", "a", "new", "{", "@link", "KafkaProducer", "}", "instance", "with", "default", "configurations", "." ]
aaeb8536e28a109ac0b69022f0ea4bbf5696b76f
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java#L141-L144
train
Create a KafkaProducer instance with the specified producer type and bootstrap servers.
Create a Java method that does the following: "Create a KafkaProducer instance with the specified producer type and bootstrap servers.".
Of course, here is the Java code you requested: ```java public static KafkaProducer<String, byte[]> createKafkaProducer(ProducerType type, String bootstrapServers) { return createKafkaProducer(type, bootstrapServers, null); } ``` Hope this helps!
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/servicelocator/web/ServiceLocator.java
ServiceLocator.getTopicConnectionFactory
public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException { TopicConnectionFactory factory = null; try { if (cache.containsKey(topicConnFactoryName)) { factory = (TopicConnectionFactory) cache.get(topicConnFactoryName); } ...
java
public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException { TopicConnectionFactory factory = null; try { if (cache.containsKey(topicConnFactoryName)) { factory = (TopicConnectionFactory) cache.get(topicConnFactoryName); } ...
[ "public", "TopicConnectionFactory", "getTopicConnectionFactory", "(", "String", "topicConnFactoryName", ")", "throws", "ServiceLocatorException", "{", "TopicConnectionFactory", "factory", "=", "null", ";", "try", "{", "if", "(", "cache", ".", "containsKey", "(", "topicC...
This method helps in obtaining the topic factory @return the factory for the factory to get topic connections from
[ "This", "method", "helps", "in", "obtaining", "the", "topic", "factory" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/servicelocator/web/ServiceLocator.java#L160-L176
train
Gets the TopicConnectionFactory object from the cache.
Create a Java method that does the following: "Gets the TopicConnectionFactory object from the cache.".
Of course, here is the Java code you requested: ```java public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException { TopicConnectionFactory factory = null; try { if (cache.containsKey(topicConnFactoryName)) { factory = (TopicConn...
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java
BlockDrawingHelper.Draw
public void Draw( DrawingDecorator drawingNode, World world ) throws Exception { beginDrawing(world); for(JAXBElement<?> jaxbobj : drawingNode.getDrawObjectType()) { Object obj = jaxbobj.getValue(); // isn't there an easier way of doing this? if( obj inst...
java
public void Draw( DrawingDecorator drawingNode, World world ) throws Exception { beginDrawing(world); for(JAXBElement<?> jaxbobj : drawingNode.getDrawObjectType()) { Object obj = jaxbobj.getValue(); // isn't there an easier way of doing this? if( obj inst...
[ "public", "void", "Draw", "(", "DrawingDecorator", "drawingNode", ",", "World", "world", ")", "throws", "Exception", "{", "beginDrawing", "(", "world", ")", ";", "for", "(", "JAXBElement", "<", "?", ">", "jaxbobj", ":", "drawingNode", ".", "getDrawObjectType",...
Draws the specified drawing into the Minecraft world supplied. @param drawingNode The sequence of drawing primitives to draw. @param world The world in which to draw them. @throws Exception Unrecognised block types or primitives cause an exception to be thrown.
[ "Draws", "the", "specified", "drawing", "into", "the", "Minecraft", "world", "supplied", "." ]
4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java#L180-L209
train
Draw the drawing node.
Create a Java method that does the following: "Draw the drawing node.".
Of course, here is the Java code you requested: ```java public void Draw( DrawingDecorator drawingNode, World world ) throws Exception { beginDrawing(world); for(JAXBElement<?> jaxbobj : drawingNode.getDrawObjectType()) { Object obj = jaxbobj.getValue(); // isn't th...
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/AbsModule.java
AbsModule.defer
<R> CMACallback<R> defer(DefFunc<R> func, CMACallback<R> callback) { assertNotNull(callback, "callback"); Observable.defer(func) .subscribeOn(Schedulers.io()) .subscribe( new ActionSuccess<R>(callbackExecutor, callback), new ActionError(callbackExecutor, callback)); r...
java
<R> CMACallback<R> defer(DefFunc<R> func, CMACallback<R> callback) { assertNotNull(callback, "callback"); Observable.defer(func) .subscribeOn(Schedulers.io()) .subscribe( new ActionSuccess<R>(callbackExecutor, callback), new ActionError(callbackExecutor, callback)); r...
[ "<", "R", ">", "CMACallback", "<", "R", ">", "defer", "(", "DefFunc", "<", "R", ">", "func", ",", "CMACallback", "<", "R", ">", "callback", ")", "{", "assertNotNull", "(", "callback", ",", "\"callback\"", ")", ";", "Observable", ".", "defer", "(", "f...
Creates an Observable with the given {@code func} function and subscribes to it with a set of pre-defined actions. The provided {@code callback} will be passed to these actions in order to populate the events.
[ "Creates", "an", "Observable", "with", "the", "given", "{" ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/AbsModule.java#L112-L120
train
Defer to a single resource.
Create a Java method that does the following: "Defer to a single resource.".
Of course, here is the Java code you requested: ```java <R> CMACallback<R> defer(DefFunc<R> func, CMACallback<R> callback) { assertNotNull(callback, "callback"); Observable.defer(func) .subscribeOn(Schedulers.io()) .subscribe( new ActionSuccess<R>(callbackExecutor, callback), ...
aws/aws-sdk-java
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/transform/ClusterTimelineMarshaller.java
ClusterTimelineMarshaller.marshall
public void marshall(ClusterTimeline clusterTimeline, ProtocolMarshaller protocolMarshaller) { if (clusterTimeline == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(clusterTimeline.getCreationDateTim...
java
public void marshall(ClusterTimeline clusterTimeline, ProtocolMarshaller protocolMarshaller) { if (clusterTimeline == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(clusterTimeline.getCreationDateTim...
[ "public", "void", "marshall", "(", "ClusterTimeline", "clusterTimeline", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "clusterTimeline", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshall(...)...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/transform/ClusterTimelineMarshaller.java#L46-L59
train
marshalls the given ClusterTimeline to the JSON object.
Create a Java method that does the following: "marshalls the given ClusterTimeline to the JSON object.".
Of course, here is the Java code you requested: ```java public void marshall(ClusterTimeline clusterTimeline, ProtocolMarshaller protocolMarshaller) { if (clusterTimeline == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { proto...
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.getDocument
public <T> T getDocument(String indexName, String indexType,String documentId,Class<T> beanType) throws ElasticSearchException{ return getDocument( indexName, indexType, documentId,(Map<String,Object>)null,beanType); }
java
public <T> T getDocument(String indexName, String indexType,String documentId,Class<T> beanType) throws ElasticSearchException{ return getDocument( indexName, indexType, documentId,(Map<String,Object>)null,beanType); }
[ "public", "<", "T", ">", "T", "getDocument", "(", "String", "indexName", ",", "String", "indexType", ",", "String", "documentId", ",", "Class", "<", "T", ">", "beanType", ")", "throws", "ElasticSearchException", "{", "return", "getDocument", "(", "indexName", ...
获取文档对象 @param indexName @param indexType @param documentId @return @throws ElasticSearchException
[ "获取文档对象" ]
31717c8aa2c4c880987be53aeeb8a0cf5183c3a7
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L1143-L1145
train
Gets the document.
Create a Java method that does the following: "Gets the document.".
Of course, here is the Java code you requested: ```java public <T> T getDocument(String indexName, String indexType,String documentId,Class<T> beanType) throws ElasticSearchException{ return getDocument( indexName, indexType, documentId,(Map<String,Object>)null,beanType); } ``` Hope this helps!
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.powerOff
public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
java
public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "powerOff", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "powerOffWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetNam...
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale ...
[ "Power", "off", "(", "stop", ")", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Note", "that", "resources", "are", "still", "attached", "and", "you", "are", "getting", "charged", "for", "the", "resources", ".", "Inste...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L1798-L1800
train
Power off a set of virtual machines. Power off a set of virtual machines.
Create a Java method that does the following: "Power off a set of virtual machines. Power off a set of virtual machines.".
Of course, here is the Java code you requested: ```java public OperationStatusResponseInner powerOff(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); } ``` Hope t...
real-logic/simple-binary-encoding
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/golang/GolangOutputManager.java
GolangOutputManager.createOutput
public Writer createOutput(final String name) throws IOException { final File targetFile = new File(outputDir, name + ".go"); return Files.newBufferedWriter(targetFile.toPath(), StandardCharsets.UTF_8); }
java
public Writer createOutput(final String name) throws IOException { final File targetFile = new File(outputDir, name + ".go"); return Files.newBufferedWriter(targetFile.toPath(), StandardCharsets.UTF_8); }
[ "public", "Writer", "createOutput", "(", "final", "String", "name", ")", "throws", "IOException", "{", "final", "File", "targetFile", "=", "new", "File", "(", "outputDir", ",", "name", "+", "\".go\"", ")", ";", "return", "Files", ".", "newBufferedWriter", "(...
Create a new output which will be a golang source file in the given package. <p> The {@link java.io.Writer} should be closed once the caller has finished with it. The Writer is buffer for efficient IO operations. @param name the name of the golang class. @return a {@link java.io.Writer} to which the source code should...
[ "Create", "a", "new", "output", "which", "will", "be", "a", "golang", "source", "file", "in", "the", "given", "package", ".", "<p", ">", "The", "{", "@link", "java", ".", "io", ".", "Writer", "}", "should", "be", "closed", "once", "the", "caller", "h...
9a7be490c86d98f0e430e4189bc6c8c4fbef658b
https://github.com/real-logic/simple-binary-encoding/blob/9a7be490c86d98f0e430e4189bc6c8c4fbef658b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/golang/GolangOutputManager.java#L66-L71
train
Create a new file with the specified name.
Create a Java method that does the following: "Create a new file with the specified name.".
Of course, here is the Java code you requested: ```java public Writer createOutput(final String name) throws IOException { final File targetFile = new File(outputDir, name + ".go"); return Files.newBufferedWriter(targetFile.toPath(), StandardCharsets.UTF_8); } ``` Hope this helps!
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java
Ifc2x3tc1PackageImpl.getIfcDoorPanelOperationEnum
public EEnum getIfcDoorPanelOperationEnum() { if (ifcDoorPanelOperationEnumEEnum == null) { ifcDoorPanelOperationEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(815); } return ifcDoorPanelOperationEnumEEnum; }
java
public EEnum getIfcDoorPanelOperationEnum() { if (ifcDoorPanelOperationEnumEEnum == null) { ifcDoorPanelOperationEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(815); } return ifcDoorPanelOperationEnumEEnum; }
[ "public", "EEnum", "getIfcDoorPanelOperationEnum", "(", ")", "{", "if", "(", "ifcDoorPanelOperationEnumEEnum", "==", "null", ")", "{", "ifcDoorPanelOperationEnumEEnum", "=", "(", "EEnum", ")", "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#L36908-L36914
train
Get the EEnum of the IfcDoorPanelOperation
Create a Java method that does the following: "Get the EEnum of the IfcDoorPanelOperation".
Of course, here is the Java code you requested: ```java public EEnum getIfcDoorPanelOperationEnum() { if (ifcDoorPanelOperationEnumEEnum == null) { ifcDoorPanelOperationEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(815); } return ifcDoorP...
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/util/EntityTypeUtils.java
EntityTypeUtils.isSingleReferenceType
public static boolean isSingleReferenceType(Attribute attr) { AttributeType attrType = attr.getDataType(); switch (attrType) { case CATEGORICAL: case FILE: case XREF: return true; case BOOL: case CATEGORICAL_MREF: case COMPOUND: case DATE: case DATE_TIME: ...
java
public static boolean isSingleReferenceType(Attribute attr) { AttributeType attrType = attr.getDataType(); switch (attrType) { case CATEGORICAL: case FILE: case XREF: return true; case BOOL: case CATEGORICAL_MREF: case COMPOUND: case DATE: case DATE_TIME: ...
[ "public", "static", "boolean", "isSingleReferenceType", "(", "Attribute", "attr", ")", "{", "AttributeType", "attrType", "=", "attr", ".", "getDataType", "(", ")", ";", "switch", "(", "attrType", ")", "{", "case", "CATEGORICAL", ":", "case", "FILE", ":", "ca...
Returns whether the attribute type references single entities (e.g. is 'XREF'). @param attr attribute @return true if an attribute references a single entity
[ "Returns", "whether", "the", "attribute", "type", "references", "single", "entities", "(", "e", ".", "g", ".", "is", "XREF", ")", "." ]
b4d0d6b27e6f6c8d7505a3863dc03b589601f987
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/util/EntityTypeUtils.java#L32-L60
train
Checks if the attribute is a single reference type.
Create a Java method that does the following: "Checks if the attribute is a single reference type.".
Of course, here is the Java code you requested: ```java public static boolean isSingleReferenceType(Attribute attr) { AttributeType attrType = attr.getDataType(); switch (attrType) { case CATEGORICAL: case FILE: case XREF: return true; case BOOL: case CATEGORICAL_MREF: ...
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeImagesResult.java
DescribeImagesResult.getImages
public java.util.List<Image> getImages() { if (images == null) { images = new com.amazonaws.internal.SdkInternalList<Image>(); } return images; }
java
public java.util.List<Image> getImages() { if (images == null) { images = new com.amazonaws.internal.SdkInternalList<Image>(); } return images; }
[ "public", "java", ".", "util", ".", "List", "<", "Image", ">", "getImages", "(", ")", "{", "if", "(", "images", "==", "null", ")", "{", "images", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<", "Image", ">", "(", ...
<p> Information about the images. </p> @return Information about the images.
[ "<p", ">", "Information", "about", "the", "images", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeImagesResult.java#L41-L46
train
Gets the value of the images property.
Create a Java method that does the following: "Gets the value of the images property.".
Of course, here is the Java code you requested: ```java public java.util.List<Image> getImages() { if (images == null) { images = new com.amazonaws.internal.SdkInternalList<Image>(); } return images; } ``` Hope this helps!
forge/core
convert/impl/src/main/java/org/jboss/forge/addon/convert/impl/ConverterFactoryImpl.java
ConverterFactoryImpl.areTypesAssignable
private boolean areTypesAssignable(Class<?> source, Class<?> target) { if (target.isAssignableFrom(source)) { return true; } else if (!source.isPrimitive() && !target.isPrimitive()) { return false; } else if (source.isPrimitive()) { // source...
java
private boolean areTypesAssignable(Class<?> source, Class<?> target) { if (target.isAssignableFrom(source)) { return true; } else if (!source.isPrimitive() && !target.isPrimitive()) { return false; } else if (source.isPrimitive()) { // source...
[ "private", "boolean", "areTypesAssignable", "(", "Class", "<", "?", ">", "source", ",", "Class", "<", "?", ">", "target", ")", "{", "if", "(", "target", ".", "isAssignableFrom", "(", "source", ")", ")", "{", "return", "true", ";", "}", "else", "if", ...
Check if the parameters are primitive and if they can be assignable
[ "Check", "if", "the", "parameters", "are", "primitive", "and", "if", "they", "can", "be", "assignable" ]
e140eb03bbe2b3409478ad70c86c3edbef6d9a0c
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/convert/impl/src/main/java/org/jboss/forge/addon/convert/impl/ConverterFactoryImpl.java#L107-L127
train
Checks if two types are assignable.
Create a Java method that does the following: "Checks if two types are assignable.".
Of course, here is the Java code you requested: ```java private boolean areTypesAssignable(Class<?> source, Class<?> target) { if (target.isAssignableFrom(source)) { return true; } else if (!source.isPrimitive() && !target.isPrimitive()) { return false; } ...
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/Isomorphism.java
Isomorphism.getEuclideanDistance
@Override public double getEuclideanDistance() throws IOException { int decimalPlaces = 4; double source = 0; double target = 0; double euclidean = -1; if (getFirstMapping() != null || !getFirstMapping().isEmpty()) { if (!removeHydrogen) { source ...
java
@Override public double getEuclideanDistance() throws IOException { int decimalPlaces = 4; double source = 0; double target = 0; double euclidean = -1; if (getFirstMapping() != null || !getFirstMapping().isEmpty()) { if (!removeHydrogen) { source ...
[ "@", "Override", "public", "double", "getEuclideanDistance", "(", ")", "throws", "IOException", "{", "int", "decimalPlaces", "=", "4", ";", "double", "source", "=", "0", ";", "double", "target", "=", "0", ";", "double", "euclidean", "=", "-", "1", ";", "...
{@inheritDoc}
[ "{" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/Isomorphism.java#L848-L870
train
Get the euclidean distance of the two molecules.
Create a Java method that does the following: "Get the euclidean distance of the two molecules.".
Of course, here is the Java code you requested: ```java @Override public double getEuclideanDistance() throws IOException { int decimalPlaces = 4; double source = 0; double target = 0; double euclidean = -1; if (getFirstMapping() != null || !getFirstMapping().isEmpty()) { ...
cdk/cdk
storage/libiomd/src/main/java/org/openscience/cdk/libio/cml/MDMoleculeCustomizer.java
MDMoleculeCustomizer.customize
@Override public void customize(IAtomContainer molecule, Object nodeToAdd) throws Exception { if (!(nodeToAdd instanceof CMLMolecule)) throw new CDKException("NodeToAdd must be of type nu.xom.Element!"); //The nodeToAdd CMLMolecule molToCustomize = (CMLMolecule) nodeToAdd; if ((mol...
java
@Override public void customize(IAtomContainer molecule, Object nodeToAdd) throws Exception { if (!(nodeToAdd instanceof CMLMolecule)) throw new CDKException("NodeToAdd must be of type nu.xom.Element!"); //The nodeToAdd CMLMolecule molToCustomize = (CMLMolecule) nodeToAdd; if ((mol...
[ "@", "Override", "public", "void", "customize", "(", "IAtomContainer", "molecule", ",", "Object", "nodeToAdd", ")", "throws", "Exception", "{", "if", "(", "!", "(", "nodeToAdd", "instanceof", "CMLMolecule", ")", ")", "throw", "new", "CDKException", "(", "\"Nod...
Customize Molecule.
[ "Customize", "Molecule", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/libiomd/src/main/java/org/openscience/cdk/libio/cml/MDMoleculeCustomizer.java#L71-L164
train
Customize the molecule with the CML molecule attributes.
Create a Java method that does the following: "Customize the molecule with the CML molecule attributes.".
Of course, here is the Java code you requested: ```java @Override public void customize(IAtomContainer molecule, Object nodeToAdd) throws Exception { if (!(nodeToAdd instanceof CMLMolecule)) throw new CDKException("NodeToAdd must be of type nu.xom.Element!"); //The nodeToAdd CMLMolecule mo...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/CacheingSearchResults.java
CacheingSearchResults.getMatchers
ContentMatcher[] getMatchers() { if (tc.isEntryEnabled()) tc.entry(this,cclass, "getMatchers"); // ans removed as it is never used ! // Matcher[] ans = new Matcher[wildMatchers.size()]; if (tc.isEntryEnabled()) tc.exit(this,cclass, "getMatchers"); return (ContentMatcher[]) wildMa...
java
ContentMatcher[] getMatchers() { if (tc.isEntryEnabled()) tc.entry(this,cclass, "getMatchers"); // ans removed as it is never used ! // Matcher[] ans = new Matcher[wildMatchers.size()]; if (tc.isEntryEnabled()) tc.exit(this,cclass, "getMatchers"); return (ContentMatcher[]) wildMa...
[ "ContentMatcher", "[", "]", "getMatchers", "(", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "tc", ".", "entry", "(", "this", ",", "cclass", ",", "\"getMatchers\"", ")", ";", "// ans removed as it is never used !", "// Matcher[] ans = new...
Returns the Matcher cache as an array
[ "Returns", "the", "Matcher", "cache", "as", "an", "array" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/CacheingSearchResults.java#L107-L119
train
Returns an array of Matcher objects.
Create a Java method that does the following: "Returns an array of Matcher objects.".
Of course, here is the Java code you requested: ```java ContentMatcher[] getMatchers() { if (tc.isEntryEnabled()) tc.entry(this,cclass, "getMatchers"); // ans removed as it is never used ! // Matcher[] ans = new Matcher[wildMatchers.size()]; if (tc.isEntryEnabled()) tc.exit(this,ccl...
awin/rabbiteasy
rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageWriter.java
MessageWriter.writeBodyFromString
public void writeBodyFromString(String bodyAsString, Charset charset) { message.contentEncoding(charset.name()) .contentType(Message.TEXT_PLAIN); byte[] bodyContent = bodyAsString.getBytes(charset); message.body(bodyContent); }
java
public void writeBodyFromString(String bodyAsString, Charset charset) { message.contentEncoding(charset.name()) .contentType(Message.TEXT_PLAIN); byte[] bodyContent = bodyAsString.getBytes(charset); message.body(bodyContent); }
[ "public", "void", "writeBodyFromString", "(", "String", "bodyAsString", ",", "Charset", "charset", ")", "{", "message", ".", "contentEncoding", "(", "charset", ".", "name", "(", ")", ")", ".", "contentType", "(", "Message", ".", "TEXT_PLAIN", ")", ";", "byte...
Writes the message body from a string using the given charset as encoding and setting the content type to text/plain. @param bodyAsString Body to write as string @param charset The charset to encode the string
[ "Writes", "the", "message", "body", "from", "a", "string", "using", "the", "given", "charset", "as", "encoding", "and", "setting", "the", "content", "type", "to", "text", "/", "plain", "." ]
c161efda6c0f7ef319aedf09dfe40a4a90165510
https://github.com/awin/rabbiteasy/blob/c161efda6c0f7ef319aedf09dfe40a4a90165510/rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageWriter.java#L67-L72
train
Write the body from a string.
Create a Java method that does the following: "Write the body from a string.".
Of course, here is the Java code you requested: ```java public void writeBodyFromString(String bodyAsString, Charset charset) { message.contentEncoding(charset.name()) .contentType(Message.TEXT_PLAIN); byte[] bodyContent = bodyAsString.getBytes(charset); message.body(bodyCon...
aws/aws-sdk-java
aws-java-sdk-datapipeline/src/main/java/com/amazonaws/services/datapipeline/model/transform/PollForTaskRequestMarshaller.java
PollForTaskRequestMarshaller.marshall
public void marshall(PollForTaskRequest pollForTaskRequest, ProtocolMarshaller protocolMarshaller) { if (pollForTaskRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(pollForTaskRequest.getWor...
java
public void marshall(PollForTaskRequest pollForTaskRequest, ProtocolMarshaller protocolMarshaller) { if (pollForTaskRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(pollForTaskRequest.getWor...
[ "public", "void", "marshall", "(", "PollForTaskRequest", "pollForTaskRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "pollForTaskRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to mars...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-datapipeline/src/main/java/com/amazonaws/services/datapipeline/model/transform/PollForTaskRequestMarshaller.java#L46-L59
train
marshalls the given parameter object.
Create a Java method that does the following: "marshalls the given parameter object.".
Of course, here is the Java code you requested: ```java public void marshall(PollForTaskRequest pollForTaskRequest, ProtocolMarshaller protocolMarshaller) { if (pollForTaskRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnectionFactory.java
SibRaConnectionFactory.createConnection
public SICoreConnection createConnection(final Subject subject, final Map connectionProperties) throws SIResourceException, SINotPossibleInCurrentConfigurationException, SIIncorrectCallException, SIAuthenticationException { if (TRACE.isEntryEnabled()) { SibTr ...
java
public SICoreConnection createConnection(final Subject subject, final Map connectionProperties) throws SIResourceException, SINotPossibleInCurrentConfigurationException, SIIncorrectCallException, SIAuthenticationException { if (TRACE.isEntryEnabled()) { SibTr ...
[ "public", "SICoreConnection", "createConnection", "(", "final", "Subject", "subject", ",", "final", "Map", "connectionProperties", ")", "throws", "SIResourceException", ",", "SINotPossibleInCurrentConfigurationException", ",", "SIIncorrectCallException", ",", "SIAuthenticationE...
Creates a connection to a messaging engine. The creation is delegated to the JCA connection manager. This either creates a new managed connection or finds an existing one that matches this request. The connection manager obtains a connection handle to the managed connection which is what is returned by this method. @p...
[ "Creates", "a", "connection", "to", "a", "messaging", "engine", ".", "The", "creation", "is", "delegated", "to", "the", "JCA", "connection", "manager", ".", "This", "either", "creates", "a", "new", "managed", "connection", "or", "finds", "an", "existing", "o...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnectionFactory.java#L180-L201
train
This method is called to create a connection object from the subject.
Create a Java method that does the following: "This method is called to create a connection object from the subject.".
Of course, here is the Java code you requested: ```java public SICoreConnection createConnection(final Subject subject, final Map connectionProperties) throws SIResourceException, SINotPossibleInCurrentConfigurationException, SIIncorrectCallException, SIAuthenticationException { ...
santhosh-tekuri/jlibs
nio/src/main/java/jlibs/nio/http/msg/Message.java
Message.getField
@Override @SuppressWarnings("StringEquality") public Object getField(String name) throws UnresolvedException{ if(name=="headers") return headers; else if(name=="version") return version; else if(name=="keep_alive") return isKeepAlive(); else if...
java
@Override @SuppressWarnings("StringEquality") public Object getField(String name) throws UnresolvedException{ if(name=="headers") return headers; else if(name=="version") return version; else if(name=="keep_alive") return isKeepAlive(); else if...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"StringEquality\"", ")", "public", "Object", "getField", "(", "String", "name", ")", "throws", "UnresolvedException", "{", "if", "(", "name", "==", "\"headers\"", ")", "return", "headers", ";", "else", "if", "("...
/*-------------------------------------------------[ Bean ]---------------------------------------------------
[ "/", "*", "-------------------------------------------------", "[", "Bean", "]", "---------------------------------------------------" ]
59c28719f054123cf778278154e1b92e943ad232
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/nio/src/main/java/jlibs/nio/http/msg/Message.java#L54-L69
train
Get the field with the specified name.
Create a Java method that does the following: "Get the field with the specified name.".
Of course, here is the Java code you requested: ```java @Override @SuppressWarnings("StringEquality") public Object getField(String name) throws UnresolvedException{ if(name=="headers") return headers; else if(name=="version") return version; else if(name=="keep_...
JavaKoan/koan-annotations
src/koan/java/com/javakoan/fixture/SampleKoan.java
SampleKoan.provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop
@Koan @Vex public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop(){ int seventhFibonacciNumber = 0; /* (@_@) */ int previous1 = 1; int previous2 = 1; int currentFibonacci = 1; for(int i= 3; i<= 7; i++){ } seventhFibonacciN...
java
@Koan @Vex public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop(){ int seventhFibonacciNumber = 0; /* (@_@) */ int previous1 = 1; int previous2 = 1; int currentFibonacci = 1; for(int i= 3; i<= 7; i++){ } seventhFibonacciN...
[ "@", "Koan", "@", "Vex", "public", "void", "provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop", "(", ")", "{", "int", "seventhFibonacciNumber", "=", "0", ";", "/* (@_@) */", "int", "previous1", "=", "1", ";", "int", "previous2", "=", "1", ";", "int...
In this exercise students will learn how to use @Vex annotation from the koan-annotation framework
[ "In", "this", "exercise", "students", "will", "learn", "how", "to", "use" ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/koan/java/com/javakoan/fixture/SampleKoan.java#L67-L86
train
Provide the starting problem for calculating the AFABONACCI number using ALoop.
Create a Java method that does the following: "Provide the starting problem for calculating the AFABONACCI number using ALoop.".
Of course, here is the Java code you requested: ```java @Koan @Vex public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop(){ int seventhFibonacciNumber = 0; /* (@_@) */ int previous1 = 1; int previous2 = 1; int currentFibonacci = 1; for(int ...
sarxos/webcam-capture
webcam-capture/src/main/java/com/github/sarxos/webcam/Webcam.java
Webcam.getImage
public BufferedImage getImage() { if (!isReady()) { return null; } long t1 = 0; long t2 = 0; if (asynchronous) { return updater.getImage(); } else { // get image t1 = System.currentTimeMillis(); BufferedImage image = transform(new WebcamGetImageTask(driver, device).getIma...
java
public BufferedImage getImage() { if (!isReady()) { return null; } long t1 = 0; long t2 = 0; if (asynchronous) { return updater.getImage(); } else { // get image t1 = System.currentTimeMillis(); BufferedImage image = transform(new WebcamGetImageTask(driver, device).getIma...
[ "public", "BufferedImage", "getImage", "(", ")", "{", "if", "(", "!", "isReady", "(", ")", ")", "{", "return", "null", ";", "}", "long", "t1", "=", "0", ";", "long", "t2", "=", "0", ";", "if", "(", "asynchronous", ")", "{", "return", "updater", "...
Capture image from webcam and return it. Will return image object or null if webcam is closed or has been already disposed by JVM.<br> <br> <b>IMPORTANT NOTE!!!</b><br> <br> There are two possible behaviors of what webcam should do when you try to get image and webcam is actually closed. Normally it will return null, b...
[ "Capture", "image", "from", "webcam", "and", "return", "it", ".", "Will", "return", "image", "object", "or", "null", "if", "webcam", "is", "closed", "or", "has", "been", "already", "disposed", "by", "JVM", ".", "<br", ">", "<br", ">", "<b", ">", "IMPOR...
efbdae04f9ba48db9ec621e94a9bcd6f031882c8
https://github.com/sarxos/webcam-capture/blob/efbdae04f9ba48db9ec621e94a9bcd6f031882c8/webcam-capture/src/main/java/com/github/sarxos/webcam/Webcam.java#L645-L683
train
Gets the BufferedImage that was created by the device from the device.
Create a Java method that does the following: "Gets the BufferedImage that was created by the device from the device.".
Of course, here is the Java code you requested: ```java public BufferedImage getImage() { if (!isReady()) { return null; } long t1 = 0; long t2 = 0; if (asynchronous) { return updater.getImage(); } else { // get image t1 = System.currentTimeMillis(); BufferedImage image ...
vdurmont/semver4j
src/main/java/com/vdurmont/semver4j/Requirement.java
Requirement.removeFalsePositiveVersionRanges
private static List<Token> removeFalsePositiveVersionRanges(List<Token> tokens) { List<Token> result = new ArrayList<Token>(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.get(i); if (thereIsFalsePositiveVersionRange(tokens, i)) { token = new Tok...
java
private static List<Token> removeFalsePositiveVersionRanges(List<Token> tokens) { List<Token> result = new ArrayList<Token>(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.get(i); if (thereIsFalsePositiveVersionRange(tokens, i)) { token = new Tok...
[ "private", "static", "List", "<", "Token", ">", "removeFalsePositiveVersionRanges", "(", "List", "<", "Token", ">", "tokens", ")", "{", "List", "<", "Token", ">", "result", "=", "new", "ArrayList", "<", "Token", ">", "(", ")", ";", "for", "(", "int", "...
Some requirements may contain versions that look like version ranges. For example ' 0.0.1-SNASHOT ' could be interpreted incorrectly as a version range from 0.0.1 to SNAPSHOT. This method parses all tokens and looks for groups of three tokens that are respectively of type [VERSION, HYPHEN, VERSION] and validates that t...
[ "Some", "requirements", "may", "contain", "versions", "that", "look", "like", "version", "ranges", ".", "For", "example", "0", ".", "0", ".", "1", "-", "SNASHOT", "could", "be", "interpreted", "incorrectly", "as", "a", "version", "range", "from", "0", ".",...
3f0266e4985ac29e9da482e04001ed15fad6c3e2
https://github.com/vdurmont/semver4j/blob/3f0266e4985ac29e9da482e04001ed15fad6c3e2/src/main/java/com/vdurmont/semver4j/Requirement.java#L221-L232
train
Removes false positive version ranges from the list of tokens.
Create a Java method that does the following: "Removes false positive version ranges from the list of tokens.".
Of course, here is the Java code you requested: ```java private static List<Token> removeFalsePositiveVersionRanges(List<Token> tokens) { List<Token> result = new ArrayList<Token>(); for (int i = 0; i < tokens.size(); i++) { Token token = tokens.get(i); if (thereIsFalsePositiveV...
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
PackageSummaryBuilder.buildPackageDoc
public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = packageWriter.getPackageHeader(Util.getPackageName(packageDoc)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTree); ...
java
public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = packageWriter.getPackageHeader(Util.getPackageName(packageDoc)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTree); ...
[ "public", "void", "buildPackageDoc", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "Exception", "{", "contentTree", "=", "packageWriter", ".", "getPackageHeader", "(", "Util", ".", "getPackageName", "(", "packageDoc", ")", ")", ";", "buil...
Build the package documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added
[ "Build", "the", "package", "documentation", "." ]
8812d28c20f4de070a0dd6de1b45602431379834
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java#L122-L129
train
Build the package doc.
Create a Java method that does the following: "Build the package doc.".
Of course, here is the Java code you requested: ```java public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = packageWriter.getPackageHeader(Util.getPackageName(packageDoc)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree);...
aws/aws-sdk-java
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/transform/InstanceAccessMarshaller.java
InstanceAccessMarshaller.marshall
public void marshall(InstanceAccess instanceAccess, ProtocolMarshaller protocolMarshaller) { if (instanceAccess == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceAccess.getFleetId(), FLEETID_...
java
public void marshall(InstanceAccess instanceAccess, ProtocolMarshaller protocolMarshaller) { if (instanceAccess == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceAccess.getFleetId(), FLEETID_...
[ "public", "void", "marshall", "(", "InstanceAccess", "instanceAccess", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "instanceAccess", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshall(...)\""...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/transform/InstanceAccessMarshaller.java#L50-L65
train
marshalls the given InstanceAccess object to the JSON file.
Create a Java method that does the following: "marshalls the given InstanceAccess object to the JSON file.".
Of course, here is the Java code you requested: ```java public void marshall(InstanceAccess instanceAccess, ProtocolMarshaller protocolMarshaller) { if (instanceAccess == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocol...
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
AmazonS3URI.decode
private static String decode(final String str, final int firstPercent) { StringBuilder builder = new StringBuilder(); builder.append(str.substring(0, firstPercent)); appendDecoded(builder, str, firstPercent); for (int i = firstPercent + 3; i < str.length(); ++i) { if (str.c...
java
private static String decode(final String str, final int firstPercent) { StringBuilder builder = new StringBuilder(); builder.append(str.substring(0, firstPercent)); appendDecoded(builder, str, firstPercent); for (int i = firstPercent + 3; i < str.length(); ++i) { if (str.c...
[ "private", "static", "String", "decode", "(", "final", "String", "str", ",", "final", "int", "firstPercent", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "str", ".", "substring", "(", "0",...
Percent-decodes the given string. @param str the string to decode @param firstPercent the index of the first '%' character in the string @return the decoded string
[ "Percent", "-", "decodes", "the", "given", "string", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L302-L318
train
Decode a string of the type class from the base64 format.
Create a Java method that does the following: "Decode a string of the type class from the base64 format.".
Of course, here is the Java code you requested: ```java private static String decode(final String str, final int firstPercent) { StringBuilder builder = new StringBuilder(); builder.append(str.substring(0, firstPercent)); appendDecoded(builder, str, firstPercent); for (int i = firstPe...
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java
StorageAccountCredentialsInner.beginCreateOrUpdate
public StorageAccountCredentialInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, storageAccountCredential).toBlocking().single().bod...
java
public StorageAccountCredentialInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, storageAccountCredential).toBlocking().single().bod...
[ "public", "StorageAccountCredentialInner", "beginCreateOrUpdate", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "StorageAccountCredentialInner", "storageAccountCredential", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseA...
Creates or updates the storage account credential. @param deviceName The device name. @param name The storage account credential name. @param resourceGroupName The resource group name. @param storageAccountCredential The storage account credential. @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Creates", "or", "updates", "the", "storage", "account", "credential", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java#L406-L408
train
Creates or updates a storage account credential.
Create a Java method that does the following: "Creates or updates a storage account credential.".
Of course, here is the Java code you requested: ```java public StorageAccountCredentialInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroup...
baneizalfe/PullToDismissPager
PullToDismissPager/src/main/java/com/mrbug/pulltodismisspager/PullToDismissPager.java
PullToDismissPager.expandPanel
public boolean expandPanel(float mSlideOffset) { if (mSlideableView == null || mSlideState == SlideState.EXPANDED) return false; mSlideableView.setVisibility(View.VISIBLE); return expandPanel(mSlideableView, 0, mSlideOffset); }
java
public boolean expandPanel(float mSlideOffset) { if (mSlideableView == null || mSlideState == SlideState.EXPANDED) return false; mSlideableView.setVisibility(View.VISIBLE); return expandPanel(mSlideableView, 0, mSlideOffset); }
[ "public", "boolean", "expandPanel", "(", "float", "mSlideOffset", ")", "{", "if", "(", "mSlideableView", "==", "null", "||", "mSlideState", "==", "SlideState", ".", "EXPANDED", ")", "return", "false", ";", "mSlideableView", ".", "setVisibility", "(", "View", "...
Partially expand the sliding panel up to a specific offset @param mSlideOffset Value between 0 and 1, where 0 is completely expanded. @return true if the pane was slideable and is now expanded/in the process of expanding
[ "Partially", "expand", "the", "sliding", "panel", "up", "to", "a", "specific", "offset" ]
14b12725f8ab9274b2499432d85e1b8b2b1850a5
https://github.com/baneizalfe/PullToDismissPager/blob/14b12725f8ab9274b2499432d85e1b8b2b1850a5/PullToDismissPager/src/main/java/com/mrbug/pulltodismisspager/PullToDismissPager.java#L736-L740
train
Expand the view of the page.
Create a Java method that does the following: "Expand the view of the page.".
Of course, here is the Java code you requested: ```java public boolean expandPanel(float mSlideOffset) { if (mSlideableView == null || mSlideState == SlideState.EXPANDED) return false; mSlideableView.setVisibility(View.VISIBLE); return expandPanel(mSlideableView, 0, mSlideOffset); } ``` Ho...
gwtbootstrap3/gwtbootstrap3
gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/GwtBootstrap3EntryPoint.java
GwtBootstrap3EntryPoint.onModuleLoad
@Override public void onModuleLoad() { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INSTANCE.gwtBootstrap3().getText()) .setWindow(ScriptInjector.TOP_WINDOW) .inject(); if (!isjQueryLoaded()) { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INS...
java
@Override public void onModuleLoad() { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INSTANCE.gwtBootstrap3().getText()) .setWindow(ScriptInjector.TOP_WINDOW) .inject(); if (!isjQueryLoaded()) { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INS...
[ "@", "Override", "public", "void", "onModuleLoad", "(", ")", "{", "ScriptInjector", ".", "fromString", "(", "GwtBootstrap3ClientBundle", ".", "INSTANCE", ".", "gwtBootstrap3", "(", ")", ".", "getText", "(", ")", ")", ".", "setWindow", "(", "ScriptInjector", "....
{@inheritDoc}
[ "{" ]
54bdbd0b12ba7a436b278c007df960d1adf2e641
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/54bdbd0b12ba7a436b278c007df960d1adf2e641/gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/GwtBootstrap3EntryPoint.java#L53-L69
train
onModuleLoad This method is called when the application is loaded.
Create a Java method that does the following: "onModuleLoad This method is called when the application is loaded.".
Of course, here is the Java code you requested: ```java @Override public void onModuleLoad() { ScriptInjector.fromString(GwtBootstrap3ClientBundle.INSTANCE.gwtBootstrap3().getText()) .setWindow(ScriptInjector.TOP_WINDOW) .inject(); if (!isjQueryLoaded()) { ...
alkacon/opencms-core
src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java
CmsContentEditor.getEntity
public static CmsEntity getEntity() { if ((INSTANCE == null) || (INSTANCE.m_entityObserver == null)) { CmsDebugLog.getInstance().printLine("handling external registration"); if (isObserverExported()) { return CmsEntityBackend.createFromNativeWrapper(nativeGetEntity(...
java
public static CmsEntity getEntity() { if ((INSTANCE == null) || (INSTANCE.m_entityObserver == null)) { CmsDebugLog.getInstance().printLine("handling external registration"); if (isObserverExported()) { return CmsEntityBackend.createFromNativeWrapper(nativeGetEntity(...
[ "public", "static", "CmsEntity", "getEntity", "(", ")", "{", "if", "(", "(", "INSTANCE", "==", "null", ")", "||", "(", "INSTANCE", ".", "m_entityObserver", "==", "null", ")", ")", "{", "CmsDebugLog", ".", "getInstance", "(", ")", ".", "printLine", "(", ...
Returns the currently edited entity.<p> @return the currently edited entity
[ "Returns", "the", "currently", "edited", "entity", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java#L442-L454
train
Returns the entity that was created by the application.
Create a Java method that does the following: "Returns the entity that was created by the application.".
Of course, here is the Java code you requested: ```java public static CmsEntity getEntity() { if ((INSTANCE == null) || (INSTANCE.m_entityObserver == null)) { CmsDebugLog.getInstance().printLine("handling external registration"); if (isObserverExported()) { return ...
alipay/sofa-rpc
extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistryHelper.java
SofaRegistryHelper.convertProviderToUrls
public static String convertProviderToUrls(ProviderConfig providerConfig, ServerConfig server) { StringBuilder sb = new StringBuilder(200); String appName = providerConfig.getAppName(); String host = server.getVirtualHost(); // 虚拟ip if (host == null) { host = server.getHost()...
java
public static String convertProviderToUrls(ProviderConfig providerConfig, ServerConfig server) { StringBuilder sb = new StringBuilder(200); String appName = providerConfig.getAppName(); String host = server.getVirtualHost(); // 虚拟ip if (host == null) { host = server.getHost()...
[ "public", "static", "String", "convertProviderToUrls", "(", "ProviderConfig", "providerConfig", ",", "ServerConfig", "server", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "200", ")", ";", "String", "appName", "=", "providerConfig", ".", "get...
Convert provider to url. @param providerConfig the ProviderConfig @return the url list
[ "Convert", "provider", "to", "url", "." ]
a31406410291e56696185a29c3ba4bd1f54488fd
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistryHelper.java#L124-L208
train
Convert provider to urls
Create a Java method that does the following: "Convert provider to urls".
Of course, here is the Java code you requested: ```java public static String convertProviderToUrls(ProviderConfig providerConfig, ServerConfig server) { StringBuilder sb = new StringBuilder(200); String appName = providerConfig.getAppName(); String host = server.getVirtualHost(); // 虚拟ip ...
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/CheckBoxGroup.java
CheckBoxGroup.isMatched
public boolean isMatched(String value, Boolean defaultValue) { if (value == null) return false; if (_match != null) { for (int i = 0; i < _match.length; i++) { if (value.equals(_match[i])) return true; } } else ...
java
public boolean isMatched(String value, Boolean defaultValue) { if (value == null) return false; if (_match != null) { for (int i = 0; i < _match.length; i++) { if (value.equals(_match[i])) return true; } } else ...
[ "public", "boolean", "isMatched", "(", "String", "value", ",", "Boolean", "defaultValue", ")", "{", "if", "(", "value", "==", "null", ")", "return", "false", ";", "if", "(", "_match", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "...
Checks whether the given value matches one of the CheckBoxGroup's selected CheckBoxOptions. @param value Value to be compared
[ "Checks", "whether", "the", "given", "value", "matches", "one", "of", "the", "CheckBoxGroup", "s", "selected", "CheckBoxOptions", "." ]
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/CheckBoxGroup.java#L320-L346
train
Checks if the value is matched by the group.
Create a Java method that does the following: "Checks if the value is matched by the group.".
Of course, here is the Java code you requested: ```java public boolean isMatched(String value, Boolean defaultValue) { if (value == null) return false; if (_match != null) { for (int i = 0; i < _match.length; i++) { if (value.equals(_match[i])) ...