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 SesClientResponse updateUser(SessionInfo sessionInfo, UserDTO userDataToUpdate) throws Exception; | SesClientResponse function(SessionInfo sessionInfo, UserDTO userDataToUpdate) throws Exception; | /**
* Updates user information of a registered user.
*
* @param sessionInfo
* the user's active session info object.
* @param userDataToUpdate
* the data to update the registered user with.
* @return a response object containing process status.
* @throws Exception
... | Updates user information of a registered user | updateUser | {
"repo_name": "52North/SensorWebClient",
"path": "sensorwebclient-ses-shared/src/main/java/org/n52/client/service/SesUserService.java",
"license": "gpl-2.0",
"size": 7249
} | [
"org.n52.shared.responses.SesClientResponse",
"org.n52.shared.serializable.pojos.UserDTO",
"org.n52.shared.session.SessionInfo"
] | import org.n52.shared.responses.SesClientResponse; import org.n52.shared.serializable.pojos.UserDTO; import org.n52.shared.session.SessionInfo; | import org.n52.shared.responses.*; import org.n52.shared.serializable.pojos.*; import org.n52.shared.session.*; | [
"org.n52.shared"
] | org.n52.shared; | 84,252 |
private String setUpContext(BuildListener listener, ClientApi clientApi, String contextName, String includedURL, String excludedURL) throws ClientApiException {
String contextIdTemp;
includedURL = includedURL.trim();
excludedURL = excludedURL.trim();
Utils.loggerMessage(listener, 0,... | String function(BuildListener listener, ClientApi clientApi, String contextName, String includedURL, String excludedURL) throws ClientApiException { String contextIdTemp; includedURL = includedURL.trim(); excludedURL = excludedURL.trim(); Utils.loggerMessage(listener, 0, STR, Utils.ZAP, contextName); Utils.lineBreak(li... | /**
* Set up a context and add/exclude URL to/from it.
*
* @param listener
* of type BuildListener: the display log listener during the Jenkins job execution.
* @param clientApi
* of type ClientApi: the ZAP client API to call method.
* @param contextName
* ... | Set up a context and add/exclude URL to/from it | setUpContext | {
"repo_name": "JordanGS/zaproxy-plugin",
"path": "src/main/java/com/github/jenkinsci/zaproxy/ZAPDriver.java",
"license": "mit",
"size": 148163
} | [
"hudson.model.BuildListener",
"org.apache.commons.lang.exception.ExceptionUtils",
"org.zaproxy.clientapi.core.ClientApi",
"org.zaproxy.clientapi.core.ClientApiException"
] | import hudson.model.BuildListener; import org.apache.commons.lang.exception.ExceptionUtils; import org.zaproxy.clientapi.core.ClientApi; import org.zaproxy.clientapi.core.ClientApiException; | import hudson.model.*; import org.apache.commons.lang.exception.*; import org.zaproxy.clientapi.core.*; | [
"hudson.model",
"org.apache.commons",
"org.zaproxy.clientapi"
] | hudson.model; org.apache.commons; org.zaproxy.clientapi; | 969,316 |
@Test
public final void testResultSetHasRequiredActionColumns() throws SQLException {
Connection conn = null;
try {
conn = DataSourceFactory.getInstance().getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from... | final void function() throws SQLException { Connection conn = null; try { conn = DataSourceFactory.getInstance().getConnection(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(STR); Collection<String> columns = new ArrayList<String>(); AutomationProcessor ap = new AutomationProcessor(Vacuumd... | /**
* Test resultSetHasRequiredActionColumns method
* @throws SQLException
*/ | Test resultSetHasRequiredActionColumns method | testResultSetHasRequiredActionColumns | {
"repo_name": "tharindum/opennms_dashboard",
"path": "opennms-alarms/daemon/src/test/java/org/opennms/netmgt/vacuumd/VacuumdTest.java",
"license": "gpl-2.0",
"size": 20604
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.ArrayList",
"java.util.Collection",
"org.junit.Assert",
"org.opennms.netmgt.config.DataSourceFactory",
"org.opennms.netmgt.config.VacuumdConfigFactory"
] | import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Collection; import org.junit.Assert; import org.opennms.netmgt.config.DataSourceFactory; import org.opennms.netmgt.config.VacuumdConfigFactory; | import java.sql.*; import java.util.*; import org.junit.*; import org.opennms.netmgt.config.*; | [
"java.sql",
"java.util",
"org.junit",
"org.opennms.netmgt"
] | java.sql; java.util; org.junit; org.opennms.netmgt; | 1,084,451 |
private Method locateCorrespondingColumnIndexMethod(Method columnNameMethod) throws NoSuchMethodException {
Class actualParameterTypes[] = new Class[columnNameMethod.getParameterTypes().length];
actualParameterTypes[0] = int.class;
System.arraycopy(
columnNameMethod.getParameterTypes(),
1,
actualPa... | Method function(Method columnNameMethod) throws NoSuchMethodException { Class actualParameterTypes[] = new Class[columnNameMethod.getParameterTypes().length]; actualParameterTypes[0] = int.class; System.arraycopy( columnNameMethod.getParameterTypes(), 1, actualParameterTypes, 1, columnNameMethod.getParameterTypes().len... | /**
* For a given {@link ResultSet} method passed a column name, locate the corresponding method passed the same
* parameters but the column index.
*
* @param columnNameMethod The method passed the column name
* @return The corresponding method passed the column index.
* @throws NoSuchMethodException Should... | For a given <code>ResultSet</code> method passed a column name, locate the corresponding method passed the same parameters but the column index | locateCorrespondingColumnIndexMethod | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/engine/jdbc/ResultSetWrapperProxy.java",
"license": "mit",
"size": 6893
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 116,506 |
public void testNoProfile() throws Exception {
createIndex("test");
ensureGreen();
int numDocs = randomIntBetween(100, 150);
IndexRequestBuilder[] docs = new IndexRequestBuilder[numDocs];
for (int i = 0; i < numDocs; i++) {
docs[i] = client().prepareIndex("test",... | void function() throws Exception { createIndex("test"); ensureGreen(); int numDocs = randomIntBetween(100, 150); IndexRequestBuilder[] docs = new IndexRequestBuilder[numDocs]; for (int i = 0; i < numDocs; i++) { docs[i] = client().prepareIndex("test", "type1", String.valueOf(i)).setSource( STR, English.intToEnglish(i),... | /**
* This test makes sure no profile results are returned when profiling is disabled
*/ | This test makes sure no profile results are returned when profiling is disabled | testNoProfile | {
"repo_name": "mmaracic/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/search/profile/QueryProfilerIT.java",
"license": "apache-2.0",
"size": 25745
} | [
"org.apache.lucene.util.English",
"org.elasticsearch.action.index.IndexRequestBuilder",
"org.elasticsearch.action.search.SearchResponse",
"org.elasticsearch.index.query.QueryBuilder",
"org.elasticsearch.index.query.QueryBuilders",
"org.hamcrest.Matchers"
] | import org.apache.lucene.util.English; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.hamcrest.Matchers; | import org.apache.lucene.util.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.search.*; import org.elasticsearch.index.query.*; import org.hamcrest.*; | [
"org.apache.lucene",
"org.elasticsearch.action",
"org.elasticsearch.index",
"org.hamcrest"
] | org.apache.lucene; org.elasticsearch.action; org.elasticsearch.index; org.hamcrest; | 1,136,184 |
private RuntimeException cacheException(Exception e) {
GridFutureAdapter<Void> restartFut = this.restartFut.get();
if (restartFut != null) {
if (X.hasCause(e, CacheStoppedException.class) || X.hasSuppressed(e, CacheStoppedException.class))
throw new IgniteCacheRestarting... | RuntimeException function(Exception e) { GridFutureAdapter<Void> restartFut = this.restartFut.get(); if (restartFut != null) { if (X.hasCause(e, CacheStoppedException.class) X.hasSuppressed(e, CacheStoppedException.class)) throw new IgniteCacheRestartingException(new IgniteFutureImpl<>(restartFut), STR + ctx.name(), e)... | /**
* Method converts exception to IgniteCacheRestartingException in case of cache restarting
* or to CacheException in other cases.
*
* @param e {@code IgniteCheckedException} or {@code IgniteException}.
* @return Cache exception.
*/ | Method converts exception to IgniteCacheRestartingException in case of cache restarting or to CacheException in other cases | cacheException | {
"repo_name": "voipp/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java",
"license": "apache-2.0",
"size": 62783
} | [
"javax.cache.CacheException",
"org.apache.ignite.IgniteCacheRestartingException",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.IgniteException",
"org.apache.ignite.internal.util.future.GridFutureAdapter",
"org.apache.ignite.internal.util.future.IgniteFutureImpl",
"org.apache.ignite.int... | import javax.cache.CacheException; import org.apache.ignite.IgniteCacheRestartingException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.internal.util.future.IgniteFutureImpl; import o... | import javax.cache.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.future.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"javax.cache",
"org.apache.ignite"
] | javax.cache; org.apache.ignite; | 655,727 |
if (event.isLeader()) {
log.info("Leader Election event received, this instance is now known as the leader");
if (!childContextLaunched) {
log.info("Launching the full application context");
fullApplicationContext = new AnnotationConfigApplicationContext();
... | if (event.isLeader()) { log.info(STR); if (!childContextLaunched) { log.info(STR); fullApplicationContext = new AnnotationConfigApplicationContext(); fullApplicationContext.setParent(this.bootstrapContext); fullApplicationContext.setId(this.bootstrapContext.getId() + ":full"); fullApplicationContext.register(FullApplic... | /**
* A synchronized method is enough since the boolean <code>childContextLaunched</code> is only read/write in it.
*/ | A synchronized method is enough since the boolean <code>childContextLaunched</code> is only read/write in it | onApplicationEvent | {
"repo_name": "broly-git/alien4cloud",
"path": "alien4cloud-rest-api/src/main/java/org/alien4cloud/bootstrap/ApplicationManager.java",
"license": "apache-2.0",
"size": 3641
} | [
"org.springframework.context.annotation.AnnotationConfigApplicationContext",
"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"
] | import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; | import org.springframework.context.annotation.*; import org.springframework.web.servlet.mvc.method.annotation.*; | [
"org.springframework.context",
"org.springframework.web"
] | org.springframework.context; org.springframework.web; | 329,921 |
public ProjectData addProject(final ProjectData project) throws Exception {
return (ProjectData) this.addObject(0, project);
} | ProjectData function(final ProjectData project) throws Exception { return (ProjectData) this.addObject(0, project); } | /**
* Adds the project.
*
* @param project
* the project
* @return the project data
* @throws Exception
* the exception
*/ | Adds the project | addProject | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/com/technoetic/xplanner/soap/XPlanner.java",
"license": "gpl-2.0",
"size": 41480
} | [
"com.technoetic.xplanner.soap.domain.ProjectData"
] | import com.technoetic.xplanner.soap.domain.ProjectData; | import com.technoetic.xplanner.soap.domain.*; | [
"com.technoetic.xplanner"
] | com.technoetic.xplanner; | 2,904,750 |
public void writeXML( Writer output ) throws IOException
{
PDFileSpecification fs = this.getFile();
if( fs != null )
{
output.write( "<f href=\"" + fs.getFile() + "\" />\n" );
}
COSArray ids = this.getID();
if( ids != null )
{
... | void function( Writer output ) throws IOException { PDFileSpecification fs = this.getFile(); if( fs != null ) { output.write( STRSTR\STR ); } COSArray ids = this.getID(); if( ids != null ) { COSString original = (COSString)ids.getObject( 0 ); COSString modified = (COSString)ids.getObject( 1 ); output.write( STRSTR\" " ... | /**
* This will write this element as an XML document.
*
* @param output The stream to write the xml to.
*
* @throws IOException If there is an error writing the XML.
*/ | This will write this element as an XML document | writeXML | {
"repo_name": "kzganesan/PdfBox-Android",
"path": "library/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java",
"license": "apache-2.0",
"size": 14578
} | [
"java.io.IOException",
"java.io.Writer",
"java.util.List",
"org.apache.pdfbox.cos.COSArray",
"org.apache.pdfbox.cos.COSString",
"org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification"
] | import java.io.IOException; import java.io.Writer; import java.util.List; import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSString; import org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification; | import java.io.*; import java.util.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.filespecification.*; | [
"java.io",
"java.util",
"org.apache.pdfbox"
] | java.io; java.util; org.apache.pdfbox; | 1,149,355 |
boolean handleBuild(List<NMessage> list);
| boolean handleBuild(List<NMessage> list); | /**
* Handle the IDE message list returned by Builder.
*
* @param list the message list.
* @return true if the handling is considered successful; false otherwise
*/ | Handle the IDE message list returned by Builder | handleBuild | {
"repo_name": "melt-umn/silver",
"path": "runtime/imp/main/src/edu/umn/cs/melt/ide/imp/builders/PostActionHandler.java",
"license": "lgpl-3.0",
"size": 594
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,536,028 |
public void setAssociation(UMLAssociation association, DomainModel model) {
if (association != null) {
UMLAssociationEdge sourceEdge =
association.getSourceUMLAssociationEdge().getUMLAssociationEdge();
UMLAssociationEdge targetEdge =
association.getT... | void function(UMLAssociation association, DomainModel model) { if (association != null) { UMLAssociationEdge sourceEdge = association.getSourceUMLAssociationEdge().getUMLAssociationEdge(); UMLAssociationEdge targetEdge = association.getTargetUMLAssociationEdge().getUMLAssociationEdge(); UMLClass sourceClass = DomainMod... | /**
* Sets the association to be displayed. If the association is <code>null</code>,
* the text fields will be cleared out.
*
* @param association
* The association to be displayed
* @param model
* The domain model this association pertains to
*/ | Sets the association to be displayed. If the association is <code>null</code>, the text fields will be cleared out | setAssociation | {
"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
} | [
"gov.nih.nci.cagrid.data.utilities.DomainModelUtils",
"gov.nih.nci.cagrid.metadata.common.UMLClass",
"gov.nih.nci.cagrid.metadata.dataservice.DomainModel",
"gov.nih.nci.cagrid.metadata.dataservice.UMLAssociation",
"gov.nih.nci.cagrid.metadata.dataservice.UMLAssociationEdge"
] | import gov.nih.nci.cagrid.data.utilities.DomainModelUtils; import gov.nih.nci.cagrid.metadata.common.UMLClass; import gov.nih.nci.cagrid.metadata.dataservice.DomainModel; import gov.nih.nci.cagrid.metadata.dataservice.UMLAssociation; import gov.nih.nci.cagrid.metadata.dataservice.UMLAssociationEdge; | import gov.nih.nci.cagrid.data.utilities.*; import gov.nih.nci.cagrid.metadata.common.*; import gov.nih.nci.cagrid.metadata.dataservice.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 1,986,229 |
protected Node exitSnmpEnterprisePart(Production node)
throws ParseException {
return node;
} | Node function(Production node) throws ParseException { return node; } | /**
* Called when exiting a parse tree node.
*
* @param node the node being exited
*
* @return the node to add to the parse tree, or
* null if no parse tree should be created
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when exiting a parse tree node | exitSnmpEnterprisePart | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.Node",
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,847 |
private static void addOID(ObjectIdentifier oid) {
int[] newOid = oid.getOid();
int index = hashIntArray(newOid) % CAPACITY;
// look for OID in the pool
ObjectIdentifier[] list = KNOWN_OIDS[index];
int i = 0;
for (; list[i] != null; i++) {
// check wrong ... | static void function(ObjectIdentifier oid) { int[] newOid = oid.getOid(); int index = hashIntArray(newOid) % CAPACITY; ObjectIdentifier[] list = KNOWN_OIDS[index]; int i = 0; for (; list[i] != null; i++) { if (Arrays.equals(newOid, list[i].getOid())) { throw new Error(STR + STR + oid.getName() + " " + list[i].getName()... | /**
* Adds known OID to pool.
* for static AttributeTypeAndValue initialization only
*/ | Adds known OID to pool. for static AttributeTypeAndValue initialization only | addOID | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/libcore/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValue.java",
"license": "apache-2.0",
"size": 17946
} | [
"java.util.Arrays",
"org.apache.harmony.security.utils.ObjectIdentifier"
] | import java.util.Arrays; import org.apache.harmony.security.utils.ObjectIdentifier; | import java.util.*; import org.apache.harmony.security.utils.*; | [
"java.util",
"org.apache.harmony"
] | java.util; org.apache.harmony; | 2,369,129 |
private static void registerRoutes(ResponseTransformer transformer, FileUploadHelper fileUploadHelper,
TransactionsService transactionsService, PublisherService publisherService,
Path websitePath) {
Route openTransaction = new Ope... | static void function(ResponseTransformer transformer, FileUploadHelper fileUploadHelper, TransactionsService transactionsService, PublisherService publisherService, Path websitePath) { Route openTransaction = new OpenTransaction(transactionsService); registerPostHandler(STR, openTransaction, transformer); Route addFile... | /**
* Register the {@link Route}'s
*/ | Register the <code>Route</code>'s | registerRoutes | {
"repo_name": "Carboni/the-train-destination",
"path": "src/main/java/com/github/onsdigital/thetrain/App.java",
"license": "mit",
"size": 6667
} | [
"com.github.onsdigital.thetrain.helpers.FileUploadHelper",
"com.github.onsdigital.thetrain.routes.AddFileToTransaction",
"com.github.onsdigital.thetrain.routes.CommitTransaction",
"com.github.onsdigital.thetrain.routes.GetTransaction",
"com.github.onsdigital.thetrain.routes.OpenTransaction",
"com.github.o... | import com.github.onsdigital.thetrain.helpers.FileUploadHelper; import com.github.onsdigital.thetrain.routes.AddFileToTransaction; import com.github.onsdigital.thetrain.routes.CommitTransaction; import com.github.onsdigital.thetrain.routes.GetTransaction; import com.github.onsdigital.thetrain.routes.OpenTransaction; im... | import com.github.onsdigital.thetrain.helpers.*; import com.github.onsdigital.thetrain.routes.*; import com.github.onsdigital.thetrain.service.*; import java.nio.file.*; | [
"com.github.onsdigital",
"java.nio"
] | com.github.onsdigital; java.nio; | 1,079,236 |
@Nonnull
O visit(@Nonnull OWLSymmetricObjectPropertyAxiom axiom); | O visit(@Nonnull OWLSymmetricObjectPropertyAxiom axiom); | /**
* visit OWLSymmetricObjectPropertyAxiom type
*
* @param axiom
* axiom to visit
* @return visitor value
*/ | visit OWLSymmetricObjectPropertyAxiom type | visit | {
"repo_name": "matthewhorridge/owlapi-gwt",
"path": "owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/OWLLogicalAxiomVisitorEx.java",
"license": "lgpl-3.0",
"size": 9088
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 905,802 |
public void test_accessPathFilter() {
final IVariable<?> x = Var.var("x");
final IVariable<?> y = Var.var("y");
final BOpResolver stripper = new ValueStripper(
new BOp[] {}, null);
final DistinctFilter distinctFilter = new DistinctFilter(
... | void function() { final IVariable<?> x = Var.var("x"); final IVariable<?> y = Var.var("y"); final BOpResolver stripper = new ValueStripper( new BOp[] {}, null); final DistinctFilter distinctFilter = new DistinctFilter( new BOp[] { stripper }, null); final Predicate<E> pred = new Predicate<E>(new IVariableOrConstant[] {... | /**
* Unit test for an {@link IPredicate.Annotations#ACCESS_PATH_FILTER}.
*
* @todo test with synchronous and asynchronous iterators.
* @todo test with exact range count (filter must be applied).
*/ | Unit test for an <code>IPredicate.Annotations#ACCESS_PATH_FILTER</code> | test_accessPathFilter | {
"repo_name": "blazegraph/database",
"path": "bigdata-core-test/bigdata/src/test/com/bigdata/bop/ap/TestPredicateAccessPath.java",
"license": "gpl-2.0",
"size": 18310
} | [
"com.bigdata.bop.BOp",
"com.bigdata.bop.IPredicate",
"com.bigdata.bop.IVariable",
"com.bigdata.bop.IVariableOrConstant",
"com.bigdata.bop.NV",
"com.bigdata.bop.Var",
"com.bigdata.bop.ap.Predicate",
"com.bigdata.bop.ap.filter.BOpResolver",
"com.bigdata.bop.ap.filter.DistinctFilter",
"com.bigdata.jo... | import com.bigdata.bop.BOp; import com.bigdata.bop.IPredicate; import com.bigdata.bop.IVariable; import com.bigdata.bop.IVariableOrConstant; import com.bigdata.bop.NV; import com.bigdata.bop.Var; import com.bigdata.bop.ap.Predicate; import com.bigdata.bop.ap.filter.BOpResolver; import com.bigdata.bop.ap.filter.Distinct... | import com.bigdata.bop.*; import com.bigdata.bop.ap.*; import com.bigdata.bop.ap.filter.*; import com.bigdata.journal.*; | [
"com.bigdata.bop",
"com.bigdata.journal"
] | com.bigdata.bop; com.bigdata.journal; | 834,523 |
public static ColumnValue from(Cell<?> cell)
{
ColumnMetadata metadata = cell.column();
return new ColumnValue(metadata, metadata.type.compose(cell.buffer()));
}
private ColumnValue(ColumnMetadata metadata, Object value)
{
this.metadata = meta... | static ColumnValue function(Cell<?> cell) { ColumnMetadata metadata = cell.column(); return new ColumnValue(metadata, metadata.type.compose(cell.buffer())); } private ColumnValue(ColumnMetadata metadata, Object value) { this.metadata = metadata; this.value = value; } | /**
* Returns the column value corresponding to the specified cell.
*
* @param cell the column cell metadata
* @return the column value corresponding to the specified cell
*/ | Returns the column value corresponding to the specified cell | from | {
"repo_name": "belliottsmith/cassandra",
"path": "src/java/org/apache/cassandra/db/virtual/AbstractMutableVirtualTable.java",
"license": "apache-2.0",
"size": 13440
} | [
"org.apache.cassandra.db.rows.Cell",
"org.apache.cassandra.schema.ColumnMetadata"
] | import org.apache.cassandra.db.rows.Cell; import org.apache.cassandra.schema.ColumnMetadata; | import org.apache.cassandra.db.rows.*; import org.apache.cassandra.schema.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 693,239 |
private void initialize() {
if (selection != null && selection.isEmpty() == false
&& selection instanceof IStructuredSelection) {
final IStructuredSelection ssel = (IStructuredSelection) selection;
if (ssel.size() > 1)
return;
final Object obj = ssel.getFirstElement();
if (obj instanceof IResou... | void function() { if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { final IStructuredSelection ssel = (IStructuredSelection) selection; if (ssel.size() > 1) return; final Object obj = ssel.getFirstElement(); if (obj instanceof IResource) { final IContainer container; ... | /**
* Tests if the current workbench selection is a suitable container to use.
*/ | Tests if the current workbench selection is a suitable container to use | initialize | {
"repo_name": "boalang/xtext-ide",
"path": "edu.iastate.cs.boa.ui/src/edu/iastate/cs/boa/ui/wizard/BoaNewFileWizardPage.java",
"license": "apache-2.0",
"size": 6047
} | [
"org.eclipse.core.resources.IContainer",
"org.eclipse.core.resources.IResource",
"org.eclipse.jface.viewers.IStructuredSelection"
] | import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; import org.eclipse.jface.viewers.IStructuredSelection; | import org.eclipse.core.resources.*; import org.eclipse.jface.viewers.*; | [
"org.eclipse.core",
"org.eclipse.jface"
] | org.eclipse.core; org.eclipse.jface; | 1,269,685 |
@RequestMapping( value = "/{id}", method = RequestMethod.DELETE )
@ResponseBody
public void deleteAction(
@PathVariable( "id" )
Long id,
HttpServletResponse response
) {
try {
//- Try to delete parentTask type -//
this.taskTypeService.... | @RequestMapping( value = "/{id}", method = RequestMethod.DELETE ) void function( @PathVariable( "id" ) Long id, HttpServletResponse response ) { try { this.taskTypeService.delete( id ); } catch ( DataAccessException e ) { response.setStatus( HttpStatus.NOT_FOUND.value() ); } } | /**
* Delete parentTask type.
*
* @param id Id of parentTask type.
* @param response Use for work with HTTP.
*/ | Delete parentTask type | deleteAction | {
"repo_name": "Valentine1996/FamilyTime",
"path": "src/main/java/com/familytime/controller/TaskTypeController.java",
"license": "mit",
"size": 6622
} | [
"javax.servlet.http.HttpServletResponse",
"org.springframework.dao.DataAccessException",
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import javax.servlet.http.HttpServletResponse; import org.springframework.dao.DataAccessException; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.Reques... | import javax.servlet.http.*; import org.springframework.dao.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"javax.servlet",
"org.springframework.dao",
"org.springframework.http",
"org.springframework.web"
] | javax.servlet; org.springframework.dao; org.springframework.http; org.springframework.web; | 1,784,904 |
public static <TSource, TKey, TAccumulate, TResult> Enumerable<TResult> groupBy(
Enumerable<TSource> enumerable, Function1<TSource, TKey> keySelector,
Function0<TAccumulate> accumulatorInitializer,
Function2<TAccumulate, TSource, TAccumulate> accumulatorAdder,
final Function2<TKey, TAccumulate... | static <TSource, TKey, TAccumulate, TResult> Enumerable<TResult> function( Enumerable<TSource> enumerable, Function1<TSource, TKey> keySelector, Function0<TAccumulate> accumulatorInitializer, Function2<TAccumulate, TSource, TAccumulate> accumulatorAdder, final Function2<TKey, TAccumulate, TResult> resultSelector) { ret... | /**
* Groups the elements of a sequence according to a
* specified key selector function, initializing an accumulator for each
* group and adding to it each time an element with the same key is seen.
* Creates a result value from each accumulator and its key using a
* specified function.
*/ | Groups the elements of a sequence according to a specified key selector function, initializing an accumulator for each group and adding to it each time an element with the same key is seen. Creates a result value from each accumulator and its key using a specified function | groupBy | {
"repo_name": "googleinterns/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java",
"license": "apache-2.0",
"size": 146861
} | [
"java.util.HashMap",
"org.apache.calcite.linq4j.function.Function0",
"org.apache.calcite.linq4j.function.Function1",
"org.apache.calcite.linq4j.function.Function2"
] | import java.util.HashMap; import org.apache.calcite.linq4j.function.Function0; import org.apache.calcite.linq4j.function.Function1; import org.apache.calcite.linq4j.function.Function2; | import java.util.*; import org.apache.calcite.linq4j.function.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 444,521 |
public ValidationResultsReporter newSingleLineResultsReporter(Messagable messageAreaPane); | ValidationResultsReporter function(Messagable messageAreaPane); | /**
* Create a {@link ValidationResultsReporter} for this form, sending input
* to the given {@link Messagable}.
*
* TODO check why it's specifically mentioning "singleLine" in the method
* name (can be any validationResultsReporter)
*
* @param messageAreaPane the message receiver used by the created
* ... | Create a <code>ValidationResultsReporter</code> for this form, sending input to the given <code>Messagable</code>. TODO check why it's specifically mentioning "singleLine" in the method name (can be any validationResultsReporter) | newSingleLineResultsReporter | {
"repo_name": "springrichclient/springrcp",
"path": "spring-richclient-core/src/main/java/org/springframework/richclient/form/Form.java",
"license": "apache-2.0",
"size": 4968
} | [
"org.springframework.richclient.dialog.Messagable"
] | import org.springframework.richclient.dialog.Messagable; | import org.springframework.richclient.dialog.*; | [
"org.springframework.richclient"
] | org.springframework.richclient; | 162,867 |
public void setViewPager(ViewPager viewPager) {
mTabStrip.removeAllViews();
mViewPager = viewPager;
if (viewPager != null) {
viewPager.setOnPageChangeListener(new InternalViewPagerListener());
populateTabStrip();
}
} | void function(ViewPager viewPager) { mTabStrip.removeAllViews(); mViewPager = viewPager; if (viewPager != null) { viewPager.setOnPageChangeListener(new InternalViewPagerListener()); populateTabStrip(); } } | /**
* Sets the associated view pager. Note that the assumption here is that the pager content
* (number of tabs and tab titles) does not change after this call has been made.
*/ | Sets the associated view pager. Note that the assumption here is that the pager content (number of tabs and tab titles) does not change after this call has been made | setViewPager | {
"repo_name": "MASTUSAID/MAST-MOBILE",
"path": "MAST-MOBILE/src/main/java/com/rmsi/android/mast/tabs/SlidingTabLayout.java",
"license": "gpl-3.0",
"size": 11077
} | [
"android.support.v4.view.ViewPager"
] | import android.support.v4.view.ViewPager; | import android.support.v4.view.*; | [
"android.support"
] | android.support; | 2,019,235 |
public void waitForPageReadyState() {
WebDriverWait wait = new WebDriverWait(driver, TestProperties.TEST_TIMEOUT);
wait.until(driver -> {
return "complete".equals(((JavascriptExecutor) driver).executeScript("return document.readyState"));
});
} | void function() { WebDriverWait wait = new WebDriverWait(driver, TestProperties.TEST_TIMEOUT); wait.until(driver -> { return STR.equals(((JavascriptExecutor) driver).executeScript(STR)); }); } | /**
* Waits for the page to load by only looking at the page's readyState.
*/ | Waits for the page to load by only looking at the page's readyState | waitForPageReadyState | {
"repo_name": "amarlearning/teammates",
"path": "src/e2e/java/teammates/e2e/pageobjects/Browser.java",
"license": "gpl-2.0",
"size": 8131
} | [
"org.openqa.selenium.JavascriptExecutor",
"org.openqa.selenium.support.ui.WebDriverWait"
] | import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.support.ui.WebDriverWait; | import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,598,024 |
public void setBackupQuorum(SharedNothingBackupQuorum backupQuorum) {
this.backupQuorum = backupQuorum;
} | void function(SharedNothingBackupQuorum backupQuorum) { this.backupQuorum = backupQuorum; } | /**
* Sets the quorumManager used by the server in the replicationEndpoint. It is used to inform the
* backup server of the live's nodeID.
*
* @param backupQuorum
*/ | Sets the quorumManager used by the server in the replicationEndpoint. It is used to inform the backup server of the live's nodeID | setBackupQuorum | {
"repo_name": "mtaylor/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java",
"license": "apache-2.0",
"size": 29419
} | [
"org.apache.activemq.artemis.core.server.cluster.qourum.SharedNothingBackupQuorum"
] | import org.apache.activemq.artemis.core.server.cluster.qourum.SharedNothingBackupQuorum; | import org.apache.activemq.artemis.core.server.cluster.qourum.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 552,805 |
void write(DataOutput p_74734_1_) throws IOException
{
p_74734_1_.writeFloat(this.data);
} | void write(DataOutput p_74734_1_) throws IOException { p_74734_1_.writeFloat(this.data); } | /**
* Write the actual data contents of the tag, implemented in NBT extension classes
*/ | Write the actual data contents of the tag, implemented in NBT extension classes | write | {
"repo_name": "CheeseL0ver/Ore-TTM",
"path": "build/tmp/recompSrc/net/minecraft/nbt/NBTTagFloat.java",
"license": "lgpl-2.1",
"size": 2130
} | [
"java.io.DataOutput",
"java.io.IOException"
] | import java.io.DataOutput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 297,492 |
List<byte[]> getArgs(); | List<byte[]> getArgs(); | /**
* Returns the arguments corresponding to the call to
* {@link Chaincode#init(ChaincodeStub)} or
* {@link Chaincode#invoke(ChaincodeStub)}.
*
* @return a list of arguments
*/ | Returns the arguments corresponding to the call to <code>Chaincode#init(ChaincodeStub)</code> or <code>Chaincode#invoke(ChaincodeStub)</code> | getArgs | {
"repo_name": "lukehuangch/fabric",
"path": "core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java",
"license": "apache-2.0",
"size": 8834
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,879,611 |
public final Object next()
throws NoSuchElementException {
return nextHeader();
}
| final Object function() throws NoSuchElementException { return nextHeader(); } | /**
* Returns the next header.
* Same as {@link #nextHeader nextHeader}, but not type-safe.
*
* @return the next header in this iteration
*
* @throws NoSuchElementException if there are no more headers
*/ | Returns the next header. Same as <code>#nextHeader nextHeader</code>, but not type-safe | next | {
"repo_name": "onedanshow/Screen-Courter",
"path": "lib/src/org/apache/http/message/BasicHeaderIterator.java",
"license": "gpl-3.0",
"size": 5272
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,748,461 |
private void reMap() throws IOException {
int oldPos = 0;
if (mapped != null) {
oldPos = pos;
unMap();
}
fileLength = file.length();
checkFileSizeLimit(fileLength);
// maps new MappedByteBuffer; the old one is disposed during GC
mapped ... | void function() throws IOException { int oldPos = 0; if (mapped != null) { oldPos = pos; unMap(); } fileLength = file.length(); checkFileSizeLimit(fileLength); mapped = file.getChannel().map(mode, 0, fileLength); int limit = mapped.limit(); int capacity = mapped.capacity(); if (limit < fileLength capacity < fileLength)... | /**
* Re-map byte buffer into memory, called when file size has changed or file
* was created.
*/ | Re-map byte buffer into memory, called when file size has changed or file was created | reMap | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/store/fs/FilePathNioMapped.java",
"license": "apache-2.0",
"size": 7762
} | [
"java.io.IOException",
"org.h2.engine.SysProperties"
] | import java.io.IOException; import org.h2.engine.SysProperties; | import java.io.*; import org.h2.engine.*; | [
"java.io",
"org.h2.engine"
] | java.io; org.h2.engine; | 130,267 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<PollResult<DdosCustomPolicyInner>, DdosCustomPolicyInner> beginCreateOrUpdateAsync(
String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) {
Mono<Response<Flux<ByteBuffer>>> mono =
... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<DdosCustomPolicyInner>, DdosCustomPolicyInner> function( String resourceGroupName, String ddosCustomPolicyName, DdosCustomPolicyInner parameters) { Mono<Response<Flux<ByteBuffer>>> mono = createOrUpdateWithResponseAsync(resourceGroupName,... | /**
* Creates or updates a DDoS custom policy.
*
* @param resourceGroupName The name of the resource group.
* @param ddosCustomPolicyName The name of the DDoS custom policy.
* @param parameters Parameters supplied to the create or update operation.
* @throws IllegalArgumentException thrown... | Creates or updates a DDoS custom policy | beginCreateOrUpdateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java",
"license": "mit",
"size": 48849
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.PollerFlux",
"com.azure.resourcemanager.network.fluent.models.DdosCustomPolicyInner",
"java.nio.ByteBuffer"... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.network.fluent.models.DdosCustomPolicyInner; import ... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.nio"
] | com.azure.core; com.azure.resourcemanager; java.nio; | 393,162 |
public void getPicture(String id, final Label label, Dimension toScale, boolean tempStorage) throws IOException {
checkAuthentication();
FacebookRESTService fb = new FacebookRESTService(token, id, FacebookRESTService.PICTURE, false);
if(toScale != null){
fb.addArgument("width", ... | void function(String id, final Label label, Dimension toScale, boolean tempStorage) throws IOException { checkAuthentication(); FacebookRESTService fb = new FacebookRESTService(token, id, FacebookRESTService.PICTURE, false); if(toScale != null){ fb.addArgument("width", STRheightSTRSTRtypeSTRsmall"); } String cacheKey =... | /**
* Gets the picture of the given facebook object id
*
* @param id the object id to query
* @param label place the image on the given label as an icon
* @param toScale scale the image to the given dimension
* @param tempStorage if true place the image in a temp storage
*/ | Gets the picture of the given facebook object id | getPicture | {
"repo_name": "sannysanoff/CodenameOne",
"path": "CodenameOne/src/com/codename1/facebook/FaceBookAccess.java",
"license": "gpl-2.0",
"size": 55326
} | [
"com.codename1.io.Storage",
"com.codename1.io.services.ImageDownloadService",
"com.codename1.ui.Label",
"com.codename1.ui.geom.Dimension",
"java.io.IOException"
] | import com.codename1.io.Storage; import com.codename1.io.services.ImageDownloadService; import com.codename1.ui.Label; import com.codename1.ui.geom.Dimension; import java.io.IOException; | import com.codename1.io.*; import com.codename1.io.services.*; import com.codename1.ui.*; import com.codename1.ui.geom.*; import java.io.*; | [
"com.codename1.io",
"com.codename1.ui",
"java.io"
] | com.codename1.io; com.codename1.ui; java.io; | 2,813,332 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> patchWithResponseAsync(
String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (vaultName == null) { return Mono.error(new Illega... | /**
* Updates vault storage model type.
*
* @param vaultName The name of the recovery services vault.
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param parameters Vault storage config request.
* @throws IllegalArgumentException... | Updates vault storage model type | patchWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java",
"license": "mit",
"size": 28975
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 865,931 |
private void introspectInject()
{
synchronized (_introspectLock) {
if (_initList != null)
return;
ArrayList<ConfigProgram> initList = new ArrayList<ConfigProgram>();
InjectionTargetBuilder.introspectInit(initList, getAnnotatedType());
// InjectionTargetBuilder.introspectIni... | void function() { synchronized (_introspectLock) { if (_initList != null) return; ArrayList<ConfigProgram> initList = new ArrayList<ConfigProgram>(); InjectionTargetBuilder.introspectInit(initList, getAnnotatedType()); _initList = initList; } } | /**
* Introspect the bean for configuration
*/ | Introspect the bean for configuration | introspectInject | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/config/type/InlineBeanType.java",
"license": "gpl-2.0",
"size": 27572
} | [
"com.caucho.config.inject.InjectionTargetBuilder",
"com.caucho.config.program.ConfigProgram",
"java.util.ArrayList"
] | import com.caucho.config.inject.InjectionTargetBuilder; import com.caucho.config.program.ConfigProgram; import java.util.ArrayList; | import com.caucho.config.inject.*; import com.caucho.config.program.*; import java.util.*; | [
"com.caucho.config",
"java.util"
] | com.caucho.config; java.util; | 525,142 |
private void releaseIrrelevantSearchContext(QuerySearchResult queryResult) {
// we only release search context that we did not fetch from if we are not scrolling
// and if it has at lease one hit that didn't make it to the global topDocs
if (context.getRequest().scroll() == null && queryResu... | void function(QuerySearchResult queryResult) { if (context.getRequest().scroll() == null && queryResult.hasHits()) { try { Transport.Connection connection = context.getConnection(queryResult.getSearchShardTarget().getNodeId()); context.sendReleaseSearchContext(queryResult.getRequestId(), connection); } catch (Exception... | /**
* Releases shard targets that are not used in the docsIdsToLoad.
*/ | Releases shard targets that are not used in the docsIdsToLoad | releaseIrrelevantSearchContext | {
"repo_name": "jprante/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/search/FetchSearchPhase.java",
"license": "apache-2.0",
"size": 11851
} | [
"org.elasticsearch.search.query.QuerySearchResult",
"org.elasticsearch.transport.Transport"
] | import org.elasticsearch.search.query.QuerySearchResult; import org.elasticsearch.transport.Transport; | import org.elasticsearch.search.query.*; import org.elasticsearch.transport.*; | [
"org.elasticsearch.search",
"org.elasticsearch.transport"
] | org.elasticsearch.search; org.elasticsearch.transport; | 1,897,211 |
public ActionMode.Callback getSelectActionModeCallback(
Context context, ActionHandler actionHandler, boolean incognito) {
return new SelectActionModeCallback(context, actionHandler, incognito);
} | ActionMode.Callback function( Context context, ActionHandler actionHandler, boolean incognito) { return new SelectActionModeCallback(context, actionHandler, incognito); } | /**
* Returns an ActionMode.Callback for in-page selection.
*/ | Returns an ActionMode.Callback for in-page selection | getSelectActionModeCallback | {
"repo_name": "qtekfun/htcDesire820Kernel",
"path": "external/chromium_org/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java",
"license": "gpl-2.0",
"size": 6349
} | [
"android.content.Context",
"android.view.ActionMode",
"org.chromium.content.browser.SelectActionModeCallback"
] | import android.content.Context; import android.view.ActionMode; import org.chromium.content.browser.SelectActionModeCallback; | import android.content.*; import android.view.*; import org.chromium.content.browser.*; | [
"android.content",
"android.view",
"org.chromium.content"
] | android.content; android.view; org.chromium.content; | 352,658 |
public File[] getFiles() {
final File[] files = directory.listFiles(filter);
if (files == null) {
return new File[0];
} else {
return files;
}
} | File[] function() { final File[] files = directory.listFiles(filter); if (files == null) { return new File[0]; } else { return files; } } | /**
* Returns a list of all matching files.
*
* @return all files which match the pattern
*/ | Returns a list of all matching files | getFiles | {
"repo_name": "cologneintelligence/FitGoodies",
"path": "fitgoodies-core/src/main/java/de/cologneintelligence/fitgoodies/file/FileSelector.java",
"license": "gpl-3.0",
"size": 3260
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 472,212 |
public void setEventListener(EventListener eventListener) {
this.eventListener = eventListener;
} | void function(EventListener eventListener) { this.eventListener = eventListener; } | /**
* Sets the event listener to be used if events occurs when parsing the document.
*
* @param eventListener an event listener
*/ | Sets the event listener to be used if events occurs when parsing the document | setEventListener | {
"repo_name": "Distrotech/fop",
"path": "test/java/org/apache/fop/fo/FODocumentParser.java",
"license": "apache-2.0",
"size": 5795
} | [
"org.apache.fop.events.EventListener"
] | import org.apache.fop.events.EventListener; | import org.apache.fop.events.*; | [
"org.apache.fop"
] | org.apache.fop; | 424,839 |
Analyzer searchAnalyzer(); | Analyzer searchAnalyzer(); | /**
* The analyzer that will be used to search the field.
*/ | The analyzer that will be used to search the field | searchAnalyzer | {
"repo_name": "speedplane/elasticsearch",
"path": "src/main/java/org/elasticsearch/index/mapper/FieldMapper.java",
"license": "apache-2.0",
"size": 6523
} | [
"org.apache.lucene.analysis.Analyzer"
] | import org.apache.lucene.analysis.Analyzer; | import org.apache.lucene.analysis.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 2,744,182 |
public void setRadioMode(WifiRadioMode radioMode) {
this.m_radioMode = radioMode;
}
| void function(WifiRadioMode radioMode) { this.m_radioMode = radioMode; } | /**
* Set the radio mode
*/ | Set the radio mode | setRadioMode | {
"repo_name": "markcullen/kura_Windows",
"path": "kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/wifi/Hostapd.java",
"license": "epl-1.0",
"size": 31645
} | [
"org.eclipse.kura.net.wifi.WifiRadioMode"
] | import org.eclipse.kura.net.wifi.WifiRadioMode; | import org.eclipse.kura.net.wifi.*; | [
"org.eclipse.kura"
] | org.eclipse.kura; | 1,341,480 |
public void addChannel(ActivationKey key, Channel channel) {
key.addChannel(channel);
} | void function(ActivationKey key, Channel channel) { key.addChannel(channel); } | /**
* Add a channel to an activation key.
* @param key Activation key to be acted upon
* @param channel Channel to add
*/ | Add a channel to an activation key | addChannel | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java",
"license": "gpl-2.0",
"size": 23519
} | [
"com.redhat.rhn.domain.channel.Channel",
"com.redhat.rhn.domain.token.ActivationKey"
] | import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.token.ActivationKey; | import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.token.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 878,414 |
public static String encodeValue(String segment, String[] encoding) {
ArrayList<String> params = new ArrayList<String>();
boolean foundParam = false;
StringBuilder newSegment = new StringBuilder();
if (savePathParams(segment, newSegment, params)) {
foundParam = true;
... | static String function(String segment, String[] encoding) { ArrayList<String> params = new ArrayList<String>(); boolean foundParam = false; StringBuilder newSegment = new StringBuilder(); if (savePathParams(segment, newSegment, params)) { foundParam = true; segment = newSegment.toString(); } String result = encodeFromA... | /**
* Keep encoded values "%..." and template parameters intact i.e. "{x}"
*
* @param segment value to encode
* @param encoding encoding
* @return encoded value
*/ | Keep encoded values "%..." and template parameters intact i.e. "{x}" | encodeValue | {
"repo_name": "quarkusio/quarkus",
"path": "independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/Encode.java",
"license": "apache-2.0",
"size": 17935
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 940,548 |
@Override
@SuppressWarnings("unchecked")
public List<Layout> getJunctionedAncestors(Layout layout, HttpServletRequest req) {
HttpSession session = req.getSession();
long junctionPointPlid = (layout != null) ? layout.getPlid() : GetterUtil.DEFAULT_LONG;
String ancestorsKey = CURRENT_... | @SuppressWarnings(STR) List<Layout> function(Layout layout, HttpServletRequest req) { HttpSession session = req.getSession(); long junctionPointPlid = (layout != null) ? layout.getPlid() : GetterUtil.DEFAULT_LONG; String ancestorsKey = CURRENT_JUNCTIONED_ANCESTORS + junctionPointPlid; List<Layout> ancestors = (List<Lay... | /**
* Lookup all ancestors of a given layout the top level layout under consideration of junction
* points. Please note that the list does not include the layout itself.
*
* @param layout The layout to be shown
* @param req The request
* @return The ancestor layouts under consideration of... | Lookup all ancestors of a given layout the top level layout under consideration of junction points. Please note that the list does not include the layout itself | getJunctionedAncestors | {
"repo_name": "frickeo/liferay-junction-point-hook",
"path": "docroot/WEB-INF/src/de/hansemerkur/liferay/junctionpoint/util/JunctionPointImpl.java",
"license": "lgpl-3.0",
"size": 16859
} | [
"com.liferay.portal.kernel.exception.PortalException",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.GetterUtil",
"com.liferay.portal.model.Layout",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"javax.servlet.http.HttpServlet... | import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.model.Layout; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java... | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; import com.liferay.portal.model.*; import java.util.*; import javax.servlet.http.*; | [
"com.liferay.portal",
"java.util",
"javax.servlet"
] | com.liferay.portal; java.util; javax.servlet; | 2,448,599 |
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
if (createChildMenuManager != null) {
depopulateManager(createChildMenuManager, createChildActions);
}
if (createSiblingMenuManager != null) {
depopulateManager(createSiblingMenuManager, createS... | void function(SelectionChangedEvent event) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createSiblingActions); } Collection<?> newSiblingDescriptors = null; ISelection selection = event.getSelection(); if (selectio... | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
* handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
* that can be added to the selected object and updating the menus accordingly.
* <!-- begin-user-doc -->
* <!-- end-u... | This implements <code>org.eclipse.jface.viewers.ISelectionChangedListener</code>, handling <code>org.eclipse.jface.viewers.SelectionChangedEvent</code>s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly. | selectionChanged | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/productinstance/presentation/ProductinstanceActionBarContributor.java",
"license": "epl-1.0",
"size": 14137
} | [
"java.util.Collection",
"org.eclipse.emf.edit.domain.EditingDomain",
"org.eclipse.emf.edit.domain.IEditingDomainProvider",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.IStructuredSelection",
"org.eclipse.jface.viewers.SelectionChangedEvent"
] | import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; | import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.jface"
] | java.util; org.eclipse.emf; org.eclipse.jface; | 1,369,355 |
@Test
public void testNegativeValueForTaskVmem() {
JobConf configuration = new JobConf();
configuration.set(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY, "-3");
configuration.set(MRJobConfig.MAP_MEMORY_MB, "4");
configuration.set(MRJobConfig.REDUCE_MEMORY_MB, "5");
Assert.assertEquals(4, configurat... | void function() { JobConf configuration = new JobConf(); configuration.set(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY, "-3"); configuration.set(MRJobConfig.MAP_MEMORY_MB, "4"); configuration.set(MRJobConfig.REDUCE_MEMORY_MB, "5"); Assert.assertEquals(4, configuration.getMemoryForMapTask()); Assert.assertEquals(5, configurati... | /**
* Test that negative values for MAPRED_TASK_MAXVMEM_PROPERTY cause
* new configuration keys' values to be used.
*/ | Test that negative values for MAPRED_TASK_MAXVMEM_PROPERTY cause new configuration keys' values to be used | testNegativeValueForTaskVmem | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/conf/TestJobConf.java",
"license": "apache-2.0",
"size": 8059
} | [
"org.apache.hadoop.mapred.JobConf",
"org.apache.hadoop.mapreduce.MRJobConfig",
"org.junit.Assert"
] | import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.MRJobConfig; import org.junit.Assert; | import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,597,753 |
TupleMetadata schema = new SchemaBuilder()
.add("s", MinorType.VARCHAR)
.buildSchema();
ResultSetOptions options = new OptionBuilder()
.setRowCountLimit(ValueVector.MAX_ROW_COUNT)
.setSchema(schema)
.build();
ResultSetLoader rsLoader = new ResultSetLoaderImpl(fixture.allo... | TupleMetadata schema = new SchemaBuilder() .add("s", MinorType.VARCHAR) .buildSchema(); ResultSetOptions options = new OptionBuilder() .setRowCountLimit(ValueVector.MAX_ROW_COUNT) .setSchema(schema) .build(); ResultSetLoader rsLoader = new ResultSetLoaderImpl(fixture.allocator(), options); RowSetLoader rootWriter = rsL... | /**
* Test that the writer detects a vector overflow. The offending column
* value should be moved to the next batch.
*/ | Test that the writer detects a vector overflow. The offending column value should be moved to the next batch | testVectorSizeLimit | {
"repo_name": "sohami/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/rowSet/impl/TestResultSetLoaderOverflow.java",
"license": "apache-2.0",
"size": 23619
} | [
"java.util.Arrays",
"org.apache.drill.common.types.TypeProtos",
"org.apache.drill.exec.physical.rowSet.ResultSetLoader",
"org.apache.drill.exec.physical.rowSet.RowSetLoader",
"org.apache.drill.exec.physical.rowSet.impl.ResultSetLoaderImpl",
"org.apache.drill.exec.record.metadata.TupleMetadata",
"org.apa... | import java.util.Arrays; import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.physical.rowSet.ResultSetLoader; import org.apache.drill.exec.physical.rowSet.RowSetLoader; import org.apache.drill.exec.physical.rowSet.impl.ResultSetLoaderImpl; import org.apache.drill.exec.record.metadata.TupleMeta... | import java.util.*; import org.apache.drill.common.types.*; import org.apache.drill.exec.physical.*; import org.apache.drill.exec.record.metadata.*; import org.apache.drill.exec.vector.*; import org.apache.drill.test.*; import org.junit.*; | [
"java.util",
"org.apache.drill",
"org.junit"
] | java.util; org.apache.drill; org.junit; | 2,319,588 |
public static String createFileNameFromPattern(BibDatabase database, BibEntry entry, String fileNamePattern) {
String targetName = BracketedPattern.expandBrackets(fileNamePattern, ';', entry, database);
if (targetName.isEmpty()) {
targetName = entry.getCitationKey().orElse("default");
... | static String function(BibDatabase database, BibEntry entry, String fileNamePattern) { String targetName = BracketedPattern.expandBrackets(fileNamePattern, ';', entry, database); if (targetName.isEmpty()) { targetName = entry.getCitationKey().orElse(STR); } targetName = FileNameCleaner.cleanFileName(targetName); return... | /**
* Determines filename provided by an entry in a database
*
* @param database the database, where the entry is located
* @param entry the entry to which the file should be linked to
* @param fileNamePattern the filename pattern
* @return a suggested fileName
*/ | Determines filename provided by an entry in a database | createFileNameFromPattern | {
"repo_name": "sauliusg/jabref",
"path": "src/main/java/org/jabref/logic/util/io/FileUtil.java",
"license": "mit",
"size": 13934
} | [
"org.jabref.logic.citationkeypattern.BracketedPattern",
"org.jabref.model.database.BibDatabase",
"org.jabref.model.entry.BibEntry"
] | import org.jabref.logic.citationkeypattern.BracketedPattern; import org.jabref.model.database.BibDatabase; import org.jabref.model.entry.BibEntry; | import org.jabref.logic.citationkeypattern.*; import org.jabref.model.database.*; import org.jabref.model.entry.*; | [
"org.jabref.logic",
"org.jabref.model"
] | org.jabref.logic; org.jabref.model; | 894,035 |
public TStream<JsonObject> receive() {
return receiveText(JsonFunctions.fromString());
} | TStream<JsonObject> function() { return receiveText(JsonFunctions.fromString()); } | /**
* Create a stream of JsonObject tuples from received JSON WebSocket text messages.
* @return the stream
*/ | Create a stream of JsonObject tuples from received JSON WebSocket text messages | receive | {
"repo_name": "dlaboss/incubator-quarks",
"path": "connectors/wsclient-javax.websocket/src/main/java/org/apache/edgent/connectors/wsclient/javax/websocket/Jsr356WebSocketClient.java",
"license": "apache-2.0",
"size": 9853
} | [
"com.google.gson.JsonObject",
"org.apache.edgent.topology.TStream",
"org.apache.edgent.topology.json.JsonFunctions"
] | import com.google.gson.JsonObject; import org.apache.edgent.topology.TStream; import org.apache.edgent.topology.json.JsonFunctions; | import com.google.gson.*; import org.apache.edgent.topology.*; import org.apache.edgent.topology.json.*; | [
"com.google.gson",
"org.apache.edgent"
] | com.google.gson; org.apache.edgent; | 855,945 |
private EffortCertificationDetail getDetailLineWithMaxPayrollAmount(List<EffortCertificationDetail> detailLines) {
KualiDecimal maxAmount = null;
EffortCertificationDetail detailLineWithMaxPayrollAmount = null;
for (EffortCertificationDetail line : detailLines) {
KualiDecim... | EffortCertificationDetail function(List<EffortCertificationDetail> detailLines) { KualiDecimal maxAmount = null; EffortCertificationDetail detailLineWithMaxPayrollAmount = null; for (EffortCertificationDetail line : detailLines) { KualiDecimal currentAmount = line.getEffortCertificationOriginalPayrollAmount(); if (deta... | /**
* find the detail lines that have max payroll amount
*
* @return the detail lines that have max payroll amount
*/ | find the detail lines that have max payroll amount | getDetailLineWithMaxPayrollAmount | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ec/util/DetailLineGroup.java",
"license": "agpl-3.0",
"size": 12867
} | [
"java.util.List",
"org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail",
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import java.util.List; import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail; import org.kuali.rice.core.api.util.type.KualiDecimal; | import java.util.*; import org.kuali.kfs.module.ec.businessobject.*; import org.kuali.rice.core.api.util.type.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 1,139,131 |
private Response putComponent(
final String compId,
final ObjectProperty body) {
String createdType = body.getObjectType();
if (!allComponentTypes.containsKey(createdType)) {
log.warn("Not Creatable Component Type:{}", createdType);
return new Response(Response.BAD_REQUEST,
... | Response function( final String compId, final ObjectProperty body) { String createdType = body.getObjectType(); if (!allComponentTypes.containsKey(createdType)) { log.warn(STR, createdType); return new Response(Response.BAD_REQUEST, STR); } if (allComponentTypes.get(createdType).isEmpty()) { log.warn(STR, createdType);... | /**
* Method for creating a component.
*
* @param compId
* ComponentID to be deleted.
* @param body
* RequestObject. Body should be component's objectProperty.
* @return res ResponseObject. Body should be component's objectProperty.
*/ | Method for creating a component | putComponent | {
"repo_name": "y-higuchi/odenos",
"path": "src/main/java/org/o3project/odenos/core/manager/system/SystemManager.java",
"license": "apache-2.0",
"size": 51475
} | [
"java.util.ArrayList",
"org.o3project.odenos.remoteobject.ObjectProperty",
"org.o3project.odenos.remoteobject.event.ObjectPropertyChanged",
"org.o3project.odenos.remoteobject.message.Request",
"org.o3project.odenos.remoteobject.message.Response"
] | import java.util.ArrayList; import org.o3project.odenos.remoteobject.ObjectProperty; import org.o3project.odenos.remoteobject.event.ObjectPropertyChanged; import org.o3project.odenos.remoteobject.message.Request; import org.o3project.odenos.remoteobject.message.Response; | import java.util.*; import org.o3project.odenos.remoteobject.*; import org.o3project.odenos.remoteobject.event.*; import org.o3project.odenos.remoteobject.message.*; | [
"java.util",
"org.o3project.odenos"
] | java.util; org.o3project.odenos; | 2,808,141 |
public static ims.emergency.vo.TrackingForBedAvailabilityVo insert(DomainObjectMap map, ims.emergency.vo.TrackingForBedAvailabilityVo valueObject, ims.emergency.domain.objects.Tracking domainObject)
{
if (null == domainObject)
{
return valueObject;
}
if (null == map)
{
map = new Dom... | static ims.emergency.vo.TrackingForBedAvailabilityVo function(DomainObjectMap map, ims.emergency.vo.TrackingForBedAvailabilityVo valueObject, ims.emergency.domain.objects.Tracking domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_Tracki... | /**
* Update the ValueObject with the Domain Object.
* @param map DomainObjectMap of DomainObjects to already created ValueObjects.
* @param valueObject to be updated
* @param domainObject ims.emergency.domain.objects.Tracking
*/ | Update the ValueObject with the Domain Object | insert | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/TrackingForBedAvailabilityVoAssembler.java",
"license": "agpl-3.0",
"size": 21354
} | [
"org.hibernate.proxy.HibernateProxy"
] | import org.hibernate.proxy.HibernateProxy; | import org.hibernate.proxy.*; | [
"org.hibernate.proxy"
] | org.hibernate.proxy; | 2,684,967 |
private void createShowAsTabButton()
{
if(showAsTabButton == null)
{
// add button for undocking the tabbed pane
showAsTabButton = new JButton(SHOW_AS_TAB);
showAsTabButton.setToolTipText(SHOW_AS_TAB_TIP);
showAsTabButton.setFont(fonts.getBoldSmallerFont());
// the action command has to... | void function() { if(showAsTabButton == null) { showAsTabButton = new JButton(SHOW_AS_TAB); showAsTabButton.setToolTipText(SHOW_AS_TAB_TIP); showAsTabButton.setFont(fonts.getBoldSmallerFont()); showAsTabButton.setActionCommand(SHOW_AS_TAB + getDisplayName()); } } | /**
* Creates a "show as tab" button.
*/ | Creates a "show as tab" button | createShowAsTabButton | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "cellularAutomata/analysis/Analysis.java",
"license": "apache-2.0",
"size": 47476
} | [
"javax.swing.JButton"
] | import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,264,813 |
UserDetails getUserDetails(KualiTicketResponse response)
throws AuthenticationException;
| UserDetails getUserDetails(KualiTicketResponse response) throws AuthenticationException; | /**
* Obtains the granted authorities for the specified user.<P>May throw any
* <code>AuthenticationException</code> or return <code>null</code> if the authorities are unavailable.</p>
*
* @param casUserId as obtained from the CAS validation service
*
* @return the details of the indicated... | Obtains the granted authorities for the specified user.May throw any <code>AuthenticationException</code> or return <code>null</code> if the authorities are unavailable | getUserDetails | {
"repo_name": "bhutchinson/rice",
"path": "rice-middleware/client-contrib/src/main/java/org/kuali/rice/kim/client/acegi/KualiCasAuthoritiesPopulator.java",
"license": "apache-2.0",
"size": 2164
} | [
"org.acegisecurity.AuthenticationException",
"org.acegisecurity.userdetails.UserDetails"
] | import org.acegisecurity.AuthenticationException; import org.acegisecurity.userdetails.UserDetails; | import org.acegisecurity.*; import org.acegisecurity.userdetails.*; | [
"org.acegisecurity",
"org.acegisecurity.userdetails"
] | org.acegisecurity; org.acegisecurity.userdetails; | 2,365,986 |
private void _resetNewCount() {
try {
mNewCount = _walkingCount(Sched.class.getDeclaredMethod("_deckNewLimitSingle", JSONObject.class),
Sched.class.getDeclaredMethod("_cntFnNew", long.class, int.class));
} catch (NoSuchMethodException e) {
throw new Runtim... | void function() { try { mNewCount = _walkingCount(Sched.class.getDeclaredMethod(STR, JSONObject.class), Sched.class.getDeclaredMethod(STR, long.class, int.class)); } catch (NoSuchMethodException e) { throw new RuntimeException(e); } } | /**
* New cards **************************************************************** *******************************
*/ | New cards **************************************************************** | _resetNewCount | {
"repo_name": "vstabile/chinese-flashcards-android",
"path": "src/com/hichinaschool/flashcards/libanki/Sched.java",
"license": "gpl-3.0",
"size": 91733
} | [
"org.json.JSONObject"
] | import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,881,061 |
@Test
public void testChecksums() throws Exception {
File tmpDir = ClientBase.createTmpDir();
ClientBase.setupTestEnv();
ZooKeeperServer zks = new ZooKeeperServer(tmpDir, tmpDir, 3000);
SyncRequestProcessor.setSnapCount(150);
final int PORT = Integer.parseInt(HOSTPORT.spl... | void function() throws Exception { File tmpDir = ClientBase.createTmpDir(); ClientBase.setupTestEnv(); ZooKeeperServer zks = new ZooKeeperServer(tmpDir, tmpDir, 3000); SyncRequestProcessor.setSnapCount(150); final int PORT = Integer.parseInt(HOSTPORT.split(":")[1]); ServerCnxnFactory f = ServerCnxnFactory.createFactory... | /** test checksums for the logs and snapshots.
* the reader should fail on reading
* a corrupt snapshot and a corrupt log
* file
* @throws Exception
*/ | test checksums for the logs and snapshots. the reader should fail on reading a corrupt snapshot and a corrupt log file | testChecksums | {
"repo_name": "qorio/maestro",
"path": "zookeeper/src/java/test/org/apache/zookeeper/server/CRCTest.java",
"license": "apache-2.0",
"size": 6999
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"org.apache.zookeeper.CreateMode",
"org.apache.zookeeper.ZooDefs",
"org.apache.zookeeper.ZooKeeper",
"org.apache.zookeeper.server.persistence.FileSnap",
"org.apache.zookeeper.server.persistence.FileTxnLog",
"org.apache.zookeeper.server.persist... | import java.io.File; import java.io.IOException; import java.util.List; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.server.persistence.FileSnap; import org.apache.zookeeper.server.persistence.FileTxnLog; import org.apach... | import java.io.*; import java.util.*; import org.apache.zookeeper.*; import org.apache.zookeeper.server.persistence.*; import org.apache.zookeeper.test.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.zookeeper",
"org.junit"
] | java.io; java.util; org.apache.zookeeper; org.junit; | 674,905 |
private Map<String, Long> getOriginalJobCPUMetrics(ZombieJob zombieJob) {
long mapTotalCPUUsage = 0;
long reduceTotalCPUUsage = 0;
Map<String,Long> resourceMetrics = new HashMap<String,Long>();
for (int index = 0; index < zombieJob.getNumberMaps(); index++) {
TaskInfo mapTask = zombieJob.getTas... | Map<String, Long> function(ZombieJob zombieJob) { long mapTotalCPUUsage = 0; long reduceTotalCPUUsage = 0; Map<String,Long> resourceMetrics = new HashMap<String,Long>(); for (int index = 0; index < zombieJob.getNumberMaps(); index++) { TaskInfo mapTask = zombieJob.getTaskInfo(TaskType.MAP, index); if (mapTask.getResour... | /**
* Get the original job cpu metrics.
* @param zombieJob - original job history.
* @return - cpu metrics as map.
*/ | Get the original job cpu metrics | getOriginalJobCPUMetrics | {
"repo_name": "gndpig/hadoop",
"path": "src/contrib/gridmix/src/test/system/org/apache/hadoop/mapred/gridmix/test/system/GridmixJobVerification.java",
"license": "apache-2.0",
"size": 54566
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.hadoop.mapreduce.TaskType",
"org.apache.hadoop.tools.rumen.TaskInfo",
"org.apache.hadoop.tools.rumen.ZombieJob"
] | import java.util.HashMap; import java.util.Map; import org.apache.hadoop.mapreduce.TaskType; import org.apache.hadoop.tools.rumen.TaskInfo; import org.apache.hadoop.tools.rumen.ZombieJob; | import java.util.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.tools.rumen.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 493,490 |
public PrivateKeyInfo create(final RSAPrivateCrtKeyParameters keyParameters)
throws IOException; | PrivateKeyInfo function(final RSAPrivateCrtKeyParameters keyParameters) throws IOException; | /**
* Create a Bouncy Castle private key information instance.
*
* @param keyParameters The Bouncy Castle private key parameters.
*
* @return The Bouncy Castle private key information.
* @throws IOException If the key cannot be converted.
*/ | Create a Bouncy Castle private key information instance | create | {
"repo_name": "eloquent/lockbox-java",
"path": "src/main/java/co/lqnt/lockbox/util/PrivateKeyInformationFactoryInterface.java",
"license": "mit",
"size": 934
} | [
"java.io.IOException",
"org.bouncycastle.asn1.pkcs.PrivateKeyInfo",
"org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters"
] | import java.io.IOException; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters; | import java.io.*; import org.bouncycastle.asn1.pkcs.*; import org.bouncycastle.crypto.params.*; | [
"java.io",
"org.bouncycastle.asn1",
"org.bouncycastle.crypto"
] | java.io; org.bouncycastle.asn1; org.bouncycastle.crypto; | 2,674,936 |
@Test
public void testMaxDollar() {
log.info("testMaxDollar");
final Currency usd = Currency.getInstance(Locale.US);
log.info("\tusd.getSymbol = {}", usd.getSymbol());
log.info("\tusd.getDisplayName = {}", usd.getDisplayName());
log.info("\tusd.getCurrencyCode = {}"... | void function() { log.info(STR); final Currency usd = Currency.getInstance(Locale.US); log.info(STR, usd.getSymbol()); log.info(STR, usd.getDisplayName()); log.info(STR, usd.getCurrencyCode()); assumeTrue(usd.getSymbol().equals("$")); final MoneyInterface money = new Money(usd, Long.MAX_VALUE); assertNotNull(money); lo... | /**
* Unit Test to max dollar.
*/ | Unit Test to max dollar | testMaxDollar | {
"repo_name": "Martin-Spamer/java-coaching",
"path": "src/test/java/coaching/money/MoneyTest.java",
"license": "gpl-3.0",
"size": 5177
} | [
"java.util.Currency",
"java.util.Locale",
"org.junit.Assert",
"org.junit.Assume"
] | import java.util.Currency; import java.util.Locale; import org.junit.Assert; import org.junit.Assume; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,003,607 |
@XmlElement(name = "ImageDatum")
public DefaultImageDatum getElement() {
return DefaultImageDatum.castOrCopy(metadata);
} | @XmlElement(name = STR) DefaultImageDatum function() { return DefaultImageDatum.castOrCopy(metadata); } | /**
* Invoked by JAXB at marshalling time for getting the actual element to write
* inside the {@code <gml:ImageDatum>} XML element.
* This is the value or a copy of the value given in argument to the {@code wrap} method.
*
* @return the element to be marshalled.
*/ | Invoked by JAXB at marshalling time for getting the actual element to write inside the XML element. This is the value or a copy of the value given in argument to the wrap method | getElement | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ImageDatum.java",
"license": "apache-2.0",
"size": 3127
} | [
"javax.xml.bind.annotation.XmlElement",
"org.apache.sis.referencing.datum.DefaultImageDatum"
] | import javax.xml.bind.annotation.XmlElement; import org.apache.sis.referencing.datum.DefaultImageDatum; | import javax.xml.bind.annotation.*; import org.apache.sis.referencing.datum.*; | [
"javax.xml",
"org.apache.sis"
] | javax.xml; org.apache.sis; | 339,034 |
protected void setUp() {
objArray = new Object[1000];
for (int i = 0; i < objArray.length; i++)
objArray[i] = new Integer(i);
hs = new LinkedHashSet();
for (int i = 0; i < objArray.length; i++)
hs.add(objArray[i]);
hs.add(null);
} | void function() { objArray = new Object[1000]; for (int i = 0; i < objArray.length; i++) objArray[i] = new Integer(i); hs = new LinkedHashSet(); for (int i = 0; i < objArray.length; i++) hs.add(objArray[i]); hs.add(null); } | /**
* Sets up the fixture, for example, open a network connection. This method
* is called before a test is executed.
*/ | Sets up the fixture, for example, open a network connection. This method is called before a test is executed | setUp | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/LinkedHashSetTest.java",
"license": "gpl-2.0",
"size": 12392
} | [
"java.util.LinkedHashSet"
] | import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,149,562 |
public B channel(Class<? extends C> channelClass) {
return channelFactory(new ReflectiveChannelFactory<C>(
ObjectUtil.checkNotNull(channelClass, "channelClass")
));
} | B function(Class<? extends C> channelClass) { return channelFactory(new ReflectiveChannelFactory<C>( ObjectUtil.checkNotNull(channelClass, STR) )); } | /**
* The {@link Class} which is used to create {@link Channel} instances from.
* You either use this or {@link #channelFactory(io.netty.channel.ChannelFactory)} if your
* {@link Channel} implementation has no no-args constructor.
*/ | The <code>Class</code> which is used to create <code>Channel</code> instances from. You either use this or <code>#channelFactory(io.netty.channel.ChannelFactory)</code> if your <code>Channel</code> implementation has no no-args constructor | channel | {
"repo_name": "fenik17/netty",
"path": "transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java",
"license": "apache-2.0",
"size": 18103
} | [
"io.netty.channel.ReflectiveChannelFactory",
"io.netty.util.internal.ObjectUtil"
] | import io.netty.channel.ReflectiveChannelFactory; import io.netty.util.internal.ObjectUtil; | import io.netty.channel.*; import io.netty.util.internal.*; | [
"io.netty.channel",
"io.netty.util"
] | io.netty.channel; io.netty.util; | 1,685,098 |
public static String getStringOrDefault(String key, String dflt)
{
try{
return key != null ? getResourceBundle().getString(key) : dflt;
}catch(MissingResourceException mre){
return dflt;
}
} | static String function(String key, String dflt) { try{ return key != null ? getResourceBundle().getString(key) : dflt; }catch(MissingResourceException mre){ return dflt; } } | /**
* Gets the value for the supplied resource key.
*
* @param key The key.
* @param dflt The value to return if no value found for the specified
* key.
* @return The value or the supplied default.
*/ | Gets the value for the supplied resource key | getStringOrDefault | {
"repo_name": "ervandew/formic",
"path": "src/java/org/formic/Installer.java",
"license": "lgpl-2.1",
"size": 11812
} | [
"java.util.MissingResourceException"
] | import java.util.MissingResourceException; | import java.util.*; | [
"java.util"
] | java.util; | 763,933 |
public void setLockFactory(LockFactory lockFactory) throws IOException {
assert lockFactory != null;
this.lockFactory = lockFactory;
lockFactory.setLockPrefix(this.getLockID());
} | void function(LockFactory lockFactory) throws IOException { assert lockFactory != null; this.lockFactory = lockFactory; lockFactory.setLockPrefix(this.getLockID()); } | /**
* Set the LockFactory that this Directory instance should
* use for its locking implementation. Each * instance of
* LockFactory should only be used for one directory (ie,
* do not share a single instance across multiple
* Directories).
*
* @param lockFactory instance of {@link LockFactory}.
... | Set the LockFactory that this Directory instance should use for its locking implementation. Each * instance of LockFactory should only be used for one directory (ie, do not share a single instance across multiple Directories) | setLockFactory | {
"repo_name": "terrancesnyder/solr-analytics",
"path": "lucene/core/src/java/org/apache/lucene/store/Directory.java",
"license": "apache-2.0",
"size": 12001
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,870,116 |
public static java.util.List extractTriageList(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.TriageForClinicianWorklistVoCollection voCollection)
{
return extractTriageList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.TriageForClinicianWorklistVoCollection voCollection) { return extractTriageList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.emergency.domain.objects.Triage list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.emergency.domain.objects.Triage list from the value object collection | extractTriageList | {
"repo_name": "IMS-MAXIMS/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/TriageForClinicianWorklistVoAssembler.java",
"license": "agpl-3.0",
"size": 32668
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,293,643 |
NullHeader nh = new NullHeader();
for (JPacket packet : TestUtils.getIterable(FILE)) {
TestCase.assertTrue("NullHeader by ID missing",
packet.hasHeader(JProtocol.NULL_HEADER_ID));
TestCase.assertTrue("NullHeader by object missing",
packet.hasHeader(nh));
System.out.println(packet);
System... | NullHeader nh = new NullHeader(); for (JPacket packet : TestUtils.getIterable(FILE)) { TestCase.assertTrue(STR, packet.hasHeader(JProtocol.NULL_HEADER_ID)); TestCase.assertTrue(STR, packet.hasHeader(nh)); System.out.println(packet); System.out.println(packet.getState().toDebugString()); } } | /**
* Test proper NullHeader presence. NullHeader is a header with ID > 32,
* which needs to be verified that is properly bit encoded in bit-mask.
*/ | Test proper NullHeader presence. NullHeader is a header with ID > 32, which needs to be verified that is properly bit encoded in bit-mask | testNullHeader | {
"repo_name": "pvenne/jgoose",
"path": "libs/JNetPcap_1_4/tests/java1.5/org/jnetpcap/protocol/TestNullHeader.java",
"license": "gpl-3.0",
"size": 1086
} | [
"junit.framework.TestCase",
"org.jnetpcap.packet.JPacket",
"org.jnetpcap.packet.TestUtils",
"org.jnetpcap.protocol.lan.NullHeader"
] | import junit.framework.TestCase; import org.jnetpcap.packet.JPacket; import org.jnetpcap.packet.TestUtils; import org.jnetpcap.protocol.lan.NullHeader; | import junit.framework.*; import org.jnetpcap.packet.*; import org.jnetpcap.protocol.lan.*; | [
"junit.framework",
"org.jnetpcap.packet",
"org.jnetpcap.protocol"
] | junit.framework; org.jnetpcap.packet; org.jnetpcap.protocol; | 1,157,527 |
public JMXServerInfo readJMX(InputStream in) throws ConversionException, IOException {
JSONObject json = parseObject(in);
JMXServerInfo ret = new JMXServerInfo();
ret.version = readIntInternal(json.get(N_VERSION));
ret.mbeansURL = readStringInternal(json.get(N_MBEANS));
ret.c... | JMXServerInfo function(InputStream in) throws ConversionException, IOException { JSONObject json = parseObject(in); JMXServerInfo ret = new JMXServerInfo(); ret.version = readIntInternal(json.get(N_VERSION)); ret.mbeansURL = readStringInternal(json.get(N_MBEANS)); ret.createMBeanURL = readStringInternal(json.get(N_CREA... | /**
* Decode a JSON document to retrieve a JMX instance.
*
* @param in The stream to read JSON from
* @return The decoded JMX instance
* @throws ConversionException If JSON uses unexpected structure/format
* @throws IOException If an I/O error occurs or if JSON is ill-formed.
* @see #... | Decode a JSON document to retrieve a JMX instance | readJMX | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java",
"license": "epl-1.0",
"size": 184410
} | [
"com.ibm.json.java.JSONObject",
"com.ibm.ws.jmx.connector.datatypes.ConversionException",
"com.ibm.ws.jmx.connector.datatypes.JMXServerInfo",
"com.ibm.ws.jmx.connector.datatypes.ObjectInstanceWrapper",
"java.io.IOException",
"java.io.InputStream",
"javax.management.ObjectName"
] | import com.ibm.json.java.JSONObject; import com.ibm.ws.jmx.connector.datatypes.ConversionException; import com.ibm.ws.jmx.connector.datatypes.JMXServerInfo; import com.ibm.ws.jmx.connector.datatypes.ObjectInstanceWrapper; import java.io.IOException; import java.io.InputStream; import javax.management.ObjectName; | import com.ibm.json.java.*; import com.ibm.ws.jmx.connector.datatypes.*; import java.io.*; import javax.management.*; | [
"com.ibm.json",
"com.ibm.ws",
"java.io",
"javax.management"
] | com.ibm.json; com.ibm.ws; java.io; javax.management; | 2,671,625 |
public static <N extends Node> Condition<N> getMultiNodesCondition(N node) {
return new MultiNodes<N>(node);
}
//TODO optimize deep structure, flattening may increase performance
| static <N extends Node> Condition<N> function(N node) { return new MultiNodes<N>(node); } | /**
* Returns a Condition<Node> which is fulfilled if a node is
* equal to 'node'
*/ | Returns a Condition which is fulfilled if a node is equal to 'node' | getMultiNodesCondition | {
"repo_name": "nkluge/desij",
"path": "src/main/java/net/strongdesign/stg/traversal/ConditionFactory.java",
"license": "gpl-3.0",
"size": 59895
} | [
"net.strongdesign.stg.Node"
] | import net.strongdesign.stg.Node; | import net.strongdesign.stg.*; | [
"net.strongdesign.stg"
] | net.strongdesign.stg; | 1,053,593 |
private String getSenderIds(Set<Object> A) {
Iterator<Object> it = A.iterator();
String res = EMPTY;
do {
String current = (String) it.next();
res = res.concat(current);
if (it.hasNext()) {
res = res.concat("_");
}
} while (it.hasNext());
return res;
}
| String function(Set<Object> A) { Iterator<Object> it = A.iterator(); String res = EMPTY; do { String current = (String) it.next(); res = res.concat(current); if (it.hasNext()) { res = res.concat("_"); } } while (it.hasNext()); return res; } | /**
* Generate a string of senders for the given set A
*
* @param {Set} The A set
* @return {String} The string of all senders connected with "_"
*/ | Generate a string of senders for the given set A | getSenderIds | {
"repo_name": "grasscrm/gdesigner",
"path": "editor/server/src/org/oryxeditor/bpel4chor/BPEL4Chor2BPELGroundingAnalyze.java",
"license": "apache-2.0",
"size": 35448
} | [
"java.util.Iterator",
"java.util.Set"
] | import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,196,526 |
public static void badConversion(Field destinationField, Class<?> destinationClass, Field sourceField, Class<?> sourceClass,String plus){
throw new UndefinedMappingException(MSG.INSTANCE.message(undefinedMappingException,destinationField.getName(),destinationClass.getSimpleName(),sourceField.getName(),sourceClass... | static void function(Field destinationField, Class<?> destinationClass, Field sourceField, Class<?> sourceClass,String plus){ throw new UndefinedMappingException(MSG.INSTANCE.message(undefinedMappingException,destinationField.getName(),destinationClass.getSimpleName(),sourceField.getName(),sourceClass.getSimpleName()) ... | /**
* Thrown when conversions are badly written.
* @param destinationField destination field
* @param destinationClass destination class
* @param sourceField source field
* @param sourceClass source class
* @param plus added messages of internal exceptions thrown
*/ | Thrown when conversions are badly written | badConversion | {
"repo_name": "jmapper-framework/jmapper-core",
"path": "JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java",
"license": "apache-2.0",
"size": 30461
} | [
"com.googlecode.jmapper.exceptions.UndefinedMappingException",
"java.lang.reflect.Field"
] | import com.googlecode.jmapper.exceptions.UndefinedMappingException; import java.lang.reflect.Field; | import com.googlecode.jmapper.exceptions.*; import java.lang.reflect.*; | [
"com.googlecode.jmapper",
"java.lang"
] | com.googlecode.jmapper; java.lang; | 2,541,151 |
@RequestMapping (method = RequestMethod.GET)
public String listBronhouders (final Model model) {
final List<Bronhouder> bronhouders = managerDao.getAllBronhouders ();
model.addAttribute ("bronhouders", bronhouders);
return "/ba/gebruikersbeheer/bronhouders";
} | @RequestMapping (method = RequestMethod.GET) String function (final Model model) { final List<Bronhouder> bronhouders = managerDao.getAllBronhouders (); model.addAttribute (STR, bronhouders); return STR; } | /**
* Index page: lists bronhouders.
*/ | Index page: lists bronhouders | listBronhouders | {
"repo_name": "CDS-INSPIRE/InSpider",
"path": "admin/src/main/java/nl/ipo/cds/admin/ba/controller/gebruikersbeheer/BronhouderController.java",
"license": "gpl-3.0",
"size": 8479
} | [
"java.util.List",
"nl.ipo.cds.domain.Bronhouder",
"org.springframework.ui.Model",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import java.util.List; import nl.ipo.cds.domain.Bronhouder; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import java.util.*; import nl.ipo.cds.domain.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"nl.ipo.cds",
"org.springframework.ui",
"org.springframework.web"
] | java.util; nl.ipo.cds; org.springframework.ui; org.springframework.web; | 2,092,496 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
mNavConf = getNavDrawerConfiguration();
setContentView(mNavConf.getMainLayout());
mDrawerLayout = (Drawer... | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS); mNavConf = getNavDrawerConfiguration(); setContentView(mNavConf.getMainLayout()); mDrawerLayout = (DrawerLayout) findViewById(mNavConf.getDrawerLayoutId()); mDrawerList = (Li... | /**
* Called when the activity is first created.
*/ | Called when the activity is first created | onCreate | {
"repo_name": "tobykurien/Android-IMSI-Catcher-Detector",
"path": "app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java",
"license": "gpl-3.0",
"size": 28760
} | [
"android.os.Bundle",
"android.support.v4.app.ActionBarDrawerToggle",
"android.support.v4.widget.DrawerLayout",
"android.view.Window",
"android.widget.ListView"
] | import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout; import android.view.Window; import android.widget.ListView; | import android.os.*; import android.support.v4.app.*; import android.support.v4.widget.*; import android.view.*; import android.widget.*; | [
"android.os",
"android.support",
"android.view",
"android.widget"
] | android.os; android.support; android.view; android.widget; | 1,645,285 |
private static final Logger LOG = Logger.getLogger(ShrinkWrapArchiveUtil.class.getName());
public static JavaArchive[] getArchives(ClassLoader classLoader,
String markerFile,
String[] includeIfPackageExists,
... | static final Logger LOG = Logger.getLogger(ShrinkWrapArchiveUtil.class.getName()); public static JavaArchive[] function(ClassLoader classLoader, String markerFile, String[] includeIfPackageExists, String[] excludeIfPackageExists) { if (classLoader == null) { classLoader = ShrinkWrapArchiveUtil.class.getClassLoader(); }... | /**
* Resolve all markerFiles from the current ClassPath and package the root nodes
* into a JavaArchive.
* @param classLoader to use
* @param markerFile
* @param includeIfPackageExists if not null, we will only create JavaArchives if the given package exists
* @param excludeIfPackageExist... | Resolve all markerFiles from the current ClassPath and package the root nodes into a JavaArchive | getArchives | {
"repo_name": "kenfinnigan/DeltaSpike",
"path": "deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/temptestutil/ShrinkWrapArchiveUtil.java",
"license": "apache-2.0",
"size": 10308
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List",
"java.util.logging.Logger",
"org.jboss.shrinkwrap.api.spec.JavaArchive"
] | import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.logging.Logger; import org.jboss.shrinkwrap.api.spec.JavaArchive; | import java.io.*; import java.util.*; import java.util.logging.*; import org.jboss.shrinkwrap.api.spec.*; | [
"java.io",
"java.util",
"org.jboss.shrinkwrap"
] | java.io; java.util; org.jboss.shrinkwrap; | 2,638,357 |
EClass getFolderEntry();
| EClass getFolderEntry(); | /**
* Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FolderEntry <em>Folder Entry</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Folder Entry</em>'.
* @see hu.bme.mit.inf.dslreasoner.applic... | Returns the meta object for class '<code>hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FolderEntry Folder Entry</code>'. | getFolderEntry | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/ApplicationConfigurationPackage.java",
"license": "epl-1.0",
"size": 236178
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,261,681 |
protected Options initOptions() {
// Create Options.
Options options = new Options();
// The robot has only "help" option.
@SuppressWarnings("static-access")
Option help = OptionBuilder.withDescription("Displays help for the command.").create("help");
options.addOption(help);
return option... | Options function() { Options options = new Options(); @SuppressWarnings(STR) Option help = OptionBuilder.withDescription(STR).create("help"); options.addOption(help); return options; } | /**
* Initializes basic options. Override if more options needed.
*
* @return the command options.
*/ | Initializes basic options. Override if more options needed | initOptions | {
"repo_name": "somehume/wavefu",
"path": "src/org/waveprotocol/box/server/robots/agent/AbstractCliRobotAgent.java",
"license": "apache-2.0",
"size": 9329
} | [
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.Options"
] | import org.apache.commons.cli.Option; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,751,202 |
public Observable<ServiceResponse<Void>> beginCancelWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (vmScaleSetName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentExceptio... | /**
* Cancels the current virtual machine scale set rolling upgrade.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceRe... | Cancels the current virtual machine scale set rolling upgrade | beginCancelWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/implementation/VirtualMachineScaleSetRollingUpgradesInner.java",
"license": "mit",
"size": 38289
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 391,498 |
public void invalidate()
{
synchronized (lock)
{
if (!valid)
return;
}
if (destination instanceof MessageDestination)
{
MessageDestination msgDestination = (MessageDestination)destination;
for (Iterator it = ... | void function() { synchronized (lock) { if (!valid) return; } if (destination instanceof MessageDestination) { MessageDestination msgDestination = (MessageDestination)destination; for (Iterator it = subscriptions.iterator(); it.hasNext(); ) { SubscriptionInfo si = (SubscriptionInfo)it.next(); msgDestination.getRemoteSu... | /**
* Invalidates the RemoteMessageClient.
*/ | Invalidates the RemoteMessageClient | invalidate | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/blazeds/src/flex/messaging/services/messaging/RemoteMessageClient.java",
"license": "apache-2.0",
"size": 2289
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,697,682 |
public static void checkPropertyName(String name) throws CmsIllegalArgumentException {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
throw new CmsIllegalArgumentException(
Messages.get().container(Messages.ERR_BAD_PROPERTYNAME_EMPTY_0, name));
}
CmsStringUt... | static void function(String name) throws CmsIllegalArgumentException { if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_BAD_PROPERTYNAME_EMPTY_0, name)); } CmsStringUtil.checkName(name, NAME_CONSTRAINTS, Messages.ERR_BAD_PROPERTYNAME_4, Mess... | /**
* Checks if the provided property name is a valid property name,
* that is contains only valid characters.<p>
*
* A property name can only be composed of digits,
* standard ASCII letters and the symbols defined in {@link #NAME_CONSTRAINTS}.<p>
*
* @param name the property name to ... | Checks if the provided property name is a valid property name, that is contains only valid characters. A property name can only be composed of digits, standard ASCII letters and the symbols defined in <code>#NAME_CONSTRAINTS</code> | checkPropertyName | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/file/CmsPropertyDefinition.java",
"license": "lgpl-2.1",
"size": 14894
} | [
"org.opencms.main.CmsIllegalArgumentException",
"org.opencms.util.CmsStringUtil"
] | import org.opencms.main.CmsIllegalArgumentException; import org.opencms.util.CmsStringUtil; | import org.opencms.main.*; import org.opencms.util.*; | [
"org.opencms.main",
"org.opencms.util"
] | org.opencms.main; org.opencms.util; | 2,599,341 |
@Beta
public static void write(byte[] from, File to) throws IOException {
asByteSink(to).write(from);
} | static void function(byte[] from, File to) throws IOException { asByteSink(to).write(from); } | /**
* Overwrites a file with the contents of a byte array.
*
* <p><b>{@link java.nio.file.Path} equivalent:</b> {@link
* java.nio.file.Files#write(java.nio.file.Path, byte[], java.nio.file.OpenOption...)}.
*
* @param from the bytes to write
* @param to the destination file
* @throws IOException ... | Overwrites a file with the contents of a byte array. <code>java.nio.file.Path</code> equivalent: <code>java.nio.file.Files#write(java.nio.file.Path, byte[], java.nio.file.OpenOption...)</code> | write | {
"repo_name": "EdwardLee03/guava",
"path": "guava/src/com/google/common/io/Files.java",
"license": "apache-2.0",
"size": 33222
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 653,321 |
public static <T, R> List<R> map(Iterable<T> data, Function<T, R> function) {
List<R> list = new ArrayList<>();
if (!Utils.isEmpty(data)) {
for (T item : data) {
list.add(function.apply(item));
}
}
return list;
} | static <T, R> List<R> function(Iterable<T> data, Function<T, R> function) { List<R> list = new ArrayList<>(); if (!Utils.isEmpty(data)) { for (T item : data) { list.add(function.apply(item)); } } return list; } | /**
* Map function
*/ | Map function | map | {
"repo_name": "TrueNight/Utils",
"path": "utils/src/main/java/xyz/truenight/utils/Utils.java",
"license": "apache-2.0",
"size": 55666
} | [
"java.util.ArrayList",
"java.util.List",
"xyz.truenight.utils.interfaces.Function"
] | import java.util.ArrayList; import java.util.List; import xyz.truenight.utils.interfaces.Function; | import java.util.*; import xyz.truenight.utils.interfaces.*; | [
"java.util",
"xyz.truenight.utils"
] | java.util; xyz.truenight.utils; | 246,349 |
public void setSelectable(boolean selectable) {
if (!SharedUtil.equals(this.selectable, selectable)) {
this.selectable = selectable;
markAsDirty();
}
} | void function(boolean selectable) { if (!SharedUtil.equals(this.selectable, selectable)) { this.selectable = selectable; markAsDirty(); } } | /**
* Setter for property selectable.
*
* <p>
* The table is not selectable until it's explicitly set as selectable via
* this method or alternatively at least one {@link ValueChangeListener} is
* added.
* </p>
*
* @param selectable
* the New value of prope... | Setter for property selectable. The table is not selectable until it's explicitly set as selectable via this method or alternatively at least one <code>ValueChangeListener</code> is added. | setSelectable | {
"repo_name": "oalles/vaadin",
"path": "server/src/com/vaadin/ui/Table.java",
"license": "apache-2.0",
"size": 221060
} | [
"com.vaadin.shared.util.SharedUtil"
] | import com.vaadin.shared.util.SharedUtil; | import com.vaadin.shared.util.*; | [
"com.vaadin.shared"
] | com.vaadin.shared; | 1,659,423 |
public Long getJvmMemoryHeapInitSize() throws SnmpStatusException {
final long val = getHeapMemoryUsage().getInit();
if (val > -1) return new Long(val);
else return Long0;
} | Long function() throws SnmpStatusException { final long val = getHeapMemoryUsage().getInit(); if (val > -1) return new Long(val); else return Long0; } | /**
* Getter for the "JvmMemoryHeapInitSize" variable.
*/ | Getter for the "JvmMemoryHeapInitSize" variable | getJvmMemoryHeapInitSize | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java",
"license": "mit",
"size": 13547
} | [
"com.sun.jmx.snmp.SnmpStatusException"
] | import com.sun.jmx.snmp.SnmpStatusException; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 2,459,300 |
public void assertPropertyNew(CmsObject cms, String resourceName, CmsProperty property) {
try {
// get the stored resource
OpenCmsTestResourceStorageEntry storedResource = m_currentResourceStrorage.get(resourceName);
// create the exclude list
List<CmsProper... | void function(CmsObject cms, String resourceName, CmsProperty property) { try { OpenCmsTestResourceStorageEntry storedResource = m_currentResourceStrorage.get(resourceName); List<CmsProperty> excludeList = new ArrayList<CmsProperty>(); excludeList.add(property); String noMatches = compareProperties(cms, resourceName, s... | /**
* Compares the current properties of a resource with the stored values and a given, new property.<p>
*
* @param cms the CmsObject
* @param resourceName the name of the resource to compare
* @param property the changed property
*/ | Compares the current properties of a resource with the stored values and a given, new property | assertPropertyNew | {
"repo_name": "serrapos/opencms-core",
"path": "test/org/opencms/test/OpenCmsTestCase.java",
"license": "lgpl-2.1",
"size": 144807
} | [
"java.util.ArrayList",
"java.util.List",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsProperty"
] | import java.util.ArrayList; import java.util.List; import org.opencms.file.CmsObject; import org.opencms.file.CmsProperty; | import java.util.*; import org.opencms.file.*; | [
"java.util",
"org.opencms.file"
] | java.util; org.opencms.file; | 1,070,228 |
public GuildBuilder setIcon(Icon icon) {
this.icon = icon;
return this;
} | GuildBuilder function(Icon icon) { this.icon = icon; return this; } | /**
* Set the icon of this guild.
*
* @param icon The image file.
* @return GuildBuilder for chaining.
*/ | Set the icon of this guild | setIcon | {
"repo_name": "AlienIdeology/J-Cord",
"path": "src/main/java/org/alienideology/jcord/handle/builders/GuildBuilder.java",
"license": "mit",
"size": 5127
} | [
"org.alienideology.jcord.handle.Icon"
] | import org.alienideology.jcord.handle.Icon; | import org.alienideology.jcord.handle.*; | [
"org.alienideology.jcord"
] | org.alienideology.jcord; | 2,237,712 |
HttpPipeline getHttpPipeline(); | HttpPipeline getHttpPipeline(); | /**
* Gets The HTTP pipeline to send requests through.
*
* @return the httpPipeline value.
*/ | Gets The HTTP pipeline to send requests through | getHttpPipeline | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClient.java",
"license": "mit",
"size": 1729
} | [
"com.azure.core.http.HttpPipeline"
] | import com.azure.core.http.HttpPipeline; | import com.azure.core.http.*; | [
"com.azure.core"
] | com.azure.core; | 2,618,227 |
@MediumTest
public void testRelaunchLatestTab() throws Exception {
launchThreeTabs();
final DocumentTabModelSelector selector =
ChromeApplication.getDocumentTabModelSelector();
final int lastTabId = selector.getCurrentTabId();
// Send Chrome to the background, t... | void function() throws Exception { launchThreeTabs(); final DocumentTabModelSelector selector = ChromeApplication.getDocumentTabModelSelector(); final int lastTabId = selector.getCurrentTabId(); ApplicationTestUtils.fireHomeScreenIntent(mContext); ApplicationTestUtils.launchChrome(mContext); | /**
* Confirm that clicking the Chrome icon (e.g. firing an Intent with ACTION_MAIN) brings back
* the last viewed Tab.
*/ | Confirm that clicking the Chrome icon (e.g. firing an Intent with ACTION_MAIN) brings back the last viewed Tab | testRelaunchLatestTab | {
"repo_name": "hujiajie/chromium-crosswalk",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTest.java",
"license": "bsd-3-clause",
"size": 32066
} | [
"org.chromium.chrome.browser.ChromeApplication",
"org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector",
"org.chromium.chrome.test.util.ApplicationTestUtils"
] | import org.chromium.chrome.browser.ChromeApplication; import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector; import org.chromium.chrome.test.util.ApplicationTestUtils; | import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.tabmodel.document.*; import org.chromium.chrome.test.util.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 1,031,868 |
public void desactivar(){
if(!this.validateDesactivar()){
return;
}
this.setEstado(Estado.INACTIVO.getId());
GdeDAOFactory.getCobranzaDAO().update(this);
}
| void function(){ if(!this.validateDesactivar()){ return; } this.setEstado(Estado.INACTIVO.getId()); GdeDAOFactory.getCobranzaDAO().update(this); } | /**
* Desactiva el EstadoConCuo. Previamente valida la desactivacion.
*
*/ | Desactiva el EstadoConCuo. Previamente valida la desactivacion | desactivar | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/bean/Cobranza.java",
"license": "gpl-3.0",
"size": 10511
} | [
"ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory",
"coop.tecso.demoda.iface.model.Estado"
] | import ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory; import coop.tecso.demoda.iface.model.Estado; | import ar.gov.rosario.siat.gde.buss.dao.*; import coop.tecso.demoda.iface.model.*; | [
"ar.gov.rosario",
"coop.tecso.demoda"
] | ar.gov.rosario; coop.tecso.demoda; | 525,216 |
@NonNull
public T bcc(@NonNull String emailAddress) {
builder.bcc(emailAddress);
return getSelf();
} | T function(@NonNull String emailAddress) { builder.bcc(emailAddress); return getSelf(); } | /**
* Add an email address to be used in the "bcc" field.
*
* <p>Receiving apps other than email clients will most likely ignore this information.</p>
*
* @param emailAddress
* the email address to add
*
* @return a suitable builder wrapper for chaining
*
* @see... | Add an email address to be used in the "bcc" field. Receiving apps other than email clients will most likely ignore this information | bcc | {
"repo_name": "cketti/ShareIntentBuilder",
"path": "shareintentbuilder/src/main/java/de/cketti/shareintentbuilder/OptionalExtraBuilder.java",
"license": "apache-2.0",
"size": 5726
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 515,334 |
public Set<String> getNamesOfLoadedClasses() {
return Collections.unmodifiableSet(namesOfLoadedClasses);
}
| Set<String> function() { return Collections.unmodifiableSet(namesOfLoadedClasses); } | /**
* Return names of classes loaded from this jar.
*/ | Return names of classes loaded from this jar | getNamesOfLoadedClasses | {
"repo_name": "kyrill007/loosejar",
"path": "src/main/java/com/googlecode/loosejar/JarArchive.java",
"license": "apache-2.0",
"size": 3606
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 803,176 |
@Override
protected void replace(File dst, File src) throws IOException {
verifyChecksums(plugin.getSha1(), getComputedSHA1(), src);
File bak = Util.changeExtension(dst, ".bak");
bak.delete();
final File legacy = getLegacyDestination();
if (... | void function(File dst, File src) throws IOException { verifyChecksums(plugin.getSha1(), getComputedSHA1(), src); File bak = Util.changeExtension(dst, ".bak"); bak.delete(); final File legacy = getLegacyDestination(); if (legacy.exists()) { if (!legacy.renameTo(bak)) { legacy.delete(); } } if (dst.exists()) { if (!dst.... | /**
* Called when the download is completed to overwrite
* the old file with the new file.
*/ | Called when the download is completed to overwrite the old file with the new file | replace | {
"repo_name": "ErikVerheul/jenkins",
"path": "core/src/main/java/hudson/model/UpdateCenter.java",
"license": "mit",
"size": 83902
} | [
"hudson.model.UpdateSite",
"java.io.File",
"java.io.IOException",
"org.acegisecurity.Authentication"
] | import hudson.model.UpdateSite; import java.io.File; import java.io.IOException; import org.acegisecurity.Authentication; | import hudson.model.*; import java.io.*; import org.acegisecurity.*; | [
"hudson.model",
"java.io",
"org.acegisecurity"
] | hudson.model; java.io; org.acegisecurity; | 15,987 |
public void setLastaccessedtime(Date lastaccessedtime) {
this.lastaccessedtime = lastaccessedtime;
} | void function(Date lastaccessedtime) { this.lastaccessedtime = lastaccessedtime; } | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column s_user_account.lastAccessedTime
*
* @param lastaccessedtime the value for s_user_account.lastAccessedTime
*
* @mbggenerated Tue Sep 08 09:15:19 ICT 2015
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column s_user_account.lastAccessedTime | setLastaccessedtime | {
"repo_name": "onlylin/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/user/domain/UserAccount.java",
"license": "agpl-3.0",
"size": 13455
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 197,430 |
private void compactMobFilesInBatch(PartitionedMobCompactionRequest request,
CompactionPartition partition, Table table, List<StoreFile> filesToCompact, int batch,
Path bulkloadPathOfPartition, Path bulkloadColumnPath, List<Path> newFiles)
throws IOException {
// open scanner to the selected mob files... | void function(PartitionedMobCompactionRequest request, CompactionPartition partition, Table table, List<StoreFile> filesToCompact, int batch, Path bulkloadPathOfPartition, Path bulkloadColumnPath, List<Path> newFiles) throws IOException { StoreScanner scanner = createScanner(filesToCompact, ScanType.COMPACT_DROP_DELETE... | /**
* Compacts a partition of selected small mob files and all the del files in a batch.
* @param request The compaction request.
* @param partition A compaction partition.
* @param table The current table.
* @param filesToCompact The files to be compacted.
* @param batch The number of mob files to be... | Compacts a partition of selected small mob files and all the del files in a batch | compactMobFilesInBatch | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java",
"license": "apache-2.0",
"size": 27546
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Table",
"org.apache.hadoop.hbase.mob.MobUtils",
"org.apache.hadoop.hbase.mob.compactions.PartitionedMobComp... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.mob.MobUtils; import org.apache.hadoop.hbase.mob.comp... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.mob.*; import org.apache.hadoop.hbase.mob.compactions.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,815,729 |
EReference getUiDialogAssignment_Element(); | EReference getUiDialogAssignment_Element(); | /**
* Returns the meta object for the containment reference '{@link org.lunifera.ecview.semantic.uimodel.UiDialogAssignment#getElement <em>Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Element</em>'.
* @see org.lunifera.ecview.se... | Returns the meta object for the containment reference '<code>org.lunifera.ecview.semantic.uimodel.UiDialogAssignment#getElement Element</code>'. | getUiDialogAssignment_Element | {
"repo_name": "lunifera/lunifera-ecview-addons",
"path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java",
"license": "epl-1.0",
"size": 498897
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,419,379 |
public static IndexSpec fromJSON(JSONObject json) throws JSONException {
return new IndexSpec(json.getString("path"), Type.valueOf(json.getString("type")), json.optString("columnName"));
}
| static IndexSpec function(JSONObject json) throws JSONException { return new IndexSpec(json.getString("path"), Type.valueOf(json.getString("type")), json.optString(STR)); } | /**
* Return IndexSpec given JSONObject
* @param json
* @return
* @throws JSONException
*/ | Return IndexSpec given JSONObject | fromJSON | {
"repo_name": "huminzhi/SalesforceMobileSDK-Android",
"path": "libs/SmartStore/src/com/salesforce/androidsdk/smartstore/store/IndexSpec.java",
"license": "apache-2.0",
"size": 5296
} | [
"com.salesforce.androidsdk.smartstore.store.SmartStore",
"org.json.JSONException",
"org.json.JSONObject"
] | import com.salesforce.androidsdk.smartstore.store.SmartStore; import org.json.JSONException; import org.json.JSONObject; | import com.salesforce.androidsdk.smartstore.store.*; import org.json.*; | [
"com.salesforce.androidsdk",
"org.json"
] | com.salesforce.androidsdk; org.json; | 1,285,801 |
private URI getBaseURI(final URI graphURI) {
if (graphURI == null || graphURI == IStore.DEFAULT_GRAPH) {
return _uriInfo.getAbsolutePath();
}
return graphURI;
} | URI function(final URI graphURI) { if (graphURI == null graphURI == IStore.DEFAULT_GRAPH) { return _uriInfo.getAbsolutePath(); } return graphURI; } | /**
* Returns the base URI.
*
* @param graphURI The graph URI or {@code null}.
* @return The {@code graphURI} if it does not represent the default graph or is {@code null},
* otherwise a URI which represents the path to this resource.
*/ | Returns the base URI | getBaseURI | {
"repo_name": "heuer/cassa",
"path": "cassa-server-jaxrs/src/main/java/com/semagia/cassa/jaxrs/AbstractGraphResource.java",
"license": "apache-2.0",
"size": 9693
} | [
"com.semagia.cassa.server.store.IStore"
] | import com.semagia.cassa.server.store.IStore; | import com.semagia.cassa.server.store.*; | [
"com.semagia.cassa"
] | com.semagia.cassa; | 1,867,102 |
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
| void function(Date birthDate) { this.birthDate = birthDate; } | /**
* Sets the birth date.
*
* @param birthDate the birth date
*/ | Sets the birth date | setBirthDate | {
"repo_name": "Esleelkartea/aon-employee",
"path": "aonemployee_v2.3.0_src/paquetes descomprimidos/aon.registry-2.1.4-sources/com/code/aon/person/Person.java",
"license": "gpl-2.0",
"size": 3044
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 646,757 |
public void testDerby6357TempTable() throws SQLException {
Statement s = createStatement();
s.execute("declare global temporary table temptable(x int) not logged");
s.execute("create table t1(x int)");
s.execute("create table t2(i int, b boolean)");
assertCompileError("XCL51... | void function() throws SQLException { Statement s = createStatement(); s.execute(STR); s.execute(STR); s.execute(STR); assertCompileError("XCL51", STR + STR + STR); assertCompileError("XCL51", STR + STR); assertCompileError("XCL51", STR + STR); assertCompileError("XCL51", STR + STR + STR); assertCompileError("XCL51", S... | /**
* Verify that CREATE TRIGGER fails if a temporary table is referenced.
* Regression test case for DERBY-6357.
*/ | Verify that CREATE TRIGGER fails if a temporary table is referenced. Regression test case for DERBY-6357 | testDerby6357TempTable | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java",
"license": "apache-2.0",
"size": 118077
} | [
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 877,912 |
private boolean testArguments()
{
boolean result = true;
String errorMsg = "";
if(execServiceId == 0){
errorMsg += "Wrong parameter 'exec service ID'.\n";
result = false;
}
if(errorMsg.length()>0){
Window.alert(errorMsg);
}
return result;
} | boolean function() { boolean result = true; String errorMsg = STRWrong parameter 'exec service ID'.\n"; result = false; } if(errorMsg.length()>0){ Window.alert(errorMsg); } return result; } | /**
* Tests the values, if the process can continue
* @return true if correct / false otherwise
*/ | Tests the values, if the process can continue | testArguments | {
"repo_name": "jirmauritz/perun",
"path": "perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/json/generalServiceManager/DeleteExecService.java",
"license": "bsd-2-clause",
"size": 2565
} | [
"com.google.gwt.user.client.Window"
] | import com.google.gwt.user.client.Window; | import com.google.gwt.user.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,060,038 |
@Test
public void testPDFToCompactSVG() {
NormaRunner normaRunner = new NormaRunner();
File projectDir = new File(NormaFixtures.TEST_DEMOS_DIR, "cert");
File targetDir = new File("target/demos/cert/");
CMineTestFixtures.cleanAndCopyDir(projectDir, targetDir);
normaRunner.convertRawPDFToProjectToCompactSVG... | void function() { NormaRunner normaRunner = new NormaRunner(); File projectDir = new File(NormaFixtures.TEST_DEMOS_DIR, "cert"); File targetDir = new File(STR); CMineTestFixtures.cleanAndCopyDir(projectDir, targetDir); normaRunner.convertRawPDFToProjectToCompactSVG(targetDir); } | /** converts a directory with PDF files into Ctrees with compact svg.
*
* SHOWCASE
*/ | converts a directory with PDF files into Ctrees with compact svg. SHOWCASE | testPDFToCompactSVG | {
"repo_name": "petermr/norma",
"path": "src/test/java/org/xmlcml/norma/svg/CompactTest.java",
"license": "apache-2.0",
"size": 1978
} | [
"java.io.File",
"org.xmlcml.cproject.util.CMineTestFixtures",
"org.xmlcml.norma.NormaFixtures",
"org.xmlcml.norma.NormaRunner"
] | import java.io.File; import org.xmlcml.cproject.util.CMineTestFixtures; import org.xmlcml.norma.NormaFixtures; import org.xmlcml.norma.NormaRunner; | import java.io.*; import org.xmlcml.cproject.util.*; import org.xmlcml.norma.*; | [
"java.io",
"org.xmlcml.cproject",
"org.xmlcml.norma"
] | java.io; org.xmlcml.cproject; org.xmlcml.norma; | 327,425 |
public static boolean isReservedLabel(Label label) {
return label.toString().equals(DEFAULT_CONDITION_KEY);
}
} | static boolean function(Label label) { return label.toString().equals(DEFAULT_CONDITION_KEY); } } | /**
* Returns true for labels that are "reserved selector key words" and not intended to
* map to actual targets.
*/ | Returns true for labels that are "reserved selector key words" and not intended to map to actual targets | isReservedLabel | {
"repo_name": "Digas29/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/BuildType.java",
"license": "apache-2.0",
"size": 18088
} | [
"com.google.devtools.build.lib.cmdline.Label"
] | import com.google.devtools.build.lib.cmdline.Label; | import com.google.devtools.build.lib.cmdline.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,240,710 |
public static void copy(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length) {
if (isOutOfBounds(srcIdx, length, src.length())) {
throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + length("
+ length + ") <= srcLen(... | static void function(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length) { if (isOutOfBounds(srcIdx, length, src.length())) { throw new IndexOutOfBoundsException(STR + STR + srcIdx + STR + length + STR + src.length() + ')'); } checkNotNull(dst, "dst").setBytes(dstIdx, src.array(), srcIdx + src.arrayOffset... | /**
* Copies the content of {@code src} to a {@link ByteBuf} using {@link ByteBuf#setBytes(int, byte[], int, int)}.
* Unlike the {@link #copy(AsciiString, ByteBuf)} and {@link #copy(AsciiString, int, ByteBuf, int)} methods,
* this method do not increase a {@code writerIndex} of {@code dst} buffer.
*... | Copies the content of src to a <code>ByteBuf</code> using <code>ByteBuf#setBytes(int, byte[], int, int)</code>. Unlike the <code>#copy(AsciiString, ByteBuf)</code> and <code>#copy(AsciiString, int, ByteBuf, int)</code> methods, this method do not increase a writerIndex of dst buffer | copy | {
"repo_name": "fenik17/netty",
"path": "buffer/src/main/java/io/netty/buffer/ByteBufUtil.java",
"license": "apache-2.0",
"size": 70306
} | [
"io.netty.util.AsciiString",
"io.netty.util.internal.ObjectUtil"
] | import io.netty.util.AsciiString; import io.netty.util.internal.ObjectUtil; | import io.netty.util.*; import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 1,262,899 |
private String calculate(String x) throws MathParsingException
{
Matcher m;
x = x.replaceAll("[ ]+", " ");
// Cas de base : un chiffre
if(this.regex(x, "^ [-]?[0-9.]+ $").matches())
return " " + x + " ";
// Traitement des log
m = this.regex(x, "^(.*)log ([-]?[0-9.]+)(.*)$")... | String function(String x) throws MathParsingException { Matcher m; x = x.replaceAll(STR, " "); if(this.regex(x, STR).matches()) return " " + x + " "; m = this.regex(x, STR); if(m.matches()) return calculate(m.group(1) + " " + String.valueOf(Math.log10(Double.parseDouble(m.group(2)))) + " " + m.group(3)); m = this.regex... | /**
* Calcul recurcif
* @param chaine formatée (espace entre les tokens)
* @return String chaine représentant le résultat
*/ | Calcul recurcif | calculate | {
"repo_name": "amoweb/cartographie",
"path": "src/fr/mathematiques/parseur/Parsing.java",
"license": "gpl-3.0",
"size": 4246
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 336,399 |
public static long millisToNanos(long millis) {
return TimeUnit.MILLISECONDS.toNanos(millis);
} | static long function(long millis) { return TimeUnit.MILLISECONDS.toNanos(millis); } | /**
* Convert milliseconds time interval to nanoseconds.
*
* @param millis Original time interval.
* @return Calculated time interval.
*/ | Convert milliseconds time interval to nanoseconds | millisToNanos | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 374177
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 211,241 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.