method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public TChildIssueType copy(Connection con) throws TorqueException { return copy(true, con); }
TChildIssueType function(Connection con) throws TorqueException { return copy(true, con); }
/** * Makes a copy of this object using connection. * It creates a new object filling in the simple attributes. * It then fills all the association collections and sets the * related objects to isNew=true. * * @param con the database connection to read associated objects. */
Makes a copy of this object using connection. It creates a new object filling in the simple attributes. It then fills all the association collections and sets the related objects to isNew=true
copy
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTChildIssueType.java", "license": "gpl-3.0", "size": 28961 }
[ "java.sql.Connection", "org.apache.torque.TorqueException" ]
import java.sql.Connection; import org.apache.torque.TorqueException;
import java.sql.*; import org.apache.torque.*;
[ "java.sql", "org.apache.torque" ]
java.sql; org.apache.torque;
2,540,887
EReference getHistoryInfo_TagSpecs();
EReference getHistoryInfo_TagSpecs();
/** * Returns the meta object for the containment reference list ' * {@link org.eclipse.emf.emfstore.internal.server.model.versioning.HistoryInfo#getTagSpecs <em>Tag Specs</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the meta object for the containment reference list '<em>Tag Specs</em...
Returns the meta object for the containment reference list ' <code>org.eclipse.emf.emfstore.internal.server.model.versioning.HistoryInfo#getTagSpecs Tag Specs</code>'.
getHistoryInfo_TagSpecs
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.server.model/src/org/eclipse/emf/emfstore/internal/server/model/versioning/VersioningPackage.java", "license": "epl-1.0", "size": 84798 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,308,493
@Override public void add(Widget w) { throw new UnsupportedOperationException(); }
void function(Widget w) { throw new UnsupportedOperationException(); }
/** * Unsupported operation.<p> * * @see org.opencms.gwt.client.ui.CmsListItem#add(com.google.gwt.user.client.ui.Widget) */
Unsupported operation
add
{ "repo_name": "serrapos/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/tree/CmsTreeItem.java", "license": "lgpl-2.1", "size": 27193 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,785,463
private boolean requestFilterInfo(InternalDistributedMember recipient) { // Request for Filter Information before getting the // HARegion snapshot. final DistributionManager dm = this.region.getDistributionManager(); RequestFilterInfoMessage filterInfoMsg = new RequestFilterInfoMessage(); filterIn...
boolean function(InternalDistributedMember recipient) { final DistributionManager dm = this.region.getDistributionManager(); RequestFilterInfoMessage filterInfoMsg = new RequestFilterInfoMessage(); filterInfoMsg.regionPath = this.region.getFullPath(); filterInfoMsg.setRecipient(recipient); FilterInfoProcessor processor...
/** * transfer interest/cq registrations from the image provider to this VM * * @return whether the operation succeeded in transferring anything */
transfer interest/cq registrations from the image provider to this VM
requestFilterInfo
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java", "license": "apache-2.0", "size": 168083 }
[ "java.util.concurrent.TimeoutException", "org.apache.geode.InternalGemFireException", "org.apache.geode.distributed.internal.DistributionManager", "org.apache.geode.distributed.internal.ReplyException", "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import java.util.concurrent.TimeoutException; import org.apache.geode.InternalGemFireException; import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.ReplyException; import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import java.util.concurrent.*; import org.apache.geode.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
155,407
public void startDocument () throws SAXException { // no op }
void function () throws SAXException { }
/** * Receive notification of the beginning of the document. * * <p>By default, do nothing. Application writers may override this * method in a subclass to take specific actions at the beginning * of a document (such as allocating the root node of a tree or * creating an output file).</p>...
Receive notification of the beginning of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file)
startDocument
{ "repo_name": "svn2github/xerces-xml-commons", "path": "java/external/src/org/xml/sax/helpers/DefaultHandler.java", "license": "apache-2.0", "size": 16267 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,913,199
public static void unregisterLoggerContext(final String loggerContextName) { if (isJmxDisabled()) { LOGGER.debug("JMX disabled for Log4j2. Not unregistering MBeans."); return; } final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); unregisterLogg...
static void function(final String loggerContextName) { if (isJmxDisabled()) { LOGGER.debug(STR); return; } final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); unregisterLoggerContext(loggerContextName, mbs); }
/** * Unregisters all MBeans associated with the specified logger context (including MBeans for {@code LoggerConfig}s * and {@code Appender}s from the platform MBean server. * * @param loggerContextName name of the logger context to unregister */
Unregisters all MBeans associated with the specified logger context (including MBeans for LoggerConfigs and Appenders from the platform MBean server
unregisterLoggerContext
{ "repo_name": "codescale/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java", "license": "apache-2.0", "size": 17697 }
[ "java.lang.management.ManagementFactory", "javax.management.MBeanServer" ]
import java.lang.management.ManagementFactory; import javax.management.MBeanServer;
import java.lang.management.*; import javax.management.*;
[ "java.lang", "javax.management" ]
java.lang; javax.management;
1,873,026
public X509Certificate getDecryptionCertificate() { return decryptionCertificate; }
X509Certificate function() { return decryptionCertificate; }
/** * Returns the decryption certificate. * @return the decryption certificate */
Returns the decryption certificate
getDecryptionCertificate
{ "repo_name": "torakiki/sambox", "path": "src/main/java/org/sejda/sambox/pdmodel/encryption/PublicKeyProtectionPolicy.java", "license": "apache-2.0", "size": 4104 }
[ "java.security.cert.X509Certificate" ]
import java.security.cert.X509Certificate;
import java.security.cert.*;
[ "java.security" ]
java.security;
2,074,388
@Override public void initializeState(FunctionInitializationContext context) throws Exception { OperatorStateStore stateStore = context.getOperatorStateStore(); ListState<State<T>> restoredBucketStates = stateStore.getSerializableListState("bucket-states"); if (context.isRestored()) { for (State<...
void function(FunctionInitializationContext context) throws Exception { OperatorStateStore stateStore = context.getOperatorStateStore(); ListState<State<T>> restoredBucketStates = stateStore.getSerializableListState(STR); if (context.isRestored()) { for (State<T> states : restoredBucketStates.get()) { for (String bucke...
/** * The actual paths in this depend on the binary checkpoint so it you update this the paths * here have to be updated as well. */
The actual paths in this depend on the binary checkpoint so it you update this the paths here have to be updated as well
initializeState
{ "repo_name": "fhueske/flink", "path": "flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkMigrationTest.java", "license": "apache-2.0", "size": 10132 }
[ "java.util.List", "java.util.Map", "org.apache.flink.api.common.state.ListState", "org.apache.flink.api.common.state.OperatorStateStore", "org.apache.flink.runtime.state.FunctionInitializationContext", "org.apache.hadoop.fs.Path", "org.junit.Assert" ]
import java.util.List; import java.util.Map; import org.apache.flink.api.common.state.ListState; import org.apache.flink.api.common.state.OperatorStateStore; import org.apache.flink.runtime.state.FunctionInitializationContext; import org.apache.hadoop.fs.Path; import org.junit.Assert;
import java.util.*; import org.apache.flink.api.common.state.*; import org.apache.flink.runtime.state.*; import org.apache.hadoop.fs.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.flink; org.apache.hadoop; org.junit;
823,401
public TopicDistribution serializeToFile(String fullPathName, RDFFormat format, ObjectModelDAO<TopicDistribution> dao, boolean empty, boolean blankNode) throws RDFModelIOException, FileNotFoundException, ClassNotFoundException, OntologyLoadException, URISyntaxException;
TopicDistribution function(String fullPathName, RDFFormat format, ObjectModelDAO<TopicDistribution> dao, boolean empty, boolean blankNode) throws RDFModelIOException, FileNotFoundException, ClassNotFoundException, OntologyLoadException, URISyntaxException;
/** * Serializes T objects to a file. * @param fullPathName * @param format * @param dao * @param empty * @param blankNode * @return * @throws RDFModelIOException */
Serializes T objects to a file
serializeToFile
{ "repo_name": "ljgarcia/biotea-biolinks", "path": "src/main/java/biolinks/parser/TopicDistributionParser.java", "license": "apache-2.0", "size": 2959 }
[ "edu.stanford.smi.protege.exception.OntologyLoadException", "java.io.FileNotFoundException", "java.net.URISyntaxException", "org.apache.jena.riot.RDFFormat", "ws.biotea.ld2rdf.exception.RDFModelIOException" ]
import edu.stanford.smi.protege.exception.OntologyLoadException; import java.io.FileNotFoundException; import java.net.URISyntaxException; import org.apache.jena.riot.RDFFormat; import ws.biotea.ld2rdf.exception.RDFModelIOException;
import edu.stanford.smi.protege.exception.*; import java.io.*; import java.net.*; import org.apache.jena.riot.*; import ws.biotea.ld2rdf.exception.*;
[ "edu.stanford.smi", "java.io", "java.net", "org.apache.jena", "ws.biotea.ld2rdf" ]
edu.stanford.smi; java.io; java.net; org.apache.jena; ws.biotea.ld2rdf;
2,783,541
public static String addTagValue( KettleAttributeInterface tag, boolean bool ) { return addTagValue( tag.getXmlCode(), bool ); }
static String function( KettleAttributeInterface tag, boolean bool ) { return addTagValue( tag.getXmlCode(), bool ); }
/** * Build an XML string (including a carriage return) for a certain tag boolean value * * @param tag * The XML tag * @param bool * The boolean value of the tag * @return The XML String for the tag. */
Build an XML string (including a carriage return) for a certain tag boolean value
addTagValue
{ "repo_name": "codek/pentaho-kettle", "path": "core/src/org/pentaho/di/core/xml/XMLHandler.java", "license": "apache-2.0", "size": 37433 }
[ "org.pentaho.di.core.KettleAttributeInterface" ]
import org.pentaho.di.core.KettleAttributeInterface;
import org.pentaho.di.core.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,743,459
List<String> output = new ArrayList<String>(); output.add(networkToString(numInputs, hiddenLayer, numOutputs)); output.addAll(trainOutputs); writeFile(outputFile, output); }
List<String> output = new ArrayList<String>(); output.add(networkToString(numInputs, hiddenLayer, numOutputs)); output.addAll(trainOutputs); writeFile(outputFile, output); }
/** * Writes the list of outputs made by the training on a specified file. * * @param outputFile File * @param numInputs Number of inputs * @param numOutputs Number of outputs * @param hiddenLayer Hidden Layers * @param trainOutputs List of strings * @throws IOException */
Writes the list of outputs made by the training on a specified file
writeOutput
{ "repo_name": "lucasandre/ilp-network-training", "path": "src/org/unioeste/ilp/network/util/OutputHandler.java", "license": "gpl-3.0", "size": 5621 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
377,132
@RequestMapping(method = RequestMethod.GET, value = { "/searchSales"}, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.OK) @ResponseBody public String searchSales(@RequestParam(value="id", required=false) String id) { logger.debug("Request: /searchClients wit...
@RequestMapping(method = RequestMethod.GET, value = { STR}, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.OK) String function(@RequestParam(value="id", required=false) String id) { logger.debug(STR); return null; }
/** * Handles requests to the /searchClients service **/
Handles requests to the /searchClients service
searchSales
{ "repo_name": "EstigiaIT/vet-app-estigia-it", "path": "vet-app-estigia-it/vet-web-backend/src/main/java/ar/com/estigiait/app/controller/SalesController.java", "license": "gpl-3.0", "size": 3463 }
[ "org.springframework.http.HttpStatus", "org.springframework.http.MediaType", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind.annotation.RequestParam", "org.springframework.web.bind.annotation.ResponseStatus" ]
import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation....
import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "org.springframework.http", "org.springframework.web" ]
org.springframework.http; org.springframework.web;
2,235,566
public void updateJob(String jobName, String jobXml) throws IOException { this.updateJob(jobName, jobXml, true); }
void function(String jobName, String jobXml) throws IOException { this.updateJob(jobName, jobXml, true); }
/** * Update the xml description of an existing job * * @return the new job object * @throws IOException */
Update the xml description of an existing job
updateJob
{ "repo_name": "terabyte/jenkins-client", "path": "src/main/java/com/offbytwo/jenkins/JenkinsServer.java", "license": "mit", "size": 9636 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,173,947
@Test public void testFindNodeDifference_isExcludedDiffers() { ProductPartitionNode origNode = new ProductPartitionNode( new ProductPartitionNode(null, null, 2L, dimensionComparator), ProductDimensions.createOfferId("1234"), -1L, dimensionComparator).asBiddableUnit().setBid( 1000000L); ...
void function() { ProductPartitionNode origNode = new ProductPartitionNode( new ProductPartitionNode(null, null, 2L, dimensionComparator), ProductDimensions.createOfferId("1234"), -1L, dimensionComparator).asBiddableUnit().setBid( 1000000L); ProductPartitionNode newNode = new ProductPartitionNode( new ProductPartitionN...
/** * Test for when the two nodes are unit nodes but one is excluded and the other is biddable. */
Test for when the two nodes are unit nodes but one is excluded and the other is biddable
testFindNodeDifference_isExcludedDiffers
{ "repo_name": "gawkermedia/googleads-java-lib", "path": "modules/adwords_axis/src/test/java/com/google/api/ads/adwords/axis/utils/v201601/shopping/ProductPartitionNodeDifferTest.java", "license": "apache-2.0", "size": 8509 }
[ "com.google.api.ads.adwords.axis.utils.v201601.shopping.ProductPartitionNodeDiffer", "org.junit.Assert" ]
import com.google.api.ads.adwords.axis.utils.v201601.shopping.ProductPartitionNodeDiffer; import org.junit.Assert;
import com.google.api.ads.adwords.axis.utils.v201601.shopping.*; import org.junit.*;
[ "com.google.api", "org.junit" ]
com.google.api; org.junit;
121,785
@Override public void enterTryClauses(@NotNull ErlangParser.TryClausesContext ctx) { }
@Override public void enterTryClauses(@NotNull ErlangParser.TryClausesContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitGuard
{ "repo_name": "lyskouski/erlang-netbeans", "path": "src/by/creativity/erlang/lexer/ErlangBaseListener.java", "license": "gpl-2.0", "size": 35296 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,291,910
public void setupItemAction(ActionEvent event) { UIActionLink link = (UIActionLink)event.getComponent(); Map<String, String> params = link.getParameterMap(); String id = params.get("id"); if (id != null && id.length() != 0) { try { // create the node ref...
void function(ActionEvent event) { UIActionLink link = (UIActionLink)event.getComponent(); Map<String, String> params = link.getParameterMap(); String id = params.get("id"); if (id != null && id.length() != 0) { try { NodeRef ref = new NodeRef(getArchiveRootRef().getStoreRef(), id); Node node = new Node(ref); node.addP...
/** * Action handler called to prepare the selected item for an action */
Action handler called to prepare the selected item for an action
setupItemAction
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/web-client/source/java/org/alfresco/web/bean/trashcan/TrashcanDialog.java", "license": "lgpl-3.0", "size": 32050 }
[ "java.text.MessageFormat", "java.util.Map", "javax.faces.context.FacesContext", "javax.faces.event.ActionEvent", "org.alfresco.model.ContentModel", "org.alfresco.service.cmr.repository.InvalidNodeRefException", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.web.app.Application", "org.a...
import java.text.MessageFormat; import java.util.Map; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app...
import java.text.*; import java.util.*; import javax.faces.context.*; import javax.faces.event.*; import org.alfresco.model.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.web.app.*; import org.alfresco.web.bean.repository.*; import org.alfresco.web.ui.common.*; import org.alfresco.web.ui.common.co...
[ "java.text", "java.util", "javax.faces", "org.alfresco.model", "org.alfresco.service", "org.alfresco.web" ]
java.text; java.util; javax.faces; org.alfresco.model; org.alfresco.service; org.alfresco.web;
425,376
@Override protected String getGroupFileName() { String groupFile = PAResourceManagerProperties.RM_GROUP_FILE.getValueAsString(); //test that group file path is an absolute path or not if (!(new File(groupFile).isAbsolute())) { //file path is relative, so we complete the path ...
String function() { String groupFile = PAResourceManagerProperties.RM_GROUP_FILE.getValueAsString(); if (!(new File(groupFile).isAbsolute())) { groupFile = PAResourceManagerProperties.getAbsolutePath(groupFile); } return groupFile; }
/** * Returns group file name from resource manager configuration file */
Returns group file name from resource manager configuration file
getGroupFileName
{ "repo_name": "mbenguig/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/authentication/RMPAMLoginModule.java", "license": "agpl-3.0", "size": 3178 }
[ "java.io.File", "org.ow2.proactive.resourcemanager.core.properties.PAResourceManagerProperties" ]
import java.io.File; import org.ow2.proactive.resourcemanager.core.properties.PAResourceManagerProperties;
import java.io.*; import org.ow2.proactive.resourcemanager.core.properties.*;
[ "java.io", "org.ow2.proactive" ]
java.io; org.ow2.proactive;
844,477
private static int getNeededPlayers() { return (int) (Bukkit.getOnlinePlayers().size() * PERCENT_NEEDED); }
static int function() { return (int) (Bukkit.getOnlinePlayers().size() * PERCENT_NEEDED); }
/** * Get the number of players needed to sleep. * @return needed */
Get the number of players needed to sleep
getNeededPlayers
{ "repo_name": "Kneesnap/Kineticraft", "path": "src/net/kineticraft/lostcity/mechanics/SleepMechanics.java", "license": "gpl-3.0", "size": 2538 }
[ "org.bukkit.Bukkit" ]
import org.bukkit.Bukkit;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
1,280,244
protected void renderItemSpacer( FacesContext context, RenderingContext arc) throws IOException { if (isPDA(arc)) { context.getResponseWriter().writeText(XhtmlConstants.NBSP_STRING, null); } else { renderSpacer(context, arc, "5", "1"); } }
void function( FacesContext context, RenderingContext arc) throws IOException { if (isPDA(arc)) { context.getResponseWriter().writeText(XhtmlConstants.NBSP_STRING, null); } else { renderSpacer(context, arc, "5", "1"); } }
/** * Writes the separator between two elements */
Writes the separator between two elements
renderItemSpacer
{ "repo_name": "adamrduffy/trinidad-1.0.x", "path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SingleStepButtonBarRenderer.java", "license": "apache-2.0", "size": 12442 }
[ "java.io.IOException", "javax.faces.context.FacesContext", "org.apache.myfaces.trinidad.context.RenderingContext" ]
import java.io.IOException; import javax.faces.context.FacesContext; import org.apache.myfaces.trinidad.context.RenderingContext;
import java.io.*; import javax.faces.context.*; import org.apache.myfaces.trinidad.context.*;
[ "java.io", "javax.faces", "org.apache.myfaces" ]
java.io; javax.faces; org.apache.myfaces;
462,212
public static FsPermission deserializeWriterDirPermissions(State state, int numBranches, int branchId) { return new FsPermission(state.getPropAsShortWithRadix( ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_DIR_PERMISSIONS, numBranches, branchId), FsPermission.getDefault().toS...
static FsPermission function(State state, int numBranches, int branchId) { return new FsPermission(state.getPropAsShortWithRadix( ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_DIR_PERMISSIONS, numBranches, branchId), FsPermission.getDefault().toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX))...
/** * Deserializes a {@link FsPermission}s object that should be used when a {@link DataWriter} is creating directories. */
Deserializes a <code>FsPermission</code>s object that should be used when a <code>DataWriter</code> is creating directories
deserializeWriterDirPermissions
{ "repo_name": "slietz/gobblin", "path": "gobblin-utility/src/main/java/gobblin/util/HadoopUtils.java", "license": "apache-2.0", "size": 10985 }
[ "org.apache.hadoop.fs.permission.FsPermission" ]
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.fs.permission.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
420,567
private SearchResultDone doPagedSearch( LdapSession session, SearchRequest req, PagedResultsDecorator control ) throws Exception { PagedResultsDecorator pagedSearchControl = control; PagedResultsDecorator pagedResultsControl = null; // Get the size limits // Don't bother...
SearchResultDone function( LdapSession session, SearchRequest req, PagedResultsDecorator control ) throws Exception { PagedResultsDecorator pagedSearchControl = control; PagedResultsDecorator pagedResultsControl = null; long serverLimit = getServerSizeLimit( session, req ); long requestLimit = req.getSizeLimit() == 0L ...
/** * Handle a Paged Search request. */
Handle a Paged Search request
doPagedSearch
{ "repo_name": "TremoloSecurity/MyVirtualDirectory", "path": "server/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java", "license": "apache-2.0", "size": 63370 }
[ "java.lang.Math", "org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator", "org.apache.directory.api.ldap.model.message.LdapResult", "org.apache.directory.api.ldap.model.message.ResultCodeEnum", "org.apache.directory.api.ldap.model.message.SearchRequest", "org.apache.direct...
import java.lang.Math; import org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator; import org.apache.directory.api.ldap.model.message.LdapResult; import org.apache.directory.api.ldap.model.message.ResultCodeEnum; import org.apache.directory.api.ldap.model.message.SearchRequest; import ...
import java.lang.*; import org.apache.directory.api.ldap.codec.controls.search.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.util.*; import org.apache.directory.server.core.api.filtering.*; import org.apache.directory.server.i18n.*; import org.apache.directory.server.ldap.*; i...
[ "java.lang", "org.apache.directory" ]
java.lang; org.apache.directory;
624,537
private static void setDateAndCacheHeaders(HttpResponse response) { SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US); dateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE)); // Date header Calendar time = new GregorianCalendar(); ...
static void function(HttpResponse response) { SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US); dateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE)); Calendar time = new GregorianCalendar(); response.headers().set(DATE, dateFormatter.format(time.getTime())); time.add...
/** * Sets the Date and Cache headers for the HTTP Response * * @param response * HTTP response * @param fileToCache * file to extract content type */
Sets the Date and Cache headers for the HTTP Response
setDateAndCacheHeaders
{ "repo_name": "camunda/camunda-bpm-workbench", "path": "api/debug-service-websocket/src/main/java/org/camunda/bpm/debugger/server/netty/staticresource/HttpClasspathServerHandler.java", "license": "agpl-3.0", "size": 9959 }
[ "io.netty.handler.codec.http.HttpResponse", "java.lang.management.ManagementFactory", "java.text.SimpleDateFormat", "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar", "java.util.Locale", "java.util.TimeZone" ]
import io.netty.handler.codec.http.HttpResponse; import java.lang.management.ManagementFactory; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone;
import io.netty.handler.codec.http.*; import java.lang.management.*; import java.text.*; import java.util.*;
[ "io.netty.handler", "java.lang", "java.text", "java.util" ]
io.netty.handler; java.lang; java.text; java.util;
564,058
public static byte[] readNullTermByteArray (InputStream is, int timeout) throws IOException { int bytesRead = 0; byte bnext = 0; byte[] tempBuf = new byte[MAX_BUF_SIZE]; while (bnext >= 0) { bnext = (byte)is.read(); if (bytesRead == MAX_BUF_SIZE |...
static byte[] function (InputStream is, int timeout) throws IOException { int bytesRead = 0; byte bnext = 0; byte[] tempBuf = new byte[MAX_BUF_SIZE]; while (bnext >= 0) { bnext = (byte)is.read(); if (bytesRead == MAX_BUF_SIZE bnext == '\0') { break; } tempBuf [bytesRead++] = bnext; } byte[] bResult = new byte[bytesRead...
/** * Reads a null terminated string from the inputstream into a byteArray. * The method read char by char and returns when a null character is found * or when the timeout is reached [TODO] - timeout not implemented. * * @param is - Input stream where the read operation will be performed. ...
Reads a null terminated string from the inputstream into a byteArray. The method read char by char and returns when a null character is found or when the timeout is reached [TODO] - timeout not implemented
readNullTermByteArray
{ "repo_name": "ihmc/nomads", "path": "aci/java/us/ihmc/aci/util/ByteArrayHandler.java", "license": "gpl-3.0", "size": 13164 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,593,695
public List<ApplicationGatewayIpConfigurationInner> gatewayIpConfigurations() { return this.gatewayIpConfigurations; }
List<ApplicationGatewayIpConfigurationInner> function() { return this.gatewayIpConfigurations; }
/** * Get the gatewayIpConfigurations property: Subnets of application the gateway resource. * * @return the gatewayIpConfigurations value. */
Get the gatewayIpConfigurations property: Subnets of application the gateway resource
gatewayIpConfigurations
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java", "license": "mit", "size": 26421 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,140,820
public void setConversionService(ConversionService conversionService) { this.conversionService = conversionService; }
void function(ConversionService conversionService) { this.conversionService = conversionService; }
/** * Set the conversion service. * @param conversionService the conversion service */
Set the conversion service
setConversionService
{ "repo_name": "candrews/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java", "license": "apache-2.0", "size": 11430 }
[ "org.springframework.core.convert.ConversionService" ]
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.*;
[ "org.springframework.core" ]
org.springframework.core;
1,918,912
public static boolean isExternalStorageReadable() { String state = Environment.getExternalStorageState(); return Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state); }
static boolean function() { String state = Environment.getExternalStorageState(); return Environment.MEDIA_MOUNTED.equals(state) Environment.MEDIA_MOUNTED_READ_ONLY.equals(state); }
/** * Check if external storage is readable or not * @return true if readable, false otherwise */
Check if external storage is readable or not
isExternalStorageReadable
{ "repo_name": "Acidburn0zzz/org.numixproject.hermes", "path": "hermes/src/main/java/org/numixproject/hermes/utils/TinyDB.java", "license": "gpl-2.0", "size": 16320 }
[ "android.os.Environment" ]
import android.os.Environment;
import android.os.*;
[ "android.os" ]
android.os;
495,268
@Override public java.util.Date getUpdateDt() { return _scienceAppDescription.getUpdateDt(); }
java.util.Date function() { return _scienceAppDescription.getUpdateDt(); }
/** * Returns the update dt of this science app description. * * @return the update dt of this science app description */
Returns the update dt of this science app description
getUpdateDt
{ "repo_name": "queza85/edison", "path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/service/org/kisti/edison/science/model/ScienceAppDescriptionWrapper.java", "license": "gpl-3.0", "size": 14667 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,851,130
@Override protected void configureGlobalInstance(Component c, Object imp) { if (imp.equals(ContainerManager.class)) { Dictionary<String, Set<String>> props = new Hashtable<String, Set<String>>(); Set<String> propSet = new HashSet<String>(); propSet.add("containermgr.e...
void function(Component c, Object imp) { if (imp.equals(ContainerManager.class)) { Dictionary<String, Set<String>> props = new Hashtable<String, Set<String>>(); Set<String> propSet = new HashSet<String>(); propSet.add(STR); props.put(STR, propSet); c.setInterface( new String[] { IContainerManager.class.getName(), ICont...
/** * Configure the dependency for a given instance non-containerd * * @param c * Component assigned for this instance, this will be what will * be used for configuration * @param imp * implementation to be configured * @param containerName *...
Configure the dependency for a given instance non-containerd
configureGlobalInstance
{ "repo_name": "xiaohanz/softcontroller", "path": "opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/Activator.java", "license": "epl-1.0", "size": 6536 }
[ "java.util.Dictionary", "java.util.HashSet", "java.util.Hashtable", "java.util.Set", "org.apache.felix.dm.Component", "org.eclipse.osgi.framework.console.CommandProvider", "org.opendaylight.controller.clustering.services.ICacheUpdateAware", "org.opendaylight.controller.clustering.services.IClusterGlob...
import java.util.Dictionary; import java.util.HashSet; import java.util.Hashtable; import java.util.Set; import org.apache.felix.dm.Component; import org.eclipse.osgi.framework.console.CommandProvider; import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clusterin...
import java.util.*; import org.apache.felix.dm.*; import org.eclipse.osgi.framework.console.*; import org.opendaylight.controller.clustering.services.*; import org.opendaylight.controller.configuration.*; import org.opendaylight.controller.containermanager.*; import org.opendaylight.controller.sal.core.*;
[ "java.util", "org.apache.felix", "org.eclipse.osgi", "org.opendaylight.controller" ]
java.util; org.apache.felix; org.eclipse.osgi; org.opendaylight.controller;
1,841,667
@Override public ResourceLocator getResourceLocator() { return DomainEditPlugin.INSTANCE; }
ResourceLocator function() { return DomainEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain.edit/src/de/dfki/iui/basys/model/domain/resourcetype/provider/ResourceTypeCatalogueCollectionItemProvider.java", "license": "epl-1.0", "size": 5307 }
[ "de.dfki.iui.basys.model.domain.order.provider.DomainEditPlugin", "org.eclipse.emf.common.util.ResourceLocator" ]
import de.dfki.iui.basys.model.domain.order.provider.DomainEditPlugin; import org.eclipse.emf.common.util.ResourceLocator;
import de.dfki.iui.basys.model.domain.order.provider.*; import org.eclipse.emf.common.util.*;
[ "de.dfki.iui", "org.eclipse.emf" ]
de.dfki.iui; org.eclipse.emf;
1,724,019
protected void exitTaskTracker(Throwable t) { LOG.fatal("Distributed Cache cleanup thread received runtime exception." + " Exiting the TaskTracker", t); Runtime.getRuntime().exit(-1); } } // For holding the properties of each cache directory private static class CacheDir { long si...
void function(Throwable t) { LOG.fatal(STR + STR, t); Runtime.getRuntime().exit(-1); } } private static class CacheDir { long size; long subdirs; } protected class BaseDirManager { private TreeMap<Path, CacheDir> properties = new TreeMap<Path, CacheDir>();
/** * Exit the task tracker because of a fatal error. */
Exit the task tracker because of a fatal error
exitTaskTracker
{ "repo_name": "wzhuo918/release-1.1.2-MDP", "path": "src/mapred/org/apache/hadoop/filecache/TrackerDistributedCacheManager.java", "license": "apache-2.0", "size": 41899 }
[ "java.util.TreeMap", "org.apache.hadoop.fs.Path" ]
import java.util.TreeMap; import org.apache.hadoop.fs.Path;
import java.util.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,689,752
public void set(ByteBuffer bytes) { throw new UnsupportedOperationException(getClass().getName() + " does not support set(ByteBuffer)"); }
void function(ByteBuffer bytes) { throw new UnsupportedOperationException(getClass().getName() + STR); }
/** * Update the command output with a sequence of bytes, or {@code null}. Concrete {@link CommandOutput} implementations must * override this method to decode {@code bulk}/bytes response values. * * @param bytes The command output, or null. */
Update the command output with a sequence of bytes, or null. Concrete <code>CommandOutput</code> implementations must override this method to decode bulk/bytes response values
set
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/output/CommandOutput.java", "license": "apache-2.0", "size": 7368 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,390,808
@NotNull public WalScanner.ScanTerminateStep findAllRecordsFor( @NotNull Collection<T2<Integer, Long>> groupAndPageIds ) { requireNonNull(groupAndPageIds); HashSet<T2<Integer, Long>> groupAndPageIds0 = new HashSet<>(groupAndPageIds); // Collect all (group, partition) partition ...
@NotNull WalScanner.ScanTerminateStep function( @NotNull Collection<T2<Integer, Long>> groupAndPageIds ) { requireNonNull(groupAndPageIds); HashSet<T2<Integer, Long>> groupAndPageIds0 = new HashSet<>(groupAndPageIds); Set<T2<Integer, Integer>> groupAndParts = groupAndPageIds0.stream() .map((tup) -> new T2<>(tup.get1(),...
/** * Finding all page physical records whose pageId is contained in given collection. * * @param groupAndPageIds Search pages. * @return Final step for execution some action on result. */
Finding all page physical records whose pageId is contained in given collection
findAllRecordsFor
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/scanner/WalScanner.java", "license": "apache-2.0", "size": 7223 }
[ "java.util.Collection", "java.util.HashSet", "java.util.Objects", "java.util.Set", "java.util.function.Predicate", "java.util.stream.Collectors", "org.apache.ignite.internal.pagemem.PageIdUtils", "org.apache.ignite.internal.pagemem.wal.WALPointer", "org.apache.ignite.internal.pagemem.wal.record.WALR...
import java.util.Collection; import java.util.HashSet; import java.util.Objects; import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.ignite.internal.pagemem.PageIdUtils; import org.apache.ignite.internal.pagemem.wal.WALPointer; import org.apache.ignite.intern...
import java.util.*; import java.util.function.*; import java.util.stream.*; import org.apache.ignite.internal.pagemem.*; import org.apache.ignite.internal.pagemem.wal.*; import org.apache.ignite.internal.pagemem.wal.record.*; import org.apache.ignite.internal.processors.cache.persistence.wal.reader.*; import org.apache...
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
1,376,023
private static boolean isMimeTypeAcceptable(HttpServletRequest request, String mimeType, Collection<String> parameters) { if (request == null) throw new IllegalArgumentException("request must not be null"); //$NON-NLS-1$ if (mimeType == null || mimeType.length() == 0) throw n...
static boolean function(HttpServletRequest request, String mimeType, Collection<String> parameters) { if (request == null) throw new IllegalArgumentException(STR); if (mimeType == null mimeType.length() == 0) throw new IllegalArgumentException(STR); final String requestType = mimeType.trim().toLowerCase(); final String...
/** * Tests whether or not the specified <code>mimeType</code> is acceptable * to the specified <code>request</code>, as indicated in that requests * accept headers. * * @param request The http request. Cannot be <code>null</code>. * * @param mimeType The mime type to test. Cannot be...
Tests whether or not the specified <code>mimeType</code> is acceptable to the specified <code>request</code>, as indicated in that requests accept headers
isMimeTypeAcceptable
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.oauth/src/com/ibm/ws/security/oauth20/web/AbstractOidcEndpointServices.java", "license": "epl-1.0", "size": 32701 }
[ "com.ibm.ws.security.oauth20.util.MediaRange", "com.ibm.ws.security.oauth20.util.StringUtil", "java.util.Collection", "javax.servlet.http.HttpServletRequest" ]
import com.ibm.ws.security.oauth20.util.MediaRange; import com.ibm.ws.security.oauth20.util.StringUtil; import java.util.Collection; import javax.servlet.http.HttpServletRequest;
import com.ibm.ws.security.oauth20.util.*; import java.util.*; import javax.servlet.http.*;
[ "com.ibm.ws", "java.util", "javax.servlet" ]
com.ibm.ws; java.util; javax.servlet;
723,290
public List<String> generateOutput();
List<String> function();
/** * Handles the logic of generating output to what is required by the test * case. Typically, calls various getters in an implementation of * {@link ITestCaseHandler} and collates the information * * @return The output expected by the test case */
Handles the logic of generating output to what is required by the test case. Typically, calls various getters in an implementation of <code>ITestCaseHandler</code> and collates the information
generateOutput
{ "repo_name": "maaz93/algorithms4java", "path": "src/main/java/com/common/algorithms/base/ITestCaseOutputHandler.java", "license": "mit", "size": 538 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
603,395
public static int getMaxSolrVMSize() { if (PlatformUtil.is64BitJVM()) { return preferences.getInt(SOLR_MAX_JVM_SIZE, DEFAULT_SOLR_HEAP_SIZE_MB_64BIT_PLATFORM); } else { return preferences.getInt(SOLR_MAX_JVM_SIZE, DEFAULT_SOLR_HEAP_SIZE_MB_32BIT_PLATFORM); } }
static int function() { if (PlatformUtil.is64BitJVM()) { return preferences.getInt(SOLR_MAX_JVM_SIZE, DEFAULT_SOLR_HEAP_SIZE_MB_64BIT_PLATFORM); } else { return preferences.getInt(SOLR_MAX_JVM_SIZE, DEFAULT_SOLR_HEAP_SIZE_MB_32BIT_PLATFORM); } }
/** * Get the maximum JVM heap size (in MB) for the embedded Solr server. The * returned value depends on the platform (64bit vs 32bit). * * @return Saved value or default (2 GB for 64bit platforms, 512MB for * 32bit) */
Get the maximum JVM heap size (in MB) for the embedded Solr server. The returned value depends on the platform (64bit vs 32bit)
getMaxSolrVMSize
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/core/UserPreferences.java", "license": "apache-2.0", "size": 27495 }
[ "org.sleuthkit.autopsy.coreutils.PlatformUtil" ]
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.coreutils.*;
[ "org.sleuthkit.autopsy" ]
org.sleuthkit.autopsy;
219,394
void setThreshold(BigDecimal value);
void setThreshold(BigDecimal value);
/** * Sets the value of the '{@link org.openhab.binding.tinkerforge.internal.model.MBrickletAnalogIn#getThreshold <em>Threshold</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Threshold</em>' attribute. * @see #getThreshold() * @generated ...
Sets the value of the '<code>org.openhab.binding.tinkerforge.internal.model.MBrickletAnalogIn#getThreshold Threshold</code>' attribute.
setThreshold
{ "repo_name": "cschneider/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/MBrickletAnalogIn.java", "license": "epl-1.0", "size": 5211 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,687,541
public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
Builder function(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
/** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * CardholderCreateParams.SpendingControls#extraParams} for the field documentation. */
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>CardholderCreateParams.SpendingControls#extraParams</code> for the field documentation
putExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/issuing/CardholderCreateParams.java", "license": "mit", "size": 147487 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,587,680
public static ims.core.domain.objects.PatientSummaryRecord extractPatientSummaryRecord(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientSummaryRecordVo valueObject) { return extractPatientSummaryRecord(domainFactory, valueObject, new HashMap()); }
static ims.core.domain.objects.PatientSummaryRecord function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientSummaryRecordVo valueObject) { return extractPatientSummaryRecord(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractPatientSummaryRecord
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientSummaryRecordVoAssembler.java", "license": "agpl-3.0", "size": 22408 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,877,295
protected ArrayList<FunctionParameter> getInputObjects(ArrayList<String> inputs, LocalVariableMap variableMapping) { ArrayList<FunctionParameter> inputObjects = new ArrayList<FunctionParameter>(); for (int i = 0; i < inputs.size(); i++) { ArrayList<String> tokens = new ArrayList<String>(); StringTokeni...
ArrayList<FunctionParameter> function(ArrayList<String> inputs, LocalVariableMap variableMapping) { ArrayList<FunctionParameter> inputObjects = new ArrayList<FunctionParameter>(); for (int i = 0; i < inputs.size(); i++) { ArrayList<String> tokens = new ArrayList<String>(); StringTokenizer tk = new StringTokenizer(input...
/** * Method to convert string representation of input into function input * object. * * @param inputs * @param variableMapping * @param metaData * @return */
Method to convert string representation of input into function input object
getInputObjects
{ "repo_name": "Myasuka/systemml", "path": "src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java", "license": "apache-2.0", "size": 36240 }
[ "java.util.ArrayList", "java.util.StringTokenizer", "org.apache.sysml.runtime.controlprogram.caching.MatrixObject", "org.apache.sysml.runtime.instructions.cp.ScalarObject", "org.apache.sysml.runtime.matrix.MatrixCharacteristics", "org.apache.sysml.udf.BinaryObject", "org.apache.sysml.udf.FunctionParamet...
import java.util.ArrayList; import java.util.StringTokenizer; import org.apache.sysml.runtime.controlprogram.caching.MatrixObject; import org.apache.sysml.runtime.instructions.cp.ScalarObject; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.udf.BinaryObject; import org.apache.sysml...
import java.util.*; import org.apache.sysml.runtime.controlprogram.caching.*; import org.apache.sysml.runtime.instructions.cp.*; import org.apache.sysml.runtime.matrix.*; import org.apache.sysml.udf.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
1,037,775
public static void fillGridRow(SudokuGrid grid, int rowIndex, String row) throws InvalidInputException { if (!row.contains(" ")) { row = row.replaceAll(".(?!$)", "$0 ").trim(); //space after each character } Scanner scanner = new Scanner(row); int numberIndex = 0; ...
static void function(SudokuGrid grid, int rowIndex, String row) throws InvalidInputException { if (!row.contains(" ")) { row = row.replaceAll(STR, STR).trim(); } Scanner scanner = new Scanner(row); int numberIndex = 0; while (scanner.hasNextInt()) { if (numberIndex >= grid.getSideLength()) { throw new InvalidInputExcep...
/** * Fills a given row with a given index of a given grid with numbers * @param grid the grid to fill with numbers * @param rowIndex the index of the row which should be filled in the grid * @param row the row of numbers encoded as a string to fill into the grid * @throws InvalidInputException...
Fills a given row with a given index of a given grid with numbers
fillGridRow
{ "repo_name": "marcelmoosbrugger/genetic-sudoku-solver", "path": "src/io/GridReader.java", "license": "mit", "size": 3453 }
[ "java.util.Scanner" ]
import java.util.Scanner;
import java.util.*;
[ "java.util" ]
java.util;
1,159,501
public static CompareNameQuery createQueryForNodesWithNameGreaterThan( Name constraintValue, String localNameField, ValueFactories factories, ...
static CompareNameQuery function( Name constraintValue, String localNameField, ValueFactories factories, CaseOperation caseOperation ) { return new CompareNameQuery(localNameField, constraintValue, factories.getNameFactory(), factories.getStringFactory(), IS_GREATER_THAN, caseOperation); }
/** * Construct a {@link Query} implementation that scores documents such that the node represented by the document has a name * that is greater than the supplied constraint name. * * @param constraintValue the constraint value; may not be null * @param localNameField the name of the document f...
Construct a <code>Query</code> implementation that scores documents such that the node represented by the document has a name that is greater than the supplied constraint name
createQueryForNodesWithNameGreaterThan
{ "repo_name": "mdrillin/modeshape", "path": "index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/query/CompareNameQuery.java", "license": "apache-2.0", "size": 11405 }
[ "org.modeshape.jcr.index.lucene.query.CaseOperations", "org.modeshape.jcr.value.Name", "org.modeshape.jcr.value.ValueFactories" ]
import org.modeshape.jcr.index.lucene.query.CaseOperations; import org.modeshape.jcr.value.Name; import org.modeshape.jcr.value.ValueFactories;
import org.modeshape.jcr.index.lucene.query.*; import org.modeshape.jcr.value.*;
[ "org.modeshape.jcr" ]
org.modeshape.jcr;
1,469,333
public static EmailBaseMessage createEmailMessage(Message message, Folder folder, String emailMessageContent, String serviceId) throws EmailConnectorException { try { EmailTextMessage emailMessage = new EmailTextMessage(emailMessageContent); //get headers of the email m...
static EmailBaseMessage function(Message message, Folder folder, String emailMessageContent, String serviceId) throws EmailConnectorException { try { EmailTextMessage emailMessage = new EmailTextMessage(emailMessageContent); Enumeration headers = message.getAllHeaders(); while (headers.hasMoreElements()) { Header h = (...
/** * Create the carbon message using corresponding email. * * @param message Instance of Email message * @param folder Instance of the folder in which Mail contains * @param emailMessageContent Message content * @param serviceId Unique id of the service ...
Create the carbon message using corresponding email
createEmailMessage
{ "repo_name": "shafreenAnfar/carbon-transports", "path": "email/org.wso2.carbon.transport.email/src/main/java/org/wso2/carbon/transport/email/utils/EmailUtils.java", "license": "apache-2.0", "size": 7095 }
[ "com.sun.mail.imap.IMAPFolder", "com.sun.mail.pop3.POP3Folder", "java.util.ArrayList", "java.util.Enumeration", "java.util.List", "javax.mail.Flags", "javax.mail.Folder", "javax.mail.Header", "javax.mail.Message", "javax.mail.MessageRemovedException", "javax.mail.UIDFolder", "org.wso2.carbon.t...
import com.sun.mail.imap.IMAPFolder; import com.sun.mail.pop3.POP3Folder; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import javax.mail.Flags; import javax.mail.Folder; import javax.mail.Header; import javax.mail.Message; import javax.mail.MessageRemovedException; import javax.mail....
import com.sun.mail.imap.*; import com.sun.mail.pop3.*; import java.util.*; import javax.mail.*; import org.wso2.carbon.transport.email.contract.message.*; import org.wso2.carbon.transport.email.exception.*;
[ "com.sun.mail", "java.util", "javax.mail", "org.wso2.carbon" ]
com.sun.mail; java.util; javax.mail; org.wso2.carbon;
139,785
public Properties incrementModifyOntology( String prevTestDir, Properties al, String testDir, Properties params ) { return modifyOntology( dirprefix+"/"+prevTestDir+"/"+ontoname, al, testDir, params ); }
Properties function( String prevTestDir, Properties al, String testDir, Properties params ) { return modifyOntology( dirprefix+"/"+prevTestDir+"/"+ontoname, al, testDir, params ); }
/** * Generate a test by altering an existing test */
Generate a test by altering an existing test
incrementModifyOntology
{ "repo_name": "dozed/align-api-project", "path": "procalign/src/main/java/fr/inrialpes/exmo/align/gen/TestGenerator.java", "license": "lgpl-2.1", "size": 8697 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,738,760
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<KeyCredentialInner> listKeyCredentialsAsync(String objectId, Context context) { return new PagedFlux<>(() -> listKeyCredentialsSinglePageAsync(objectId, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<KeyCredentialInner> function(String objectId, Context context) { return new PagedFlux<>(() -> listKeyCredentialsSinglePageAsync(objectId, context)); }
/** * Get the keyCredentials associated with the specified service principal. * * @param objectId The object ID of the service principal for which to get keyCredentials. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail t...
Get the keyCredentials associated with the specified service principal
listKeyCredentialsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsClientImpl.java", "license": "mit", "size": 83566 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.authorization.fluent.models.KeyCredentialInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.KeyCredentialInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
163,337
public static Set<String> getSimpleNames(Set<Class<?>> checks) { return checks.stream().map(check -> { String name = check.getSimpleName(); if (name.endsWith("Check")) { name = name.substring(0, name.length() - 5); } return name; }).c...
static Set<String> function(Set<Class<?>> checks) { return checks.stream().map(check -> { String name = check.getSimpleName(); if (name.endsWith("Check")) { name = name.substring(0, name.length() - 5); } return name; }).collect(Collectors.toSet()); }
/** * Retrieves a list of class names, removing 'Check' from the end if the class is * a checkstyle check. * @param checks class instances. * @return a set of simple names. */
Retrieves a list of class names, removing 'Check' from the end if the class is a checkstyle check
getSimpleNames
{ "repo_name": "sharang108/checkstyle", "path": "src/test/java/com/puppycrawl/tools/checkstyle/internal/CheckUtil.java", "license": "lgpl-2.1", "size": 12598 }
[ "java.util.Set", "java.util.stream.Collectors" ]
import java.util.Set; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
1,606,605
public ReportIterator iterateOnTotalEnqueues() { try { return new ReportIterator(linesIndex.entities()); } catch (DatabaseException e) { throw new IOFailure( "Failed to read frontier BDB for job " + getJobName(), e); } }
ReportIterator function() { try { return new ReportIterator(linesIndex.entities()); } catch (DatabaseException e) { throw new IOFailure( STR + getJobName(), e); } }
/** * Returns an iterator where lines are ordered by primary key order: * first by decreasing totalEnqueues, then by domain name natural order. * @return an iterator on the report lines. */
Returns an iterator where lines are ordered by primary key order: first by decreasing totalEnqueues, then by domain name natural order
iterateOnTotalEnqueues
{ "repo_name": "netarchivesuite/netarchivesuite-svngit-migration", "path": "src/dk/netarkivet/harvester/harvesting/frontier/FullFrontierReport.java", "license": "lgpl-2.1", "size": 14516 }
[ "com.sleepycat.je.DatabaseException", "dk.netarkivet.common.exceptions.IOFailure" ]
import com.sleepycat.je.DatabaseException; import dk.netarkivet.common.exceptions.IOFailure;
import com.sleepycat.je.*; import dk.netarkivet.common.exceptions.*;
[ "com.sleepycat.je", "dk.netarkivet.common" ]
com.sleepycat.je; dk.netarkivet.common;
2,485,366
public static Rodrigues_F64 quaternionToRodrigues( Quaternion_F64 quat, @Nullable Rodrigues_F64 rodrigues ) { if( rodrigues == null ) rodrigues = new Rodrigues_F64(); rodrigues.unitAxisRotation.setTo( quat.x, quat.y, quat.z); rodrigues.unitAxisRotation.normalize(); rodrigues.theta = 2.0 ...
static Rodrigues_F64 function( Quaternion_F64 quat, @Nullable Rodrigues_F64 rodrigues ) { if( rodrigues == null ) rodrigues = new Rodrigues_F64(); rodrigues.unitAxisRotation.setTo( quat.x, quat.y, quat.z); rodrigues.unitAxisRotation.normalize(); rodrigues.theta = 2.0 * Math.acos( quat.w); return rodrigues; }
/** * Converts a unit {@link Quaternion_F64} into {@link Rodrigues_F64}. * @param quat (Input) Unit quaternion * @param rodrigues (Optional) Storage for rodrigues coodinate. If null a new instance is created. * @return rodrigues */
Converts a unit <code>Quaternion_F64</code> into <code>Rodrigues_F64</code>
quaternionToRodrigues
{ "repo_name": "lessthanoptimal/GeoRegression", "path": "main/src/georegression/geometry/ConvertRotation3D_F64.java", "license": "apache-2.0", "size": 22162 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,689,851
if (resizeOptions == null) { return getAcceptableSize(width) >= BitmapUtil.MAX_BITMAP_SIZE && getAcceptableSize(height) >= (int) BitmapUtil.MAX_BITMAP_SIZE; } else { return getAcceptableSize(width) >= resizeOptions.width && getAcceptableSize(height) >= resizeOptions.height; } }
if (resizeOptions == null) { return getAcceptableSize(width) >= BitmapUtil.MAX_BITMAP_SIZE && getAcceptableSize(height) >= (int) BitmapUtil.MAX_BITMAP_SIZE; } else { return getAcceptableSize(width) >= resizeOptions.width && getAcceptableSize(height) >= resizeOptions.height; } }
/** * Checks whether the producer may be able to produce images of the specified size. This makes no * promise about being able to produce images for a particular source, only generally being able * to produce output of the desired resolution. * * @param width the desired width * @param height the des...
Checks whether the producer may be able to produce images of the specified size. This makes no promise about being able to produce images for a particular source, only generally being able to produce output of the desired resolution
isImageBigEnough
{ "repo_name": "HKMOpen/fresco", "path": "imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ThumbnailSizeChecker.java", "license": "bsd-3-clause", "size": 2716 }
[ "com.facebook.imageutils.BitmapUtil" ]
import com.facebook.imageutils.BitmapUtil;
import com.facebook.imageutils.*;
[ "com.facebook.imageutils" ]
com.facebook.imageutils;
610,135
protected void restart() { currentLALR = LRState.INITIAL_STATE; sysPosition = new Position(1, 1); currentPosition = new Position(1, 1); lookaheadBuffer = new StringBuilder(); haveReduction = false; if (expectedSymbols == null) { ...
void function() { currentLALR = LRState.INITIAL_STATE; sysPosition = new Position(1, 1); currentPosition = new Position(1, 1); lookaheadBuffer = new StringBuilder(); haveReduction = false; if (expectedSymbols == null) { expectedSymbols = new SymbolList(); } expectedSymbols.clear(); if (groupStack == null) { groupStack ...
/** * Restarts the parser. The loaded tables are retained */
Restarts the parser. The loaded tables are retained
restart
{ "repo_name": "Epi-Info/Epi-Info-Android", "path": "src/main/java/com/creativewidgetworks/goldparser/engine/Parser.java", "license": "apache-2.0", "size": 41820 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
1,252,839
protected int getTabStackIndex(int tabId) { if (tabId == Tab.INVALID_TAB_ID) { boolean incognito = mTemporarySelectedStack != null ? mTemporarySelectedStack : mTabModelSelector.isIncognitoSelected(); return incognito ? 1 : 0; } else { ...
int function(int tabId) { if (tabId == Tab.INVALID_TAB_ID) { boolean incognito = mTemporarySelectedStack != null ? mTemporarySelectedStack : mTabModelSelector.isIncognitoSelected(); return incognito ? 1 : 0; } else { return TabModelUtils.getTabById(mTabModelSelector.getModel(true), tabId) != null ? 1 : 0; } }
/** * Get the tab stack state for the specified tab id. * * @param tabId The id of the tab to lookup. * @return The tab stack index for the given tab id. * @VisibleForTesting */
Get the tab stack state for the specified tab id
getTabStackIndex
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java", "license": "apache-2.0", "size": 51520 }
[ "org.chromium.chrome.browser.tab.Tab", "org.chromium.chrome.browser.tabmodel.TabModelUtils" ]
import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelUtils;
import org.chromium.chrome.browser.tab.*; import org.chromium.chrome.browser.tabmodel.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
641,395
public static Server lookupByCert(ClientCertificate cert) throws InvalidCertificateException { return ServerFactory.lookupByCert(cert); }
static Server function(ClientCertificate cert) throws InvalidCertificateException { return ServerFactory.lookupByCert(cert); }
/** * Looks up a Server by it's client certificate. * @param cert ClientCertificate of the server. * @return the Server which matches the client certificate. * @throws InvalidCertificateException thrown if certificate is invalid. */
Looks up a Server by it's client certificate
lookupByCert
{ "repo_name": "renner/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java", "license": "gpl-2.0", "size": 132498 }
[ "com.redhat.rhn.common.client.ClientCertificate", "com.redhat.rhn.common.client.InvalidCertificateException", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.server.ServerFactory" ]
import com.redhat.rhn.common.client.ClientCertificate; import com.redhat.rhn.common.client.InvalidCertificateException; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.server.ServerFactory;
import com.redhat.rhn.common.client.*; import com.redhat.rhn.domain.server.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,058,387
public IDataset getCount_time();
IDataset function();
/** * Elapsed actual counting time, can be an array of size ``np`` * when scanning. This is not the difference of the calendar time * but the time the instrument was really counting, without * pauses or times lost due beam unavailability * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_TIME * </p> * ...
Elapsed actual counting time, can be an array of size ``np`` when scanning. This is not the difference of the calendar time but the time the instrument was really counting, without pauses or times lost due beam unavailability Type: NX_FLOAT Units: NX_TIME
getCount_time
{ "repo_name": "willrogers/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXmonitor.java", "license": "epl-1.0", "size": 5332 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
969,383
protected TestResult validateResourceAll(String transactionName, String responseBody) { Document document = null; boolean valid=true; String status = "Failure"; notes=""; errorList=""; error=false; String jException=""; if ((responseBody != null) && ...
TestResult function(String transactionName, String responseBody) { Document document = null; boolean valid=true; String status = STR; notes=STRSTRSTR<METADATA-CLASSSTR<METADATA-OBJECTSTR<METADATA-SEARCH_HELPSTR<METADATA-EDITMASKSTR<METADATA-LOOKUPSTR<METADATA-UPDATE_HELPSTR<METADATA-VALIDATION_LOOKUPSTR<METADATA-VALIDA...
/** * This is the method that does the actual check of a transaction body for a valid * compact data response. * * @param transactionName Name of the Transaction checked (from the test script) * @param responseBody transaction body which should be valid compact * * @return results of the test. ...
This is the method that does the actual check of a transaction body for a valid compact data response
validateResourceAll
{ "repo_name": "RESO-RETS/RESO-Server-Compliance-Tester", "path": "src/com/realtor/rets/compliance/tests/MetadataResourceAll.java", "license": "apache-2.0", "size": 4207 }
[ "com.realtor.rets.compliance.TestResult", "org.w3c.dom.Document" ]
import com.realtor.rets.compliance.TestResult; import org.w3c.dom.Document;
import com.realtor.rets.compliance.*; import org.w3c.dom.*;
[ "com.realtor.rets", "org.w3c.dom" ]
com.realtor.rets; org.w3c.dom;
2,788,599
void shutDown() { if (State.RUNNING != state) { return; } sysLogger.log(Level.INFO, "Auto ingest shutting down"); state = State.SHUTTING_DOWN; try { eventPublisher.publishRemotely(lastPublishedStateEvent = new AutoIngestNodeStateEvent(Event.SHUTTING_DO...
void shutDown() { if (State.RUNNING != state) { return; } sysLogger.log(Level.INFO, STR); state = State.SHUTTING_DOWN; try { eventPublisher.publishRemotely(lastPublishedStateEvent = new AutoIngestNodeStateEvent(Event.SHUTTING_DOWN, AutoIngestManager.LOCAL_HOST_NAME)); eventPublisher.removeSubscriber(EVENT_LIST, instanc...
/** * Shuts down auto ingest. */
Shuts down auto ingest
shutDown
{ "repo_name": "millmanorama/autopsy", "path": "Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java", "license": "apache-2.0", "size": 165303 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,978,979
public void updateTimeAndWeatherForPlayer(PlayerMP playerIn, WorldServer worldIn) { WorldBorder worldborder = this.mcServer.worldServers[0].getWorldBorder(); playerIn.playerNetServerHandler.sendPacket(new S44PacketWorldBorder(worldborder, S44PacketWorldBorder.Action.INITIALIZE)); playerI...
void function(PlayerMP playerIn, WorldServer worldIn) { WorldBorder worldborder = this.mcServer.worldServers[0].getWorldBorder(); playerIn.playerNetServerHandler.sendPacket(new S44PacketWorldBorder(worldborder, S44PacketWorldBorder.Action.INITIALIZE)); playerIn.playerNetServerHandler.sendPacket(new S03PacketTimeUpdate(...
/** * Updates the time and weather for the given player to those of the given world */
Updates the time and weather for the given player to those of the given world
updateTimeAndWeatherForPlayer
{ "repo_name": "TorchPowered/Thallium", "path": "src/main/java/net/minecraft/server/management/ServerConfigurationManager.java", "license": "mit", "size": 40955 }
[ "net.minecraft.entity.player.PlayerMP", "net.minecraft.network.play.server.S03PacketTimeUpdate", "net.minecraft.network.play.server.S2BPacketChangeGameState", "net.minecraft.network.play.server.S44PacketWorldBorder", "net.minecraft.world.WorldServer", "net.minecraft.world.border.WorldBorder" ]
import net.minecraft.entity.player.PlayerMP; import net.minecraft.network.play.server.S03PacketTimeUpdate; import net.minecraft.network.play.server.S2BPacketChangeGameState; import net.minecraft.network.play.server.S44PacketWorldBorder; import net.minecraft.world.WorldServer; import net.minecraft.world.border.WorldBord...
import net.minecraft.entity.player.*; import net.minecraft.network.play.server.*; import net.minecraft.world.*; import net.minecraft.world.border.*;
[ "net.minecraft.entity", "net.minecraft.network", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.network; net.minecraft.world;
1,880,232
protected void storeInDbAndLog(ArrivalDeparture arrivalDeparture) { // If arrival/departure time too far from the AVL time then something // must be wrong. For this situation don't store the arrival/departure // into db. if (!timeReasonable(arrivalDeparture)) return; // Don't want to record arrival/d...
void function(ArrivalDeparture arrivalDeparture) { if (!timeReasonable(arrivalDeparture)) return; if (arrivalDeparture.getBlock().isNoSchedule()) { Trip trip = arrivalDeparture.getBlock().getTrip( arrivalDeparture.getTripIndex()); if (arrivalDeparture.getStopPathIndex() == trip.getNumberStopPaths() - 1) return; } Core....
/** * Stores the specified ArrivalDeparture object into the db * and log to the ArrivalsDeparatures log file that the * object was created. * <p> * Also generates corresponding prediction accuracy information * if a corresponding prediction was found in memory. * * @param arrivalDeparture */
Stores the specified ArrivalDeparture object into the db and log to the ArrivalsDeparatures log file that the object was created. Also generates corresponding prediction accuracy information if a corresponding prediction was found in memory
storeInDbAndLog
{ "repo_name": "TheTransitClock/transitime", "path": "transitclock/src/main/java/org/transitclock/core/ArrivalDepartureGeneratorDefaultImpl.java", "license": "gpl-3.0", "size": 55310 }
[ "org.transitclock.applications.Core", "org.transitclock.core.dataCache.VehicleStateManager", "org.transitclock.core.predAccuracy.PredictionAccuracyModule", "org.transitclock.db.structs.ArrivalDeparture", "org.transitclock.db.structs.Trip" ]
import org.transitclock.applications.Core; import org.transitclock.core.dataCache.VehicleStateManager; import org.transitclock.core.predAccuracy.PredictionAccuracyModule; import org.transitclock.db.structs.ArrivalDeparture; import org.transitclock.db.structs.Trip;
import org.transitclock.applications.*; import org.transitclock.core.*; import org.transitclock.db.structs.*;
[ "org.transitclock.applications", "org.transitclock.core", "org.transitclock.db" ]
org.transitclock.applications; org.transitclock.core; org.transitclock.db;
1,213,876
public void testSearchManagerInvocations() throws Exception { SearchManager searchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE); assertNotNull(searchManager); // These tests should simply run to completion w/o exceptions searchManager.st...
void function() throws Exception { SearchManager searchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE); assertNotNull(searchManager); searchManager.startSearch(null, false, SEARCHABLE_ACTIVITY, null, false); searchManager.stopSearch(); searchManager.startSearch(STRtest search stringSTRtest s...
/** * The goal of this test is to confirm that we can start and then * stop a simple search. */
The goal of this test is to confirm that we can start and then stop a simple search
testSearchManagerInvocations
{ "repo_name": "JuudeDemos/android-sdk-20", "path": "src/android/app/SearchManagerTest.java", "license": "apache-2.0", "size": 6030 }
[ "android.app.SearchManager", "android.content.Context" ]
import android.app.SearchManager; import android.content.Context;
import android.app.*; import android.content.*;
[ "android.app", "android.content" ]
android.app; android.content;
1,489,704
public List<ForumBoard> getSubBoards(int boardid, int limit) throws ScriptException { throw new ScriptException(); }
List<ForumBoard> function(int boardid, int limit) throws ScriptException { throw new ScriptException(); }
/** * Returns a List with ForumBoard objects that are sub boards of the given board/category ID. * <p> * Parameter {@code limit} can be used as a limit of how many objects should be returned. * <p> * Set {@code limit} to 0 to return all the objects. * <p> * If none are found, the List...
Returns a List with ForumBoard objects that are sub boards of the given board/category ID. Parameter limit can be used as a limit of how many objects should be returned. Set limit to 0 to return all the objects. If none are found, the List will be empty
getSubBoards
{ "repo_name": "craftfire/Bifrost", "path": "src/main/java/com/craftfire/bifrost/classes/forum/ForumScript.java", "license": "lgpl-3.0", "size": 18872 }
[ "com.craftfire.bifrost.exceptions.ScriptException", "java.util.List" ]
import com.craftfire.bifrost.exceptions.ScriptException; import java.util.List;
import com.craftfire.bifrost.exceptions.*; import java.util.*;
[ "com.craftfire.bifrost", "java.util" ]
com.craftfire.bifrost; java.util;
1,395,282
@Loggable(Loggable.INFO) private static final class Foo { @NotNull public int foo( @NotNull @Pattern(regexp = "\\d+") @JSR303Test.NoMeaning final String text) { return -1; }
@Loggable(Loggable.INFO) static final class Foo { public int function( @NotNull @Pattern(regexp = "\\d+") @JSR303Test.NoMeaning final String text) { return -1; }
/** * Do nothing. * @param text Some text * @return Some data */
Do nothing
foo
{ "repo_name": "54uso/jcabi-aspects", "path": "src/test/java/com/jcabi/aspects/JSR303Test.java", "license": "bsd-3-clause", "size": 7035 }
[ "javax.validation.constraints.NotNull", "javax.validation.constraints.Pattern" ]
import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern;
import javax.validation.constraints.*;
[ "javax.validation" ]
javax.validation;
1,258,036
private void generateHTMLReport(BufferedWriter writer, BufferedReader templateReader, String jsonReport) throws IOException { logger.entering(new Object[] { writer, templateReader, jsonReport }); String readLine = null; while ((readLine = templateReader.readLine()) != null) { ...
void function(BufferedWriter writer, BufferedReader templateReader, String jsonReport) throws IOException { logger.entering(new Object[] { writer, templateReader, jsonReport }); String readLine = null; while ((readLine = templateReader.readLine()) != null) { if (readLine.trim().equals(STR)) { writer.write(jsonReport); ...
/** * Writing JSON content to HTML file * * @param writer * @param templateReader * @param jsonReport * @throws IOException */
Writing JSON content to HTML file
generateHTMLReport
{ "repo_name": "paypal/SeLion", "path": "client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java", "license": "apache-2.0", "size": 19504 }
[ "java.io.BufferedReader", "java.io.BufferedWriter", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,823,630
public void ping() { if (mFeedbackCount > 0) { boolean doWaveAnimation = true; final AnimationBundle waveAnimations = mWaveAnimations; // Don't do a wave if there's already one in progress if (waveAnimations.size() > 0 && waveAnimations.get(0).getAnimator().i...
void function() { if (mFeedbackCount > 0) { boolean doWaveAnimation = true; final AnimationBundle waveAnimations = mWaveAnimations; if (waveAnimations.size() > 0 && waveAnimations.get(0).getAnimator().isRunning()) { long t = waveAnimations.get(0).getAnimator().getCurrentPlayTime(); if (t < WAVE_ANIMATION_DURATION / 2) ...
/** * Starts wave animation. * */
Starts wave animation
ping
{ "repo_name": "Archinamon/persefone", "path": "src/main/java/mobi/anoda/archinamon/kernel/persefone/ui/widget/wavering/WaveRingView.java", "license": "apache-2.0", "size": 49557 }
[ "mobi.anoda.archinamon.kernel.persefone.ui.utils.AnimationBundle" ]
import mobi.anoda.archinamon.kernel.persefone.ui.utils.AnimationBundle;
import mobi.anoda.archinamon.kernel.persefone.ui.utils.*;
[ "mobi.anoda.archinamon" ]
mobi.anoda.archinamon;
1,335,311
TenantSettingsContractInner innerModel();
TenantSettingsContractInner innerModel();
/** * Gets the inner com.azure.resourcemanager.apimanagement.fluent.models.TenantSettingsContractInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.apimanagement.fluent.models.TenantSettingsContractInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/models/TenantSettingsContract.java", "license": "mit", "size": 1213 }
[ "com.azure.resourcemanager.apimanagement.fluent.models.TenantSettingsContractInner" ]
import com.azure.resourcemanager.apimanagement.fluent.models.TenantSettingsContractInner;
import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
285,654
public Iterator getDeployedServices() throws ConfigurationException { ArrayList serviceDescs = new ArrayList(); Iterator i = services.values().iterator(); while (i.hasNext()) { SOAPService service = (SOAPService)i.next(); serviceDescs.add(service.getServiceDescription...
Iterator function() throws ConfigurationException { ArrayList serviceDescs = new ArrayList(); Iterator i = services.values().iterator(); while (i.hasNext()) { SOAPService service = (SOAPService)i.next(); serviceDescs.add(service.getServiceDescription()); } return serviceDescs.iterator(); }
/** * Get an enumeration of the services deployed to this engine */
Get an enumeration of the services deployed to this engine
getDeployedServices
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/configuration/SimpleProvider.java", "license": "apache-2.0", "size": 9701 }
[ "java.util.ArrayList", "java.util.Iterator", "org.apache.axis.ConfigurationException", "org.apache.axis.handlers.soap.SOAPService" ]
import java.util.ArrayList; import java.util.Iterator; import org.apache.axis.ConfigurationException; import org.apache.axis.handlers.soap.SOAPService;
import java.util.*; import org.apache.axis.*; import org.apache.axis.handlers.soap.*;
[ "java.util", "org.apache.axis" ]
java.util; org.apache.axis;
662,713
Offset position();
Offset position();
/** * Gets the top and left position of an element relative to its offset parent. The returned object * contains two Integer properties, top and left. For accurate calculations make sure to use pixel * values for margins, borders and padding. This method only works with visible elements. */
Gets the top and left position of an element relative to its offset parent. The returned object contains two Integer properties, top and left. For accurate calculations make sure to use pixel values for margins, borders and padding. This method only works with visible elements
position
{ "repo_name": "lucasam/gwtquery", "path": "gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java", "license": "mit", "size": 90576 }
[ "com.google.gwt.query.client.GQuery" ]
import com.google.gwt.query.client.GQuery;
import com.google.gwt.query.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,459,760
private int readOptionalInt(JSONValue val) { JSONString str = null == val ? null : val.isString(); if (str != null) { try { return Integer.valueOf(str.stringValue()).intValue(); } catch (@SuppressWarnings("unused") NumberFormatException e) { /...
int function(JSONValue val) { JSONString str = null == val ? null : val.isString(); if (str != null) { try { return Integer.valueOf(str.stringValue()).intValue(); } catch (@SuppressWarnings(STR) NumberFormatException e) { } } return 0; }
/** * Read an optional int value form a JSON value. * @param val the JSON value that should represent the int. * @return the int from the JSON or 0 reading the int fails. */
Read an optional int value form a JSON value
readOptionalInt
{ "repo_name": "alkacon/opencms-core", "path": "src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateValue.java", "license": "lgpl-2.1", "size": 18205 }
[ "com.google.gwt.json.client.JSONString", "com.google.gwt.json.client.JSONValue" ]
import com.google.gwt.json.client.JSONString; import com.google.gwt.json.client.JSONValue;
import com.google.gwt.json.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,550,467
private List<Object> buildPathFromEroObj(PcepEroObject eroObj, ProviderId providerId) { checkNotNull(eroObj); List<Object> subObjList = new ArrayList<>(); LinkedList<PcepValueType> llSubObj = eroObj.getSubObjects(); if (llSubObj.isEmpty()) { log.er...
List<Object> function(PcepEroObject eroObj, ProviderId providerId) { checkNotNull(eroObj); List<Object> subObjList = new ArrayList<>(); LinkedList<PcepValueType> llSubObj = eroObj.getSubObjects(); if (llSubObj.isEmpty()) { log.error(STR); return new ArrayList<>(); } ListIterator<PcepValueType> tlvIterator = llSubObj.li...
/** * To build Path in network from ERO object. * * @param eroObj ERO object * @param providerId provider id * @return list of links and labels */
To build Path in network from ERO object
buildPathFromEroObj
{ "repo_name": "sdnwiselab/onos", "path": "providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java", "license": "apache-2.0", "size": 90295 }
[ "com.google.common.base.Preconditions", "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "java.util.ListIterator", "org.onosproject.net.ConnectPoint", "org.onosproject.net.DefaultLink", "org.onosproject.net.Link", "org.onosproject.net.PortNumber", "org.onosproject.net.provider.Prov...
import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DefaultLink; import org.onosproject.net.Link; import org.onosproject.net.PortNumber; import org....
import com.google.common.base.*; import java.util.*; import org.onosproject.net.*; import org.onosproject.net.provider.*; import org.onosproject.pcepio.protocol.*; import org.onosproject.pcepio.types.*;
[ "com.google.common", "java.util", "org.onosproject.net", "org.onosproject.pcepio" ]
com.google.common; java.util; org.onosproject.net; org.onosproject.pcepio;
1,248,226
public ListenableFuture<?> index(Change change);
ListenableFuture<?> function(Change change);
/** * Start indexing a change. * * @param change change to index. * @return future for the indexing task. */
Start indexing a change
index
{ "repo_name": "zommarin/gerrit", "path": "gerrit-server/src/main/java/com/google/gerrit/server/index/ChangeIndexer.java", "license": "apache-2.0", "size": 1987 }
[ "com.google.common.util.concurrent.ListenableFuture", "com.google.gerrit.reviewdb.client.Change" ]
import com.google.common.util.concurrent.ListenableFuture; import com.google.gerrit.reviewdb.client.Change;
import com.google.common.util.concurrent.*; import com.google.gerrit.reviewdb.client.*;
[ "com.google.common", "com.google.gerrit" ]
com.google.common; com.google.gerrit;
2,867,818
private void populateViews() { populateHashMaps(); setEditTextValue(R.id.expenseItemNameEditText, item.getName().toString()); setEditTextValue(R.id.expenseItemDateEditText, GlobalDateFormat.format(item.getDate())); setEditTextValue(R.id.expenseItemDescriptionEditText, item.getDescription().toString()); se...
void function() { populateHashMaps(); setEditTextValue(R.id.expenseItemNameEditText, item.getName().toString()); setEditTextValue(R.id.expenseItemDateEditText, GlobalDateFormat.format(item.getDate())); setEditTextValue(R.id.expenseItemDescriptionEditText, item.getDescription().toString()); setEditTextValue(R.id.expense...
/** * Pre-set fields with a loaded ExpenseItem info */
Pre-set fields with a loaded ExpenseItem info
populateViews
{ "repo_name": "RostarSynergistics/ShinyExpenseTracker", "path": "ShinyExpenseTracker/src/ca/ualberta/cs/shinyexpensetracker/activities/ExpenseItemActivity.java", "license": "gpl-3.0", "size": 14979 }
[ "android.widget.Spinner", "android.widget.TextView", "ca.ualberta.cs.shinyexpensetracker.utilities.GlobalDateFormat" ]
import android.widget.Spinner; import android.widget.TextView; import ca.ualberta.cs.shinyexpensetracker.utilities.GlobalDateFormat;
import android.widget.*; import ca.ualberta.cs.shinyexpensetracker.utilities.*;
[ "android.widget", "ca.ualberta.cs" ]
android.widget; ca.ualberta.cs;
786,266
private JLabel getTargetRoleNameLabel() { if (targetRoleNameLabel == null) { targetRoleNameLabel = new JLabel(); targetRoleNameLabel.setText("Target Role Name:"); } return targetRoleNameLabel; }
JLabel function() { if (targetRoleNameLabel == null) { targetRoleNameLabel = new JLabel(); targetRoleNameLabel.setText(STR); } return targetRoleNameLabel; }
/** * This method initializes targetRoleNameLabel * * @return javax.swing.JLabel */
This method initializes targetRoleNameLabel
getTargetRoleNameLabel
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/data/src/java/tools/gov/nih/nci/cagrid/data/utilities/vizquery/AssociationInformationPanel.java", "license": "bsd-3-clause", "size": 9709 }
[ "javax.swing.JLabel" ]
import javax.swing.JLabel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,986,233
try { final String logFile = environment.getProperty("logging.config"); this.logConfigurationFile = this.resourceLoader.getResource(logFile); this.loggerContext = Configurator.initialize("CAS", null, this.logConfigurationFile.getURI()); this.loggerContext.getConfiguratio...
try { final String logFile = environment.getProperty(STR); this.logConfigurationFile = this.resourceLoader.getResource(logFile); this.loggerContext = Configurator.initialize("CAS", null, this.logConfigurationFile.getURI()); this.loggerContext.getConfiguration().addListener(reconfigurable -> loggerContext.updateLoggers(...
/** * Init. Attempts to locate the logging configuration to insert listeners. * The log configuration location is pulled directly from the environment * given there is not an explicit property mapping for it provided by Boot, etc. */
Init. Attempts to locate the logging configuration to insert listeners. The log configuration location is pulled directly from the environment given there is not an explicit property mapping for it provided by Boot, etc
initialize
{ "repo_name": "gabedwrds/cas", "path": "support/cas-server-support-reports/src/main/java/org/apereo/cas/web/report/LoggingConfigController.java", "license": "apache-2.0", "size": 13357 }
[ "com.google.common.base.Throwables", "org.apache.logging.log4j.core.config.Configurator" ]
import com.google.common.base.Throwables; import org.apache.logging.log4j.core.config.Configurator;
import com.google.common.base.*; import org.apache.logging.log4j.core.config.*;
[ "com.google.common", "org.apache.logging" ]
com.google.common; org.apache.logging;
803,349
@Override public void actionCommit() { if (!hasCommitErrors()) { //check if we have to update an existing module or to create a new one Set<String> moduleNames = OpenCms.getModuleManager().getModuleNames(); if (moduleNames.contains(m_module.getName())) { ...
void function() { if (!hasCommitErrors()) { Set<String> moduleNames = OpenCms.getModuleManager().getModuleNames(); if (moduleNames.contains(m_module.getName())) { try { OpenCms.getModuleManager().updateModule(getCms(), m_module); } catch (CmsException e) { addCommitError(e); } } else { try { m_module = createModuleFold...
/** * Commits the edited module.<p> */
Commits the edited module
actionCommit
{ "repo_name": "mediaworx/opencms-core", "path": "src-modules/org/opencms/workplace/tools/modules/CmsModulesEditBase.java", "license": "lgpl-2.1", "size": 12068 }
[ "java.util.Map", "java.util.Set", "org.opencms.main.CmsException", "org.opencms.main.OpenCms", "org.opencms.module.CmsModule" ]
import java.util.Map; import java.util.Set; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.module.CmsModule;
import java.util.*; import org.opencms.main.*; import org.opencms.module.*;
[ "java.util", "org.opencms.main", "org.opencms.module" ]
java.util; org.opencms.main; org.opencms.module;
1,486,873
@SuppressWarnings("rawtypes") private void initRegisterArea() { // Create SpringLayout SpringLayout sl_panel = new SpringLayout(); registerPanel.setLayout(sl_panel); // Line separator JSeparator separator = new JSeparator(); separator.setForeground(Color.BLACK); sl_panel.putConstraint(SpringLayout.N...
@SuppressWarnings(STR) void function() { SpringLayout sl_panel = new SpringLayout(); registerPanel.setLayout(sl_panel); JSeparator separator = new JSeparator(); separator.setForeground(Color.BLACK); sl_panel.putConstraint(SpringLayout.NORTH, separator, 0, SpringLayout.NORTH, registerPanel); sl_panel.putConstraint(Sprin...
/** * Initialize RegisterArea. */
Initialize RegisterArea
initRegisterArea
{ "repo_name": "ttlpolo2008/JapStu", "path": "SRC/LearnLanguage_Master/src/screen/S_ExerciseMaster.java", "license": "mit", "size": 32203 }
[ "java.awt.Color", "javax.swing.JCheckBox", "javax.swing.JComboBox", "javax.swing.JLabel", "javax.swing.JSeparator", "javax.swing.JTextField", "javax.swing.SpringLayout" ]
import java.awt.Color; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JSeparator; import javax.swing.JTextField; import javax.swing.SpringLayout;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,058,920
public synchronized Lease record(@Nonnull FilePath p) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "recorded " + p, new Throwable("from " + this)); } Entry old = inUse.put(p.getRemote(), new Entry(p, false)); if (old!=null) throw new Assertion...
synchronized Lease function(@Nonnull FilePath p) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, STR + p, new Throwable(STR + this)); } Entry old = inUse.put(p.getRemote(), new Entry(p, false)); if (old!=null) throw new AssertionError(STR+old); return lease(p); }
/** * Just record that this workspace is being used, without paying any attention to the synchronization support. */
Just record that this workspace is being used, without paying any attention to the synchronization support
record
{ "repo_name": "stephenc/jenkins", "path": "core/src/main/java/hudson/slaves/WorkspaceList.java", "license": "mit", "size": 11320 }
[ "java.util.logging.Level", "javax.annotation.Nonnull" ]
import java.util.logging.Level; import javax.annotation.Nonnull;
import java.util.logging.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
2,168,944
public void setPositionedStorageFilter(PartPos pos, @Nullable PositionedAddonsNetworkIngredientsFilter<T> filter);
void function(PartPos pos, @Nullable PositionedAddonsNetworkIngredientsFilter<T> filter);
/** * Set an ingredient filter for the given storage position. * Unsets the filter if null is provided. * @param pos A position. * @param filter An ingredient filter. */
Set an ingredient filter for the given storage position. Unsets the filter if null is provided
setPositionedStorageFilter
{ "repo_name": "CyclopsMC/IntegratedDynamics", "path": "src/main/java/org/cyclops/integrateddynamics/api/network/IPositionedAddonsNetworkIngredients.java", "license": "mit", "size": 4556 }
[ "javax.annotation.Nullable", "org.cyclops.integrateddynamics.api.part.PartPos" ]
import javax.annotation.Nullable; import org.cyclops.integrateddynamics.api.part.PartPos;
import javax.annotation.*; import org.cyclops.integrateddynamics.api.part.*;
[ "javax.annotation", "org.cyclops.integrateddynamics" ]
javax.annotation; org.cyclops.integrateddynamics;
1,355,166
String cmd = "start"; if (args.length > 0) { cmd = args[0]; } if ("start".equals(cmd)) { serviceInstance.start(); } else { serviceInstance.stop(); } } private CountDownLatch done;
String cmd = "start"; if (args.length > 0) { cmd = args[0]; } if ("start".equals(cmd)) { serviceInstance.start(); } else { serviceInstance.stop(); } } private CountDownLatch done;
/** * Static method called by prunsrv to start/stop the service. Pass the * argument "start" to start the service, and pass "stop" to stop the service. */
Static method called by prunsrv to start/stop the service. Pass the argument "start" to start the service, and pass "stop" to stop the service
windowsService
{ "repo_name": "anuragphadke/Flume-Hive", "path": "src/java/com/cloudera/flume/agent/FlumeNodeDaemon.java", "license": "apache-2.0", "size": 3065 }
[ "java.util.concurrent.CountDownLatch" ]
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
113,738
private void setTypedValue(int v, int type) { v = Math.max(v, minimum); v = Math.min(v, maximum - visibleAmount); if (v != value) { value = v; // Synchronously notify the listeners so that they are // guaranteed to be up-to-date with the Adjustable before...
void function(int v, int type) { v = Math.max(v, minimum); v = Math.min(v, maximum - visibleAmount); if (v != value) { value = v; AdjustmentEvent e = new AdjustmentEvent(this, AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED, type, value, isAdjusting); adjustmentListener.adjustmentValueChanged(e); } }
/** * Sets the value of this scrollbar to the specified value. * <p> * If the value supplied is less than the current minimum or * greater than the current maximum, then one of those values is * substituted, as appropriate. Also, creates and dispatches * the AdjustementEvent with specified...
Sets the value of this scrollbar to the specified value. If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate. Also, creates and dispatches the AdjustementEvent with specified type and value
setTypedValue
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/awt/ScrollPaneAdjustable.java", "license": "gpl-2.0", "size": 14924 }
[ "java.awt.event.AdjustmentEvent" ]
import java.awt.event.AdjustmentEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
546,954
manager .operationStatus() .getWithResponse( "WestUS", "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", Context.NONE); }
manager .operationStatus() .getWithResponse( STR, STR, Context.NONE); }
/** * Sample code: Get OperationStatus. * * @param manager Entry point to DataProtectionManager. */
Sample code: Get OperationStatus
getOperationStatus
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java", "license": "mit", "size": 1008 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
224,965
public long getMiningInitial() { final Session session = this.dbHandler.getMiningSession(); List<?> t; Long readingtimestamp; readingtimestamp = (Long) session.createQuery("Select max(latestTimestamp) from Config where platform=" + this.connector.getPlatformId()).uniqueResult(); if(readingti...
long function() { final Session session = this.dbHandler.getMiningSession(); List<?> t; Long readingtimestamp; readingtimestamp = (Long) session.createQuery(STR + this.connector.getPlatformId()).uniqueResult(); if(readingtimestamp == null) { readingtimestamp = -1L; } Criteria criteria = session.createCriteria(Course.cl...
/** * Reads the Mining Database. * Initial informations needed to start the process of updating are collected here. * The Timestamp of the last run of the extractor is read from the config table * and the objects which might been needed to associate are read and saved here. * * @return The timestamp ...
Reads the Mining Database. Initial informations needed to start the process of updating are collected here. The Timestamp of the last run of the extractor is read from the config table and the objects which might been needed to associate are read and saved here
getMiningInitial
{ "repo_name": "LemoProject/Lemo-Data-Management-Server", "path": "src/main/java/de/lemo/dms/connectors/moodle_2_3/ExtractAndMap.java", "license": "gpl-3.0", "size": 26325 }
[ "de.lemo.dms.db.mapping.AccessLog", "de.lemo.dms.db.mapping.AssessmentLog", "de.lemo.dms.db.mapping.Attribute", "de.lemo.dms.db.mapping.CollaborationLog", "de.lemo.dms.db.mapping.Course", "de.lemo.dms.db.mapping.CourseAttribute", "de.lemo.dms.db.mapping.CourseLearning", "de.lemo.dms.db.mapping.CourseU...
import de.lemo.dms.db.mapping.AccessLog; import de.lemo.dms.db.mapping.AssessmentLog; import de.lemo.dms.db.mapping.Attribute; import de.lemo.dms.db.mapping.CollaborationLog; import de.lemo.dms.db.mapping.Course; import de.lemo.dms.db.mapping.CourseAttribute; import de.lemo.dms.db.mapping.CourseLearning; import de.lemo...
import de.lemo.dms.db.mapping.*; import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*;
[ "de.lemo.dms", "java.util", "org.hibernate", "org.hibernate.criterion" ]
de.lemo.dms; java.util; org.hibernate; org.hibernate.criterion;
2,054,772
public Set<String> getGenesInThreshold(double lowerThreshold, double upperThreshold, boolean usedManual) throws SQLException { Set<String> genes = new HashSet<>(); Map<Integer, String> mappedEcItem = this.getInitialEcItem(); if(this.getCommittedEcItem()!= null) for(int row : this.getCommittedEcItem().key...
Set<String> function(double lowerThreshold, double upperThreshold, boolean usedManual) throws SQLException { Set<String> genes = new HashSet<>(); Map<Integer, String> mappedEcItem = this.getInitialEcItem(); if(this.getCommittedEcItem()!= null) for(int row : this.getCommittedEcItem().keySet()) if(this.getCommittedEcItem...
/** * Retrieve all genes between lower and upper threshold. * * @param lowerThreshold * @param upperThreshold * @param usedManual * @return * @throws SQLException */
Retrieve all genes between lower and upper threshold
getGenesInThreshold
{ "repo_name": "merlin-sysbio/merlin-core", "path": "plugins_src/pt/uminho/ceb/biosystems/merlin/core/datatypes/annotation/EnzymesAnnotationDataInterface.java", "license": "gpl-2.0", "size": 104395 }
[ "java.sql.SQLException", "java.sql.Statement", "java.util.HashSet", "java.util.Map", "java.util.Set", "pt.uminho.ceb.biosystems.merlin.database.connector.databaseAPI.HomologyAPI" ]
import java.sql.SQLException; import java.sql.Statement; import java.util.HashSet; import java.util.Map; import java.util.Set; import pt.uminho.ceb.biosystems.merlin.database.connector.databaseAPI.HomologyAPI;
import java.sql.*; import java.util.*; import pt.uminho.ceb.biosystems.merlin.database.connector.*;
[ "java.sql", "java.util", "pt.uminho.ceb" ]
java.sql; java.util; pt.uminho.ceb;
340,589
public void excluir() { if (this.campus.getIdCampus() == null) { addInfoMessage("Excluir", "Campus ainda não foi incluído no banco de dados."); } else { try { String old = this.campus.getSigla(); CampusService.remover(campus); this.campus = new Campus(); this.addInfoMessage("Excluir", ...
void function() { if (this.campus.getIdCampus() == null) { addInfoMessage(STR, STR); } else { try { String old = this.campus.getSigla(); CampusService.remover(campus); this.campus = new Campus(); this.addInfoMessage(STR, STR + old + STR); } catch (EntidadePossuiRelacionamentoException e) { this.addWarnMessage(STR, STR)...
/** * Exclui uma campus do banco de dados * * @param ent */
Exclui uma campus do banco de dados
excluir
{ "repo_name": "sigeu-deseg/sigeu-deseg", "path": "sigeu/src/br/edu/utfpr/dv/sigeu/jsfbeans/CampusBean.java", "license": "gpl-2.0", "size": 5059 }
[ "br.edu.utfpr.dv.sigeu.entities.Campus", "br.edu.utfpr.dv.sigeu.exception.EntidadePossuiRelacionamentoException", "br.edu.utfpr.dv.sigeu.service.CampusService" ]
import br.edu.utfpr.dv.sigeu.entities.Campus; import br.edu.utfpr.dv.sigeu.exception.EntidadePossuiRelacionamentoException; import br.edu.utfpr.dv.sigeu.service.CampusService;
import br.edu.utfpr.dv.sigeu.entities.*; import br.edu.utfpr.dv.sigeu.exception.*; import br.edu.utfpr.dv.sigeu.service.*;
[ "br.edu.utfpr" ]
br.edu.utfpr;
219,314
public void setPodcastService(PodcastService podcastService) { this.podcastService = podcastService; }
void function(PodcastService podcastService) { this.podcastService = podcastService; }
/** * Used to inject the podcast service into this bean. * * @param podcastService * The podcast service this bean needs */
Used to inject the podcast service into this bean
setPodcastService
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podHomeBean.java", "license": "apache-2.0", "size": 60234 }
[ "org.sakaiproject.api.app.podcasts.PodcastService" ]
import org.sakaiproject.api.app.podcasts.PodcastService;
import org.sakaiproject.api.app.podcasts.*;
[ "org.sakaiproject.api" ]
org.sakaiproject.api;
51,839
@SuppressWarnings("rawtypes") final private void handleSid(final SidIV sid, final Collection<IV<?, ?>> ivs, final Set<IV<?, ?>> unrequested) { final ISPO spo = sid.getInlineValue(); handleTerm(spo.s(), ivs, unrequested); handleTerm(spo.p(), ivs, unrequested); handleTerm(spo.o(...
@SuppressWarnings(STR) final void function(final SidIV sid, final Collection<IV<?, ?>> ivs, final Set<IV<?, ?>> unrequested) { final ISPO spo = sid.getInlineValue(); handleTerm(spo.s(), ivs, unrequested); handleTerm(spo.p(), ivs, unrequested); handleTerm(spo.o(), ivs, unrequested); if (spo.c() != null) { handleTerm(spo...
/** * Add the terms inside a SID to the collection of IVs to materialize if * they are not already there. */
Add the terms inside a SID to the collection of IVs to materialize if they are not already there
handleSid
{ "repo_name": "wikimedia/wikidata-query-blazegraph", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java", "license": "gpl-2.0", "size": 129126 }
[ "com.bigdata.rdf.internal.impl.bnode.SidIV", "java.util.Collection", "java.util.Set" ]
import com.bigdata.rdf.internal.impl.bnode.SidIV; import java.util.Collection; import java.util.Set;
import com.bigdata.rdf.internal.impl.bnode.*; import java.util.*;
[ "com.bigdata.rdf", "java.util" ]
com.bigdata.rdf; java.util;
152,467
protected void setSvr2() { try { svr2 = (Inet4Address) Inet4Address.getByAddress(reader.readIP(SVR2_POS + position)); } catch (UnknownHostException ex) { Logger.getLogger(QueueIndexImpl.class.getName()).log(Level.SEVERE, null, ex); } }
void function() { try { svr2 = (Inet4Address) Inet4Address.getByAddress(reader.readIP(SVR2_POS + position)); } catch (UnknownHostException ex) { Logger.getLogger(QueueIndexImpl.class.getName()).log(Level.SEVERE, null, ex); } }
/** * <p>Setter for the field <code>svr2</code>.</p> */
Setter for the field <code>svr2</code>
setSvr2
{ "repo_name": "mikepthomas/fahview", "path": "FAHView-v6project/src/main/java/info/mikethomas/fahview/v6project/model/QueueIndexImpl.java", "license": "gpl-3.0", "size": 21521 }
[ "java.net.Inet4Address", "java.net.UnknownHostException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.net.Inet4Address; import java.net.UnknownHostException; import java.util.logging.Level; import java.util.logging.Logger;
import java.net.*; import java.util.logging.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,622,894
protected Response newResponse() { return new StringResponse(); }
Response function() { return new StringResponse(); }
/** * Create a new response object which is used to store the markup generated by the child * objects. * * @return Response object. Must not be null */
Create a new response object which is used to store the markup generated by the child objects
newResponse
{ "repo_name": "afiantara/apache-wicket-1.5.7", "path": "src/wicket-core/src/main/java/org/apache/wicket/markup/transformer/AbstractOutputTransformerContainer.java", "license": "apache-2.0", "size": 4545 }
[ "org.apache.wicket.request.Response", "org.apache.wicket.response.StringResponse" ]
import org.apache.wicket.request.Response; import org.apache.wicket.response.StringResponse;
import org.apache.wicket.request.*; import org.apache.wicket.response.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,154,043
public static Intent buildEditorIntent(@NonNull Context context, @NonNull List<Media> media, @NonNull Recipient recipient, @NonNull String body, @NonNull ...
static Intent function(@NonNull Context context, @NonNull List<Media> media, @NonNull Recipient recipient, @NonNull String body, @NonNull TransportOption transport) { Intent intent = buildGalleryIntent(context, recipient, body, transport); intent.putParcelableArrayListExtra(KEY_MEDIA, new ArrayList<>(media)); return in...
/** * Get an intent to launch the media send flow with a specific list of media. Will jump right to * the editor screen. */
Get an intent to launch the media send flow with a specific list of media. Will jump right to the editor screen
buildEditorIntent
{ "repo_name": "jtracey/Signal-Android", "path": "src/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java", "license": "gpl-3.0", "size": 40108 }
[ "android.content.Context", "android.content.Intent", "androidx.annotation.NonNull", "java.util.ArrayList", "java.util.List", "org.thoughtcrime.securesms.TransportOption", "org.thoughtcrime.securesms.recipients.Recipient" ]
import android.content.Context; import android.content.Intent; import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; import org.thoughtcrime.securesms.TransportOption; import org.thoughtcrime.securesms.recipients.Recipient;
import android.content.*; import androidx.annotation.*; import java.util.*; import org.thoughtcrime.securesms.*; import org.thoughtcrime.securesms.recipients.*;
[ "android.content", "androidx.annotation", "java.util", "org.thoughtcrime.securesms" ]
android.content; androidx.annotation; java.util; org.thoughtcrime.securesms;
733,396
public String diffInsertHtml(LinkedList<Diff> diffs) { StringBuffer insertList = new StringBuffer(); for (Diff aDiff : diffs) { String text = aDiff.text.replace("&", "&amp;") .replace("<", "&lt;") .replace(">", "&gt;") .replace("\r\n", "<br />") .replace("\r", "<br />") ...
String function(LinkedList<Diff> diffs) { StringBuffer insertList = new StringBuffer(); for (Diff aDiff : diffs) { String text = aDiff.text.replace("&", "&amp;") .replace("<", "&lt;") .replace(">", "&gt;") .replace("\r\n", STR) .replace("\r", STR) .replace("\n", STR); switch (aDiff.operation) { case INSERT: insertList....
/** * Convert a Diff list into a Insert HTML report. * * @param diffs : LinkedList of Diff objects. * @return String : representation. */
Convert a Diff list into a Insert HTML report
diffInsertHtml
{ "repo_name": "cafeciel/gliderwiki", "path": "src/org/gliderwiki/util/DiffEngine.java", "license": "gpl-3.0", "size": 2405 }
[ "java.util.LinkedList", "org.gliderwiki.util.DiffMatchPatch" ]
import java.util.LinkedList; import org.gliderwiki.util.DiffMatchPatch;
import java.util.*; import org.gliderwiki.util.*;
[ "java.util", "org.gliderwiki.util" ]
java.util; org.gliderwiki.util;
2,597,101
public long[] MFLong(String[] value) throws InvalidFieldFormatException { throw new InvalidFieldFormatException(LONG_SPT_MSG); }
long[] function(String[] value) throws InvalidFieldFormatException { throw new InvalidFieldFormatException(LONG_SPT_MSG); }
/** * Parse an MFLong value. * <pre> * MFLong ::= * "[" NUMBER_LITERAL* "]" | * NUMBER_LITERAL* * </pre> * * @param value The raw value as a string to be parsed * @return The array of long values as primitives * @throws InvalidFieldFormatException The field does not...
Parse an MFLong value. <code> MFLong ::= "[" NUMBER_LITERAL* "]" | NUMBER_LITERAL </code>
MFLong
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/parser/vrml97/VRML97FieldReader.java", "license": "gpl-2.0", "size": 61534 }
[ "org.web3d.vrml.lang.InvalidFieldFormatException" ]
import org.web3d.vrml.lang.InvalidFieldFormatException;
import org.web3d.vrml.lang.*;
[ "org.web3d.vrml" ]
org.web3d.vrml;
2,840,419
public SELF withConfiguration(Configurations configurations) { Assert.notNull(configurations, "Configurations must not be null"); return newInstance(this.runnerConfiguration.withConfiguration(configurations)); }
SELF function(Configurations configurations) { Assert.notNull(configurations, STR); return newInstance(this.runnerConfiguration.withConfiguration(configurations)); }
/** * Register the specified configuration classes with the {@link ApplicationContext}. * @param configurations the configurations to add * @return a new instance with the updated configuration */
Register the specified configuration classes with the <code>ApplicationContext</code>
withConfiguration
{ "repo_name": "mdeinum/spring-boot", "path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/AbstractApplicationContextRunner.java", "license": "apache-2.0", "size": 26585 }
[ "org.springframework.boot.context.annotation.Configurations", "org.springframework.util.Assert" ]
import org.springframework.boot.context.annotation.Configurations; import org.springframework.util.Assert;
import org.springframework.boot.context.annotation.*; import org.springframework.util.*;
[ "org.springframework.boot", "org.springframework.util" ]
org.springframework.boot; org.springframework.util;
553,056
Observable<ServiceResponse<JobStatistics>> getStatisticsWithServiceResponseAsync(String accountName, UUID jobIdentity);
Observable<ServiceResponse<JobStatistics>> getStatisticsWithServiceResponseAsync(String accountName, UUID jobIdentity);
/** * Gets statistics of the specified job. * * @param accountName The Azure Data Lake Analytics account to execute job operations on. * @param jobIdentity Job Information ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the JobSta...
Gets statistics of the specified job
getStatisticsWithServiceResponseAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Jobs.java", "license": "mit", "size": 25167 }
[ "com.microsoft.azure.management.datalake.analytics.models.JobStatistics", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.management.datalake.analytics.models.JobStatistics; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,106,475
public ColorTable[] getColorTables(){ if(files.size() <= 0) return null; ColorTable[] list = new ColorTable[files.size()]; for(int i = 0; i < files.size(); i++) list[i] = ((RasterDataset)files.get(i)).getColorTable(); return list; }
ColorTable[] function(){ if(files.size() <= 0) return null; ColorTable[] list = new ColorTable[files.size()]; for(int i = 0; i < files.size(); i++) list[i] = ((RasterDataset)files.get(i)).getColorTable(); return list; }
/** * Obtiene la lista de paletas correspondiente a todos los ficheros que forman el GeoMultiRasterFile * @return Paleta asociada a este o null si no tiene. Una posición null en el array también indica que * para ese fichero no hay paletas asociadas. */
Obtiene la lista de paletas correspondiente a todos los ficheros que forman el GeoMultiRasterFile
getColorTables
{ "repo_name": "iCarto/siga", "path": "libRaster/src/org/gvsig/raster/dataset/MultiRasterDataset.java", "license": "gpl-3.0", "size": 49227 }
[ "org.gvsig.raster.datastruct.ColorTable" ]
import org.gvsig.raster.datastruct.ColorTable;
import org.gvsig.raster.datastruct.*;
[ "org.gvsig.raster" ]
org.gvsig.raster;
2,878,787
int updateByPrimaryKey(DBPort record);
int updateByPrimaryKey(DBPort record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table port * * @mbggenerated Tue Apr 28 19:19:52 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table port
updateByPrimaryKey
{ "repo_name": "wolabs/womano", "path": "main/java/com/culabs/nfvo/dao/DBPortMapper.java", "license": "apache-2.0", "size": 1482 }
[ "com.culabs.nfvo.model.db.DBPort" ]
import com.culabs.nfvo.model.db.DBPort;
import com.culabs.nfvo.model.db.*;
[ "com.culabs.nfvo" ]
com.culabs.nfvo;
1,121,509
public boolean delete(int id) { try { super.connect(); PreparedStatement psDelete = connection.prepareStatement("DELETE * FROM EXTENSION WHERE id_extension = ? "); psDelete.setInt(1, id); psDelete.execute(); psDelete.closeOnCompletion(); super.disconnect(); return true; } catch (...
boolean function(int id) { try { super.connect(); PreparedStatement psDelete = connection.prepareStatement(STR); psDelete.setInt(1, id); psDelete.execute(); psDelete.closeOnCompletion(); super.disconnect(); return true; } catch (SQLException e) { e.printStackTrace(); return false; } }
/** * Methode pour effacer. * @param id * L'ID de l'extension à supprimer. * @return true si l'extension a été supprimée, false sinon. */
Methode pour effacer
delete
{ "repo_name": "JohanBrunet/Polytheque", "path": "Polytheque/src/polytheque/model/DAO/ExtensionDAO.java", "license": "mit", "size": 7216 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,142,394
public static class CurrentModUpdated extends EnumeratedAttribute { public String[] getValues() { return new String[] {TIME_CURRENT, TIME_MODIFIED, TIME_UPDATED}; } }
static class CurrentModUpdated extends EnumeratedAttribute { public String[] function() { return new String[] {TIME_CURRENT, TIME_MODIFIED, TIME_UPDATED}; } }
/** * Gets the list of allowable values. * @return The values. */
Gets the list of allowable values
getValues
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java", "license": "mit", "size": 25548 }
[ "org.apache.tools.ant.types.EnumeratedAttribute" ]
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,608,533
public List<StringSearchResult> getStringList( boolean searchSteps, boolean searchDatabases, boolean searchNotes ) { List<StringSearchResult> stringList = new ArrayList<StringSearchResult>(); if ( searchSteps ) { // Loop over all steps in the transformation and see what the used // vars are... ...
List<StringSearchResult> function( boolean searchSteps, boolean searchDatabases, boolean searchNotes ) { List<StringSearchResult> stringList = new ArrayList<StringSearchResult>(); if ( searchSteps ) { for ( int i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy entryMeta = getJobEntry( i ); stringList.add( new StringSearc...
/** * Get a list of all the strings used in this job. * * @return A list of StringSearchResult with strings used in the job */
Get a list of all the strings used in this job
getStringList
{ "repo_name": "GauravAshara/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 88838 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.NotePadMeta", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.reflection.StringSearchResult", "org.pentaho.di.core.reflection.StringSearcher", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.entry.JobEntryCopy", ...
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.reflection.StringSearchResult; import org.pentaho.di.core.reflection.StringSearcher; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job....
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.reflection.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.entry.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,144,903
public void passivate() { // Notify interested session event listeners fireSessionEvent(Session.SESSION_PASSIVATED_EVENT, null); // Notify ActivationListeners HttpSessionEvent event = null; String keys[] = keys(); for (int i = 0; i < keys.length; i++) { ...
void function() { fireSessionEvent(Session.SESSION_PASSIVATED_EVENT, null); HttpSessionEvent event = null; String keys[] = keys(); for (int i = 0; i < keys.length; i++) { Object attribute = attributes.get(keys[i]); if (attribute instanceof HttpSessionActivationListener) { if (event == null) event = new HttpSessionEvent...
/** * Perform the internal processing required to passivate * this session. */
Perform the internal processing required to passivate this session
passivate
{ "repo_name": "whitingjr/JbossWeb_7_2_0", "path": "src/main/java/org/apache/catalina/session/StandardSession.java", "license": "apache-2.0", "size": 51836 }
[ "javax.servlet.http.HttpSessionActivationListener", "javax.servlet.http.HttpSessionEvent", "org.apache.catalina.Session", "org.jboss.web.CatalinaMessages" ]
import javax.servlet.http.HttpSessionActivationListener; import javax.servlet.http.HttpSessionEvent; import org.apache.catalina.Session; import org.jboss.web.CatalinaMessages;
import javax.servlet.http.*; import org.apache.catalina.*; import org.jboss.web.*;
[ "javax.servlet", "org.apache.catalina", "org.jboss.web" ]
javax.servlet; org.apache.catalina; org.jboss.web;
2,267,573
String addListener(String mapName, String cacheName, MapListener listener);
String addListener(String mapName, String cacheName, MapListener listener);
/** * Adds a user-defined listener to a query-cache. This listener is registered as a local listener * on subscriber side. * * @param mapName underlying IMap name of query-cache. * @param cacheName name of the query-cache. * @param listener listener for receiving events. * @return ...
Adds a user-defined listener to a query-cache. This listener is registered as a local listener on subscriber side
addListener
{ "repo_name": "lmjacksoniii/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/map/impl/querycache/QueryCacheEventService.java", "license": "apache-2.0", "size": 4080 }
[ "com.hazelcast.map.listener.MapListener" ]
import com.hazelcast.map.listener.MapListener;
import com.hazelcast.map.listener.*;
[ "com.hazelcast.map" ]
com.hazelcast.map;
353,523
private HttpResponse sendSAMLAssertion(String samlAssertion) throws IOException { HttpPost request = new HttpPost(OAuth2Constant.ACCESS_TOKEN_ENDPOINT); List<NameValuePair> urlParameters = new ArrayList<>(); urlParameters.add(new BasicNameValuePair("grant_type", OAuth2Constant.OAUTH2_GRANT_...
HttpResponse function(String samlAssertion) throws IOException { HttpPost request = new HttpPost(OAuth2Constant.ACCESS_TOKEN_ENDPOINT); List<NameValuePair> urlParameters = new ArrayList<>(); urlParameters.add(new BasicNameValuePair(STR, OAuth2Constant.OAUTH2_GRANT_TYPE_SAML2_BEARER)); urlParameters.add(new BasicNameVal...
/** * Send the SAML assertion to the token endpoint. * @param samlAssertion SAML assertion. * @return HTTP Response object that we get from calling the token endpoint. * @throws IOException */
Send the SAML assertion to the token endpoint
sendSAMLAssertion
{ "repo_name": "milindaperera/product-is", "path": "modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceSAML2BearerGrantTestCase.java", "license": "apache-2.0", "size": 15600 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.commons.codec.binary.Base64", "org.apache.http.HttpResponse", "org.apache.http.NameValuePair", "org.apache.http.client.entity.UrlEncodedFormEntity", "org.apache.http.client.methods.HttpPost", "org.apache.http.message.BasicNa...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.commons.codec.binary.Base64; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.a...
import java.io.*; import java.util.*; import org.apache.commons.codec.binary.*; import org.apache.http.*; import org.apache.http.client.entity.*; import org.apache.http.client.methods.*; import org.apache.http.message.*; import org.wso2.identity.integration.test.utils.*;
[ "java.io", "java.util", "org.apache.commons", "org.apache.http", "org.wso2.identity" ]
java.io; java.util; org.apache.commons; org.apache.http; org.wso2.identity;
33,579
boolean isVersionAppliedToIndex(IdAndVersion tableId, long versionNumber);
boolean isVersionAppliedToIndex(IdAndVersion tableId, long versionNumber);
/** * Has the change set represented by the given version number already been * applied to the table index? * * @param connection * @param versionNumber * @return True if the change set for the given version has already been * applied ot the table. */
Has the change set represented by the given version number already been applied to the table index
isVersionAppliedToIndex
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/table/TableIndexManager.java", "license": "apache-2.0", "size": 9590 }
[ "org.sagebionetworks.repo.model.entity.IdAndVersion" ]
import org.sagebionetworks.repo.model.entity.IdAndVersion;
import org.sagebionetworks.repo.model.entity.*;
[ "org.sagebionetworks.repo" ]
org.sagebionetworks.repo;
639,129
private javax.swing.JLabel getLFichero() { if (lFichero == null) { lFichero = new javax.swing.JLabel(); lFichero.setSize(42, 20); lFichero.setText(PluginServices.getText(this, "Fichero")); lFichero.setLocation(10, 9); } return lFichero; }
javax.swing.JLabel function() { if (lFichero == null) { lFichero = new javax.swing.JLabel(); lFichero.setSize(42, 20); lFichero.setText(PluginServices.getText(this, STR)); lFichero.setLocation(10, 9); } return lFichero; }
/** * This method initializes lFichero * * @return javax.swing.JLabel */
This method initializes lFichero
getLFichero
{ "repo_name": "iCarto/siga", "path": "appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/gui/dialogs/FFramePictureDialog.java", "license": "gpl-3.0", "size": 12193 }
[ "com.iver.andami.PluginServices" ]
import com.iver.andami.PluginServices;
import com.iver.andami.*;
[ "com.iver.andami" ]
com.iver.andami;
1,633,577
@Test public void remoteDCTest() throws Exception { Map<Replica, Mutation> repairs = new HashMap<>(); repairs.put(replica1, mutation(cell1)); Replica remote1 = ReplicaUtils.full(InetAddressAndPort.getByName("10.0.0.1")); Replica remote2 = ReplicaUtils.full(InetAddressAndPort...
void function() throws Exception { Map<Replica, Mutation> repairs = new HashMap<>(); repairs.put(replica1, mutation(cell1)); Replica remote1 = ReplicaUtils.full(InetAddressAndPort.getByName(STR)); Replica remote2 = ReplicaUtils.full(InetAddressAndPort.getByName(STR)); repairs.put(remote1, mutation(cell1)); EndpointsFor...
/** * For dc local consistency levels, noop mutations and responses from remote dcs should not affect effective blockFor */
For dc local consistency levels, noop mutations and responses from remote dcs should not affect effective blockFor
remoteDCTest
{ "repo_name": "spodkowinski/cassandra", "path": "test/unit/org/apache/cassandra/service/reads/repair/BlockingReadRepairTest.java", "license": "apache-2.0", "size": 11637 }
[ "java.util.HashMap", "java.util.Map", "java.util.concurrent.TimeUnit", "org.apache.cassandra.db.ConsistencyLevel", "org.apache.cassandra.db.Mutation", "org.apache.cassandra.locator.EndpointsForRange", "org.apache.cassandra.locator.InetAddressAndPort", "org.apache.cassandra.locator.Replica", "org.apa...
import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import org.apache.cassandra.db.ConsistencyLevel; import org.apache.cassandra.db.Mutation; import org.apache.cassandra.locator.EndpointsForRange; import org.apache.cassandra.locator.InetAddressAndPort; import org.apache.cassandra.locat...
import java.util.*; import java.util.concurrent.*; import org.apache.cassandra.db.*; import org.apache.cassandra.locator.*; import org.junit.*;
[ "java.util", "org.apache.cassandra", "org.junit" ]
java.util; org.apache.cassandra; org.junit;
859,679