repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
kazocsaba/matrix
src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java
ImmutableMatrixFactory.createVector
public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) { return new ImmutableVector4(new ImmutableData(4, 1) { @Override public double getQuick(int row, int col) { switch (row) { case 0: return x; case 1: return y; case 2: ...
java
public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) { return new ImmutableVector4(new ImmutableData(4, 1) { @Override public double getQuick(int row, int col) { switch (row) { case 0: return x; case 1: return y; case 2: ...
[ "public", "static", "ImmutableVector4", "createVector", "(", "final", "double", "x", ",", "final", "double", "y", ",", "final", "double", "z", ",", "final", "double", "h", ")", "{", "return", "new", "ImmutableVector4", "(", "new", "ImmutableData", "(", "4", ...
Creates a new immutable 4D column vector. @param x the x coordinate of the new vector @param y the y coordinate of the new vector @param z the z coordinate of the new vector @param h the h coordinate of the new vector @return the new vector
[ "Creates", "a", "new", "immutable", "4D", "column", "vector", "." ]
018570db945fe616b25606fe605fa6e0c180ab5b
https://github.com/kazocsaba/matrix/blob/018570db945fe616b25606fe605fa6e0c180ab5b/src/main/java/hu/kazocsaba/math/matrix/immutable/ImmutableMatrixFactory.java#L69-L85
train
Creates an immutable vector of the specified values.
Of course, here is the Java code you requested: ```java public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) { return new ImmutableVector4(new ImmutableData(4, 1) { @Override public double getQuick(int row, int col) { switch (row) { case 0: ...
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/WebService.java
WebService.validate
private HELM2Notation validate(String helm) throws ValidationException, ChemistryException { try { /* Read */ HELM2Notation helm2notation = readNotation(helm); /* Validate */ LOG.info("Validation of HELM is starting"); Validation.validateNotationObjects(helm2notation); LOG.info("Validatio...
java
private HELM2Notation validate(String helm) throws ValidationException, ChemistryException { try { /* Read */ HELM2Notation helm2notation = readNotation(helm); /* Validate */ LOG.info("Validation of HELM is starting"); Validation.validateNotationObjects(helm2notation); LOG.info("Validatio...
[ "private", "HELM2Notation", "validate", "(", "String", "helm", ")", "throws", "ValidationException", ",", "ChemistryException", "{", "try", "{", "/* Read */", "HELM2Notation", "helm2notation", "=", "readNotation", "(", "helm", ")", ";", "/* Validate */", "LOG", ".",...
method to validate the HELM-String input @param helm input HELM string @return ContainerHELM2 @throws ValidationException if the HELM input is not valid @throws ChemistryException if the Chemistry Engine can not be initialized @throws NotationException
[ "method", "to", "validate", "the", "HELM", "-", "String", "input" ]
ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/WebService.java#L161-L182
train
method to validate the HELM
Of course, here is the Java code you requested: ```java private HELM2Notation validate(String helm) throws ValidationException, ChemistryException { try { /* Read */ HELM2Notation helm2notation = readNotation(helm); /* Validate */ LOG.info("Validation of HELM is starting"); Validation.valida...
tzaeschke/zoodb
src/org/zoodb/internal/query/QueryOptimizer.java
QueryOptimizer.determineIndexToUse
public List<QueryAdvice> determineIndexToUse(QueryTreeNode queryTree) { List<QueryAdvice> advices = new LinkedList<QueryAdvice>(); List<ZooFieldDef> availableIndices = new LinkedList<ZooFieldDef>(); for (ZooFieldDef f: clsDef.getAllFields()) { if (f.isIndexed()) { availableIndices.add(f); } } // st...
java
public List<QueryAdvice> determineIndexToUse(QueryTreeNode queryTree) { List<QueryAdvice> advices = new LinkedList<QueryAdvice>(); List<ZooFieldDef> availableIndices = new LinkedList<ZooFieldDef>(); for (ZooFieldDef f: clsDef.getAllFields()) { if (f.isIndexed()) { availableIndices.add(f); } } // st...
[ "public", "List", "<", "QueryAdvice", ">", "determineIndexToUse", "(", "QueryTreeNode", "queryTree", ")", "{", "List", "<", "QueryAdvice", ">", "advices", "=", "new", "LinkedList", "<", "QueryAdvice", ">", "(", ")", ";", "List", "<", "ZooFieldDef", ">", "ava...
Determine index to use. Policy: 1) Check if index are available. If not, do not perform any further query analysis (for now) Query rewriting may still be able to optimize really stupid queries. 2) Create sub-queries 3) Analyse sub-queries to determine best index to use. Result may imply that index usage is pointless (...
[ "Determine", "index", "to", "use", "." ]
058d0ff161a8ee9d53244c433aca97ee9c654410
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/query/QueryOptimizer.java#L79-L152
train
Determine the index to use for the given query tree.
Of course, here is the Java code you requested: ```java public List<QueryAdvice> determineIndexToUse(QueryTreeNode queryTree) { List<QueryAdvice> advices = new LinkedList<QueryAdvice>(); List<ZooFieldDef> availableIndices = new LinkedList<ZooFieldDef>(); for (ZooFieldDef f: clsDef.getAllFields()) { if (f.isIn...
RestComm/jain-slee
api/jar/src/main/java/javax/slee/management/AlarmDuplicateFilter.java
AlarmDuplicateFilter.clearStaleTimeouts
private void clearStaleTimeouts() { Iterator iterator = knownAlarms.values().iterator(); long currentTime = System.currentTimeMillis(); while (iterator.hasNext()) { Long firstSeenTime = (Long)iterator.next(); // if period has expired remove reference to the notification ...
java
private void clearStaleTimeouts() { Iterator iterator = knownAlarms.values().iterator(); long currentTime = System.currentTimeMillis(); while (iterator.hasNext()) { Long firstSeenTime = (Long)iterator.next(); // if period has expired remove reference to the notification ...
[ "private", "void", "clearStaleTimeouts", "(", ")", "{", "Iterator", "iterator", "=", "knownAlarms", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "long", "currentTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "while", "(", "itera...
private
[ "private" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/api/jar/src/main/java/javax/slee/management/AlarmDuplicateFilter.java#L62-L72
test
Clear stale timeouts.
Of course, here is the Java code you requested: ```java private void clearStaleTimeouts() { Iterator iterator = knownAlarms.values().iterator(); long currentTime = System.currentTimeMillis(); while (iterator.hasNext()) { Long firstSeenTime = (Long)iterator.next(); // if ...
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/data/DMatrixD1.java
DMatrixD1.set
public void set( DMatrixD1 b ) { this.reshape(b.numRows,b.numCols); int dataLength = b.getNumElements(); System.arraycopy(b.data, 0, this.data, 0, dataLength); }
java
public void set( DMatrixD1 b ) { this.reshape(b.numRows,b.numCols); int dataLength = b.getNumElements(); System.arraycopy(b.data, 0, this.data, 0, dataLength); }
[ "public", "void", "set", "(", "DMatrixD1", "b", ")", "{", "this", ".", "reshape", "(", "b", ".", "numRows", ",", "b", ".", "numCols", ")", ";", "int", "dataLength", "=", "b", ".", "getNumElements", "(", ")", ";", "System", ".", "arraycopy", "(", "b...
Sets the value of this matrix to be the same as the value of the provided matrix. Both matrices must have the same shape:<br> <br> a<sub>ij</sub> = b<sub>ij</sub><br> <br> @param b The matrix that this matrix is to be set equal to.
[ "Sets", "the", "value", "of", "this", "matrix", "to", "be", "the", "same", "as", "the", "value", "of", "the", "provided", "matrix", ".", "Both", "matrices", "must", "have", "the", "same", "shape", ":", "<br", ">", "<br", ">", "a<sub", ">", "ij<", "/"...
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixD1.java#L79-L86
train
Sets the value of a single SECTYPE from another.
Of course, here is the Java code you requested: ```java public void set( DMatrixD1 b ) { this.reshape(b.numRows,b.numCols); int dataLength = b.getNumElements(); System.arraycopy(b.data, 0, this.data, 0, dataLength); } ``` Hope this helps!
amazon-archives/aws-sdk-java-resources
aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java
ReflectionUtils.findMethod
private static Method findMethod( Object target, String name, Class<?> parameterType) { for (Method method : target.getClass().getMethods()) { if (!method.getName().equals(name)) { continue; } Class<?>[] parameters = metho...
java
private static Method findMethod( Object target, String name, Class<?> parameterType) { for (Method method : target.getClass().getMethods()) { if (!method.getName().equals(name)) { continue; } Class<?>[] parameters = metho...
[ "private", "static", "Method", "findMethod", "(", "Object", "target", ",", "String", "name", ",", "Class", "<", "?", ">", "parameterType", ")", "{", "for", "(", "Method", "method", ":", "target", ".", "getClass", "(", ")", ".", "getMethods", "(", ")", ...
Finds a method of the given name that will accept a parameter of the given type. If more than one method matches, returns the first such method found. @param target the object to reflect on @param name the name of the method to search for @param parameterType the type of the parameter to be passed @return the matching...
[ "Finds", "a", "method", "of", "the", "given", "name", "that", "will", "accept", "a", "parameter", "of", "the", "given", "type", ".", "If", "more", "than", "one", "method", "matches", "returns", "the", "first", "such", "method", "found", "." ]
0f4fef2615d9687997b70a36eed1d62dd42df035
https://github.com/amazon-archives/aws-sdk-java-resources/blob/0f4fef2615d9687997b70a36eed1d62dd42df035/aws-resources-core/src/main/java/com/amazonaws/resources/internal/ReflectionUtils.java#L498-L521
train
Find a method in the target object that matches the name and parameterType.
Of course, here is the Java code you requested: ```java private static Method findMethod( Object target, String name, Class<?> parameterType) { for (Method method : target.getClass().getMethods()) { if (!method.getName().equals(name)) { continue;...
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/databases/DerbyDatabase.java
DerbyDatabase.initTableInfoUniqueKeys
@Override protected void initTableInfoUniqueKeys(final Connection _con, final String _sql, final Map<String, TableInformation> _cache4Name) throws SQLException { final String sqlStmt = new StringBuilder() ...
java
@Override protected void initTableInfoUniqueKeys(final Connection _con, final String _sql, final Map<String, TableInformation> _cache4Name) throws SQLException { final String sqlStmt = new StringBuilder() ...
[ "@", "Override", "protected", "void", "initTableInfoUniqueKeys", "(", "final", "Connection", "_con", ",", "final", "String", "_sql", ",", "final", "Map", "<", "String", ",", "TableInformation", ">", "_cache4Name", ")", "throws", "SQLException", "{", "final", "St...
Fetches all unique keys for this table. Instead of using the JDBC meta data functionality, a SQL statement on system tables are used, because the JDBC meta data functionality returns for unique keys internal names and not the real names. Also if a unique key includes also columns with null values, this unique keys are ...
[ "Fetches", "all", "unique", "keys", "for", "this", "table", ".", "Instead", "of", "using", "the", "JDBC", "meta", "data", "functionality", "a", "SQL", "statement", "on", "system", "tables", "are", "used", "because", "the", "JDBC", "meta", "data", "functional...
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/databases/DerbyDatabase.java#L450-L465
train
Override this method to initialize the unique keys.
Of course, here is the Java code you requested: ```java @Override protected void initTableInfoUniqueKeys(final Connection _con, final String _sql, final Map<String, TableInformation> _cache4Name) throws SQLException {...
jwtk/jjwt
impl/src/main/java/io/jsonwebtoken/impl/crypto/EllipticCurveProvider.java
EllipticCurveProvider.generateKeyPair
public static KeyPair generateKeyPair(SignatureAlgorithm alg, SecureRandom random) { return generateKeyPair("EC", null, alg, random); }
java
public static KeyPair generateKeyPair(SignatureAlgorithm alg, SecureRandom random) { return generateKeyPair("EC", null, alg, random); }
[ "public", "static", "KeyPair", "generateKeyPair", "(", "SignatureAlgorithm", "alg", ",", "SecureRandom", "random", ")", "{", "return", "generateKeyPair", "(", "\"EC\"", ",", "null", ",", "alg", ",", "random", ")", ";", "}" ]
Generates a new secure-random key pair of sufficient strength for the specified Elliptic Curve {@link SignatureAlgorithm} (must be one of {@code ES256}, {@code ES384} or {@code ES512}) using the specified {@link SecureRandom} random number generator. This is a convenience method that immediately delegates to {@link #g...
[ "Generates", "a", "new", "secure", "-", "random", "key", "pair", "of", "sufficient", "strength", "for", "the", "specified", "Elliptic", "Curve", "{", "@link", "SignatureAlgorithm", "}", "(", "must", "be", "one", "of", "{", "@code", "ES256", "}", "{", "@cod...
86b6096946752cffcfbc9b0a5503f1ea195cc140
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/impl/src/main/java/io/jsonwebtoken/impl/crypto/EllipticCurveProvider.java#L103-L105
train
Generate a key pair using the ECDSA algorithm.
Of course, here is the Java code you requested: ```java public static KeyPair generateKeyPair(SignatureAlgorithm alg, SecureRandom random) { return generateKeyPair("EC", null, alg, random); } ``` Hope this helps!
eclipse/xtext-extras
org.eclipse.xtext.xbase.ide/src-gen/org/eclipse/xtext/xbase/ide/contentassist/antlr/internal/InternalXbaseParser.java
InternalXbaseParser.ruleXConstructorCall
public final void ruleXConstructorCall() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXbase.g:1271:2: ( ( ( rule__XConstructorCall__Group__0 ) ) ) // InternalXbase.g:1272:2: ( ( rule__XConstructorCall__Group__0 ) ) { ...
java
public final void ruleXConstructorCall() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXbase.g:1271:2: ( ( ( rule__XConstructorCall__Group__0 ) ) ) // InternalXbase.g:1272:2: ( ( rule__XConstructorCall__Group__0 ) ) { ...
[ "public", "final", "void", "ruleXConstructorCall", "(", ")", "throws", "RecognitionException", "{", "int", "stackSize", "=", "keepStackSize", "(", ")", ";", "try", "{", "// InternalXbase.g:1271:2: ( ( ( rule__XConstructorCall__Group__0 ) ) )", "// InternalXbase.g:1272:2: ( ( ru...
InternalXbase.g:1267:1: ruleXConstructorCall : ( ( rule__XConstructorCall__Group__0 ) ) ;
[ "InternalXbase", ".", "g", ":", "1267", ":", "1", ":", "ruleXConstructorCall", ":", "(", "(", "rule__XConstructorCall__Group__0", ")", ")", ";" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase.ide/src-gen/org/eclipse/xtext/xbase/ide/contentassist/antlr/internal/InternalXbaseParser.java#L4235-L4280
train
start synpred12_InternalSARL
Of course, here is the Java code you requested: ```java public final void ruleXConstructorCall() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXbase.g:1271:2: ( ( ( rule__XConstructorCall__Group__0 ) ) ) // InternalXbase.g:1272:2: (...
uber/NullAway
nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java
NullabilityUtil.getAllAnnotationsForParameter
public static Stream<? extends AnnotationMirror> getAllAnnotationsForParameter( Symbol.MethodSymbol symbol, int paramInd) { Symbol.VarSymbol varSymbol = symbol.getParameters().get(paramInd); return Stream.concat( varSymbol.getAnnotationMirrors().stream(), symbol .getRawTypeAttr...
java
public static Stream<? extends AnnotationMirror> getAllAnnotationsForParameter( Symbol.MethodSymbol symbol, int paramInd) { Symbol.VarSymbol varSymbol = symbol.getParameters().get(paramInd); return Stream.concat( varSymbol.getAnnotationMirrors().stream(), symbol .getRawTypeAttr...
[ "public", "static", "Stream", "<", "?", "extends", "AnnotationMirror", ">", "getAllAnnotationsForParameter", "(", "Symbol", ".", "MethodSymbol", "symbol", ",", "int", "paramInd", ")", "{", "Symbol", ".", "VarSymbol", "varSymbol", "=", "symbol", ".", "getParameters...
Works for method parameters defined either in source or in class files @param symbol the method symbol @param paramInd index of the parameter @return all declaration and type-use annotations for the parameter
[ "Works", "for", "method", "parameters", "defined", "either", "in", "source", "or", "in", "class", "files" ]
c3979b4241f80411dbba6aac3ff653acbb88d00b
https://github.com/uber/NullAway/blob/c3979b4241f80411dbba6aac3ff653acbb88d00b/nullaway/src/main/java/com/uber/nullaway/NullabilityUtil.java#L153-L165
train
Get all annotations for a parameter.
Of course, here is the Java code you requested: ```java public static Stream<? extends AnnotationMirror> getAllAnnotationsForParameter( Symbol.MethodSymbol symbol, int paramInd) { Symbol.VarSymbol varSymbol = symbol.getParameters().get(paramInd); return Stream.concat( varSymbol.getAnnotationMirro...
marvinlabs/android-floatinglabel-widgets
library/src/main/java/com/marvinlabs/widget/floatinglabel/instantpicker/FloatingLabelInstantPicker.java
FloatingLabelInstantPicker.onSelectedInstantChanged
protected void onSelectedInstantChanged() { if (selectedInstant == null) { getInputWidget().setText(""); anchorLabel(); } else { getInputWidget().setText(getInstantPrinter().print(selectedInstant)); floatLabel(); } if (instantPickerListene...
java
protected void onSelectedInstantChanged() { if (selectedInstant == null) { getInputWidget().setText(""); anchorLabel(); } else { getInputWidget().setText(getInstantPrinter().print(selectedInstant)); floatLabel(); } if (instantPickerListene...
[ "protected", "void", "onSelectedInstantChanged", "(", ")", "{", "if", "(", "selectedInstant", "==", "null", ")", "{", "getInputWidget", "(", ")", ".", "setText", "(", "\"\"", ")", ";", "anchorLabel", "(", ")", ";", "}", "else", "{", "getInputWidget", "(", ...
Refreshes the widget state when the selection changes
[ "Refreshes", "the", "widget", "state", "when", "the", "selection", "changes" ]
bb89889f1e75ed9b228b77d3ba895ceeeb41fe4f
https://github.com/marvinlabs/android-floatinglabel-widgets/blob/bb89889f1e75ed9b228b77d3ba895ceeeb41fe4f/library/src/main/java/com/marvinlabs/widget/floatinglabel/instantpicker/FloatingLabelInstantPicker.java#L149-L160
train
On selected instant changed.
Of course, here is the Java code you requested: ```java protected void onSelectedInstantChanged() { if (selectedInstant == null) { getInputWidget().setText(""); anchorLabel(); } else { getInputWidget().setText(getInstantPrinter().print(selectedInstant)); ...
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java
AbstractErrorWebExceptionHandler.isTraceEnabled
protected boolean isTraceEnabled(ServerRequest request) { String parameter = request.queryParam("trace").orElse("false"); return !"false".equalsIgnoreCase(parameter); }
java
protected boolean isTraceEnabled(ServerRequest request) { String parameter = request.queryParam("trace").orElse("false"); return !"false".equalsIgnoreCase(parameter); }
[ "protected", "boolean", "isTraceEnabled", "(", "ServerRequest", "request", ")", "{", "String", "parameter", "=", "request", ".", "queryParam", "(", "\"trace\"", ")", ".", "orElse", "(", "\"false\"", ")", ";", "return", "!", "\"false\"", ".", "equalsIgnoreCase", ...
Check whether the trace attribute has been set on the given request. @param request the source request @return {@code true} if the error trace has been requested, {@code false} otherwise
[ "Check", "whether", "the", "trace", "attribute", "has", "been", "set", "on", "the", "given", "request", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java#L157-L160
train
Returns true if the request is trace - able.
Of course, here is the Java code you requested: ```java protected boolean isTraceEnabled(ServerRequest request) { String parameter = request.queryParam("trace").orElse("false"); return !"false".equalsIgnoreCase(parameter); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommsServerByteBuffer.java
CommsServerByteBuffer.putMEMEMessage
public synchronized int putMEMEMessage(AbstractMessage memeMessage, Conversation conversation) throws SIConnectionDroppedException, UnsupportedEncodingException, IncorrectMessageTypeException, MessageCopyFailedException, ...
java
public synchronized int putMEMEMessage(AbstractMessage memeMessage, Conversation conversation) throws SIConnectionDroppedException, UnsupportedEncodingException, IncorrectMessageTypeException, MessageCopyFailedException, ...
[ "public", "synchronized", "int", "putMEMEMessage", "(", "AbstractMessage", "memeMessage", ",", "Conversation", "conversation", ")", "throws", "SIConnectionDroppedException", ",", "UnsupportedEncodingException", ",", "IncorrectMessageTypeException", ",", "MessageCopyFailedExceptio...
Puts a message into the byte buffer using the <code>encodeFast()</code method of encoding messages. This method takes account of any <i>capabilities</i> negotiated at the point the connection was established. This method should only be used for ME-ME JsMessage's. @param memeMessage The message to encode. @param conver...
[ "Puts", "a", "message", "into", "the", "byte", "buffer", "using", "the", "<code", ">", "encodeFast", "()", "<", "/", "code", "method", "of", "encoding", "messages", ".", "This", "method", "takes", "account", "of", "any", "<i", ">", "capabilities<", "/", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommsServerByteBuffer.java#L243-L262
train
This method is used to put a message into the ME.
Of course, here is the Java code you requested: ```java public synchronized int putMEMEMessage(AbstractMessage memeMessage, Conversation conversation) throws SIConnectionDroppedException, UnsupportedEncodingException, IncorrectMessageTypeException, ...
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java
JobState.writeStateSummary
protected void writeStateSummary(JsonWriter jsonWriter) throws IOException { jsonWriter.name("job name").value(this.getJobName()).name("job id").value(this.getJobId()).name("job state") .value(this.getState().name()).name("start time").value(this.getStartTime()).name("end time") .value(this.getEndTi...
java
protected void writeStateSummary(JsonWriter jsonWriter) throws IOException { jsonWriter.name("job name").value(this.getJobName()).name("job id").value(this.getJobId()).name("job state") .value(this.getState().name()).name("start time").value(this.getStartTime()).name("end time") .value(this.getEndTi...
[ "protected", "void", "writeStateSummary", "(", "JsonWriter", "jsonWriter", ")", "throws", "IOException", "{", "jsonWriter", ".", "name", "(", "\"job name\"", ")", ".", "value", "(", "this", ".", "getJobName", "(", ")", ")", ".", "name", "(", "\"job id\"", ")...
Write a summary to the json document @param jsonWriter a {@link com.google.gson.stream.JsonWriter} used to write the json document
[ "Write", "a", "summary", "to", "the", "json", "document" ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java#L614-L619
train
Write the state summary of the ClusterEntry.
Of course, here is the Java code you requested: ```java protected void writeStateSummary(JsonWriter jsonWriter) throws IOException { jsonWriter.name("job name").value(this.getJobName()).name("job id").value(this.getJobId()).name("job state") .value(this.getState().name()).name("start time").value(this.getS...
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java
XsdAsmUtils.generateClass
static ClassWriter generateClass(String className, String superName, String[] interfaces, String signature, int classModifiers, String apiName) { ClassWriter classWriter = new ClassWriter(0); if (interfaces != null){ for (int i = 0; i < interfaces.length; i++) { interfaces[i...
java
static ClassWriter generateClass(String className, String superName, String[] interfaces, String signature, int classModifiers, String apiName) { ClassWriter classWriter = new ClassWriter(0); if (interfaces != null){ for (int i = 0; i < interfaces.length; i++) { interfaces[i...
[ "static", "ClassWriter", "generateClass", "(", "String", "className", ",", "String", "superName", ",", "String", "[", "]", "interfaces", ",", "String", "signature", ",", "int", "classModifiers", ",", "String", "apiName", ")", "{", "ClassWriter", "classWriter", "...
Generates an empty class. @param className The classes name. @param superName The super object, which the class extends from. @param interfaces The name of the interfaces which this class implements. @param classModifiers The modifiers to the class. @return A class writer that will be used to write the remaining inform...
[ "Generates", "an", "empty", "class", "." ]
ccb78f9dd4b957ad5ac1ca349eaf24338c421e94
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java#L514-L526
train
Generate a class from a class name super name and interfaces.
Of course, here is the Java code you requested: ```java static ClassWriter generateClass(String className, String superName, String[] interfaces, String signature, int classModifiers, String apiName) { ClassWriter classWriter = new ClassWriter(0); if (interfaces != null){ for (int i = 0; i...
softindex/datakernel
cloud-lsmt-aggregation/src/main/java/io/datakernel/aggregation/Aggregation.java
Aggregation.consume
@SuppressWarnings("unchecked") public <T, C, K extends Comparable> Promise<AggregationDiff> consume(StreamSupplier<T> supplier, Class<T> inputClass, Map<String, String> keyFields, Map<String, String> measureFields) { checkArgument(new HashSet<>(getKeys()).equals(keyFields.keySet()), "Expected keys: %s, actual key...
java
@SuppressWarnings("unchecked") public <T, C, K extends Comparable> Promise<AggregationDiff> consume(StreamSupplier<T> supplier, Class<T> inputClass, Map<String, String> keyFields, Map<String, String> measureFields) { checkArgument(new HashSet<>(getKeys()).equals(keyFields.keySet()), "Expected keys: %s, actual key...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ",", "C", ",", "K", "extends", "Comparable", ">", "Promise", "<", "AggregationDiff", ">", "consume", "(", "StreamSupplier", "<", "T", ">", "supplier", ",", "Class", "<", "T", ">", "i...
Provides a {@link StreamConsumer} for streaming data to this aggregation. @param inputClass class of input records @param <T> data records type @return consumer for streaming data to aggregation
[ "Provides", "a", "{", "@link", "StreamConsumer", "}", "for", "streaming", "data", "to", "this", "aggregation", "." ]
090ca1116416c14d463d49d275cb1daaafa69c56
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/cloud-lsmt-aggregation/src/main/java/io/datakernel/aggregation/Aggregation.java#L226-L258
train
Consumes data in the given stream supplier.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public <T, C, K extends Comparable> Promise<AggregationDiff> consume(StreamSupplier<T> supplier, Class<T> inputClass, Map<String, String> keyFields, Map<String, String> measureFields) { checkArgument(new HashSet<>(getKeys()).e...
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/container/config/PropertiesConfigNodeFactory.java
PropertiesConfigNodeFactory.load
public static ConfigNode load(Properties input) { ConfigNode config = new ConfigNode(); load(config, input); return config; }
java
public static ConfigNode load(Properties input) { ConfigNode config = new ConfigNode(); load(config, input); return config; }
[ "public", "static", "ConfigNode", "load", "(", "Properties", "input", ")", "{", "ConfigNode", "config", "=", "new", "ConfigNode", "(", ")", ";", "load", "(", "config", ",", "input", ")", ";", "return", "config", ";", "}" ]
Load a given {@link java.util.Properties} into a {@link ConfigNode}. @param input The properties to load. @return The loaded {@code ConfigNode}.
[ "Load", "a", "given", "{", "@link", "java", ".", "util", ".", "Properties", "}", "into", "a", "{", "@link", "ConfigNode", "}", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/container/config/PropertiesConfigNodeFactory.java#L43-L49
train
Load a CIDCTYPE configuration from the properties.
Of course, here is the Java code you requested: ```java public static ConfigNode load(Properties input) { ConfigNode config = new ConfigNode(); load(config, input); return config; } ``` Hope this helps!
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java
DRL5Parser.unif
private String unif( DroolsEditorType edType ) throws RecognitionException { Token label = match( input, DRL5Lexer.ID, null, null, edType ); if ( state.failed ) return null; match...
java
private String unif( DroolsEditorType edType ) throws RecognitionException { Token label = match( input, DRL5Lexer.ID, null, null, edType ); if ( state.failed ) return null; match...
[ "private", "String", "unif", "(", "DroolsEditorType", "edType", ")", "throws", "RecognitionException", "{", "Token", "label", "=", "match", "(", "input", ",", "DRL5Lexer", ".", "ID", ",", "null", ",", "null", ",", "edType", ")", ";", "if", "(", "state", ...
unif := ID UNIFY @return @throws RecognitionException
[ "unif", ":", "=", "ID", "UNIFY" ]
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L3087-L3103
train
Unif - if = ID
Of course, here is the Java code you requested: ```java private String unif( DroolsEditorType edType ) throws RecognitionException { Token label = match( input, DRL5Lexer.ID, null, null, edType )...
OpenBEL/openbel-framework
org.openbel.framework.api/src/main/java/org/openbel/framework/api/KAMStoreImpl.java
KAMStoreImpl.getSupportingTerms
@Override public List<BelTerm> getSupportingTerms(KamNode kamNode) { if (kamNode == null) throw new InvalidArgument("kamNode", kamNode); if (!exists(kamNode.getKam())) return null; return getSupportingTerms(kamNode, false, null); }
java
@Override public List<BelTerm> getSupportingTerms(KamNode kamNode) { if (kamNode == null) throw new InvalidArgument("kamNode", kamNode); if (!exists(kamNode.getKam())) return null; return getSupportingTerms(kamNode, false, null); }
[ "@", "Override", "public", "List", "<", "BelTerm", ">", "getSupportingTerms", "(", "KamNode", "kamNode", ")", "{", "if", "(", "kamNode", "==", "null", ")", "throw", "new", "InvalidArgument", "(", "\"kamNode\"", ",", "kamNode", ")", ";", "if", "(", "!", "...
{@inheritDoc}
[ "{" ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.api/src/main/java/org/openbel/framework/api/KAMStoreImpl.java#L472-L477
train
Get the list of supporting terms for a KAM node.
Of course, here is the Java code you requested: ```java @Override public List<BelTerm> getSupportingTerms(KamNode kamNode) { if (kamNode == null) throw new InvalidArgument("kamNode", kamNode); if (!exists(kamNode.getKam())) return null; return getSupportingTerms(kamNode, false, null); }...
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java
Token.getLemmaStr
public String getLemmaStr() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemmaStr == null) jcasType.jcas.throwFeatMissing("lemmaStr", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_lemmaStr);}
java
public String getLemmaStr() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemmaStr == null) jcasType.jcas.throwFeatMissing("lemmaStr", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_lemmaStr);}
[ "public", "String", "getLemmaStr", "(", ")", "{", "if", "(", "Token_Type", ".", "featOkTst", "&&", "(", "(", "Token_Type", ")", "jcasType", ")", ".", "casFeat_lemmaStr", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"lemmaStr\""...
getter for lemmaStr - gets @generated @return value of the feature
[ "getter", "for", "lemmaStr", "-", "gets" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java#L284-L287
train
getter for lemmaStr - gets lemma string
Of course, here is the Java code you requested: ```java public String getLemmaStr() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_lemmaStr == null) jcasType.jcas.throwFeatMissing("lemmaStr", "de.julielab.jules.types.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasT...
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AbstractAddStepHandler.java
AbstractAddStepHandler.rollbackRuntime
@Deprecated protected void rollbackRuntime(OperationContext context, final ModelNode operation, final ModelNode model, List<ServiceController<?>> controllers) { // no-op }
java
@Deprecated protected void rollbackRuntime(OperationContext context, final ModelNode operation, final ModelNode model, List<ServiceController<?>> controllers) { // no-op }
[ "@", "Deprecated", "protected", "void", "rollbackRuntime", "(", "OperationContext", "context", ",", "final", "ModelNode", "operation", ",", "final", "ModelNode", "model", ",", "List", "<", "ServiceController", "<", "?", ">", ">", "controllers", ")", "{", "// no-...
<strong>Deprecated</strong>. Subclasses wishing for custom rollback behavior should instead override {@link #rollbackRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}. <p> This default implementation does nothing. <strong>Subclasses that override this method should not call ...
[ "<strong", ">", "Deprecated<", "/", "strong", ">", ".", "Subclasses", "wishing", "for", "custom", "rollback", "behavior", "should", "instead", "override", "{", "@link", "#rollbackRuntime", "(", "OperationContext", "org", ".", "jboss", ".", "dmr", ".", "ModelNode...
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractAddStepHandler.java#L394-L397
train
This method is deprecated since it is not recommended to use this method.
Of course, here is the Java code you requested: ```java @Deprecated protected void rollbackRuntime(OperationContext context, final ModelNode operation, final ModelNode model, List<ServiceController<?>> controllers) { // no-op } ``` Hope this helps!
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java
ArgumentDescriptor.setValue
public void setValue(String constantValue) { this.fieldSource = SOURCE_VALUE; this.fieldRefName = null; this.returnedByProcedure = false; this.constantValue = constantValue; }
java
public void setValue(String constantValue) { this.fieldSource = SOURCE_VALUE; this.fieldRefName = null; this.returnedByProcedure = false; this.constantValue = constantValue; }
[ "public", "void", "setValue", "(", "String", "constantValue", ")", "{", "this", ".", "fieldSource", "=", "SOURCE_VALUE", ";", "this", ".", "fieldRefName", "=", "null", ";", "this", ".", "returnedByProcedure", "=", "false", ";", "this", ".", "constantValue", ...
Sets up this object to represent an argument that will be set to a constant value. @param constantValue the constant value.
[ "Sets", "up", "this", "object", "to", "represent", "an", "argument", "that", "will", "be", "set", "to", "a", "constant", "value", "." ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java#L122-L128
train
Sets the value of the field.
Of course, here is the Java code you requested: ```java public void setValue(String constantValue) { this.fieldSource = SOURCE_VALUE; this.fieldRefName = null; this.returnedByProcedure = false; this.constantValue = constantValue; } ``` Hope this helps!
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.setFlowLogConfigurationAsync
public ServiceFuture<FlowLogInformationInner> setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters, final ServiceCallback<FlowLogInformationInner> serviceCallback) { return ServiceFuture.fromResponse(setFlowLogConfigurationWithServiceResponseAsync(...
java
public ServiceFuture<FlowLogInformationInner> setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters, final ServiceCallback<FlowLogInformationInner> serviceCallback) { return ServiceFuture.fromResponse(setFlowLogConfigurationWithServiceResponseAsync(...
[ "public", "ServiceFuture", "<", "FlowLogInformationInner", ">", "setFlowLogConfigurationAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "FlowLogInformationInner", "parameters", ",", "final", "ServiceCallback", "<", "FlowLogInformationInner"...
Configures flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the configuration of flow log. @param serviceCallback the async ServiceCallback to handle su...
[ "Configures", "flow", "log", "on", "a", "specified", "resource", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1816-L1818
train
Sets the flow log configuration.
Of course, here is the Java code you requested: ```java public ServiceFuture<FlowLogInformationInner> setFlowLogConfigurationAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters, final ServiceCallback<FlowLogInformationInner> serviceCallback) { return ServiceFuture.from...
canhnt/sne-xacml
sne-xacml/src/main/java/oasis/names/tc/xacml/_3_0/core/schema/wd_17/ObjectFactory.java
ObjectFactory.createTarget
@XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17", name = "Target") public JAXBElement<TargetType> createTarget(TargetType value) { return new JAXBElement<TargetType>(_Target_QNAME, TargetType.class, null, value); }
java
@XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17", name = "Target") public JAXBElement<TargetType> createTarget(TargetType value) { return new JAXBElement<TargetType>(_Target_QNAME, TargetType.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\"", ",", "name", "=", "\"Target\"", ")", "public", "JAXBElement", "<", "TargetType", ">", "createTarget", "(", "TargetType", "value", ")", "{", "return", "new", "JAXBElemen...
Create an instance of {@link JAXBElement }{@code <}{@link TargetType }{@code >}}
[ "Create", "an", "instance", "of", "{" ]
7ffca16bf558d2c3ee16181d926f066ab1de75b2
https://github.com/canhnt/sne-xacml/blob/7ffca16bf558d2c3ee16181d926f066ab1de75b2/sne-xacml/src/main/java/oasis/names/tc/xacml/_3_0/core/schema/wd_17/ObjectFactory.java#L816-L819
train
Create an instance of the target property.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17", name = "Target") public JAXBElement<TargetType> createTarget(TargetType value) { return new JAXBElement<TargetType>(_Target_QNAME, TargetType.class, null, value); } ``` ...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.convertToPinyinString
public static String convertToPinyinString(String text, String separator, boolean remainNone) { List<Pinyin> pinyinList = PinyinDictionary.convertToPinyin(text, true); int length = pinyinList.size(); StringBuilder sb = new StringBuilder(length * (5 + separator.length())); int i = 1; ...
java
public static String convertToPinyinString(String text, String separator, boolean remainNone) { List<Pinyin> pinyinList = PinyinDictionary.convertToPinyin(text, true); int length = pinyinList.size(); StringBuilder sb = new StringBuilder(length * (5 + separator.length())); int i = 1; ...
[ "public", "static", "String", "convertToPinyinString", "(", "String", "text", ",", "String", "separator", ",", "boolean", "remainNone", ")", "{", "List", "<", "Pinyin", ">", "pinyinList", "=", "PinyinDictionary", ".", "convertToPinyin", "(", "text", ",", "true",...
转化为拼音 @param text 文本 @param separator 分隔符 @param remainNone 有些字没有拼音(如标点),是否保留它们的拼音(true用none表示,false用原字符表示) @return 一个字符串,由[拼音][分隔符][拼音]构成
[ "转化为拼音" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L566-L587
train
Convert a string of Pinyin to a String of Pinyin.
Of course, here is the Java code you requested: ```java public static String convertToPinyinString(String text, String separator, boolean remainNone) { List<Pinyin> pinyinList = PinyinDictionary.convertToPinyin(text, true); int length = pinyinList.size(); StringBuilder sb = new StringBuilde...
socialize/socialize-sdk-android
sdk/src/com/socialize/api/SocializeDeviceRegistrationSystem.java
SocializeDeviceRegistrationSystem.registerDevice
@Override public void registerDevice(SocializeSession session, DeviceRegistration registration, DeviceRegistrationListener listener) { List<DeviceRegistration> registrations = new ArrayList<DeviceRegistration>(1); registrations.add(registration); postAsync(session, ENDPOINT, registrations, listener); }
java
@Override public void registerDevice(SocializeSession session, DeviceRegistration registration, DeviceRegistrationListener listener) { List<DeviceRegistration> registrations = new ArrayList<DeviceRegistration>(1); registrations.add(registration); postAsync(session, ENDPOINT, registrations, listener); }
[ "@", "Override", "public", "void", "registerDevice", "(", "SocializeSession", "session", ",", "DeviceRegistration", "registration", ",", "DeviceRegistrationListener", "listener", ")", "{", "List", "<", "DeviceRegistration", ">", "registrations", "=", "new", "ArrayList",...
/* (non-Javadoc) @see com.socialize.api.DeviceRegistrationSystem#registerDevice(com.socialize.api.SocializeSession, com.socialize.entity.DeviceRegistration)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
23044d66c83718fe5c3f6f4b7b4033ac5b06fbee
https://github.com/socialize/socialize-sdk-android/blob/23044d66c83718fe5c3f6f4b7b4033ac5b06fbee/sdk/src/com/socialize/api/SocializeDeviceRegistrationSystem.java#L44-L49
valid
Register device asynchronously.
Of course, here is the Java code you requested: ```java @Override public void registerDevice(SocializeSession session, DeviceRegistration registration, DeviceRegistrationListener listener) { List<DeviceRegistration> registrations = new ArrayList<DeviceRegistration>(1); registrations.add(registration); postAsync...
infinispan/infinispan
cdi/common/src/main/java/org/infinispan/cdi/common/util/Arrays2.java
Arrays2.asSet
public static <T> Set<T> asSet(T... array) { Set<T> result = new HashSet<T>(); for (T a : array) { result.add(a); } return result; }
java
public static <T> Set<T> asSet(T... array) { Set<T> result = new HashSet<T>(); for (T a : array) { result.add(a); } return result; }
[ "public", "static", "<", "T", ">", "Set", "<", "T", ">", "asSet", "(", "T", "...", "array", ")", "{", "Set", "<", "T", ">", "result", "=", "new", "HashSet", "<", "T", ">", "(", ")", ";", "for", "(", "T", "a", ":", "array", ")", "{", "result...
Create a set from an array. If the array contains duplicate objects, the last object in the array will be placed in resultant set. @param <T> the type of the objects in the set @param array the array from which to create the set @return the created sets
[ "Create", "a", "set", "from", "an", "array", ".", "If", "the", "array", "contains", "duplicate", "objects", "the", "last", "object", "in", "the", "array", "will", "be", "placed", "in", "resultant", "set", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/common/src/main/java/org/infinispan/cdi/common/util/Arrays2.java#L25-L31
train
AsSet.
Of course, here is the Java code you requested: ```java public static <T> Set<T> asSet(T... array) { Set<T> result = new HashSet<T>(); for (T a : array) { result.add(a); } return result; } ``` Hope this helps!
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/DocBookUtilities.java
DocBookUtilities.validateTables
public static boolean validateTables(final Document doc) { final NodeList tables = doc.getElementsByTagName("table"); for (int i = 0; i < tables.getLength(); i++) { final Element table = (Element) tables.item(i); if (!validateTableRows(table)) { return false; ...
java
public static boolean validateTables(final Document doc) { final NodeList tables = doc.getElementsByTagName("table"); for (int i = 0; i < tables.getLength(); i++) { final Element table = (Element) tables.item(i); if (!validateTableRows(table)) { return false; ...
[ "public", "static", "boolean", "validateTables", "(", "final", "Document", "doc", ")", "{", "final", "NodeList", "tables", "=", "doc", ".", "getElementsByTagName", "(", "\"table\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tables", "."...
Checks to see if the Rows, in XML Tables exceed the maximum number of columns. @param doc The XML DOM Document to be validated. @return True if the XML is valid, otherwise false.
[ "Checks", "to", "see", "if", "the", "Rows", "in", "XML", "Tables", "exceed", "the", "maximum", "number", "of", "columns", "." ]
5ebf5ed30a94c34c33f4708caa04a8da99cbb15c
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/DocBookUtilities.java#L4088-L4106
train
Validate tables.
Of course, here is the Java code you requested: ```java public static boolean validateTables(final Document doc) { final NodeList tables = doc.getElementsByTagName("table"); for (int i = 0; i < tables.getLength(); i++) { final Element table = (Element) tables.item(i); if (!valid...
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java
ShareResourcesImpl.listShares
public PagedResult<Share> listShares(long objectId, PaginationParameters pagination) throws SmartsheetException { return this.listShares(objectId, pagination, false); }
java
public PagedResult<Share> listShares(long objectId, PaginationParameters pagination) throws SmartsheetException { return this.listShares(objectId, pagination, false); }
[ "public", "PagedResult", "<", "Share", ">", "listShares", "(", "long", "objectId", ",", "PaginationParameters", "pagination", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "listShares", "(", "objectId", ",", "pagination", ",", "false", ")", "...
List shares of a given object. It mirrors to the following Smartsheet REST API method: GET /workspace/{id}/shares GET /sheet/{id}/shares GET /sights/{id}/shares GET /reports/{id}/shares Exceptions: InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any pro...
[ "List", "shares", "of", "a", "given", "object", "." ]
f60e264412076271f83b65889ef9b891fad83df8
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java#L75-L77
train
List shares for a given object.
Of course, here is the Java code you requested: ```java public PagedResult<Share> listShares(long objectId, PaginationParameters pagination) throws SmartsheetException { return this.listShares(objectId, pagination, false); } ``` Hope this helps!
atomix/atomix
protocols/primary-backup/src/main/java/io/atomix/protocols/backup/service/impl/PrimaryBackupServiceContext.java
PrimaryBackupServiceContext.restore
public CompletableFuture<RestoreResponse> restore(RestoreRequest request) { ComposableFuture<RestoreResponse> future = new ComposableFuture<>(); threadContext.execute(() -> { role.restore(request).whenComplete(future); }); return future; }
java
public CompletableFuture<RestoreResponse> restore(RestoreRequest request) { ComposableFuture<RestoreResponse> future = new ComposableFuture<>(); threadContext.execute(() -> { role.restore(request).whenComplete(future); }); return future; }
[ "public", "CompletableFuture", "<", "RestoreResponse", ">", "restore", "(", "RestoreRequest", "request", ")", "{", "ComposableFuture", "<", "RestoreResponse", ">", "future", "=", "new", "ComposableFuture", "<>", "(", ")", ";", "threadContext", ".", "execute", "(",...
Handles a restore request. @param request the restore request @return future to be completed with a restore response
[ "Handles", "a", "restore", "request", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/primary-backup/src/main/java/io/atomix/protocols/backup/service/impl/PrimaryBackupServiceContext.java#L460-L466
train
Restore a role from a managed role.
Of course, here is the Java code you requested: ```java public CompletableFuture<RestoreResponse> restore(RestoreRequest request) { ComposableFuture<RestoreResponse> future = new ComposableFuture<>(); threadContext.execute(() -> { role.restore(request).whenComplete(future); }); return future; }...
enasequence/sequencetools
src/main/java/uk/ac/ebi/embl/api/validation/EnaValidator.java
EnaValidator.init
protected void init(String[] args, String message) throws SQLException, IOException { Params params = new Params(); JCommander jc = new JCommander(params); jc.setProgramName("ena_validator <files>"); try { jc.parse(args); }catch(Exception e) { System.err.println("Invalid options"); if (message ==...
java
protected void init(String[] args, String message) throws SQLException, IOException { Params params = new Params(); JCommander jc = new JCommander(params); jc.setProgramName("ena_validator <files>"); try { jc.parse(args); }catch(Exception e) { System.err.println("Invalid options"); if (message ==...
[ "protected", "void", "init", "(", "String", "[", "]", "args", ",", "String", "message", ")", "throws", "SQLException", ",", "IOException", "{", "Params", "params", "=", "new", "Params", "(", ")", ";", "JCommander", "jc", "=", "new", "JCommander", "(", "p...
Inits the arguments. @param args the args @param message the message @throws SQLException @throws IOException
[ "Inits", "the", "arguments", "." ]
4127f5e1a17540239f5810136153fbd6737fa262
https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/api/validation/EnaValidator.java#L221-L320
train
Initialize the validation.
Of course, here is the Java code you requested: ```java protected void init(String[] args, String message) throws SQLException, IOException { Params params = new Params(); JCommander jc = new JCommander(params); jc.setProgramName("ena_validator <files>"); try { jc.parse(args); }catch(Exception e) { ...
bingo-oss/sso-client
src/main/java/net/bingosoft/oss/ssoclient/SSOConfig.java
SSOConfig.autoConfigureUrls
public SSOConfig autoConfigureUrls(String baseUrl) { if(baseUrl.endsWith("/")) { baseUrl = baseUrl.substring(0, baseUrl.length() - 1); } //todo : this.setPublicKeyEndpointUrl(baseUrl + "/oauth2/publickey"); this.setTokenEndpointUrl(baseUrl + "/oauth2/token"); ...
java
public SSOConfig autoConfigureUrls(String baseUrl) { if(baseUrl.endsWith("/")) { baseUrl = baseUrl.substring(0, baseUrl.length() - 1); } //todo : this.setPublicKeyEndpointUrl(baseUrl + "/oauth2/publickey"); this.setTokenEndpointUrl(baseUrl + "/oauth2/token"); ...
[ "public", "SSOConfig", "autoConfigureUrls", "(", "String", "baseUrl", ")", "{", "if", "(", "baseUrl", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "baseUrl", "=", "baseUrl", ".", "substring", "(", "0", ",", "baseUrl", ".", "length", "(", ")", "-", "1"...
指定SSO服务器的基础地址,自动配置其他的地址属性。 <p/> 示例: <pre> String baseUrl = "https://sso.example.com/v3/oauth2"; SSOConfig config = new SSOConfig().autoConfigure(baseUrl); </pre>
[ "指定SSO服务器的基础地址", "自动配置其他的地址属性。" ]
2aac1f0fe28ec96aa4d3f3435d9aac3fd1b617a0
https://github.com/bingo-oss/sso-client/blob/2aac1f0fe28ec96aa4d3f3435d9aac3fd1b617a0/src/main/java/net/bingosoft/oss/ssoclient/SSOConfig.java#L231-L242
train
Auto configure urls for the SSO
Of course, here is the Java code you requested: ```java public SSOConfig autoConfigureUrls(String baseUrl) { if(baseUrl.endsWith("/")) { baseUrl = baseUrl.substring(0, baseUrl.length() - 1); } //todo : this.setPublicKeyEndpointUrl(baseUrl + "/oauth2/publickey"); this...
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/WSKeyStore.java
WSKeyStore.getKeyStore
public KeyStore getKeyStore(boolean reinitialize, boolean createIfNotPresent) throws Exception { if (myKeyStore == null || reinitialize) { myKeyStore = do_getKeyStore(reinitialize, createIfNotPresent); } return myKeyStore; }
java
public KeyStore getKeyStore(boolean reinitialize, boolean createIfNotPresent) throws Exception { if (myKeyStore == null || reinitialize) { myKeyStore = do_getKeyStore(reinitialize, createIfNotPresent); } return myKeyStore; }
[ "public", "KeyStore", "getKeyStore", "(", "boolean", "reinitialize", ",", "boolean", "createIfNotPresent", ")", "throws", "Exception", "{", "if", "(", "myKeyStore", "==", "null", "||", "reinitialize", ")", "{", "myKeyStore", "=", "do_getKeyStore", "(", "reinitiali...
Get the key store wrapped by this object. @param reinitialize @param createIfNotPresent @return KeyStore @throws Exception
[ "Get", "the", "key", "store", "wrapped", "by", "this", "object", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/WSKeyStore.java#L909-L915
train
Get the KeyStore.
Of course, here is the Java code you requested: ```java public KeyStore getKeyStore(boolean reinitialize, boolean createIfNotPresent) throws Exception { if (myKeyStore == null || reinitialize) { myKeyStore = do_getKeyStore(reinitialize, createIfNotPresent); } return myKeyStore; ...
ralscha/extdirectspring
src/main/java/ch/ralscha/extdirectspring/util/ExtDirectSpringUtil.java
ExtDirectSpringUtil.isMultipart
public static boolean isMultipart(HttpServletRequest request) { if (!"post".equals(request.getMethod().toLowerCase())) { return false; } String contentType = request.getContentType(); return contentType != null && contentType.toLowerCase().startsWith("multipart/"); }
java
public static boolean isMultipart(HttpServletRequest request) { if (!"post".equals(request.getMethod().toLowerCase())) { return false; } String contentType = request.getContentType(); return contentType != null && contentType.toLowerCase().startsWith("multipart/"); }
[ "public", "static", "boolean", "isMultipart", "(", "HttpServletRequest", "request", ")", "{", "if", "(", "!", "\"post\"", ".", "equals", "(", "request", ".", "getMethod", "(", ")", ".", "toLowerCase", "(", ")", ")", ")", "{", "return", "false", ";", "}",...
Checks if the request is a multipart request @param request the HTTP servlet request @return true if request is a Multipart request (file upload)
[ "Checks", "if", "the", "request", "is", "a", "multipart", "request" ]
4b018497c4e7503033f91d0491b4e74bf8291d2c
https://github.com/ralscha/extdirectspring/blob/4b018497c4e7503033f91d0491b4e74bf8291d2c/src/main/java/ch/ralscha/extdirectspring/util/ExtDirectSpringUtil.java#L74-L80
train
Checks if the request is a multipart request.
Of course, here is the Java code you requested: ```java public static boolean isMultipart(HttpServletRequest request) { if (!"post".equals(request.getMethod().toLowerCase())) { return false; } String contentType = request.getContentType(); return contentType != null && contentType.toLowerCase().startsWith("...
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java
FormLayoutFormBuilder.setLayout
public void setLayout(FormLayout layout, JPanel panel) { this.panel = panel; this.layout = layout; panel.setLayout(layout); cc = new CellConstraints(); row = -1; }
java
public void setLayout(FormLayout layout, JPanel panel) { this.panel = panel; this.layout = layout; panel.setLayout(layout); cc = new CellConstraints(); row = -1; }
[ "public", "void", "setLayout", "(", "FormLayout", "layout", ",", "JPanel", "panel", ")", "{", "this", ".", "panel", "=", "panel", ";", "this", ".", "layout", "=", "layout", ";", "panel", ".", "setLayout", "(", "layout", ")", ";", "cc", "=", "new", "C...
Set a panel with the provided layout layout. @param layout JGoodies FormLayout @param panel JPanel on which the builder will place the components.
[ "Set", "a", "panel", "with", "the", "provided", "layout", "layout", "." ]
6aad6e640b348cda8f3b0841f6e42025233f1eb8
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java#L208-L215
train
Sets the layout and the panel.
Of course, here is the Java code you requested: ```java public void setLayout(FormLayout layout, JPanel panel) { this.panel = panel; this.layout = layout; panel.setLayout(layout); cc = new CellConstraints(); row = -1; } ``` Hope this helps!
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/PolicyIndexBase.java
PolicyIndexBase.handleDocument
protected AbstractPolicy handleDocument(Document doc, PolicyFinder policyFinder) throws ParsingException { // handle the policy, if it's a known type Element root = doc.getDocumentElement(); String name = root.getTagName(); // see what type of policy this is if (name.equals("Pol...
java
protected AbstractPolicy handleDocument(Document doc, PolicyFinder policyFinder) throws ParsingException { // handle the policy, if it's a known type Element root = doc.getDocumentElement(); String name = root.getTagName(); // see what type of policy this is if (name.equals("Pol...
[ "protected", "AbstractPolicy", "handleDocument", "(", "Document", "doc", ",", "PolicyFinder", "policyFinder", ")", "throws", "ParsingException", "{", "// handle the policy, if it's a known type", "Element", "root", "=", "doc", ".", "getDocumentElement", "(", ")", ";", "...
A private method that handles reading the policy and creates the correct kind of AbstractPolicy. Because this makes use of the policyFinder, it cannot be reused between finders. Consider moving to policyManager, which is not intended to be reused outside of a policyFinderModule, which is not intended to be reused among...
[ "A", "private", "method", "that", "handles", "reading", "the", "policy", "and", "creates", "the", "correct", "kind", "of", "AbstractPolicy", ".", "Because", "this", "makes", "use", "of", "the", "policyFinder", "it", "cannot", "be", "reused", "between", "finder...
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/PolicyIndexBase.java#L271-L285
train
Handle the document.
Of course, here is the Java code you requested: ```java protected AbstractPolicy handleDocument(Document doc, PolicyFinder policyFinder) throws ParsingException { // handle the policy, if it's a known type Element root = doc.getDocumentElement(); String name = root.getTagName(); // see...
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/impl/DdthJdbcHelper.java
DdthJdbcHelper.execute
@Override public int execute(Connection conn, String sql, Object... bindValues) { long timestampStart = System.currentTimeMillis(); try { try (PreparedStatement pstm = conn.prepareStatement(sql)) { JdbcHelper.bindParams(pstm, bindValues); return pstm.execu...
java
@Override public int execute(Connection conn, String sql, Object... bindValues) { long timestampStart = System.currentTimeMillis(); try { try (PreparedStatement pstm = conn.prepareStatement(sql)) { JdbcHelper.bindParams(pstm, bindValues); return pstm.execu...
[ "@", "Override", "public", "int", "execute", "(", "Connection", "conn", ",", "String", "sql", ",", "Object", "...", "bindValues", ")", "{", "long", "timestampStart", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "try", "(", "PreparedS...
{@inheritDoc}
[ "{" ]
8d059ddf641a1629aa53851f9d1b41abf175a180
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/impl/DdthJdbcHelper.java#L28-L41
train
Execute a SQL statement.
Of course, here is the Java code you requested: ```java @Override public int execute(Connection conn, String sql, Object... bindValues) { long timestampStart = System.currentTimeMillis(); try { try (PreparedStatement pstm = conn.prepareStatement(sql)) { JdbcHelper.bindPa...
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.unexpected
public static UnexpectedException unexpected(Throwable cause, String msg, Object... args) { throw new UnexpectedException(cause, msg, args); }
java
public static UnexpectedException unexpected(Throwable cause, String msg, Object... args) { throw new UnexpectedException(cause, msg, args); }
[ "public", "static", "UnexpectedException", "unexpected", "(", "Throwable", "cause", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "throw", "new", "UnexpectedException", "(", "cause", ",", "msg", ",", "args", ")", ";", "}" ]
Throws out a {@link UnexpectedException} with message and cause specified. @param cause the cause of the unexpected exception. @param msg the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "a", "{", "@link", "UnexpectedException", "}", "with", "message", "and", "cause", "specified", "." ]
8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L202-L204
train
Thrown when an unexpected exception occurs.
Of course, here is the Java code you requested: ```java public static UnexpectedException unexpected(Throwable cause, String msg, Object... args) { throw new UnexpectedException(cause, msg, args); } ``` Hope this helps!
syphr42/libmythtv-java
protocol/src/main/java/org/syphr/mythtv/protocol/impl/ProtocolUtils.java
ProtocolUtils.combineInts
public static long combineInts(String high, String low) throws NumberFormatException { int highInt = Integer.parseInt(high); int lowInt = Integer.parseInt(low); /* * Shift the high integer into the upper 32 bits and add the low * integer. However, since this is really a si...
java
public static long combineInts(String high, String low) throws NumberFormatException { int highInt = Integer.parseInt(high); int lowInt = Integer.parseInt(low); /* * Shift the high integer into the upper 32 bits and add the low * integer. However, since this is really a si...
[ "public", "static", "long", "combineInts", "(", "String", "high", ",", "String", "low", ")", "throws", "NumberFormatException", "{", "int", "highInt", "=", "Integer", ".", "parseInt", "(", "high", ")", ";", "int", "lowInt", "=", "Integer", ".", "parseInt", ...
Combine two numbers that represent the high and low bits of a 64-bit number. @see #splitLong(long) @param high the high 32 bits @param low the low 32 bits @return a 64 bit number comprised of the given high and low bits concatenated together @throws NumberFormatException if the strings cannot be parsed as integers
[ "Combine", "two", "numbers", "that", "represent", "the", "high", "and", "low", "bits", "of", "a", "64", "-", "bit", "number", "." ]
cc7a2012fbd4a4ba2562dda6b2614fb0548526ea
https://github.com/syphr42/libmythtv-java/blob/cc7a2012fbd4a4ba2562dda6b2614fb0548526ea/protocol/src/main/java/org/syphr/mythtv/protocol/impl/ProtocolUtils.java#L43-L56
train
Combine two int values into a single long.
Of course, here is the Java code you requested: ```java public static long combineInts(String high, String low) throws NumberFormatException { int highInt = Integer.parseInt(high); int lowInt = Integer.parseInt(low); /* * Shift the high integer into the upper 32 bits and add the l...
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/PreprocessedRowsFlusher.java
PreprocessedRowsFlusher.create
public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException { return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE)); }
java
public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException { return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE)); }
[ "public", "static", "PreprocessedRowsFlusher", "create", "(", "final", "XMLUtil", "xmlUtil", ",", "final", "List", "<", "TableRow", ">", "tableRows", ")", "throws", "IOException", "{", "return", "new", "PreprocessedRowsFlusher", "(", "xmlUtil", ",", "tableRows", "...
Create an new rows flusher @param xmlUtil an util @param tableRows the rows @return the flusher @throws IOException if an I/O error occurs
[ "Create", "an", "new", "rows", "flusher" ]
a034d173083ffa602dc525699b97f753082eaef9
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/PreprocessedRowsFlusher.java#L48-L50
train
Create a new instance of the class.
Of course, here is the Java code you requested: ```java public static PreprocessedRowsFlusher create(final XMLUtil xmlUtil, final List<TableRow> tableRows) throws IOException { return new PreprocessedRowsFlusher(xmlUtil, tableRows, new StringBuilder(STRING_BUILDER_SIZE)); } ``` Hope this helps!
Unidata/thredds
cdm/src/main/java/ucar/unidata/geoloc/projection/Gdc_To_Utm_Converter.java
Gdc_To_Utm_Converter.init
protected void init(double a, double f, int zone, boolean isNorth) { A = a; F = 1.0 / f; // F is flattening this.axlon0_deg = (zone * 6 - 183); this.axlon0 = axlon0_deg * RADIANS_PER_DEGREE; double polx2b, polx3b, polx4b, polx5b; // Create the ERM constants. Eps2 = (F) * (2.0 - ...
java
protected void init(double a, double f, int zone, boolean isNorth) { A = a; F = 1.0 / f; // F is flattening this.axlon0_deg = (zone * 6 - 183); this.axlon0 = axlon0_deg * RADIANS_PER_DEGREE; double polx2b, polx3b, polx4b, polx5b; // Create the ERM constants. Eps2 = (F) * (2.0 - ...
[ "protected", "void", "init", "(", "double", "a", ",", "double", "f", ",", "int", "zone", ",", "boolean", "isNorth", ")", "{", "A", "=", "a", ";", "F", "=", "1.0", "/", "f", ";", "// F is flattening\r", "this", ".", "axlon0_deg", "=", "(", "zone", "...
_more_ @param a major axis @param f inverse flattening @param zone _more_ @param isNorth _more_
[ "_more_" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/unidata/geoloc/projection/Gdc_To_Utm_Converter.java#L120-L155
test
Initializes the object with the data from the input parameters.
Of course, here is the Java code you requested: ```java protected void init(double a, double f, int zone, boolean isNorth) { A = a; F = 1.0 / f; // F is flattening this.axlon0_deg = (zone * 6 - 183); this.axlon0 = axlon0_deg * RADIANS_PER_DEGREE; double polx2b, polx3b, polx4b, polx5b; ...
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java
GenericRepository.applyCacheHints
protected void applyCacheHints(TypedQuery<?> typedQuery, SearchParameters sp) { if (sp.isCacheable()) { typedQuery.setHint("org.hibernate.cacheable", true); if (sp.hasCacheRegion()) { typedQuery.setHint("org.hibernate.cacheRegion", sp.getCacheRegion()); } els...
java
protected void applyCacheHints(TypedQuery<?> typedQuery, SearchParameters sp) { if (sp.isCacheable()) { typedQuery.setHint("org.hibernate.cacheable", true); if (sp.hasCacheRegion()) { typedQuery.setHint("org.hibernate.cacheRegion", sp.getCacheRegion()); } els...
[ "protected", "void", "applyCacheHints", "(", "TypedQuery", "<", "?", ">", "typedQuery", ",", "SearchParameters", "sp", ")", "{", "if", "(", "sp", ".", "isCacheable", "(", ")", ")", "{", "typedQuery", ".", "setHint", "(", "\"org.hibernate.cacheable\"", ",", "...
/* Set hints for 2d level cache.
[ "/", "*", "Set", "hints", "for", "2d", "level", "cache", "." ]
61238b967952446d81cc68424a4e809093a77fcf
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L695-L705
train
Apply cache hints to the typed query.
Of course, here is the Java code you requested: ```java protected void applyCacheHints(TypedQuery<?> typedQuery, SearchParameters sp) { if (sp.isCacheable()) { typedQuery.setHint("org.hibernate.cacheable", true); if (sp.hasCacheRegion()) { typedQuery.setHint("org.hibern...
twitter/elephant-bird
pig/src/main/java/com/twitter/elephantbird/pig/load/LzoBaseLoadFunc.java
LzoBaseLoadFunc.incrCounter
protected void incrCounter(Pair<String, String> groupCounterPair, long incr) { counterHelper_.incrCounter(groupCounterPair.first, groupCounterPair.second, incr); }
java
protected void incrCounter(Pair<String, String> groupCounterPair, long incr) { counterHelper_.incrCounter(groupCounterPair.first, groupCounterPair.second, incr); }
[ "protected", "void", "incrCounter", "(", "Pair", "<", "String", ",", "String", ">", "groupCounterPair", ",", "long", "incr", ")", "{", "counterHelper_", ".", "incrCounter", "(", "groupCounterPair", ".", "first", ",", "groupCounterPair", ".", "second", ",", "in...
same as incrCounter(pair.first, pair.second, incr).
[ "same", "as", "incrCounter", "(", "pair", ".", "first", "pair", ".", "second", "incr", ")", "." ]
62642c935198aa0ff968f48669c7e654b42dfbf0
https://github.com/twitter/elephant-bird/blob/62642c935198aa0ff968f48669c7e654b42dfbf0/pig/src/main/java/com/twitter/elephantbird/pig/load/LzoBaseLoadFunc.java#L75-L77
valid
Increase the counter of a group.
Of course, here is the Java code you requested: ```java protected void incrCounter(Pair<String, String> groupCounterPair, long incr) { counterHelper_.incrCounter(groupCounterPair.first, groupCounterPair.second, incr); } ``` Hope this helps!
intellimate/IzouSDK
src/main/java/org/intellimate/izou/sdk/frameworks/permanentSoundOutput/events/MuteEvent.java
MuteEvent.createMuteEvent
public static Optional<MuteEvent> createMuteEvent(Identification source, Identification target) { if (target == null || target.equals(source)) return Optional.empty(); try { MuteEvent muteRequest = new MuteEvent(source); muteRequest.addResource(new SelectorResource(so...
java
public static Optional<MuteEvent> createMuteEvent(Identification source, Identification target) { if (target == null || target.equals(source)) return Optional.empty(); try { MuteEvent muteRequest = new MuteEvent(source); muteRequest.addResource(new SelectorResource(so...
[ "public", "static", "Optional", "<", "MuteEvent", ">", "createMuteEvent", "(", "Identification", "source", ",", "Identification", "target", ")", "{", "if", "(", "target", "==", "null", "||", "target", ".", "equals", "(", "source", ")", ")", "return", "Option...
creates a new MuteEvent @param source the caller @param target the target who should start playing @return the optional StartMusicRequest
[ "creates", "a", "new", "MuteEvent" ]
bc8705ad48a6ca12a722f2b787be435949fa5d08
https://github.com/intellimate/IzouSDK/blob/bc8705ad48a6ca12a722f2b787be435949fa5d08/src/main/java/org/intellimate/izou/sdk/frameworks/permanentSoundOutput/events/MuteEvent.java#L38-L48
test
Create a Mute Event object from an Identification.
Of course, here is the Java code you requested: ```java public static Optional<MuteEvent> createMuteEvent(Identification source, Identification target) { if (target == null || target.equals(source)) return Optional.empty(); try { MuteEvent muteRequest = new MuteEvent(source); ...
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/operation/impl/DefaultOperationRequestBuilder.java
DefaultOperationRequestBuilder.buildRequest
public ModelNode buildRequest() throws OperationFormatException { ModelNode address = request.get(Util.ADDRESS); if(prefix.isEmpty()) { address.setEmptyList(); } else { Iterator<Node> iterator = prefix.iterator(); while (iterator.hasNext()) { ...
java
public ModelNode buildRequest() throws OperationFormatException { ModelNode address = request.get(Util.ADDRESS); if(prefix.isEmpty()) { address.setEmptyList(); } else { Iterator<Node> iterator = prefix.iterator(); while (iterator.hasNext()) { ...
[ "public", "ModelNode", "buildRequest", "(", ")", "throws", "OperationFormatException", "{", "ModelNode", "address", "=", "request", ".", "get", "(", "Util", ".", "ADDRESS", ")", ";", "if", "(", "prefix", ".", "isEmpty", "(", ")", ")", "{", "address", ".", ...
Makes sure that the operation name and the address have been set and returns a ModelNode representing the operation request.
[ "Makes", "sure", "that", "the", "operation", "name", "and", "the", "address", "have", "been", "set", "and", "returns", "a", "ModelNode", "representing", "the", "operation", "request", "." ]
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/operation/impl/DefaultOperationRequestBuilder.java#L61-L85
train
Build the operation request ModelNode.
Of course, here is the Java code you requested: ```java public ModelNode buildRequest() throws OperationFormatException { ModelNode address = request.get(Util.ADDRESS); if(prefix.isEmpty()) { address.setEmptyList(); } else { Iterator<Node> iterator = prefix.iterator(); ...
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java
ConfigureForm.setTitle
@Override public void setTitle(String title) { addField(ConfigureNodeFields.title, FormField.Type.text_single); setAnswer(ConfigureNodeFields.title.getFieldName(), title); }
java
@Override public void setTitle(String title) { addField(ConfigureNodeFields.title, FormField.Type.text_single); setAnswer(ConfigureNodeFields.title.getFieldName(), title); }
[ "@", "Override", "public", "void", "setTitle", "(", "String", "title", ")", "{", "addField", "(", "ConfigureNodeFields", ".", "title", ",", "FormField", ".", "Type", ".", "text_single", ")", ";", "setAnswer", "(", "ConfigureNodeFields", ".", "title", ".", "g...
Sets a human readable title for the node. @param title The node title
[ "Sets", "a", "human", "readable", "title", "for", "the", "node", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/ConfigureForm.java#L597-L601
train
Sets the title of the node.
Of course, here is the Java code you requested: ```java @Override public void setTitle(String title) { addField(ConfigureNodeFields.title, FormField.Type.text_single); setAnswer(ConfigureNodeFields.title.getFieldName(), title); } ``` Hope this helps!
knowm/XChange
xchange-hitbtc/src/main/java/org/knowm/xchange/hitbtc/v2/service/HitbtcTradeService.java
HitbtcTradeService.getTradeHistory
@Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer limit = 1000; long offset = 0; if (params instanceof TradeHistoryParamLimit) { limit = ((TradeHistoryParamLimit) params).getLimit(); } if (params instanceof TradeHistoryParamOffset) { ...
java
@Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer limit = 1000; long offset = 0; if (params instanceof TradeHistoryParamLimit) { limit = ((TradeHistoryParamLimit) params).getLimit(); } if (params instanceof TradeHistoryParamOffset) { ...
[ "@", "Override", "public", "UserTrades", "getTradeHistory", "(", "TradeHistoryParams", "params", ")", "throws", "IOException", "{", "Integer", "limit", "=", "1000", ";", "long", "offset", "=", "0", ";", "if", "(", "params", "instanceof", "TradeHistoryParamLimit", ...
Required parameters: {@link TradeHistoryParamPaging} {@link TradeHistoryParamCurrencyPair}
[ "Required", "parameters", ":", "{" ]
e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-hitbtc/src/main/java/org/knowm/xchange/hitbtc/v2/service/HitbtcTradeService.java#L63-L86
train
Override the method to get the user trades from Hitbtc
Of course, here is the Java code you requested: ```java @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer limit = 1000; long offset = 0; if (params instanceof TradeHistoryParamLimit) { limit = ((TradeHistoryParamLimit) params).getLimit(); } ...
Alluxio/alluxio
core/transport/src/main/java/alluxio/grpc/UpdateUfsModePOptions.java
UpdateUfsModePOptions.getUfsMode
public alluxio.grpc.UfsPMode getUfsMode() { alluxio.grpc.UfsPMode result = alluxio.grpc.UfsPMode.valueOf(ufsMode_); return result == null ? alluxio.grpc.UfsPMode.NO_ACCESS : result; }
java
public alluxio.grpc.UfsPMode getUfsMode() { alluxio.grpc.UfsPMode result = alluxio.grpc.UfsPMode.valueOf(ufsMode_); return result == null ? alluxio.grpc.UfsPMode.NO_ACCESS : result; }
[ "public", "alluxio", ".", "grpc", ".", "UfsPMode", "getUfsMode", "(", ")", "{", "alluxio", ".", "grpc", ".", "UfsPMode", "result", "=", "alluxio", ".", "grpc", ".", "UfsPMode", ".", "valueOf", "(", "ufsMode_", ")", ";", "return", "result", "==", "null", ...
<code>optional .alluxio.grpc.file.UfsPMode ufsMode = 1;</code>
[ "<code", ">", "optional", ".", "alluxio", ".", "grpc", ".", "file", ".", "UfsPMode", "ufsMode", "=", "1", ";", "<", "/", "code", ">" ]
af38cf3ab44613355b18217a3a4d961f8fec3a10
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/transport/src/main/java/alluxio/grpc/UpdateUfsModePOptions.java#L100-L103
train
Gets the ufsMode.
Of course, here is the Java code you requested: ```java public alluxio.grpc.UfsPMode getUfsMode() { alluxio.grpc.UfsPMode result = alluxio.grpc.UfsPMode.valueOf(ufsMode_); return result == null ? alluxio.grpc.UfsPMode.NO_ACCESS : result; } ``` Hope this helps!
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/BlasBufferUtil.java
BlasBufferUtil.getDimension
public static int getDimension(INDArray arr, boolean defaultRows) { // FIXME: int cast //ignore ordering for vectors if (arr.isVector()) { return defaultRows ? (int) arr.rows() : (int) arr.columns(); } if (arr.ordering() == NDArrayFactory.C) return defaul...
java
public static int getDimension(INDArray arr, boolean defaultRows) { // FIXME: int cast //ignore ordering for vectors if (arr.isVector()) { return defaultRows ? (int) arr.rows() : (int) arr.columns(); } if (arr.ordering() == NDArrayFactory.C) return defaul...
[ "public", "static", "int", "getDimension", "(", "INDArray", "arr", ",", "boolean", "defaultRows", ")", "{", "// FIXME: int cast", "//ignore ordering for vectors", "if", "(", "arr", ".", "isVector", "(", ")", ")", "{", "return", "defaultRows", "?", "(", "int", ...
Get the dimension associated with the given ordering. When working with blas routines, they typically assume c ordering, instead you can invert the rows/columns which enable you to do no copy blas operations. @param arr @param defaultRows @return
[ "Get", "the", "dimension", "associated", "with", "the", "given", "ordering", "." ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/BlasBufferUtil.java#L145-L155
train
Get the dimension of the array
Of course, here is the Java code you requested: ```java public static int getDimension(INDArray arr, boolean defaultRows) { // FIXME: int cast //ignore ordering for vectors if (arr.isVector()) { return defaultRows ? (int) arr.rows() : (int) arr.columns(); } if (arr....
beangle/beangle3
commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/ConvertPopulatorBean.java
ConvertPopulatorBean.initProperty
public ObjectAndType initProperty(final Object target, Type type, final String attr) { Object propObj = target; Object property = null; int index = 0; String[] attrs = Strings.split(attr, "."); while (index < attrs.length) { try { property = getProperty(propObj, attrs[index]); ...
java
public ObjectAndType initProperty(final Object target, Type type, final String attr) { Object propObj = target; Object property = null; int index = 0; String[] attrs = Strings.split(attr, "."); while (index < attrs.length) { try { property = getProperty(propObj, attrs[index]); ...
[ "public", "ObjectAndType", "initProperty", "(", "final", "Object", "target", ",", "Type", "type", ",", "final", "String", "attr", ")", "{", "Object", "propObj", "=", "target", ";", "Object", "property", "=", "null", ";", "int", "index", "=", "0", ";", "S...
Initialize target's attribuate path,Return the last property value and type.
[ "Initialize", "target", "s", "attribuate", "path", "Return", "the", "last", "property", "value", "and", "type", "." ]
33df2873a5f38e28ac174a1d3b8144eb2f808e64
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/ConvertPopulatorBean.java#L78-L110
train
Initialize a property from a string.
Of course, here is the Java code you requested: ```java public ObjectAndType initProperty(final Object target, Type type, final String attr) { Object propObj = target; Object property = null; int index = 0; String[] attrs = Strings.split(attr, "."); while (index < attrs.length) { try { ...
roboconf/roboconf-platform
core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/utils/RabbitMqUtils.java
RabbitMqUtils.configureFactory
public static void configureFactory( ConnectionFactory factory, Map<String,String> configuration ) throws IOException { final Logger logger = Logger.getLogger( RabbitMqUtils.class.getName()); logger.fine( "Configuring a connection factory for RabbitMQ." ); String messageServerIp = configuration.get( RABBITMQ_S...
java
public static void configureFactory( ConnectionFactory factory, Map<String,String> configuration ) throws IOException { final Logger logger = Logger.getLogger( RabbitMqUtils.class.getName()); logger.fine( "Configuring a connection factory for RabbitMQ." ); String messageServerIp = configuration.get( RABBITMQ_S...
[ "public", "static", "void", "configureFactory", "(", "ConnectionFactory", "factory", ",", "Map", "<", "String", ",", "String", ">", "configuration", ")", "throws", "IOException", "{", "final", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "RabbitMqUt...
Configures the connection factory with the right settings. @param factory the connection factory @param configuration the messaging configuration @throws IOException if something went wrong @see RabbitMqConstants
[ "Configures", "the", "connection", "factory", "with", "the", "right", "settings", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/utils/RabbitMqUtils.java#L87-L154
train
Configure a connection factory for RabbitMQ.
Of course, here is the Java code you requested: ```java public static void configureFactory( ConnectionFactory factory, Map<String,String> configuration ) throws IOException { final Logger logger = Logger.getLogger( RabbitMqUtils.class.getName()); logger.fine( "Configuring a connection factory for RabbitMQ." ); ...
dottydingo/hyperion
client/src/main/java/com/dottydingo/hyperion/client/builder/query/QueryBuilder.java
QueryBuilder.ne
public QueryExpression ne(String propertyName,String value) { return new SimpleQueryExpression(propertyName, ComparisonOperator.NOT_EQUAL,wrap(value)); }
java
public QueryExpression ne(String propertyName,String value) { return new SimpleQueryExpression(propertyName, ComparisonOperator.NOT_EQUAL,wrap(value)); }
[ "public", "QueryExpression", "ne", "(", "String", "propertyName", ",", "String", "value", ")", "{", "return", "new", "SimpleQueryExpression", "(", "propertyName", ",", "ComparisonOperator", ".", "NOT_EQUAL", ",", "wrap", "(", "value", ")", ")", ";", "}" ]
Create a not equals expression @param propertyName The propery name @param value The value @return The query expression
[ "Create", "a", "not", "equals", "expression" ]
c4d119c90024a88c0335d7d318e9ccdb70149764
https://github.com/dottydingo/hyperion/blob/c4d119c90024a88c0335d7d318e9ccdb70149764/client/src/main/java/com/dottydingo/hyperion/client/builder/query/QueryBuilder.java#L92-L95
train
Create a NOT_EQUAL expression
Of course, here is the Java code you requested: ```java public QueryExpression ne(String propertyName,String value) { return new SimpleQueryExpression(propertyName, ComparisonOperator.NOT_EQUAL,wrap(value)); } ``` Hope this helps!
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_auditsyslogpolicy_binding.java
systemglobal_auditsyslogpolicy_binding.get
public static systemglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{ systemglobal_auditsyslogpolicy_binding obj = new systemglobal_auditsyslogpolicy_binding(); systemglobal_auditsyslogpolicy_binding response[] = (systemglobal_auditsyslogpolicy_binding[]) obj.get_resources(service); ...
java
public static systemglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{ systemglobal_auditsyslogpolicy_binding obj = new systemglobal_auditsyslogpolicy_binding(); systemglobal_auditsyslogpolicy_binding response[] = (systemglobal_auditsyslogpolicy_binding[]) obj.get_resources(service); ...
[ "public", "static", "systemglobal_auditsyslogpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "systemglobal_auditsyslogpolicy_binding", "obj", "=", "new", "systemglobal_auditsyslogpolicy_binding", "(", ")", ";", "systemglob...
Use this API to fetch a systemglobal_auditsyslogpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "systemglobal_auditsyslogpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemglobal_auditsyslogpolicy_binding.java#L180-L184
train
Use this API to fetch a systemglobal_auditsyslogpolicy_binding resources.
Of course, here is the Java code you requested: ```java public static systemglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{ systemglobal_auditsyslogpolicy_binding obj = new systemglobal_auditsyslogpolicy_binding(); systemglobal_auditsyslogpolicy_binding response[] = (systemglobal_au...
liquibase/liquibase
liquibase-core/src/main/java/liquibase/util/StringClauses.java
StringClauses.get
public String get(String exitingKey) { exitingKey = StringUtil.trimToEmpty(exitingKey).toLowerCase(); Object clauses = getImpl(exitingKey); if (clauses == null) { return null; } return clauses.toString(); }
java
public String get(String exitingKey) { exitingKey = StringUtil.trimToEmpty(exitingKey).toLowerCase(); Object clauses = getImpl(exitingKey); if (clauses == null) { return null; } return clauses.toString(); }
[ "public", "String", "get", "(", "String", "exitingKey", ")", "{", "exitingKey", "=", "StringUtil", ".", "trimToEmpty", "(", "exitingKey", ")", ".", "toLowerCase", "(", ")", ";", "Object", "clauses", "=", "getImpl", "(", "exitingKey", ")", ";", "if", "(", ...
Retrieves the given key. Returns null if not set. If clause at key is a StringClause, return the string version of it. Will traverse sub-clauses to find the key.
[ "Retrieves", "the", "given", "key", ".", "Returns", "null", "if", "not", "set", ".", "If", "clause", "at", "key", "is", "a", "StringClause", "return", "the", "string", "version", "of", "it", ".", "Will", "traverse", "sub", "-", "clauses", "to", "find", ...
86a3b30fa6821ac981056f252f918557f5ebcc60
https://github.com/liquibase/liquibase/blob/86a3b30fa6821ac981056f252f918557f5ebcc60/liquibase-core/src/main/java/liquibase/util/StringClauses.java#L405-L412
valid
Gets the value of the entry with the specified key.
Of course, here is the Java code you requested: ```java public String get(String exitingKey) { exitingKey = StringUtil.trimToEmpty(exitingKey).toLowerCase(); Object clauses = getImpl(exitingKey); if (clauses == null) { return null; } return clauses.toString(); } ...
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getDocLink
public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element, CharSequence label, boolean strong) { return getDocLink(context, typeElement, element, label, strong, false); }
java
public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element, CharSequence label, boolean strong) { return getDocLink(context, typeElement, element, label, strong, false); }
[ "public", "Content", "getDocLink", "(", "LinkInfoImpl", ".", "Kind", "context", ",", "TypeElement", "typeElement", ",", "Element", "element", ",", "CharSequence", "label", ",", "boolean", "strong", ")", "{", "return", "getDocLink", "(", "context", ",", "typeElem...
Return the link for the given member. @param context the id of the context where the link will be printed. @param typeElement the typeElement that we should link to. This is not necessarily equal to element.containingClass(). We may be inheriting comments. @param element the member being linked to. @param label the ...
[ "Return", "the", "link", "for", "the", "given", "member", "." ]
a53d069bbdb2c60232ed3811c19b65e41c3e60e0
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1382-L1385
train
Get the link for the class file.
Of course, here is the Java code you requested: ```java public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element, CharSequence label, boolean strong) { return getDocLink(context, typeElement, element, label, strong, false); } ``` Hope this helps!
robeio/robe
robe-hibernate/src/main/java/io/robe/hibernate/transaction/Transaction.java
Transaction.finish
private void finish() { try { if (session != null) { session.close(); } } finally { ManagedSessionContext.unbind(SESSION_FACTORY); if (!SESSIONS.get().isEmpty()) { ManagedSessionContext.bind(SESSIONS.get().pop()); ...
java
private void finish() { try { if (session != null) { session.close(); } } finally { ManagedSessionContext.unbind(SESSION_FACTORY); if (!SESSIONS.get().isEmpty()) { ManagedSessionContext.bind(SESSIONS.get().pop()); ...
[ "private", "void", "finish", "(", ")", "{", "try", "{", "if", "(", "session", "!=", "null", ")", "{", "session", ".", "close", "(", ")", ";", "}", "}", "finally", "{", "ManagedSessionContext", ".", "unbind", "(", "SESSION_FACTORY", ")", ";", "if", "(...
Closes and unbinds the current session. <br/> If {@link ManagedSessionContext} had a session before the current session, re-binds it to {@link ManagedSessionContext}
[ "Closes", "and", "unbinds", "the", "current", "session", ".", "<br", "/", ">", "If", "{" ]
a0a8c7cebd1f70f78cf24a66a002859e937badfe
https://github.com/robeio/robe/blob/a0a8c7cebd1f70f78cf24a66a002859e937badfe/robe-hibernate/src/main/java/io/robe/hibernate/transaction/Transaction.java#L168-L179
test
Finish the session.
Of course, here is the Java code you requested: ```java private void finish() { try { if (session != null) { session.close(); } } finally { ManagedSessionContext.unbind(SESSION_FACTORY); if (!SESSIONS.get().isEmpty()) { Man...
fastconnect/tibco-bwmaven
bw-maven-plugin/src/main/java/fr/fastconnect/factory/tibco/bw/maven/AbstractBWMojo.java
AbstractBWMojo.checkBWProject
private void checkBWProject() throws MojoExecutionException { if (projectDirectory == null) { projectNotFound(); } else if (!projectDirectory.exists() || !projectDirectory.isDirectory()) { projectNotFound(); } }
java
private void checkBWProject() throws MojoExecutionException { if (projectDirectory == null) { projectNotFound(); } else if (!projectDirectory.exists() || !projectDirectory.isDirectory()) { projectNotFound(); } }
[ "private", "void", "checkBWProject", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "projectDirectory", "==", "null", ")", "{", "projectNotFound", "(", ")", ";", "}", "else", "if", "(", "!", "projectDirectory", ".", "exists", "(", ")", "||", ...
This will check that the BW project specified in the POM project exists. TODO : add additional checks about BW project integrity @throws MojoExecutionException
[ "This", "will", "check", "that", "the", "BW", "project", "specified", "in", "the", "POM", "project", "exists", "." ]
09637c0e9f029fff41a7d84078965b63d261aed2
https://github.com/fastconnect/tibco-bwmaven/blob/09637c0e9f029fff41a7d84078965b63d261aed2/bw-maven-plugin/src/main/java/fr/fastconnect/factory/tibco/bw/maven/AbstractBWMojo.java#L641-L647
valid
Check if the project is a BW project.
Of course, here is the Java code you requested: ```java private void checkBWProject() throws MojoExecutionException { if (projectDirectory == null) { projectNotFound(); } else if (!projectDirectory.exists() || !projectDirectory.isDirectory()) { projectNotFound(); } } ``` Hope this helps!
googlegenomics/utils-java
src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java
GenomicsUtils.getCoverageBuckets
public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, OfflineAuth auth) throws IOException { Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth); ListCoverageBucketsResponse response = genomics.readgroupsets().coveragebuckets().list(readGroupSetId).ex...
java
public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, OfflineAuth auth) throws IOException { Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth); ListCoverageBucketsResponse response = genomics.readgroupsets().coveragebuckets().list(readGroupSetId).ex...
[ "public", "static", "List", "<", "CoverageBucket", ">", "getCoverageBuckets", "(", "String", "readGroupSetId", ",", "OfflineAuth", "auth", ")", "throws", "IOException", "{", "Genomics", "genomics", "=", "GenomicsFactory", ".", "builder", "(", ")", ".", "build", ...
Gets the CoverageBuckets for a given readGroupSetId using the Genomics API. @param readGroupSetId The id of the readGroupSet to query. @param auth The OfflineAuth for the API request. @return The list of reference bounds in the variantSet. @throws IOException
[ "Gets", "the", "CoverageBuckets", "for", "a", "given", "readGroupSetId", "using", "the", "Genomics", "API", "." ]
7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612
https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java#L86-L98
train
Get the CoverageBuckets list for a readGroupSetId
Of course, here is the Java code you requested: ```java public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, OfflineAuth auth) throws IOException { Genomics genomics = GenomicsFactory.builder().build().fromOfflineAuth(auth); ListCoverageBucketsResponse response = genomics....
KyoriPowered/lunar
src/main/java/net/kyori/lunar/collection/MoreIterables.java
MoreIterables.random
public static <T> /* @Nullable */ T random(final @NonNull Iterable<T> iterable) { return random(RANDOM, iterable); }
java
public static <T> /* @Nullable */ T random(final @NonNull Iterable<T> iterable) { return random(RANDOM, iterable); }
[ "public", "static", "<", "T", ">", "/* @Nullable */", "T", "random", "(", "final", "@", "NonNull", "Iterable", "<", "T", ">", "iterable", ")", "{", "return", "random", "(", "RANDOM", ",", "iterable", ")", ";", "}" ]
Gets a random element from an iterable. @param iterable the iterable @param <T> the type @return a random element
[ "Gets", "a", "random", "element", "from", "an", "iterable", "." ]
6856747d9034a2fe0c8d0a8a0150986797732b5c
https://github.com/KyoriPowered/lunar/blob/6856747d9034a2fe0c8d0a8a0150986797732b5c/src/main/java/net/kyori/lunar/collection/MoreIterables.java#L48-L50
train
Returns a random element from the given iterable.
Of course, here is the Java code you requested: ```java public static <T> /* @Nullable */ T random(final @NonNull Iterable<T> iterable) { return random(RANDOM, iterable); } ``` Hope this helps!
alkacon/opencms-core
src/org/opencms/file/CmsResourceFilter.java
CmsResourceFilter.addRequireFlags
public CmsResourceFilter addRequireFlags(int flags) { CmsResourceFilter extendedFilter = (CmsResourceFilter)clone(); extendedFilter.m_flags = flags; extendedFilter.m_filterFlags = REQUIRED; extendedFilter.updateCacheId(); return extendedFilter; }
java
public CmsResourceFilter addRequireFlags(int flags) { CmsResourceFilter extendedFilter = (CmsResourceFilter)clone(); extendedFilter.m_flags = flags; extendedFilter.m_filterFlags = REQUIRED; extendedFilter.updateCacheId(); return extendedFilter; }
[ "public", "CmsResourceFilter", "addRequireFlags", "(", "int", "flags", ")", "{", "CmsResourceFilter", "extendedFilter", "=", "(", "CmsResourceFilter", ")", "clone", "(", ")", ";", "extendedFilter", ".", "m_flags", "=", "flags", ";", "extendedFilter", ".", "m_filte...
Returns an extended filter to guarantee a distinct resource flags of the filtered resources.<p> @param flags the required resource flags @return a filter requiring the given resource flags
[ "Returns", "an", "extended", "filter", "to", "guarantee", "a", "distinct", "resource", "flags", "of", "the", "filtered", "resources", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsResourceFilter.java#L410-L419
train
Adds the flags to the filter.
Of course, here is the Java code you requested: ```java public CmsResourceFilter addRequireFlags(int flags) { CmsResourceFilter extendedFilter = (CmsResourceFilter)clone(); extendedFilter.m_flags = flags; extendedFilter.m_filterFlags = REQUIRED; extendedFilter.updateCacheId(); ...
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java
IdentityPatchContext.backupDirectory
static void backupDirectory(final File source, final File target) throws IOException { if (!target.exists()) { if (!target.mkdirs()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath()); } } final File[] files = source.listFiles(...
java
static void backupDirectory(final File source, final File target) throws IOException { if (!target.exists()) { if (!target.mkdirs()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath()); } } final File[] files = source.listFiles(...
[ "static", "void", "backupDirectory", "(", "final", "File", "source", ",", "final", "File", "target", ")", "throws", "IOException", "{", "if", "(", "!", "target", ".", "exists", "(", ")", ")", "{", "if", "(", "!", "target", ".", "mkdirs", "(", ")", ")...
Backup all xml files in a given directory. @param source the source directory @param target the target directory @throws IOException for any error
[ "Backup", "all", "xml", "files", "in", "a", "given", "directory", "." ]
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L1013-L1024
train
Backup directory.
Of course, here is the Java code you requested: ```java static void backupDirectory(final File source, final File target) throws IOException { if (!target.exists()) { if (!target.mkdirs()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath()); }...
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.execute
public static int execute(String poolName, String sql, Object[] params) throws YankSQLException { int returnInt = 0; try { returnInt = new QueryRunner(YANK_POOL_MANAGER.getConnectionPool(poolName)).update(sql, params); } catch (SQLException e) { handleSQLException(e, poolName, sql)...
java
public static int execute(String poolName, String sql, Object[] params) throws YankSQLException { int returnInt = 0; try { returnInt = new QueryRunner(YANK_POOL_MANAGER.getConnectionPool(poolName)).update(sql, params); } catch (SQLException e) { handleSQLException(e, poolName, sql)...
[ "public", "static", "int", "execute", "(", "String", "poolName", ",", "String", "sql", ",", "Object", "[", "]", "params", ")", "throws", "YankSQLException", "{", "int", "returnInt", "=", "0", ";", "try", "{", "returnInt", "=", "new", "QueryRunner", "(", ...
Executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL prepared statement. Returns the number of rows affected. @param poolName The name of the connection pool to query against @param sql The query to execute @param params The replacement parameters @return The number of rows affected
[ "Executes", "the", "given", "INSERT", "UPDATE", "DELETE", "REPLACE", "or", "UPSERT", "SQL", "prepared", "statement", ".", "Returns", "the", "number", "of", "rows", "affected", "." ]
b2071dcd94da99db6904355f9557456b8b292a6b
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L201-L215
train
Execute a SQL statement with the specified parameters.
Of course, here is the Java code you requested: ```java public static int execute(String poolName, String sql, Object[] params) throws YankSQLException { int returnInt = 0; try { returnInt = new QueryRunner(YANK_POOL_MANAGER.getConnectionPool(poolName)).update(sql, params); } catch (SQL...
virgo47/javasimon
core/src/main/java/org/javasimon/utils/SampleHtmlGenerator.java
SampleHtmlGenerator.toHtmlTable
private String toHtmlTable() { buildHeader(); for (Sample sample : this.samples) { buildRowForSample(sample); } builder.append("</table>"); return builder.toString(); }
java
private String toHtmlTable() { buildHeader(); for (Sample sample : this.samples) { buildRowForSample(sample); } builder.append("</table>"); return builder.toString(); }
[ "private", "String", "toHtmlTable", "(", ")", "{", "buildHeader", "(", ")", ";", "for", "(", "Sample", "sample", ":", "this", ".", "samples", ")", "{", "buildRowForSample", "(", "sample", ")", ";", "}", "builder", ".", "append", "(", "\"</table>\"", ")",...
Generates HTML table for the provided {@link Sample}s. @return HTML output for the samples
[ "Generates", "HTML", "table", "for", "the", "provided", "{", "@link", "Sample", "}", "s", "." ]
17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/SampleHtmlGenerator.java#L51-L58
train
Converts the data to HTML table.
Of course, here is the Java code you requested: ```java private String toHtmlTable() { buildHeader(); for (Sample sample : this.samples) { buildRowForSample(sample); } builder.append("</table>"); return builder.toString(); } ``` Hope this helps!
JoeKerouac/utils
src/main/java/com/joe/utils/common/Tools.java
Tools.createRandomNum
public static String createRandomNum(int length) { if (length < 0) { throw new IllegalArgumentException("长度不能小于0"); } char[] chars = new char[length]; for (int i = 0; i < length; i++) { chars[i] = (char) ((Math.random() * 10) + 48); } return new St...
java
public static String createRandomNum(int length) { if (length < 0) { throw new IllegalArgumentException("长度不能小于0"); } char[] chars = new char[length]; for (int i = 0; i < length; i++) { chars[i] = (char) ((Math.random() * 10) + 48); } return new St...
[ "public", "static", "String", "createRandomNum", "(", "int", "length", ")", "{", "if", "(", "length", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"长度不能小于0\");", "", "", "}", "char", "[", "]", "chars", "=", "new", "char", "[", ...
生成随机字符串(只包含数字) @param length 长度 @return 随机字符串
[ "生成随机字符串(只包含数字)" ]
45e1b2dc4d736956674fc4dcbe6cf84eaee69278
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/Tools.java#L69-L78
train
create random num
Of course, here is the Java code you requested: ```java public static String createRandomNum(int length) { if (length < 0) { throw new IllegalArgumentException("长度不能小于0"); } char[] chars = new char[length]; for (int i = 0; i < length; i++) { chars[i] = (char) ((M...
jkuhnert/ognl
src/main/java/ognl/OgnlRuntime.java
OgnlRuntime.isMoreSpecific
public static final boolean isMoreSpecific(Class[] classes1, Class[] classes2) { for (int index = 0, count = classes1.length; index < count; ++index) { Class c1 = classes1[index], c2 = classes2[index]; if (c1 == c2) continue; else if (c1.isPrimitive()) ...
java
public static final boolean isMoreSpecific(Class[] classes1, Class[] classes2) { for (int index = 0, count = classes1.length; index < count; ++index) { Class c1 = classes1[index], c2 = classes2[index]; if (c1 == c2) continue; else if (c1.isPrimitive()) ...
[ "public", "static", "final", "boolean", "isMoreSpecific", "(", "Class", "[", "]", "classes1", ",", "Class", "[", "]", "classes2", ")", "{", "for", "(", "int", "index", "=", "0", ",", "count", "=", "classes1", ".", "length", ";", "index", "<", "count", ...
Tells whether the first array of classes is more specific than the second. Assumes that the two arrays are of the same length.
[ "Tells", "whether", "the", "first", "array", "of", "classes", "is", "more", "specific", "than", "the", "second", ".", "Assumes", "that", "the", "two", "arrays", "are", "of", "the", "same", "length", "." ]
53d51a30c8c299b750dede779d05cb84beee73c3
https://github.com/jkuhnert/ognl/blob/53d51a30c8c299b750dede779d05cb84beee73c3/src/main/java/ognl/OgnlRuntime.java#L1113-L1129
test
Is more specific than the two classes?
Of course, here is the Java code you requested: ```java public static final boolean isMoreSpecific(Class[] classes1, Class[] classes2) { for (int index = 0, count = classes1.length; index < count; ++index) { Class c1 = classes1[index], c2 = classes2[index]; if (c1 == c2) ...
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/CreateOptions.java
CreateOptions.getOpt
public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) { if (opts == null) return null; CreateOptions result = null; for (int i = 0; i < opts.length; ++i) { if (opts[i].getClass() == theClass) { if (result != null) throw new IllegalAr...
java
public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) { if (opts == null) return null; CreateOptions result = null; for (int i = 0; i < opts.length; ++i) { if (opts[i].getClass() == theClass) { if (result != null) throw new IllegalAr...
[ "public", "static", "CreateOptions", "getOpt", "(", "Class", "<", "?", "extends", "CreateOptions", ">", "theClass", ",", "CreateOptions", "...", "opts", ")", "{", "if", "(", "opts", "==", "null", ")", "return", "null", ";", "CreateOptions", "result", "=", ...
Get an option of desired type @param theClass is the desired class of the opt @param opts - not null - at least one opt must be passed @return an opt from one of the opts of type theClass. returns null if there isn't any
[ "Get", "an", "option", "of", "desired", "type" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/CreateOptions.java#L145-L157
train
Get the first CreateOptions object of the given class.
Of course, here is the Java code you requested: ```java public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) { if (opts == null) return null; CreateOptions result = null; for (int i = 0; i < opts.length; ++i) { if (opts[i].getClass() == theClass) { ...
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/text/TextAnalysis.java
TextAnalysis.combine
public static String combine(String left, String right, int minOverlap) { if (left.length() < minOverlap) return null; if (right.length() < minOverlap) return null; int bestOffset = Integer.MAX_VALUE; for (int offset = minOverlap - left.length(); offset < right.length() - minOverlap; offset++) { b...
java
public static String combine(String left, String right, int minOverlap) { if (left.length() < minOverlap) return null; if (right.length() < minOverlap) return null; int bestOffset = Integer.MAX_VALUE; for (int offset = minOverlap - left.length(); offset < right.length() - minOverlap; offset++) { b...
[ "public", "static", "String", "combine", "(", "String", "left", ",", "String", "right", ",", "int", "minOverlap", ")", "{", "if", "(", "left", ".", "length", "(", ")", "<", "minOverlap", ")", "return", "null", ";", "if", "(", "right", ".", "length", ...
Combine string. @param left the left @param right the right @param minOverlap the min overlap @return the string
[ "Combine", "string", "." ]
b5a5e73449aae57de7dbfca2ed7a074432c5b17e
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/TextAnalysis.java#L58-L87
train
Combine two strings.
Of course, here is the Java code you requested: ```java public static String combine(String left, String right, int minOverlap) { if (left.length() < minOverlap) return null; if (right.length() < minOverlap) return null; int bestOffset = Integer.MAX_VALUE; for (int offset = minOverlap - left.length(); ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/ConversationTable.java
ConversationTable.get
public synchronized ConversationImpl get(int id) { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "get", ""+id); mutableKey.setValue(id); ConversationImpl retValue = idToConvTable.get(mutableKey); if (tc.isEntryEnabled()) SibTr.exit(this, tc, "get", retValue); return retValue; }
java
public synchronized ConversationImpl get(int id) { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "get", ""+id); mutableKey.setValue(id); ConversationImpl retValue = idToConvTable.get(mutableKey); if (tc.isEntryEnabled()) SibTr.exit(this, tc, "get", retValue); return retValue; }
[ "public", "synchronized", "ConversationImpl", "get", "(", "int", "id", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", "\"get\"", ",", "\"\"", "+", "id", ")", ";", "mutableKey", "."...
Retrieve a conversation from the table by ID @param id @return ConversationImpl
[ "Retrieve", "a", "conversation", "from", "the", "table", "by", "ID" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/ConversationTable.java#L174-L181
train
Gets a Conversation object from the table.
Of course, here is the Java code you requested: ```java public synchronized ConversationImpl get(int id) { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "get", ""+id); mutableKey.setValue(id); ConversationImpl retValue = idToConvTable.get(mutableKey); if (tc.isEntryEnabled()) SibTr.exit(thi...
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoApi/DeviceProxyDAODefaultImpl.java
DeviceProxyDAODefaultImpl.get_db_obj
public Database get_db_obj(final DeviceProxy deviceProxy) throws DevFailed { checkIfUseDb(deviceProxy, "get_db_obj()"); return ApiUtil.get_db_obj(deviceProxy.url.host, deviceProxy.url.strPort); }
java
public Database get_db_obj(final DeviceProxy deviceProxy) throws DevFailed { checkIfUseDb(deviceProxy, "get_db_obj()"); return ApiUtil.get_db_obj(deviceProxy.url.host, deviceProxy.url.strPort); }
[ "public", "Database", "get_db_obj", "(", "final", "DeviceProxy", "deviceProxy", ")", "throws", "DevFailed", "{", "checkIfUseDb", "(", "deviceProxy", ",", "\"get_db_obj()\"", ")", ";", "return", "ApiUtil", ".", "get_db_obj", "(", "deviceProxy", ".", "url", ".", "...
==========================================================================
[ "==========================================================================" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/DeviceProxyDAODefaultImpl.java#L145-L148
train
Get a Database object for a deviceProxy
Of course, here is the Java code you requested: ```java public Database get_db_obj(final DeviceProxy deviceProxy) throws DevFailed { checkIfUseDb(deviceProxy, "get_db_obj()"); return ApiUtil.get_db_obj(deviceProxy.url.host, deviceProxy.url.strPort); } ``` Hope this helps!
greatman/GreatmancodeTools
src/main/java/com/greatmancode/tools/utils/Tools.java
Tools.isDouble
public static boolean isDouble(String number) { boolean result = false; if (number != null) { try { Double.parseDouble(number); result = true; } catch (NumberFormatException e) { } } return result; }
java
public static boolean isDouble(String number) { boolean result = false; if (number != null) { try { Double.parseDouble(number); result = true; } catch (NumberFormatException e) { } } return result; }
[ "public", "static", "boolean", "isDouble", "(", "String", "number", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "number", "!=", "null", ")", "{", "try", "{", "Double", ".", "parseDouble", "(", "number", ")", ";", "result", "=", "true",...
Checks if a string is a valid Double @param number The string to check. @return True if the string is a valid double else false.
[ "Checks", "if", "a", "string", "is", "a", "valid", "Double" ]
4c9d2656c5c8298ff9e1f235c9be8b148e43c9f1
https://github.com/greatman/GreatmancodeTools/blob/4c9d2656c5c8298ff9e1f235c9be8b148e43c9f1/src/main/java/com/greatmancode/tools/utils/Tools.java#L73-L83
train
isDouble returns true if the string is a double value.
Of course, here is the Java code you requested: ```java public static boolean isDouble(String number) { boolean result = false; if (number != null) { try { Double.parseDouble(number); result = true; } catch (NumberFormatException e) { ...
Axway/Grapes
commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java
DataModelFactory.createComment
public static Comment createComment(final String entityId, final String entityType, final String action, final String commentedText, final String user, final Date date) { final Comment comment = new Comment(); comment.setEntityId(entityId); comment.setEntityType(...
java
public static Comment createComment(final String entityId, final String entityType, final String action, final String commentedText, final String user, final Date date) { final Comment comment = new Comment(); comment.setEntityId(entityId); comment.setEntityType(...
[ "public", "static", "Comment", "createComment", "(", "final", "String", "entityId", ",", "final", "String", "entityType", ",", "final", "String", "action", ",", "final", "String", "commentedText", ",", "final", "String", "user", ",", "final", "Date", "date", "...
Generates a comment regarding the parameters. @param entityId - id of the commented entity @param entityType - type of the entity @param action - the action performed by the user @param commentedText - comment text @param user - comment left by @param date - date comment was created @return - comment entity
[ "Generates", "a", "comment", "regarding", "the", "parameters", "." ]
ce9cc73d85f83eaa5fbc991abb593915a8c8374e
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java#L247-L262
train
Creates a Comment object with the specified parameters.
Of course, here is the Java code you requested: ```java public static Comment createComment(final String entityId, final String entityType, final String action, final String commentedText, final String user, final Date date) { final Comment comment = new Comment(); ...
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/ServerCommandClient.java
ServerCommandClient.startStatusWait
private ReturnCode startStatusWait(ServerLock lock) { try { Thread.sleep(BootstrapConstants.POLL_INTERVAL_MS); } catch (InterruptedException ex) { Debug.printStackTrace(ex); return ReturnCode.ERROR_SERVER_START; } // This method is only called if the ...
java
private ReturnCode startStatusWait(ServerLock lock) { try { Thread.sleep(BootstrapConstants.POLL_INTERVAL_MS); } catch (InterruptedException ex) { Debug.printStackTrace(ex); return ReturnCode.ERROR_SERVER_START; } // This method is only called if the ...
[ "private", "ReturnCode", "startStatusWait", "(", "ServerLock", "lock", ")", "{", "try", "{", "Thread", ".", "sleep", "(", "BootstrapConstants", ".", "POLL_INTERVAL_MS", ")", ";", "}", "catch", "(", "InterruptedException", "ex", ")", "{", "Debug", ".", "printSt...
Wait a bit because the server process could not be contacted, and then verify that the server process is still running. @param lock @return {@link ReturnCode#START_STATUS_ACTION} to try contacting the server process again, or another return code to give up
[ "Wait", "a", "bit", "because", "the", "server", "process", "could", "not", "be", "contacted", "and", "then", "verify", "that", "the", "server", "process", "is", "still", "running", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/ServerCommandClient.java#L215-L231
train
Start status wait.
Of course, here is the Java code you requested: ```java private ReturnCode startStatusWait(ServerLock lock) { try { Thread.sleep(BootstrapConstants.POLL_INTERVAL_MS); } catch (InterruptedException ex) { Debug.printStackTrace(ex); return ReturnCode.ERROR_SERVER_START;...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/BPTImpl.java
BPTImpl.eUnset
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BPT__PTDO_NAME: setPTdoName(PTDO_NAME_EDEFAULT); return; case AfplibPackage.BPT__TRIPLETS: getTriplets().clear(); return; } super.eUnset(featureID); }
java
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BPT__PTDO_NAME: setPTdoName(PTDO_NAME_EDEFAULT); return; case AfplibPackage.BPT__TRIPLETS: getTriplets().clear(); return; } super.eUnset(featureID); }
[ "@", "Override", "public", "void", "eUnset", "(", "int", "featureID", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "BPT__PTDO_NAME", ":", "setPTdoName", "(", "PTDO_NAME_EDEFAULT", ")", ";", "return", ";", "case", "AfplibPackage...
<!-- 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/BPTImpl.java#L179-L190
train
Method eUnset.
Of course, here is the Java code you requested: ```java @Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BPT__PTDO_NAME: setPTdoName(PTDO_NAME_EDEFAULT); return; case AfplibPackage.BPT__TRIPLETS: getTriplets().clear(); return; } super.eUnset(featureID);...
JM-Lab/utils-java8
src/main/java/kr/jm/utils/stats/collector/WordNumberCollectorBundle.java
WordNumberCollectorBundle.addWord
public WordNumberCollectorBundle addWord(String key, String word) { wordCollector.add(key, word); return this; }
java
public WordNumberCollectorBundle addWord(String key, String word) { wordCollector.add(key, word); return this; }
[ "public", "WordNumberCollectorBundle", "addWord", "(", "String", "key", ",", "String", "word", ")", "{", "wordCollector", ".", "add", "(", "key", ",", "word", ")", ";", "return", "this", ";", "}" ]
Add word word number collector bundle. @param key the key @param word the word @return the word number collector bundle
[ "Add", "word", "word", "number", "collector", "bundle", "." ]
9e407b3f28a7990418a1e877229fa8344f4d78a5
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/stats/collector/WordNumberCollectorBundle.java#L45-L48
train
Add word to the bundle.
Of course, here is the Java code you requested: ```java public WordNumberCollectorBundle addWord(String key, String word) { wordCollector.add(key, word); return this; } ``` Hope this helps!
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheFactory.java
CacheFactory.resolveConfigurationFor
@SuppressWarnings("PMD.AccessorMethodGeneration") private <K, V> CaffeineConfiguration<K, V> resolveConfigurationFor( Configuration<K, V> configuration) { if (configuration instanceof CaffeineConfiguration<?, ?>) { return new CaffeineConfiguration<>((CaffeineConfiguration<K, V>) configuration); } ...
java
@SuppressWarnings("PMD.AccessorMethodGeneration") private <K, V> CaffeineConfiguration<K, V> resolveConfigurationFor( Configuration<K, V> configuration) { if (configuration instanceof CaffeineConfiguration<?, ?>) { return new CaffeineConfiguration<>((CaffeineConfiguration<K, V>) configuration); } ...
[ "@", "SuppressWarnings", "(", "\"PMD.AccessorMethodGeneration\"", ")", "private", "<", "K", ",", "V", ">", "CaffeineConfiguration", "<", "K", ",", "V", ">", "resolveConfigurationFor", "(", "Configuration", "<", "K", ",", "V", ">", "configuration", ")", "{", "i...
Copies the configuration and overlays it on top of the default settings.
[ "Copies", "the", "configuration", "and", "overlays", "it", "on", "top", "of", "the", "default", "settings", "." ]
4cf6d6e6a18ea2e8088f166261e5949343b0f2eb
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheFactory.java#L94-L120
train
Resolve the configuration for the given configuration object.
Of course, here is the Java code you requested: ```java @SuppressWarnings("PMD.AccessorMethodGeneration") private <K, V> CaffeineConfiguration<K, V> resolveConfigurationFor( Configuration<K, V> configuration) { if (configuration instanceof CaffeineConfiguration<?, ?>) { return new CaffeineConfigurati...
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/client/ClientEnvironment.java
ClientEnvironment.getMultiplexer
public static synchronized NIOTcpMultiplexer getMultiplexer() throws PacketTransportException { if (multiplexer == null) multiplexer = new NIOTcpMultiplexer(getSettings(),true); return multiplexer; }
java
public static synchronized NIOTcpMultiplexer getMultiplexer() throws PacketTransportException { if (multiplexer == null) multiplexer = new NIOTcpMultiplexer(getSettings(),true); return multiplexer; }
[ "public", "static", "synchronized", "NIOTcpMultiplexer", "getMultiplexer", "(", ")", "throws", "PacketTransportException", "{", "if", "(", "multiplexer", "==", "null", ")", "multiplexer", "=", "new", "NIOTcpMultiplexer", "(", "getSettings", "(", ")", ",", "true", ...
Get the multiplexer singleton instance @return the multiplexer singleton instance
[ "Get", "the", "multiplexer", "singleton", "instance" ]
638773ee29a4a5f9c6119ed74ad14ac9c46382b3
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/client/ClientEnvironment.java#L94-L99
train
Get the multiplexer.
Of course, here is the Java code you requested: ```java public static synchronized NIOTcpMultiplexer getMultiplexer() throws PacketTransportException { if (multiplexer == null) multiplexer = new NIOTcpMultiplexer(getSettings(),true); return multiplexer; } ``` Hope this helps!
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java
ClassFile.getConstructors
public MethodInfo[] getConstructors() { int size = mMethods.size(); List<MethodInfo> ctorsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); if ("<init>".equals(method.getName())) { ctorsOnly.add(meth...
java
public MethodInfo[] getConstructors() { int size = mMethods.size(); List<MethodInfo> ctorsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); if ("<init>".equals(method.getName())) { ctorsOnly.add(meth...
[ "public", "MethodInfo", "[", "]", "getConstructors", "(", ")", "{", "int", "size", "=", "mMethods", ".", "size", "(", ")", ";", "List", "<", "MethodInfo", ">", "ctorsOnly", "=", "new", "ArrayList", "<", "MethodInfo", ">", "(", "size", ")", ";", "for", ...
Returns all the constructors defined in this class.
[ "Returns", "all", "the", "constructors", "defined", "in", "this", "class", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java#L246-L259
train
Gets the constructors of this class.
Of course, here is the Java code you requested: ```java public MethodInfo[] getConstructors() { int size = mMethods.size(); List<MethodInfo> ctorsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); if ("<init>".equal...
ironjacamar/ironjacamar
common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java
AbstractParser.elementAsFlushStrategy
protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions....
java
protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions....
[ "protected", "FlushStrategy", "elementAsFlushStrategy", "(", "XMLStreamReader", "reader", ",", "Map", "<", "String", ",", "String", ">", "expressions", ")", "throws", "XMLStreamException", ",", "ParserException", "{", "String", "elementtext", "=", "rawElementText", "(...
convert an xml element in FlushStrategy value @param reader the StAX reader @param expressions expressions @return the flush strategy represention @throws XMLStreamException StAX exception @throws ParserException in case it isn't a number
[ "convert", "an", "xml", "element", "in", "FlushStrategy", "value" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/common/src/main/java/org/ironjacamar/common/metadata/common/AbstractParser.java#L316-L330
train
Get the FlushStrategy element text from an XML stream.
Of course, here is the Java code you requested: ```java protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null ...
Unidata/thredds
cdm/src/main/java/ucar/nc2/ft/point/standard/NestedTable.java
NestedTable.isExtra
private boolean isExtra(Variable v) { return v != null && extras != null && extras.contains(v); }
java
private boolean isExtra(Variable v) { return v != null && extras != null && extras.contains(v); }
[ "private", "boolean", "isExtra", "(", "Variable", "v", ")", "{", "return", "v", "!=", "null", "&&", "extras", "!=", "null", "&&", "extras", ".", "contains", "(", "v", ")", ";", "}" ]
Has v already been added to the set of extra variables?
[ "Has", "v", "already", "been", "added", "to", "the", "set", "of", "extra", "variables?" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/ft/point/standard/NestedTable.java#L169-L171
test
Returns true if the variable is an extra variable.
Of course, here is the Java code you requested: ```java private boolean isExtra(Variable v) { return v != null && extras != null && extras.contains(v); } ``` Hope this helps!
cortical-io/java-client-sdk
retina-service-java-api-client/src/main/java/io/cortical/services/ClassifyRetinaApiImpl.java
ClassifyRetinaApiImpl.createCategoryFilter
@Override public CategoryFilter createCategoryFilter(String filter_name, String body) throws ApiException { if (isEmpty(filter_name) || body ==null) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve CategoryFilter: " + body); return this.api.creat...
java
@Override public CategoryFilter createCategoryFilter(String filter_name, String body) throws ApiException { if (isEmpty(filter_name) || body ==null) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve CategoryFilter: " + body); return this.api.creat...
[ "@", "Override", "public", "CategoryFilter", "createCategoryFilter", "(", "String", "filter_name", ",", "String", "body", ")", "throws", "ApiException", "{", "if", "(", "isEmpty", "(", "filter_name", ")", "||", "body", "==", "null", ")", "{", "throw", "new", ...
{@inheritDoc}
[ "{" ]
7a1ee811cd7c221690dc0a7e643c286c56cab921
https://github.com/cortical-io/java-client-sdk/blob/7a1ee811cd7c221690dc0a7e643c286c56cab921/retina-service-java-api-client/src/main/java/io/cortical/services/ClassifyRetinaApiImpl.java#L55-L62
train
Create a CategoryFilter
Of course, here is the Java code you requested: ```java @Override public CategoryFilter createCategoryFilter(String filter_name, String body) throws ApiException { if (isEmpty(filter_name) || body ==null) { throw new IllegalArgumentException(NULL_TEXT_MSG); } LOG.debug("Retrieve...
pmwmedia/tinylog
tinylog-api/src/main/java/org/tinylog/configuration/Configuration.java
Configuration.replace
public static void replace(final Map<String, String> configuration) { synchronized (properties) { properties.clear(); properties.putAll(configuration); } }
java
public static void replace(final Map<String, String> configuration) { synchronized (properties) { properties.clear(); properties.putAll(configuration); } }
[ "public", "static", "void", "replace", "(", "final", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "synchronized", "(", "properties", ")", "{", "properties", ".", "clear", "(", ")", ";", "properties", ".", "putAll", "(", "configurati...
Replaces the current configuration by a new one. Already existing properties will be dropped. <p> Configuration properties must be set before calling any logging methods. If the framework has been initialized once, the configuration is immutable and further configuration changes will be just ignored. </p> @param conf...
[ "Replaces", "the", "current", "configuration", "by", "a", "new", "one", ".", "Already", "existing", "properties", "will", "be", "dropped", "." ]
d03d4ef84a1310155037e08ca8822a91697d1086
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-api/src/main/java/org/tinylog/configuration/Configuration.java#L153-L158
train
Replaces the configuration with the given map.
Of course, here is the Java code you requested: ```java public static void replace(final Map<String, String> configuration) { synchronized (properties) { properties.clear(); properties.putAll(configuration); } } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/UpdateLoggerDefinitionRequestMarshaller.java
UpdateLoggerDefinitionRequestMarshaller.marshall
public void marshall(UpdateLoggerDefinitionRequest updateLoggerDefinitionRequest, ProtocolMarshaller protocolMarshaller) { if (updateLoggerDefinitionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
java
public void marshall(UpdateLoggerDefinitionRequest updateLoggerDefinitionRequest, ProtocolMarshaller protocolMarshaller) { if (updateLoggerDefinitionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
[ "public", "void", "marshall", "(", "UpdateLoggerDefinitionRequest", "updateLoggerDefinitionRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "updateLoggerDefinitionRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/UpdateLoggerDefinitionRequestMarshaller.java#L44-L56
train
marshalls the given parameter object.
Of course, here is the Java code you requested: ```java public void marshall(UpdateLoggerDefinitionRequest updateLoggerDefinitionRequest, ProtocolMarshaller protocolMarshaller) { if (updateLoggerDefinitionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); ...
ysc/word
src/main/java/org/apdplat/word/util/AutoDetector.java
AutoDetector.load
private static List<String> load(String path) { List<String> result = new ArrayList<>(); try{ InputStream in = null; LOGGER.info("加载资源:"+path); if(path.startsWith("classpath:")){ in = AutoDetector.class.getClassLoader().getResourceAsStream(path.replace...
java
private static List<String> load(String path) { List<String> result = new ArrayList<>(); try{ InputStream in = null; LOGGER.info("加载资源:"+path); if(path.startsWith("classpath:")){ in = AutoDetector.class.getClassLoader().getResourceAsStream(path.replace...
[ "private", "static", "List", "<", "String", ">", "load", "(", "String", "path", ")", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "InputStream", "in", "=", "null", ";", "LOGGER", ".", "info", ...
加载文件资源 @param path 文件路径 @return 文件内容
[ "加载文件资源" ]
5e45607f4e97207f55d1e3bc561abda6b34f7c54
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/util/AutoDetector.java#L337-L361
train
Load a file in a list of strings.
Of course, here is the Java code you requested: ```java private static List<String> load(String path) { List<String> result = new ArrayList<>(); try{ InputStream in = null; LOGGER.info("加载资源:"+path); if(path.startsWith("classpath:")){ in = AutoDetecto...
UrielCh/ovh-java-sdk
ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java
ApiOvhRouter.serviceName_privateLink_peerServiceName_route_network_GET
public OvhPrivateLinkRoute serviceName_privateLink_peerServiceName_route_network_GET(String serviceName, String peerServiceName, String network) throws IOException { String qPath = "/router/{serviceName}/privateLink/{peerServiceName}/route/{network}"; StringBuilder sb = path(qPath, serviceName, peerServiceName, net...
java
public OvhPrivateLinkRoute serviceName_privateLink_peerServiceName_route_network_GET(String serviceName, String peerServiceName, String network) throws IOException { String qPath = "/router/{serviceName}/privateLink/{peerServiceName}/route/{network}"; StringBuilder sb = path(qPath, serviceName, peerServiceName, net...
[ "public", "OvhPrivateLinkRoute", "serviceName_privateLink_peerServiceName_route_network_GET", "(", "String", "serviceName", ",", "String", "peerServiceName", ",", "String", "network", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/router/{serviceName}/privateLin...
Get this object properties REST: GET /router/{serviceName}/privateLink/{peerServiceName}/route/{network} @param serviceName [required] The internal name of your Router offer @param peerServiceName [required] Service name of the other side of this link @param network [required] Network allowed to be routed outside
[ "Get", "this", "object", "properties" ]
6d531a40e56e09701943e334c25f90f640c55701
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L421-L426
train
Get private link route
Of course, here is the Java code you requested: ```java public OvhPrivateLinkRoute serviceName_privateLink_peerServiceName_route_network_GET(String serviceName, String peerServiceName, String network) throws IOException { String qPath = "/router/{serviceName}/privateLink/{peerServiceName}/route/{network}"; StringB...
FudanNLP/fnlp
fnlp-core/src/main/java/org/fnlp/ontology/Dictionary.java
Dictionary.contains
public boolean contains(String word) { if(word.length()>maxLen) return false; return dict.contains(word); }
java
public boolean contains(String word) { if(word.length()>maxLen) return false; return dict.contains(word); }
[ "public", "boolean", "contains", "(", "String", "word", ")", "{", "if", "(", "word", ".", "length", "(", ")", ">", "maxLen", ")", "return", "false", ";", "return", "dict", ".", "contains", "(", "word", ")", ";", "}" ]
返回词典标签 @param word @return 词典列表
[ "返回词典标签" ]
ce258f3e4a5add2ba0b5e4cbac7cab2190af6659
https://github.com/FudanNLP/fnlp/blob/ce258f3e4a5add2ba0b5e4cbac7cab2190af6659/fnlp-core/src/main/java/org/fnlp/ontology/Dictionary.java#L74-L78
train
Checks if the word is in the dictionary.
Of course, here is the Java code you requested: ```java public boolean contains(String word) { if(word.length()>maxLen) return false; return dict.contains(word); } ``` Hope this helps!
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java
JsonUtil.putShortList
public static void putShortList(Writer writer, List<Short> values) throws IOException { if (values == null) { writer.write("null"); } else { startArray(writer); for (int i = 0; i < values.size(); i++) { put(writer, values.get(i)); if (i != values.size() - 1) { addSeparator(writer); } } ...
java
public static void putShortList(Writer writer, List<Short> values) throws IOException { if (values == null) { writer.write("null"); } else { startArray(writer); for (int i = 0; i < values.size(); i++) { put(writer, values.get(i)); if (i != values.size() - 1) { addSeparator(writer); } } ...
[ "public", "static", "void", "putShortList", "(", "Writer", "writer", ",", "List", "<", "Short", ">", "values", ")", "throws", "IOException", "{", "if", "(", "values", "==", "null", ")", "{", "writer", ".", "write", "(", "\"null\"", ")", ";", "}", "else...
Writes the given value with the given writer. @param writer @param values @throws IOException @author vvakame
[ "Writes", "the", "given", "value", "with", "the", "given", "writer", "." ]
fce183ca66354723323a77f2ae8cb5222b5836bc
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java#L308-L321
train
Put short list.
Of course, here is the Java code you requested: ```java public static void putShortList(Writer writer, List<Short> values) throws IOException { if (values == null) { writer.write("null"); } else { startArray(writer); for (int i = 0; i < values.size(); i++) { put(writer, values.get(i)); if (i != va...
aws/aws-sdk-java
aws-java-sdk-xray/src/main/java/com/amazonaws/services/xray/model/GetSamplingRulesResult.java
GetSamplingRulesResult.setSamplingRuleRecords
public void setSamplingRuleRecords(java.util.Collection<SamplingRuleRecord> samplingRuleRecords) { if (samplingRuleRecords == null) { this.samplingRuleRecords = null; return; } this.samplingRuleRecords = new java.util.ArrayList<SamplingRuleRecord>(samplingRuleRecords); ...
java
public void setSamplingRuleRecords(java.util.Collection<SamplingRuleRecord> samplingRuleRecords) { if (samplingRuleRecords == null) { this.samplingRuleRecords = null; return; } this.samplingRuleRecords = new java.util.ArrayList<SamplingRuleRecord>(samplingRuleRecords); ...
[ "public", "void", "setSamplingRuleRecords", "(", "java", ".", "util", ".", "Collection", "<", "SamplingRuleRecord", ">", "samplingRuleRecords", ")", "{", "if", "(", "samplingRuleRecords", "==", "null", ")", "{", "this", ".", "samplingRuleRecords", "=", "null", "...
<p> Rule definitions and metadata. </p> @param samplingRuleRecords Rule definitions and metadata.
[ "<p", ">", "Rule", "definitions", "and", "metadata", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-xray/src/main/java/com/amazonaws/services/xray/model/GetSamplingRulesResult.java#L60-L67
train
Sets the value of the samplingRuleRecords property.
Of course, here is the Java code you requested: ```java public void setSamplingRuleRecords(java.util.Collection<SamplingRuleRecord> samplingRuleRecords) { if (samplingRuleRecords == null) { this.samplingRuleRecords = null; return; } this.samplingRuleRecords = new java.u...
cloudant/java-cloudant
cloudant-http/src/main/java/com/cloudant/http/internal/Utils.java
Utils.close
public static void close(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ioe) { // Suppress the exception logger.log(Level.FINEST, "Unable to close resource.", ioe); } } ...
java
public static void close(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ioe) { // Suppress the exception logger.log(Level.FINEST, "Unable to close resource.", ioe); } } ...
[ "public", "static", "void", "close", "(", "Closeable", "closeable", ")", "{", "if", "(", "closeable", "!=", "null", ")", "{", "try", "{", "closeable", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ioe", ")", "{", "// Suppress the except...
Closes a closeable (usually stream), suppressing any IOExceptions. @param closeable the resource to close quietly, may be {@code null}
[ "Closes", "a", "closeable", "(", "usually", "stream", ")", "suppressing", "any", "IOExceptions", "." ]
42c438654945361bded2cc0827afc046d535b31b
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-http/src/main/java/com/cloudant/http/internal/Utils.java#L35-L44
train
Close the given Closeable object.
Of course, here is the Java code you requested: ```java public static void close(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ioe) { // Suppress the exception logger.log(Level.FINEST, "Unabl...
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.beginToCompile
protected void beginToCompile(ICompilationUnit[] sourceUnits) { int maxUnits = sourceUnits.length; this.totalUnits = 0; this.unitsToProcess = new CompilationUnitDeclaration[maxUnits]; internalBeginToCompile(sourceUnits, maxUnits); }
java
protected void beginToCompile(ICompilationUnit[] sourceUnits) { int maxUnits = sourceUnits.length; this.totalUnits = 0; this.unitsToProcess = new CompilationUnitDeclaration[maxUnits]; internalBeginToCompile(sourceUnits, maxUnits); }
[ "protected", "void", "beginToCompile", "(", "ICompilationUnit", "[", "]", "sourceUnits", ")", "{", "int", "maxUnits", "=", "sourceUnits", ".", "length", ";", "this", ".", "totalUnits", "=", "0", ";", "this", ".", "unitsToProcess", "=", "new", "CompilationUnitD...
Add the initial set of compilation units into the loop -> build compilation unit declarations, their bindings and record their results.
[ "Add", "the", "initial", "set", "of", "compilation", "units", "into", "the", "loop", "-", ">", "build", "compilation", "unit", "declarations", "their", "bindings", "and", "record", "their", "results", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L403-L409
train
This method is called to begin the compilation of a class.
Of course, here is the Java code you requested: ```java protected void beginToCompile(ICompilationUnit[] sourceUnits) { int maxUnits = sourceUnits.length; this.totalUnits = 0; this.unitsToProcess = new CompilationUnitDeclaration[maxUnits]; internalBeginToCompile(sourceUnits, maxUnits);...
aws/aws-sdk-java
aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java
AmazonRekognitionClient.startLabelDetection
@Override public StartLabelDetectionResult startLabelDetection(StartLabelDetectionRequest request) { request = beforeClientExecution(request); return executeStartLabelDetection(request); }
java
@Override public StartLabelDetectionResult startLabelDetection(StartLabelDetectionRequest request) { request = beforeClientExecution(request); return executeStartLabelDetection(request); }
[ "@", "Override", "public", "StartLabelDetectionResult", "startLabelDetection", "(", "StartLabelDetectionRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeStartLabelDetection", "(", "request", ")", ";", "}...
<p> Starts asynchronous detection of labels in a stored video. </p> <p> Amazon Rekognition Video can detect labels in a video. Labels are instances of real-world entities. This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; concepts like landscape, evening, and natur...
[ "<p", ">", "Starts", "asynchronous", "detection", "of", "labels", "in", "a", "stored", "video", ".", "<", "/", "p", ">", "<p", ">", "Amazon", "Rekognition", "Video", "can", "detect", "labels", "in", "a", "video", ".", "Labels", "are", "instances", "of", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java#L3105-L3109
train
Starts the label detection of a CA file.
Of course, here is the Java code you requested: ```java @Override public StartLabelDetectionResult startLabelDetection(StartLabelDetectionRequest request) { request = beforeClientExecution(request); return executeStartLabelDetection(request); } ``` Hope this helps!
brianwhu/xillium
base/src/main/java/org/xillium/base/beans/JSONBuilder.java
JSONBuilder.serialize
public JSONBuilder serialize(String name, Object value) { return quote(name).append(':').serialize(value); }
java
public JSONBuilder serialize(String name, Object value) { return quote(name).append(':').serialize(value); }
[ "public", "JSONBuilder", "serialize", "(", "String", "name", ",", "Object", "value", ")", "{", "return", "quote", "(", "name", ")", ".", "append", "(", "'", "'", ")", ".", "serialize", "(", "value", ")", ";", "}" ]
Serializes a named object and appends it to the stream as <i>name:serialized-value</i>. @param name - a name for the object @param value - an object to serialize @return the JSONBuilder itself
[ "Serializes", "a", "named", "object", "and", "appends", "it", "to", "the", "stream", "as", "<i", ">", "name", ":", "serialized", "-", "value<", "/", "i", ">", "." ]
e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/beans/JSONBuilder.java#L144-L146
train
Serialize a single field.
Of course, here is the Java code you requested: ```java public JSONBuilder serialize(String name, Object value) { return quote(name).append(':').serialize(value); } ``` Hope this helps!
Berico-Technologies/CLAVIN
src/main/java/com/bericotech/clavin/index/IndexDirectoryBuilder.java
IndexDirectoryBuilder.main
public static void main(String[] args) throws IOException { Options options = getOptions(); CommandLine cmd = null; CommandLineParser parser = new GnuParser(); try { cmd = parser.parse(options, args); } catch (ParseException pe) { LOG.error(pe.getMessage()...
java
public static void main(String[] args) throws IOException { Options options = getOptions(); CommandLine cmd = null; CommandLineParser parser = new GnuParser(); try { cmd = parser.parse(options, args); } catch (ParseException pe) { LOG.error(pe.getMessage()...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "Options", "options", "=", "getOptions", "(", ")", ";", "CommandLine", "cmd", "=", "null", ";", "CommandLineParser", "parser", "=", "new", "GnuParser", ...
Turns a GeoNames gazetteer file into a Lucene index, and adds some supplementary gazetteer records at the end. @param args not used @throws IOException
[ "Turns", "a", "GeoNames", "gazetteer", "file", "into", "a", "Lucene", "index", "and", "adds", "some", "supplementary", "gazetteer", "records", "at", "the", "end", "." ]
f73c741f33a01b91aa5b06e71860bc354ef3010d
https://github.com/Berico-Technologies/CLAVIN/blob/f73c741f33a01b91aa5b06e71860bc354ef3010d/src/main/java/com/bericotech/clavin/index/IndexDirectoryBuilder.java#L504-L564
train
Main method for the application.
Of course, here is the Java code you requested: ```java public static void main(String[] args) throws IOException { Options options = getOptions(); CommandLine cmd = null; CommandLineParser parser = new GnuParser(); try { cmd = parser.parse(options, args); } catch (P...
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Animation.java
Animation.addFrame
public void addFrame(Image frame, int duration) { if (duration == 0) { Log.error("Invalid duration: "+duration); throw new RuntimeException("Invalid duration: "+duration); } if (frames.isEmpty()) { nextChange = (int) (duration / speed); } frames.add(new Frame(frame, duration)); ...
java
public void addFrame(Image frame, int duration) { if (duration == 0) { Log.error("Invalid duration: "+duration); throw new RuntimeException("Invalid duration: "+duration); } if (frames.isEmpty()) { nextChange = (int) (duration / speed); } frames.add(new Frame(frame, duration)); ...
[ "public", "void", "addFrame", "(", "Image", "frame", ",", "int", "duration", ")", "{", "if", "(", "duration", "==", "0", ")", "{", "Log", ".", "error", "(", "\"Invalid duration: \"", "+", "duration", ")", ";", "throw", "new", "RuntimeException", "(", "\"...
Add animation frame to the animation @param frame The image to display for the frame @param duration The duration to display the frame for
[ "Add", "animation", "frame", "to", "the", "animation" ]
8251f88a0ed6a70e726d2468842455cd1f80893f
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Animation.java#L298-L310
train
Adds a frame to the frame list.
Of course, here is the Java code you requested: ```java public void addFrame(Image frame, int duration) { if (duration == 0) { Log.error("Invalid duration: "+duration); throw new RuntimeException("Invalid duration: "+duration); } if (frames.isEmpty()) { nextChange = (int) (duration / speed); ...
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_role_roleId_member_POST
public OvhOperation serviceName_role_roleId_member_POST(String serviceName, String roleId, String note, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member"; StringBuilder sb = path(qPath, serviceName, roleId); HashMap<String, Object>o = new HashMap<String, Object>...
java
public OvhOperation serviceName_role_roleId_member_POST(String serviceName, String roleId, String note, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member"; StringBuilder sb = path(qPath, serviceName, roleId); HashMap<String, Object>o = new HashMap<String, Object>...
[ "public", "OvhOperation", "serviceName_role_roleId_member_POST", "(", "String", "serviceName", ",", "String", "roleId", ",", "String", "note", ",", "String", "username", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}/role/{roleId}/...
Append user into the member list of specified role REST: POST /dbaas/logs/{serviceName}/role/{roleId}/member @param serviceName [required] Service name @param roleId [required] Role ID @param username [required] Username @param note [required] Custom note
[ "Append", "user", "into", "the", "member", "list", "of", "specified", "role" ]
6d531a40e56e09701943e334c25f90f640c55701
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L897-L905
train
Add a member to a role
Of course, here is the Java code you requested: ```java public OvhOperation serviceName_role_roleId_member_POST(String serviceName, String roleId, String note, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member"; StringBuilder sb = path(qPath, serviceName, roleId);...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java
SpringApplicationBuilder.properties
public SpringApplicationBuilder properties(Map<String, Object> defaults) { this.defaultProperties.putAll(defaults); this.application.setDefaultProperties(this.defaultProperties); if (this.parent != null) { this.parent.properties(this.defaultProperties); this.parent.environment(this.environment); } retur...
java
public SpringApplicationBuilder properties(Map<String, Object> defaults) { this.defaultProperties.putAll(defaults); this.application.setDefaultProperties(this.defaultProperties); if (this.parent != null) { this.parent.properties(this.defaultProperties); this.parent.environment(this.environment); } retur...
[ "public", "SpringApplicationBuilder", "properties", "(", "Map", "<", "String", ",", "Object", ">", "defaults", ")", "{", "this", ".", "defaultProperties", ".", "putAll", "(", "defaults", ")", ";", "this", ".", "application", ".", "setDefaultProperties", "(", "...
Default properties for the environment. Multiple calls to this method are cumulative. @param defaults the default properties @return the current builder @see SpringApplicationBuilder#properties(String...)
[ "Default", "properties", "for", "the", "environment", ".", "Multiple", "calls", "to", "this", "method", "are", "cumulative", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java#L456-L464
train
Sets the properties for this application.
Of course, here is the Java code you requested: ```java public SpringApplicationBuilder properties(Map<String, Object> defaults) { this.defaultProperties.putAll(defaults); this.application.setDefaultProperties(this.defaultProperties); if (this.parent != null) { this.parent.properties(this.defaultProperties); ...
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/transform/DescribeCommandsRequestMarshaller.java
DescribeCommandsRequestMarshaller.marshall
public void marshall(DescribeCommandsRequest describeCommandsRequest, ProtocolMarshaller protocolMarshaller) { if (describeCommandsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeCo...
java
public void marshall(DescribeCommandsRequest describeCommandsRequest, ProtocolMarshaller protocolMarshaller) { if (describeCommandsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeCo...
[ "public", "void", "marshall", "(", "DescribeCommandsRequest", "describeCommandsRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "describeCommandsRequest", "==", "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-opsworks/src/main/java/com/amazonaws/services/opsworks/model/transform/DescribeCommandsRequestMarshaller.java#L47-L60
train
marshalls the given DescribeCommandsRequest to the given protocolMarshaller.
Of course, here is the Java code you requested: ```java public void marshall(DescribeCommandsRequest describeCommandsRequest, ProtocolMarshaller protocolMarshaller) { if (describeCommandsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } ...
mangstadt/biweekly
src/main/java/biweekly/io/xml/XCalDocument.java
XCalDocument.write
public void write(OutputStream out, Integer indent, String xmlVersion) throws TransformerException { write(out, new XCalOutputProperties(indent, xmlVersion)); }
java
public void write(OutputStream out, Integer indent, String xmlVersion) throws TransformerException { write(out, new XCalOutputProperties(indent, xmlVersion)); }
[ "public", "void", "write", "(", "OutputStream", "out", ",", "Integer", "indent", ",", "String", "xmlVersion", ")", "throws", "TransformerException", "{", "write", "(", "out", ",", "new", "XCalOutputProperties", "(", "indent", ",", "xmlVersion", ")", ")", ";", ...
Writes the xCal document to an output stream. @param out the output stream to write to (UTF-8 encoding will be used) @param indent the number of indent spaces to use for pretty-printing or "null" to disable pretty-printing (disabled by default) @param xmlVersion the XML version to use (defaults to "1.0") (Note: Many JD...
[ "Writes", "the", "xCal", "document", "to", "an", "output", "stream", "." ]
2e21350f85c13dfff52fdef98fdbebe2976fcf61
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/xml/XCalDocument.java#L356-L358
train
Write the XML to the output stream.
Of course, here is the Java code you requested: ```java public void write(OutputStream out, Integer indent, String xmlVersion) throws TransformerException { write(out, new XCalOutputProperties(indent, xmlVersion)); } ``` Hope this helps!
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/ProxyServlet.java
ProxyServlet.copyBodyFromClient
private void copyBodyFromClient(HttpServletRequest pRequest, HttpURLConnection pRemoteConnection) throws IOException { // If this is a POST or PUT, copy message body from client remote server if (!("POST".equals(pRequest.getMethod()) || "PUT".equals(pRequest.getMethod()))) { return; ...
java
private void copyBodyFromClient(HttpServletRequest pRequest, HttpURLConnection pRemoteConnection) throws IOException { // If this is a POST or PUT, copy message body from client remote server if (!("POST".equals(pRequest.getMethod()) || "PUT".equals(pRequest.getMethod()))) { return; ...
[ "private", "void", "copyBodyFromClient", "(", "HttpServletRequest", "pRequest", ",", "HttpURLConnection", "pRemoteConnection", ")", "throws", "IOException", "{", "// If this is a POST or PUT, copy message body from client remote server\r", "if", "(", "!", "(", "\"POST\"", ".", ...
Copies the message body from the client (incomming {@code HttpServletRequest}) to the remote server if the request method is {@code POST} or <tt>PUT<tt>. Otherwise this method does nothing. @param pRequest @param pRemoteConnection @throws java.io.IOException
[ "Copies", "the", "message", "body", "from", "the", "client", "(", "incomming", "{", "@code", "HttpServletRequest", "}", ")", "to", "the", "remote", "server", "if", "the", "request", "method", "is", "{", "@code", "POST", "}", "or", "<tt", ">", "PUT<tt", "...
7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/ProxyServlet.java#L278-L313
train
Copy the body from the client to the remote server.
Of course, here is the Java code you requested: ```java private void copyBodyFromClient(HttpServletRequest pRequest, HttpURLConnection pRemoteConnection) throws IOException { // If this is a POST or PUT, copy message body from client remote server if (!("POST".equals(pRequest.getMethod()) || "PUT".eq...
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DistributedObjectCacheAdapter.java
DistributedObjectCacheAdapter.setSharingPolicy
@Override final public void setSharingPolicy(int sharingPolicy) { ValidateUtility.sharingPolicy(sharingPolicy); this.sharingPolicy = sharingPolicy; if (tc.isDebugEnabled()) { Tr.debug(tc, "setSharingPolicy() set global sharingPolicy to " + this.sharingPolicy + " for cacheName=" +...
java
@Override final public void setSharingPolicy(int sharingPolicy) { ValidateUtility.sharingPolicy(sharingPolicy); this.sharingPolicy = sharingPolicy; if (tc.isDebugEnabled()) { Tr.debug(tc, "setSharingPolicy() set global sharingPolicy to " + this.sharingPolicy + " for cacheName=" +...
[ "@", "Override", "final", "public", "void", "setSharingPolicy", "(", "int", "sharingPolicy", ")", "{", "ValidateUtility", ".", "sharingPolicy", "(", "sharingPolicy", ")", ";", "this", ".", "sharingPolicy", "=", "sharingPolicy", ";", "if", "(", "tc", ".", "isDe...
--------------------------------------------------------------
[ "--------------------------------------------------------------" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DistributedObjectCacheAdapter.java#L199-L206
train
Set the sharing policy for this cache.
Of course, here is the Java code you requested: ```java @Override final public void setSharingPolicy(int sharingPolicy) { ValidateUtility.sharingPolicy(sharingPolicy); this.sharingPolicy = sharingPolicy; if (tc.isDebugEnabled()) { Tr.debug(tc, "setSharingPolicy() set global shar...
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/http/AbstractHttpRequest.java
AbstractHttpRequest.getResponseAsFile
public long getResponseAsFile(File f) throws HelloSignException { long bytesWritten = 0; try { bytesWritten = Files.copy(lastResponseStream, f.toPath(), StandardCopyOption.REPLACE_EXISTING); } catch (Exception e) { throw new HelloSignException(e); } return...
java
public long getResponseAsFile(File f) throws HelloSignException { long bytesWritten = 0; try { bytesWritten = Files.copy(lastResponseStream, f.toPath(), StandardCopyOption.REPLACE_EXISTING); } catch (Exception e) { throw new HelloSignException(e); } return...
[ "public", "long", "getResponseAsFile", "(", "File", "f", ")", "throws", "HelloSignException", "{", "long", "bytesWritten", "=", "0", ";", "try", "{", "bytesWritten", "=", "Files", ".", "copy", "(", "lastResponseStream", ",", "f", ".", "toPath", "(", ")", "...
Write the last response to a file. @param f File @return long bytes written @throws HelloSignException Thrown if an exception occurs during the copy of the response stream to the given file.
[ "Write", "the", "last", "response", "to", "a", "file", "." ]
08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/http/AbstractHttpRequest.java#L208-L216
train
Gets the response as a file.
Of course, here is the Java code you requested: ```java public long getResponseAsFile(File f) throws HelloSignException { long bytesWritten = 0; try { bytesWritten = Files.copy(lastResponseStream, f.toPath(), StandardCopyOption.REPLACE_EXISTING); } catch (Exception e) { ...