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
aws/aws-sdk-java
aws-java-sdk-worklink/src/main/java/com/amazonaws/services/worklink/AmazonWorkLinkClient.java
AmazonWorkLinkClient.revokeDomainAccess
@Override public RevokeDomainAccessResult revokeDomainAccess(RevokeDomainAccessRequest request) { request = beforeClientExecution(request); return executeRevokeDomainAccess(request); }
java
@Override public RevokeDomainAccessResult revokeDomainAccess(RevokeDomainAccessRequest request) { request = beforeClientExecution(request); return executeRevokeDomainAccess(request); }
[ "@", "Override", "public", "RevokeDomainAccessResult", "revokeDomainAccess", "(", "RevokeDomainAccessRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeRevokeDomainAccess", "(", "request", ")", ";", "}" ]
<p> Moves a domain to INACTIVE status if it was in the ACTIVE status. </p> @param revokeDomainAccessRequest @return Result of the RevokeDomainAccess operation returned by the service. @throws UnauthorizedException You are not authorized to perform this action. @throws InternalServerErrorException The service is tempor...
[ "<p", ">", "Moves", "a", "domain", "to", "INACTIVE", "status", "if", "it", "was", "in", "the", "ACTIVE", "status", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-worklink/src/main/java/com/amazonaws/services/worklink/AmazonWorkLinkClient.java#L1379-L1383
train
Revokes access to a domain.
Of course, here is the Java code you requested: ```java @Override public RevokeDomainAccessResult revokeDomainAccess(RevokeDomainAccessRequest request) { request = beforeClientExecution(request); return executeRevokeDomainAccess(request); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/JSONAssetConverter.java
JSONAssetConverter.readValues
public static <T> List<T> readValues(InputStream inputStream, Class<T> type) throws IOException { return DataModelSerializer.deserializeList(inputStream, type); }
java
public static <T> List<T> readValues(InputStream inputStream, Class<T> type) throws IOException { return DataModelSerializer.deserializeList(inputStream, type); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "readValues", "(", "InputStream", "inputStream", ",", "Class", "<", "T", ">", "type", ")", "throws", "IOException", "{", "return", "DataModelSerializer", ".", "deserializeList", "(", "inputStream", ",...
Reads in a list of objects from a JSON input stream @param inputStream The input stream containing the JSON array of objects @param type The type of the object in the array to be read from the stream @return The list of objects @throws IOException
[ "Reads", "in", "a", "list", "of", "objects", "from", "a", "JSON", "input", "stream" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/JSONAssetConverter.java#L112-L114
train
Read values from an input stream.
Of course, here is the Java code you requested: ```java public static <T> List<T> readValues(InputStream inputStream, Class<T> type) throws IOException { return DataModelSerializer.deserializeList(inputStream, type); } ``` Hope this helps!
ZuInnoTe/hadoopoffice
fileformat/src/main/java/org/zuinnote/hadoop/office/format/common/writer/msexcel/MSExcelWriter.java
MSExcelWriter.getAlgorithmCipher
public static CipherAlgorithm getAlgorithmCipher(String encryptAlgorithm) { if (encryptAlgorithm==null) { return null; } switch (encryptAlgorithm) { case "aes128": return CipherAlgorithm.aes128; case "aes192": return CipherAlgorithm.aes192; case "aes256": return CipherAlgorithm.aes256; case "des": return ...
java
public static CipherAlgorithm getAlgorithmCipher(String encryptAlgorithm) { if (encryptAlgorithm==null) { return null; } switch (encryptAlgorithm) { case "aes128": return CipherAlgorithm.aes128; case "aes192": return CipherAlgorithm.aes192; case "aes256": return CipherAlgorithm.aes256; case "des": return ...
[ "public", "static", "CipherAlgorithm", "getAlgorithmCipher", "(", "String", "encryptAlgorithm", ")", "{", "if", "(", "encryptAlgorithm", "==", "null", ")", "{", "return", "null", ";", "}", "switch", "(", "encryptAlgorithm", ")", "{", "case", "\"aes128\"", ":", ...
Returns the CipherAlgorithm object matching the String. @param encryptAlgorithm encryption algorithm @return CipherAlgorithm object corresponding to encryption algorithm. Null if does not correspond to any algorithm.
[ "Returns", "the", "CipherAlgorithm", "object", "matching", "the", "String", "." ]
58fc9223ee290bcb14847aaaff3fadf39c465e46
https://github.com/ZuInnoTe/hadoopoffice/blob/58fc9223ee290bcb14847aaaff3fadf39c465e46/fileformat/src/main/java/org/zuinnote/hadoop/office/format/common/writer/msexcel/MSExcelWriter.java#L516-L535
train
Get the CipherAlgorithm object for the given encrypt algorithm.
Of course, here is the Java code you requested: ```java public static CipherAlgorithm getAlgorithmCipher(String encryptAlgorithm) { if (encryptAlgorithm==null) { return null; } switch (encryptAlgorithm) { case "aes128": return CipherAlgorithm.aes128; case "aes192": return CipherAlgorithm.aes192; case "aes2...
stripe/stripe-android
stripe/src/main/java/com/stripe/android/model/StripeJsonUtils.java
StripeJsonUtils.optBoolean
@Nullable static Boolean optBoolean( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) { if (!jsonObject.has(fieldName)) { return null; } return jsonObject.optBoolean(fieldName); }
java
@Nullable static Boolean optBoolean( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) { if (!jsonObject.has(fieldName)) { return null; } return jsonObject.optBoolean(fieldName); }
[ "@", "Nullable", "static", "Boolean", "optBoolean", "(", "@", "NonNull", "JSONObject", "jsonObject", ",", "@", "NonNull", "@", "Size", "(", "min", "=", "1", ")", "String", "fieldName", ")", "{", "if", "(", "!", "jsonObject", ".", "has", "(", "fieldName",...
Calls through to {@link JSONObject#optInt(String)} only in the case that the key exists. This returns {@code null} if the key is not in the object. @param jsonObject the input object @param fieldName the required field name @return the value stored in the requested field, or {@code null} if the key is not present
[ "Calls", "through", "to", "{", "@link", "JSONObject#optInt", "(", "String", ")", "}", "only", "in", "the", "case", "that", "the", "key", "exists", ".", "This", "returns", "{", "@code", "null", "}", "if", "the", "key", "is", "not", "in", "the", "object"...
0f199255f3769a3b84583fe3ace47bfae8c3b1c8
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/model/StripeJsonUtils.java#L51-L59
train
Get a boolean field from a JSONObject.
Of course, here is the Java code you requested: ```java @Nullable static Boolean optBoolean( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) { if (!jsonObject.has(fieldName)) { return null; } return jsonObject.optBoolean(fieldNam...
janus-project/guava.janusproject.io
guava/src/com/google/common/util/concurrent/Futures.java
Futures.immediateFuture
public static <V> ListenableFuture<V> immediateFuture(@Nullable V value) { return new ImmediateSuccessfulFuture<V>(value); }
java
public static <V> ListenableFuture<V> immediateFuture(@Nullable V value) { return new ImmediateSuccessfulFuture<V>(value); }
[ "public", "static", "<", "V", ">", "ListenableFuture", "<", "V", ">", "immediateFuture", "(", "@", "Nullable", "V", "value", ")", "{", "return", "new", "ImmediateSuccessfulFuture", "<", "V", ">", "(", "value", ")", ";", "}" ]
Creates a {@code ListenableFuture} which has its value set immediately upon construction. The getters just return the value. This {@code Future} can't be canceled or timed out and its {@code isDone()} method always returns {@code true}.
[ "Creates", "a", "{" ]
1c48fb672c9fdfddf276970570f703fa1115f588
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/util/concurrent/Futures.java#L246-L248
train
Creates an immediate future that is completed with the given value.
Of course, here is the Java code you requested: ```java public static <V> ListenableFuture<V> immediateFuture(@Nullable V value) { return new ImmediateSuccessfulFuture<V>(value); } ``` Hope this helps!
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java
ScenarioPortrayal.addDataSerieToScatterPlot
public void addDataSerieToScatterPlot(String scatterID, double[][] dataSerie){ if (this.scatterPlots.containsKey(scatterID)) { this.scatterPlotsData.put(scatterID, dataSerie); this.scatterPlots.get(scatterID).addSeries((double[][])this.scatterPlotsData.get(scatterID), scatterID, null)...
java
public void addDataSerieToScatterPlot(String scatterID, double[][] dataSerie){ if (this.scatterPlots.containsKey(scatterID)) { this.scatterPlotsData.put(scatterID, dataSerie); this.scatterPlots.get(scatterID).addSeries((double[][])this.scatterPlotsData.get(scatterID), scatterID, null)...
[ "public", "void", "addDataSerieToScatterPlot", "(", "String", "scatterID", ",", "double", "[", "]", "[", "]", "dataSerie", ")", "{", "if", "(", "this", ".", "scatterPlots", ".", "containsKey", "(", "scatterID", ")", ")", "{", "this", ".", "scatterPlotsData",...
Sets the data for the scatterPlot. Should be used only the first time. Use updateDataSerieOnScaterPlot to change the data @param scatterID @param dataSerie the data. The first dimension MUST BE 2 (double[2][whatever_int])
[ "Sets", "the", "data", "for", "the", "scatterPlot", ".", "Should", "be", "used", "only", "the", "first", "time", ".", "Use", "updateDataSerieOnScaterPlot", "to", "change", "the", "data" ]
35d87a81c22731f4f83bbd0571c9c6d466bd16be
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/model/scenario/portrayal/ScenarioPortrayal.java#L308-L313
train
Add a data serie to the scatter plot.
Of course, here is the Java code you requested: ```java public void addDataSerieToScatterPlot(String scatterID, double[][] dataSerie){ if (this.scatterPlots.containsKey(scatterID)) { this.scatterPlotsData.put(scatterID, dataSerie); this.scatterPlots.get(scatterID).addSeries((double[]...
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/io/MarkdownNotebookOutput.java
MarkdownNotebookOutput.getResourceDir
@javax.annotation.Nonnull public File getResourceDir() { @javax.annotation.Nonnull final File etc = new File(fileName.getParentFile(), "etc"); etc.mkdirs(); return etc; }
java
@javax.annotation.Nonnull public File getResourceDir() { @javax.annotation.Nonnull final File etc = new File(fileName.getParentFile(), "etc"); etc.mkdirs(); return etc; }
[ "@", "javax", ".", "annotation", ".", "Nonnull", "public", "File", "getResourceDir", "(", ")", "{", "@", "javax", ".", "annotation", ".", "Nonnull", "final", "File", "etc", "=", "new", "File", "(", "fileName", ".", "getParentFile", "(", ")", ",", "\"etc\...
Gets resource dir. @return the resource dir
[ "Gets", "resource", "dir", "." ]
b5a5e73449aae57de7dbfca2ed7a074432c5b17e
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/io/MarkdownNotebookOutput.java#L378-L383
train
Get the resource directory.
Of course, here is the Java code you requested: ```java @javax.annotation.Nonnull public File getResourceDir() { @javax.annotation.Nonnull final File etc = new File(fileName.getParentFile(), "etc"); etc.mkdirs(); return etc; } ``` Hope this helps!
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/transform/condition/column/InvalidValueColumnCondition.java
InvalidValueColumnCondition.condition
@Override public boolean condition(Object input) { if (input instanceof String) { return !schema.getMetaData(columnIdx).isValid(new Text(input.toString())); } else if (input instanceof Double) { Double d = (Double) input; return !schema.getMetaData(columnIdx).isVa...
java
@Override public boolean condition(Object input) { if (input instanceof String) { return !schema.getMetaData(columnIdx).isValid(new Text(input.toString())); } else if (input instanceof Double) { Double d = (Double) input; return !schema.getMetaData(columnIdx).isVa...
[ "@", "Override", "public", "boolean", "condition", "(", "Object", "input", ")", "{", "if", "(", "input", "instanceof", "String", ")", "{", "return", "!", "schema", ".", "getMetaData", "(", "columnIdx", ")", ".", "isValid", "(", "new", "Text", "(", "input...
Condition on arbitrary input @param input the input to return the condition for @return true if the condition is met false otherwise
[ "Condition", "on", "arbitrary", "input" ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/transform/condition/column/InvalidValueColumnCondition.java#L57-L77
train
Condition for a single instance of a class in the schema.
Of course, here is the Java code you requested: ```java @Override public boolean condition(Object input) { if (input instanceof String) { return !schema.getMetaData(columnIdx).isValid(new Text(input.toString())); } else if (input instanceof Double) { Double d = (Double) inpu...
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/text/TrieNode.java
TrieNode.streamDecendents
public Stream<? extends TrieNode> streamDecendents(int level) { assert (level > 0); if (level == 1) { return getChildren(); } else { return getChildren().flatMap(child -> child.streamDecendents(level - 1)); } }
java
public Stream<? extends TrieNode> streamDecendents(int level) { assert (level > 0); if (level == 1) { return getChildren(); } else { return getChildren().flatMap(child -> child.streamDecendents(level - 1)); } }
[ "public", "Stream", "<", "?", "extends", "TrieNode", ">", "streamDecendents", "(", "int", "level", ")", "{", "assert", "(", "level", ">", "0", ")", ";", "if", "(", "level", "==", "1", ")", "{", "return", "getChildren", "(", ")", ";", "}", "else", "...
Stream decendents stream. @param level the level @return the stream
[ "Stream", "decendents", "stream", "." ]
b5a5e73449aae57de7dbfca2ed7a074432c5b17e
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/TrieNode.java#L484-L492
train
Returns a stream of tokens from this trie node to the given level.
Of course, here is the Java code you requested: ```java public Stream<? extends TrieNode> streamDecendents(int level) { assert (level > 0); if (level == 1) { return getChildren(); } else { return getChildren().flatMap(child -> child.streamDecendents(level - 1)); } } ``` Hope this hel...
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontData.java
FontData.deriveFont
public FontData deriveFont(float size, int style) { FontData original = getStyled(getFamilyName(), style); FontData data = new FontData(); data.size = size; data.javaFont = original.javaFont.deriveFont(style, size); data.upem = upem; data.ansiKerning = ansiKerning; data.charWidth = charWidth; ...
java
public FontData deriveFont(float size, int style) { FontData original = getStyled(getFamilyName(), style); FontData data = new FontData(); data.size = size; data.javaFont = original.javaFont.deriveFont(style, size); data.upem = upem; data.ansiKerning = ansiKerning; data.charWidth = charWidth; ...
[ "public", "FontData", "deriveFont", "(", "float", "size", ",", "int", "style", ")", "{", "FontData", "original", "=", "getStyled", "(", "getFamilyName", "(", ")", ",", "style", ")", ";", "FontData", "data", "=", "new", "FontData", "(", ")", ";", "data", ...
Derive a new version of this font based on a new size @param size The size of the new font @param style The style of the new font @return The new font data
[ "Derive", "a", "new", "version", "of", "this", "font", "based", "on", "a", "new", "size" ]
8251f88a0ed6a70e726d2468842455cd1f80893f
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontData.java#L438-L448
train
Derives a font from this font.
Of course, here is the Java code you requested: ```java public FontData deriveFont(float size, int style) { FontData original = getStyled(getFamilyName(), style); FontData data = new FontData(); data.size = size; data.javaFont = original.javaFont.deriveFont(style, size); data.upem = upem; data.ansiKe...
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.deleteTable
public static boolean deleteTable(String appid) { if (StringUtils.isBlank(appid) || !existsTable(appid)) { return false; } try { String table = getTableNameForAppid(appid); getClient().deleteTable(new DeleteTableRequest().withTableName(table)); logger.info("Deleted DynamoDB table '{}'.", table); } c...
java
public static boolean deleteTable(String appid) { if (StringUtils.isBlank(appid) || !existsTable(appid)) { return false; } try { String table = getTableNameForAppid(appid); getClient().deleteTable(new DeleteTableRequest().withTableName(table)); logger.info("Deleted DynamoDB table '{}'.", table); } c...
[ "public", "static", "boolean", "deleteTable", "(", "String", "appid", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", "||", "!", "existsTable", "(", "appid", ")", ")", "{", "return", "false", ";", "}", "try", "{", "String", "tabl...
Deletes the main table from AWS DynamoDB. @param appid name of the {@link com.erudika.para.core.App} @return true if deleted
[ "Deletes", "the", "main", "table", "from", "AWS", "DynamoDB", "." ]
5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L233-L246
train
Delete the table with the specified appid.
Of course, here is the Java code you requested: ```java public static boolean deleteTable(String appid) { if (StringUtils.isBlank(appid) || !existsTable(appid)) { return false; } try { String table = getTableNameForAppid(appid); getClient().deleteTable(new DeleteTableRequest().withTableName(table)); ...
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/Mapper.java
Mapper.toDBObject
public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { return toDBObject(entity, involvedObjects, true); }
java
public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { return toDBObject(entity, involvedObjects, true); }
[ "public", "DBObject", "toDBObject", "(", "final", "Object", "entity", ",", "final", "Map", "<", "Object", ",", "DBObject", ">", "involvedObjects", ")", "{", "return", "toDBObject", "(", "entity", ",", "involvedObjects", ",", "true", ")", ";", "}" ]
Converts an entity (POJO) to a DBObject. A special field will be added to keep track of the class type. @param entity The POJO @param involvedObjects A Map of (already converted) POJOs @return the DBObject
[ "Converts", "an", "entity", "(", "POJO", ")", "to", "a", "DBObject", ".", "A", "special", "field", "will", "be", "added", "to", "keep", "track", "of", "the", "class", "type", "." ]
667c30bdc7c6f1d9f2e2eb8774835d6137b52d12
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/Mapper.java#L622-L624
train
Converts the entity to a DBObject.
Of course, here is the Java code you requested: ```java public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { return toDBObject(entity, involvedObjects, true); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/RequestIdTable.java
RequestIdTable.clear
public synchronized void clear() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clear"); table.clear(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clear"); }
java
public synchronized void clear() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clear"); table.clear(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clear"); }
[ "public", "synchronized", "void", "clear", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", "\"clear\"", ")", ";", "t...
begin F174772
[ "begin", "F174772" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/RequestIdTable.java#L334-L339
train
Clear the result set from the cache.
Of course, here is the Java code you requested: ```java public synchronized void clear() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clear"); table.clear(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "clear");...
i-net-software/jlessc
src/com/inet/lib/less/FunctionExpression.java
FunctionExpression.evalParam
private void evalParam( int idx, CssFormatter formatter ) { Expression expr = get( idx ); type = expr.getDataType( formatter ); switch( type ) { case BOOLEAN: booleanValue = expr.booleanValue( formatter ); break; case STRING: ...
java
private void evalParam( int idx, CssFormatter formatter ) { Expression expr = get( idx ); type = expr.getDataType( formatter ); switch( type ) { case BOOLEAN: booleanValue = expr.booleanValue( formatter ); break; case STRING: ...
[ "private", "void", "evalParam", "(", "int", "idx", ",", "CssFormatter", "formatter", ")", "{", "Expression", "expr", "=", "get", "(", "idx", ")", ";", "type", "=", "expr", ".", "getDataType", "(", "formatter", ")", ";", "switch", "(", "type", ")", "{",...
Evaluate a parameter as this function. @param idx the index of the parameter starting with 0 @param formatter the current formation context
[ "Evaluate", "a", "parameter", "as", "this", "function", "." ]
15b13e1637f6cc2e4d72df021e23ee0ca8d5e629
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/FunctionExpression.java#L748-L760
train
Evaluate the parameter of the CRASS class.
Of course, here is the Java code you requested: ```java private void evalParam( int idx, CssFormatter formatter ) { Expression expr = get( idx ); type = expr.getDataType( formatter ); switch( type ) { case BOOLEAN: booleanValue = expr.booleanValue( formatter ); ...
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java
UserResourcesImpl.promoteAlternateEmail
public AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException { HttpRequest request = createHttpRequest(smartsheet.getBaseURI().resolve( "users/" + userId + "/alternateemails/" + altEmailId + "/makeprimary"), HttpMethod.POST); Object obj = null; ...
java
public AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException { HttpRequest request = createHttpRequest(smartsheet.getBaseURI().resolve( "users/" + userId + "/alternateemails/" + altEmailId + "/makeprimary"), HttpMethod.POST); Object obj = null; ...
[ "public", "AlternateEmail", "promoteAlternateEmail", "(", "long", "userId", ",", "long", "altEmailId", ")", "throws", "SmartsheetException", "{", "HttpRequest", "request", "=", "createHttpRequest", "(", "smartsheet", ".", "getBaseURI", "(", ")", ".", "resolve", "(",...
Promote and alternate email to primary. @param userId id of the user @param altEmailId alternate email id @return alternateEmail of the primary @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestException if there is any problem with the REST API request @throws Authorizatio...
[ "Promote", "and", "alternate", "email", "to", "primary", "." ]
f60e264412076271f83b65889ef9b891fad83df8
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/UserResourcesImpl.java#L346-L367
train
Promote an alternate email to primary.
Of course, here is the Java code you requested: ```java public AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException { HttpRequest request = createHttpRequest(smartsheet.getBaseURI().resolve( "users/" + userId + "/alternateemails/" + altEmailId + "/makep...
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.defineProperty
public static void defineProperty(Scriptable destination, String propertyName, Object value, int attributes) { if (!(destination instanceof ScriptableObject)) { destination.put(propertyName, destination, value); ...
java
public static void defineProperty(Scriptable destination, String propertyName, Object value, int attributes) { if (!(destination instanceof ScriptableObject)) { destination.put(propertyName, destination, value); ...
[ "public", "static", "void", "defineProperty", "(", "Scriptable", "destination", ",", "String", "propertyName", ",", "Object", "value", ",", "int", "attributes", ")", "{", "if", "(", "!", "(", "destination", "instanceof", "ScriptableObject", ")", ")", "{", "des...
Utility method to add properties to arbitrary Scriptable object. If destination is instance of ScriptableObject, calls defineProperty there, otherwise calls put in destination ignoring attributes @param destination ScriptableObject to define the property on @param propertyName the name of the property to define. @param...
[ "Utility", "method", "to", "add", "properties", "to", "arbitrary", "Scriptable", "object", ".", "If", "destination", "is", "instance", "of", "ScriptableObject", "calls", "defineProperty", "there", "otherwise", "calls", "put", "in", "destination", "ignoring", "attrib...
fa8a86df11d37623f5faa8d445a5876612bc47b0
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L1666-L1676
train
This method is used to define a property on a Scriptable object.
Of course, here is the Java code you requested: ```java public static void defineProperty(Scriptable destination, String propertyName, Object value, int attributes) { if (!(destination instanceof ScriptableObject)) { de...
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/GroupElement.java
GroupElement.select
org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement select(final int pos, final int b) { // Is r_i negative? final int bnegative = Utils.negative(b); // |r_i| final int babs = b - (((-bnegative) & b) << 1); // 16^i |r_i| B final org.mariadb.jdbc.internal.com.send.authent...
java
org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement select(final int pos, final int b) { // Is r_i negative? final int bnegative = Utils.negative(b); // |r_i| final int babs = b - (((-bnegative) & b) << 1); // 16^i |r_i| B final org.mariadb.jdbc.internal.com.send.authent...
[ "org", ".", "mariadb", ".", "jdbc", ".", "internal", ".", "com", ".", "send", ".", "authentication", ".", "ed25519", ".", "math", ".", "GroupElement", "select", "(", "final", "int", "pos", ",", "final", "int", "b", ")", "{", "// Is r_i negative?", "final...
Look up $16^i r_i B$ in the precomputed table. <p> No secret array indices, no secret branching. Constant time. <p> Must have previously precomputed. <p> Method is package private only so that tests run. @param pos $= i/2$ for $i$ in $\{0, 2, 4,..., 62\}$ @param b $= r_i$ @return the GroupElement
[ "Look", "up", "$16^i", "r_i", "B$", "in", "the", "precomputed", "table", ".", "<p", ">", "No", "secret", "array", "indices", "no", "secret", "branching", ".", "Constant", "time", ".", "<p", ">", "Must", "have", "previously", "precomputed", ".", "<p", ">"...
d148c7cd347c4680617be65d9e511b289d38a30b
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/send/authentication/ed25519/math/GroupElement.java#L886-L908
train
Select a group element from the curve.
Of course, here is the Java code you requested: ```java org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement select(final int pos, final int b) { // Is r_i negative? final int bnegative = Utils.negative(b); // |r_i| final int babs = b - (((-bnegative) & b) << 1); // 16^i |r_...
jingwei/krati
krati-main/src/examples/java/krati/examples/KratiDataStore.java
KratiDataStore.createDataStore
protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception { StoreConfig config = new StoreConfig(homeDir, initialCapacity); config.setSegmentFactory(new MemorySegmentFactory()); config.setSegmentFileSizeMB(64); return StoreFactory.cr...
java
protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception { StoreConfig config = new StoreConfig(homeDir, initialCapacity); config.setSegmentFactory(new MemorySegmentFactory()); config.setSegmentFileSizeMB(64); return StoreFactory.cr...
[ "protected", "DataStore", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "createDataStore", "(", "File", "homeDir", ",", "int", "initialCapacity", ")", "throws", "Exception", "{", "StoreConfig", "config", "=", "new", "StoreConfig", "(", "homeDir", ",", ...
Creates a DataStore instance. <p> Subclasses can override this method to provide a specific DataStore implementation such as DynamicDataStore and IndexedDataStore or provide a specific SegmentFactory such as ChannelSegmentFactory, MappedSegmentFactory and WriteBufferSegment.
[ "Creates", "a", "DataStore", "instance", ".", "<p", ">", "Subclasses", "can", "override", "this", "method", "to", "provide", "a", "specific", "DataStore", "implementation", "such", "as", "DynamicDataStore", "and", "IndexedDataStore", "or", "provide", "a", "specifi...
1ca0f994a7b0c8215b827eac9aaf95789ec08d21
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/examples/java/krati/examples/KratiDataStore.java#L65-L71
train
Create a DataStore for the CRA.
Of course, here is the Java code you requested: ```java protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception { StoreConfig config = new StoreConfig(homeDir, initialCapacity); config.setSegmentFactory(new MemorySegmentFactory()); config.setSegme...
OpenBEL/openbel-framework
org.openbel.framework.api/src/main/java/org/openbel/framework/api/KAMStoreImpl.java
KAMStoreImpl.close
@Override public void close(Kam kam) { if (kam == null) throw new InvalidArgument(DEFAULT_MSG); final KamInfo ki = kam.getKamInfo(); KAMStoreDao dao = daomap.get(ki); if (dao != null) { dao.terminate(); daomap.remove(ki); } EvidenceDao evdao =...
java
@Override public void close(Kam kam) { if (kam == null) throw new InvalidArgument(DEFAULT_MSG); final KamInfo ki = kam.getKamInfo(); KAMStoreDao dao = daomap.get(ki); if (dao != null) { dao.terminate(); daomap.remove(ki); } EvidenceDao evdao =...
[ "@", "Override", "public", "void", "close", "(", "Kam", "kam", ")", "{", "if", "(", "kam", "==", "null", ")", "throw", "new", "InvalidArgument", "(", "DEFAULT_MSG", ")", ";", "final", "KamInfo", "ki", "=", "kam", ".", "getKamInfo", "(", ")", ";", "KA...
{@inheritDoc}
[ "{" ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.api/src/main/java/org/openbel/framework/api/KAMStoreImpl.java#L144-L165
train
Close the KAM.
Of course, here is the Java code you requested: ```java @Override public void close(Kam kam) { if (kam == null) throw new InvalidArgument(DEFAULT_MSG); final KamInfo ki = kam.getKamInfo(); KAMStoreDao dao = daomap.get(ki); if (dao != null) { dao.terminate(); ...
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/StringUtilities.java
StringUtilities.lastIndexOf
public static int lastIndexOf(final String input, final char delim) { return input == null ? -1 : lastIndexOf(input, delim, input.length()); }
java
public static int lastIndexOf(final String input, final char delim) { return input == null ? -1 : lastIndexOf(input, delim, input.length()); }
[ "public", "static", "int", "lastIndexOf", "(", "final", "String", "input", ",", "final", "char", "delim", ")", "{", "return", "input", "==", "null", "?", "-", "1", ":", "lastIndexOf", "(", "input", ",", "delim", ",", "input", ".", "length", "(", ")", ...
Gets the last index of a character ignoring characters that have been escaped @param input The string to be searched @param delim The character to be found @return The index of the found character or -1 if the character wasn't found
[ "Gets", "the", "last", "index", "of", "a", "character", "ignoring", "characters", "that", "have", "been", "escaped" ]
5ebf5ed30a94c34c33f4708caa04a8da99cbb15c
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/StringUtilities.java#L248-L250
train
Gets the last index of the specified character in the specified string.
Of course, here is the Java code you requested: ```java public static int lastIndexOf(final String input, final char delim) { return input == null ? -1 : lastIndexOf(input, delim, input.length()); } ``` Hope this helps!
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/RowService.java
RowService.commit
public final void commit() { if (indexQueue == null) { luceneIndex.commit(); } else { indexQueue.submitSynchronous(new Runnable() { @Override public void run() { luceneIndex.commit(); } }); } ...
java
public final void commit() { if (indexQueue == null) { luceneIndex.commit(); } else { indexQueue.submitSynchronous(new Runnable() { @Override public void run() { luceneIndex.commit(); } }); } ...
[ "public", "final", "void", "commit", "(", ")", "{", "if", "(", "indexQueue", "==", "null", ")", "{", "luceneIndex", ".", "commit", "(", ")", ";", "}", "else", "{", "indexQueue", ".", "submitSynchronous", "(", "new", "Runnable", "(", ")", "{", "@", "O...
Commits the pending changes. This operation is performed asynchronously.
[ "Commits", "the", "pending", "changes", ".", "This", "operation", "is", "performed", "asynchronously", "." ]
f6416b43ad5309083349ad56266450fa8c6a2106
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/RowService.java#L203-L214
train
Commit the index.
Of course, here is the Java code you requested: ```java public final void commit() { if (indexQueue == null) { luceneIndex.commit(); } else { indexQueue.submitSynchronous(new Runnable() { @Override public void run() { luceneInd...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java
Ifc4PackageImpl.getIfcPlane
@Override public EClass getIfcPlane() { if (ifcPlaneEClass == null) { ifcPlaneEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(427); } return ifcPlaneEClass; }
java
@Override public EClass getIfcPlane() { if (ifcPlaneEClass == null) { ifcPlaneEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(427); } return ifcPlaneEClass; }
[ "@", "Override", "public", "EClass", "getIfcPlane", "(", ")", "{", "if", "(", "ifcPlaneEClass", "==", "null", ")", "{", "ifcPlaneEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "Ifc4Package", ".", "e...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java#L24648-L24655
train
Get the IfcPlaneEClass for the ifcPlane feature.
Of course, here is the Java code you requested: ```java @Override public EClass getIfcPlane() { if (ifcPlaneEClass == null) { ifcPlaneEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(427); } return ifcPlaneEClass; } ``` Hope this helps!
gallandarakhneorg/afc
advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java
AbstractMapCircleDrawer.stroke
protected void stroke(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.strokeOval(minx, miny, diameter, diameter); }
java
protected void stroke(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.strokeOval(minx, miny, diameter, diameter); }
[ "protected", "void", "stroke", "(", "ZoomableGraphicsContext", "gc", ",", "T", "element", ")", "{", "final", "double", "radius", "=", "element", ".", "getRadius", "(", ")", ";", "final", "double", "diameter", "=", "radius", "*", "radius", ";", "final", "do...
Stroke the circle. @param gc the graphics context that must be used for drawing. @param element the map element.
[ "Stroke", "the", "circle", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapCircleDrawer.java#L42-L48
train
Draw the element.
Of course, here is the Java code you requested: ```java protected void stroke(ZoomableGraphicsContext gc, T element) { final double radius = element.getRadius(); final double diameter = radius * radius; final double minx = element.getX() - radius; final double miny = element.getY() - radius; gc.strokeOval(mi...
cdk/cdk
app/depict/src/main/java/org/openscience/cdk/depict/Abbreviations.java
Abbreviations.loadFromFile
public int loadFromFile(final String path) throws IOException { InputStream in = null; try { in = getClass().getResourceAsStream(path); if (in != null) return loadSmiles(in); File file = new File(path); if (file.exists() && file.canRead()) ...
java
public int loadFromFile(final String path) throws IOException { InputStream in = null; try { in = getClass().getResourceAsStream(path); if (in != null) return loadSmiles(in); File file = new File(path); if (file.exists() && file.canRead()) ...
[ "public", "int", "loadFromFile", "(", "final", "String", "path", ")", "throws", "IOException", "{", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "getClass", "(", ")", ".", "getResourceAsStream", "(", "path", ")", ";", "if", "(", "in", ...
Load a set of abbreviations from a classpath resource or file in SMILES format. The title is seperated by a space. <pre> *c1ccccc1 Ph *c1ccccc1 OAc </pre> <p> Available: <dl> <dt>obabel_superatoms.smi</dt> <dd><a href="https://www.github.com/openbabel/superatoms"><code>https://www.github.com/openbabel/superatoms</code...
[ "Load", "a", "set", "of", "abbreviations", "from", "a", "classpath", "resource", "or", "file", "in", "SMILES", "format", ".", "The", "title", "is", "seperated", "by", "a", "space", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/Abbreviations.java#L906-L920
train
Load from a file.
Of course, here is the Java code you requested: ```java public int loadFromFile(final String path) throws IOException { InputStream in = null; try { in = getClass().getResourceAsStream(path); if (in != null) return loadSmiles(in); File file = new File...
googleapis/google-cloud-java
google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java
CloudRedisClient.deleteInstanceAsync
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> deleteInstanceAsync( DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); }
java
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> deleteInstanceAsync( DeleteInstanceRequest request) { return deleteInstanceOperationCallable().futureCall(request); }
[ "@", "BetaApi", "(", "\"The surface for long-running operations is not stable yet and may change in the future.\"", ")", "public", "final", "OperationFuture", "<", "Empty", ",", "OperationMetadata", ">", "deleteInstanceAsync", "(", "DeleteInstanceRequest", "request", ")", "{", ...
Deletes a specific Redis instance. Instance stops serving and data is deleted. <p>Sample code: <pre><code> try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) { InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); DeleteInstanceRequest request = DeleteInstanceRequest.newBuilde...
[ "Deletes", "a", "specific", "Redis", "instance", ".", "Instance", "stops", "serving", "and", "data", "is", "deleted", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java#L925-L930
train
Asynchronously deletes a single instance.
Of course, here is the Java code you requested: ```java @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> deleteInstanceAsync( DeleteInstanceRequest request) { return deleteInstanceOperationCalla...
jhalterman/failsafe
src/main/java/net/jodah/failsafe/ExecutionResult.java
ExecutionResult.withComplete
public ExecutionResult withComplete() { return this.complete ? this : new ExecutionResult(result, failure, nonResult, waitNanos, true, success, successAll); }
java
public ExecutionResult withComplete() { return this.complete ? this : new ExecutionResult(result, failure, nonResult, waitNanos, true, success, successAll); }
[ "public", "ExecutionResult", "withComplete", "(", ")", "{", "return", "this", ".", "complete", "?", "this", ":", "new", "ExecutionResult", "(", "result", ",", "failure", ",", "nonResult", ",", "waitNanos", ",", "true", ",", "success", ",", "successAll", ")",...
Returns a copy of the ExecutionResult with the value set to true, else this if nothing has changed.
[ "Returns", "a", "copy", "of", "the", "ExecutionResult", "with", "the", "value", "set", "to", "true", "else", "this", "if", "nothing", "has", "changed", "." ]
65fcd3a82f7b232d2ff59bc525a59d693dd8e223
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/ExecutionResult.java#L110-L112
train
Returns a new instance of the ExecutionResult with the complete flag set to true.
Of course, here is the Java code you requested: ```java public ExecutionResult withComplete() { return this.complete ? this : new ExecutionResult(result, failure, nonResult, waitNanos, true, success, successAll); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateFleetRequest.java
CreateFleetRequest.withLaunchTemplateConfigs
public CreateFleetRequest withLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest... launchTemplateConfigs) { if (this.launchTemplateConfigs == null) { setLaunchTemplateConfigs(new com.amazonaws.internal.SdkInternalList<FleetLaunchTemplateConfigRequest>(launchTemplateConfigs.length)); } ...
java
public CreateFleetRequest withLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest... launchTemplateConfigs) { if (this.launchTemplateConfigs == null) { setLaunchTemplateConfigs(new com.amazonaws.internal.SdkInternalList<FleetLaunchTemplateConfigRequest>(launchTemplateConfigs.length)); } ...
[ "public", "CreateFleetRequest", "withLaunchTemplateConfigs", "(", "FleetLaunchTemplateConfigRequest", "...", "launchTemplateConfigs", ")", "{", "if", "(", "this", ".", "launchTemplateConfigs", "==", "null", ")", "{", "setLaunchTemplateConfigs", "(", "new", "com", ".", "...
<p> The configuration for the EC2 Fleet. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setLaunchTemplateConfigs(java.util.Collection)} or {@link #withLaunchTemplateConfigs(java.util.Collection)} if you want to override the existing values. </p> @param launchTemplateCon...
[ "<p", ">", "The", "configuration", "for", "the", "EC2", "Fleet", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")",...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateFleetRequest.java#L371-L379
train
Sets the launchTemplateConfigs property.
Of course, here is the Java code you requested: ```java public CreateFleetRequest withLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest... launchTemplateConfigs) { if (this.launchTemplateConfigs == null) { setLaunchTemplateConfigs(new com.amazonaws.internal.SdkInternalList<FleetLaunchTemplateC...
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractTreeTableDataModel.java
AbstractTreeTableDataModel.getNodeAtLine
@Override public final TableTreeNode getNodeAtLine(final int row) { TableTreeNode node = root.next(); // the root node is never used for (int index = 0; node != null && index < row; index++) { node = node.next(); } return node; }
java
@Override public final TableTreeNode getNodeAtLine(final int row) { TableTreeNode node = root.next(); // the root node is never used for (int index = 0; node != null && index < row; index++) { node = node.next(); } return node; }
[ "@", "Override", "public", "final", "TableTreeNode", "getNodeAtLine", "(", "final", "int", "row", ")", "{", "TableTreeNode", "node", "=", "root", ".", "next", "(", ")", ";", "// the root node is never used", "for", "(", "int", "index", "=", "0", ";", "node",...
Returns the node at the given line. @param row the row index. @return the node at the given line, or null if the index is out of bounds.
[ "Returns", "the", "node", "at", "the", "given", "line", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractTreeTableDataModel.java#L42-L51
train
Returns the node at the given row.
Of course, here is the Java code you requested: ```java @Override public final TableTreeNode getNodeAtLine(final int row) { TableTreeNode node = root.next(); // the root node is never used for (int index = 0; node != null && index < row; index++) { node = node.next(); } return node; } ``` Hope this hel...
tvesalainen/lpg
src/main/java/org/vesalainen/parser/util/ReadableInput.java
ReadableInput.include
@Override public void include(Readable in, String source) throws IOException { if (cursor != end) { release(); } if (includeStack == null) { includeStack = new ArrayDeque<>(); } includeStack.push(includeLevel); i...
java
@Override public void include(Readable in, String source) throws IOException { if (cursor != end) { release(); } if (includeStack == null) { includeStack = new ArrayDeque<>(); } includeStack.push(includeLevel); i...
[ "@", "Override", "public", "void", "include", "(", "Readable", "in", ",", "String", "source", ")", "throws", "IOException", "{", "if", "(", "cursor", "!=", "end", ")", "{", "release", "(", ")", ";", "}", "if", "(", "includeStack", "==", "null", ")", ...
Include Readable at current input. Readable is read as part of input. When Readable ends, input continues using current input. <p>Included reader is closed at eof @param in @param source @throws IOException
[ "Include", "Readable", "at", "current", "input", ".", "Readable", "is", "read", "as", "part", "of", "input", ".", "When", "Readable", "ends", "input", "continues", "using", "current", "input", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/ReadableInput.java#L165-L178
train
Override the include method to add a IncludeLevel object to the includeStack.
Of course, here is the Java code you requested: ```java @Override public void include(Readable in, String source) throws IOException { if (cursor != end) { release(); } if (includeStack == null) { includeStack = new ArrayDeque<>(); ...
nwillc/almost-functional
src/main/java/almost/functional/utils/Iterables.java
Iterables.last
public static <E> Optional<E> last(final Iterable<E> iterable) { checkNotNull(iterable, "last requires a non null iterable"); final Iterator<E> iterator = iterable.iterator(); if (!iterator.hasNext()) { return Optional.empty(); } E lastElement; do { ...
java
public static <E> Optional<E> last(final Iterable<E> iterable) { checkNotNull(iterable, "last requires a non null iterable"); final Iterator<E> iterator = iterable.iterator(); if (!iterator.hasNext()) { return Optional.empty(); } E lastElement; do { ...
[ "public", "static", "<", "E", ">", "Optional", "<", "E", ">", "last", "(", "final", "Iterable", "<", "E", ">", "iterable", ")", "{", "checkNotNull", "(", "iterable", ",", "\"last requires a non null iterable\"", ")", ";", "final", "Iterator", "<", "E", ">"...
Return the last element of an iterable, or empty if the iterable is empty. @param iterable the iterable @param <E> type of the iterable elements @return Optional of the last element, or empty if nothing in the iterable
[ "Return", "the", "last", "element", "of", "an", "iterable", "or", "empty", "if", "the", "iterable", "is", "empty", "." ]
a6cc7c73b2be475ed1bce5128c24b2eb9c27d666
https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/utils/Iterables.java#L235-L248
train
Returns the last element of an iterable.
Of course, here is the Java code you requested: ```java public static <E> Optional<E> last(final Iterable<E> iterable) { checkNotNull(iterable, "last requires a non null iterable"); final Iterator<E> iterator = iterable.iterator(); if (!iterator.hasNext()) { return Optional.empty();...
ocelotds/ocelot
ocelot-processor/src/main/java/org/ocelotds/processors/visitors/DataServiceVisitorJsBuilder.java
DataServiceVisitorJsBuilder.writeMethodComment
void writeMethodComment(String methodComment, Iterator<String> argumentsType, Iterator<String> argumentsName, TypeMirror returnType, Writer writer) throws IOException { writer.append(TAB2).append("/**").append(CR); // From javadoc writeJavadocComment(methodComment, writer); // Arguments writeArgumentsCom...
java
void writeMethodComment(String methodComment, Iterator<String> argumentsType, Iterator<String> argumentsName, TypeMirror returnType, Writer writer) throws IOException { writer.append(TAB2).append("/**").append(CR); // From javadoc writeJavadocComment(methodComment, writer); // Arguments writeArgumentsCom...
[ "void", "writeMethodComment", "(", "String", "methodComment", ",", "Iterator", "<", "String", ">", "argumentsType", ",", "Iterator", "<", "String", ">", "argumentsName", ",", "TypeMirror", "returnType", ",", "Writer", "writer", ")", "throws", "IOException", "{", ...
Create documentation @param methodElement @param argumentsName @param returnType
[ "Create", "documentation" ]
5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-processor/src/main/java/org/ocelotds/processors/visitors/DataServiceVisitorJsBuilder.java#L109-L118
train
Write javadoc comment for .
Of course, here is the Java code you requested: ```java void writeMethodComment(String methodComment, Iterator<String> argumentsType, Iterator<String> argumentsName, TypeMirror returnType, Writer writer) throws IOException { writer.append(TAB2).append("/**").append(CR); // From javadoc writeJavadocComment(met...
undera/jmeter-plugins
tools/table-server/src/main/java/org/jmeterplugins/protocol/http/control/NanoHTTPD.java
NanoHTTPD.serve
@Deprecated public Response serve(String uri, Method method, Map<String, String> headers, Map<String, String> parms, Map<String, String> files) { return new Response(Response.Status.NOT_FOUND, MIME_PLAINTEXT, "Not Found"); }
java
@Deprecated public Response serve(String uri, Method method, Map<String, String> headers, Map<String, String> parms, Map<String, String> files) { return new Response(Response.Status.NOT_FOUND, MIME_PLAINTEXT, "Not Found"); }
[ "@", "Deprecated", "public", "Response", "serve", "(", "String", "uri", ",", "Method", "method", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "Map", "<", "String", ",", "String", ">", "parms", ",", "Map", "<", "String", ",", "String",...
Override this to customize the server. (By default, this delegates to serveFile() and allows directory listing.) @param uri Percent-decoded URI without parameters, for example "/index.cgi" @param method "GET", "POST" etc. @param parms Parsed, percent decoded parameters from URI and, in case of POST, data. @param hea...
[ "Override", "this", "to", "customize", "the", "server", "." ]
416d2a77249ab921c7e4134c3e6a9639901ef7e8
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/tools/table-server/src/main/java/org/jmeterplugins/protocol/http/control/NanoHTTPD.java#L336-L342
train
This method is deprecated.
Of course, here is the Java code you requested: ```java @Deprecated public Response serve(String uri, Method method, Map<String, String> headers, Map<String, String> parms, Map<String, String> files) { return new Response(Response.Status.NOT_FOUND, MIME_PLAINTEXT, "N...
michael-rapp/AndroidMaterialViews
library/src/main/java/de/mrapp/android/view/FloatingActionButton.java
FloatingActionButton.animateVisibility
private void animateVisibility(final int visibility, final long duration) { if (visibilityAnimator != null) { visibilityAnimator.cancel(); } AnimatorListener listener = createVisibilityAnimatorListener(visibility); float targetScale = visibility == View.VISIBLE ? 1 : 0; ...
java
private void animateVisibility(final int visibility, final long duration) { if (visibilityAnimator != null) { visibilityAnimator.cancel(); } AnimatorListener listener = createVisibilityAnimatorListener(visibility); float targetScale = visibility == View.VISIBLE ? 1 : 0; ...
[ "private", "void", "animateVisibility", "(", "final", "int", "visibility", ",", "final", "long", "duration", ")", "{", "if", "(", "visibilityAnimator", "!=", "null", ")", "{", "visibilityAnimator", ".", "cancel", "(", ")", ";", "}", "AnimatorListener", "listen...
Animates changing the visibility of the floating action button. @param visibility The visibility, which should be set, as an {@link Integer} value. The visibility may be <code>View.VISIBLE</code>, <code>View.INVISIBLE</code> or <code>View.GONE</code> @param duration The duration of the animation in milliseconds as a {...
[ "Animates", "changing", "the", "visibility", "of", "the", "floating", "action", "button", "." ]
398421be462fe5793c7e3a9212949e06236a7c2f
https://github.com/michael-rapp/AndroidMaterialViews/blob/398421be462fe5793c7e3a9212949e06236a7c2f/library/src/main/java/de/mrapp/android/view/FloatingActionButton.java#L476-L488
valid
Animate the visibility of the view.
Of course, here is the Java code you requested: ```java private void animateVisibility(final int visibility, final long duration) { if (visibilityAnimator != null) { visibilityAnimator.cancel(); } AnimatorListener listener = createVisibilityAnimatorListener(visibility); flo...
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.compareTo
public static int compareTo(final byte [] left, final byte [] right) { return LexicographicalComparerHolder.BEST_COMPARER. compareTo(left, 0, left.length, right, 0, right.length); }
java
public static int compareTo(final byte [] left, final byte [] right) { return LexicographicalComparerHolder.BEST_COMPARER. compareTo(left, 0, left.length, right, 0, right.length); }
[ "public", "static", "int", "compareTo", "(", "final", "byte", "[", "]", "left", ",", "final", "byte", "[", "]", "right", ")", "{", "return", "LexicographicalComparerHolder", ".", "BEST_COMPARER", ".", "compareTo", "(", "left", ",", "0", ",", "left", ".", ...
Lexicographically compare two arrays. @param left left operand @param right right operand @return 0 if equal, < 0 if left is less than right, etc.
[ "Lexicographically", "compare", "two", "arrays", "." ]
5be6dffd7c79519d1211bb08f75be7dcfbbad392
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L758-L761
train
Compares two byte arrays.
Of course, here is the Java code you requested: ```java public static int compareTo(final byte [] left, final byte [] right) { return LexicographicalComparerHolder.BEST_COMPARER. compareTo(left, 0, left.length, right, 0, right.length); } ``` Hope this helps!
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/node/locate/KeyValueLocator.java
KeyValueLocator.handleNotEqualNodeSizes
private static boolean handleNotEqualNodeSizes(int configNodeSize, int actualNodeSize) { if (configNodeSize != actualNodeSize) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Node list and configuration's partition hosts sizes : {} <> {}, rescheduling", actualN...
java
private static boolean handleNotEqualNodeSizes(int configNodeSize, int actualNodeSize) { if (configNodeSize != actualNodeSize) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Node list and configuration's partition hosts sizes : {} <> {}, rescheduling", actualN...
[ "private", "static", "boolean", "handleNotEqualNodeSizes", "(", "int", "configNodeSize", ",", "int", "actualNodeSize", ")", "{", "if", "(", "configNodeSize", "!=", "actualNodeSize", ")", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG...
Helper method to handle potentially different node sizes in the actual list and in the config. @return true if they are not equal, false if they are.
[ "Helper", "method", "to", "handle", "potentially", "different", "node", "sizes", "in", "the", "actual", "list", "and", "in", "the", "config", "." ]
97f0427112c2168fee1d6499904f5fa0e24c6797
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/node/locate/KeyValueLocator.java#L283-L292
train
Handle not equal node sizes.
Of course, here is the Java code you requested: ```java private static boolean handleNotEqualNodeSizes(int configNodeSize, int actualNodeSize) { if (configNodeSize != actualNodeSize) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Node list and configuration's partition hosts sizes :...
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterTraining
public void getCharacterTraining(String API, String name, Callback<CharacterTraining> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterTraining(name, API).enqueue(callback); }
java
public void getCharacterTraining(String API, String name, Callback<CharacterTraining> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterTraining(name, API).enqueue(callback); }
[ "public", "void", "getCharacterTraining", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterTraining", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "("...
For more info on Character Training API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Training">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param API API key @param name chara...
[ "For", "more", "info", "on", "Character", "Training", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Training", ">", "here<", "/", "a", ">", "<br", "/", ...
c8a43b51f363b032074fb152ee6efe657e33e525
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L861-L864
train
Get Character Training
Of course, here is the Java code you requested: ```java public void getCharacterTraining(String API, String name, Callback<CharacterTraining> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterT...
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/UserManagedCacheBuilder.java
UserManagedCacheBuilder.using
public UserManagedCacheBuilder<K, V, T> using(ServiceCreationConfiguration<?> serviceConfiguration) { UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this); if (serviceConfiguration instanceof DefaultSizeOfEngineProviderConfiguration) { removeAnySizeOfEngine(otherBuilder); ...
java
public UserManagedCacheBuilder<K, V, T> using(ServiceCreationConfiguration<?> serviceConfiguration) { UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this); if (serviceConfiguration instanceof DefaultSizeOfEngineProviderConfiguration) { removeAnySizeOfEngine(otherBuilder); ...
[ "public", "UserManagedCacheBuilder", "<", "K", ",", "V", ",", "T", ">", "using", "(", "ServiceCreationConfiguration", "<", "?", ">", "serviceConfiguration", ")", "{", "UserManagedCacheBuilder", "<", "K", ",", "V", ",", "T", ">", "otherBuilder", "=", "new", "...
Adds a {@link ServiceCreationConfiguration}, to trigger a service loading and its configuration, to the returned builder. <p> Note that while {@link Service}s will be started upon {@link UserManagedCache} construction, no other lifecycle operations will be performed on them. It is the responsibility of the developer to...
[ "Adds", "a", "{", "@link", "ServiceCreationConfiguration", "}", "to", "trigger", "a", "service", "loading", "and", "its", "configuration", "to", "the", "returned", "builder", ".", "<p", ">", "Note", "that", "while", "{", "@link", "Service", "}", "s", "will",...
3cceda57185e522f8d241ddb75146d67ee2af898
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/UserManagedCacheBuilder.java#L816-L823
train
Create a new UserManagedCacheBuilder using the given ServiceCreationConfiguration
Of course, here is the Java code you requested: ```java public UserManagedCacheBuilder<K, V, T> using(ServiceCreationConfiguration<?> serviceConfiguration) { UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this); if (serviceConfiguration instanceof DefaultSizeOfEngineProviderConfi...
lastaflute/lasta-di
src/main/java/org/lastaflute/di/helper/message/MessageResourceBundleFactory.java
MessageResourceBundleFactory.calculateBundleNames
protected static String[] calculateBundleNames(String baseName, Locale locale) { int length = 1; boolean hasLanguage = locale.getLanguage().length() > 0; if (hasLanguage) { length++; } boolean hasCountry = locale.getCountry().length() > 0; if (hasCountry) { ...
java
protected static String[] calculateBundleNames(String baseName, Locale locale) { int length = 1; boolean hasLanguage = locale.getLanguage().length() > 0; if (hasLanguage) { length++; } boolean hasCountry = locale.getCountry().length() > 0; if (hasCountry) { ...
[ "protected", "static", "String", "[", "]", "calculateBundleNames", "(", "String", "baseName", ",", "Locale", "locale", ")", "{", "int", "length", "=", "1", ";", "boolean", "hasLanguage", "=", "locale", ".", "getLanguage", "(", ")", ".", "length", "(", ")",...
======================
[ "======================" ]
c4e123610c53a04cc836c5e456660e32d613447b
https://github.com/lastaflute/lasta-di/blob/c4e123610c53a04cc836c5e456660e32d613447b/src/main/java/org/lastaflute/di/helper/message/MessageResourceBundleFactory.java#L94-L140
train
Calculate the bundle names.
Of course, here is the Java code you requested: ```java protected static String[] calculateBundleNames(String baseName, Locale locale) { int length = 1; boolean hasLanguage = locale.getLanguage().length() > 0; if (hasLanguage) { length++; } boolean hasCountry = local...
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java
JAltGridScreen.setModel
public void setModel(TableModel model) { // Column 3 and 4: (Scroll Pane Headings) if (m_model != null) m_model.removeTableModelListener(this); m_model = model; if (model != null) model.addTableModelListener(this); this.setupPanel(); // setup a new panel ...
java
public void setModel(TableModel model) { // Column 3 and 4: (Scroll Pane Headings) if (m_model != null) m_model.removeTableModelListener(this); m_model = model; if (model != null) model.addTableModelListener(this); this.setupPanel(); // setup a new panel ...
[ "public", "void", "setModel", "(", "TableModel", "model", ")", "{", "// Column 3 and 4: (Scroll Pane Headings)", "if", "(", "m_model", "!=", "null", ")", "m_model", ".", "removeTableModelListener", "(", "this", ")", ";", "m_model", "=", "model", ";", "if", "(", ...
Set a (new) model. @param model The table model.
[ "Set", "a", "(", "new", ")", "model", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L158-L167
train
Set the table model for this table.
Of course, here is the Java code you requested: ```java public void setModel(TableModel model) { // Column 3 and 4: (Scroll Pane Headings) if (m_model != null) m_model.removeTableModelListener(this); m_model = model; if (model != null) model.addTableModelListener(thi...
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java
DisplaySingle.addSection
public void addSection(final Section SECTION) { sections.add(SECTION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
java
public void addSection(final Section SECTION) { sections.add(SECTION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
[ "public", "void", "addSection", "(", "final", "Section", "SECTION", ")", "{", "sections", ".", "add", "(", "SECTION", ")", ";", "init", "(", "getInnerBounds", "(", ")", ".", "width", ",", "getInnerBounds", "(", ")", ".", "height", ")", ";", "repaint", ...
Adds a given section to the list of sections The sections could be defined by a start value, a stop value and a color. One has to create a Section object from the class Section. The sections are stored in a ArrayList so there could be multiple. This might be a useful feature if you need to have exactly defined areas th...
[ "Adds", "a", "given", "section", "to", "the", "list", "of", "sections", "The", "sections", "could", "be", "defined", "by", "a", "start", "value", "a", "stop", "value", "and", "a", "color", ".", "One", "has", "to", "create", "a", "Section", "object", "f...
c2f7b45a477757ef21bbb6a1174ddedb2250ae57
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/DisplaySingle.java#L1209-L1213
train
Adds a new Section to the set of sections.
Of course, here is the Java code you requested: ```java public void addSection(final Section SECTION) { sections.add(SECTION); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceOrderPaymentUtil.java
CommerceOrderPaymentUtil.findByPrimaryKey
public static CommerceOrderPayment findByPrimaryKey( long commerceOrderPaymentId) throws com.liferay.commerce.exception.NoSuchOrderPaymentException { return getPersistence().findByPrimaryKey(commerceOrderPaymentId); }
java
public static CommerceOrderPayment findByPrimaryKey( long commerceOrderPaymentId) throws com.liferay.commerce.exception.NoSuchOrderPaymentException { return getPersistence().findByPrimaryKey(commerceOrderPaymentId); }
[ "public", "static", "CommerceOrderPayment", "findByPrimaryKey", "(", "long", "commerceOrderPaymentId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "exception", ".", "NoSuchOrderPaymentException", "{", "return", "getPersistence", "(", ")", ".", "findByP...
Returns the commerce order payment with the primary key or throws a {@link NoSuchOrderPaymentException} if it could not be found. @param commerceOrderPaymentId the primary key of the commerce order payment @return the commerce order payment @throws NoSuchOrderPaymentException if a commerce order payment with the prima...
[ "Returns", "the", "commerce", "order", "payment", "with", "the", "primary", "key", "or", "throws", "a", "{", "@link", "NoSuchOrderPaymentException", "}", "if", "it", "could", "not", "be", "found", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-api/src/main/java/com/liferay/commerce/service/persistence/CommerceOrderPaymentUtil.java#L343-L347
train
Returns the commerce order payment with the primary key.
Of course, here is the Java code you requested: ```java public static CommerceOrderPayment findByPrimaryKey( long commerceOrderPaymentId) throws com.liferay.commerce.exception.NoSuchOrderPaymentException { return getPersistence().findByPrimaryKey(commerceOrderPaymentId); } ``` Hope this helps!
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/datasource/ShardingDataSourceMetaData.java
ShardingDataSourceMetaData.getAllInstanceDataSourceNames
public Collection<String> getAllInstanceDataSourceNames() { Collection<String> result = new LinkedList<>(); for (Entry<String, DataSourceMetaData> entry : dataSourceMetaDataMap.entrySet()) { if (!isExisted(entry.getKey(), result)) { result.add(entry.getKey()); } ...
java
public Collection<String> getAllInstanceDataSourceNames() { Collection<String> result = new LinkedList<>(); for (Entry<String, DataSourceMetaData> entry : dataSourceMetaDataMap.entrySet()) { if (!isExisted(entry.getKey(), result)) { result.add(entry.getKey()); } ...
[ "public", "Collection", "<", "String", ">", "getAllInstanceDataSourceNames", "(", ")", "{", "Collection", "<", "String", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "Entry", "<", "String", ",", "DataSourceMetaData", ">", "entry"...
Get all instance data source names. @return instance data source names
[ "Get", "all", "instance", "data", "source", "names", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/datasource/ShardingDataSourceMetaData.java#L81-L89
train
Get all instance data source names.
Of course, here is the Java code you requested: ```java public Collection<String> getAllInstanceDataSourceNames() { Collection<String> result = new LinkedList<>(); for (Entry<String, DataSourceMetaData> entry : dataSourceMetaDataMap.entrySet()) { if (!isExisted(entry.getKey(), result)) { ...
aws/aws-sdk-java
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/NodeGroupConfiguration.java
NodeGroupConfiguration.withReplicaAvailabilityZones
public NodeGroupConfiguration withReplicaAvailabilityZones(String... replicaAvailabilityZones) { if (this.replicaAvailabilityZones == null) { setReplicaAvailabilityZones(new com.amazonaws.internal.SdkInternalList<String>(replicaAvailabilityZones.length)); } for (String ele : replicaA...
java
public NodeGroupConfiguration withReplicaAvailabilityZones(String... replicaAvailabilityZones) { if (this.replicaAvailabilityZones == null) { setReplicaAvailabilityZones(new com.amazonaws.internal.SdkInternalList<String>(replicaAvailabilityZones.length)); } for (String ele : replicaA...
[ "public", "NodeGroupConfiguration", "withReplicaAvailabilityZones", "(", "String", "...", "replicaAvailabilityZones", ")", "{", "if", "(", "this", ".", "replicaAvailabilityZones", "==", "null", ")", "{", "setReplicaAvailabilityZones", "(", "new", "com", ".", "amazonaws"...
<p> A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of <code>ReplicaCount</code> or <code>ReplicasPerNodeGroup</code> if not specified. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setRep...
[ "<p", ">", "A", "list", "of", "Availability", "Zones", "to", "be", "used", "for", "the", "read", "replicas", ".", "The", "number", "of", "Availability", "Zones", "in", "this", "list", "must", "match", "the", "value", "of", "<code", ">", "ReplicaCount<", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/NodeGroupConfiguration.java#L303-L311
train
Sets the replicaAvailabilityZones value for this NodeGroupConfiguration.
Of course, here is the Java code you requested: ```java public NodeGroupConfiguration withReplicaAvailabilityZones(String... replicaAvailabilityZones) { if (this.replicaAvailabilityZones == null) { setReplicaAvailabilityZones(new com.amazonaws.internal.SdkInternalList<String>(replicaAvailabilityZon...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/IfcDocumentInformationImpl.java
IfcDocumentInformationImpl.getIsPointer
@SuppressWarnings("unchecked") public EList<IfcDocumentInformationRelationship> getIsPointer() { return (EList<IfcDocumentInformationRelationship>) eGet( Ifc2x3tc1Package.Literals.IFC_DOCUMENT_INFORMATION__IS_POINTER, true); }
java
@SuppressWarnings("unchecked") public EList<IfcDocumentInformationRelationship> getIsPointer() { return (EList<IfcDocumentInformationRelationship>) eGet( Ifc2x3tc1Package.Literals.IFC_DOCUMENT_INFORMATION__IS_POINTER, true); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "EList", "<", "IfcDocumentInformationRelationship", ">", "getIsPointer", "(", ")", "{", "return", "(", "EList", "<", "IfcDocumentInformationRelationship", ">", ")", "eGet", "(", "Ifc2x3tc1Package", ".", "...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/IfcDocumentInformationImpl.java#L708-L712
train
Gets the named pointer.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public EList<IfcDocumentInformationRelationship> getIsPointer() { return (EList<IfcDocumentInformationRelationship>) eGet( Ifc2x3tc1Package.Literals.IFC_DOCUMENT_INFORMATION__IS_POINTER, true); } ``` Hope this helps!
Jasig/uPortal
uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java
AttributeSwapperHelperImpl.getSwappableAttributes
@Override public Set<String> getSwappableAttributes(ExternalContext externalContext) { final PortletRequest portletRequest = (PortletRequest) externalContext.getNativeRequest(); final PortletPreferences preferences = portletRequest.getPreferences(); final Set<String> swappableAttributes; ...
java
@Override public Set<String> getSwappableAttributes(ExternalContext externalContext) { final PortletRequest portletRequest = (PortletRequest) externalContext.getNativeRequest(); final PortletPreferences preferences = portletRequest.getPreferences(); final Set<String> swappableAttributes; ...
[ "@", "Override", "public", "Set", "<", "String", ">", "getSwappableAttributes", "(", "ExternalContext", "externalContext", ")", "{", "final", "PortletRequest", "portletRequest", "=", "(", "PortletRequest", ")", "externalContext", ".", "getNativeRequest", "(", ")", "...
/* (non-Javadoc) @see org.apereo.portal.portlets.swapper.IAttributeSwapperHelper#getSwappableAttributes(org.springframework.webflow.context.ExternalContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
c1986542abb9acd214268f2df21c6305ad2f262b
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/swapper/AttributeSwapperHelperImpl.java#L84-L129
train
Get the swappable attributes.
Of course, here is the Java code you requested: ```java @Override public Set<String> getSwappableAttributes(ExternalContext externalContext) { final PortletRequest portletRequest = (PortletRequest) externalContext.getNativeRequest(); final PortletPreferences preferences = portletRequest.getPreferen...
javamelody/javamelody
javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
PayloadNameRequestWrapper.parseSoapMethodName
private static String parseSoapMethodName(InputStream stream, String charEncoding) { try { // newInstance() et pas newFactory() pour java 1.5 (issue 367) final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); // disable DTDs entirely for th...
java
private static String parseSoapMethodName(InputStream stream, String charEncoding) { try { // newInstance() et pas newFactory() pour java 1.5 (issue 367) final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); // disable DTDs entirely for th...
[ "private", "static", "String", "parseSoapMethodName", "(", "InputStream", "stream", ",", "String", "charEncoding", ")", "{", "try", "{", "// newInstance() et pas newFactory() pour java 1.5 (issue 367)\r", "final", "XMLInputFactory", "factory", "=", "XMLInputFactory", ".", "...
Try to parse SOAP method name from request body stream. Does not close the stream. @param stream SOAP request body stream @nonnull @param charEncoding character encoding of stream, or null for platform default @null @return SOAP method name, or null if unable to parse @null
[ "Try", "to", "parse", "SOAP", "method", "name", "from", "request", "body", "stream", ".", "Does", "not", "close", "the", "stream", "." ]
18ad583ddeb5dcadd797dfda295409c6983ffd71
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java#L234-L274
train
Parses a SOAP method name from an input stream.
Of course, here is the Java code you requested: ```java private static String parseSoapMethodName(InputStream stream, String charEncoding) { try { // newInstance() et pas newFactory() pour java 1.5 (issue 367) final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFac...
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/markdown/Line.java
Line.skipSpaces
public boolean skipSpaces () { while (m_nPos < m_sValue.length () && m_sValue.charAt (m_nPos) == ' ') m_nPos++; return m_nPos < m_sValue.length (); }
java
public boolean skipSpaces () { while (m_nPos < m_sValue.length () && m_sValue.charAt (m_nPos) == ' ') m_nPos++; return m_nPos < m_sValue.length (); }
[ "public", "boolean", "skipSpaces", "(", ")", "{", "while", "(", "m_nPos", "<", "m_sValue", ".", "length", "(", ")", "&&", "m_sValue", ".", "charAt", "(", "m_nPos", ")", "==", "'", "'", ")", "m_nPos", "++", ";", "return", "m_nPos", "<", "m_sValue", "....
Skips spaces. @return <code>false</code> if end of line is reached
[ "Skips", "spaces", "." ]
f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/markdown/Line.java#L100-L105
train
Skips spaces in the value.
Of course, here is the Java code you requested: ```java public boolean skipSpaces () { while (m_nPos < m_sValue.length () && m_sValue.charAt (m_nPos) == ' ') m_nPos++; return m_nPos < m_sValue.length (); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-costandusagereport/src/main/java/com/amazonaws/services/costandusagereport/model/transform/DescribeReportDefinitionsRequestMarshaller.java
DescribeReportDefinitionsRequestMarshaller.marshall
public void marshall(DescribeReportDefinitionsRequest describeReportDefinitionsRequest, ProtocolMarshaller protocolMarshaller) { if (describeReportDefinitionsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMar...
java
public void marshall(DescribeReportDefinitionsRequest describeReportDefinitionsRequest, ProtocolMarshaller protocolMarshaller) { if (describeReportDefinitionsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMar...
[ "public", "void", "marshall", "(", "DescribeReportDefinitionsRequest", "describeReportDefinitionsRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "describeReportDefinitionsRequest", "==", "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-costandusagereport/src/main/java/com/amazonaws/services/costandusagereport/model/transform/DescribeReportDefinitionsRequestMarshaller.java#L44-L56
train
marshalls the given request to the JSON API.
Of course, here is the Java code you requested: ```java public void marshall(DescribeReportDefinitionsRequest describeReportDefinitionsRequest, ProtocolMarshaller protocolMarshaller) { if (describeReportDefinitionsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall...
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/RunningJobInstance.java
RunningJobInstance.endOfRunDb
void endOfRunDb() { DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); // Done: put inside history & remove instance from queue. History.create(cnx, this.ji, this.resultStatus, endDate); jqmlogger.trace("An History was just created for...
java
void endOfRunDb() { DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); // Done: put inside history & remove instance from queue. History.create(cnx, this.ji, this.resultStatus, endDate); jqmlogger.trace("An History was just created for...
[ "void", "endOfRunDb", "(", ")", "{", "DbConn", "cnx", "=", "null", ";", "try", "{", "cnx", "=", "Helpers", ".", "getNewDbSession", "(", ")", ";", "// Done: put inside history & remove instance from queue.", "History", ".", "create", "(", "cnx", ",", "this", "....
Part of the endOfRun process that needs the database. May be deferred if the database is not available.
[ "Part", "of", "the", "endOfRun", "process", "that", "needs", "the", "database", ".", "May", "be", "deferred", "if", "the", "database", "is", "not", "available", "." ]
391733b8e291404b97c714c3727a241c4a861f98
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/RunningJobInstance.java#L292-L314
train
End of run db analysis.
Of course, here is the Java code you requested: ```java void endOfRunDb() { DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); // Done: put inside history & remove instance from queue. History.create(cnx, this.ji, this.resultStatus, endDate); ...
maxschuster/Vaadin-SignatureField
vaadin-signaturefield/src/main/java/eu/maxschuster/vaadin/signaturefield/SignatureField.java
SignatureField.initExtension
private SignatureFieldExtension initExtension() { SignatureFieldExtension ext = new SignatureFieldExtension(this); ext.addSignatureChangeListener(new SignatureFieldExtension.SignatureChangeListener() { private static final long serialVersionUID = 1L; @Override ...
java
private SignatureFieldExtension initExtension() { SignatureFieldExtension ext = new SignatureFieldExtension(this); ext.addSignatureChangeListener(new SignatureFieldExtension.SignatureChangeListener() { private static final long serialVersionUID = 1L; @Override ...
[ "private", "SignatureFieldExtension", "initExtension", "(", ")", "{", "SignatureFieldExtension", "ext", "=", "new", "SignatureFieldExtension", "(", "this", ")", ";", "ext", ".", "addSignatureChangeListener", "(", "new", "SignatureFieldExtension", ".", "SignatureChangeList...
Creates the javascript extension used to communicate with the client-side. @return The extension of this field
[ "Creates", "the", "javascript", "extension", "used", "to", "communicate", "with", "the", "client", "-", "side", "." ]
b6f6b7042ea9c46060af54bd92d21770abfcccee
https://github.com/maxschuster/Vaadin-SignatureField/blob/b6f6b7042ea9c46060af54bd92d21770abfcccee/vaadin-signaturefield/src/main/java/eu/maxschuster/vaadin/signaturefield/SignatureField.java#L143-L160
train
init extension
Of course, here is the Java code you requested: ```java private SignatureFieldExtension initExtension() { SignatureFieldExtension ext = new SignatureFieldExtension(this); ext.addSignatureChangeListener(new SignatureFieldExtension.SignatureChangeListener() { private static final...
morfologik/morfologik-stemming
morfologik-fsa-builders/src/main/java/morfologik/fsa/builders/FSAUtils.java
FSAUtils.toDot
public static void toDot(Writer w, FSA fsa, int node) throws IOException { w.write("digraph Automaton {\n"); w.write(" rankdir = LR;\n"); final BitSet visited = new BitSet(); w.write(" stop [shape=doublecircle,label=\"\"];\n"); w.write(" initial [shape=plaintext,label=\"\"];\n"); w....
java
public static void toDot(Writer w, FSA fsa, int node) throws IOException { w.write("digraph Automaton {\n"); w.write(" rankdir = LR;\n"); final BitSet visited = new BitSet(); w.write(" stop [shape=doublecircle,label=\"\"];\n"); w.write(" initial [shape=plaintext,label=\"\"];\n"); w....
[ "public", "static", "void", "toDot", "(", "Writer", "w", ",", "FSA", "fsa", ",", "int", "node", ")", "throws", "IOException", "{", "w", ".", "write", "(", "\"digraph Automaton {\\n\"", ")", ";", "w", ".", "write", "(", "\" rankdir = LR;\\n\"", ")", ";", ...
Saves the right-language reachable from a given FSA node, formatted as an input for the graphviz package (expressed in the <code>dot</code> language), to the given writer. @param w The writer to write dot language description of the automaton. @param fsa The automaton to visualize. @param node Starting node (subgraph ...
[ "Saves", "the", "right", "-", "language", "reachable", "from", "a", "given", "FSA", "node", "formatted", "as", "an", "input", "for", "the", "graphviz", "package", "(", "expressed", "in", "the", "<code", ">", "dot<", "/", "code", ">", "language", ")", "to...
9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-fsa-builders/src/main/java/morfologik/fsa/builders/FSAUtils.java#L62-L74
train
Write a DOT representation of the node.
Of course, here is the Java code you requested: ```java public static void toDot(Writer w, FSA fsa, int node) throws IOException { w.write("digraph Automaton {\n"); w.write(" rankdir = LR;\n"); final BitSet visited = new BitSet(); w.write(" stop [shape=doublecircle,label=\"\"];\n"); w.wr...
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.getJobDetails
public Job getJobDetails(String teamName, String jobId) { return getJobDetailsWithServiceResponseAsync(teamName, jobId).toBlocking().single().body(); }
java
public Job getJobDetails(String teamName, String jobId) { return getJobDetailsWithServiceResponseAsync(teamName, jobId).toBlocking().single().body(); }
[ "public", "Job", "getJobDetails", "(", "String", "teamName", ",", "String", "jobId", ")", "{", "return", "getJobDetailsWithServiceResponseAsync", "(", "teamName", ",", "jobId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ")",...
Get the Job Details for a Job Id. @param teamName Your Team Name. @param jobId Id of the job. @throws IllegalArgumentException thrown if parameters fail the validation @throws APIErrorException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exceptions if the request fail...
[ "Get", "the", "Job", "Details", "for", "a", "Job", "Id", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L225-L227
train
Get the details of the specified job.
Of course, here is the Java code you requested: ```java public Job getJobDetails(String teamName, String jobId) { return getJobDetailsWithServiceResponseAsync(teamName, jobId).toBlocking().single().body(); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelProvider.java
SSLChannelProvider.updatedSslSupport
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "updatedSslSupport", props); } sslSupport = service; // If the default pid has changed.. we need to go hunting f...
java
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "updatedSslSupport", props); } sslSupport = service; // If the default pid has changed.. we need to go hunting f...
[ "protected", "void", "updatedSslSupport", "(", "SSLSupport", "service", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "...
This is called if the service is updated. @param ref reference to the service
[ "This", "is", "called", "if", "the", "service", "is", "updated", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelProvider.java#L216-L235
train
Update the sslSupport property.
Of course, here is the Java code you requested: ```java protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "updatedSslSupport", props); } sslSupport = service; //...
dlemmermann/CalendarFX
CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java
GoogleCalendarService.moveEntry
public GoogleEntry moveEntry(GoogleEntry entry, GoogleCalendar from, GoogleCalendar to) throws IOException { dao.events().move(from.getId(), entry.getId(), to.getId()).execute(); return entry; }
java
public GoogleEntry moveEntry(GoogleEntry entry, GoogleCalendar from, GoogleCalendar to) throws IOException { dao.events().move(from.getId(), entry.getId(), to.getId()).execute(); return entry; }
[ "public", "GoogleEntry", "moveEntry", "(", "GoogleEntry", "entry", ",", "GoogleCalendar", "from", ",", "GoogleCalendar", "to", ")", "throws", "IOException", "{", "dao", ".", "events", "(", ")", ".", "move", "(", "from", ".", "getId", "(", ")", ",", "entry"...
Moves an entry from one calendar to another. @param entry The entry to be moved. @param from The current calendar. @param to The future calendar. @return The entry updated. @throws IOException For unexpected errors.
[ "Moves", "an", "entry", "from", "one", "calendar", "to", "another", "." ]
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXGoogle/src/main/java/com/calendarfx/google/service/GoogleCalendarService.java#L140-L143
train
Move an entry from one calendar to another.
Of course, here is the Java code you requested: ```java public GoogleEntry moveEntry(GoogleEntry entry, GoogleCalendar from, GoogleCalendar to) throws IOException { dao.events().move(from.getId(), entry.getId(), to.getId()).execute(); return entry; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFindingFilters.java
AwsSecurityFindingFilters.setId
public void setId(java.util.Collection<StringFilter> id) { if (id == null) { this.id = null; return; } this.id = new java.util.ArrayList<StringFilter>(id); }
java
public void setId(java.util.Collection<StringFilter> id) { if (id == null) { this.id = null; return; } this.id = new java.util.ArrayList<StringFilter>(id); }
[ "public", "void", "setId", "(", "java", ".", "util", ".", "Collection", "<", "StringFilter", ">", "id", ")", "{", "if", "(", "id", "==", "null", ")", "{", "this", ".", "id", "=", "null", ";", "return", ";", "}", "this", ".", "id", "=", "new", "...
<p> The security findings provider-specific identifier for a finding. </p> @param id The security findings provider-specific identifier for a finding.
[ "<p", ">", "The", "security", "findings", "provider", "-", "specific", "identifier", "for", "a", "finding", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFindingFilters.java#L714-L721
train
Sets the value of the id property.
Of course, here is the Java code you requested: ```java public void setId(java.util.Collection<StringFilter> id) { if (id == null) { this.id = null; return; } this.id = new java.util.ArrayList<StringFilter>(id); } ``` Hope this helps!
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/classloader/AccessClassLoader.java
AccessClassLoader.get
public static final AccessClassLoader get(Class<?> typeToBeExtended) { ClassLoader loader = typeToBeExtended.getClassLoader(); return get(loader == null ? ClassLoader.getSystemClassLoader() : loader); }
java
public static final AccessClassLoader get(Class<?> typeToBeExtended) { ClassLoader loader = typeToBeExtended.getClassLoader(); return get(loader == null ? ClassLoader.getSystemClassLoader() : loader); }
[ "public", "static", "final", "AccessClassLoader", "get", "(", "Class", "<", "?", ">", "typeToBeExtended", ")", "{", "ClassLoader", "loader", "=", "typeToBeExtended", ".", "getClassLoader", "(", ")", ";", "return", "get", "(", "loader", "==", "null", "?", "Cl...
Creates a new instance using a suitable ClassLoader for the specified class @param typeToBeExtended The class to use to obtain a ClassLoader @return A new instance, or an existing instance if one already exists.
[ "Creates", "a", "new", "instance", "using", "a", "suitable", "ClassLoader", "for", "the", "specified", "class" ]
d55d0238395f0cb900531f1f08b4b2d87fa9a4f6
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/classloader/AccessClassLoader.java#L51-L55
train
Get the access class loader for the given class.
Of course, here is the Java code you requested: ```java public static final AccessClassLoader get(Class<?> typeToBeExtended) { ClassLoader loader = typeToBeExtended.getClassLoader(); return get(loader == null ? ClassLoader.getSystemClassLoader() : loader); } ``` Hope this helps!
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.toIdentityVariableName
public static String toIdentityVariableName(String varName) { char[] chars = varName.toCharArray(); long changes = 0; StringBuilder rtn = new StringBuilder(chars.length + 2); rtn.append("CF"); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z...
java
public static String toIdentityVariableName(String varName) { char[] chars = varName.toCharArray(); long changes = 0; StringBuilder rtn = new StringBuilder(chars.length + 2); rtn.append("CF"); for (int i = 0; i < chars.length; i++) { char c = chars[i]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z...
[ "public", "static", "String", "toIdentityVariableName", "(", "String", "varName", ")", "{", "char", "[", "]", "chars", "=", "varName", ".", "toCharArray", "(", ")", ";", "long", "changes", "=", "0", ";", "StringBuilder", "rtn", "=", "new", "StringBuilder", ...
translate a string to a valid identity variable name @param varName variable name template to translate @return translated variable name
[ "translate", "a", "string", "to", "a", "valid", "identity", "variable", "name" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L296-L313
train
Convert a string to an identity variable name.
Of course, here is the Java code you requested: ```java public static String toIdentityVariableName(String varName) { char[] chars = varName.toCharArray(); long changes = 0; StringBuilder rtn = new StringBuilder(chars.length + 2); rtn.append("CF"); for (int i = 0; i < chars.length; i++) { char c = chars[i]...
jbundle/jbundle
base/message/remote/src/main/java/org/jbundle/base/message/remote/StandardMessageResponseData.java
StandardMessageResponseData.init
public void init(MessageDataParent messageDataParent, String strKey) { if (strKey == null) strKey = STANDARD_MESSAGE_RESPONSE; super.init(messageDataParent, strKey); }
java
public void init(MessageDataParent messageDataParent, String strKey) { if (strKey == null) strKey = STANDARD_MESSAGE_RESPONSE; super.init(messageDataParent, strKey); }
[ "public", "void", "init", "(", "MessageDataParent", "messageDataParent", ",", "String", "strKey", ")", "{", "if", "(", "strKey", "==", "null", ")", "strKey", "=", "STANDARD_MESSAGE_RESPONSE", ";", "super", ".", "init", "(", "messageDataParent", ",", "strKey", ...
Init Method.
[ "Init", "Method", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/remote/src/main/java/org/jbundle/base/message/remote/StandardMessageResponseData.java#L41-L46
train
Initialize the record.
Of course, here is the Java code you requested: ```java public void init(MessageDataParent messageDataParent, String strKey) { if (strKey == null) strKey = STANDARD_MESSAGE_RESPONSE; super.init(messageDataParent, strKey); } ``` Hope this helps!
alkacon/opencms-core
src/org/opencms/search/CmsSearchIndex.java
CmsSearchIndex.indexSearcherUpdate
protected synchronized void indexSearcherUpdate() { IndexSearcher oldSearcher = m_indexSearcher; if ((oldSearcher != null) && (oldSearcher.getIndexReader() != null)) { // in case there is an index searcher available close it try { if (oldSearcher.getIndexReader()...
java
protected synchronized void indexSearcherUpdate() { IndexSearcher oldSearcher = m_indexSearcher; if ((oldSearcher != null) && (oldSearcher.getIndexReader() != null)) { // in case there is an index searcher available close it try { if (oldSearcher.getIndexReader()...
[ "protected", "synchronized", "void", "indexSearcherUpdate", "(", ")", "{", "IndexSearcher", "oldSearcher", "=", "m_indexSearcher", ";", "if", "(", "(", "oldSearcher", "!=", "null", ")", "&&", "(", "oldSearcher", ".", "getIndexReader", "(", ")", "!=", "null", "...
Reopens the index search reader for this index, required after the index has been changed.<p> @see #indexSearcherOpen(String)
[ "Reopens", "the", "index", "search", "reader", "for", "this", "index", "required", "after", "the", "index", "has", "been", "changed", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchIndex.java#L1842-L1864
train
Update the index searcher.
Of course, here is the Java code you requested: ```java protected synchronized void indexSearcherUpdate() { IndexSearcher oldSearcher = m_indexSearcher; if ((oldSearcher != null) && (oldSearcher.getIndexReader() != null)) { // in case there is an index searcher available close it ...
ops4j/org.ops4j.pax.web
pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/model/WebApp.java
WebApp.addLoginConfig
public void addLoginConfig(final WebAppLoginConfig webApploginConfig) { NullArgumentException .validateNotNull(webApploginConfig, "Login Config"); NullArgumentException.validateNotNull( webApploginConfig.getAuthMethod(), "Login Config Authorization Method"); // NullArgumentException.validateNotNull(lo...
java
public void addLoginConfig(final WebAppLoginConfig webApploginConfig) { NullArgumentException .validateNotNull(webApploginConfig, "Login Config"); NullArgumentException.validateNotNull( webApploginConfig.getAuthMethod(), "Login Config Authorization Method"); // NullArgumentException.validateNotNull(lo...
[ "public", "void", "addLoginConfig", "(", "final", "WebAppLoginConfig", "webApploginConfig", ")", "{", "NullArgumentException", ".", "validateNotNull", "(", "webApploginConfig", ",", "\"Login Config\"", ")", ";", "NullArgumentException", ".", "validateNotNull", "(", "webAp...
Adds a login config @param webApploginConfig
[ "Adds", "a", "login", "config" ]
9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/model/WebApp.java#L570-L579
train
Add a login config to the application.
Of course, here is the Java code you requested: ```java public void addLoginConfig(final WebAppLoginConfig webApploginConfig) { NullArgumentException .validateNotNull(webApploginConfig, "Login Config"); NullArgumentException.validateNotNull( webApploginConfig.getAuthMethod(), "Login Config Authorizatio...
borball/weixin-sdk
weixin-mp/src/main/java/com/riversoft/weixin/mp/user/Tags.java
Tags.getUserTags
public List<Integer> getUserTags(String openId) { String url = WxEndpoint.get("url.tag.user.gettag"); Map<String, Object> map = new HashMap<>(); map.put("openid", openId); String response = wxClient.post(url, JsonMapper.nonEmptyMapper().toJson(map)); TagIdsWrapper tagIdsWrap...
java
public List<Integer> getUserTags(String openId) { String url = WxEndpoint.get("url.tag.user.gettag"); Map<String, Object> map = new HashMap<>(); map.put("openid", openId); String response = wxClient.post(url, JsonMapper.nonEmptyMapper().toJson(map)); TagIdsWrapper tagIdsWrap...
[ "public", "List", "<", "Integer", ">", "getUserTags", "(", "String", "openId", ")", "{", "String", "url", "=", "WxEndpoint", ".", "get", "(", "\"url.tag.user.gettag\"", ")", ";", "Map", "<", "String", ",", "Object", ">", "map", "=", "new", "HashMap", "<>...
或者用户身上标签 @param openId openId @return
[ "或者用户身上标签" ]
32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-mp/src/main/java/com/riversoft/weixin/mp/user/Tags.java#L153-L160
train
Get a list of tag ids for a user
Of course, here is the Java code you requested: ```java public List<Integer> getUserTags(String openId) { String url = WxEndpoint.get("url.tag.user.gettag"); Map<String, Object> map = new HashMap<>(); map.put("openid", openId); String response = wxClient.post(url, JsonMapper.nonEmpt...
pavlospt/RxFile
rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java
RxFile.getPathFromUriForFileDocument
public static Observable<String> getPathFromUriForFileDocument(final Context context, final Uri contentUri) { return Observable.fromCallable(new Func0<String>() { @Override public String call() { String pathFound = null; Cursor cursor = context.getContentResolver().query(contentUri...
java
public static Observable<String> getPathFromUriForFileDocument(final Context context, final Uri contentUri) { return Observable.fromCallable(new Func0<String>() { @Override public String call() { String pathFound = null; Cursor cursor = context.getContentResolver().query(contentUri...
[ "public", "static", "Observable", "<", "String", ">", "getPathFromUriForFileDocument", "(", "final", "Context", "context", ",", "final", "Uri", "contentUri", ")", "{", "return", "Observable", ".", "fromCallable", "(", "new", "Func0", "<", "String", ">", "(", "...
/* Get path from Uri, for a FileDocument.
[ "/", "*", "Get", "path", "from", "Uri", "for", "a", "FileDocument", "." ]
54210b02631f4b27d31bea040eca86183136cf46
https://github.com/pavlospt/RxFile/blob/54210b02631f4b27d31bea040eca86183136cf46/rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java#L406-L424
train
Gets the path from the contentUri for a file document.
Of course, here is the Java code you requested: ```java public static Observable<String> getPathFromUriForFileDocument(final Context context, final Uri contentUri) { return Observable.fromCallable(new Func0<String>() { @Override public String call() { String pathFound = null; Curs...
project-ncl/pnc
build-coordinator/src/main/java/org/jboss/pnc/coordinator/builder/BuildTasksInitializer.java
BuildTasksInitializer.fillBuildTaskSet
private void fillBuildTaskSet( BuildSetTask buildSetTask, User user, Supplier<Integer> buildTaskIdProvider, ProductMilestone productMilestone, Set<BuildConfigurationAudited> toBuild, Set<BuildTask> alreadySubmittedBuildTasks, BuildOptio...
java
private void fillBuildTaskSet( BuildSetTask buildSetTask, User user, Supplier<Integer> buildTaskIdProvider, ProductMilestone productMilestone, Set<BuildConfigurationAudited> toBuild, Set<BuildTask> alreadySubmittedBuildTasks, BuildOptio...
[ "private", "void", "fillBuildTaskSet", "(", "BuildSetTask", "buildSetTask", ",", "User", "user", ",", "Supplier", "<", "Integer", ">", "buildTaskIdProvider", ",", "ProductMilestone", "productMilestone", ",", "Set", "<", "BuildConfigurationAudited", ">", "toBuild", ","...
Creates build tasks and sets up the appropriate dependency relations @param buildSetTask The build set task which will contain the build tasks. This must already have initialized the BuildConfigSet, BuildConfigSetRecord, Milestone, etc.
[ "Creates", "build", "tasks", "and", "sets", "up", "the", "appropriate", "dependency", "relations" ]
85743ca59d14cdf750d6daa8bd0a0a8be390a796
https://github.com/project-ncl/pnc/blob/85743ca59d14cdf750d6daa8bd0a0a8be390a796/build-coordinator/src/main/java/org/jboss/pnc/coordinator/builder/BuildTasksInitializer.java#L252-L297
valid
Fill build task set with build task
Of course, here is the Java code you requested: ```java private void fillBuildTaskSet( BuildSetTask buildSetTask, User user, Supplier<Integer> buildTaskIdProvider, ProductMilestone productMilestone, Set<BuildConfigurationAudited> toBuild, Set<Buil...
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java
InstanceGroupClient.aggregatedListInstanceGroups
@BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups( String project) { AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder().setProject(project).build(); return aggregatedListInstanceGroups(request); }
java
@BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups( String project) { AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder().setProject(project).build(); return aggregatedListInstanceGroups(request); }
[ "@", "BetaApi", "public", "final", "AggregatedListInstanceGroupsPagedResponse", "aggregatedListInstanceGroups", "(", "String", "project", ")", "{", "AggregatedListInstanceGroupsHttpRequest", "request", "=", "AggregatedListInstanceGroupsHttpRequest", ".", "newBuilder", "(", ")", ...
Retrieves the list of instance groups and sorts them by zone. <p>Sample code: <pre><code> try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(project.t...
[ "Retrieves", "the", "list", "of", "instance", "groups", "and", "sorts", "them", "by", "zone", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java#L321-L327
train
Gets the list of instance groups in the specified project.
Of course, here is the Java code you requested: ```java @BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups( String project) { AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder().setProject(project).build();...
google/closure-compiler
src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java
JsDocInfoParser.recordDescription
private JsDocToken recordDescription(JsDocToken token) { // Find marker's description (if applicable). if (jsdocBuilder.shouldParseDocumentation()) { ExtractionInfo descriptionInfo = extractMultilineTextualBlock(token); token = descriptionInfo.token; } else { token = eatTokensUntilEOL(toke...
java
private JsDocToken recordDescription(JsDocToken token) { // Find marker's description (if applicable). if (jsdocBuilder.shouldParseDocumentation()) { ExtractionInfo descriptionInfo = extractMultilineTextualBlock(token); token = descriptionInfo.token; } else { token = eatTokensUntilEOL(toke...
[ "private", "JsDocToken", "recordDescription", "(", "JsDocToken", "token", ")", "{", "// Find marker's description (if applicable).", "if", "(", "jsdocBuilder", ".", "shouldParseDocumentation", "(", ")", ")", "{", "ExtractionInfo", "descriptionInfo", "=", "extractMultilineTe...
Records a marker's description if there is one available and record it in the current marker.
[ "Records", "a", "marker", "s", "description", "if", "there", "is", "one", "available", "and", "record", "it", "in", "the", "current", "marker", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java#L1285-L1294
train
Records the description of a JSDoc token.
Of course, here is the Java code you requested: ```java private JsDocToken recordDescription(JsDocToken token) { // Find marker's description (if applicable). if (jsdocBuilder.shouldParseDocumentation()) { ExtractionInfo descriptionInfo = extractMultilineTextualBlock(token); token = descriptionInfo...
threerings/narya
core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java
NodeRepository.loadNodes
public List<NodeRecord> loadNodes (String namespace, boolean includeShutdown) { // we specifically avoid caching this query because we want the servers to always see the // most up to date set of nodes Query<NodeRecord> query = from(NodeRecord.class).noCache(); List<SQLExpression<?>>...
java
public List<NodeRecord> loadNodes (String namespace, boolean includeShutdown) { // we specifically avoid caching this query because we want the servers to always see the // most up to date set of nodes Query<NodeRecord> query = from(NodeRecord.class).noCache(); List<SQLExpression<?>>...
[ "public", "List", "<", "NodeRecord", ">", "loadNodes", "(", "String", "namespace", ",", "boolean", "includeShutdown", ")", "{", "// we specifically avoid caching this query because we want the servers to always see the", "// most up to date set of nodes", "Query", "<", "NodeRecor...
Returns a list of all nodes registered in the repository with names starting with the given string, optionally including nodes that are explicitly shut down.
[ "Returns", "a", "list", "of", "all", "nodes", "registered", "in", "the", "repository", "with", "names", "starting", "with", "the", "given", "string", "optionally", "including", "nodes", "that", "are", "explicitly", "shut", "down", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRepository.java#L78-L91
train
Load nodes from the database.
Of course, here is the Java code you requested: ```java public List<NodeRecord> loadNodes (String namespace, boolean includeShutdown) { // we specifically avoid caching this query because we want the servers to always see the // most up to date set of nodes Query<NodeRecord> query = from(No...
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/filetype/FileType.java
FileType.getFormatVersion
public static String getFormatVersion(File filename) { final ContentFileTypeMap map = ensureContentTypeManager(); return map.getFormatVersion(filename); }
java
public static String getFormatVersion(File filename) { final ContentFileTypeMap map = ensureContentTypeManager(); return map.getFormatVersion(filename); }
[ "public", "static", "String", "getFormatVersion", "(", "File", "filename", ")", "{", "final", "ContentFileTypeMap", "map", "=", "ensureContentTypeManager", "(", ")", ";", "return", "map", ".", "getFormatVersion", "(", "filename", ")", ";", "}" ]
Replies the version of the format of the given file. @param filename is the name of the file to test. @return the format version for the given file.
[ "Replies", "the", "version", "of", "the", "format", "of", "the", "given", "file", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/filetype/FileType.java#L124-L127
train
Gets the format version of the given file.
Of course, here is the Java code you requested: ```java public static String getFormatVersion(File filename) { final ContentFileTypeMap map = ensureContentTypeManager(); return map.getFormatVersion(filename); } ``` Hope this helps!
wildfly/wildfly
jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/ResteasyDeploymentData.java
ResteasyDeploymentData.merge
public void merge(final List<ResteasyDeploymentData> deploymentData) throws DeploymentUnitProcessingException { for (ResteasyDeploymentData data : deploymentData) { scannedApplicationClasses.addAll(data.getScannedApplicationClasses()); if (scanResources) { scannedResource...
java
public void merge(final List<ResteasyDeploymentData> deploymentData) throws DeploymentUnitProcessingException { for (ResteasyDeploymentData data : deploymentData) { scannedApplicationClasses.addAll(data.getScannedApplicationClasses()); if (scanResources) { scannedResource...
[ "public", "void", "merge", "(", "final", "List", "<", "ResteasyDeploymentData", ">", "deploymentData", ")", "throws", "DeploymentUnitProcessingException", "{", "for", "(", "ResteasyDeploymentData", "data", ":", "deploymentData", ")", "{", "scannedApplicationClasses", "....
Merges a list of additional JAX-RS deployment data with this lot of deployment data. @param deploymentData
[ "Merges", "a", "list", "of", "additional", "JAX", "-", "RS", "deployment", "data", "with", "this", "lot", "of", "deployment", "data", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/ResteasyDeploymentData.java#L53-L64
test
Merge the deployment data into this one.
Of course, here is the Java code you requested: ```java public void merge(final List<ResteasyDeploymentData> deploymentData) throws DeploymentUnitProcessingException { for (ResteasyDeploymentData data : deploymentData) { scannedApplicationClasses.addAll(data.getScannedApplicationClasses()); ...
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowController.java
PageFlowController.ensureFailover
public void ensureFailover( HttpServletRequest request ) { // // remove() puts the pageflow instance into a request attribute. Make sure not to re-save this // instance if it's being removed. Also, if the session is null (after having been invalidated // by the user), don't recreat...
java
public void ensureFailover( HttpServletRequest request ) { // // remove() puts the pageflow instance into a request attribute. Make sure not to re-save this // instance if it's being removed. Also, if the session is null (after having been invalidated // by the user), don't recreat...
[ "public", "void", "ensureFailover", "(", "HttpServletRequest", "request", ")", "{", "//", "// remove() puts the pageflow instance into a request attribute. Make sure not to re-save this", "// instance if it's being removed. Also, if the session is null (after having been invalidated", "// by...
<p> Ensure that any changes to this object will be replicated in a cluster (for failover), even if the replication scheme uses a change-detection algorithm that relies on {@link javax.servlet.http.HttpSession#setAttribute(String, Object)} to be aware of changes. This method is used by the framework and should not be c...
[ "<p", ">", "Ensure", "that", "any", "changes", "to", "this", "object", "will", "be", "replicated", "in", "a", "cluster", "(", "for", "failover", ")", "even", "if", "the", "replication", "scheme", "uses", "a", "change", "-", "detection", "algorithm", "that"...
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowController.java#L259-L294
train
Ensure failover for this Page Flow.
Of course, here is the Java code you requested: ```java public void ensureFailover( HttpServletRequest request ) { // // remove() puts the pageflow instance into a request attribute. Make sure not to re-save this // instance if it's being removed. Also, if the session is null (after havin...
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Changes.java
Changes.getChanges
public ChangesResult getChanges() { final URI uri = this.databaseHelper.changesUri("feed", "normal"); return client.get(uri, ChangesResult.class); }
java
public ChangesResult getChanges() { final URI uri = this.databaseHelper.changesUri("feed", "normal"); return client.get(uri, ChangesResult.class); }
[ "public", "ChangesResult", "getChanges", "(", ")", "{", "final", "URI", "uri", "=", "this", ".", "databaseHelper", ".", "changesUri", "(", "\"feed\"", ",", "\"normal\"", ")", ";", "return", "client", ".", "get", "(", "uri", ",", "ChangesResult", ".", "clas...
Requests Change notifications of feed type normal. @return {@link ChangesResult} encapsulating the normal feed changes
[ "Requests", "Change", "notifications", "of", "feed", "type", "normal", "." ]
42c438654945361bded2cc0827afc046d535b31b
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Changes.java#L151-L154
train
Get changes.
Of course, here is the Java code you requested: ```java public ChangesResult getChanges() { final URI uri = this.databaseHelper.changesUri("feed", "normal"); return client.get(uri, ChangesResult.class); } ``` Hope this helps!
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/user/db/UserFilter.java
UserFilter.setupDefaultView
public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { UserInfo user = (UserInfo)this.makeReferenceRecord(); user.addListener(new StringSubFileFilter(Integer.toString(UserGroup.RES_USER)...
java
public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { UserInfo user = (UserInfo)this.makeReferenceRecord(); user.addListener(new StringSubFileFilter(Integer.toString(UserGroup.RES_USER)...
[ "public", "ScreenComponent", "setupDefaultView", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "targetScreen", ",", "Convert", "converter", ",", "int", "iDisplayFieldDesc", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "UserInfo",...
Set up the default screen control for this field. @param itsLocation Location of this component on screen (ie., GridBagConstraint). @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). @param converter The converter to set the screenfield to. @param iDisplayFieldDesc Display the labe...
[ "Set", "up", "the", "default", "screen", "control", "for", "this", "field", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/UserFilter.java#L74-L89
train
Set up the default screen.
Of course, here is the Java code you requested: ```java public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { UserInfo user = (UserInfo)this.makeReferenceRecord(); user.addListener(new...
liyiorg/weixin-popular
src/main/java/weixin/popular/api/ScanAPI.java
ScanAPI.productClear
public static BaseResult productClear(String accessToken, ProductGet productGet) { return productClear(accessToken, JsonUtil.toJSONString(productGet)); }
java
public static BaseResult productClear(String accessToken, ProductGet productGet) { return productClear(accessToken, JsonUtil.toJSONString(productGet)); }
[ "public", "static", "BaseResult", "productClear", "(", "String", "accessToken", ",", "ProductGet", "productGet", ")", "{", "return", "productClear", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "productGet", ")", ")", ";", "}" ]
清除商品信息 @param accessToken accessToken @param productGet productGet @return BaseResult
[ "清除商品信息" ]
c64255292d41463bdb671938feaabf42a335d82c
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/ScanAPI.java#L249-L251
train
Perform a Product Clear API call with the specified access token and product get.
Of course, here is the Java code you requested: ```java public static BaseResult productClear(String accessToken, ProductGet productGet) { return productClear(accessToken, JsonUtil.toJSONString(productGet)); } ``` Hope this helps!
flow/nbt
src/main/java/com/flowpowered/nbt/stream/NBTOutputStream.java
NBTOutputStream.writeCompoundTagPayload
private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? }
java
private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? }
[ "private", "void", "writeCompoundTagPayload", "(", "CompoundTag", "tag", ")", "throws", "IOException", "{", "for", "(", "Tag", "<", "?", ">", "childTag", ":", "tag", ".", "getValue", "(", ")", ".", "values", "(", ")", ")", "{", "writeTag", "(", "childTag...
Writes a {@code TAG_Compound} tag. @param tag The tag. @throws java.io.IOException if an I/O error occurs.
[ "Writes", "a", "{", "@code", "TAG_Compound", "}", "tag", "." ]
7a1b6d986e6fbd01862356d47827b8b357349a22
https://github.com/flow/nbt/blob/7a1b6d986e6fbd01862356d47827b8b357349a22/src/main/java/com/flowpowered/nbt/stream/NBTOutputStream.java#L207-L212
train
Write compound tag payload.
Of course, here is the Java code you requested: ```java private void writeCompoundTagPayload(CompoundTag tag) throws IOException { for (Tag<?> childTag : tag.getValue().values()) { writeTag(childTag); } os.writeByte(TagType.TAG_END.getId()); // end tag - better way? } ``` Hope ...
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.optLong
public long optLong( String key, long defaultValue ) { verifyIsNull(); try{ return getLong( key ); }catch( Exception e ){ return defaultValue; } }
java
public long optLong( String key, long defaultValue ) { verifyIsNull(); try{ return getLong( key ); }catch( Exception e ){ return defaultValue; } }
[ "public", "long", "optLong", "(", "String", "key", ",", "long", "defaultValue", ")", "{", "verifyIsNull", "(", ")", ";", "try", "{", "return", "getLong", "(", "key", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "defaultValue", ";"...
Get an optional long value associated with a key, or the default if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. @param key A key string. @param defaultValue The default. @return An object which is the value.
[ "Get", "an", "optional", "long", "value", "associated", "with", "a", "key", "or", "the", "default", "if", "there", "is", "no", "such", "key", "or", "if", "the", "value", "is", "not", "a", "number", ".", "If", "the", "value", "is", "a", "string", "an"...
9e2b3376ee8f511a48aa7ac05f75a7414e02280f
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L2259-L2266
train
Get the value associated with a key as a long. The defaultValue is returned if the key is null.
Of course, here is the Java code you requested: ```java public long optLong( String key, long defaultValue ) { verifyIsNull(); try{ return getLong( key ); }catch( Exception e ){ return defaultValue; } } ``` Hope this helps!
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeBatchAndWait
public static List<Response> executeBatchAndWait(RequestBatch requests) { Validate.notEmptyAndContainsNoNulls(requests, "requests"); HttpURLConnection connection = null; try { connection = toHttpConnection(requests); } catch (Exception ex) { List<Response> respon...
java
public static List<Response> executeBatchAndWait(RequestBatch requests) { Validate.notEmptyAndContainsNoNulls(requests, "requests"); HttpURLConnection connection = null; try { connection = toHttpConnection(requests); } catch (Exception ex) { List<Response> respon...
[ "public", "static", "List", "<", "Response", ">", "executeBatchAndWait", "(", "RequestBatch", "requests", ")", "{", "Validate", ".", "notEmptyAndContainsNoNulls", "(", "requests", ",", "\"requests\"", ")", ";", "HttpURLConnection", "connection", "=", "null", ";", ...
Executes requests on the current thread as a single batch and returns the responses. <p/> This should only be used if you have transitioned off the UI thread. @param requests the batch of Requests to execute @return a list of Response objects representing the results of the requests; responses are returned in the sam...
[ "Executes", "requests", "on", "the", "current", "thread", "as", "a", "single", "batch", "and", "returns", "the", "responses", ".", "<p", "/", ">", "This", "should", "only", "be", "used", "if", "you", "have", "transitioned", "off", "the", "UI", "thread", ...
ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1440-L1454
train
Execute a batch of requests and wait for the response.
Of course, here is the Java code you requested: ```java public static List<Response> executeBatchAndWait(RequestBatch requests) { Validate.notEmptyAndContainsNoNulls(requests, "requests"); HttpURLConnection connection = null; try { connection = toHttpConnection(requests); }...
aws/aws-sdk-java
aws-java-sdk-datasync/src/main/java/com/amazonaws/services/datasync/model/ListTaskExecutionsResult.java
ListTaskExecutionsResult.withTaskExecutions
public ListTaskExecutionsResult withTaskExecutions(TaskExecutionListEntry... taskExecutions) { if (this.taskExecutions == null) { setTaskExecutions(new java.util.ArrayList<TaskExecutionListEntry>(taskExecutions.length)); } for (TaskExecutionListEntry ele : taskExecutions) { ...
java
public ListTaskExecutionsResult withTaskExecutions(TaskExecutionListEntry... taskExecutions) { if (this.taskExecutions == null) { setTaskExecutions(new java.util.ArrayList<TaskExecutionListEntry>(taskExecutions.length)); } for (TaskExecutionListEntry ele : taskExecutions) { ...
[ "public", "ListTaskExecutionsResult", "withTaskExecutions", "(", "TaskExecutionListEntry", "...", "taskExecutions", ")", "{", "if", "(", "this", ".", "taskExecutions", "==", "null", ")", "{", "setTaskExecutions", "(", "new", "java", ".", "util", ".", "ArrayList", ...
<p> A list of executed tasks. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setTaskExecutions(java.util.Collection)} or {@link #withTaskExecutions(java.util.Collection)} if you want to override the existing values. </p> @param taskExecutions A list of executed tasks. @...
[ "<p", ">", "A", "list", "of", "executed", "tasks", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", ".", "Use",...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-datasync/src/main/java/com/amazonaws/services/datasync/model/ListTaskExecutionsResult.java#L87-L95
train
A list of TaskExecutionListEntry objects.
Of course, here is the Java code you requested: ```java public ListTaskExecutionsResult withTaskExecutions(TaskExecutionListEntry... taskExecutions) { if (this.taskExecutions == null) { setTaskExecutions(new java.util.ArrayList<TaskExecutionListEntry>(taskExecutions.length)); } for ...
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRootValue.java
PactDslRootValue.timestamp
public static PactDslRootValue timestamp(String format) { PactDslRootValue value = new PactDslRootValue(); value.generators.addGenerator(Category.BODY, "", new DateTimeGenerator(format)); FastDateFormat instance = FastDateFormat.getInstance(format); value.setValue(instance.format(new Date(DATE_2000))); ...
java
public static PactDslRootValue timestamp(String format) { PactDslRootValue value = new PactDslRootValue(); value.generators.addGenerator(Category.BODY, "", new DateTimeGenerator(format)); FastDateFormat instance = FastDateFormat.getInstance(format); value.setValue(instance.format(new Date(DATE_2000))); ...
[ "public", "static", "PactDslRootValue", "timestamp", "(", "String", "format", ")", "{", "PactDslRootValue", "value", "=", "new", "PactDslRootValue", "(", ")", ";", "value", ".", "generators", ".", "addGenerator", "(", "Category", ".", "BODY", ",", "\"\"", ",",...
Value that must match the given timestamp format @param format timestamp format
[ "Value", "that", "must", "match", "the", "given", "timestamp", "format" ]
2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRootValue.java#L430-L437
train
Creates a value representing a timestamp in the given format.
Of course, here is the Java code you requested: ```java public static PactDslRootValue timestamp(String format) { PactDslRootValue value = new PactDslRootValue(); value.generators.addGenerator(Category.BODY, "", new DateTimeGenerator(format)); FastDateFormat instance = FastDateFormat.getInstance(format); ...
beangle/beangle3
commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/DefaultModelMeta.java
DefaultModelMeta.newInstance
public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) { EntityType type = getEntityType(clazz); @SuppressWarnings("unchecked") T entity = (T) type.newInstance(); try { PropertyUtils.setProperty(entity, type.getIdName(), id); } catch (Exception ...
java
public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) { EntityType type = getEntityType(clazz); @SuppressWarnings("unchecked") T entity = (T) type.newInstance(); try { PropertyUtils.setProperty(entity, type.getIdName(), id); } catch (Exception ...
[ "public", "<", "T", "extends", "Entity", "<", "ID", ">", ",", "ID", "extends", "Serializable", ">", "T", "newInstance", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "ID", "id", ")", "{", "EntityType", "type", "=", "getEntityType", "(", ...
<p> newInstance. </p> @param clazz a {@link java.lang.Class} object. @param id a {@link java.io.Serializable} object. @param <T> a T object. @return a T object.
[ "<p", ">", "newInstance", ".", "<", "/", "p", ">" ]
33df2873a5f38e28ac174a1d3b8144eb2f808e64
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/entity/metadata/impl/DefaultModelMeta.java#L70-L80
train
Creates a new entity with the specified id.
Of course, here is the Java code you requested: ```java public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) { EntityType type = getEntityType(clazz); @SuppressWarnings("unchecked") T entity = (T) type.newInstance(); try { PropertyUtils.setProper...
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/roles/AbstractAppender.java
AbstractAppender.failAttempt
protected void failAttempt(RaftMemberContext member, RaftRequest request, Throwable error) { // If any append error occurred, increment the failure count for the member. Log the first three failures, // and thereafter log 1% of the failures. This keeps the log from filling up with annoying error messages //...
java
protected void failAttempt(RaftMemberContext member, RaftRequest request, Throwable error) { // If any append error occurred, increment the failure count for the member. Log the first three failures, // and thereafter log 1% of the failures. This keeps the log from filling up with annoying error messages //...
[ "protected", "void", "failAttempt", "(", "RaftMemberContext", "member", ",", "RaftRequest", "request", ",", "Throwable", "error", ")", "{", "// If any append error occurred, increment the failure count for the member. Log the first three failures,", "// and thereafter log 1% of the fai...
Fails an attempt to contact a member.
[ "Fails", "an", "attempt", "to", "contact", "a", "member", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/AbstractAppender.java#L273-L281
train
Logs the failure of the request.
Of course, here is the Java code you requested: ```java protected void failAttempt(RaftMemberContext member, RaftRequest request, Throwable error) { // If any append error occurred, increment the failure count for the member. Log the first three failures, // and thereafter log 1% of the failures. This keeps th...
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFSearcher.java
SIFSearcher.searchSIFGetMatrix
public AdjacencyMatrix searchSIFGetMatrix(Model model) { Set<SIFInteraction> sifInts = searchSIF(model); return new AdjacencyMatrix( SIFInteraction.convertToAdjacencyMatrix(sifInts), SIFInteraction.getSortedGeneNames(sifInts)); }
java
public AdjacencyMatrix searchSIFGetMatrix(Model model) { Set<SIFInteraction> sifInts = searchSIF(model); return new AdjacencyMatrix( SIFInteraction.convertToAdjacencyMatrix(sifInts), SIFInteraction.getSortedGeneNames(sifInts)); }
[ "public", "AdjacencyMatrix", "searchSIFGetMatrix", "(", "Model", "model", ")", "{", "Set", "<", "SIFInteraction", ">", "sifInts", "=", "searchSIF", "(", "model", ")", ";", "return", "new", "AdjacencyMatrix", "(", "SIFInteraction", ".", "convertToAdjacencyMatrix", ...
Searches the given model with the contained miners. @param model model to search @return sif interactions
[ "Searches", "the", "given", "model", "with", "the", "contained", "miners", "." ]
2f93afa94426bf8b5afc2e0e61cd4b269a83288d
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFSearcher.java#L134-L140
train
Search for a SIF matrix.
Of course, here is the Java code you requested: ```java public AdjacencyMatrix searchSIFGetMatrix(Model model) { Set<SIFInteraction> sifInts = searchSIF(model); return new AdjacencyMatrix( SIFInteraction.convertToAdjacencyMatrix(sifInts), SIFInteraction.getSortedGeneNames(sifInts)); } ``` Hope this helps!
voldemort/voldemort
src/java/voldemort/client/scheduler/AsyncMetadataVersionManager.java
AsyncMetadataVersionManager.fetchNewVersion
public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) { try { Long newVersion = getCurrentVersion(versionKey, versionProps); // If version obtained is null, the store is untouched. Continue if(newVersion != null) { logger.de...
java
public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) { try { Long newVersion = getCurrentVersion(versionKey, versionProps); // If version obtained is null, the store is untouched. Continue if(newVersion != null) { logger.de...
[ "public", "Long", "fetchNewVersion", "(", "String", "versionKey", ",", "Long", "curVersion", ",", "Properties", "versionProps", ")", "{", "try", "{", "Long", "newVersion", "=", "getCurrentVersion", "(", "versionKey", ",", "versionProps", ")", ";", "// If version o...
/* This method checks for any update in the version for 'versionKey'. If there is any change, it returns the new version. Otherwise it will return a null.
[ "/", "*", "This", "method", "checks", "for", "any", "update", "in", "the", "version", "for", "versionKey", ".", "If", "there", "is", "any", "change", "it", "returns", "the", "new", "version", ".", "Otherwise", "it", "will", "return", "a", "null", "." ]
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/scheduler/AsyncMetadataVersionManager.java#L111-L138
train
Fetch the new version of the metadata.
Of course, here is the Java code you requested: ```java public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) { try { Long newVersion = getCurrentVersion(versionKey, versionProps); // If version obtained is null, the store is untouched. Continue ...
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java
DataColumnConstraintsDao.update
@Override public int update(DataColumnConstraints dataColumnConstraints) throws SQLException { UpdateBuilder<DataColumnConstraints, Void> ub = updateBuilder(); ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN, dataColumnConstraints.getMin()); ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN_IS_...
java
@Override public int update(DataColumnConstraints dataColumnConstraints) throws SQLException { UpdateBuilder<DataColumnConstraints, Void> ub = updateBuilder(); ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN, dataColumnConstraints.getMin()); ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN_IS_...
[ "@", "Override", "public", "int", "update", "(", "DataColumnConstraints", "dataColumnConstraints", ")", "throws", "SQLException", "{", "UpdateBuilder", "<", "DataColumnConstraints", ",", "Void", ">", "ub", "=", "updateBuilder", "(", ")", ";", "ub", ".", "updateCol...
{@inheritDoc} Update using the unique columns
[ "{", "@inheritDoc", "}" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsDao.java#L158-L182
train
Updates the database record in the database.
Of course, here is the Java code you requested: ```java @Override public int update(DataColumnConstraints dataColumnConstraints) throws SQLException { UpdateBuilder<DataColumnConstraints, Void> ub = updateBuilder(); ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN, dataColumnConstraints.getMin()); ...
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java
FileOperations.listFilesFromTask
public PagedList<NodeFile> listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { FileListFromTaskOptions options = new FileListFromTaskOptions(); BehaviorManager bhMgr = new ...
java
public PagedList<NodeFile> listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { FileListFromTaskOptions options = new FileListFromTaskOptions(); BehaviorManager bhMgr = new ...
[ "public", "PagedList", "<", "NodeFile", ">", "listFilesFromTask", "(", "String", "jobId", ",", "String", "taskId", ",", "Boolean", "recursive", ",", "DetailLevel", "detailLevel", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws",...
Lists the files in the specified task's directory on its compute node. @param jobId The ID of the job. @param taskId The ID of the task. @param recursive If true, performs a recursive list of all files of the task. If false or null, returns only the files in the root task directory. @param detailLevel A {@link DetailL...
[ "Lists", "the", "files", "in", "the", "specified", "task", "s", "directory", "on", "its", "compute", "node", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java#L104-L111
train
Gets a list of node files from the specified task.
Of course, here is the Java code you requested: ```java public PagedList<NodeFile> listFilesFromTask(String jobId, String taskId, Boolean recursive, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { FileListFromTaskOptions options = new FileLi...
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.buildAliasKey
private String buildAliasKey(String aPath, List hintClasses) { if (hintClasses == null || hintClasses.isEmpty()) { return aPath; } StringBuffer buf = new StringBuffer(aPath); for (Iterator iter = hintClasses.iterator(); iter.hasNext();) {...
java
private String buildAliasKey(String aPath, List hintClasses) { if (hintClasses == null || hintClasses.isEmpty()) { return aPath; } StringBuffer buf = new StringBuffer(aPath); for (Iterator iter = hintClasses.iterator(); iter.hasNext();) {...
[ "private", "String", "buildAliasKey", "(", "String", "aPath", ",", "List", "hintClasses", ")", "{", "if", "(", "hintClasses", "==", "null", "||", "hintClasses", ".", "isEmpty", "(", ")", ")", "{", "return", "aPath", ";", "}", "StringBuffer", "buf", "=", ...
Build the key for the TableAlias based on the path and the hints @param aPath @param hintClasses @return the key for the TableAlias
[ "Build", "the", "key", "for", "the", "TableAlias", "based", "on", "the", "path", "and", "the", "hints" ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L1381-L1396
train
Build alias key.
Of course, here is the Java code you requested: ```java private String buildAliasKey(String aPath, List hintClasses) { if (hintClasses == null || hintClasses.isEmpty()) { return aPath; } StringBuffer buf = new StringBuffer(aPath); for (Iterator i...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java
BasicDurationFormatterFactory.setFallback
@Override public DurationFormatterFactory setFallback(DateFormatter fallback) { boolean doReset = fallback == null ? this.fallback != null : !fallback.equals(this.fallback); if (doReset) { this.fallback = fallback; reset(); } return this; }
java
@Override public DurationFormatterFactory setFallback(DateFormatter fallback) { boolean doReset = fallback == null ? this.fallback != null : !fallback.equals(this.fallback); if (doReset) { this.fallback = fallback; reset(); } return this; }
[ "@", "Override", "public", "DurationFormatterFactory", "setFallback", "(", "DateFormatter", "fallback", ")", "{", "boolean", "doReset", "=", "fallback", "==", "null", "?", "this", ".", "fallback", "!=", "null", ":", "!", "fallback", ".", "equals", "(", "this",...
Set a fallback formatter for durations over a given limit. @param fallback the fallback formatter to use, or null @return this BasicDurationFormatterFactory
[ "Set", "a", "fallback", "formatter", "for", "durations", "over", "a", "given", "limit", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L83-L93
train
Set the fallback date formatter.
Of course, here is the Java code you requested: ```java @Override public DurationFormatterFactory setFallback(DateFormatter fallback) { boolean doReset = fallback == null ? this.fallback != null : !fallback.equals(this.fallback); if (doReset) { this.fallback = fallback; reset(); ...
lessthanoptimal/GeoRegression
main/src/georegression/struct/shapes/Polygon2D_F64.java
Polygon2D_F64.getLine
public LineSegment2D_F64 getLine( int index , LineSegment2D_F64 storage ) { if( storage == null ) storage = new LineSegment2D_F64(); int j = (index+1)%vertexes.size; storage.a.set(get(index)); storage.b.set(get(j)); return storage; }
java
public LineSegment2D_F64 getLine( int index , LineSegment2D_F64 storage ) { if( storage == null ) storage = new LineSegment2D_F64(); int j = (index+1)%vertexes.size; storage.a.set(get(index)); storage.b.set(get(j)); return storage; }
[ "public", "LineSegment2D_F64", "getLine", "(", "int", "index", ",", "LineSegment2D_F64", "storage", ")", "{", "if", "(", "storage", "==", "null", ")", "storage", "=", "new", "LineSegment2D_F64", "(", ")", ";", "int", "j", "=", "(", "index", "+", "1", ")"...
Returns the line/edge defined by vertex index and index+1. @param index Index of the line @return A new instance of the line segment.
[ "Returns", "the", "line", "/", "edge", "defined", "by", "vertex", "index", "and", "index", "+", "1", "." ]
c067cd44a4e95bd826119f6e658bd82386ef289f
https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/struct/shapes/Polygon2D_F64.java#L175-L185
test
Gets the line at the specified index in the image.
Of course, here is the Java code you requested: ```java public LineSegment2D_F64 getLine( int index , LineSegment2D_F64 storage ) { if( storage == null ) storage = new LineSegment2D_F64(); int j = (index+1)%vertexes.size; storage.a.set(get(index)); storage.b.set(get(j)); return storage; } ``` Hope th...
eFaps/eFaps-WebApp
src/main/java/org/efaps/ui/wicket/models/field/factories/DecimalUIFactory.java
DecimalUIFactory.getReadOnlyValue
@Override protected String getReadOnlyValue(final AbstractUIField _abstractUIField) throws EFapsException { String strValue = ""; final Object valueTmp = _abstractUIField.getValue() .getReadOnlyValue(_abstractUIField.getParent().getMode()); if (valueTmp in...
java
@Override protected String getReadOnlyValue(final AbstractUIField _abstractUIField) throws EFapsException { String strValue = ""; final Object valueTmp = _abstractUIField.getValue() .getReadOnlyValue(_abstractUIField.getParent().getMode()); if (valueTmp in...
[ "@", "Override", "protected", "String", "getReadOnlyValue", "(", "final", "AbstractUIField", "_abstractUIField", ")", "throws", "EFapsException", "{", "String", "strValue", "=", "\"\"", ";", "final", "Object", "valueTmp", "=", "_abstractUIField", ".", "getValue", "(...
{@inheritDoc}
[ "{" ]
785c1aba0860dd65c673f123214fbe8c24ebdb17
https://github.com/eFaps/eFaps-WebApp/blob/785c1aba0860dd65c673f123214fbe8c24ebdb17/src/main/java/org/efaps/ui/wicket/models/field/factories/DecimalUIFactory.java#L79-L101
valid
Method to get the readOnly value.
Of course, here is the Java code you requested: ```java @Override protected String getReadOnlyValue(final AbstractUIField _abstractUIField) throws EFapsException { String strValue = ""; final Object valueTmp = _abstractUIField.getValue() .getReadOnlyValue(_abstra...
real-logic/agrona
agrona/src/main/java/org/agrona/IoUtil.java
IoUtil.mapExistingFile
public static MappedByteBuffer mapExistingFile( final File location, final FileChannel.MapMode mapMode, final String descriptionLabel) { checkFileExists(location, descriptionLabel); MappedByteBuffer mappedByteBuffer = null; try (RandomAccessFile file = new RandomAcce...
java
public static MappedByteBuffer mapExistingFile( final File location, final FileChannel.MapMode mapMode, final String descriptionLabel) { checkFileExists(location, descriptionLabel); MappedByteBuffer mappedByteBuffer = null; try (RandomAccessFile file = new RandomAcce...
[ "public", "static", "MappedByteBuffer", "mapExistingFile", "(", "final", "File", "location", ",", "final", "FileChannel", ".", "MapMode", "mapMode", ",", "final", "String", "descriptionLabel", ")", "{", "checkFileExists", "(", "location", ",", "descriptionLabel", ")...
Check that file exists, open file, and return MappedByteBuffer for entire file for a given {@link java.nio.channels.FileChannel.MapMode}. <p> The file itself will be closed, but the mapping will persist. @param location of the file to map @param mapMode for the mapping @param descriptionLabel to be as...
[ "Check", "that", "file", "exists", "open", "file", "and", "return", "MappedByteBuffer", "for", "entire", "file", "for", "a", "given", "{", "@link", "java", ".", "nio", ".", "channels", ".", "FileChannel", ".", "MapMode", "}", ".", "<p", ">", "The", "file...
d1ea76e6e3598cd6a0d34879687652ef123f639b
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/IoUtil.java#L314-L333
train
Map existing file.
Of course, here is the Java code you requested: ```java public static MappedByteBuffer mapExistingFile( final File location, final FileChannel.MapMode mapMode, final String descriptionLabel) { checkFileExists(location, descriptionLabel); MappedByteBuffer mappedByteBuffer = ...
alexruiz/fest-assert-1.x
src/main/java/org/fest/assertions/CharAssert.java
CharAssert.isLessThan
public @NotNull CharAssert isLessThan(char other) { if (actual < other) { return this; } failIfCustomMessageIsSet(); throw failure(unexpectedGreaterThanOrEqualTo(actual, other)); }
java
public @NotNull CharAssert isLessThan(char other) { if (actual < other) { return this; } failIfCustomMessageIsSet(); throw failure(unexpectedGreaterThanOrEqualTo(actual, other)); }
[ "public", "@", "NotNull", "CharAssert", "isLessThan", "(", "char", "other", ")", "{", "if", "(", "actual", "<", "other", ")", "{", "return", "this", ";", "}", "failIfCustomMessageIsSet", "(", ")", ";", "throw", "failure", "(", "unexpectedGreaterThanOrEqualTo",...
Verifies that the {@code Character} value is less than the given one. @param other the given value. @return this assertion object. @throws AssertionError if the {@code Character} value is not less than the given one.
[ "Verifies", "that", "the", "{", "@code", "Character", "}", "value", "is", "less", "than", "the", "given", "one", "." ]
f026c3059c8b2e40052f0388309cace819ac93a4
https://github.com/alexruiz/fest-assert-1.x/blob/f026c3059c8b2e40052f0388309cace819ac93a4/src/main/java/org/fest/assertions/CharAssert.java#L96-L102
valid
Asserts that actual is less than other.
Of course, here is the Java code you requested: ```java public @NotNull CharAssert isLessThan(char other) { if (actual < other) { return this; } failIfCustomMessageIsSet(); throw failure(unexpectedGreaterThanOrEqualTo(actual, other)); } ``` Hope this helps!
optimaize/anythingworks
common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java
JacksonJsonMarshaller.serialize
@Override public String serialize(Object obj) throws JsonMarshallingException { try { return serializeChecked(obj); } catch (Exception e) { throw new JsonMarshallingException(e); } }
java
@Override public String serialize(Object obj) throws JsonMarshallingException { try { return serializeChecked(obj); } catch (Exception e) { throw new JsonMarshallingException(e); } }
[ "@", "Override", "public", "String", "serialize", "(", "Object", "obj", ")", "throws", "JsonMarshallingException", "{", "try", "{", "return", "serializeChecked", "(", "obj", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "JsonMarsha...
Serialize the given Java object into JSON string.
[ "Serialize", "the", "given", "Java", "object", "into", "JSON", "string", "." ]
23e5f1c63cd56d935afaac4ad033c7996b32a1f2
https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java#L29-L36
train
Serialize a single object into a string.
Of course, here is the Java code you requested: ```java @Override public String serialize(Object obj) throws JsonMarshallingException { try { return serializeChecked(obj); } catch (Exception e) { throw new JsonMarshallingException(e); } } ``` Hope this helps!
trimou/trimou
core/src/main/java/org/trimou/engine/MustacheEngineBuilder.java
MustacheEngineBuilder.addTemplateLocator
public MustacheEngineBuilder addTemplateLocator(TemplateLocator locator) { checkArgumentNotNull(locator); checkNotBuilt(); this.templateLocators.add(locator); return this; }
java
public MustacheEngineBuilder addTemplateLocator(TemplateLocator locator) { checkArgumentNotNull(locator); checkNotBuilt(); this.templateLocators.add(locator); return this; }
[ "public", "MustacheEngineBuilder", "addTemplateLocator", "(", "TemplateLocator", "locator", ")", "{", "checkArgumentNotNull", "(", "locator", ")", ";", "checkNotBuilt", "(", ")", ";", "this", ".", "templateLocators", ".", "add", "(", "locator", ")", ";", "return",...
Adds a template locator. @param locator @return self
[ "Adds", "a", "template", "locator", "." ]
ae45d77d4bd8b2c71b41006908b8a0a784ad9058
https://github.com/trimou/trimou/blob/ae45d77d4bd8b2c71b41006908b8a0a784ad9058/core/src/main/java/org/trimou/engine/MustacheEngineBuilder.java#L170-L175
valid
Add a template locator to the template.
Of course, here is the Java code you requested: ```java public MustacheEngineBuilder addTemplateLocator(TemplateLocator locator) { checkArgumentNotNull(locator); checkNotBuilt(); this.templateLocators.add(locator); return this; } ``` Hope this helps!
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/selection/DistanceFunctionVisualization.java
DistanceFunctionVisualization.drawCosine
public static Element drawCosine(SVGPlot svgp, Projection2D proj, NumberVector mid, double angle) { // Project origin double[] pointOfOrigin = proj.fastProjectDataToRenderSpace(new double[proj.getInputDimensionality()]); // direction of the selected Point double[] selPoint = proj.fastProjectDataToRende...
java
public static Element drawCosine(SVGPlot svgp, Projection2D proj, NumberVector mid, double angle) { // Project origin double[] pointOfOrigin = proj.fastProjectDataToRenderSpace(new double[proj.getInputDimensionality()]); // direction of the selected Point double[] selPoint = proj.fastProjectDataToRende...
[ "public", "static", "Element", "drawCosine", "(", "SVGPlot", "svgp", ",", "Projection2D", "proj", ",", "NumberVector", "mid", ",", "double", "angle", ")", "{", "// Project origin", "double", "[", "]", "pointOfOrigin", "=", "proj", ".", "fastProjectDataToRenderSpac...
Visualizes Cosine and ArcCosine distance functions @param svgp SVG Plot @param proj Visualization projection @param mid mean vector @param angle Opening angle in radians @return path element
[ "Visualizes", "Cosine", "and", "ArcCosine", "distance", "functions" ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/selection/DistanceFunctionVisualization.java#L146-L200
train
Draw the cosine projection of a NumberVector.
Of course, here is the Java code you requested: ```java public static Element drawCosine(SVGPlot svgp, Projection2D proj, NumberVector mid, double angle) { // Project origin double[] pointOfOrigin = proj.fastProjectDataToRenderSpace(new double[proj.getInputDimensionality()]); // direction of the selected ...
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperation.java
KnowledgeOperation.getInputOnlyExpressionMappings
public List<ExpressionMapping> getInputOnlyExpressionMappings() { List<ExpressionMapping> list = new LinkedList<ExpressionMapping>(); for (ExpressionMapping em : _inputExpressionMappings) { if (em.getOutput() == null) { list.add(em); } } return lis...
java
public List<ExpressionMapping> getInputOnlyExpressionMappings() { List<ExpressionMapping> list = new LinkedList<ExpressionMapping>(); for (ExpressionMapping em : _inputExpressionMappings) { if (em.getOutput() == null) { list.add(em); } } return lis...
[ "public", "List", "<", "ExpressionMapping", ">", "getInputOnlyExpressionMappings", "(", ")", "{", "List", "<", "ExpressionMapping", ">", "list", "=", "new", "LinkedList", "<", "ExpressionMapping", ">", "(", ")", ";", "for", "(", "ExpressionMapping", "em", ":", ...
Gets the input-only expression mappings. @return the input-only expression mappings
[ "Gets", "the", "input", "-", "only", "expression", "mappings", "." ]
ca5c012bf867ea15d1250f0991af3cd7e708aaaf
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperation.java#L83-L91
train
Gets the input only expression mappings.
Of course, here is the Java code you requested: ```java public List<ExpressionMapping> getInputOnlyExpressionMappings() { List<ExpressionMapping> list = new LinkedList<ExpressionMapping>(); for (ExpressionMapping em : _inputExpressionMappings) { if (em.getOutput() == null) { ...
konmik/nucleus
nucleus-example-with-fragments/src/main/java/nucleus/example/main/FragmentStack.java
FragmentStack.replace
public void replace(Fragment fragment) { manager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); manager.beginTransaction() .replace(containerId, fragment, indexToTag(0)) .commit(); manager.executePendingTransactions(); }
java
public void replace(Fragment fragment) { manager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); manager.beginTransaction() .replace(containerId, fragment, indexToTag(0)) .commit(); manager.executePendingTransactions(); }
[ "public", "void", "replace", "(", "Fragment", "fragment", ")", "{", "manager", ".", "popBackStackImmediate", "(", "null", ",", "FragmentManager", ".", "POP_BACK_STACK_INCLUSIVE", ")", ";", "manager", ".", "beginTransaction", "(", ")", ".", "replace", "(", "conta...
Replaces stack contents with just one fragment.
[ "Replaces", "stack", "contents", "with", "just", "one", "fragment", "." ]
b161484a2bbf66a7896a8c1f61fa7187856ca5f7
https://github.com/konmik/nucleus/blob/b161484a2bbf66a7896a8c1f61fa7187856ca5f7/nucleus-example-with-fragments/src/main/java/nucleus/example/main/FragmentStack.java#L98-L104
train
Replace the fragment with the given fragment.
Of course, here is the Java code you requested: ```java public void replace(Fragment fragment) { manager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); manager.beginTransaction() .replace(containerId, fragment, indexToTag(0)) .commit(); manager.ex...
lessthanoptimal/BoofCV
applications/src/main/java/boofcv/app/CameraCalibration.java
CameraCalibration.handleWebcam
public void handleWebcam() { final Webcam webcam = openSelectedCamera(); if( desiredWidth > 0 && desiredHeight > 0 ) UtilWebcamCapture.adjustResolution(webcam, desiredWidth, desiredHeight); webcam.open(); // close the webcam gracefully on exit Runtime.getRuntime().addShutdownHook(new Thread(){public void...
java
public void handleWebcam() { final Webcam webcam = openSelectedCamera(); if( desiredWidth > 0 && desiredHeight > 0 ) UtilWebcamCapture.adjustResolution(webcam, desiredWidth, desiredHeight); webcam.open(); // close the webcam gracefully on exit Runtime.getRuntime().addShutdownHook(new Thread(){public void...
[ "public", "void", "handleWebcam", "(", ")", "{", "final", "Webcam", "webcam", "=", "openSelectedCamera", "(", ")", ";", "if", "(", "desiredWidth", ">", "0", "&&", "desiredHeight", ">", "0", ")", "UtilWebcamCapture", ".", "adjustResolution", "(", "webcam", ",...
Captures calibration data live using a webcam and a GUI to assist the user
[ "Captures", "calibration", "data", "live", "using", "a", "webcam", "and", "a", "GUI", "to", "assist", "the", "user" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/applications/src/main/java/boofcv/app/CameraCalibration.java#L535-L581
train
Handle the webcam.
Of course, here is the Java code you requested: ```java public void handleWebcam() { final Webcam webcam = openSelectedCamera(); if( desiredWidth > 0 && desiredHeight > 0 ) UtilWebcamCapture.adjustResolution(webcam, desiredWidth, desiredHeight); webcam.open(); // close the webcam gracefully on exit Runt...
bmatthews68/ldap-maven-plugin
format-dsml/src/main/java/com/btmatthews/maven/plugins/ldap/dsml/DSMLFormatHandler.java
DSMLFormatHandler.createWriter
@Override protected FormatWriter createWriter(final OutputStream outputStream, final FormatLogger logger) { try { return new DSMLFormatWriter(outputStream); } catch (final IOException e) { logger.logError("Could not create and intialise...
java
@Override protected FormatWriter createWriter(final OutputStream outputStream, final FormatLogger logger) { try { return new DSMLFormatWriter(outputStream); } catch (final IOException e) { logger.logError("Could not create and intialise...
[ "@", "Override", "protected", "FormatWriter", "createWriter", "(", "final", "OutputStream", "outputStream", ",", "final", "FormatLogger", "logger", ")", "{", "try", "{", "return", "new", "DSMLFormatWriter", "(", "outputStream", ")", ";", "}", "catch", "(", "fina...
Create the LDAP writer that will dump LDAP entries to a DSML file. @param outputStream The target output stream. @param logger Used to log information or error messages. @return A {@link DSMLFormatWriter} object.
[ "Create", "the", "LDAP", "writer", "that", "will", "dump", "LDAP", "entries", "to", "a", "DSML", "file", "." ]
02d33503c4f602482972c06cdd960f04f490a6ed
https://github.com/bmatthews68/ldap-maven-plugin/blob/02d33503c4f602482972c06cdd960f04f490a6ed/format-dsml/src/main/java/com/btmatthews/maven/plugins/ldap/dsml/DSMLFormatHandler.java#L45-L54
valid
Create a DSML writer.
Of course, here is the Java code you requested: ```java @Override protected FormatWriter createWriter(final OutputStream outputStream, final FormatLogger logger) { try { return new DSMLFormatWriter(outputStream); } catch (final IOException e) { ...
jamel/dbf
dbf-reader/src/main/java/org/jamel/dbf/structure/DbfRow.java
DbfRow.getDate
public Date getDate(String fieldName) throws DbfException { Date value = (Date) get(fieldName); return value == null ? null : value; }
java
public Date getDate(String fieldName) throws DbfException { Date value = (Date) get(fieldName); return value == null ? null : value; }
[ "public", "Date", "getDate", "(", "String", "fieldName", ")", "throws", "DbfException", "{", "Date", "value", "=", "(", "Date", ")", "get", "(", "fieldName", ")", ";", "return", "value", "==", "null", "?", "null", ":", "value", ";", "}" ]
Retrieves the value of the designated field as java.util.Date. @param fieldName the name of the field @return the field value, or null (if the dbf value is NULL) @throws DbfException if there's no field with name fieldName
[ "Retrieves", "the", "value", "of", "the", "designated", "field", "as", "java", ".", "util", ".", "Date", "." ]
5f065f8a13d9a4ffe27c617e7ec321771c95da7f
https://github.com/jamel/dbf/blob/5f065f8a13d9a4ffe27c617e7ec321771c95da7f/dbf-reader/src/main/java/org/jamel/dbf/structure/DbfRow.java#L50-L53
train
Gets the value of the specified field as a Date object.
Of course, here is the Java code you requested: ```java public Date getDate(String fieldName) throws DbfException { Date value = (Date) get(fieldName); return value == null ? null : value; } ``` Hope this helps!
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MapLayer.java
MapLayer.isClickable
@Pure public boolean isClickable() { final AttributeValue val = getAttributeProvider().getAttribute(ATTR_CLICKABLE); if (val != null) { try { return val.getBoolean(); } catch (AttributeException e) { // } } return true; }
java
@Pure public boolean isClickable() { final AttributeValue val = getAttributeProvider().getAttribute(ATTR_CLICKABLE); if (val != null) { try { return val.getBoolean(); } catch (AttributeException e) { // } } return true; }
[ "@", "Pure", "public", "boolean", "isClickable", "(", ")", "{", "final", "AttributeValue", "val", "=", "getAttributeProvider", "(", ")", ".", "getAttribute", "(", "ATTR_CLICKABLE", ")", ";", "if", "(", "val", "!=", "null", ")", "{", "try", "{", "return", ...
Replies if this layer accepts the user clicks. @return <code>true</code> if this layer allows mouse click events, otherwise <code>false</code>
[ "Replies", "if", "this", "layer", "accepts", "the", "user", "clicks", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MapLayer.java#L594-L605
train
Replies if the user clicks on the user.
Of course, here is the Java code you requested: ```java @Pure public boolean isClickable() { final AttributeValue val = getAttributeProvider().getAttribute(ATTR_CLICKABLE); if (val != null) { try { return val.getBoolean(); } catch (AttributeException e) { // } } return true; } ``` Hope this...
streamsets/datacollector
jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcMetastoreUtil.java
JdbcMetastoreUtil.resolveScaleOrPrecisionExpression
private static int resolveScaleOrPrecisionExpression( String type, Field field, String attributeName, String fieldPath ) throws JdbcStageCheckedException { String stringValue = field.getAttribute(attributeName); try { return Integer.parseInt(stringValue); } catch (NumberForm...
java
private static int resolveScaleOrPrecisionExpression( String type, Field field, String attributeName, String fieldPath ) throws JdbcStageCheckedException { String stringValue = field.getAttribute(attributeName); try { return Integer.parseInt(stringValue); } catch (NumberForm...
[ "private", "static", "int", "resolveScaleOrPrecisionExpression", "(", "String", "type", ",", "Field", "field", ",", "String", "attributeName", ",", "String", "fieldPath", ")", "throws", "JdbcStageCheckedException", "{", "String", "stringValue", "=", "field", ".", "g...
Evaluate precision or scale in context of record and given field path.
[ "Evaluate", "precision", "or", "scale", "in", "context", "of", "record", "and", "given", "field", "path", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcMetastoreUtil.java#L35-L48
test
Resolve a scale or precision expression.
Of course, here is the Java code you requested: ```java private static int resolveScaleOrPrecisionExpression( String type, Field field, String attributeName, String fieldPath ) throws JdbcStageCheckedException { String stringValue = field.getAttribute(attributeName); try { retu...
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsValidationHandler.java
CmsValidationHandler.addHandler
protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { return ensureHandlers().addHandlerToSource(type, this, handler); }
java
protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { return ensureHandlers().addHandlerToSource(type, this, handler); }
[ "protected", "<", "H", "extends", "EventHandler", ">", "HandlerRegistration", "addHandler", "(", "final", "H", "handler", ",", "GwtEvent", ".", "Type", "<", "H", ">", "type", ")", "{", "return", "ensureHandlers", "(", ")", ".", "addHandlerToSource", "(", "ty...
Adds this handler to the widget. @param <H> the type of handler to add @param type the event type @param handler the handler @return {@link HandlerRegistration} used to remove the handler
[ "Adds", "this", "handler", "to", "the", "widget", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsValidationHandler.java#L308-L311
train
Add a event handler.
Of course, here is the Java code you requested: ```java protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { return ensureHandlers().addHandlerToSource(type, this, handler); } ``` Hope this helps!