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
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDescriptionLabelProvider.java
SARLDescriptionLabelProvider.image
public ImageDescriptor image(SarlField attribute) { return this.images.forField( attribute.getVisibility(), this.adornments.get(this.jvmModelAssociations.getJvmField(attribute))); }
java
public ImageDescriptor image(SarlField attribute) { return this.images.forField( attribute.getVisibility(), this.adornments.get(this.jvmModelAssociations.getJvmField(attribute))); }
[ "public", "ImageDescriptor", "image", "(", "SarlField", "attribute", ")", "{", "return", "this", ".", "images", ".", "forField", "(", "attribute", ".", "getVisibility", "(", ")", ",", "this", ".", "adornments", ".", "get", "(", "this", ".", "jvmModelAssociat...
Replies the image for an attribute. @param attribute describes the attribute. @return the image descriptor.
[ "Replies", "the", "image", "for", "an", "attribute", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLDescriptionLabelProvider.java#L192-L196
train
Replies the image for the given attribute.
Of course, here is the Java code you requested: ```java public ImageDescriptor image(SarlField attribute) { return this.images.forField( attribute.getVisibility(), this.adornments.get(this.jvmModelAssociations.getJvmField(attribute))); } ``` Hope this helps!
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java
Section508Compliance.processNullLayouts
private void processNullLayouts(String className, String methodName) { if ("java/awt/Container".equals(className) && "setLayout".equals(methodName) && (stack.getStackDepth() > 0) && stack.getStackItem(0).isNull()) { bugReporter.reportBug(new BugInstance(this, BugType.S508C_NULL_LAYOUT.name(), NORMAL...
java
private void processNullLayouts(String className, String methodName) { if ("java/awt/Container".equals(className) && "setLayout".equals(methodName) && (stack.getStackDepth() > 0) && stack.getStackItem(0).isNull()) { bugReporter.reportBug(new BugInstance(this, BugType.S508C_NULL_LAYOUT.name(), NORMAL...
[ "private", "void", "processNullLayouts", "(", "String", "className", ",", "String", "methodName", ")", "{", "if", "(", "\"java/awt/Container\"", ".", "equals", "(", "className", ")", "&&", "\"setLayout\"", ".", "equals", "(", "methodName", ")", "&&", "(", "sta...
looks for containers where a null layout is installed @param className class that a method call is made on @param methodName name of the method that is called
[ "looks", "for", "containers", "where", "a", "null", "layout", "is", "installed" ]
3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java#L367-L371
train
Process null layouts.
Of course, here is the Java code you requested: ```java private void processNullLayouts(String className, String methodName) { if ("java/awt/Container".equals(className) && "setLayout".equals(methodName) && (stack.getStackDepth() > 0) && stack.getStackItem(0).isNull()) { bugReporter.reportBug(new B...
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/jackson/JacksonConfiguration.java
JacksonConfiguration.setSerialization
public void setSerialization(Map<SerializationFeature, Boolean> serialization) { if (CollectionUtils.isNotEmpty(serialization)) { this.serialization = serialization; } }
java
public void setSerialization(Map<SerializationFeature, Boolean> serialization) { if (CollectionUtils.isNotEmpty(serialization)) { this.serialization = serialization; } }
[ "public", "void", "setSerialization", "(", "Map", "<", "SerializationFeature", ",", "Boolean", ">", "serialization", ")", "{", "if", "(", "CollectionUtils", ".", "isNotEmpty", "(", "serialization", ")", ")", "{", "this", ".", "serialization", "=", "serialization...
Sets the serialization features to use. @param serialization The serialization features.
[ "Sets", "the", "serialization", "features", "to", "use", "." ]
c31f5b03ce0eb88c2f6470710987db03b8967d5c
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/jackson/JacksonConfiguration.java#L235-L239
train
Sets the serialization feature and the flag indicating if the feature is a resource.
Of course, here is the Java code you requested: ```java public void setSerialization(Map<SerializationFeature, Boolean> serialization) { if (CollectionUtils.isNotEmpty(serialization)) { this.serialization = serialization; } } ``` Hope this helps!
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java
SchedulerWsDelegate.createOrUpdateJob
public String createOrUpdateJob( String jobId, String jobName, String appName, String cmdName, String cron ) throws SchedulerWsException { if( jobId == null ) this.logger.finer( "Creating a new scheduled job." ); else this.logger.finer( "Updating the following scheduled job: " + jobId ); WebResource pat...
java
public String createOrUpdateJob( String jobId, String jobName, String appName, String cmdName, String cron ) throws SchedulerWsException { if( jobId == null ) this.logger.finer( "Creating a new scheduled job." ); else this.logger.finer( "Updating the following scheduled job: " + jobId ); WebResource pat...
[ "public", "String", "createOrUpdateJob", "(", "String", "jobId", ",", "String", "jobName", ",", "String", "appName", ",", "String", "cmdName", ",", "String", "cron", ")", "throws", "SchedulerWsException", "{", "if", "(", "jobId", "==", "null", ")", "this", "...
Creates or updates a scheduled job. @param jobId the job's ID (null to create a new job) @param jobName the job's name @param appName the application's name @param cmdName the name of the commands file to execute @param cron the CRON expression to trigger the job @return the created (or updated) job @throws SchedulerWs...
[ "Creates", "or", "updates", "a", "scheduled", "job", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java#L131-L155
train
Creates or updates a scheduled job.
Of course, here is the Java code you requested: ```java public String createOrUpdateJob( String jobId, String jobName, String appName, String cmdName, String cron ) throws SchedulerWsException { if( jobId == null ) this.logger.finer( "Creating a new scheduled job." ); else this.logger.finer( "Updating the...
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/util/regex/TemplateMatcher.java
TemplateMatcher.replace
public void replace(Reader reader, Writer writer, VariableResolver resolver) throws IOException{ BufferedReader breader = reader instanceof BufferedReader ? (BufferedReader)reader : new BufferedReader(reader); BufferedWriter bwriter = writer instanceof BufferedWriter ? (BufferedWriter)writer : new Buffe...
java
public void replace(Reader reader, Writer writer, VariableResolver resolver) throws IOException{ BufferedReader breader = reader instanceof BufferedReader ? (BufferedReader)reader : new BufferedReader(reader); BufferedWriter bwriter = writer instanceof BufferedWriter ? (BufferedWriter)writer : new Buffe...
[ "public", "void", "replace", "(", "Reader", "reader", ",", "Writer", "writer", ",", "VariableResolver", "resolver", ")", "throws", "IOException", "{", "BufferedReader", "breader", "=", "reader", "instanceof", "BufferedReader", "?", "(", "BufferedReader", ")", "rea...
/*-------------------------------------------------[ Character Streams ]---------------------------------------------------
[ "/", "*", "-------------------------------------------------", "[", "Character", "Streams", "]", "---------------------------------------------------" ]
59c28719f054123cf778278154e1b92e943ad232
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/util/regex/TemplateMatcher.java#L206-L225
train
Replace the code in the reader with the code in the writer.
Of course, here is the Java code you requested: ```java public void replace(Reader reader, Writer writer, VariableResolver resolver) throws IOException{ BufferedReader breader = reader instanceof BufferedReader ? (BufferedReader)reader : new BufferedReader(reader); BufferedWriter bwriter = writer insta...
liferay/com-liferay-commerce
commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java
CommerceCurrencyPersistenceImpl.findByUuid_C
@Override public List<CommerceCurrency> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<CommerceCurrency> orderByComparator, boolean retrieveFromCache) { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) ...
java
@Override public List<CommerceCurrency> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<CommerceCurrency> orderByComparator, boolean retrieveFromCache) { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) ...
[ "@", "Override", "public", "List", "<", "CommerceCurrency", ">", "findByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommerceCurrency", ">", "orderByComparator", ",", "boolean",...
Returns an ordered range of all the commerce currencies where uuid = &#63; and companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "currencies", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L986-L1111
train
Returns a range of commerce currencies matching the UUID and company.
Of course, here is the Java code you requested: ```java @Override public List<CommerceCurrency> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<CommerceCurrency> orderByComparator, boolean retrieveFromCache) { boolean pagination = true; FinderPath finderPath = null; Object[...
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/parsers/URLParser.java
URLParser.splitURL
public static Map<URLParts, String> splitURL(URL url) { Map<URLParts, String> urlParts = new HashMap<>(); urlParts.put(URLParts.PROTOCOL, url.getProtocol()); urlParts.put(URLParts.USERINFO, url.getUserInfo()); urlParts.put(URLParts.AUTHORITY, url.getAuthority()); urlPart...
java
public static Map<URLParts, String> splitURL(URL url) { Map<URLParts, String> urlParts = new HashMap<>(); urlParts.put(URLParts.PROTOCOL, url.getProtocol()); urlParts.put(URLParts.USERINFO, url.getUserInfo()); urlParts.put(URLParts.AUTHORITY, url.getAuthority()); urlPart...
[ "public", "static", "Map", "<", "URLParts", ",", "String", ">", "splitURL", "(", "URL", "url", ")", "{", "Map", "<", "URLParts", ",", "String", ">", "urlParts", "=", "new", "HashMap", "<>", "(", ")", ";", "urlParts", ".", "put", "(", "URLParts", ".",...
This method splits a URL into parts and return a map containing them. @param url @return
[ "This", "method", "splits", "a", "URL", "into", "parts", "and", "return", "a", "map", "containing", "them", "." ]
909dff0476e80834f05ecdde0624dd2390e9b0ca
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/parsers/URLParser.java#L177-L197
train
Split URL into parts.
Of course, here is the Java code you requested: ```java public static Map<URLParts, String> splitURL(URL url) { Map<URLParts, String> urlParts = new HashMap<>(); urlParts.put(URLParts.PROTOCOL, url.getProtocol()); urlParts.put(URLParts.USERINFO, url.getUserInfo()); urlParts.put...
stripe/stripe-android
stripe/src/main/java/com/stripe/android/IssuingCardPinService.java
IssuingCardPinService.create
@NonNull public static IssuingCardPinService create( @NonNull Context context, @NonNull EphemeralKeyProvider keyProvider) { return new IssuingCardPinService(keyProvider, new StripeApiHandler(context)); }
java
@NonNull public static IssuingCardPinService create( @NonNull Context context, @NonNull EphemeralKeyProvider keyProvider) { return new IssuingCardPinService(keyProvider, new StripeApiHandler(context)); }
[ "@", "NonNull", "public", "static", "IssuingCardPinService", "create", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "EphemeralKeyProvider", "keyProvider", ")", "{", "return", "new", "IssuingCardPinService", "(", "keyProvider", ",", "new", "StripeA...
Create a IssuingCardPinService with the provided {@link EphemeralKeyProvider}. @param keyProvider an {@link EphemeralKeyProvider} used to get {@link CustomerEphemeralKey EphemeralKeys} as needed
[ "Create", "a", "IssuingCardPinService", "with", "the", "provided", "{", "@link", "EphemeralKeyProvider", "}", "." ]
0f199255f3769a3b84583fe3ace47bfae8c3b1c8
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/IssuingCardPinService.java#L53-L58
train
Create an Issuing Card Pin Service.
Of course, here is the Java code you requested: ```java @NonNull public static IssuingCardPinService create( @NonNull Context context, @NonNull EphemeralKeyProvider keyProvider) { return new IssuingCardPinService(keyProvider, new StripeApiHandler(context)); } ``` Hope this help...
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/StatisticsApi.java
StatisticsApi.deleteAgentStatistic
public DeleteAgentStatisticResponse deleteAgentStatistic(String object) throws ApiException { ApiResponse<DeleteAgentStatisticResponse> resp = deleteAgentStatisticWithHttpInfo(object); return resp.getData(); }
java
public DeleteAgentStatisticResponse deleteAgentStatistic(String object) throws ApiException { ApiResponse<DeleteAgentStatisticResponse> resp = deleteAgentStatisticWithHttpInfo(object); return resp.getData(); }
[ "public", "DeleteAgentStatisticResponse", "deleteAgentStatistic", "(", "String", "object", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeleteAgentStatisticResponse", ">", "resp", "=", "deleteAgentStatisticWithHttpInfo", "(", "object", ")", ";", "return", "res...
Delete agent object statistic. Delete agent object statistic @param object The name of object (required) @return DeleteAgentStatisticResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Delete", "agent", "object", "statistic", ".", "Delete", "agent", "object", "statistic" ]
1ad594c3767cec83052168e350994f922a26f75e
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/StatisticsApi.java#L361-L364
train
Delete Agent Statistic Delete Agent Statistic
Of course, here is the Java code you requested: ```java public DeleteAgentStatisticResponse deleteAgentStatistic(String object) throws ApiException { ApiResponse<DeleteAgentStatisticResponse> resp = deleteAgentStatisticWithHttpInfo(object); return resp.getData(); } ``` Hope this helps!
threerings/nenya
tools/src/main/java/com/threerings/cast/bundle/tools/ComponentBundlerUtil.java
ComponentBundlerUtil.parseActionTileSets
public static Map<String, TileSet> parseActionTileSets (InputStream in) throws IOException, SAXException { Digester digester = new Digester(); digester.addSetProperties("actions" + ActionRuleSet.ACTION_PATH); addTileSetRuleSet(digester, new SwissArmyTileSetRuleSet()); addTile...
java
public static Map<String, TileSet> parseActionTileSets (InputStream in) throws IOException, SAXException { Digester digester = new Digester(); digester.addSetProperties("actions" + ActionRuleSet.ACTION_PATH); addTileSetRuleSet(digester, new SwissArmyTileSetRuleSet()); addTile...
[ "public", "static", "Map", "<", "String", ",", "TileSet", ">", "parseActionTileSets", "(", "InputStream", "in", ")", "throws", "IOException", ",", "SAXException", "{", "Digester", "digester", "=", "new", "Digester", "(", ")", ";", "digester", ".", "addSetPrope...
Parses the action tileset definitions in the supplied input stream, and puts them into a hash map, keyed on action name.
[ "Parses", "the", "action", "tileset", "definitions", "in", "the", "supplied", "input", "stream", "and", "puts", "them", "into", "a", "hash", "map", "keyed", "on", "action", "name", "." ]
3165a012fd859009db3367f87bd2a5b820cc760a
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/cast/bundle/tools/ComponentBundlerUtil.java#L59-L71
train
Parses the action tile sets from the input stream.
Of course, here is the Java code you requested: ```java public static Map<String, TileSet> parseActionTileSets (InputStream in) throws IOException, SAXException { Digester digester = new Digester(); digester.addSetProperties("actions" + ActionRuleSet.ACTION_PATH); addTileSetRuleSet(...
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnszone_domain_binding.java
dnszone_domain_binding.get
public static dnszone_domain_binding[] get(nitro_service service, String zonename) throws Exception{ dnszone_domain_binding obj = new dnszone_domain_binding(); obj.set_zonename(zonename); dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service); return response; }
java
public static dnszone_domain_binding[] get(nitro_service service, String zonename) throws Exception{ dnszone_domain_binding obj = new dnszone_domain_binding(); obj.set_zonename(zonename); dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "dnszone_domain_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "zonename", ")", "throws", "Exception", "{", "dnszone_domain_binding", "obj", "=", "new", "dnszone_domain_binding", "(", ")", ";", "obj", ".", "set_zonen...
Use this API to fetch dnszone_domain_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "dnszone_domain_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnszone_domain_binding.java#L122-L127
train
Use this API to fetch dnszone_domain_binding resources of given name.
Of course, here is the Java code you requested: ```java public static dnszone_domain_binding[] get(nitro_service service, String zonename) throws Exception{ dnszone_domain_binding obj = new dnszone_domain_binding(); obj.set_zonename(zonename); dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.ge...
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java
X509Credential.saveCertificateChain
public void saveCertificateChain(OutputStream out) throws IOException, CertificateEncodingException { CertificateIOUtil.writeCertificate(out, this.certChain[0]); for (int i = 1; i < this.certChain.length; i++) { // skip the self-signed certificates if (this.certChain[i].getSubj...
java
public void saveCertificateChain(OutputStream out) throws IOException, CertificateEncodingException { CertificateIOUtil.writeCertificate(out, this.certChain[0]); for (int i = 1; i < this.certChain.length; i++) { // skip the self-signed certificates if (this.certChain[i].getSubj...
[ "public", "void", "saveCertificateChain", "(", "OutputStream", "out", ")", "throws", "IOException", ",", "CertificateEncodingException", "{", "CertificateIOUtil", ".", "writeCertificate", "(", "out", ",", "this", ".", "certChain", "[", "0", "]", ")", ";", "for", ...
COMMENT Used to be "key cert cert cert ...", which is wrong afaik. must be "cert key cert cert ..."
[ "COMMENT", "Used", "to", "be", "key", "cert", "cert", "cert", "...", "which", "is", "wrong", "afaik", ".", "must", "be", "cert", "key", "cert", "cert", "..." ]
e14f6f6636544fd84298f9cec749d626ea971930
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L200-L212
train
Save the certificate chain to the output stream.
Of course, here is the Java code you requested: ```java public void saveCertificateChain(OutputStream out) throws IOException, CertificateEncodingException { CertificateIOUtil.writeCertificate(out, this.certChain[0]); for (int i = 1; i < this.certChain.length; i++) { // skip the self-sign...
osmdroid/osmdroid
OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/SampleRace.java
SampleRace.getAnimatedIconManager
private MilestoneManager getAnimatedIconManager(final MilestoneLister pMilestoneLister, final Bitmap pBitmap) { return new MilestoneManager( pMilestoneLister, new MilestoneBitmapDisplayer(0, true, pBitmap, ...
java
private MilestoneManager getAnimatedIconManager(final MilestoneLister pMilestoneLister, final Bitmap pBitmap) { return new MilestoneManager( pMilestoneLister, new MilestoneBitmapDisplayer(0, true, pBitmap, ...
[ "private", "MilestoneManager", "getAnimatedIconManager", "(", "final", "MilestoneLister", "pMilestoneLister", ",", "final", "Bitmap", "pBitmap", ")", "{", "return", "new", "MilestoneManager", "(", "pMilestoneLister", ",", "new", "MilestoneBitmapDisplayer", "(", "0", ","...
Animated icon @since 6.0.2
[ "Animated", "icon" ]
3b178b2f078497dd88c137110e87aafe45ad2b16
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/SampleRace.java#L219-L226
train
Gets animated icon manager.
Of course, here is the Java code you requested: ```java private MilestoneManager getAnimatedIconManager(final MilestoneLister pMilestoneLister, final Bitmap pBitmap) { return new MilestoneManager( pMilestoneLister, new Mileston...
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/expansion/DegradationExpansionRule.java
DegradationExpansionRule.expand
@Override public List<Statement> expand(Term degradation) { List<Statement> statements = new ArrayList<Statement>(); BELObject firstArgument = degradation.getFunctionArguments().get(0); Term protein = (Term) firstArgument; // only argument of a protein ...
java
@Override public List<Statement> expand(Term degradation) { List<Statement> statements = new ArrayList<Statement>(); BELObject firstArgument = degradation.getFunctionArguments().get(0); Term protein = (Term) firstArgument; // only argument of a protein ...
[ "@", "Override", "public", "List", "<", "Statement", ">", "expand", "(", "Term", "degradation", ")", "{", "List", "<", "Statement", ">", "statements", "=", "new", "ArrayList", "<", "Statement", ">", "(", ")", ";", "BELObject", "firstArgument", "=", "degrad...
{@inheritDoc}
[ "{" ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/expansion/DegradationExpansionRule.java#L93-L110
train
Expansion of a CRASS ARAS ARA S A RRAS A RRAS ARAS A RRAS A RRAS ARAS A RRAS A RRAS A RRAS A RRAS ARAS A RRAS A RRAS A RRAS A RRAS ARAS ARA ARA
Of course, here is the Java code you requested: ```java @Override public List<Statement> expand(Term degradation) { List<Statement> statements = new ArrayList<Statement>(); BELObject firstArgument = degradation.getFunctionArguments().get(0); Term protein = (Term) firstArgument; // only arg...
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java
Base64Slow.decodeToString
public static String decodeToString(byte[] bytes, String enc) throws UnsupportedEncodingException { return new String(decode(bytes), enc); }
java
public static String decodeToString(byte[] bytes, String enc) throws UnsupportedEncodingException { return new String(decode(bytes), enc); }
[ "public", "static", "String", "decodeToString", "(", "byte", "[", "]", "bytes", ",", "String", "enc", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "String", "(", "decode", "(", "bytes", ")", ",", "enc", ")", ";", "}" ]
Decode Base64 encoded bytes. Characters that are not part of the Base64 alphabet are ignored in the input. @param bytes The data to decode. @param enc Character encoding to use when converting to and from bytes. @return A decoded String. @throws UnsupportedEncodingException if the character encoding specified is not s...
[ "Decode", "Base64", "encoded", "bytes", ".", "Characters", "that", "are", "not", "part", "of", "the", "Base64", "alphabet", "are", "ignored", "in", "the", "input", "." ]
e53ae6be982e2de3123292be7d5297715bec70bb
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L586-L589
train
Decode bytes to a String.
Of course, here is the Java code you requested: ```java public static String decodeToString(byte[] bytes, String enc) throws UnsupportedEncodingException { return new String(decode(bytes), enc); } ``` Hope this helps!
google/error-prone
core/src/main/java/com/google/errorprone/refaster/Unifier.java
Unifier.unifyList
public static <T, U extends Unifiable<? super T>> Choice<Unifier> unifyList( Unifier unifier, @Nullable List<U> toUnify, @Nullable final List<? extends T> targets, boolean allowVarargs) { if (toUnify == null && targets == null) { return Choice.of(unifier); } else if (toUnify == nul...
java
public static <T, U extends Unifiable<? super T>> Choice<Unifier> unifyList( Unifier unifier, @Nullable List<U> toUnify, @Nullable final List<? extends T> targets, boolean allowVarargs) { if (toUnify == null && targets == null) { return Choice.of(unifier); } else if (toUnify == nul...
[ "public", "static", "<", "T", ",", "U", "extends", "Unifiable", "<", "?", "super", "T", ">", ">", "Choice", "<", "Unifier", ">", "unifyList", "(", "Unifier", "unifier", ",", "@", "Nullable", "List", "<", "U", ">", "toUnify", ",", "@", "Nullable", "fi...
Returns all successful unification paths from the specified {@code Unifier} unifying the specified lists, allowing varargs if and only if {@code allowVarargs} is true.
[ "Returns", "all", "successful", "unification", "paths", "from", "the", "specified", "{" ]
fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/refaster/Unifier.java#L148-L202
train
Unify a list of U.
Of course, here is the Java code you requested: ```java public static <T, U extends Unifiable<? super T>> Choice<Unifier> unifyList( Unifier unifier, @Nullable List<U> toUnify, @Nullable final List<? extends T> targets, boolean allowVarargs) { if (toUnify == null && targets == null) { ...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java
ClassLoaderUtil.loadClass
public static Class<?> loadClass(File jarOrDir, String name) { try { return getJarClassLoader(jarOrDir).loadClass(name); } catch (ClassNotFoundException e) { throw new UtilException(e); } }
java
public static Class<?> loadClass(File jarOrDir, String name) { try { return getJarClassLoader(jarOrDir).loadClass(name); } catch (ClassNotFoundException e) { throw new UtilException(e); } }
[ "public", "static", "Class", "<", "?", ">", "loadClass", "(", "File", "jarOrDir", ",", "String", "name", ")", "{", "try", "{", "return", "getJarClassLoader", "(", "jarOrDir", ")", ".", "loadClass", "(", "name", ")", ";", "}", "catch", "(", "ClassNotFound...
加载外部类 @param jarOrDir jar文件或者包含jar和class文件的目录 @param name 类名 @return 类 @since 4.4.2
[ "加载外部类" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java#L230-L236
train
Load a class from a jar or directory.
Of course, here is the Java code you requested: ```java public static Class<?> loadClass(File jarOrDir, String name) { try { return getJarClassLoader(jarOrDir).loadClass(name); } catch (ClassNotFoundException e) { throw new UtilException(e); } } ``` Hope this helps!
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.listVnets
public List<VnetInfoInner> listVnets(String resourceGroupName, String name) { return listVnetsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
java
public List<VnetInfoInner> listVnets(String resourceGroupName, String name) { return listVnetsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "List", "<", "VnetInfoInner", ">", "listVnets", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "listVnetsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", "(", ")", ".", "single", ...
Get all Virtual Networks associated with an App Service plan. Get all Virtual Networks associated with an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Get", "all", "Virtual", "Networks", "associated", "with", "an", "App", "Service", "plan", ".", "Get", "all", "Virtual", "Networks", "associated", "with", "an", "App", "Service", "plan", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L2984-L2986
train
List all the virtual network references.
Of course, here is the Java code you requested: ```java public List<VnetInfoInner> listVnets(String resourceGroupName, String name) { return listVnetsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); } ``` Hope this helps!
h2oai/h2o-2
src/main/java/water/fvec/Chunk.java
Chunk.close
public void close( int cidx, Futures fs ) { int len = _len; if( this instanceof NewChunk ) _chk2 = this; if( _chk2 == null ) return; // No change? if( _chk2 instanceof NewChunk ) _chk2 = ((NewChunk)_chk2).new_close(); assert _chk2._len == len:"incompatible length after compression, " + le...
java
public void close( int cidx, Futures fs ) { int len = _len; if( this instanceof NewChunk ) _chk2 = this; if( _chk2 == null ) return; // No change? if( _chk2 instanceof NewChunk ) _chk2 = ((NewChunk)_chk2).new_close(); assert _chk2._len == len:"incompatible length after compression, " + le...
[ "public", "void", "close", "(", "int", "cidx", ",", "Futures", "fs", ")", "{", "int", "len", "=", "_len", ";", "if", "(", "this", "instanceof", "NewChunk", ")", "_chk2", "=", "this", ";", "if", "(", "_chk2", "==", "null", ")", "return", ";", "// No...
After writing we must call close() to register the bulk changes
[ "After", "writing", "we", "must", "call", "close", "()", "to", "register", "the", "bulk", "changes" ]
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/fvec/Chunk.java#L161-L169
train
Close the chunk at the given index.
Of course, here is the Java code you requested: ```java public void close( int cidx, Futures fs ) { int len = _len; if( this instanceof NewChunk ) _chk2 = this; if( _chk2 == null ) return; // No change? if( _chk2 instanceof NewChunk ) _chk2 = ((NewChunk)_chk2).new_close(); assert _chk2._l...
naver/nbase-arc
api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayAddress.java
GatewayAddress.asListFromDomain
public static List<GatewayAddress> asListFromDomain(final String domainAddress) { if (domainAddress == null) { throw new IllegalArgumentException("domain address must not be null"); } GatewayAddress domain = new GatewayAddress(0, domainAddress); InetAddress[] addresses; ...
java
public static List<GatewayAddress> asListFromDomain(final String domainAddress) { if (domainAddress == null) { throw new IllegalArgumentException("domain address must not be null"); } GatewayAddress domain = new GatewayAddress(0, domainAddress); InetAddress[] addresses; ...
[ "public", "static", "List", "<", "GatewayAddress", ">", "asListFromDomain", "(", "final", "String", "domainAddress", ")", "{", "if", "(", "domainAddress", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"domain address must not be null\"", ...
As list from domain. @param domainAddress the domain address @return the list
[ "As", "list", "from", "domain", "." ]
d4ce8a258527160c09b55e34acc1542651a8bbb3
https://github.com/naver/nbase-arc/blob/d4ce8a258527160c09b55e34acc1542651a8bbb3/api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayAddress.java#L98-L118
valid
Gets a list of GatewayAddress from a domain address.
Of course, here is the Java code you requested: ```java public static List<GatewayAddress> asListFromDomain(final String domainAddress) { if (domainAddress == null) { throw new IllegalArgumentException("domain address must not be null"); } GatewayAddress domain = new GatewayAddress...
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/resources/VersionResource.java
VersionResource.versionCheck
@GET @Path("/check") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public VersionCheckResponse versionCheck( @QueryParam("client") @DefaultValue("") final String client) { final PomVersion serverVersion = PomVersion.parse(Version.POM_VERSION); final VersionCompatibility.Status status; ...
java
@GET @Path("/check") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public VersionCheckResponse versionCheck( @QueryParam("client") @DefaultValue("") final String client) { final PomVersion serverVersion = PomVersion.parse(Version.POM_VERSION); final VersionCompatibility.Status status; ...
[ "@", "GET", "@", "Path", "(", "\"/check\"", ")", "@", "Produces", "(", "APPLICATION_JSON", ")", "@", "Timed", "@", "ExceptionMetered", "public", "VersionCheckResponse", "versionCheck", "(", "@", "QueryParam", "(", "\"client\"", ")", "@", "DefaultValue", "(", "...
Given the client version, returns the version status, i.e. whether or not they should be compatible or not. @param client The client version. @return The VersionCheckResponse object.
[ "Given", "the", "client", "version", "returns", "the", "version", "status", "i", ".", "e", ".", "whether", "or", "not", "they", "should", "be", "compatible", "or", "not", "." ]
c9000bc1d6908651570be8b057d4981bba4df5b4
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/resources/VersionResource.java#L64-L82
train
Check the version of the specified node.
Of course, here is the Java code you requested: ```java @GET @Path("/check") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public VersionCheckResponse versionCheck( @QueryParam("client") @DefaultValue("") final String client) { final PomVersion serverVersion = PomVersion.parse(Version.POM_VE...
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/diff/calculation/DiffCalculator.java
DiffCalculator.generateDiff
private Diff generateDiff(final char[] revA, final char[] revB) throws UnsupportedEncodingException { blockCount = 0; queueA = new ArrayList<DiffBlock>(); queueB = new ArrayList<DiffBlock>(); revABlocked = new boolean[revA.length]; revBBlocked = new boolean[revB.length]; int revAStartIndex = 0, revAEn...
java
private Diff generateDiff(final char[] revA, final char[] revB) throws UnsupportedEncodingException { blockCount = 0; queueA = new ArrayList<DiffBlock>(); queueB = new ArrayList<DiffBlock>(); revABlocked = new boolean[revA.length]; revBBlocked = new boolean[revB.length]; int revAStartIndex = 0, revAEn...
[ "private", "Diff", "generateDiff", "(", "final", "char", "[", "]", "revA", ",", "final", "char", "[", "]", "revB", ")", "throws", "UnsupportedEncodingException", "{", "blockCount", "=", "0", ";", "queueA", "=", "new", "ArrayList", "<", "DiffBlock", ">", "(...
Generates a Diff by using the CommonLongestSubstring search. @param revA previous revision @param revB current revision @return Diff @throws UnsupportedEncodingException if the character encoding is unsupported
[ "Generates", "a", "Diff", "by", "using", "the", "CommonLongestSubstring", "search", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/diff/calculation/DiffCalculator.java#L542-L647
train
Generate the Diff.
Of course, here is the Java code you requested: ```java private Diff generateDiff(final char[] revA, final char[] revB) throws UnsupportedEncodingException { blockCount = 0; queueA = new ArrayList<DiffBlock>(); queueB = new ArrayList<DiffBlock>(); revABlocked = new boolean[revA.length]; revBBlocked = ne...
stripe/stripe-android
stripe/src/main/java/com/stripe/android/model/SourceParams.java
SourceParams.createMasterpassParams
@NonNull public static SourceParams createMasterpassParams( @NonNull String transactionId, @NonNull String cartID) { final Map<String, Object> map = createSimpleMap(TRANSACTION_ID, transactionId); map.put(CART_ID, cartID); return new SourceParams() .s...
java
@NonNull public static SourceParams createMasterpassParams( @NonNull String transactionId, @NonNull String cartID) { final Map<String, Object> map = createSimpleMap(TRANSACTION_ID, transactionId); map.put(CART_ID, cartID); return new SourceParams() .s...
[ "@", "NonNull", "public", "static", "SourceParams", "createMasterpassParams", "(", "@", "NonNull", "String", "transactionId", ",", "@", "NonNull", "String", "cartID", ")", "{", "final", "Map", "<", "String", ",", "Object", ">", "map", "=", "createSimpleMap", "...
Create parameters needed to make a Masterpass source @param transactionId The transaction ID from the Masterpass SDK. @param cartID A unique string that you generate to identify the purchase when creating a cart for checkout in the Masterpass SDK. @return a {@link SourceParams} object that can be used to create a Mas...
[ "Create", "parameters", "needed", "to", "make", "a", "Masterpass", "source" ]
0f199255f3769a3b84583fe3ace47bfae8c3b1c8
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/model/SourceParams.java#L588-L598
train
Create masterpass source params.
Of course, here is the Java code you requested: ```java @NonNull public static SourceParams createMasterpassParams( @NonNull String transactionId, @NonNull String cartID) { final Map<String, Object> map = createSimpleMap(TRANSACTION_ID, transactionId); map.put(CART_ID, cartI...
apache/incubator-heron
heron/uploaders/src/java/org/apache/heron/uploader/gcs/GcsUploader.java
GcsUploader.generateStorageObjectName
private static String generateStorageObjectName(String topologyName, String filename) { return String.format("%s/%s", topologyName, filename); }
java
private static String generateStorageObjectName(String topologyName, String filename) { return String.format("%s/%s", topologyName, filename); }
[ "private", "static", "String", "generateStorageObjectName", "(", "String", "topologyName", ",", "String", "filename", ")", "{", "return", "String", ".", "format", "(", "\"%s/%s\"", ",", "topologyName", ",", "filename", ")", ";", "}" ]
Generate the storage object name in gcs given the topologyName and filename. @param topologyName the name of the topology @param filename the name of the file to upload to gcs @return the name of the object.
[ "Generate", "the", "storage", "object", "name", "in", "gcs", "given", "the", "topologyName", "and", "filename", "." ]
776abe2b5a45b93a0eb957fd65cbc149d901a92a
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/uploaders/src/java/org/apache/heron/uploader/gcs/GcsUploader.java#L214-L216
train
Generate a storage object name for a cluster.
Of course, here is the Java code you requested: ```java private static String generateStorageObjectName(String topologyName, String filename) { return String.format("%s/%s", topologyName, filename); } ``` Hope this helps!
zafarkhaja/jsemver
src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
MetadataVersion.compareIdentifiers
private int compareIdentifiers(String ident1, String ident2) { if (isInt(ident1) && isInt(ident2)) { return Integer.parseInt(ident1) - Integer.parseInt(ident2); } else { return ident1.compareTo(ident2); } }
java
private int compareIdentifiers(String ident1, String ident2) { if (isInt(ident1) && isInt(ident2)) { return Integer.parseInt(ident1) - Integer.parseInt(ident2); } else { return ident1.compareTo(ident2); } }
[ "private", "int", "compareIdentifiers", "(", "String", "ident1", ",", "String", "ident2", ")", "{", "if", "(", "isInt", "(", "ident1", ")", "&&", "isInt", "(", "ident2", ")", ")", "{", "return", "Integer", ".", "parseInt", "(", "ident1", ")", "-", "Int...
Compares two identifiers. @param ident1 the first identifier @param ident2 the second identifier @return integer result of comparison compatible with the {@code Comparable.compareTo} method
[ "Compares", "two", "identifiers", "." ]
1f4996ea3dab06193c378fd66fd4f8fdc8334cc6
https://github.com/zafarkhaja/jsemver/blob/1f4996ea3dab06193c378fd66fd4f8fdc8334cc6/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java#L229-L235
train
Compare two identifiers.
Of course, here is the Java code you requested: ```java private int compareIdentifiers(String ident1, String ident2) { if (isInt(ident1) && isInt(ident2)) { return Integer.parseInt(ident1) - Integer.parseInt(ident2); } else { return ident1.compareTo(ident2); } } ``` ...
JOML-CI/JOML
src/org/joml/Vector3f.java
Vector3f.setComponent
public Vector3f setComponent(int component, float value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
java
public Vector3f setComponent(int component, float value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
[ "public", "Vector3f", "setComponent", "(", "int", "component", ",", "float", "value", ")", "throws", "IllegalArgumentException", "{", "switch", "(", "component", ")", "{", "case", "0", ":", "x", "=", "value", ";", "break", ";", "case", "1", ":", "y", "="...
Set the value of the specified component of this vector. @param component the component whose value to set, within <code>[0..2]</code> @param value the value to set @return this @throws IllegalArgumentException if <code>component</code> is not within <code>[0..2]</code>
[ "Set", "the", "value", "of", "the", "specified", "component", "of", "this", "vector", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3f.java#L430-L445
train
Sets the value of the component of the Vector3f.
Of course, here is the Java code you requested: ```java public Vector3f setComponent(int component, float value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; ...
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/NonBlockingByteArrayOutputStream.java
NonBlockingByteArrayOutputStream.readFrom
public void readFrom (@Nonnull @WillNotClose final InputStream aIS) throws IOException { while (true) { if (m_nCount == m_aBuf.length) { // reallocate m_aBuf = _enlarge (m_aBuf, m_aBuf.length << 1); } final int nBytesRead = aIS.read (m_aBuf, m_nCount, m_aBuf.length - m...
java
public void readFrom (@Nonnull @WillNotClose final InputStream aIS) throws IOException { while (true) { if (m_nCount == m_aBuf.length) { // reallocate m_aBuf = _enlarge (m_aBuf, m_aBuf.length << 1); } final int nBytesRead = aIS.read (m_aBuf, m_nCount, m_aBuf.length - m...
[ "public", "void", "readFrom", "(", "@", "Nonnull", "@", "WillNotClose", "final", "InputStream", "aIS", ")", "throws", "IOException", "{", "while", "(", "true", ")", "{", "if", "(", "m_nCount", "==", "m_aBuf", ".", "length", ")", "{", "// reallocate", "m_aB...
Reads the given {@link InputStream} completely into the buffer. @param aIS the InputStream to read from. May not be <code>null</code>. Is not closed internally. @throws IOException If reading fails
[ "Reads", "the", "given", "{", "@link", "InputStream", "}", "completely", "into", "the", "buffer", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/NonBlockingByteArrayOutputStream.java#L169-L184
train
Read from an input stream.
Of course, here is the Java code you requested: ```java public void readFrom (@Nonnull @WillNotClose final InputStream aIS) throws IOException { while (true) { if (m_nCount == m_aBuf.length) { // reallocate m_aBuf = _enlarge (m_aBuf, m_aBuf.length << 1); } final int n...
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/UniverseApi.java
UniverseApi.getUniverseGroups
public List<Integer> getUniverseGroups(String datasource, String ifNoneMatch, Integer page) throws ApiException { ApiResponse<List<Integer>> resp = getUniverseGroupsWithHttpInfo(datasource, ifNoneMatch, page); return resp.getData(); }
java
public List<Integer> getUniverseGroups(String datasource, String ifNoneMatch, Integer page) throws ApiException { ApiResponse<List<Integer>> resp = getUniverseGroupsWithHttpInfo(datasource, ifNoneMatch, page); return resp.getData(); }
[ "public", "List", "<", "Integer", ">", "getUniverseGroups", "(", "String", "datasource", ",", "String", "ifNoneMatch", ",", "Integer", "page", ")", "throws", "ApiException", "{", "ApiResponse", "<", "List", "<", "Integer", ">>", "resp", "=", "getUniverseGroupsWi...
Get item groups Get a list of item groups --- This route expires daily at 11:05 @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional) @param page Which page of res...
[ "Get", "item", "groups", "Get", "a", "list", "of", "item", "groups", "---", "This", "route", "expires", "daily", "at", "11", ":", "05" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/UniverseApi.java#L1697-L1700
train
Get list of groups Get list of groups
Of course, here is the Java code you requested: ```java public List<Integer> getUniverseGroups(String datasource, String ifNoneMatch, Integer page) throws ApiException { ApiResponse<List<Integer>> resp = getUniverseGroupsWithHttpInfo(datasource, ifNoneMatch, page); return resp.getData(); } ``` Hop...
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/webapp/ServerRelativeArchivalRedirect.java
ServerRelativeArchivalRedirect.getOrigin
protected ArchivalUrlRef getOrigin(HttpServletRequest httpRequest) { // TODO: check if this works with non-empty context path. // I believe requestURI starts with context path. So non-empty // context path will break collection and timestamp extraction // code below. It'd be desirable for this class to get a pa...
java
protected ArchivalUrlRef getOrigin(HttpServletRequest httpRequest) { // TODO: check if this works with non-empty context path. // I believe requestURI starts with context path. So non-empty // context path will break collection and timestamp extraction // code below. It'd be desirable for this class to get a pa...
[ "protected", "ArchivalUrlRef", "getOrigin", "(", "HttpServletRequest", "httpRequest", ")", "{", "// TODO: check if this works with non-empty context path.", "// I believe requestURI starts with context path. So non-empty", "// context path will break collection and timestamp extraction", "// c...
Return the Archival-URL projection of request origin, that should give a context necessary to redirect the leaked request back to Archival-URL space. <p> Default implementation parses {@code Referer} header. Sub class may override this method to use alternative method of obtaining equivalent information. Typically you ...
[ "Return", "the", "Archival", "-", "URL", "projection", "of", "request", "origin", "that", "should", "give", "a", "context", "necessary", "to", "redirect", "the", "leaked", "request", "back", "to", "Archival", "-", "URL", "space", ".", "<p", ">", "Default", ...
da74c3a59a5b5a5c365bd4702dcb45d263535794
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/webapp/ServerRelativeArchivalRedirect.java#L97-L163
train
Get the original URL of the original request.
Of course, here is the Java code you requested: ```java protected ArchivalUrlRef getOrigin(HttpServletRequest httpRequest) { // TODO: check if this works with non-empty context path. // I believe requestURI starts with context path. So non-empty // context path will break collection and timestamp extraction //...
resilience4j/resilience4j
resilience4j-bulkhead/src/main/java/io/github/resilience4j/bulkhead/internal/InMemoryThreadPoolBulkheadRegistry.java
InMemoryThreadPoolBulkheadRegistry.bulkhead
@Override public ThreadPoolBulkhead bulkhead(String name, ThreadPoolBulkheadConfig config) { return computeIfAbsent(name, () -> ThreadPoolBulkhead.of(name, Objects.requireNonNull(config, CONFIG_MUST_NOT_BE_NULL))); }
java
@Override public ThreadPoolBulkhead bulkhead(String name, ThreadPoolBulkheadConfig config) { return computeIfAbsent(name, () -> ThreadPoolBulkhead.of(name, Objects.requireNonNull(config, CONFIG_MUST_NOT_BE_NULL))); }
[ "@", "Override", "public", "ThreadPoolBulkhead", "bulkhead", "(", "String", "name", ",", "ThreadPoolBulkheadConfig", "config", ")", "{", "return", "computeIfAbsent", "(", "name", ",", "(", ")", "->", "ThreadPoolBulkhead", ".", "of", "(", "name", ",", "Objects", ...
{@inheritDoc}
[ "{" ]
fa843d30f531c00f0c3dc218b65a7f2bb51af336
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-bulkhead/src/main/java/io/github/resilience4j/bulkhead/internal/InMemoryThreadPoolBulkheadRegistry.java#L79-L82
train
Gets the bulkhead with the given name.
Of course, here is the Java code you requested: ```java @Override public ThreadPoolBulkhead bulkhead(String name, ThreadPoolBulkheadConfig config) { return computeIfAbsent(name, () -> ThreadPoolBulkhead.of(name, Objects.requireNonNull(config, CONFIG_MUST_NOT_BE_NULL))); } ``` Hope this helps!
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobInProgress.java
JobInProgress.failedTask
public void failedTask(TaskInProgress tip, TaskAttemptID taskid, String reason, TaskStatus.Phase phase, TaskStatus.State state, String trackerName) { TaskStatus status = TaskStatus.createTaskStatus(tip.isMapTask(), ...
java
public void failedTask(TaskInProgress tip, TaskAttemptID taskid, String reason, TaskStatus.Phase phase, TaskStatus.State state, String trackerName) { TaskStatus status = TaskStatus.createTaskStatus(tip.isMapTask(), ...
[ "public", "void", "failedTask", "(", "TaskInProgress", "tip", ",", "TaskAttemptID", "taskid", ",", "String", "reason", ",", "TaskStatus", ".", "Phase", "phase", ",", "TaskStatus", ".", "State", "state", ",", "String", "trackerName", ")", "{", "TaskStatus", "st...
Fail a task with a given reason, but without a status object. Assuming {@link JobTracker} is locked on entry. @param tip The task's tip @param taskid The task id @param reason The reason that the task failed @param trackerName The task tracker the task failed on
[ "Fail", "a", "task", "with", "a", "given", "reason", "but", "without", "a", "status", "object", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobInProgress.java#L3331-L3368
train
This method is called by the jobtracker when a failed task is encountered.
Of course, here is the Java code you requested: ```java public void failedTask(TaskInProgress tip, TaskAttemptID taskid, String reason, TaskStatus.Phase phase, TaskStatus.State state, String trackerName) { TaskStatus status = TaskStatus.createTaskStatus(tip.isMapTa...
csc19601128/Phynixx
phynixx/phynixx-logger/src/main/java/org/csc/phynixx/loggersystem/logger/channellogger/FileChannelDataLogger.java
FileChannelDataLogger.replay
public void replay(IDataLoggerReplay replay) throws IOException { maybeRead(); this.randomAccess.rewind(); while (this.randomAccess.available() > (Integer.SIZE / Byte.SIZE)) { int length = this.randomAccess.readInt(); short type = this.randomAccess.readShort(); XALogRecordType recordType = XALogRecordTy...
java
public void replay(IDataLoggerReplay replay) throws IOException { maybeRead(); this.randomAccess.rewind(); while (this.randomAccess.available() > (Integer.SIZE / Byte.SIZE)) { int length = this.randomAccess.readInt(); short type = this.randomAccess.readShort(); XALogRecordType recordType = XALogRecordTy...
[ "public", "void", "replay", "(", "IDataLoggerReplay", "replay", ")", "throws", "IOException", "{", "maybeRead", "(", ")", ";", "this", ".", "randomAccess", ".", "rewind", "(", ")", ";", "while", "(", "this", ".", "randomAccess", ".", "available", "(", ")",...
the records a recovered from the format described in {@link #write(short, byte[][])} @param replay replayListener @throws IOException
[ "the", "records", "a", "recovered", "from", "the", "format", "described", "in", "{", "@link", "#write", "(", "short", "byte", "[]", "[]", ")", "}" ]
a26c03bc229a8882c647799834115bec6bdc0ac8
https://github.com/csc19601128/Phynixx/blob/a26c03bc229a8882c647799834115bec6bdc0ac8/phynixx/phynixx-logger/src/main/java/org/csc/phynixx/loggersystem/logger/channellogger/FileChannelDataLogger.java#L355-L371
train
Replay the data.
Of course, here is the Java code you requested: ```java public void replay(IDataLoggerReplay replay) throws IOException { maybeRead(); this.randomAccess.rewind(); while (this.randomAccess.available() > (Integer.SIZE / Byte.SIZE)) { int length = this.randomAccess.readInt(); short type = this.randomAccess.r...
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/time/UtcTimeUtilities.java
UtcTimeUtilities.fromStringWithMinutes
public static DateTime fromStringWithMinutes( String dateTimeString ) { DateTime dt = withMinutesformatter.parseDateTime(dateTimeString); return dt; }
java
public static DateTime fromStringWithMinutes( String dateTimeString ) { DateTime dt = withMinutesformatter.parseDateTime(dateTimeString); return dt; }
[ "public", "static", "DateTime", "fromStringWithMinutes", "(", "String", "dateTimeString", ")", "{", "DateTime", "dt", "=", "withMinutesformatter", ".", "parseDateTime", "(", "dateTimeString", ")", ";", "return", "dt", ";", "}" ]
Get {@link DateTime} from date string of format: YYYY-MM-DD HH:MM. @param dateTimeString the date string. @return the parsed datetime.
[ "Get", "{", "@link", "DateTime", "}", "from", "date", "string", "of", "format", ":", "YYYY", "-", "MM", "-", "DD", "HH", ":", "MM", "." ]
d2b436bbdf951dc1fda56096a42dbc0eae4d35a5
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/time/UtcTimeUtilities.java#L74-L77
train
Parse a string with minutes.
Of course, here is the Java code you requested: ```java public static DateTime fromStringWithMinutes( String dateTimeString ) { DateTime dt = withMinutesformatter.parseDateTime(dateTimeString); return dt; } ``` Hope this helps!
kiegroup/jbpm
jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/BpsimPackageImpl.java
BpsimPackageImpl.createPackageContents
public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features betaDistributionTypeEClass = createEClass(BETA_DISTRIBUTION_TYPE); createEAttribute(betaDistributionTypeEClass, BETA_DISTRIBUTION_TYPE__SCALE); createEAttribute(betaDistributionTypeEClass, BE...
java
public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features betaDistributionTypeEClass = createEClass(BETA_DISTRIBUTION_TYPE); createEAttribute(betaDistributionTypeEClass, BETA_DISTRIBUTION_TYPE__SCALE); createEAttribute(betaDistributionTypeEClass, BE...
[ "public", "void", "createPackageContents", "(", ")", "{", "if", "(", "isCreated", ")", "return", ";", "isCreated", "=", "true", ";", "// Create classes and their features", "betaDistributionTypeEClass", "=", "createEClass", "(", "BETA_DISTRIBUTION_TYPE", ")", ";", "cr...
Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "Creates", "the", "meta", "-", "model", "objects", "for", "the", "package", ".", "This", "method", "is", "guarded", "to", "have", "no", "affect", "on", "any", "invocation", "but", "its", "first", ".", "<!", "--", "begin", "-", "user", "-", "doc", "--",...
c3473c728aa382ebbea01e380c5e754a96647b82
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/BpsimPackageImpl.java#L2178-L2415
train
Create the package contents.
Of course, here is the Java code you requested: ```java public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features betaDistributionTypeEClass = createEClass(BETA_DISTRIBUTION_TYPE); createEAttribute(betaDistributionTypeEClass, BETA_DISTRIBUTION_TYPE__...
aws/aws-sdk-java
aws-java-sdk-codecommit/src/main/java/com/amazonaws/services/codecommit/model/transform/PullRequestCreatedEventMetadataMarshaller.java
PullRequestCreatedEventMetadataMarshaller.marshall
public void marshall(PullRequestCreatedEventMetadata pullRequestCreatedEventMetadata, ProtocolMarshaller protocolMarshaller) { if (pullRequestCreatedEventMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarsha...
java
public void marshall(PullRequestCreatedEventMetadata pullRequestCreatedEventMetadata, ProtocolMarshaller protocolMarshaller) { if (pullRequestCreatedEventMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarsha...
[ "public", "void", "marshall", "(", "PullRequestCreatedEventMetadata", "pullRequestCreatedEventMetadata", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "pullRequestCreatedEventMetadata", "==", "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-codecommit/src/main/java/com/amazonaws/services/codecommit/model/transform/PullRequestCreatedEventMetadataMarshaller.java#L48-L62
train
marshalls the given pull request created event metadata to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(PullRequestCreatedEventMetadata pullRequestCreatedEventMetadata, ProtocolMarshaller protocolMarshaller) { if (pullRequestCreatedEventMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(.....
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Groups.java
Groups.groupBy
public static <K, V, C extends Collection<V>> Map<K, C> groupBy(Iterator<V> groupies, Function<V, K> grouper, Supplier<C> collectionProvider) { return new GroupBy<>(grouper, collectionProvider, new HashMapFactory<>()).apply(groupies); }
java
public static <K, V, C extends Collection<V>> Map<K, C> groupBy(Iterator<V> groupies, Function<V, K> grouper, Supplier<C> collectionProvider) { return new GroupBy<>(grouper, collectionProvider, new HashMapFactory<>()).apply(groupies); }
[ "public", "static", "<", "K", ",", "V", ",", "C", "extends", "Collection", "<", "V", ">", ">", "Map", "<", "K", ",", "C", ">", "groupBy", "(", "Iterator", "<", "V", ">", "groupies", ",", "Function", "<", "V", ",", "K", ">", "grouper", ",", "Sup...
Groups elements from an iterator in the key evaluated from the passed function. E.g: <code>groupBy([1, 2, 3, 1], id) -> { 1: [1,1], 2: [2], 3: [3]}</code> @param <K> the grouped key type @param <V> the grouped value type @param <C> the collection type used as value of the map @param groupies the elements to be grouped...
[ "Groups", "elements", "from", "an", "iterator", "in", "the", "key", "evaluated", "from", "the", "passed", "function", ".", "E", ".", "g", ":", "<code", ">", "groupBy", "(", "[", "1", "2", "3", "1", "]", "id", ")", "-", ">", "{", "1", ":", "[", ...
98115a436e35335c5e8831f9fdc12f6d93d524be
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Groups.java#L57-L59
train
Group by method.
Of course, here is the Java code you requested: ```java public static <K, V, C extends Collection<V>> Map<K, C> groupBy(Iterator<V> groupies, Function<V, K> grouper, Supplier<C> collectionProvider) { return new GroupBy<>(grouper, collectionProvider, new HashMapFactory<>()).apply(groupies); } ``` Hope this...
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.fetchByUUID_G
@Override public CommerceNotificationTemplate fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
java
@Override public CommerceNotificationTemplate fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CommerceNotificationTemplate", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the commerce notification template where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching commerce notification template, or <code>null</code> if a matching commerce notification ...
[ "Returns", "the", "commerce", "notification", "template", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "f...
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L716-L719
train
Returns the commerce notification template with the matching UUID and group.
Of course, here is the Java code you requested: ```java @Override public CommerceNotificationTemplate fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); } ``` Hope this helps!
m-m-m/util
pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/DefaultPojoDescriptorEnhancer.java
DefaultPojoDescriptorEnhancer.addVirtualAccessor
private void addVirtualAccessor(AbstractPojoPropertyDescriptor propertyDescriptor, PojoPropertyAccessor accessor) { LOG.trace("adding virtual accessor: {}", accessor); propertyDescriptor.putAccessor(accessor); }
java
private void addVirtualAccessor(AbstractPojoPropertyDescriptor propertyDescriptor, PojoPropertyAccessor accessor) { LOG.trace("adding virtual accessor: {}", accessor); propertyDescriptor.putAccessor(accessor); }
[ "private", "void", "addVirtualAccessor", "(", "AbstractPojoPropertyDescriptor", "propertyDescriptor", ",", "PojoPropertyAccessor", "accessor", ")", "{", "LOG", ".", "trace", "(", "\"adding virtual accessor: {}\"", ",", "accessor", ")", ";", "propertyDescriptor", ".", "put...
This method adds the given {@code accessor} to the given {@code propertyDescriptor}. @param propertyDescriptor is the descriptor of the property where to add the given {@code accessor}. @param accessor is the (virtual) accessor to add.
[ "This", "method", "adds", "the", "given", "{", "@code", "accessor", "}", "to", "the", "given", "{", "@code", "propertyDescriptor", "}", "." ]
f0e4e084448f8dfc83ca682a9e1618034a094ce6
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/DefaultPojoDescriptorEnhancer.java#L211-L215
train
Add a virtual accessor to the given property descriptor.
Of course, here is the Java code you requested: ```java private void addVirtualAccessor(AbstractPojoPropertyDescriptor propertyDescriptor, PojoPropertyAccessor accessor) { LOG.trace("adding virtual accessor: {}", accessor); propertyDescriptor.putAccessor(accessor); } ``` Hope this helps!
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.sub
public static BigDecimal sub(Number v1, Number v2) { return sub(new Number[] { v1, v2 }); }
java
public static BigDecimal sub(Number v1, Number v2) { return sub(new Number[] { v1, v2 }); }
[ "public", "static", "BigDecimal", "sub", "(", "Number", "v1", ",", "Number", "v2", ")", "{", "return", "sub", "(", "new", "Number", "[", "]", "{", "v1", ",", "v2", "}", ")", ";", "}" ]
提供精确的减法运算<br> 如果传入多个值为null或者空,则返回0 @param v1 被减数 @param v2 减数 @return 差
[ "提供精确的减法运算<br", ">", "如果传入多个值为null或者空,则返回0" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L248-L250
train
Returns the subtraction of two numbers.
Of course, here is the Java code you requested: ```java public static BigDecimal sub(Number v1, Number v2) { return sub(new Number[] { v1, v2 }); } ``` Hope this helps!
vipshop/vjtools
vjkit/src/main/java/com/vip/vjtools/vjkit/base/BooleanUtil.java
BooleanUtil.parseGeneralString
public static Boolean parseGeneralString(String str, Boolean defaultValue) { return BooleanUtils.toBooleanDefaultIfNull(BooleanUtils.toBooleanObject(str), defaultValue); }
java
public static Boolean parseGeneralString(String str, Boolean defaultValue) { return BooleanUtils.toBooleanDefaultIfNull(BooleanUtils.toBooleanObject(str), defaultValue); }
[ "public", "static", "Boolean", "parseGeneralString", "(", "String", "str", ",", "Boolean", "defaultValue", ")", "{", "return", "BooleanUtils", ".", "toBooleanDefaultIfNull", "(", "BooleanUtils", ".", "toBooleanObject", "(", "str", ")", ",", "defaultValue", ")", ";...
支持true/false,on/off, y/n, yes/no的转换, str为空或无法分析时返回defaultValue
[ "支持true", "/", "false", "on", "/", "off", "y", "/", "n", "yes", "/", "no的转换", "str为空或无法分析时返回defaultValue" ]
60c743da35913d72f37f2d79afa90ad2bf73cb89
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjkit/src/main/java/com/vip/vjtools/vjkit/base/BooleanUtil.java#L45-L47
train
Parse a general string.
Of course, here is the Java code you requested: ```java public static Boolean parseGeneralString(String str, Boolean defaultValue) { return BooleanUtils.toBooleanDefaultIfNull(BooleanUtils.toBooleanObject(str), defaultValue); } ``` Hope this helps!
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/client/JobSubmissionHelper.java
JobSubmissionHelper.toJar
private static File toJar(final File file) throws IOException { final File tempFolder = Files.createTempDirectory("reef-tmp-tempFolder").toFile(); final File jarFile = File.createTempFile(file.getCanonicalFile().getName(), ".jar", tempFolder); LOG.log(Level.FINEST, "Adding contents of folder {0} to {1}", ne...
java
private static File toJar(final File file) throws IOException { final File tempFolder = Files.createTempDirectory("reef-tmp-tempFolder").toFile(); final File jarFile = File.createTempFile(file.getCanonicalFile().getName(), ".jar", tempFolder); LOG.log(Level.FINEST, "Adding contents of folder {0} to {1}", ne...
[ "private", "static", "File", "toJar", "(", "final", "File", "file", ")", "throws", "IOException", "{", "final", "File", "tempFolder", "=", "Files", ".", "createTempDirectory", "(", "\"reef-tmp-tempFolder\"", ")", ".", "toFile", "(", ")", ";", "final", "File", ...
Turns temporary folder "foo" into a jar file "foo.jar". @param file @return @throws IOException
[ "Turns", "temporary", "folder", "foo", "into", "a", "jar", "file", "foo", ".", "jar", "." ]
e2c47121cde21108a602c560cf76565a40d0e916
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/client/JobSubmissionHelper.java#L179-L187
train
Create a temp file and add the contents of the file to the jar.
Of course, here is the Java code you requested: ```java private static File toJar(final File file) throws IOException { final File tempFolder = Files.createTempDirectory("reef-tmp-tempFolder").toFile(); final File jarFile = File.createTempFile(file.getCanonicalFile().getName(), ".jar", tempFolder); LOG.log...
google/j2objc
jre_emul/android/frameworks/base/core/java/android/text/TextUtils.java
TextUtils.getTrimmedLength
public static int getTrimmedLength(CharSequence s) { int len = s.length(); int start = 0; while (start < len && s.charAt(start) <= ' ') { start++; } int end = len; while (end > start && s.charAt(end - 1) <= ' ') { end--; } return...
java
public static int getTrimmedLength(CharSequence s) { int len = s.length(); int start = 0; while (start < len && s.charAt(start) <= ' ') { start++; } int end = len; while (end > start && s.charAt(end - 1) <= ' ') { end--; } return...
[ "public", "static", "int", "getTrimmedLength", "(", "CharSequence", "s", ")", "{", "int", "len", "=", "s", ".", "length", "(", ")", ";", "int", "start", "=", "0", ";", "while", "(", "start", "<", "len", "&&", "s", ".", "charAt", "(", "start", ")", ...
Returns the length that the specified CharSequence would have if spaces and control characters were trimmed from the start and end, as by {@link String#trim}.
[ "Returns", "the", "length", "that", "the", "specified", "CharSequence", "would", "have", "if", "spaces", "and", "control", "characters", "were", "trimmed", "from", "the", "start", "and", "end", "as", "by", "{" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/TextUtils.java#L429-L443
train
Get the length of the string that is trimmed.
Of course, here is the Java code you requested: ```java public static int getTrimmedLength(CharSequence s) { int len = s.length(); int start = 0; while (start < len && s.charAt(start) <= ' ') { start++; } int end = len; while (end > start && s.charAt(end - ...
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.deleteSubscription
public PubsubFuture<Void> deleteSubscription(final String canonicalSubscriptionName) { validateCanonicalSubscription(canonicalSubscriptionName); return delete("delete subscription", canonicalSubscriptionName, VOID); }
java
public PubsubFuture<Void> deleteSubscription(final String canonicalSubscriptionName) { validateCanonicalSubscription(canonicalSubscriptionName); return delete("delete subscription", canonicalSubscriptionName, VOID); }
[ "public", "PubsubFuture", "<", "Void", ">", "deleteSubscription", "(", "final", "String", "canonicalSubscriptionName", ")", "{", "validateCanonicalSubscription", "(", "canonicalSubscriptionName", ")", ";", "return", "delete", "(", "\"delete subscription\"", ",", "canonica...
Delete a Pub/Sub subscription. @param canonicalSubscriptionName The canonical (including project) name of the subscription to delete. @return A future that is completed when this request is completed. The future will be completed with {@code null} if the response is 404.
[ "Delete", "a", "Pub", "/", "Sub", "subscription", "." ]
7d021528fa5bc29be458e6f210fa62f59b71d004
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L468-L471
train
Delete a subscription.
Of course, here is the Java code you requested: ```java public PubsubFuture<Void> deleteSubscription(final String canonicalSubscriptionName) { validateCanonicalSubscription(canonicalSubscriptionName); return delete("delete subscription", canonicalSubscriptionName, VOID); } ``` Hope this helps!
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java
JsonWriter.registerWriterInterfaceLast
public void registerWriterInterfaceLast(Class<?> interFace, JsonWriterI<?> writer) { writerInterfaces.addLast(new WriterByInterface(interFace, writer)); }
java
public void registerWriterInterfaceLast(Class<?> interFace, JsonWriterI<?> writer) { writerInterfaces.addLast(new WriterByInterface(interFace, writer)); }
[ "public", "void", "registerWriterInterfaceLast", "(", "Class", "<", "?", ">", "interFace", ",", "JsonWriterI", "<", "?", ">", "writer", ")", "{", "writerInterfaces", ".", "addLast", "(", "new", "WriterByInterface", "(", "interFace", ",", "writer", ")", ")", ...
associate an Writer to a interface With Low priority @param interFace interface to map @param writer writer Object
[ "associate", "an", "Writer", "to", "a", "interface", "With", "Low", "priority" ]
bfb3daef039e22a7bbff5f76bf14ea23330cd70e
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java#L343-L345
train
Registers a writer interface last.
Of course, here is the Java code you requested: ```java public void registerWriterInterfaceLast(Class<?> interFace, JsonWriterI<?> writer) { writerInterfaces.addLast(new WriterByInterface(interFace, writer)); } ``` Hope this helps!
mapbox/mapbox-navigation-android
libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationViewEventDispatcher.java
NavigationViewEventDispatcher.initializeListeners
void initializeListeners(NavigationViewOptions navigationViewOptions, NavigationViewModel navigationViewModel) { assignFeedbackListener(navigationViewOptions.feedbackListener()); assignNavigationListener(navigationViewOptions.navigationListener(), navigationViewModel); assignRouteListener(navigationViewOpti...
java
void initializeListeners(NavigationViewOptions navigationViewOptions, NavigationViewModel navigationViewModel) { assignFeedbackListener(navigationViewOptions.feedbackListener()); assignNavigationListener(navigationViewOptions.navigationListener(), navigationViewModel); assignRouteListener(navigationViewOpti...
[ "void", "initializeListeners", "(", "NavigationViewOptions", "navigationViewOptions", ",", "NavigationViewModel", "navigationViewModel", ")", "{", "assignFeedbackListener", "(", "navigationViewOptions", ".", "feedbackListener", "(", ")", ")", ";", "assignNavigationListener", ...
Initializes the listeners in the dispatcher, as well as the listeners in the {@link MapboxNavigation} @param navigationViewOptions that contains all listeners to attach
[ "Initializes", "the", "listeners", "in", "the", "dispatcher", "as", "well", "as", "the", "listeners", "in", "the", "{", "@link", "MapboxNavigation", "}" ]
375a89c017d360b9defc2c90d0c03468165162ec
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationViewEventDispatcher.java#L45-L56
train
Initialize the listeners.
Of course, here is the Java code you requested: ```java void initializeListeners(NavigationViewOptions navigationViewOptions, NavigationViewModel navigationViewModel) { assignFeedbackListener(navigationViewOptions.feedbackListener()); assignNavigationListener(navigationViewOptions.navigationListener(), navigat...
alkacon/opencms-core
src-gwt/org/opencms/ui/client/CmsSingleFileUploadHandler.java
CmsSingleFileUploadHandler.setCloseHandler
public void setCloseHandler(CloseHandler<PopupPanel> closeHandler) { m_closeHandler = closeHandler; if (m_dialog != null) { m_dialog.addCloseHandler(closeHandler); } }
java
public void setCloseHandler(CloseHandler<PopupPanel> closeHandler) { m_closeHandler = closeHandler; if (m_dialog != null) { m_dialog.addCloseHandler(closeHandler); } }
[ "public", "void", "setCloseHandler", "(", "CloseHandler", "<", "PopupPanel", ">", "closeHandler", ")", "{", "m_closeHandler", "=", "closeHandler", ";", "if", "(", "m_dialog", "!=", "null", ")", "{", "m_dialog", ".", "addCloseHandler", "(", "closeHandler", ")", ...
Sets the dialog close handler.<p> @param closeHandler the close handler
[ "Sets", "the", "dialog", "close", "handler", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ui/client/CmsSingleFileUploadHandler.java#L161-L167
train
Set the close handler.
Of course, here is the Java code you requested: ```java public void setCloseHandler(CloseHandler<PopupPanel> closeHandler) { m_closeHandler = closeHandler; if (m_dialog != null) { m_dialog.addCloseHandler(closeHandler); } } ``` Hope this helps!
RestComm/mss-arquillian
mss-tomcat-embedded-7/src/main/java/org/jboss/arquillian/container/mobicents/servlet/sip/tomcat/embedded_7/MobicentsSipServletsEmbeddedImpl.java
MobicentsSipServletsEmbeddedImpl.createConnector
@Override public Connector createConnector(String address, int port, String protocol) { Connector connector = null; if (address != null) { /* * InetAddress.toString() returns a string of the form * "<hostname>/<literal_IP>". Get the latter part, so that the * address can be p...
java
@Override public Connector createConnector(String address, int port, String protocol) { Connector connector = null; if (address != null) { /* * InetAddress.toString() returns a string of the form * "<hostname>/<literal_IP>". Get the latter part, so that the * address can be p...
[ "@", "Override", "public", "Connector", "createConnector", "(", "String", "address", ",", "int", "port", ",", "String", "protocol", ")", "{", "Connector", "connector", "=", "null", ";", "if", "(", "address", "!=", "null", ")", "{", "/*\n\t * InetAddress.to...
/* (non-Javadoc) @see org.jboss.arquillian.container.mobicents.servlet.sip.embedded_1.MobicentsSipServletsEmbedded#createConnector(java.lang.String, int, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
d217b4e53701282c6e7176365a03be6f898342be
https://github.com/RestComm/mss-arquillian/blob/d217b4e53701282c6e7176365a03be6f898342be/mss-tomcat-embedded-7/src/main/java/org/jboss/arquillian/container/mobicents/servlet/sip/tomcat/embedded_7/MobicentsSipServletsEmbeddedImpl.java#L277-L331
train
Create a connector.
Of course, here is the Java code you requested: ```java @Override public Connector createConnector(String address, int port, String protocol) { Connector connector = null; if (address != null) { /* * InetAddress.toString() returns a string of the form * "<hostname>/<literal_IP>". ...
geomajas/geomajas-project-client-gwt
plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java
FeatureListGridTab.onSelectionChanged
public void onSelectionChanged(SelectionEvent event) { int count = event.getSelection().length; if (count == 0) { focusButton.setDisabled(true); showButton.setDisabled(true); } else if (count == 1) { focusButton.setDisabled(false); showButton.setDisabled(false); } else { focusButton.setDisabled(f...
java
public void onSelectionChanged(SelectionEvent event) { int count = event.getSelection().length; if (count == 0) { focusButton.setDisabled(true); showButton.setDisabled(true); } else if (count == 1) { focusButton.setDisabled(false); showButton.setDisabled(false); } else { focusButton.setDisabled(f...
[ "public", "void", "onSelectionChanged", "(", "SelectionEvent", "event", ")", "{", "int", "count", "=", "event", ".", "getSelection", "(", ")", ".", "length", ";", "if", "(", "count", "==", "0", ")", "{", "focusButton", ".", "setDisabled", "(", "true", ")...
----------------------------------------------------------
[ "----------------------------------------------------------" ]
1c1adc48deb192ed825265eebcc74d70bbf45670
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/FeatureListGridTab.java#L257-L272
train
On selection changed.
Of course, here is the Java code you requested: ```java public void onSelectionChanged(SelectionEvent event) { int count = event.getSelection().length; if (count == 0) { focusButton.setDisabled(true); showButton.setDisabled(true); } else if (count == 1) { focusButton.setDisabled(false); showButton.se...
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/combobox/model/AbstractComboBoxModel.java
AbstractComboBoxModel.setSelectedItem
@SuppressWarnings("unchecked") @Override public void setSelectedItem(final Object anItem) { selectedItem = (T)anItem; this.fireContentsChanged(this, 0, getSize()); }
java
@SuppressWarnings("unchecked") @Override public void setSelectedItem(final Object anItem) { selectedItem = (T)anItem; this.fireContentsChanged(this, 0, getSize()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "void", "setSelectedItem", "(", "final", "Object", "anItem", ")", "{", "selectedItem", "=", "(", "T", ")", "anItem", ";", "this", ".", "fireContentsChanged", "(", "this", ",", "0"...
{@inheritDoc}
[ "{" ]
4045e85cabd8f0ce985cbfff134c3c9873930c79
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/combobox/model/AbstractComboBoxModel.java#L195-L201
train
Sets the selected item.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @Override public void setSelectedItem(final Object anItem) { selectedItem = (T)anItem; this.fireContentsChanged(this, 0, getSize()); } ``` Hope this helps!
davetcc/tcMenu
tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/state/MenuTree.java
MenuTree.getMenuItems
public List<MenuItem> getMenuItems(MenuItem item) { synchronized (subMenuItems) { ArrayList<MenuItem> menuItems = subMenuItems.get(item); return menuItems == null ? null : Collections.unmodifiableList(menuItems); } }
java
public List<MenuItem> getMenuItems(MenuItem item) { synchronized (subMenuItems) { ArrayList<MenuItem> menuItems = subMenuItems.get(item); return menuItems == null ? null : Collections.unmodifiableList(menuItems); } }
[ "public", "List", "<", "MenuItem", ">", "getMenuItems", "(", "MenuItem", "item", ")", "{", "synchronized", "(", "subMenuItems", ")", "{", "ArrayList", "<", "MenuItem", ">", "menuItems", "=", "subMenuItems", ".", "get", "(", "item", ")", ";", "return", "men...
Get a list of all menu items for a given submenu @param item the submenu to use @return a list of submenu items that's immutable
[ "Get", "a", "list", "of", "all", "menu", "items", "for", "a", "given", "submenu" ]
61546e4b982b25ceaff384073fe9ec1fff55e64a
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/state/MenuTree.java#L242-L247
train
Get the menu items for a given menu item.
Of course, here is the Java code you requested: ```java public List<MenuItem> getMenuItems(MenuItem item) { synchronized (subMenuItems) { ArrayList<MenuItem> menuItems = subMenuItems.get(item); return menuItems == null ? null : Collections.unmodifiableList(menuItems); } } ``...
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java
ScriptActionsInner.listByClusterNextWithServiceResponseAsync
public Observable<ServiceResponse<Page<RuntimeScriptActionDetailInner>>> listByClusterNextWithServiceResponseAsync(final String nextPageLink) { return listByClusterNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<RuntimeScriptActionDetailInner>>, Observable<ServiceResponse...
java
public Observable<ServiceResponse<Page<RuntimeScriptActionDetailInner>>> listByClusterNextWithServiceResponseAsync(final String nextPageLink) { return listByClusterNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<RuntimeScriptActionDetailInner>>, Observable<ServiceResponse...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "RuntimeScriptActionDetailInner", ">", ">", ">", "listByClusterNextWithServiceResponseAsync", "(", "final", "String", "nextPageLink", ")", "{", "return", "listByClusterNextSinglePageAsync", "(", "nextPageLink...
Lists all the persisted script actions for the specified cluster. @param nextPageLink The NextLink from the previous successful call to List operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;RuntimeScriptActionDetailInner&gt; object
[ "Lists", "all", "the", "persisted", "script", "actions", "for", "the", "specified", "cluster", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ScriptActionsInner.java#L451-L463
train
List by cluster.
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<Page<RuntimeScriptActionDetailInner>>> listByClusterNextWithServiceResponseAsync(final String nextPageLink) { return listByClusterNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<Run...
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.getSelectedText
public String getSelectedText( ParsedPage pp ){ if( pp == null ) return null; StringBuilder sb = new StringBuilder(); levelModifier = pp.getSection(0).getLevel()-1; if( pageHandling == null ){ if( firstParagraphHandling != null ){ handleContent( pp.getFirstParagraph(), firstParagraphHandling...
java
public String getSelectedText( ParsedPage pp ){ if( pp == null ) return null; StringBuilder sb = new StringBuilder(); levelModifier = pp.getSection(0).getLevel()-1; if( pageHandling == null ){ if( firstParagraphHandling != null ){ handleContent( pp.getFirstParagraph(), firstParagraphHandling...
[ "public", "String", "getSelectedText", "(", "ParsedPage", "pp", ")", "{", "if", "(", "pp", "==", "null", ")", "return", "null", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "levelModifier", "=", "pp", ".", "getSection", "(", "0...
Returns the Information of a ParsedPage which are selected by the actual configuration
[ "Returns", "the", "Information", "of", "a", "ParsedPage", "which", "are", "selected", "by", "the", "actual", "configuration" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L216-L249
train
Get the selected text from a ParsedPage.
Of course, here is the Java code you requested: ```java public String getSelectedText( ParsedPage pp ){ if( pp == null ) return null; StringBuilder sb = new StringBuilder(); levelModifier = pp.getSection(0).getLevel()-1; if( pageHandling == null ){ if( firstParagraphHandling != null ){ hand...
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpContext.java
ServletHttpContext.addServlet
public synchronized ServletHolder addServlet(String pathSpec, String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException { return addServlet(className,pathSpec,className); }
java
public synchronized ServletHolder addServlet(String pathSpec, String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException { return addServlet(className,pathSpec,className); }
[ "public", "synchronized", "ServletHolder", "addServlet", "(", "String", "pathSpec", ",", "String", "className", ")", "throws", "ClassNotFoundException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "return", "addServlet", "(", "className", ",", "pa...
Add a servlet to the context. Conveniance method. If no ServletHandler is found in the context, a new one is added. @param pathSpec The pathspec within the context @param className The classname of the servlet. @return The ServletHolder. @exception ClassNotFoundException @exception InstantiationException @exception Ill...
[ "Add", "a", "servlet", "to", "the", "context", ".", "Conveniance", "method", ".", "If", "no", "ServletHandler", "is", "found", "in", "the", "context", "a", "new", "one", "is", "added", "." ]
a9252e62246ac33d55d51b993ba1159404e7d389
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpContext.java#L90-L97
train
Add a servlet to the application.
Of course, here is the Java code you requested: ```java public synchronized ServletHolder addServlet(String pathSpec, String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException { retu...
wisdom-framework/wisdom
core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/HttpUtils.java
HttpUtils.isKeepAlive
public static boolean isKeepAlive(HttpServerRequest request) { String connection = request.headers().get(HeaderNames.CONNECTION); if (connection != null && connection.equalsIgnoreCase(CLOSE)) { return false; } if (request.version() == HttpVersion.HTTP_1_1) { retur...
java
public static boolean isKeepAlive(HttpServerRequest request) { String connection = request.headers().get(HeaderNames.CONNECTION); if (connection != null && connection.equalsIgnoreCase(CLOSE)) { return false; } if (request.version() == HttpVersion.HTTP_1_1) { retur...
[ "public", "static", "boolean", "isKeepAlive", "(", "HttpServerRequest", "request", ")", "{", "String", "connection", "=", "request", ".", "headers", "(", ")", ".", "get", "(", "HeaderNames", ".", "CONNECTION", ")", ";", "if", "(", "connection", "!=", "null",...
Checks whether the given request should be closed or not once completed. @param request the request @return {@code true} if the connection is marked as {@literal keep-alive}, and so must not be closed. {@code false} otherwise. Notice that if not set in the request, the default value depends on the HTTP version.
[ "Checks", "whether", "the", "given", "request", "should", "be", "closed", "or", "not", "once", "completed", "." ]
a35b6431200fec56b178c0ff60837ed73fd7874d
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/HttpUtils.java#L53-L63
train
Check if the request is a keep alive request.
Of course, here is the Java code you requested: ```java public static boolean isKeepAlive(HttpServerRequest request) { String connection = request.headers().get(HeaderNames.CONNECTION); if (connection != null && connection.equalsIgnoreCase(CLOSE)) { return false; } if (reque...
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.registerJsonValueProcessor
public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) { if( key != null && jsonValueProcessor != null ) { keyMap.put( key, jsonValueProcessor ); } }
java
public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) { if( key != null && jsonValueProcessor != null ) { keyMap.put( key, jsonValueProcessor ); } }
[ "public", "void", "registerJsonValueProcessor", "(", "String", "key", ",", "JsonValueProcessor", "jsonValueProcessor", ")", "{", "if", "(", "key", "!=", "null", "&&", "jsonValueProcessor", "!=", "null", ")", "{", "keyMap", ".", "put", "(", "key", ",", "jsonVal...
Registers a JsonValueProcessor.<br> [Java -&gt; JSON] @param key the property name to use as key @param jsonValueProcessor the processor to register
[ "Registers", "a", "JsonValueProcessor", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
9e2b3376ee8f511a48aa7ac05f75a7414e02280f
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L853-L857
train
Register a JsonValueProcessor.
Of course, here is the Java code you requested: ```java public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) { if( key != null && jsonValueProcessor != null ) { keyMap.put( key, jsonValueProcessor ); } } ``` Hope this helps!
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/curves/ForwardCurveWithFixings.java
ForwardCurveWithFixings.getForwards
public double[] getForwards(AnalyticModel model, double[] fixingTimes) { double[] values = new double[fixingTimes.length]; for(int i=0; i<fixingTimes.length; i++) { values[i] = getForward(model, fixingTimes[i]); } return values; }
java
public double[] getForwards(AnalyticModel model, double[] fixingTimes) { double[] values = new double[fixingTimes.length]; for(int i=0; i<fixingTimes.length; i++) { values[i] = getForward(model, fixingTimes[i]); } return values; }
[ "public", "double", "[", "]", "getForwards", "(", "AnalyticModel", "model", ",", "double", "[", "]", "fixingTimes", ")", "{", "double", "[", "]", "values", "=", "new", "double", "[", "fixingTimes", ".", "length", "]", ";", "for", "(", "int", "i", "=", ...
Returns the forwards for a given vector fixing times. @param model An analytic model providing a context. The discount curve (if needed) is obtained from this model. @param fixingTimes The given fixing times. @return The forward rates.
[ "Returns", "the", "forwards", "for", "a", "given", "vector", "fixing", "times", "." ]
a3c067d52dd33feb97d851df6cab130e4116759f
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/ForwardCurveWithFixings.java#L59-L68
train
Returns the forward values of the model given a list of fixing times.
Of course, here is the Java code you requested: ```java public double[] getForwards(AnalyticModel model, double[] fixingTimes) { double[] values = new double[fixingTimes.length]; for(int i=0; i<fixingTimes.length; i++) { values[i] = getForward(model, fixingTimes[i]); } return values; } ``` Hope this he...
google/guava
guava/src/com/google/common/io/Files.java
Files.map
@Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); }
java
@Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); }
[ "@", "Beta", "public", "static", "MappedByteBuffer", "map", "(", "File", "file", ",", "MapMode", "mode", ")", "throws", "IOException", "{", "return", "mapInternal", "(", "file", ",", "mode", ",", "-", "1", ")", ";", "}" ]
Fully maps a file in to memory as per {@link FileChannel#map(java.nio.channels.FileChannel.MapMode, long, long)} using the requested {@link MapMode}. <p>Files are mapped from offset 0 to its length. <p>This only works for files ≤ {@link Integer#MAX_VALUE} bytes. @param file the file to map @param mode the mode to us...
[ "Fully", "maps", "a", "file", "in", "to", "memory", "as", "per", "{", "@link", "FileChannel#map", "(", "java", ".", "nio", ".", "channels", ".", "FileChannel", ".", "MapMode", "long", "long", ")", "}", "using", "the", "requested", "{", "@link", "MapMode"...
7155d12b70a2406fa84d94d4b8b3bc108e89abfd
https://github.com/google/guava/blob/7155d12b70a2406fa84d94d4b8b3bc108e89abfd/guava/src/com/google/common/io/Files.java#L660-L663
valid
Map a file to a byte array.
Of course, here is the Java code you requested: ```java @Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); } ``` Hope this helps!
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java
TableUtil.rowIndexStringToList
public static List<Integer> rowIndexStringToList(final String row) { if (row == null) { return null; } List<Integer> rowIndex = new ArrayList<>(); try { // Convert StringId to array String[] rowIdString = row.split(INDEX_DELIMITER); for (int i = 0; i < rowIdString.length; i++) { rowIndex.add(...
java
public static List<Integer> rowIndexStringToList(final String row) { if (row == null) { return null; } List<Integer> rowIndex = new ArrayList<>(); try { // Convert StringId to array String[] rowIdString = row.split(INDEX_DELIMITER); for (int i = 0; i < rowIdString.length; i++) { rowIndex.add(...
[ "public", "static", "List", "<", "Integer", ">", "rowIndexStringToList", "(", "final", "String", "row", ")", "{", "if", "(", "row", "==", "null", ")", "{", "return", "null", ";", "}", "List", "<", "Integer", ">", "rowIndex", "=", "new", "ArrayList", "<...
Convert the string representation of a row index to a list. @param row the string representation of the row index @return the row index
[ "Convert", "the", "string", "representation", "of", "a", "row", "index", "to", "a", "list", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TableUtil.java#L71-L90
train
Convert a String to a List of Integer.
Of course, here is the Java code you requested: ```java public static List<Integer> rowIndexStringToList(final String row) { if (row == null) { return null; } List<Integer> rowIndex = new ArrayList<>(); try { // Convert StringId to array String[] rowIdString = row.split(INDEX_DELIMITER); for (in...
sporniket/core
sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/JToolBar.java
JToolBar.add
public JButton add(Action act) { JButton _button; _button = super.add(act); _button.setRequestFocusEnabled(false); if (null != act.getValue(Action.SMALL_ICON)) { _button.setToolTipText((String) act.getValue(Action.NAME)); _button.setText(null); } return _button; }
java
public JButton add(Action act) { JButton _button; _button = super.add(act); _button.setRequestFocusEnabled(false); if (null != act.getValue(Action.SMALL_ICON)) { _button.setToolTipText((String) act.getValue(Action.NAME)); _button.setText(null); } return _button; }
[ "public", "JButton", "add", "(", "Action", "act", ")", "{", "JButton", "_button", ";", "_button", "=", "super", ".", "add", "(", "act", ")", ";", "_button", ".", "setRequestFocusEnabled", "(", "false", ")", ";", "if", "(", "null", "!=", "act", ".", "...
Add the action and setup the obtained button to behave correctly and further settings (icon, tooltip, focus). @see javax.swing.JToolBar#add(javax.swing.Action)
[ "Add", "the", "action", "and", "setup", "the", "obtained", "button", "to", "behave", "correctly", "and", "further", "settings", "(", "icon", "tooltip", "focus", ")", "." ]
3480ebd72a07422fcc09971be2607ee25efb2c26
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ui/src/main/java/com/sporniket/libre/ui/swing/JToolBar.java#L60-L71
train
Add an action to the button.
Of course, here is the Java code you requested: ```java public JButton add(Action act) { JButton _button; _button = super.add(act); _button.setRequestFocusEnabled(false); if (null != act.getValue(Action.SMALL_ICON)) { _button.setToolTipText((String) act.getValue(Action.NAME)); _button.setText(null); ...
alkacon/opencms-core
src/org/opencms/util/CmsCollectionsGenericWrapper.java
CmsCollectionsGenericWrapper.createLazyMap
public static <K, V> Map<K, V> createLazyMap(Transformer T) { return new MapWrapper<K, V>(LazyMap.decorate(new HashMap<K, V>(), T)); }
java
public static <K, V> Map<K, V> createLazyMap(Transformer T) { return new MapWrapper<K, V>(LazyMap.decorate(new HashMap<K, V>(), T)); }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "createLazyMap", "(", "Transformer", "T", ")", "{", "return", "new", "MapWrapper", "<", "K", ",", "V", ">", "(", "LazyMap", ".", "decorate", "(", "new", "HashMap", "<", ...
Provides a wrapper to access the {@link LazyMap} functionality that avoids warnings with Java 1.5 generic code.<p> @param <K> the type of keys maintained by the returned map @param <V> the type of mapped values @param T the transformer to use for the Lazy Map @return a {@link LazyMap} of the required generic type
[ "Provides", "a", "wrapper", "to", "access", "the", "{", "@link", "LazyMap", "}", "functionality", "that", "avoids", "warnings", "with", "Java", "1", ".", "5", "generic", "code", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsCollectionsGenericWrapper.java#L221-L224
train
Create a lazy map.
Of course, here is the Java code you requested: ```java public static <K, V> Map<K, V> createLazyMap(Transformer T) { return new MapWrapper<K, V>(LazyMap.decorate(new HashMap<K, V>(), T)); } ``` Hope this helps!
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java
WrapperInvocationHandler.isClosedSurrogate
protected boolean isClosedSurrogate() throws Throwable { if (this.surrogateClosed) { return true; } // This part is overkill now, but does not introduce // incorrect operation. // /** * @todo: Special handling to check the parent is still desirabl...
java
protected boolean isClosedSurrogate() throws Throwable { if (this.surrogateClosed) { return true; } // This part is overkill now, but does not introduce // incorrect operation. // /** * @todo: Special handling to check the parent is still desirabl...
[ "protected", "boolean", "isClosedSurrogate", "(", ")", "throws", "Throwable", "{", "if", "(", "this", ".", "surrogateClosed", ")", "{", "return", "true", ";", "}", "// This part is overkill now, but does not introduce", "// incorrect operation.", "//", "/**\n * @t...
Retrieves whether the surrogate is closed. <p> @return true if surrogate is closed; else false @throws java.lang.Throwable
[ "Retrieves", "whether", "the", "surrogate", "is", "closed", ".", "<p", ">" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L819-L843
train
Returns true if the underlying Adapter is closed.
Of course, here is the Java code you requested: ```java protected boolean isClosedSurrogate() throws Throwable { if (this.surrogateClosed) { return true; } // This part is overkill now, but does not introduce // incorrect operation. // /** * @todo...
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/CertificatesInner.java
CertificatesInner.listByResourceGroupNextAsync
public Observable<Page<CertificateInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<CertificateInner>>, Page<CertificateInner>>() { @Override publi...
java
public Observable<Page<CertificateInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<CertificateInner>>, Page<CertificateInner>>() { @Override publi...
[ "public", "Observable", "<", "Page", "<", "CertificateInner", ">", ">", "listByResourceGroupNextAsync", "(", "final", "String", "nextPageLink", ")", "{", "return", "listByResourceGroupNextWithServiceResponseAsync", "(", "nextPageLink", ")", ".", "map", "(", "new", "Fu...
Get all certificates in a resource group. Get all certificates in a resource group. @param nextPageLink The NextLink from the previous successful call to List operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;CertificateInner&gt; object
[ "Get", "all", "certificates", "in", "a", "resource", "group", ".", "Get", "all", "certificates", "in", "a", "resource", "group", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/CertificatesInner.java#L877-L885
train
Gets a list of Certificates.
Of course, here is the Java code you requested: ```java public Observable<Page<CertificateInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<CertificateInner>>, Page<CertificateIn...
onepf/OpenIAB
library/src/main/java/org/onepf/oms/OpenIabHelper.java
OpenIabHelper.queryInventory
public @Nullable Inventory queryInventory(final boolean querySkuDetails, @Nullable final List<String> moreSkus) throws IabException { return queryInventory(querySkuDetails, moreSkus, null); }
java
public @Nullable Inventory queryInventory(final boolean querySkuDetails, @Nullable final List<String> moreSkus) throws IabException { return queryInventory(querySkuDetails, moreSkus, null); }
[ "public", "@", "Nullable", "Inventory", "queryInventory", "(", "final", "boolean", "querySkuDetails", ",", "@", "Nullable", "final", "List", "<", "String", ">", "moreSkus", ")", "throws", "IabException", "{", "return", "queryInventory", "(", "querySkuDetails", ","...
See {@link #queryInventory(boolean, List, List)} for details
[ "See", "{" ]
90552d53c5303b322940d96a0c4b7cb797d78760
https://github.com/onepf/OpenIAB/blob/90552d53c5303b322940d96a0c4b7cb797d78760/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L1342-L1348
train
Query the entity for a single RA Vendor.
Of course, here is the Java code you requested: ```java public @Nullable Inventory queryInventory(final boolean querySkuDetails, @Nullable final List<String> moreSkus) throws IabException { return queryInventory(querySkuDetails, moreSkus, null); } ``` Hope ...
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Parsers.java
Parsers.sequence
public static <A, B, C, T> Parser<T> sequence( final Parser<A> p1, final Parser<B> p2, final Parser<C> p3, final Map3<? super A, ? super B, ? super C, ? extends T> map) { return new Parser<T>() { @Override boolean apply(ParseContext ctxt) { boolean r1 = p1.apply(ctxt); if (!r1) ret...
java
public static <A, B, C, T> Parser<T> sequence( final Parser<A> p1, final Parser<B> p2, final Parser<C> p3, final Map3<? super A, ? super B, ? super C, ? extends T> map) { return new Parser<T>() { @Override boolean apply(ParseContext ctxt) { boolean r1 = p1.apply(ctxt); if (!r1) ret...
[ "public", "static", "<", "A", ",", "B", ",", "C", ",", "T", ">", "Parser", "<", "T", ">", "sequence", "(", "final", "Parser", "<", "A", ">", "p1", ",", "final", "Parser", "<", "B", ">", "p2", ",", "final", "Parser", "<", "C", ">", "p3", ",", ...
A {@link Parser} that runs 3 parser objects sequentially and transforms the return values using {@code map}.
[ "A", "{" ]
df1280259f5da9eb5ffc537437569dddba66cb94
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Parsers.java#L382-L403
train
Returns a sequence of tokens.
Of course, here is the Java code you requested: ```java public static <A, B, C, T> Parser<T> sequence( final Parser<A> p1, final Parser<B> p2, final Parser<C> p3, final Map3<? super A, ? super B, ? super C, ? extends T> map) { return new Parser<T>() { @Override boolean apply(ParseContext ctxt) { ...
aws/aws-sdk-java
aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/AWSDatabaseMigrationServiceClient.java
AWSDatabaseMigrationServiceClient.describeRefreshSchemasStatus
@Override public DescribeRefreshSchemasStatusResult describeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest request) { request = beforeClientExecution(request); return executeDescribeRefreshSchemasStatus(request); }
java
@Override public DescribeRefreshSchemasStatusResult describeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest request) { request = beforeClientExecution(request); return executeDescribeRefreshSchemasStatus(request); }
[ "@", "Override", "public", "DescribeRefreshSchemasStatusResult", "describeRefreshSchemasStatus", "(", "DescribeRefreshSchemasStatusRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeRefreshSchemasStatus", ...
<p> Returns the status of the RefreshSchemas operation. </p> @param describeRefreshSchemasStatusRequest @return Result of the DescribeRefreshSchemasStatus operation returned by the service. @throws InvalidResourceStateException The resource is in a state that prevents it from being used for database migration. @throws...
[ "<p", ">", "Returns", "the", "status", "of", "the", "RefreshSchemas", "operation", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dms/src/main/java/com/amazonaws/services/databasemigrationservice/AWSDatabaseMigrationServiceClient.java#L1759-L1763
train
Retrieves the status of refresh schemas for a specific user.
Of course, here is the Java code you requested: ```java @Override public DescribeRefreshSchemasStatusResult describeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest request) { request = beforeClientExecution(request); return executeDescribeRefreshSchemasStatus(request); } ``` Hope this...
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/support/cos/CloudFile.java
CloudFile.exists
public static Single<Boolean> exists(String path) { return SingleRxXian.call("cosService", "cosCheckFileExists", new JSONObject() {{ put("path", path); }}).map(UnitResponse::dataToBoolean); }
java
public static Single<Boolean> exists(String path) { return SingleRxXian.call("cosService", "cosCheckFileExists", new JSONObject() {{ put("path", path); }}).map(UnitResponse::dataToBoolean); }
[ "public", "static", "Single", "<", "Boolean", ">", "exists", "(", "String", "path", ")", "{", "return", "SingleRxXian", ".", "call", "(", "\"cosService\"", ",", "\"cosCheckFileExists\"", ",", "new", "JSONObject", "(", ")", "{", "{", "put", "(", "\"path\"", ...
check whether the cos file exists @param path the cos path @return true if exits, false if not exits, error on exception.
[ "check", "whether", "the", "cos", "file", "exists" ]
1948e088545553d2745b2c86d8b5a64988bb850e
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/support/cos/CloudFile.java#L84-L88
train
Check if a file exists in the CosService
Of course, here is the Java code you requested: ```java public static Single<Boolean> exists(String path) { return SingleRxXian.call("cosService", "cosCheckFileExists", new JSONObject() {{ put("path", path); }}).map(UnitResponse::dataToBoolean); } ``` Hope this helps!
eclipse/xtext-extras
org.eclipse.xtext.purexbase/src-gen/org/eclipse/xtext/purexbase/parser/antlr/internal/InternalPureXbaseParser.java
InternalPureXbaseParser.ruleOpCompare
public final AntlrDatatypeRuleToken ruleOpCompare() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; enterRule(); try { // InternalPureXbase.g:1498:2: ( (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' ) ) ...
java
public final AntlrDatatypeRuleToken ruleOpCompare() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; enterRule(); try { // InternalPureXbase.g:1498:2: ( (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' ) ) ...
[ "public", "final", "AntlrDatatypeRuleToken", "ruleOpCompare", "(", ")", "throws", "RecognitionException", "{", "AntlrDatatypeRuleToken", "current", "=", "new", "AntlrDatatypeRuleToken", "(", ")", ";", "Token", "kw", "=", "null", ";", "enterRule", "(", ")", ";", "t...
InternalPureXbase.g:1492:1: ruleOpCompare returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '>=' | (kw= '<' kw= '=' ) | kw= '>' | kw= '<' ) ;
[ "InternalPureXbase", ".", "g", ":", "1492", ":", "1", ":", "ruleOpCompare", "returns", "[", "AntlrDatatypeRuleToken", "current", "=", "new", "AntlrDatatypeRuleToken", "()", "]", ":", "(", "kw", "=", ">", "=", "|", "(", "kw", "=", "<", "kw", "=", "=", "...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.purexbase/src-gen/org/eclipse/xtext/purexbase/parser/antlr/internal/InternalPureXbaseParser.java#L4346-L4484
train
Capture the contents of a ruleOpCompare rule
Of course, here is the Java code you requested: ```java public final AntlrDatatypeRuleToken ruleOpCompare() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; enterRule(); try { // InternalPureXbase.g:1498:2: ( (k...
forge/furnace
container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonStateManager.java
AddonStateManager.getAddonForView
public Addon getAddonForView(final AddonView view, final AddonId id) { return lock.performLocked(LockMode.READ, new Callable<Addon>() { @Override public Addon call() throws Exception { for (AddonVertex vertex : getCurrentGraph().getGraph().vertexSet()) {...
java
public Addon getAddonForView(final AddonView view, final AddonId id) { return lock.performLocked(LockMode.READ, new Callable<Addon>() { @Override public Addon call() throws Exception { for (AddonVertex vertex : getCurrentGraph().getGraph().vertexSet()) {...
[ "public", "Addon", "getAddonForView", "(", "final", "AddonView", "view", ",", "final", "AddonId", "id", ")", "{", "return", "lock", ".", "performLocked", "(", "LockMode", ".", "READ", ",", "new", "Callable", "<", "Addon", ">", "(", ")", "{", "@", "Overri...
Return an {@link Addon} compatible with the given {@link AddonView}, if it is already registered (this occurs when {@link AddonView} instances share {@link Addon} sub-graphs.
[ "Return", "an", "{" ]
bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a
https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/container/src/main/java/org/jboss/forge/furnace/impl/addons/AddonStateManager.java#L113-L130
train
Get Addon for View
Of course, here is the Java code you requested: ```java public Addon getAddonForView(final AddonView view, final AddonId id) { return lock.performLocked(LockMode.READ, new Callable<Addon>() { @Override public Addon call() throws Exception { for (AddonVertex vertex ...
hanghuantech/hhCommonBase
src/main/java/com/hzhanghuan/hhCommonBase/dao/BaseDaoImpl.java
BaseDaoImpl.getPageBeanOld
@Override public PageBean<T> getPageBeanOld(HashMap<Object, Object> hashMap) { System.out.println("分页"); String getPageBean = "select"+clazz.getSimpleName()+"sByConditions"; System.out.println(getPageBean); // TODO: 命名需要变更 int pageNum = Integer.parseInt(hashMap.get("pageNum").toString()); int pageSize =...
java
@Override public PageBean<T> getPageBeanOld(HashMap<Object, Object> hashMap) { System.out.println("分页"); String getPageBean = "select"+clazz.getSimpleName()+"sByConditions"; System.out.println(getPageBean); // TODO: 命名需要变更 int pageNum = Integer.parseInt(hashMap.get("pageNum").toString()); int pageSize =...
[ "@", "Override", "public", "PageBean", "<", "T", ">", "getPageBeanOld", "(", "HashMap", "<", "Object", ",", "Object", ">", "hashMap", ")", "{", "System", ".", "out", ".", "println", "(", "\"分页\");", "", "", "String", "getPageBean", "=", "\"select\"", "+"...
分页
[ "分页" ]
886cc66f5a1dfbc0edfa4202173eab693aa8430e
https://github.com/hanghuantech/hhCommonBase/blob/886cc66f5a1dfbc0edfa4202173eab693aa8430e/src/main/java/com/hzhanghuan/hhCommonBase/dao/BaseDaoImpl.java#L96-L112
train
Get PageBean old.
Of course, here is the Java code you requested: ```java @Override public PageBean<T> getPageBeanOld(HashMap<Object, Object> hashMap) { System.out.println("分页"); String getPageBean = "select"+clazz.getSimpleName()+"sByConditions"; System.out.println(getPageBean); // TODO: 命名需要变更 int pageNum = Integer.pars...
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.pull
public PubsubFuture<List<ReceivedMessage>> pull(final String canonicalSubscriptionName, final boolean returnImmediately) { return pull(canonicalSubscriptionName, returnImmediately, DEFAULT_PULL_MAX_MESSAGES); }
java
public PubsubFuture<List<ReceivedMessage>> pull(final String canonicalSubscriptionName, final boolean returnImmediately) { return pull(canonicalSubscriptionName, returnImmediately, DEFAULT_PULL_MAX_MESSAGES); }
[ "public", "PubsubFuture", "<", "List", "<", "ReceivedMessage", ">", ">", "pull", "(", "final", "String", "canonicalSubscriptionName", ",", "final", "boolean", "returnImmediately", ")", "{", "return", "pull", "(", "canonicalSubscriptionName", ",", "returnImmediately", ...
Pull a batch of messages. @param canonicalSubscriptionName The canonical (including project name) subscription to pull from. @param returnImmediately {@code true} to return immediately if the queue is empty. {@code false} to wait for at least one message before returning. @return a future that is completed wit...
[ "Pull", "a", "batch", "of", "messages", "." ]
7d021528fa5bc29be458e6f210fa62f59b71d004
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L587-L590
train
Pull all messages from the server.
Of course, here is the Java code you requested: ```java public PubsubFuture<List<ReceivedMessage>> pull(final String canonicalSubscriptionName, final boolean returnImmediately) { return pull(canonicalSubscriptionName, returnImmediately, DEFAULT_PULL_MAX_MESSAGES); ...
soarcn/COCOQuery
query/src/main/java/com/cocosw/query/AbstractViewQuery.java
AbstractViewQuery.fadeOut
public T fadeOut() { if (view!=null) { view.startAnimation(AnimationUtils.loadAnimation(context,android.R.anim.fade_out)); } return self(); }
java
public T fadeOut() { if (view!=null) { view.startAnimation(AnimationUtils.loadAnimation(context,android.R.anim.fade_out)); } return self(); }
[ "public", "T", "fadeOut", "(", ")", "{", "if", "(", "view", "!=", "null", ")", "{", "view", ".", "startAnimation", "(", "AnimationUtils", ".", "loadAnimation", "(", "context", ",", "android", ".", "R", ".", "anim", ".", "fade_out", ")", ")", ";", "}"...
apply fadeout animation for view @return
[ "apply", "fadeout", "animation", "for", "view" ]
712eac37ab65ef3dbdf55dbfae28750edfc36608
https://github.com/soarcn/COCOQuery/blob/712eac37ab65ef3dbdf55dbfae28750edfc36608/query/src/main/java/com/cocosw/query/AbstractViewQuery.java#L1174-L1179
train
Fade out the view.
Of course, here is the Java code you requested: ```java public T fadeOut() { if (view!=null) { view.startAnimation(AnimationUtils.loadAnimation(context,android.R.anim.fade_out)); } return self(); } ``` Hope this helps!
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.getSequence
@Override public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection, List<String> fields) { return getSequence(tableDef, collection, fields, null); }
java
@Override public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection, List<String> fields) { return getSequence(tableDef, collection, fields, null); }
[ "@", "Override", "public", "<", "T", ">", "EntitySequence", "getSequence", "(", "TableDefinition", "tableDef", ",", "Iterable", "<", "T", ">", "collection", ",", "List", "<", "String", ">", "fields", ")", "{", "return", "getSequence", "(", "tableDef", ",", ...
/* (non-Javadoc) @see com.dell.doradus.search.aggregate.EntitySequenceFactory#getSequence(com.dell.doradus.common.TableDefinition, java.lang.Iterable, java.util.List, com.dell.doradus.search.aggregate.EntitySequenceOptions)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L104-L107
train
Returns a sequence of entities in a sequence based on the given table definition and collection of fields.
Of course, here is the Java code you requested: ```java @Override public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection, List<String> fields) { return getSequence(tableDef, collection, fields, null); } ``` Hope this helps!
qos-ch/slf4j
slf4j-migrator/src/main/java/org/slf4j/migrator/line/LineConverter.java
LineConverter.getReplacement
public String[] getReplacement(String text) { ConversionRule conversionRule; Pattern pattern; Matcher matcher; Iterator<ConversionRule> conversionRuleIterator = ruleSet.iterator(); String additionalLine = null; while (conversionRuleIterator.hasNext()) { conver...
java
public String[] getReplacement(String text) { ConversionRule conversionRule; Pattern pattern; Matcher matcher; Iterator<ConversionRule> conversionRuleIterator = ruleSet.iterator(); String additionalLine = null; while (conversionRuleIterator.hasNext()) { conver...
[ "public", "String", "[", "]", "getReplacement", "(", "String", "text", ")", "{", "ConversionRule", "conversionRule", ";", "Pattern", "pattern", ";", "Matcher", "matcher", ";", "Iterator", "<", "ConversionRule", ">", "conversionRuleIterator", "=", "ruleSet", ".", ...
Check if the specified text is matching some conversions rules. If a rule matches, ask for line replacement. <p>In case no rule can be applied, then the input text is returned without change. @param text @return String
[ "Check", "if", "the", "specified", "text", "is", "matching", "some", "conversions", "rules", ".", "If", "a", "rule", "matches", "ask", "for", "line", "replacement", "." ]
905443f39fadd88a8dd2c467e44affd8cb072a4d
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/slf4j-migrator/src/main/java/org/slf4j/migrator/line/LineConverter.java#L51-L77
train
Get replacement for text.
Of course, here is the Java code you requested: ```java public String[] getReplacement(String text) { ConversionRule conversionRule; Pattern pattern; Matcher matcher; Iterator<ConversionRule> conversionRuleIterator = ruleSet.iterator(); String additionalLine = null; whil...
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
TransformerImpl.setParameter
public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); StylesheetRoot sroot = m_stylesheetRoot; Vector vars = sroot...
java
public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); StylesheetRoot sroot = m_stylesheetRoot; Vector vars = sroot...
[ "public", "void", "setParameter", "(", "String", "name", ",", "String", "namespace", ",", "Object", "value", ")", "{", "VariableStack", "varstack", "=", "getXPathContext", "(", ")", ".", "getVarStack", "(", ")", ";", "QName", "qname", "=", "new", "QName", ...
Set a parameter for the templates. @param name The name of the parameter. @param namespace The namespace of the parameter. @param value The value object. This can be any valid Java object -- it's up to the processor to provide the proper coersion to the object, or simply pass it on for use in extensions.
[ "Set", "a", "parameter", "for", "the", "templates", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java#L1382-L1401
train
Set the parameter.
Of course, here is the Java code you requested: ```java public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); Stylesh...
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2/src/com/ibm/ws/security/csiv2/server/AuthenticatorImpl.java
AuthenticatorImpl.authenticate
@Override public Subject authenticate(@Sensitive X509Certificate[] certificateChain) throws AuthenticationException { AuthenticationData authenticationData = createAuthenticationData(certificateChain); return authenticationService.authenticate(jaasEntryName, authenticationData, null); }
java
@Override public Subject authenticate(@Sensitive X509Certificate[] certificateChain) throws AuthenticationException { AuthenticationData authenticationData = createAuthenticationData(certificateChain); return authenticationService.authenticate(jaasEntryName, authenticationData, null); }
[ "@", "Override", "public", "Subject", "authenticate", "(", "@", "Sensitive", "X509Certificate", "[", "]", "certificateChain", ")", "throws", "AuthenticationException", "{", "AuthenticationData", "authenticationData", "=", "createAuthenticationData", "(", "certificateChain",...
Authenticate with certificate chain. @param certificateChain @return The authenticated subject. @throws AuthenticationException
[ "Authenticate", "with", "certificate", "chain", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2/src/com/ibm/ws/security/csiv2/server/AuthenticatorImpl.java#L56-L60
train
This method is called by the JAAS authentication service to authenticate a set of certificates.
Of course, here is the Java code you requested: ```java @Override public Subject authenticate(@Sensitive X509Certificate[] certificateChain) throws AuthenticationException { AuthenticationData authenticationData = createAuthenticationData(certificateChain); return authenticationService.authenticate...
haifengl/smile
core/src/main/java/smile/clustering/FastPair.java
FastPair.findNeighbor
private void findNeighbor(int p) { // if no neighbors available, set flag for UpdatePoint to find if (npoints == 1) { neighbor[p] = p; distance[p] = Float.MAX_VALUE; return; } // find first point unequal to p itself int first = 0; if (...
java
private void findNeighbor(int p) { // if no neighbors available, set flag for UpdatePoint to find if (npoints == 1) { neighbor[p] = p; distance[p] = Float.MAX_VALUE; return; } // find first point unequal to p itself int first = 0; if (...
[ "private", "void", "findNeighbor", "(", "int", "p", ")", "{", "// if no neighbors available, set flag for UpdatePoint to find", "if", "(", "npoints", "==", "1", ")", "{", "neighbor", "[", "p", "]", "=", "p", ";", "distance", "[", "p", "]", "=", "Float", ".",...
Find nearest neighbor of a given point.
[ "Find", "nearest", "neighbor", "of", "a", "given", "point", "." ]
e27e43e90fbaacce3f99d30120cf9dd6a764c33d
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/clustering/FastPair.java#L102-L130
train
Find neighbor of p.
Of course, here is the Java code you requested: ```java private void findNeighbor(int p) { // if no neighbors available, set flag for UpdatePoint to find if (npoints == 1) { neighbor[p] = p; distance[p] = Float.MAX_VALUE; return; } // find first poin...
jenetics/jpx
jpx/src/main/java/io/jenetics/jpx/IO.java
IO.writeInt
static void writeInt(final int value, final DataOutput out) throws IOException { // Zig-zag encoding. int n = (value << 1)^(value >> 31); if ((n & ~0x7F) != 0) { out.write((byte)((n | 0x80) & 0xFF)); n >>>= 7; if (n > 0x7F) { out.write((byte)((n | 0x80) & 0xFF)); n >>>= 7; if (n > 0x7F) { ...
java
static void writeInt(final int value, final DataOutput out) throws IOException { // Zig-zag encoding. int n = (value << 1)^(value >> 31); if ((n & ~0x7F) != 0) { out.write((byte)((n | 0x80) & 0xFF)); n >>>= 7; if (n > 0x7F) { out.write((byte)((n | 0x80) & 0xFF)); n >>>= 7; if (n > 0x7F) { ...
[ "static", "void", "writeInt", "(", "final", "int", "value", ",", "final", "DataOutput", "out", ")", "throws", "IOException", "{", "// Zig-zag encoding.", "int", "n", "=", "(", "value", "<<", "1", ")", "^", "(", "value", ">>", "31", ")", ";", "if", "(",...
Writes an int value to a series of bytes. The values are written using <a href="http://lucene.apache.org/core/3_5_0/fileformats.html#VInt">variable-length</a> <a href="https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types">zig-zag</a> coding. Each {@code int} value is written in 1 to 5 bytes. @see #...
[ "Writes", "an", "int", "value", "to", "a", "series", "of", "bytes", ".", "The", "values", "are", "written", "using", "<a", "href", "=", "http", ":", "//", "lucene", ".", "apache", ".", "org", "/", "core", "/", "3_5_0", "/", "fileformats", ".", "html#...
58fefc10580602d07f1480d6a5886d13a553ff8f
https://github.com/jenetics/jpx/blob/58fefc10580602d07f1480d6a5886d13a553ff8f/jpx/src/main/java/io/jenetics/jpx/IO.java#L222-L242
train
Write an int value to the output stream.
Of course, here is the Java code you requested: ```java static void writeInt(final int value, final DataOutput out) throws IOException { // Zig-zag encoding. int n = (value << 1)^(value >> 31); if ((n & ~0x7F) != 0) { out.write((byte)((n | 0x80) & 0xFF)); n >>>= 7; if (n > 0x7F) { out.write((byte)((...
Unidata/thredds
cdm/src/main/java/ucar/nc2/iosp/sigmet/SigmetIOServiceProvider.java
SigmetIOServiceProvider.readToByteChannel11
public long readToByteChannel11(ucar.nc2.Variable v2, Section section, WritableByteChannel channel) throws java.io.IOException, ucar.ma2.InvalidRangeException { Array data = readData(v2, section); float[] ftdata = new float[(int) data.getSize()]; byte[] bytedata = new byte[(int) data.getSize()...
java
public long readToByteChannel11(ucar.nc2.Variable v2, Section section, WritableByteChannel channel) throws java.io.IOException, ucar.ma2.InvalidRangeException { Array data = readData(v2, section); float[] ftdata = new float[(int) data.getSize()]; byte[] bytedata = new byte[(int) data.getSize()...
[ "public", "long", "readToByteChannel11", "(", "ucar", ".", "nc2", ".", "Variable", "v2", ",", "Section", "section", ",", "WritableByteChannel", "channel", ")", "throws", "java", ".", "io", ".", "IOException", ",", "ucar", ".", "ma2", ".", "InvalidRangeExceptio...
Read data from a top level Variable and send data to a WritableByteChannel. @param v2 Variable @param section wanted section of data of Variable. The section list is a list of ucar.ma2.Range which define the requested data subset. @param channel WritableByteChannel object - channel that can write bytes. @return t...
[ "Read", "data", "from", "a", "top", "level", "Variable", "and", "send", "data", "to", "a", "WritableByteChannel", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/sigmet/SigmetIOServiceProvider.java#L864-L891
test
Reads the data from the Variable v2 to the WritableByteChannel 11.
Of course, here is the Java code you requested: ```java public long readToByteChannel11(ucar.nc2.Variable v2, Section section, WritableByteChannel channel) throws java.io.IOException, ucar.ma2.InvalidRangeException { Array data = readData(v2, section); float[] ftdata = new float[(int) data.getSize...
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileOperations.java
FileOperations.deleteFile
@Nonnull public static FileIOError deleteFile (@Nonnull final File aFile) { ValueEnforcer.notNull (aFile, "File"); if (!FileHelper.existsFile (aFile)) return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aFile); // Is the parent directory writable? final ...
java
@Nonnull public static FileIOError deleteFile (@Nonnull final File aFile) { ValueEnforcer.notNull (aFile, "File"); if (!FileHelper.existsFile (aFile)) return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aFile); // Is the parent directory writable? final ...
[ "@", "Nonnull", "public", "static", "FileIOError", "deleteFile", "(", "@", "Nonnull", "final", "File", "aFile", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aFile", ",", "\"File\"", ")", ";", "if", "(", "!", "FileHelper", ".", "existsFile", "(", "aFile...
Delete an existing file. @param aFile The file to be deleted. May not be <code>null</code>. @return A non-<code>null</code> error code.
[ "Delete", "an", "existing", "file", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileOperations.java#L334-L368
train
Delete the file.
Of course, here is the Java code you requested: ```java @Nonnull public static FileIOError deleteFile (@Nonnull final File aFile) { ValueEnforcer.notNull (aFile, "File"); if (!FileHelper.existsFile (aFile)) return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aFi...
lisicnu/droidUtil
src/main/java/com/github/lisicnu/libDroid/util/NumberUtils.java
NumberUtils.getGCD
public static int getGCD(int... arg) throws Exception { if (arg == null || arg.length == 0) { throw new Exception("parameters must more than one."); } if (arg.length == 1) { return Math.abs(arg[0]); } int tmp = gcd(arg[0], arg[1]); for (int i = 2...
java
public static int getGCD(int... arg) throws Exception { if (arg == null || arg.length == 0) { throw new Exception("parameters must more than one."); } if (arg.length == 1) { return Math.abs(arg[0]); } int tmp = gcd(arg[0], arg[1]); for (int i = 2...
[ "public", "static", "int", "getGCD", "(", "int", "...", "arg", ")", "throws", "Exception", "{", "if", "(", "arg", "==", "null", "||", "arg", ".", "length", "==", "0", ")", "{", "throw", "new", "Exception", "(", "\"parameters must more than one.\"", ")", ...
获取多个数字最大公约数 @param arg @return @throws Exception
[ "获取多个数字最大公约数" ]
e4d6cf3e3f60e5efb5a75672607ded94d1725519
https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/NumberUtils.java#L92-L107
train
Gets the GCD.
Of course, here is the Java code you requested: ```java public static int getGCD(int... arg) throws Exception { if (arg == null || arg.length == 0) { throw new Exception("parameters must more than one."); } if (arg.length == 1) { return Math.abs(arg[0]); } ...
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/AbstractForm.java
AbstractForm.newSingleLineResultsReporter
public ValidationResultsReporter newSingleLineResultsReporter(Messagable messageReceiver) { SimpleValidationResultsReporter reporter = new SimpleValidationResultsReporter( formModel.getValidationResults(), messageReceiver); return reporter; }
java
public ValidationResultsReporter newSingleLineResultsReporter(Messagable messageReceiver) { SimpleValidationResultsReporter reporter = new SimpleValidationResultsReporter( formModel.getValidationResults(), messageReceiver); return reporter; }
[ "public", "ValidationResultsReporter", "newSingleLineResultsReporter", "(", "Messagable", "messageReceiver", ")", "{", "SimpleValidationResultsReporter", "reporter", "=", "new", "SimpleValidationResultsReporter", "(", "formModel", ".", "getValidationResults", "(", ")", ",", "...
Construct the validation results reporter for this form and attach it to the provided Guarded object. An instance of {@link SimpleValidationResultsReporter} will be constructed and returned. All registered child forms will be attached to the same <code>guarded</code> and <code>messageReceiver</code> as this form.
[ "Construct", "the", "validation", "results", "reporter", "for", "this", "form", "and", "attach", "it", "to", "the", "provided", "Guarded", "object", ".", "An", "instance", "of", "{" ]
6aad6e640b348cda8f3b0841f6e42025233f1eb8
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/AbstractForm.java#L656-L662
train
Creates a new single line validation results reporter.
Of course, here is the Java code you requested: ```java public ValidationResultsReporter newSingleLineResultsReporter(Messagable messageReceiver) { SimpleValidationResultsReporter reporter = new SimpleValidationResultsReporter( formModel.getValidationResults(), messageReceiver); return reporter; } ``` Hope...
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java
SftpSubsystemChannel.closeFile
public void closeFile(SftpFile file) throws SftpStatusException, SshException { if (file.getHandle() != null) { closeHandle(file.getHandle()); EventServiceImplementation.getInstance().fireEvent( (new Event(this, J2SSHEventCodes.EVENT_SFTP_FILE_CLOSED, true)).addAttribute( J2SSHEventCodes....
java
public void closeFile(SftpFile file) throws SftpStatusException, SshException { if (file.getHandle() != null) { closeHandle(file.getHandle()); EventServiceImplementation.getInstance().fireEvent( (new Event(this, J2SSHEventCodes.EVENT_SFTP_FILE_CLOSED, true)).addAttribute( J2SSHEventCodes....
[ "public", "void", "closeFile", "(", "SftpFile", "file", ")", "throws", "SftpStatusException", ",", "SshException", "{", "if", "(", "file", ".", "getHandle", "(", ")", "!=", "null", ")", "{", "closeHandle", "(", "file", ".", "getHandle", "(", ")", ")", ";...
Close a file or directory. @param file @throws SftpStatusException , SshException
[ "Close", "a", "file", "or", "directory", "." ]
ce11ceaf0aa0b129b54327a6891973e1e34689f7
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java#L1657-L1669
train
Close a file.
Of course, here is the Java code you requested: ```java public void closeFile(SftpFile file) throws SftpStatusException, SshException { if (file.getHandle() != null) { closeHandle(file.getHandle()); EventServiceImplementation.getInstance().fireEvent( (new Event(this, J2SSHEventCodes.EVENT_SFTP_FILE_CL...
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java
WikipediaXMLReader.readRevision
protected Revision readRevision() throws IOException, ArticleReaderException { this.taskRevisionCounter++; Revision revision = new Revision(this.taskRevisionCounter); int size, r = read(); boolean hasId = false; StringBuilder buffer = null; this.keywords.reset(); while (r != -1) { if (buffer !=...
java
protected Revision readRevision() throws IOException, ArticleReaderException { this.taskRevisionCounter++; Revision revision = new Revision(this.taskRevisionCounter); int size, r = read(); boolean hasId = false; StringBuilder buffer = null; this.keywords.reset(); while (r != -1) { if (buffer !=...
[ "protected", "Revision", "readRevision", "(", ")", "throws", "IOException", ",", "ArticleReaderException", "{", "this", ".", "taskRevisionCounter", "++", ";", "Revision", "revision", "=", "new", "Revision", "(", "this", ".", "taskRevisionCounter", ")", ";", "int",...
Reads a single revision from an article. @return Revision @throws IOException if an error occurs while reading from the input @throws ArticleReaderException if an error occurs while parsing the input
[ "Reads", "a", "single", "revision", "from", "an", "article", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java#L435-L560
train
Reads the Revision object from the ArticleReader.
Of course, here is the Java code you requested: ```java protected Revision readRevision() throws IOException, ArticleReaderException { this.taskRevisionCounter++; Revision revision = new Revision(this.taskRevisionCounter); int size, r = read(); boolean hasId = false; StringBuilder buffer = null; this...
jbundle/jbundle
app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java
FieldIterator.scanSharedFields
private void scanSharedFields() { if (!m_bFirstTime) return; m_bFirstTime = false; m_vFieldList = new Vector<FieldSummary>(); m_iCurrentIndex = 0; String strClassName = m_recClassInfo.getField(ClassInfo.CLASS_NAME).toString(); // Step one - Get a list of...
java
private void scanSharedFields() { if (!m_bFirstTime) return; m_bFirstTime = false; m_vFieldList = new Vector<FieldSummary>(); m_iCurrentIndex = 0; String strClassName = m_recClassInfo.getField(ClassInfo.CLASS_NAME).toString(); // Step one - Get a list of...
[ "private", "void", "scanSharedFields", "(", ")", "{", "if", "(", "!", "m_bFirstTime", ")", "return", ";", "m_bFirstTime", "=", "false", ";", "m_vFieldList", "=", "new", "Vector", "<", "FieldSummary", ">", "(", ")", ";", "m_iCurrentIndex", "=", "0", ";", ...
Build the field list from the concrete and base record classes.
[ "Build", "the", "field", "list", "from", "the", "concrete", "and", "base", "record", "classes", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/FieldIterator.java#L197-L251
train
Scan the shared fields.
Of course, here is the Java code you requested: ```java private void scanSharedFields() { if (!m_bFirstTime) return; m_bFirstTime = false; m_vFieldList = new Vector<FieldSummary>(); m_iCurrentIndex = 0; String strClassName = m_recClassInfo.getField(ClassInfo.CLA...
graphhopper/map-matching
matching-core/src/main/java/com/graphhopper/matching/MapMatching.java
MapMatching.penalizedPathDistance
private double penalizedPathDistance(Path path, Set<EdgeIteratorState> penalizedVirtualEdges) { double totalPenalty = 0; // Unfavored edges in the middle of the path should not be penalized because we are // only concerned about the direction at the star...
java
private double penalizedPathDistance(Path path, Set<EdgeIteratorState> penalizedVirtualEdges) { double totalPenalty = 0; // Unfavored edges in the middle of the path should not be penalized because we are // only concerned about the direction at the star...
[ "private", "double", "penalizedPathDistance", "(", "Path", "path", ",", "Set", "<", "EdgeIteratorState", ">", "penalizedVirtualEdges", ")", "{", "double", "totalPenalty", "=", "0", ";", "// Unfavored edges in the middle of the path should not be penalized because we are", "//...
Returns the path length plus a penalty if the starting/ending edge is unfavored.
[ "Returns", "the", "path", "length", "plus", "a", "penalty", "if", "the", "starting", "/", "ending", "edge", "is", "unfavored", "." ]
32cd83f14cb990c2be83c8781f22dfb59e0dbeb4
https://github.com/graphhopper/map-matching/blob/32cd83f14cb990c2be83c8781f22dfb59e0dbeb4/matching-core/src/main/java/com/graphhopper/matching/MapMatching.java#L497-L515
train
Penalized path distance.
Of course, here is the Java code you requested: ```java private double penalizedPathDistance(Path path, Set<EdgeIteratorState> penalizedVirtualEdges) { double totalPenalty = 0; // Unfavored edges in the middle of the path should not be penalized because we are ...
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderRole.java
LeaderRole.failPendingCommands
private void failPendingCommands() { for (RaftSession session : raft.getSessions().getSessions()) { for (PendingCommand command : session.clearCommands()) { command.future().complete(logResponse(CommandResponse.builder() .withStatus(RaftResponse.Status.ERROR) .withError(RaftErr...
java
private void failPendingCommands() { for (RaftSession session : raft.getSessions().getSessions()) { for (PendingCommand command : session.clearCommands()) { command.future().complete(logResponse(CommandResponse.builder() .withStatus(RaftResponse.Status.ERROR) .withError(RaftErr...
[ "private", "void", "failPendingCommands", "(", ")", "{", "for", "(", "RaftSession", "session", ":", "raft", ".", "getSessions", "(", ")", ".", "getSessions", "(", ")", ")", "{", "for", "(", "PendingCommand", "command", ":", "session", ".", "clearCommands", ...
Fails pending commands.
[ "Fails", "pending", "commands", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderRole.java#L1106-L1116
train
Fail pending commands
Of course, here is the Java code you requested: ```java private void failPendingCommands() { for (RaftSession session : raft.getSessions().getSessions()) { for (PendingCommand command : session.clearCommands()) { command.future().complete(logResponse(CommandResponse.builder() .withStatus(...
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java
SessionResource.getUserContextResource
@Path("data/{dataSource}") public UserContextResource getUserContextResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContex...
java
@Path("data/{dataSource}") public UserContextResource getUserContextResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifier UserContext userContext = session.getUserContex...
[ "@", "Path", "(", "\"data/{dataSource}\"", ")", "public", "UserContextResource", "getUserContextResource", "(", "@", "PathParam", "(", "\"dataSource\"", ")", "String", "authProviderIdentifier", ")", "throws", "GuacamoleException", "{", "// Pull UserContext defined by the give...
Retrieves a resource representing the UserContext associated with the AuthenticationProvider having the given identifier. @param authProviderIdentifier The unique identifier of the AuthenticationProvider associated with the UserContext being retrieved. @return A resource representing the UserContext associated with t...
[ "Retrieves", "a", "resource", "representing", "the", "UserContext", "associated", "with", "the", "AuthenticationProvider", "having", "the", "given", "identifier", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java#L92-L103
train
Returns a UserContextResource representing the UserContext defined by the given auth provider identifier.
Of course, here is the Java code you requested: ```java @Path("data/{dataSource}") public UserContextResource getUserContextResource( @PathParam("dataSource") String authProviderIdentifier) throws GuacamoleException { // Pull UserContext defined by the given auth provider identifie...
bit-man/SwissArmyJavaGit
javagit/src/main/java/edu/nyu/cs/javagit/api/Ref.java
Ref.createSha1Ref
public static Ref createSha1Ref(String name) { CheckUtilities.checkStringArgument(name, "name"); Ref cn = new Ref(); cn.refType = RefType.SHA1; cn.name = name; return cn; }
java
public static Ref createSha1Ref(String name) { CheckUtilities.checkStringArgument(name, "name"); Ref cn = new Ref(); cn.refType = RefType.SHA1; cn.name = name; return cn; }
[ "public", "static", "Ref", "createSha1Ref", "(", "String", "name", ")", "{", "CheckUtilities", ".", "checkStringArgument", "(", "name", ",", "\"name\"", ")", ";", "Ref", "cn", "=", "new", "Ref", "(", ")", ";", "cn", ".", "refType", "=", "RefType", ".", ...
Creates a <code>Ref</code> of type <code>SHA1</code>. @param name The SHA1 name of this ref. The value can be a short name or the full SHA1 value. If the value is null, a <code>NullPointerException</code> is thrown. If the value has length zero, an <code>IllegalArgumentException</code> is thrown. @return A <code>Ref</...
[ "Creates", "a", "<code", ">", "Ref<", "/", "code", ">", "of", "type", "<code", ">", "SHA1<", "/", "code", ">", "." ]
ba045a76d1a3ae6d07272520501daebf5159a8bd
https://github.com/bit-man/SwissArmyJavaGit/blob/ba045a76d1a3ae6d07272520501daebf5159a8bd/javagit/src/main/java/edu/nyu/cs/javagit/api/Ref.java#L213-L220
valid
Create a SHA1 reference.
Of course, here is the Java code you requested: ```java public static Ref createSha1Ref(String name) { CheckUtilities.checkStringArgument(name, "name"); Ref cn = new Ref(); cn.refType = RefType.SHA1; cn.name = name; return cn; } ``` Hope this helps!
cdk/cdk
base/core/src/main/java/org/openscience/cdk/stereo/AbstractStereo.java
AbstractStereo.map
@Override public IStereoElement<F,C> map(Map<IAtom, IAtom> atoms, Map<IBond, IBond> bonds) { if (atoms == null) throw new IllegalArgumentException("Atom map should be non-null"); if (bonds == null) throw new IllegalArgumentException("Bond ma...
java
@Override public IStereoElement<F,C> map(Map<IAtom, IAtom> atoms, Map<IBond, IBond> bonds) { if (atoms == null) throw new IllegalArgumentException("Atom map should be non-null"); if (bonds == null) throw new IllegalArgumentException("Bond ma...
[ "@", "Override", "public", "IStereoElement", "<", "F", ",", "C", ">", "map", "(", "Map", "<", "IAtom", ",", "IAtom", ">", "atoms", ",", "Map", "<", "IBond", ",", "IBond", ">", "bonds", ")", "{", "if", "(", "atoms", "==", "null", ")", "throw", "ne...
{@inheritDoc}
[ "{" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/stereo/AbstractStereo.java#L133-L144
train
Maps the two map of IAtom and IBond objects into a single StereoElement.
Of course, here is the Java code you requested: ```java @Override public IStereoElement<F,C> map(Map<IAtom, IAtom> atoms, Map<IBond, IBond> bonds) { if (atoms == null) throw new IllegalArgumentException("Atom map should be non-null"); if (bonds == null...
b3log/latke
latke-core/src/main/java/org/json/JSONObject.java
JSONObject.optEnum
public <E extends Enum<E>> E optEnum(Class<E> clazz, String key) { return this.optEnum(clazz, key, null); }
java
public <E extends Enum<E>> E optEnum(Class<E> clazz, String key) { return this.optEnum(clazz, key, null); }
[ "public", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "optEnum", "(", "Class", "<", "E", ">", "clazz", ",", "String", "key", ")", "{", "return", "this", ".", "optEnum", "(", "clazz", ",", "key", ",", "null", ")", ";", "}" ]
Get the enum value associated with a key. @param <E> Enum Type @param clazz The type of enum to retrieve. @param key A key string. @return The enum value associated with the key or null if not found
[ "Get", "the", "enum", "value", "associated", "with", "a", "key", "." ]
f7e08a47eeecea5f7c94006382c24f353585de33
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONObject.java#L1018-L1020
train
Get an enum value from the context.
Of course, here is the Java code you requested: ```java public <E extends Enum<E>> E optEnum(Class<E> clazz, String key) { return this.optEnum(clazz, key, null); } ``` Hope this helps!
structr/structr
structr-ui/src/main/java/org/structr/websocket/command/ChunkCommand.java
ChunkCommand.processMessage
@Override public void processMessage(final WebSocketMessage webSocketData) { setDoTransactionNotifications(true); final SecurityContext securityContext = getWebSocket().getSecurityContext(); try { final String uuid = webSocketData.getId(); int sequenceNumber = webSocketData.getNodeDataIntegerValue("ch...
java
@Override public void processMessage(final WebSocketMessage webSocketData) { setDoTransactionNotifications(true); final SecurityContext securityContext = getWebSocket().getSecurityContext(); try { final String uuid = webSocketData.getId(); int sequenceNumber = webSocketData.getNodeDataIntegerValue("ch...
[ "@", "Override", "public", "void", "processMessage", "(", "final", "WebSocketMessage", "webSocketData", ")", "{", "setDoTransactionNotifications", "(", "true", ")", ";", "final", "SecurityContext", "securityContext", "=", "getWebSocket", "(", ")", ".", "getSecurityCon...
~--- methods --------------------------------------------------------
[ "~", "---", "methods", "--------------------------------------------------------" ]
c111a1d0c0201c7fea5574ed69aa5a5053185a97
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/websocket/command/ChunkCommand.java#L52-L129
train
Process a single message.
Of course, here is the Java code you requested: ```java @Override public void processMessage(final WebSocketMessage webSocketData) { setDoTransactionNotifications(true); final SecurityContext securityContext = getWebSocket().getSecurityContext(); try { final String uuid = webSocketData.getId(); int s...
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java
FutureTask.setException
protected void setException(Throwable t) { if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { outcome = t; U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state finishCompletion(); } }
java
protected void setException(Throwable t) { if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { outcome = t; U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state finishCompletion(); } }
[ "protected", "void", "setException", "(", "Throwable", "t", ")", "{", "if", "(", "U", ".", "compareAndSwapInt", "(", "this", ",", "STATE", ",", "NEW", ",", "COMPLETING", ")", ")", "{", "outcome", "=", "t", ";", "U", ".", "putOrderedInt", "(", "this", ...
Causes this future to report an {@link ExecutionException} with the given throwable as its cause, unless this future has already been set or has been cancelled. <p>This method is invoked internally by the {@link #run} method upon failure of the computation. @param t the cause of failure
[ "Causes", "this", "future", "to", "report", "an", "{", "@link", "ExecutionException", "}", "with", "the", "given", "throwable", "as", "its", "cause", "unless", "this", "future", "has", "already", "been", "set", "or", "has", "been", "cancelled", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java#L251-L257
train
Sets the exception.
Of course, here is the Java code you requested: ```java protected void setException(Throwable t) { if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { outcome = t; U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state finishCompletion(); } } ``` Hope th...
gallandarakhneorg/afc
advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java
XMLGISElementUtil.writeGISElementContainer
public static void writeGISElementContainer(Element xmlNode, GISElementContainer<?> primitive, XMLBuilder builder, PathBuilder pathBuilder, XMLResources resources) throws IOException { writeGISElementContainer(xmlNode, primitive, null, builder, pathBuilder, resources); }
java
public static void writeGISElementContainer(Element xmlNode, GISElementContainer<?> primitive, XMLBuilder builder, PathBuilder pathBuilder, XMLResources resources) throws IOException { writeGISElementContainer(xmlNode, primitive, null, builder, pathBuilder, resources); }
[ "public", "static", "void", "writeGISElementContainer", "(", "Element", "xmlNode", ",", "GISElementContainer", "<", "?", ">", "primitive", ",", "XMLBuilder", "builder", ",", "PathBuilder", "pathBuilder", ",", "XMLResources", "resources", ")", "throws", "IOException", ...
Write the XML description for the given container of map elements. @param xmlNode is the XML node to fill with the container data. @param primitive is the container of map elements to output. @param builder is the tool to create XML nodes. @param pathBuilder is the tool to make paths relative. @param resources is the ...
[ "Write", "the", "XML", "description", "for", "the", "given", "container", "of", "map", "elements", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisinputoutput/src/main/java/org/arakhne/afc/gis/io/xml/XMLGISElementUtil.java#L507-L510
train
Write a GISElementContainer to the output stream.
Of course, here is the Java code you requested: ```java public static void writeGISElementContainer(Element xmlNode, GISElementContainer<?> primitive, XMLBuilder builder, PathBuilder pathBuilder, XMLResources resources) throws IOException { writeGISElementContainer(xmlNode, primitive, null, builder, pathBuilder, ...
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/audit_log.java
audit_log.get
public static audit_log[] get(nitro_service client) throws Exception { audit_log resource = new audit_log(); resource.validate("get"); return (audit_log[]) resource.get_resources(client); }
java
public static audit_log[] get(nitro_service client) throws Exception { audit_log resource = new audit_log(); resource.validate("get"); return (audit_log[]) resource.get_resources(client); }
[ "public", "static", "audit_log", "[", "]", "get", "(", "nitro_service", "client", ")", "throws", "Exception", "{", "audit_log", "resource", "=", "new", "audit_log", "(", ")", ";", "resource", ".", "validate", "(", "\"get\"", ")", ";", "return", "(", "audit...
<pre> Use this operation to get audit log message. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "get", "audit", "log", "message", ".", "<", "/", "pre", ">" ]
c840919f1a8f7c0a5634c0f23d34fa14d1765ff1
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/audit_log.java#L193-L198
train
Use this API to fetch all the audit_log resources that are configured on netscaler.
Of course, here is the Java code you requested: ```java public static audit_log[] get(nitro_service client) throws Exception { audit_log resource = new audit_log(); resource.validate("get"); return (audit_log[]) resource.get_resources(client); } ``` Hope this helps!
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/operation/BaseMigrationOperation.java
BaseMigrationOperation.verifyPartitionStateVersion
private void verifyPartitionStateVersion() { InternalPartitionService partitionService = getService(); int localPartitionStateVersion = partitionService.getPartitionStateVersion(); if (partitionStateVersion != localPartitionStateVersion) { if (getNodeEngine().getThisAddress().equals(...
java
private void verifyPartitionStateVersion() { InternalPartitionService partitionService = getService(); int localPartitionStateVersion = partitionService.getPartitionStateVersion(); if (partitionStateVersion != localPartitionStateVersion) { if (getNodeEngine().getThisAddress().equals(...
[ "private", "void", "verifyPartitionStateVersion", "(", ")", "{", "InternalPartitionService", "partitionService", "=", "getService", "(", ")", ";", "int", "localPartitionStateVersion", "=", "partitionService", ".", "getPartitionStateVersion", "(", ")", ";", "if", "(", ...
Verifies that the sent partition state version matches the local version or this node is master.
[ "Verifies", "that", "the", "sent", "partition", "state", "version", "matches", "the", "local", "version", "or", "this", "node", "is", "master", "." ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/operation/BaseMigrationOperation.java#L118-L129
train
Verify that the partition state version is the same as the local partition state version.
Of course, here is the Java code you requested: ```java private void verifyPartitionStateVersion() { InternalPartitionService partitionService = getService(); int localPartitionStateVersion = partitionService.getPartitionStateVersion(); if (partitionStateVersion != localPartitionStateVersion) {...
pierre/serialization
hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java
SmileRecordReader.initialize
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = split.getStart(); end = start + split.getLength(); ...
java
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = split.getStart(); end = start + split.getLength(); ...
[ "@", "Override", "public", "void", "initialize", "(", "InputSplit", "genericSplit", ",", "TaskAttemptContext", "context", ")", "throws", "IOException", ",", "InterruptedException", "{", "FileSplit", "split", "=", "(", "FileSplit", ")", "genericSplit", ";", "Configur...
Called once at initialization. @param genericSplit the split that defines the range of records to read @param context the information about the task @throws java.io.IOException @throws InterruptedException
[ "Called", "once", "at", "initialization", "." ]
b15b7c749ba78bfe94dce8fc22f31b30b2e6830b
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java#L55-L74
train
Initialize the Sequence Entry.
Of course, here is the Java code you requested: ```java @Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = sp...
liferay/com-liferay-commerce
commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/base/CommerceShippingFixedOptionRelLocalServiceBaseImpl.java
CommerceShippingFixedOptionRelLocalServiceBaseImpl.deleteCommerceShippingFixedOptionRel
@Indexable(type = IndexableType.DELETE) @Override public CommerceShippingFixedOptionRel deleteCommerceShippingFixedOptionRel( long commerceShippingFixedOptionRelId) throws PortalException { return commerceShippingFixedOptionRelPersistence.remove(commerceShippingFixedOptionRelId); }
java
@Indexable(type = IndexableType.DELETE) @Override public CommerceShippingFixedOptionRel deleteCommerceShippingFixedOptionRel( long commerceShippingFixedOptionRelId) throws PortalException { return commerceShippingFixedOptionRelPersistence.remove(commerceShippingFixedOptionRelId); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "DELETE", ")", "@", "Override", "public", "CommerceShippingFixedOptionRel", "deleteCommerceShippingFixedOptionRel", "(", "long", "commerceShippingFixedOptionRelId", ")", "throws", "PortalException", "{", "return", ...
Deletes the commerce shipping fixed option rel with the primary key from the database. Also notifies the appropriate model listeners. @param commerceShippingFixedOptionRelId the primary key of the commerce shipping fixed option rel @return the commerce shipping fixed option rel that was removed @throws PortalException...
[ "Deletes", "the", "commerce", "shipping", "fixed", "option", "rel", "with", "the", "primary", "key", "from", "the", "database", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/base/CommerceShippingFixedOptionRelLocalServiceBaseImpl.java#L115-L120
train
Deletes the commerce shipping fixed option rel with the primary key from the database. Also notifies the appropriate model listeners.
Of course, here is the Java code you requested: ```java @Indexable(type = IndexableType.DELETE) @Override public CommerceShippingFixedOptionRel deleteCommerceShippingFixedOptionRel( long commerceShippingFixedOptionRelId) throws PortalException { return commerceShippingFixedOptionRelPersistence.remove(commerceShi...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java
Ifc2x3tc1PackageImpl.getIfcTextStyle
public EClass getIfcTextStyle() { if (ifcTextStyleEClass == null) { ifcTextStyleEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(603); } return ifcTextStyleEClass; }
java
public EClass getIfcTextStyle() { if (ifcTextStyleEClass == null) { ifcTextStyleEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(603); } return ifcTextStyleEClass; }
[ "public", "EClass", "getIfcTextStyle", "(", ")", "{", "if", "(", "ifcTextStyleEClass", "==", "null", ")", "{", "ifcTextStyleEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "Ifc2x3tc1Package", ".", "eNS_U...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java#L30068-L30074
train
Get the IfcTextStyleEClass for this feature.
Of course, here is the Java code you requested: ```java public EClass getIfcTextStyle() { if (ifcTextStyleEClass == null) { ifcTextStyleEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(603); } return ifcTextStyleEClass; } ``` Hope this help...
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.dndOff
public ApiSuccessResponse dndOff(MediaDndOffData mediaDndOffData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = dndOffWithHttpInfo(mediaDndOffData); return resp.getData(); }
java
public ApiSuccessResponse dndOff(MediaDndOffData mediaDndOffData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = dndOffWithHttpInfo(mediaDndOffData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "dndOff", "(", "MediaDndOffData", "mediaDndOffData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "dndOffWithHttpInfo", "(", "mediaDndOffData", ")", ";", "return", "resp", ".", "getData...
Turn off Do Not Disturb Turn off Do Not Disturb for the current agent on all media channels. @param mediaDndOffData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Turn", "off", "Do", "Not", "Disturb", "Turn", "off", "Do", "Not", "Disturb", "for", "the", "current", "agent", "on", "all", "media", "channels", "." ]
509fdd9e89b9359d012f9a72be95037a3cef53e6
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L1690-L1693
train
DndOff. DndOff
Of course, here is the Java code you requested: ```java public ApiSuccessResponse dndOff(MediaDndOffData mediaDndOffData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = dndOffWithHttpInfo(mediaDndOffData); return resp.getData(); } ``` Hope this helps!
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.writeStringInto
public static void writeStringInto( String s, File outputFile ) throws IOException { InputStream in = new ByteArrayInputStream( s.getBytes( StandardCharsets.UTF_8 )); copyStream( in, outputFile ); }
java
public static void writeStringInto( String s, File outputFile ) throws IOException { InputStream in = new ByteArrayInputStream( s.getBytes( StandardCharsets.UTF_8 )); copyStream( in, outputFile ); }
[ "public", "static", "void", "writeStringInto", "(", "String", "s", ",", "File", "outputFile", ")", "throws", "IOException", "{", "InputStream", "in", "=", "new", "ByteArrayInputStream", "(", "s", ".", "getBytes", "(", "StandardCharsets", ".", "UTF_8", ")", ")"...
Writes a string into a file. @param s the string to write (not null) @param outputFile the file to write into @throws IOException if something went wrong
[ "Writes", "a", "string", "into", "a", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L405-L408
train
Write a string into a file.
Of course, here is the Java code you requested: ```java public static void writeStringInto( String s, File outputFile ) throws IOException { InputStream in = new ByteArrayInputStream( s.getBytes( StandardCharsets.UTF_8 )); copyStream( in, outputFile ); } ``` Hope this helps!