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 OffsetDateTime processingEndTime() { return this.innerProperties() == null ? null : this.innerProperties().processingEndTime(); }
OffsetDateTime function() { return this.innerProperties() == null ? null : this.innerProperties().processingEndTime(); }
/** * Get the processingEndTime property: The time the alert was made available for consumption. * * @return the processingEndTime value. */
Get the processingEndTime property: The time the alert was made available for consumption
processingEndTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java", "license": "mit", "size": 10406 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,001,827
public static final String getCurrentDate() { long now = System.currentTimeMillis(); if (now - currentDateGenerated > 1000) synchronized (format) { if (now - currentDateGenerated > 1000) { currentDateGenerated = now; currentDate = format.fo...
static final String function() { long now = System.currentTimeMillis(); if (now - currentDateGenerated > 1000) synchronized (format) { if (now - currentDateGenerated > 1000) { currentDateGenerated = now; currentDate = format.format(new Date(now)); } } return currentDate; }
/** * Get the current date in HTTP format. * @return the formatted date */
Get the current date in HTTP format
getCurrentDate
{ "repo_name": "andrewbissada/gss", "path": "src/org/gss_project/gss/server/rest/FastHttpDateFormat.java", "license": "gpl-3.0", "size": 6372 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,804,886
public boolean isRevoked(Certificate cert) { if (!cert.getType().equals("X.509")) { throw new RuntimeException("X.509 CRL used with non X.509 Cert"); } TBSCertList.CRLEntry[] certs = c.getRevokedCertificates(); X500Name caName = c.getIssuer(); if (c...
boolean function(Certificate cert) { if (!cert.getType().equals("X.509")) { throw new RuntimeException(STR); } TBSCertList.CRLEntry[] certs = c.getRevokedCertificates(); X500Name caName = c.getIssuer(); if (certs != null) { BigInteger serial = ((X509Certificate)cert).getSerialNumber(); for (int i = 0; i < certs.length;...
/** * Checks whether the given certificate is on this CRL. * * @param cert the certificate to check for. * @return true if the given certificate is on this CRL, * false otherwise. */
Checks whether the given certificate is on this CRL
isRevoked
{ "repo_name": "onessimofalconi/bc-java", "path": "prov/src/main/jdk1.3/org/bouncycastle/jce/provider/X509CRLObject.java", "license": "mit", "size": 17103 }
[ "java.math.BigInteger", "java.security.cert.Certificate", "java.security.cert.CertificateEncodingException", "java.security.cert.X509Certificate", "org.bouncycastle.asn1.x500.X500Name", "org.bouncycastle.asn1.x509.Extension", "org.bouncycastle.asn1.x509.GeneralNames", "org.bouncycastle.asn1.x509.TBSCe...
import java.math.BigInteger; import java.security.cert.Certificate; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x509.Extension; import org.bouncycastle.asn1.x509.GeneralNames; import org.bounc...
import java.math.*; import java.security.cert.*; import org.bouncycastle.asn1.x500.*; import org.bouncycastle.asn1.x509.*;
[ "java.math", "java.security", "org.bouncycastle.asn1" ]
java.math; java.security; org.bouncycastle.asn1;
813,281
public BigDecimal getDueAmt(); public static final String COLUMNNAME_DueDate = "DueDate";
BigDecimal function(); public static final String COLUMNNAME_DueDate = STR;
/** Get Amount due. * Amount of the payment due */
Get Amount due. Amount of the payment due
getDueAmt
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_T_Aging.java", "license": "gpl-2.0", "size": 14311 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
634,273
void tearDown() { try { CaseUtils.closeCurrentCase(); } catch (TestUtilsException ex) { Exceptions.printStackTrace(ex); Assert.fail(ex.getMessage()); } }
void tearDown() { try { CaseUtils.closeCurrentCase(); } catch (TestUtilsException ex) { Exceptions.printStackTrace(ex); Assert.fail(ex.getMessage()); } }
/** * Close the currently open case, delete the case directory, delete the * central repo db. */
Close the currently open case, delete the case directory, delete the central repo db
tearDown
{ "repo_name": "sleuthkit/autopsy", "path": "Core/test/qa-functional/src/org/sleuthkit/autopsy/commonpropertiessearch/InterCaseTestUtils.java", "license": "apache-2.0", "size": 23902 }
[ "junit.framework.Assert", "org.openide.util.Exceptions", "org.sleuthkit.autopsy.testutils.CaseUtils", "org.sleuthkit.autopsy.testutils.TestUtilsException" ]
import junit.framework.Assert; import org.openide.util.Exceptions; import org.sleuthkit.autopsy.testutils.CaseUtils; import org.sleuthkit.autopsy.testutils.TestUtilsException;
import junit.framework.*; import org.openide.util.*; import org.sleuthkit.autopsy.testutils.*;
[ "junit.framework", "org.openide.util", "org.sleuthkit.autopsy" ]
junit.framework; org.openide.util; org.sleuthkit.autopsy;
2,706,914
QueryResult<E> flushMode(FlushModeType flushMode);
QueryResult<E> flushMode(FlushModeType flushMode);
/** * Sets the query flush mode. * * @param flushMode Query flush mode to use in the query. * @return Fluent API: the result instance. */
Sets the query flush mode
flushMode
{ "repo_name": "hwellmann/deltaspike", "path": "deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/QueryResult.java", "license": "apache-2.0", "size": 6243 }
[ "javax.persistence.FlushModeType" ]
import javax.persistence.FlushModeType;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,274,350
DataModelIF<U, I> parseData(File f) throws IOException;
DataModelIF<U, I> parseData(File f) throws IOException;
/** * Parse a data file. * * @param f The file to be parsed. * @return A dataset created from the file. * @throws IOException if the file cannot be read. */
Parse a data file
parseData
{ "repo_name": "recommenders/rival", "path": "rival-core/src/main/java/net/recommenders/rival/core/Parser.java", "license": "apache-2.0", "size": 1434 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,447,445
public static void main(String [] args) { try { System.out.println("Opening config file"); m_config = new ConfigFileReader("btg_config.txt"); } catch (FileNotFoundException ex) { System.out.println("Main: could not find config file, using default values"); if (m_confi...
static void function(String [] args) { try { System.out.println(STR); m_config = new ConfigFileReader(STR); } catch (FileNotFoundException ex) { System.out.println(STR); if (m_config == null) m_config = new ConfigFileReader(); m_config.addBTDevice(STR); m_config.addBTDevice(STR); m_config.addFilter(STR); } catch (IOExc...
/** * Starts up the main window. * @param args */
Starts up the main window
main
{ "repo_name": "clelom/javabtgateway", "path": "Main.java", "license": "bsd-2-clause", "size": 4183 }
[ "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,847,918
public void testNullInputValue() throws ConverterException { Mock mock = mock(UIComponent.class); UIComponent component = (UIComponent) mock.proxy(); MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component); NumberConverter converter = getNumberConverter(); doTestNull(faces...
void function() throws ConverterException { Mock mock = mock(UIComponent.class); UIComponent component = (UIComponent) mock.proxy(); MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component); NumberConverter converter = getNumberConverter(); doTestNull(facesContext, wrapper, converter); }
/** * Tests that null returns immediately. * * @throws ConverterException when test fails */
Tests that null returns immediately
testNullInputValue
{ "repo_name": "adamrduffy/trinidad-1.0.x", "path": "trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java", "license": "apache-2.0", "size": 18560 }
[ "javax.faces.component.UIComponent", "javax.faces.convert.ConverterException", "javax.faces.convert.NumberConverter", "org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper", "org.jmock.Mock" ]
import javax.faces.component.UIComponent; import javax.faces.convert.ConverterException; import javax.faces.convert.NumberConverter; import org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper; import org.jmock.Mock;
import javax.faces.component.*; import javax.faces.convert.*; import org.apache.myfaces.trinidadbuild.test.*; import org.jmock.*;
[ "javax.faces", "org.apache.myfaces", "org.jmock" ]
javax.faces; org.apache.myfaces; org.jmock;
1,997,312
public Set<String> clearDBDynamic(String runID) throws SQLException { Set<String> refsToRemove = collectValueReferences(runID); // collect all relevant refs from PortBinding and Collection try (Connection connection = getConnection()) { delete(connection, "WorkflowRun", runID); delete(connection, "PortB...
Set<String> function(String runID) throws SQLException { Set<String> refsToRemove = collectValueReferences(runID); try (Connection connection = getConnection()) { delete(connection, STR, runID); delete(connection, STR, runID); delete(connection, STR, runID); delete(connection, DataflowInvocationTable.DataflowInvocation...
/** * deletes DB contents for all runs -- for testing purposes * * @throws SQLException */
deletes DB contents for all runs -- for testing purposes
clearDBDynamic
{ "repo_name": "apache/incubator-taverna-engine", "path": "taverna-provenanceconnector/src/main/java/org/apache/taverna/provenance/lineageservice/ProvenanceWriter.java", "license": "apache-2.0", "size": 23252 }
[ "java.sql.Connection", "java.sql.SQLException", "java.util.Set", "org.apache.taverna.provenance.connector.AbstractProvenanceConnector" ]
import java.sql.Connection; import java.sql.SQLException; import java.util.Set; import org.apache.taverna.provenance.connector.AbstractProvenanceConnector;
import java.sql.*; import java.util.*; import org.apache.taverna.provenance.connector.*;
[ "java.sql", "java.util", "org.apache.taverna" ]
java.sql; java.util; org.apache.taverna;
2,016,120
@GET @Path("market/list") public YacunaTickerReturn getTickers() throws IOException;
@Path(STR) YacunaTickerReturn function() throws IOException;
/** * Gets all tickers from Yacuna * URL: https://yacuna.com/api/1/market/list * * @return Data object for ticker * @throws java.io.IOException */
Gets all tickers from Yacuna
getTickers
{ "repo_name": "cinjoff/XChange-1", "path": "xchange-yacuna/src/main/java/com/xeiam/xchange/yacuna/Yacuna.java", "license": "mit", "size": 1198 }
[ "com.xeiam.xchange.yacuna.dto.marketdata.YacunaTickerReturn", "java.io.IOException", "javax.ws.rs.Path" ]
import com.xeiam.xchange.yacuna.dto.marketdata.YacunaTickerReturn; import java.io.IOException; import javax.ws.rs.Path;
import com.xeiam.xchange.yacuna.dto.marketdata.*; import java.io.*; import javax.ws.rs.*;
[ "com.xeiam.xchange", "java.io", "javax.ws" ]
com.xeiam.xchange; java.io; javax.ws;
1,364,561
public String generateColumnLabel(CategoryDataset dataset, int column) { return dataset.getColumnKey(column).toString(); }
String function(CategoryDataset dataset, int column) { return dataset.getColumnKey(column).toString(); }
/** * Generates a label for the specified row. * * @param dataset the dataset (<code>null</code> not permitted). * @param column the column index (zero-based). * * @return The label. */
Generates a label for the specified row
generateColumnLabel
{ "repo_name": "integrated/jfreechart", "path": "source/org/jfree/chart/labels/AbstractCategoryItemLabelGenerator.java", "license": "lgpl-2.1", "size": 12184 }
[ "org.jfree.data.category.CategoryDataset" ]
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.*;
[ "org.jfree.data" ]
org.jfree.data;
2,136,242
public static long getFileSizeForTable(HiveConf conf, Table table) { Path path = table.getPath(); long size = 0; try { FileSystem fs = path.getFileSystem(conf); size = fs.getContentSummary(path).getLength(); } catch (Exception e) { size = 0; } return size; }
static long function(HiveConf conf, Table table) { Path path = table.getPath(); long size = 0; try { FileSystem fs = path.getFileSystem(conf); size = fs.getContentSummary(path).getLength(); } catch (Exception e) { size = 0; } return size; }
/** * Find the bytes on disk occupied by a table * @param conf * - hive conf * @param table * - table * @return size on disk */
Find the bytes on disk occupied by a table
getFileSizeForTable
{ "repo_name": "vergilchiu/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java", "license": "apache-2.0", "size": 68077 }
[ "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hive.conf.HiveConf", "org.apache.hadoop.hive.ql.metadata.Table" ]
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.metadata.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,575,559
@Test(timeout=100000) public void testAcceptRecoveryBehavior() throws Exception { // We need to run newEpoch() first, or else we have no way to distinguish // different proposals for the same decision. try { ch.prepareRecovery(1L).get(); fail("Did not throw IllegalState when trying to run pa...
@Test(timeout=100000) void function() throws Exception { try { ch.prepareRecovery(1L).get(); fail(STR); } catch (ExecutionException ise) { GenericTestUtils.assertExceptionContains(STR, ise); } ch.newEpoch(1).get(); ch.setEpoch(1); PrepareRecoveryResponseProto prep = ch.prepareRecovery(1L).get(); System.err.println(STR ...
/** * Test that the JournalNode performs correctly as a Paxos * <em>Acceptor</em> process. */
Test that the JournalNode performs correctly as a Paxos Acceptor process
testAcceptRecoveryBehavior
{ "repo_name": "jsrudani/HadoopHDFSProject", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNode.java", "license": "apache-2.0", "size": 12634 }
[ "java.util.concurrent.ExecutionException", "org.apache.hadoop.hdfs.qjournal.QJMTestUtil", "org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos", "org.apache.hadoop.test.GenericTestUtils", "org.junit.Assert", "org.junit.Test" ]
import java.util.concurrent.ExecutionException; import org.apache.hadoop.hdfs.qjournal.QJMTestUtil; import org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Assert; import org.junit.Test;
import java.util.concurrent.*; import org.apache.hadoop.hdfs.qjournal.*; import org.apache.hadoop.hdfs.qjournal.protocol.*; import org.apache.hadoop.test.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
237,681
public CJProduct fetchByPrimaryKey(long productId);
CJProduct function(long productId);
/** * Returns the c j product with the primary key or returns <code>null</code> if it could not be found. * * @param productId the primary key of the c j product * @return the c j product, or <code>null</code> if a c j product with the primary key could not be found */
Returns the c j product with the primary key or returns <code>null</code> if it could not be found
fetchByPrimaryKey
{ "repo_name": "FuadEfendi/liferay-osgi", "path": "modules/ca.efendi.datafeeds.api/src/main/java/ca/efendi/datafeeds/service/persistence/CJProductPersistence.java", "license": "apache-2.0", "size": 53359 }
[ "ca.efendi.datafeeds.model.CJProduct" ]
import ca.efendi.datafeeds.model.CJProduct;
import ca.efendi.datafeeds.model.*;
[ "ca.efendi.datafeeds" ]
ca.efendi.datafeeds;
1,675,435
public Date getCycleStartDate() { return usagePeriod.getCycleStartDate(); }
Date function() { return usagePeriod.getCycleStartDate(); }
/** * Returns the billing cycle start date for this customer. This is the start date of the very * first billing period for this customer, effectively the date the main subscription order * became active. * * @return cycle start date */
Returns the billing cycle start date for this customer. This is the start date of the very first billing period for this customer, effectively the date the main subscription order became active
getCycleStartDate
{ "repo_name": "maduhu/jBilling", "path": "src/java/com/sapienter/jbilling/server/order/UsageBL.java", "license": "agpl-3.0", "size": 16312 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,232,113
protected final void notifyFailed(Throwable cause) { checkNotNull(cause); monitor.enter(); try { State previous = state(); switch (previous) { case NEW: case TERMINATED: throw new IllegalStateException("Failed while in state:" + previous, cause); case RUNNING...
final void function(Throwable cause) { checkNotNull(cause); monitor.enter(); try { State previous = state(); switch (previous) { case NEW: case TERMINATED: throw new IllegalStateException(STR + previous, cause); case RUNNING: case STARTING: case STOPPING: snapshot = new StateSnapshot(FAILED, false, cause); failed(previ...
/** * Invoke this method to transition the service to the {@link State#FAILED}. The service will * <b>not be stopped</b> if it is running. Invoke this method when a service has failed critically * or otherwise cannot be started nor stopped. */
Invoke this method to transition the service to the <code>State#FAILED</code>. The service will not be stopped if it is running. Invoke this method when a service has failed critically or otherwise cannot be started nor stopped
notifyFailed
{ "repo_name": "liyazhou/guava", "path": "guava/src/com/google/common/util/concurrent/AbstractService.java", "license": "apache-2.0", "size": 18983 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
723,740
@Generated @Selector("setPassEntriesAvailable:") public native void setPassEntriesAvailable(boolean value);
@Selector(STR) native void function(boolean value);
/** * passes will be available to add (at least one) */
passes will be available to add (at least one)
setPassEntriesAvailable
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/passkit/PKIssuerProvisioningExtensionStatus.java", "license": "apache-2.0", "size": 5498 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
986,436
public final void testACE_doAs_EA() throws Exception { denyPermission(new AuthPermission("doAs")); try { Subject.doAs(new Subject(), emptyPEAction); fail("No expected AccessControlException"); } catch (AccessControlException e) { assertEquals(e, Au...
final void function() throws Exception { denyPermission(new AuthPermission("doAs")); try { Subject.doAs(new Subject(), emptyPEAction); fail(STR); } catch (AccessControlException e) { assertEquals(e, AuthPermission.class); } catch (PrivilegedActionException e) { fail(STR); } }
/** * Tests SecurityException for Subject.doAs(Subject,PrivilegedExceptionAction) */
Tests SecurityException for Subject.doAs(Subject,PrivilegedExceptionAction)
testACE_doAs_EA
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java", "license": "gpl-2.0", "size": 100686 }
[ "java.security.AccessControlException", "java.security.PrivilegedActionException" ]
import java.security.AccessControlException; import java.security.PrivilegedActionException;
import java.security.*;
[ "java.security" ]
java.security;
1,728,020
protected static Collection<EventInterval> getEventsBetween( long start, long end, Iterable<EventInterval> eventIntervals) { List<EventInterval> outEvents = new ArrayList<>(); for (EventInterval ep : eventIntervals) { long startTime = ep.getStartTime(); long endTime = ep.getEndTime(); ...
static Collection<EventInterval> function( long start, long end, Iterable<EventInterval> eventIntervals) { List<EventInterval> outEvents = new ArrayList<>(); for (EventInterval ep : eventIntervals) { long startTime = ep.getStartTime(); long endTime = ep.getEndTime(); if (ep.isComplete()) { if (startTime >= start && end...
/** * Filter a list of events and return the subset that fall between the given start and end * timestamps. Preserves ordering if the given iterable was ordered. Will replace event pairs that * straddle the boundary with {@link com.facebook.buck.event.listener.ProxyBuckEvent} instances, * so that the result...
Filter a list of events and return the subset that fall between the given start and end timestamps. Preserves ordering if the given iterable was ordered. Will replace event pairs that straddle the boundary with <code>com.facebook.buck.event.listener.ProxyBuckEvent</code> instances, so that the resulting collection is s...
getEventsBetween
{ "repo_name": "JoelMarcey/buck", "path": "src/com/facebook/buck/event/listener/AbstractConsoleEventBusListener.java", "license": "apache-2.0", "size": 34882 }
[ "com.facebook.buck.event.listener.util.EventInterval", "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import com.facebook.buck.event.listener.util.EventInterval; import java.util.ArrayList; import java.util.Collection; import java.util.List;
import com.facebook.buck.event.listener.util.*; import java.util.*;
[ "com.facebook.buck", "java.util" ]
com.facebook.buck; java.util;
1,671,338
@ApiMethod(name = "postComment", path = "googleplus/post", httpMethod = "post") public void postGooglePlus(@Named("feature") FeatureEnum feature, @Named("score") @Nullable Boolean score, @Named("comment") @Nullable String comment, @Named("currentUserMail") String currentUserMail, @Named("endorsedMail") ...
@ApiMethod(name = STR, path = STR, httpMethod = "post") void function(@Named(STR) FeatureEnum feature, @Named("score") @Nullable Boolean score, @Named(STR) @Nullable String comment, @Named(STR) String currentUserMail, @Named(STR) @Nullable String endorsedMail, @Named(STR) String technologyName, @Named(STR) String appLi...
/** * Endpoint to post the content in users Google+ according the feature * performed by front-end * * @param feature * is the feature performed by front-end * @param score * is the positive or negative recommendation in case of * recommendation feature * @param cu...
Endpoint to post the content in users Google+ according the feature performed by front-end
postGooglePlus
{ "repo_name": "sidharta/sales-gallery", "path": "src/main/java/com/ciandt/techgallery/service/endpoint/SocialNetworkCommunicationEndpoint.java", "license": "apache-2.0", "size": 3128 }
[ "com.ciandt.techgallery.service.enums.FeatureEnum", "com.google.api.server.spi.config.ApiMethod", "com.google.api.server.spi.config.Named", "com.google.api.server.spi.config.Nullable", "com.google.api.server.spi.response.BadRequestException", "com.google.api.server.spi.response.InternalServerErrorExceptio...
import com.ciandt.techgallery.service.enums.FeatureEnum; import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.config.Named; import com.google.api.server.spi.config.Nullable; import com.google.api.server.spi.response.BadRequestException; import com.google.api.server.spi.response.InternalSe...
import com.ciandt.techgallery.service.enums.*; import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.google.appengine.api.users.*; import java.io.*; import javax.servlet.http.*;
[ "com.ciandt.techgallery", "com.google.api", "com.google.appengine", "java.io", "javax.servlet" ]
com.ciandt.techgallery; com.google.api; com.google.appengine; java.io; javax.servlet;
906,914
private Map<String, String> getIdsForNames(String[] names) throws JSONException { QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec("SELECT {accounts:_soup} FROM {accounts} WHERE {accounts:Name} IN " + makeInClause(names), names.length); JSONArray accountsFromDb = smartStore.query(smartStore...
Map<String, String> function(String[] names) throws JSONException { QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec(STR + makeInClause(names), names.length); JSONArray accountsFromDb = smartStore.query(smartStoreQuery, 0); Map<String, String> idToNames = new HashMap<String, String>(); for (int i=0; i<accounts...
/** * Return map of id to name given records names * @param names * @throws JSONException */
Return map of id to name given records names
getIdsForNames
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java", "license": "apache-2.0", "size": 57743 }
[ "com.salesforce.androidsdk.smartstore.store.QuerySpec", "com.salesforce.androidsdk.smartsync.util.Constants", "java.util.HashMap", "java.util.Map", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import com.salesforce.androidsdk.smartstore.store.QuerySpec; import com.salesforce.androidsdk.smartsync.util.Constants; import java.util.HashMap; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import com.salesforce.androidsdk.smartstore.store.*; import com.salesforce.androidsdk.smartsync.util.*; import java.util.*; import org.json.*;
[ "com.salesforce.androidsdk", "java.util", "org.json" ]
com.salesforce.androidsdk; java.util; org.json;
2,502,217
private static synchronized String generateFilesDataSourceName(SleuthkitCase caseDb) throws TskCoreException { int localFileDataSourcesCounter = 0; try { List<VirtualDirectory> localFileDataSources = caseDb.getVirtualDirectoryRoots(); for (VirtualDirectory vd : localFileDataS...
static synchronized String function(SleuthkitCase caseDb) throws TskCoreException { int localFileDataSourcesCounter = 0; try { List<VirtualDirectory> localFileDataSources = caseDb.getVirtualDirectoryRoots(); for (VirtualDirectory vd : localFileDataSources) { if (vd.getName().startsWith(VirtualDirectoryNode.LOGICAL_FILE...
/** * Generates a name for the root virtual directory for the data source. * * NOTE: Although this method is guarded by the file manager's monitor, * there is currently a minimal chance of default name duplication for * multi-user cases with multiple FileManagers running on different nodes. ...
Generates a name for the root virtual directory for the data source. there is currently a minimal chance of default name duplication for multi-user cases with multiple FileManagers running on different nodes
generateFilesDataSourceName
{ "repo_name": "dgrove727/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java", "license": "apache-2.0", "size": 30949 }
[ "java.util.List", "org.sleuthkit.autopsy.datamodel.VirtualDirectoryNode", "org.sleuthkit.datamodel.SleuthkitCase", "org.sleuthkit.datamodel.TskCoreException", "org.sleuthkit.datamodel.VirtualDirectory" ]
import java.util.List; import org.sleuthkit.autopsy.datamodel.VirtualDirectoryNode; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.VirtualDirectory;
import java.util.*; import org.sleuthkit.autopsy.datamodel.*; import org.sleuthkit.datamodel.*;
[ "java.util", "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
java.util; org.sleuthkit.autopsy; org.sleuthkit.datamodel;
1,162,834
@Override public String toString() { StringBuilder b = new StringBuilder(); for (Iterator<Map.Entry<String, BtrpOperand>> ite = type.entrySet().iterator(); ite.hasNext(); ) { Map.Entry<String, BtrpOperand> e = ite.next(); b.append(e.getKey()); b.append(": "); ...
String function() { StringBuilder b = new StringBuilder(); for (Iterator<Map.Entry<String, BtrpOperand>> ite = type.entrySet().iterator(); ite.hasNext(); ) { Map.Entry<String, BtrpOperand> e = ite.next(); b.append(e.getKey()); b.append(STR); b.append(e.getValue()); if (ite.hasNext()) { b.append("\n"); } } return b.toSt...
/** * Textual representation of the table of symbol. * * @return all the variables and their content. One variable per line. */
Textual representation of the table of symbol
toString
{ "repo_name": "btrplace/scheduler-UCC-15", "path": "btrpsl/src/main/java/org/btrplace/btrpsl/SymbolsTable.java", "license": "lgpl-3.0", "size": 6034 }
[ "java.util.Iterator", "java.util.Map", "org.btrplace.btrpsl.element.BtrpOperand" ]
import java.util.Iterator; import java.util.Map; import org.btrplace.btrpsl.element.BtrpOperand;
import java.util.*; import org.btrplace.btrpsl.element.*;
[ "java.util", "org.btrplace.btrpsl" ]
java.util; org.btrplace.btrpsl;
666,232
private void addSetting(SharedPreferences prefs, String key, String defvalue) { final ContentValues values = new ContentValues(); values.put(COL_SETTINGS_NAME, key); values.put(COL_SETTINGS_VALUE, prefs.getString(key, defvalue)); getBdd().insert(TABLE_SETTINGS, null, values); }
void function(SharedPreferences prefs, String key, String defvalue) { final ContentValues values = new ContentValues(); values.put(COL_SETTINGS_NAME, key); values.put(COL_SETTINGS_VALUE, prefs.getString(key, defvalue)); getBdd().insert(TABLE_SETTINGS, null, values); }
/** * Adds a setting * @param prefs The application preference. * @param key The preference key. * @param defvalue The default value. */
Adds a setting
addSetting
{ "repo_name": "Keidan/WorkTime", "path": "app/src/main/java/fr/ralala/worktime/sql/SqlFactory.java", "license": "gpl-3.0", "size": 25106 }
[ "android.content.ContentValues", "android.content.SharedPreferences" ]
import android.content.ContentValues; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
351,172
public DistributionRegion getRootNode() { // Reload root node if(rootNode == null) { final String groupNameString = distributionGroupName.toString(); final String path = distributionGroupAdapter.getDistributionGroupRootElementPath(groupNameString); try { if(NodeMutationHelper.isNodeCompletelyCreat...
DistributionRegion function() { if(rootNode == null) { final String groupNameString = distributionGroupName.toString(); final String path = distributionGroupAdapter.getDistributionGroupRootElementPath(groupNameString); try { if(NodeMutationHelper.isNodeCompletelyCreated(zookeeperClient, path)) { logger.info(STR, distri...
/** * Get the root node * @return */
Get the root node
getRootNode
{ "repo_name": "jnidzwetzki/scalephant", "path": "bboxdb-server/src/main/java/org/bboxdb/distribution/region/DistributionRegionSyncer.java", "license": "apache-2.0", "size": 14919 }
[ "org.bboxdb.commons.math.Hyperrectangle", "org.bboxdb.distribution.zookeeper.NodeMutationHelper", "org.bboxdb.distribution.zookeeper.ZookeeperException", "org.bboxdb.distribution.zookeeper.ZookeeperNotFoundException" ]
import org.bboxdb.commons.math.Hyperrectangle; import org.bboxdb.distribution.zookeeper.NodeMutationHelper; import org.bboxdb.distribution.zookeeper.ZookeeperException; import org.bboxdb.distribution.zookeeper.ZookeeperNotFoundException;
import org.bboxdb.commons.math.*; import org.bboxdb.distribution.zookeeper.*;
[ "org.bboxdb.commons", "org.bboxdb.distribution" ]
org.bboxdb.commons; org.bboxdb.distribution;
2,336,182
@Consumes("*/*") @Produces("text/plain") @BlockingHandler(order = 1) @Get(value = "/multiRoutes/2", regex = true) public void handler2() { res.write("multiRoutes 2\n"); res.end(); }
@Consumes("*/*") @Produces(STR) @BlockingHandler(order = 1) @Get(value = STR, regex = true) void function() { res.write(STR); res.end(); }
/** * Handler 2. */
Handler 2
handler2
{ "repo_name": "jspare-projects/vertx-jspare", "path": "vertx-jspare-web/src/test/java/org/jspare/vertx/web/builder/route/MultiRoutes.java", "license": "apache-2.0", "size": 1502 }
[ "org.jspare.vertx.web.annotation.content.Consumes", "org.jspare.vertx.web.annotation.content.Produces", "org.jspare.vertx.web.annotation.handler.BlockingHandler", "org.jspare.vertx.web.annotation.method.Get" ]
import org.jspare.vertx.web.annotation.content.Consumes; import org.jspare.vertx.web.annotation.content.Produces; import org.jspare.vertx.web.annotation.handler.BlockingHandler; import org.jspare.vertx.web.annotation.method.Get;
import org.jspare.vertx.web.annotation.content.*; import org.jspare.vertx.web.annotation.handler.*; import org.jspare.vertx.web.annotation.method.*;
[ "org.jspare.vertx" ]
org.jspare.vertx;
1,402,927
public static ParquetMetadata readFooter(Configuration configuration, Path file, MetadataFilter filter) throws IOException { FileSystem fileSystem = file.getFileSystem(configuration); return readFooter(configuration, fileSystem.getFileStatus(file), filter); } /** * @deprecated use {@link ParquetFileRe...
static ParquetMetadata function(Configuration configuration, Path file, MetadataFilter filter) throws IOException { FileSystem fileSystem = file.getFileSystem(configuration); return readFooter(configuration, fileSystem.getFileStatus(file), filter); } /** * @deprecated use {@link ParquetFileReader#readFooter(Configurati...
/** * Reads the meta data in the footer of the file. * Skipping row groups (or not) based on the provided filter * @param configuration * @param file the Parquet File * @param filter the filter to apply to row groups * @return the metadata with row groups filtered. * @throws IOException if an erro...
Reads the meta data in the footer of the file. Skipping row groups (or not) based on the provided filter
readFooter
{ "repo_name": "SaintBacchus/parquet-mr", "path": "parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java", "license": "apache-2.0", "size": 42228 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.parquet.format.converter.ParquetMetadataConverter", "org.apache.parquet.hadoop.metadata.ParquetMetadata" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.parquet.format.converter.ParquetMetadataConverter; import org.apache.parquet.hadoop.metadata.ParquetMetadata;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.parquet.format.converter.*; import org.apache.parquet.hadoop.metadata.*;
[ "java.io", "org.apache.hadoop", "org.apache.parquet" ]
java.io; org.apache.hadoop; org.apache.parquet;
845,811
public KeyGroupsStateHandle getSnapshotResultStateHandle() { return snapshotResultStateHandle; }
KeyGroupsStateHandle function() { return snapshotResultStateHandle; }
/** * Returns a state handle to the snapshot after the snapshot procedure is completed and null before. * * @return state handle to the completed snapshot */
Returns a state handle to the snapshot after the snapshot procedure is completed and null before
getSnapshotResultStateHandle
{ "repo_name": "PangZhi/flink", "path": "flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java", "license": "apache-2.0", "size": 75037 }
[ "org.apache.flink.runtime.state.KeyGroupsStateHandle" ]
import org.apache.flink.runtime.state.KeyGroupsStateHandle;
import org.apache.flink.runtime.state.*;
[ "org.apache.flink" ]
org.apache.flink;
2,405,470
private void checkError() throws IOException { final Throwable t = channelError.get(); if (t != null) { if (t instanceof IOException) { throw (IOException) t; } else { throw new IOException("There has been an error in the channel.", t); } } }
void function() throws IOException { final Throwable t = channelError.get(); if (t != null) { if (t instanceof IOException) { throw (IOException) t; } else { throw new IOException(STR, t); } } }
/** * Checks for an error and rethrows it if one was reported. */
Checks for an error and rethrows it if one was reported
checkError
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClientHandler.java", "license": "apache-2.0", "size": 15032 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,756,275
public static <R,T> List<Entry<R,T>> sortMapToEntryList(Map<R,T> mapToSort,String keyOrValue,String sortType,Class<? extends Comparable> classType) throws SecurityException, NoSuchMethodException{ List<Entry<R,T>> sortMapList = new ArrayList<Entry<R,T>>(mapToSort.entrySet()); Collections.sort(sortMapList, new Ma...
static <R,T> List<Entry<R,T>> function(Map<R,T> mapToSort,String keyOrValue,String sortType,Class<? extends Comparable> classType) throws SecurityException, NoSuchMethodException{ List<Entry<R,T>> sortMapList = new ArrayList<Entry<R,T>>(mapToSort.entrySet()); Collections.sort(sortMapList, new MapEntryComparator(keyOrVa...
/** * * CommonConstant.KEY * CommonConstant.SORT_CRITERIA_ASC * CommonConstant.SORT_CRITERIA_DESC * CommonConstant.VALUEs * @param mapToSort * @param keyOrValue * @param sortType * @param comparator * @param classType 类型 比较的类型 * @return * @throws NoSuchMethodException * @throws SecurityExcep...
CommonConstant.KEY CommonConstant.SORT_CRITERIA_ASC CommonConstant.SORT_CRITERIA_DESC CommonConstant.VALUEs
sortMapToEntryList
{ "repo_name": "magenm/bsming", "path": "bsming/common/util-lib/src/main/java/com/bsming/common/util/MyMapUtil.java", "license": "apache-2.0", "size": 16535 }
[ "com.bsming.common.compare.MapEntryComparator", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.Map" ]
import com.bsming.common.compare.MapEntryComparator; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map;
import com.bsming.common.compare.*; import java.util.*;
[ "com.bsming.common", "java.util" ]
com.bsming.common; java.util;
820,494
EAttribute getExpression_Operator();
EAttribute getExpression_Operator();
/** * Returns the meta object for the attribute '{@link org.etl.sparrow.Expression#getOperator <em>Operator</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Operator</em>'. * @see org.etl.sparrow.Expression#getOperator() * @see #getExpression()...
Returns the meta object for the attribute '<code>org.etl.sparrow.Expression#getOperator Operator</code>'.
getExpression_Operator
{ "repo_name": "jpvelsamy/sparrow", "path": "org.etl.dsl.etl.Sparrow/src-gen/org/etl/sparrow/SparrowPackage.java", "license": "apache-2.0", "size": 104623 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,143,389
public SObjectBatch addUpsertByExternalId( final String type, final String fieldName, final String fieldValue, final AbstractSObjectBase data) { return addUpdateByExternalId(type, fieldName, fieldValue, data); }
SObjectBatch function( final String type, final String fieldName, final String fieldValue, final AbstractSObjectBase data) { return addUpdateByExternalId(type, fieldName, fieldValue, data); }
/** * Add insert or update of SObject record by external identifier to the batch. The given {@code data} parameter must * contain only the fields that need updating and must not contain the {@code Id} field. So set any fields to * {@code null} that you do not want changed along with {@code Id} field. ...
Add insert or update of SObject record by external identifier to the batch. The given data parameter must contain only the fields that need updating and must not contain the Id field. So set any fields to null that you do not want changed along with Id field
addUpsertByExternalId
{ "repo_name": "adessaigne/camel", "path": "components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatch.java", "license": "apache-2.0", "size": 14643 }
[ "org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase" ]
import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
import org.apache.camel.component.salesforce.api.dto.*;
[ "org.apache.camel" ]
org.apache.camel;
1,298,882
private void initialize() { setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); JPanel mainPane = new JPanel(new BorderLayout()); mainPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); setContentPane(mainPane); Box buttonBox = Box...
void function() { setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); JPanel mainPane = new JPanel(new BorderLayout()); mainPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); setContentPane(mainPane); Box buttonBox = Box.createHorizontalBox(); buttonBox.add(Box.createHorizontalGlue()); buttonBox.add(Box....
/** * Set up the UI elements */
Set up the UI elements
initialize
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/test/org/openquark/cal/compiler/SourceModelVisualizer.java", "license": "bsd-3-clause", "size": 34092 }
[ "java.awt.BorderLayout", "java.awt.Container", "java.awt.Dimension", "java.awt.Font", "javax.swing.BorderFactory", "javax.swing.Box", "javax.swing.JPanel", "javax.swing.WindowConstants" ]
import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; import java.awt.Font; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.JPanel; import javax.swing.WindowConstants;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
207,290
private void addProp(String name, JsonNode value) { if (reserved.contains(name)) throw new AvroRuntimeException("Can't set reserved property: " + name); if (value == null) throw new AvroRuntimeException("Can't set a property to null: " + name); JsonNode old = props.putIfAbsent(name, value); ...
void function(String name, JsonNode value) { if (reserved.contains(name)) throw new AvroRuntimeException(STR + name); if (value == null) throw new AvroRuntimeException(STR + name); JsonNode old = props.putIfAbsent(name, value); if (old != null && !old.equals(value)) { throw new AvroRuntimeException(STR + name); } }
/** * Adds a property with the given name <tt>name</tt> and value <tt>value</tt>. * Neither <tt>name</tt> nor <tt>value</tt> can be <tt>null</tt>. It is illegal * to add a property if another with the same name but different value already * exists in this schema. * * @param name The name of the prope...
Adds a property with the given name name and value value. Neither name nor value can be null. It is illegal to add a property if another with the same name but different value already exists in this schema
addProp
{ "repo_name": "apache/avro", "path": "lang/java/avro/src/main/java/org/apache/avro/JsonProperties.java", "license": "apache-2.0", "size": 9556 }
[ "com.fasterxml.jackson.databind.JsonNode" ]
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,208,961
public synchronized Credentials getCredentials() { Credentials creds = new Credentials(getCredentialsInternal()); Iterator<Token<?>> iter = creds.getAllTokens().iterator(); while (iter.hasNext()) { if (iter.next() instanceof Token.PrivateToken) { iter.remove(); } } return creds...
synchronized Credentials function() { Credentials creds = new Credentials(getCredentialsInternal()); Iterator<Token<?>> iter = creds.getAllTokens().iterator(); while (iter.hasNext()) { if (iter.next() instanceof Token.PrivateToken) { iter.remove(); } } return creds; }
/** * Obtain the tokens in credentials form associated with this user. * * @return Credentials of tokens associated with this user */
Obtain the tokens in credentials form associated with this user
getCredentials
{ "repo_name": "fyqls/hadoop-2.4.0", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java", "license": "apache-2.0", "size": 54794 }
[ "java.util.Iterator", "org.apache.hadoop.security.token.Token" ]
import java.util.Iterator; import org.apache.hadoop.security.token.Token;
import java.util.*; import org.apache.hadoop.security.token.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
732,749
Iterator iterator(Object key, Class type);
Iterator iterator(Object key, Class type);
/** * Generates an Iterator to browse the context */
Generates an Iterator to browse the context
iterator
{ "repo_name": "akardapolov/ASH-Viewer", "path": "egantt/src/main/java/com/egantt/model/drawing/DrawingContext.java", "license": "gpl-3.0", "size": 769 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,731,650
public Double getChannelKnownMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getSeries()][theC]); }
Double function(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getSeries()][theC]); }
/** * Retrieves the specified channel's minimum based on the images that have * been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */
Retrieves the specified channel's minimum based on the images that have been read. Returns null if no image planes have been read yet
getChannelKnownMinimum
{ "repo_name": "stelfrich/bioformats", "path": "components/formats-bsd/src/loci/formats/MinMaxCalculator.java", "license": "gpl-2.0", "size": 13970 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,702,912
@Test public void testStringContentSignature() throws Exception { KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); KeyPair kp = kpg.genKeyPair(); String arbitContent = "I am A String"; byte[] sigVal = SignatureUtil.sign(arbitContent, kp.getPrivate()); boolean valid =...
void function() throws Exception { KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA"); KeyPair kp = kpg.genKeyPair(); String arbitContent = STR; byte[] sigVal = SignatureUtil.sign(arbitContent, kp.getPrivate()); boolean valid = SignatureUtil.validate(arbitContent.getBytes(), sigVal, kp.getPublic()); assertTrue(...
/** * Test signing a string * * @throws Exception */
Test signing a string
testStringContentSignature
{ "repo_name": "taylor-project/taylor-picketlink-2.0.3", "path": "federation/picketlink-fed-api/src/test/java/org/picketlink/test/identity/federation/api/saml/v2/SignatureValidationUnitTestCase.java", "license": "gpl-2.0", "size": 9589 }
[ "java.security.KeyPair", "java.security.KeyPairGenerator", "org.junit.Assert", "org.picketlink.identity.federation.core.saml.v2.util.SignatureUtil" ]
import java.security.KeyPair; import java.security.KeyPairGenerator; import org.junit.Assert; import org.picketlink.identity.federation.core.saml.v2.util.SignatureUtil;
import java.security.*; import org.junit.*; import org.picketlink.identity.federation.core.saml.v2.util.*;
[ "java.security", "org.junit", "org.picketlink.identity" ]
java.security; org.junit; org.picketlink.identity;
140,480
public void testUriGetMaxPoints() { final UniqueId uid = UID.withVersion(VersionCorrection.LATEST.toString()); final URI uri = uriGet(_baseUri, uid, START, INCLUDE_END, END, INCLUDE_END, MAX_POINTS); assertEquals(uri.getPath(), "path/to/hts/" + UID.toString()); assertEquals(uri.getQuery(), "version=VL...
void function() { final UniqueId uid = UID.withVersion(VersionCorrection.LATEST.toString()); final URI uri = uriGet(_baseUri, uid, START, INCLUDE_END, END, INCLUDE_END, MAX_POINTS); assertEquals(uri.getPath(), STR + UID.toString()); assertEquals(uri.getQuery(), STR); }
/** * Tests the URI that is built. */
Tests the URI that is built
testUriGetMaxPoints
{ "repo_name": "McLeodMoores/starling", "path": "projects/core-rest-client/src/test/java/com/opengamma/core/historicaltimeseries/impl/DataHistoricalTimeSeriesSourceUrisTest.java", "license": "apache-2.0", "size": 23342 }
[ "com.opengamma.core.historicaltimeseries.impl.DataHistoricalTimeSeriesSourceUris", "com.opengamma.id.UniqueId", "com.opengamma.id.VersionCorrection", "org.testng.Assert" ]
import com.opengamma.core.historicaltimeseries.impl.DataHistoricalTimeSeriesSourceUris; import com.opengamma.id.UniqueId; import com.opengamma.id.VersionCorrection; import org.testng.Assert;
import com.opengamma.core.historicaltimeseries.impl.*; import com.opengamma.id.*; import org.testng.*;
[ "com.opengamma.core", "com.opengamma.id", "org.testng" ]
com.opengamma.core; com.opengamma.id; org.testng;
2,313,651
@Override public Comparator<? super K> comparator() { return m_KeyComparator; } /** * Returns a view of the portion of this map whose keys range from * {@code fromKey}, inclusive, to {@code toKey}, exclusive. If * {@code fromKey} and {@code toKey} are equal, the returned map ...
Comparator<? super K> function() { return m_KeyComparator; } /** * Returns a view of the portion of this map whose keys range from * {@code fromKey}, inclusive, to {@code toKey}, exclusive. If * {@code fromKey} and {@code toKey} are equal, the returned map * is empty. The returned map is backed by this map. The returne...
/** * Returns the comparator used to order the keys in this map, or * {@code null} if this map uses the {@code Comparable} natural ordering * of its keys. * * @return the comparator used to order the keys in this map, * or {@code null} if this map uses the natural ordering of its keys ...
Returns the comparator used to order the keys in this map, or null if this map uses the Comparable natural ordering of its keys
comparator
{ "repo_name": "run2000/java-immutable-collections", "path": "src/net/njcull/collections/ImmutableUniSortedArrayMap.java", "license": "bsd-3-clause", "size": 26588 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,008,667
private static void createSharedBundleFramework(BundleContext bc, BundleFrameworkConfigurationFactory bundleFrameworkConfigFactory, BundleFrameworkFactory bundleFrameworkFactory) throws ContextException { LOGGER.debug(LOG_ENTRY, "createSharedBundleFramework", new Object[] { bc, bundleFramewo...
static void function(BundleContext bc, BundleFrameworkConfigurationFactory bundleFrameworkConfigFactory, BundleFrameworkFactory bundleFrameworkFactory) throws ContextException { LOGGER.debug(LOG_ENTRY, STR, new Object[] { bc, bundleFrameworkFactory }); try { BundleFrameworkConfiguration config = new SharedBundleFramewo...
/** * create using any bundle context in EBA App framework as we want to create * a child framework under EBA App framework * * @param bc * @throws BundleException * @throws InvalidSyntaxException */
create using any bundle context in EBA App framework as we want to create a child framework under EBA App framework
createSharedBundleFramework
{ "repo_name": "apache/aries", "path": "application/application-runtime-framework-management/src/main/java/org/apache/aries/application/runtime/framework/management/SharedBundleFramework.java", "license": "apache-2.0", "size": 5863 }
[ "org.apache.aries.application.management.spi.framework.BundleFramework", "org.apache.aries.application.management.spi.framework.BundleFrameworkConfiguration", "org.apache.aries.application.management.spi.framework.BundleFrameworkConfigurationFactory", "org.apache.aries.application.management.spi.framework.Bun...
import org.apache.aries.application.management.spi.framework.BundleFramework; import org.apache.aries.application.management.spi.framework.BundleFrameworkConfiguration; import org.apache.aries.application.management.spi.framework.BundleFrameworkConfigurationFactory; import org.apache.aries.application.management.spi.fr...
import org.apache.aries.application.management.spi.framework.*; import org.apache.aries.application.management.spi.repository.*; import org.osgi.framework.*;
[ "org.apache.aries", "org.osgi.framework" ]
org.apache.aries; org.osgi.framework;
2,871,130
public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater myInflater = LayoutInflater.from(getContext()); View customView = myInflater.inflate(R.layout.row_profilematch, parent, false); String singleStringItem = (String) getItem (position); TextView title = (...
View function(int position, View convertView, ViewGroup parent) { LayoutInflater myInflater = LayoutInflater.from(getContext()); View customView = myInflater.inflate(R.layout.row_profilematch, parent, false); String singleStringItem = (String) getItem (position); TextView title = (TextView)customView.findViewById(R.id....
/** * Gets a specific view * @param position The position of the view * @param convertView The old view to reuse * @param parent The partent of the view * @return The view */
Gets a specific view
getView
{ "repo_name": "Jooster2/DAT255", "path": "app/src/main/java/com/soctec/soctec/profile/ProfileMatchAdapter.java", "license": "apache-2.0", "size": 1731 }
[ "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup", "android.widget.TextView" ]
import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,838,653
public void test_loadAndVerify_smallWithBlobs_quadsMode() throws Exception { final String resource = "bigdata-rdf/src/test/com/bigdata/rdf/rio/smallWithBlobs.rdf"; final Properties p = getProperties(); p.setProperty(AbstractTripleStore.Options.QUADS, "true"); ...
void function() throws Exception { final String resource = STR; final Properties p = getProperties(); p.setProperty(AbstractTripleStore.Options.QUADS, "true"); doLoadAndVerifyTest(resource, p); }
/** * Test with the "smallWithBlobs.rdf" data set in quads mode. */
Test with the "smallWithBlobs.rdf" data set in quads mode
test_loadAndVerify_smallWithBlobs_quadsMode
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata-rdf/src/test/com/bigdata/rdf/rio/TestAsynchronousStatementBufferFactory.java", "license": "gpl-2.0", "size": 20038 }
[ "com.bigdata.rdf.store.AbstractTripleStore", "java.util.Properties" ]
import com.bigdata.rdf.store.AbstractTripleStore; import java.util.Properties;
import com.bigdata.rdf.store.*; import java.util.*;
[ "com.bigdata.rdf", "java.util" ]
com.bigdata.rdf; java.util;
159,370
/////////////////////////////////////////////////////////////// // Reader -> byte[] public static byte[] toByteArray( final Reader input ) throws IOException { return toByteArray( input, DEFAULT_BUFFER_SIZE ); }
static byte[] function( final Reader input ) throws IOException { return toByteArray( input, DEFAULT_BUFFER_SIZE ); }
/** * Get the contents of a <code>Reader</code> as a <code>byte[]</code>. */
Get the contents of a <code>Reader</code> as a <code>byte[]</code>
toByteArray
{ "repo_name": "CCM-Modding/Nucleum-Omnium", "path": "src/main/java/ccm/libs/org/codehaus/plexus/util/IOUtil.java", "license": "mit", "size": 29391 }
[ "java.io.IOException", "java.io.Reader" ]
import java.io.IOException; import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,478,906
public int getHScrollbarHeight() { ScrollPanePeer spp = (ScrollPanePeer)getPeer(); if (spp != null) return(spp.getHScrollbarHeight()); else return(0); // FIXME: What to do here? }
int function() { ScrollPanePeer spp = (ScrollPanePeer)getPeer(); if (spp != null) return(spp.getHScrollbarHeight()); else return(0);}
/** * Returns the height of a horizontal scrollbar. * * @return The height of a horizontal scrollbar. */
Returns the height of a horizontal scrollbar
getHScrollbarHeight
{ "repo_name": "unofficial-opensource-apple/gcc_40", "path": "libjava/java/awt/ScrollPane.java", "license": "gpl-2.0", "size": 16255 }
[ "java.awt.peer.ScrollPanePeer" ]
import java.awt.peer.ScrollPanePeer;
import java.awt.peer.*;
[ "java.awt" ]
java.awt;
810,781
public static void close(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException sex) { // ignore } }
static void function(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException sex) { } }
/** * Closes result set safely without throwing an exception. */
Closes result set safely without throwing an exception
close
{ "repo_name": "Artemish/jodd", "path": "jodd-db/src/main/java/jodd/db/DbUtil.java", "license": "bsd-3-clause", "size": 3244 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,337
public static void dumpMediaCodecListForFormat(@NonNull MediaCodecList mediaCodecList, @NonNull MediaFormat mediaFormat) { Logger.d(TAG, "[Start] Dump MediaCodecList for mediaFormat " + mediaFormat); String mime = mediaFormat.getString(MediaFormat.KEY_MIME); for (MediaCodecInfo ...
static void function(@NonNull MediaCodecList mediaCodecList, @NonNull MediaFormat mediaFormat) { Logger.d(TAG, STR + mediaFormat); String mime = mediaFormat.getString(MediaFormat.KEY_MIME); for (MediaCodecInfo mediaCodecInfo : mediaCodecList.getCodecInfos()) { if (!mediaCodecInfo.isEncoder()) { continue; } try { Precon...
/** * Dumps {@link MediaCodecInfo} of input {@link MediaCodecList} and support for input * {@link MediaFormat}. */
Dumps <code>MediaCodecInfo</code> of input <code>MediaCodecList</code> and support for input <code>MediaFormat</code>
dumpMediaCodecListForFormat
{ "repo_name": "AndroidX/androidx", "path": "camera/camera-video/src/main/java/androidx/camera/video/internal/DebugUtils.java", "license": "apache-2.0", "size": 13367 }
[ "android.media.MediaCodecInfo", "android.media.MediaCodecList", "android.media.MediaFormat", "androidx.annotation.NonNull", "androidx.camera.core.Logger", "androidx.core.util.Preconditions" ]
import android.media.MediaCodecInfo; import android.media.MediaCodecList; import android.media.MediaFormat; import androidx.annotation.NonNull; import androidx.camera.core.Logger; import androidx.core.util.Preconditions;
import android.media.*; import androidx.annotation.*; import androidx.camera.core.*; import androidx.core.util.*;
[ "android.media", "androidx.annotation", "androidx.camera", "androidx.core" ]
android.media; androidx.annotation; androidx.camera; androidx.core;
1,626,176
@Override public void resetTX(Transaction transaction) { this.tx = transaction; this.autoCommitAcks = transaction == null; this.autoCommitSends = transaction == null; }
void function(Transaction transaction) { this.tx = transaction; this.autoCommitAcks = transaction == null; this.autoCommitSends = transaction == null; }
/** * Some protocols may chose to hold their transactions outside of the ServerSession. * This can be used to replace the transaction. * Notice that we set autoCommitACK and autoCommitSends to true if tx == null */
Some protocols may chose to hold their transactions outside of the ServerSession. This can be used to replace the transaction. Notice that we set autoCommitACK and autoCommitSends to true if tx == null
resetTX
{ "repo_name": "dudaerich/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java", "license": "apache-2.0", "size": 62441 }
[ "org.apache.activemq.artemis.core.transaction.Transaction" ]
import org.apache.activemq.artemis.core.transaction.Transaction;
import org.apache.activemq.artemis.core.transaction.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,114,211
private void init(String host, int mask) { // Set the integer mask that represents the actions if ((mask & ALL) != mask) throw new IllegalArgumentException("invalid actions mask"); // always OR in RESOLVE if we allow any of the others this.mask = mask | RESOLVE; ...
void function(String host, int mask) { if ((mask & ALL) != mask) throw new IllegalArgumentException(STR); this.mask = mask RESOLVE; int rb = 0 ; int start = 0, end = 0; int sep = -1; String hostport = host; if (host.charAt(0) == '[') { start = 1; rb = host.indexOf(']'); if (rb != -1) { host = host.substring(start, rb);...
/** * Initialize the SocketPermission object. We don't do any DNS lookups * as this point, instead we hold off until the implies method is * called. */
Initialize the SocketPermission object. We don't do any DNS lookups as this point, instead we hold off until the implies method is called
init
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/java/net/SocketPermission.java", "license": "mit", "size": 50274 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
589,500
void setFile(File jarFile);
void setFile(File jarFile);
/** * Sets the jar file output for this binary. */
Sets the jar file output for this binary
setFile
{ "repo_name": "gstevey/gradle", "path": "subprojects/platform-jvm/src/main/java/org/gradle/jvm/internal/JarFile.java", "license": "apache-2.0", "size": 958 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,646,954
public void centerRange(double value) { double central = this.range.getCentralValue(); Range adjusted = new Range(this.range.getLowerBound() + value - central, this.range.getUpperBound() + value - central); setRange(adjusted); }
void function(double value) { double central = this.range.getCentralValue(); Range adjusted = new Range(this.range.getLowerBound() + value - central, this.range.getUpperBound() + value - central); setRange(adjusted); }
/** * Centers the axis range about the specified value and sends an * {@link AxisChangeEvent} to all registered listeners. * * @param value the center value. */
Centers the axis range about the specified value and sends an <code>AxisChangeEvent</code> to all registered listeners
centerRange
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/axis/ValueAxis.java", "license": "gpl-3.0", "size": 58096 }
[ "org.jfree.data.Range" ]
import org.jfree.data.Range;
import org.jfree.data.*;
[ "org.jfree.data" ]
org.jfree.data;
701,863
private void freeNode(DynamicTreeNode argNode) { assert (argNode != null); assert (0 < m_nodeCount); nodeStack.push(argNode); m_nodeCount--; } private Vec2 center = new Vec2(); private Vec2 delta1 = new Vec2(); private Vec2 delta2 = new Vec2();
void function(DynamicTreeNode argNode) { assert (argNode != null); assert (0 < m_nodeCount); nodeStack.push(argNode); m_nodeCount--; } private Vec2 center = new Vec2(); private Vec2 delta1 = new Vec2(); private Vec2 delta2 = new Vec2();
/** * returns a node to the pool * * @param argNode */
returns a node to the pool
freeNode
{ "repo_name": "dragome/dragome-examples", "path": "dragome-jbox2d-examples/src/main/java/org/jbox2d/collision/broadphase/DynamicTree.java", "license": "gpl-3.0", "size": 16196 }
[ "org.jbox2d.common.Vec2" ]
import org.jbox2d.common.Vec2;
import org.jbox2d.common.*;
[ "org.jbox2d.common" ]
org.jbox2d.common;
1,844,305
public void setDossierProcessPersistence( DossierProcessPersistence dossierProcessPersistence) { this.dossierProcessPersistence = dossierProcessPersistence; }
void function( DossierProcessPersistence dossierProcessPersistence) { this.dossierProcessPersistence = dossierProcessPersistence; }
/** * Sets the dossier process persistence. * * @param dossierProcessPersistence the dossier process persistence */
Sets the dossier process persistence
setDossierProcessPersistence
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-processmgt-portlet/docroot/WEB-INF/src/org/oep/processmgt/service/base/TransitionHistoryServiceBaseImpl.java", "license": "apache-2.0", "size": 35780 }
[ "org.oep.processmgt.service.persistence.DossierProcessPersistence" ]
import org.oep.processmgt.service.persistence.DossierProcessPersistence;
import org.oep.processmgt.service.persistence.*;
[ "org.oep.processmgt" ]
org.oep.processmgt;
1,189,337
@Override int lookForSelectablePosition(int position, boolean lookDown) { final ListAdapter adapter = mAdapter; if (adapter == null || isInTouchMode()) { return INVALID_POSITION; } final int count = adapter.getCount(); if (!mAreAllItemsSelectable) { ...
int lookForSelectablePosition(int position, boolean lookDown) { final ListAdapter adapter = mAdapter; if (adapter == null isInTouchMode()) { return INVALID_POSITION; } final int count = adapter.getCount(); if (!mAreAllItemsSelectable) { if (lookDown) { position = Math.max(0, position); while (position < count && !adapt...
/** * Find a position that can be selected (i.e., is not a separator). * * @param position The starting position to look at. * @param lookDown Whether to look down for other positions. * @return The next selectable position starting at position and then * searching either up or down. Retur...
Find a position that can be selected (i.e., is not a separator)
lookForSelectablePosition
{ "repo_name": "arvin015/cookbooksa", "path": "src/com/waterfull/lib/PLA_ListView.java", "license": "gpl-2.0", "size": 76370 }
[ "android.widget.ListAdapter" ]
import android.widget.ListAdapter;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,775,997
private boolean isJmxAgentConnected() { boolean connected = jmxConnector != null && mBeanServerConnection != null; if (connected) { try { jmxConnector.getConnectionId(); } catch (IOException e) { connected = false; } } ...
boolean function() { boolean connected = jmxConnector != null && mBeanServerConnection != null; if (connected) { try { jmxConnector.getConnectionId(); } catch (IOException e) { connected = false; } } return connected; }
/** * Determines whether debug manager is connected to JMX agent. * * @return true if debug manager is connected to JMX agent. */
Determines whether debug manager is connected to JMX agent
isJmxAgentConnected
{ "repo_name": "PerfCake/pc4ide", "path": "pc4ide-core/src/main/java/org/perfcake/ide/core/exec/ExecutionManagerImpl.java", "license": "apache-2.0", "size": 13924 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,772,072
Iterable<Node> deletedNodes();
Iterable<Node> deletedNodes();
/** * Get the nodes that were deleted during the transaction. * * @return all nodes that were deleted during the transaction. */
Get the nodes that were deleted during the transaction
deletedNodes
{ "repo_name": "HuangLS/neo4j", "path": "community/kernel/src/main/java/org/neo4j/graphdb/event/TransactionData.java", "license": "apache-2.0", "size": 6927 }
[ "org.neo4j.graphdb.Node" ]
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.*;
[ "org.neo4j.graphdb" ]
org.neo4j.graphdb;
2,378,938
@param file File object @return DDS image object @throws java.io.IOException if an I/O exception occurred */ public static TEXImage read(File file) throws IOException { TEXImage image = new TEXImage(); image.readFromFile(file); return image; } /** Reads a DirectDraw surface from the specified By...
@param file File object @return DDS image object @throws java.io.IOException if an I/O exception occurred */ static TEXImage function(File file) throws IOException { TEXImage image = new TEXImage(); image.readFromFile(file); return image; } /** Reads a DirectDraw surface from the specified ByteBuffer, returning the res...
/** Reads a DirectDraw surface from the specified file, returning the resulting DDSImage. @param file File object @return DDS image object @throws java.io.IOException if an I/O exception occurred */
Reads a DirectDraw surface from the specified file, returning
read
{ "repo_name": "Dahie/DDS-Utils", "path": "DDSUtils/src/jogl/TEXImage.java", "license": "gpl-3.0", "size": 18274 }
[ "java.io.File", "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.File; import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
336,324
static public String getString(String msg, Object[] args) { String format = msg; if (bundle != null) { try { format = bundle.getString(msg); } catch (MissingResourceException e) { } } return format(format, args); }
static String function(String msg, Object[] args) { String format = msg; if (bundle != null) { try { format = bundle.getString(msg); } catch (MissingResourceException e) { } } return format(format, args); }
/** * Retrieves a message which takes several arguments. * * @param msg * String the key to look up. * @param args * Object[] the objects to insert in the formatted output. * @return String the message for that key in the system message bundle. */
Retrieves a message which takes several arguments
getString
{ "repo_name": "cloudeecn/fiscevm", "path": "fiscevm-runtime/src/main/java/org/apache/harmony/luni/internal/nls/Messages.java", "license": "gpl-3.0", "size": 8784 }
[ "java.util.MissingResourceException" ]
import java.util.MissingResourceException;
import java.util.*;
[ "java.util" ]
java.util;
1,521,504
default Stream<GroupModel> getSubGroupsStream() { Set<GroupModel> value = this.getSubGroups(); return value != null ? value.stream() : Stream.empty(); }
default Stream<GroupModel> getSubGroupsStream() { Set<GroupModel> value = this.getSubGroups(); return value != null ? value.stream() : Stream.empty(); }
/** * Returns all sub groups for the parent group as a stream. * @return Stream of {@link GroupModel}. Never returns {@code null}. */
Returns all sub groups for the parent group as a stream
getSubGroupsStream
{ "repo_name": "abstractj/keycloak", "path": "server-spi/src/main/java/org/keycloak/models/GroupModel.java", "license": "apache-2.0", "size": 5743 }
[ "java.util.Set", "java.util.stream.Stream" ]
import java.util.Set; import java.util.stream.Stream;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
219,988
public static JToggleButton findJToggleButton(Container cont, String text, boolean ce, boolean ccs, int index) { return (findJToggleButton(cont, new JToggleButtonFinder(new AbstractButtonOperator.AbstractButtonByLabelFinder(text, new DefaultStringComparator(ce, ccs)))...
static JToggleButton function(Container cont, String text, boolean ce, boolean ccs, int index) { return (findJToggleButton(cont, new JToggleButtonFinder(new AbstractButtonOperator.AbstractButtonByLabelFinder(text, new DefaultStringComparator(ce, ccs))), index)); }
/** * Searches JToggleButton by text. * * @param cont Container to search component in. * @param text Button text. If null, contents is not checked. * @param ce Compare text exactly. * @param ccs Compare text case sensitively. * @param index Ordinal component index. * @return JTo...
Searches JToggleButton by text
findJToggleButton
{ "repo_name": "md-5/jdk10", "path": "test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/JToggleButtonOperator.java", "license": "gpl-2.0", "size": 10185 }
[ "java.awt.Container", "javax.swing.JToggleButton" ]
import java.awt.Container; import javax.swing.JToggleButton;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
524,433
public static boolean reThrowIfNotNull(@Nullable Throwable e) { if (e != null) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RuntimeException(e); } } return true; }
static boolean function(@Nullable Throwable e) { if (e != null) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new RuntimeException(e); } } return true; }
/** * Throws the specified exception. If null if specified then <code>true</code> is returned. */
Throws the specified exception. If null if specified then <code>true</code> is returned
reThrowIfNotNull
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/ExceptionsHelper.java", "license": "apache-2.0", "size": 12648 }
[ "org.elasticsearch.core.Nullable" ]
import org.elasticsearch.core.Nullable;
import org.elasticsearch.core.*;
[ "org.elasticsearch.core" ]
org.elasticsearch.core;
258,992
return new String[] { FileField.TYPE }; }
return new String[] { FileField.TYPE }; }
/** * Returns the name of the managed types. */
Returns the name of the managed types
getManagedTypes
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/formtemplate/src/main/java/com/silverpeas/form/displayers/FileFieldDisplayer.java", "license": "agpl-3.0", "size": 22163 }
[ "com.silverpeas.form.fieldType.FileField" ]
import com.silverpeas.form.fieldType.FileField;
import com.silverpeas.form.*;
[ "com.silverpeas.form" ]
com.silverpeas.form;
955,958
public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.websecurityscanner.v1alpha.ScanConfig> getScanConfig(com.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest request) { return futureUnaryCall( getChannel().newCall(getGetScanConfigMethodHelper()...
com.google.common.util.concurrent.ListenableFuture< com.google.cloud.websecurityscanner.v1alpha.ScanConfig> function(com.google.cloud.websecurityscanner.v1alpha.GetScanConfigRequest request) { return futureUnaryCall( getChannel().newCall(getGetScanConfigMethodHelper(), getCallOptions()), request); }
/** * * * <pre> * Gets a ScanConfig. * </pre> */
<code> Gets a ScanConfig. </code>
getScanConfig
{ "repo_name": "vam-google/google-cloud-java", "path": "google-api-grpc/grpc-google-cloud-websecurityscanner-v1alpha/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerGrpc.java", "license": "apache-2.0", "size": 83312 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
331,962
public ShareClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) { Objects.requireNonNull(pipelinePolicy, "'pipelinePolicy' cannot be null"); if (pipelinePolicy.getPipelinePosition() == HttpPipelinePosition.PER_CALL) { perCallPolicies.add(pipelinePolicy); } else { ...
ShareClientBuilder function(HttpPipelinePolicy pipelinePolicy) { Objects.requireNonNull(pipelinePolicy, STR); if (pipelinePolicy.getPipelinePosition() == HttpPipelinePosition.PER_CALL) { perCallPolicies.add(pipelinePolicy); } else { perRetryPolicies.add(pipelinePolicy); } return this; }
/** * Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If * the method is called multiple times, all policies will be added and their order preserved. * * @param pipelinePolicy a pipeline policy * @return the updated ShareClientBuilder objec...
Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If the method is called multiple times, all policies will be added and their order preserved
addPolicy
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/ShareClientBuilder.java", "license": "mit", "size": 18498 }
[ "com.azure.core.http.HttpPipelinePosition", "com.azure.core.http.policy.HttpPipelinePolicy", "java.util.Objects" ]
import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.HttpPipelinePolicy; import java.util.Objects;
import com.azure.core.http.*; import com.azure.core.http.policy.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
914,780
public static int pathLen(String path) { return CharMatcher.is('/').countIn(path); }
static int function(String path) { return CharMatcher.is('/').countIn(path); }
/** * The root '/' is considered '0', so the answer is incorrect for root, but * that doesn't matter. '/blah.txt' should return '1'. * * @param path * @return */
The root '/' is considered '0', so the answer is incorrect for root, but that doesn't matter. '/blah.txt' should return '1'
pathLen
{ "repo_name": "FilotasSiskos/hopsworks", "path": "hopsworks-admin/src/main/java/io/hops/hopsworks/admin/lims/Utils.java", "license": "agpl-3.0", "size": 3773 }
[ "com.google.common.base.CharMatcher" ]
import com.google.common.base.CharMatcher;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
583,095
@Override public Adapter createSelectOptionAdapter() { if (selectOptionItemProvider == null) { selectOptionItemProvider = new SelectOptionItemProvider(this); } return selectOptionItemProvider; }
Adapter function() { if (selectOptionItemProvider == null) { selectOptionItemProvider = new SelectOptionItemProvider(this); } return selectOptionItemProvider; }
/** * This creates an adapter for a {@link psdstructure.SelectOption}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>psdstructure.SelectOption</code>.
createSelectOptionAdapter
{ "repo_name": "glovas/psd-ui-generator", "path": "hu.bme.mit.mobilgen.psdprocessor.model.edit/src/psdstructure/provider/PsdstructureItemProviderAdapterFactory.java", "license": "mit", "size": 17680 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
238,273
private String setMessageParameters(String path, List<MessageStatusType> inboxFilter, MessageSortBy orderBy, Boolean descending, Long limit, Long offset) { ValidateArgument.required(path, "path"); URIBuilder builder = new URIBuilder(); builder.setPath(path); if (inboxFilter != null) { builder.setPar...
String function(String path, List<MessageStatusType> inboxFilter, MessageSortBy orderBy, Boolean descending, Long limit, Long offset) { ValidateArgument.required(path, "path"); URIBuilder builder = new URIBuilder(); builder.setPath(path); if (inboxFilter != null) { builder.setParameter(MESSAGE_INBOX_FILTER_PARAM, Strin...
/** * Helper for pagination of messages */
Helper for pagination of messages
setMessageParameters
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java", "license": "apache-2.0", "size": 223652 }
[ "java.util.List", "org.apache.commons.lang3.StringUtils", "org.apache.http.client.utils.URIBuilder", "org.sagebionetworks.repo.model.message.MessageSortBy", "org.sagebionetworks.repo.model.message.MessageStatusType", "org.sagebionetworks.util.ValidateArgument" ]
import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.http.client.utils.URIBuilder; import org.sagebionetworks.repo.model.message.MessageSortBy; import org.sagebionetworks.repo.model.message.MessageStatusType; import org.sagebionetworks.util.ValidateArgument;
import java.util.*; import org.apache.commons.lang3.*; import org.apache.http.client.utils.*; import org.sagebionetworks.repo.model.message.*; import org.sagebionetworks.util.*;
[ "java.util", "org.apache.commons", "org.apache.http", "org.sagebionetworks.repo", "org.sagebionetworks.util" ]
java.util; org.apache.commons; org.apache.http; org.sagebionetworks.repo; org.sagebionetworks.util;
1,581,484
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> annotateVideo( com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest request) { return futureUnaryCall( getChannel().newCall(getAnnotateVideoMethodHelper(), getCallOptions()), request); ...
com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> function( com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest request) { return futureUnaryCall( getChannel().newCall(getAnnotateVideoMethodHelper(), getCallOptions()), request); } } private static final int METHODID_ANNOTA...
/** * <pre> * Performs asynchronous video annotation. Progress and results can be * retrieved through the `google.longrunning.Operations` interface. * `Operation.metadata` contains `AnnotateVideoProgress` (progress). * `Operation.response` contains `AnnotateVideoResponse` (results). * </pr...
<code> Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results). </code>
annotateVideo
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-video-intelligence-v1beta1/src/main/java/com/google/cloud/videointelligence/v1beta1/VideoIntelligenceServiceGrpc.java", "license": "bsd-3-clause", "size": 13625 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
769,953
AppUpdater setDialogTitleWhenUpdateNotAvailable(@StringRes int textResource);
AppUpdater setDialogTitleWhenUpdateNotAvailable(@StringRes int textResource);
/** * Set a custom title for the dialog when no update is available. * * @param textResource resource from the strings xml file for the dialog * @return this * @deprecated use {@link #setTitleOnUpdateNotAvailable(int)} instead */
Set a custom title for the dialog when no update is available
setDialogTitleWhenUpdateNotAvailable
{ "repo_name": "morogoku/MTweaks-KernelAdiutorMOD", "path": "app/src/main/java/com/github/javiersantos/appupdater/IAppUpdater.java", "license": "gpl-3.0", "size": 12835 }
[ "androidx.annotation.StringRes" ]
import androidx.annotation.StringRes;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
184,604
public void setFrameRate( @UInt32 Integer rate) throws IllegalArgumentException;
void function( @UInt32 Integer rate) throws IllegalArgumentException;
/** * <p>Set the frame rate of the described film, which specifies the frame rate * of the film measured in frames per second. Set this optional property to <code>null</code> * to omit it.</p> * * @param rate Frame rate of the described film. * * @throws IllegalArgumentException The given frame ...
Set the frame rate of the described film, which specifies the frame rate of the film measured in frames per second. Set this optional property to <code>null</code> to omit it
setFrameRate
{ "repo_name": "AMWA-TV/maj", "path": "src/main/java/tv/amwa/maj/model/FilmDescriptor.java", "license": "apache-2.0", "size": 9647 }
[ "tv.amwa.maj.integer.UInt32" ]
import tv.amwa.maj.integer.UInt32;
import tv.amwa.maj.integer.*;
[ "tv.amwa.maj" ]
tv.amwa.maj;
1,729,873
public void setServiceValue(String serviceValue) throws JNCException { setServiceValue(new YangString(serviceValue)); }
void function(String serviceValue) throws JNCException { setServiceValue(new YangString(serviceValue)); }
/** * Sets the value for child leaf "service", * using a String value. * @param serviceValue used during instantiation. */
Sets the value for child leaf "service", using a String value
setServiceValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/umtsSm/SecActGgsnFail.java", "license": "apache-2.0", "size": 11426 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
2,078,646
public static Matcher<DisplayData.Item> hasNamespace(Class<?> namespace) { return hasNamespace(Matchers.<Class<?>>is(namespace)); }
static Matcher<DisplayData.Item> function(Class<?> namespace) { return hasNamespace(Matchers.<Class<?>>is(namespace)); }
/** * Creates a matcher that matches if the examined {@link DisplayData.Item} contains the specified * namespace. */
Creates a matcher that matches if the examined <code>DisplayData.Item</code> contains the specified namespace
hasNamespace
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/display/DisplayDataMatchers.java", "license": "apache-2.0", "size": 12887 }
[ "org.apache.beam.sdk.transforms.display.DisplayData", "org.hamcrest.Matcher", "org.hamcrest.Matchers" ]
import org.apache.beam.sdk.transforms.display.DisplayData; import org.hamcrest.Matcher; import org.hamcrest.Matchers;
import org.apache.beam.sdk.transforms.display.*; import org.hamcrest.*;
[ "org.apache.beam", "org.hamcrest" ]
org.apache.beam; org.hamcrest;
2,075,489
OutputTimeFn<? super W> getOutputTimeFn();
OutputTimeFn<? super W> getOutputTimeFn();
/** * Return the {@link OutputTimeFn} which will be used to determine a watermark hold time given * an element timestamp, and to combine watermarks from windows which are about to be merged. */
Return the <code>OutputTimeFn</code> which will be used to determine a watermark hold time given an element timestamp, and to combine watermarks from windows which are about to be merged
getOutputTimeFn
{ "repo_name": "shakamunyi/beam", "path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/util/state/WatermarkHoldState.java", "license": "apache-2.0", "size": 1805 }
[ "com.google.cloud.dataflow.sdk.transforms.windowing.OutputTimeFn" ]
import com.google.cloud.dataflow.sdk.transforms.windowing.OutputTimeFn;
import com.google.cloud.dataflow.sdk.transforms.windowing.*;
[ "com.google.cloud" ]
com.google.cloud;
1,139,477
public void testPackagePrefixAnnotation() throws Exception { // Lookup class by its Java name. Class<?> cls = Class.forName("java.lang.test.Example"); Object instance = cls.newInstance(); Method m = cls.getMethod("nativeClassName"); String nativeName = (String) m.invoke(instance); // Native n...
void function() throws Exception { Class<?> cls = Class.forName(STR); Object instance = cls.newInstance(); Method m = cls.getMethod(STR); String nativeName = (String) m.invoke(instance); assertEquals(STR, nativeName); }
/** * Verify that a class with a package that has been renamed using an * ObjectiveCName annotation can be reflexively loaded. */
Verify that a class with a package that has been renamed using an ObjectiveCName annotation can be reflexively loaded
testPackagePrefixAnnotation
{ "repo_name": "bandcampdotcom/j2objc", "path": "jre_emul/Tests/com/google/j2objc/ClassTest.java", "license": "apache-2.0", "size": 20786 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,367,730
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.SWITCH_DEFAULT_CONTAINER__MEDIATOR_FLOW, EsbFactory.eINSTANC...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.SWITCH_DEFAULT_CONTAINER__MEDIATOR_FLOW, EsbFactory.eINSTANCE.createMediatorFlow())); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "thiliniish/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/SwitchDefaultContainerItemProvider.java", "license": "apache-2.0", "size": 4747 }
[ "java.util.Collection", "org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import java.util.Collection; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import java.util.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "java.util", "org.wso2.developerstudio" ]
java.util; org.wso2.developerstudio;
1,494,683
public static void setConfiguration(final Map<String, Object> iConfig) { for (Entry<String, Object> config : iConfig.entrySet()) { for (OGlobalConfiguration v : values()) { if (v.getKey().equals(config.getKey())) { v.setValue(config.getValue()); break; } else if (v.name()...
static void function(final Map<String, Object> iConfig) { for (Entry<String, Object> config : iConfig.entrySet()) { for (OGlobalConfiguration v : values()) { if (v.getKey().equals(config.getKey())) { v.setValue(config.getValue()); break; } else if (v.name().equals(config.getKey())) { v.setValue(config.getValue()); brea...
/** * Changes the configuration values in one shot by passing a Map of values. Keys can be the Java ENUM names or the string * representation of configuration values */
Changes the configuration values in one shot by passing a Map of values. Keys can be the Java ENUM names or the string representation of configuration values
setConfiguration
{ "repo_name": "tempbottle/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java", "license": "apache-2.0", "size": 38072 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
721,330
public void createTopic(final String topic, final int partitions, final int replication, final Map<String, String> topicConfig) throws InterruptedException { brokers[0].createTopic(topic, partitions, replication, topicConfig...
void function(final String topic, final int partitions, final int replication, final Map<String, String> topicConfig) throws InterruptedException { brokers[0].createTopic(topic, partitions, replication, topicConfig); final List<TopicPartition> topicPartitions = new ArrayList<>(); for (int partition = 0; partition < par...
/** * Create a Kafka topic with the given parameters. * * @param topic The name of the topic. * @param partitions The number of partitions for this topic. * @param replication The replication factor for (partitions of) this topic. * @param topicConfig Additional topic-level configur...
Create a Kafka topic with the given parameters
createTopic
{ "repo_name": "sslavic/kafka", "path": "streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java", "license": "apache-2.0", "size": 14154 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.apache.kafka.common.TopicPartition" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.kafka.common.TopicPartition;
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
1,498,848
private RelNode getLoptJoinOrderTree(RelNode root, Class<? extends Join> joinClass, RelFactories.JoinFactory joinFactory, RelFactories.FilterFactory filterFactory, ...
RelNode function(RelNode root, Class<? extends Join> joinClass, RelFactories.JoinFactory joinFactory, RelFactories.FilterFactory filterFactory, RelFactories.ProjectFactory projectFactory) { final HepProgramBuilder hepPgmBldr = new HepProgramBuilder() .addMatchOrder(HepMatchOrder.BOTTOM_UP) .addRuleInstance(new JoinToMu...
/** * Appy Join Order Optimizations using Hep Planner. */
Appy Join Order Optimizations using Hep Planner
getLoptJoinOrderTree
{ "repo_name": "maryannxue/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java", "license": "apache-2.0", "size": 25621 }
[ "com.google.common.collect.Lists", "java.util.List", "org.apache.calcite.plan.hep.HepMatchOrder", "org.apache.calcite.plan.hep.HepPlanner", "org.apache.calcite.plan.hep.HepProgram", "org.apache.calcite.plan.hep.HepProgramBuilder", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.RelShuttleImp...
import com.google.common.collect.Lists; import java.util.List; import org.apache.calcite.plan.hep.HepMatchOrder; import org.apache.calcite.plan.hep.HepPlanner; import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.plan.hep.HepProgramBuilder; import org.apache.calcite.rel.RelNode; import org.apache.ca...
import com.google.common.collect.*; import java.util.*; import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rel.metadata.*; import org.apache.calcite.rel.rules.*; import org.apache.drill.exec.planner.cost.*;
[ "com.google.common", "java.util", "org.apache.calcite", "org.apache.drill" ]
com.google.common; java.util; org.apache.calcite; org.apache.drill;
957,268
@Test public void testCQWithLoad() throws Exception { final Host host = Host.getHost(0); VM server1 = host.getVM(0); VM server2 = host.getVM(1); VM client = host.getVM(2); cqDUnitTest.createServer(server1, 0, false, MirrorType.KEYS_VALUES); cqDUnitTest.createServer(server2, 0, false, Mirro...
void function() throws Exception { final Host host = Host.getHost(0); VM server1 = host.getVM(0); VM server2 = host.getVM(1); VM client = host.getVM(2); cqDUnitTest.createServer(server1, 0, false, MirrorType.KEYS_VALUES); cqDUnitTest.createServer(server2, 0, false, MirrorType.KEYS); final int port1 = server1.invoke(() ...
/** * Test for CQ when region is populated with net load. */
Test for CQ when region is populated with net load
testCQWithLoad
{ "repo_name": "PurelyApplied/geode", "path": "geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java", "license": "apache-2.0", "size": 57684 }
[ "org.apache.geode.cache.MirrorType", "org.apache.geode.test.dunit.Host", "org.apache.geode.test.dunit.NetworkUtils", "org.apache.geode.test.dunit.Wait" ]
import org.apache.geode.cache.MirrorType; import org.apache.geode.test.dunit.Host; import org.apache.geode.test.dunit.NetworkUtils; import org.apache.geode.test.dunit.Wait;
import org.apache.geode.cache.*; import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
599,769
private void onResourceReady(Resource<R> resource, R result, DataSource dataSource) { // We must call isFirstReadyResource before setting status. boolean isFirstResource = isFirstReadyResource(); status = Status.COMPLETE; this.resource = resource; if (glideContext.getLogLevel() <= Log.DEBUG) { ...
void function(Resource<R> resource, R result, DataSource dataSource) { boolean isFirstResource = isFirstReadyResource(); status = Status.COMPLETE; this.resource = resource; if (glideContext.getLogLevel() <= Log.DEBUG) { Log.d(GLIDE_TAG, STR + result.getClass().getSimpleName() + STR + dataSource + STR + model + STR + wi...
/** * Internal {@link #onResourceReady(Resource, DataSource)} where arguments are known to be safe. * * @param resource original {@link Resource}, never <code>null</code> * @param result object returned by {@link Resource#get()}, checked for type and never * <code>null</code> */
Internal <code>#onResourceReady(Resource, DataSource)</code> where arguments are known to be safe
onResourceReady
{ "repo_name": "weiwenqiang/GitHub", "path": "SelectWidget/glide-master/library/src/main/java/com/bumptech/glide/request/SingleRequest.java", "license": "apache-2.0", "size": 17158 }
[ "android.util.Log", "com.bumptech.glide.load.DataSource", "com.bumptech.glide.load.engine.Resource", "com.bumptech.glide.request.transition.Transition", "com.bumptech.glide.util.LogTime" ]
import android.util.Log; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.engine.Resource; import com.bumptech.glide.request.transition.Transition; import com.bumptech.glide.util.LogTime;
import android.util.*; import com.bumptech.glide.load.*; import com.bumptech.glide.load.engine.*; import com.bumptech.glide.request.transition.*; import com.bumptech.glide.util.*;
[ "android.util", "com.bumptech.glide" ]
android.util; com.bumptech.glide;
141,638
public Label getLabel();
Label function();
/** * Returns the label to which the instruction is related to. * @return the label to which the instruction is related to. */
Returns the label to which the instruction is related to
getLabel
{ "repo_name": "NativeScript/android-runtime", "path": "test-app/runtime-binding-generator/src/main/java/org/ow2/asmdex/instruction/IOffsetInstruction.java", "license": "apache-2.0", "size": 2829 }
[ "org.ow2.asmdex.structureCommon.Label" ]
import org.ow2.asmdex.structureCommon.Label;
import org.ow2.asmdex.*;
[ "org.ow2.asmdex" ]
org.ow2.asmdex;
2,765,561
private void logAndAppend(String lifecycleEvent) { Log.d(TAG, "Lifecycle Event: " + lifecycleEvent); mLifecycleDisplay.append(lifecycleEvent + "\n"); }
void function(String lifecycleEvent) { Log.d(TAG, STR + lifecycleEvent); mLifecycleDisplay.append(lifecycleEvent + "\n"); }
/** * Logs to the console and appends the lifecycle method name to the TextView so that you can * view the series of method callbacks that are called both from the app and from within * Android Studio's Logcat. * * @param lifecycleEvent The name of the event to be logged. */
Logs to the console and appends the lifecycle method name to the TextView so that you can view the series of method callbacks that are called both from the app and from within Android Studio's Logcat
logAndAppend
{ "repo_name": "pavanpucha/Developing-android-APPS", "path": "Lesson05a-Android-Lifecycle/T05a.03-Exercise-FixLifecycleDisplayBug/app/src/main/java/com/example/android/lifecycle/MainActivity.java", "license": "apache-2.0", "size": 7981 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,682,527
public static List<String> list() { List<String> list = new ArrayList<>(); for (CopyRole c : CopyRole.values()) { list.add(c.code()); } return list; }
static List<String> function() { List<String> list = new ArrayList<>(); for (CopyRole c : CopyRole.values()) { list.add(c.code()); } return list; }
/** * Returns a List of <STRONG>codes</STRONG> */
Returns a List of codes
list
{ "repo_name": "nla/amberdb", "path": "src/main/java/amberdb/enums/CopyRole.java", "license": "apache-2.0", "size": 6880 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
673,744
public ISelection getSelection() { return editorSelection; }
ISelection function() { return editorSelection; }
/** * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code> to return this editor's overall selection.
getSelection
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.editor/src/net/opengis/citygml/transportation/presentation/TransportationEditor.java", "license": "apache-2.0", "size": 56558 }
[ "org.eclipse.jface.viewers.ISelection" ]
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,033,256
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/I_AD_Role_OrgAccess.java", "license": "gpl-2.0", "size": 4166 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
76,179
private Map<String, Object> buildWatermarkTemplateModel(NodeRef ref) { Map<String, Object> model = new HashMap<String, Object>(); NodeRef person = serviceRegistry.getPersonService().getPerson(serviceRegistry.getAuthenticationService().getCurrentUserName()); model.put("person", new ...
Map<String, Object> function(NodeRef ref) { Map<String, Object> model = new HashMap<String, Object>(); NodeRef person = serviceRegistry.getPersonService().getPerson(serviceRegistry.getAuthenticationService().getCurrentUserName()); model.put(STR, new TemplateNode(person, serviceRegistry, null)); NodeRef homespace = (Nod...
/** * Builds a freemarker model which supports a subset of the default model. * * @param ref * @return */
Builds a freemarker model which supports a subset of the default model
buildWatermarkTemplateModel
{ "repo_name": "teqnology/alfresco-pdf-toolkit", "path": "alfresco-pdf-toolkit-repo/src/main/java/org/alfresco/extension/pdftoolkit/repo/action/executer/PDFWatermarkActionExecuter.java", "license": "apache-2.0", "size": 24411 }
[ "java.util.Date", "java.util.HashMap", "java.util.Map", "org.alfresco.model.ContentModel", "org.alfresco.repo.template.TemplateNode", "org.alfresco.service.cmr.repository.NodeRef" ]
import java.util.Date; import java.util.HashMap; import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.repo.template.TemplateNode; import org.alfresco.service.cmr.repository.NodeRef;
import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.template.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service" ]
java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service;
1,118,633
protected void reportUntracedLeak(String resourceType) { logger.error("LEAK: {}.release() was not called before it's garbage-collected. " + "Enable advanced leak reporting to find out where the leak occurred. " + "To enable advanced leak reporting, " + "specif...
void function(String resourceType) { logger.error(STR + STR + STR + STR + "See http: resourceType, PROP_LEVEL, Level.ADVANCED.name().toLowerCase(), simpleClassName(this)); }
/** * This method is called when an untraced leak is detected. It can be overridden for tracking how many times leaks * have been detected. */
This method is called when an untraced leak is detected. It can be overridden for tracking how many times leaks have been detected
reportUntracedLeak
{ "repo_name": "idelpivnitskiy/netty", "path": "common/src/main/java/io/netty/util/ResourceLeakDetector.java", "license": "apache-2.0", "size": 24137 }
[ "io.netty.util.internal.StringUtil" ]
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.*;
[ "io.netty.util" ]
io.netty.util;
805,132
public PolicyDefinitionInner withMode(PolicyMode mode) { this.mode = mode; return this; }
PolicyDefinitionInner function(PolicyMode mode) { this.mode = mode; return this; }
/** * Set the policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'. * * @param mode the mode value to set * @return the PolicyDefinitionInner object itself. */
Set the policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
withMode
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/policy/mgmt-v2018_05_01/src/main/java/com/microsoft/azure/management/policy/v2018_05_01/implementation/PolicyDefinitionInner.java", "license": "mit", "size": 5747 }
[ "com.microsoft.azure.management.policy.v2018_05_01.PolicyMode" ]
import com.microsoft.azure.management.policy.v2018_05_01.PolicyMode;
import com.microsoft.azure.management.policy.v2018_05_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,297,946
User selectByPrimaryKey(Long id);
User selectByPrimaryKey(Long id);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table user * * @mbggenerated Thu Mar 31 18:03:25 CST 2016 */
This method was generated by MyBatis Generator. This method corresponds to the database table user
selectByPrimaryKey
{ "repo_name": "gubaojian/trylearn", "path": "sprint-boot/src/main/java/com/efurture/mybatis/mapper/UserMapper.java", "license": "mit", "size": 1241 }
[ "com.efurture.mybatis.domain.User" ]
import com.efurture.mybatis.domain.User;
import com.efurture.mybatis.domain.*;
[ "com.efurture.mybatis" ]
com.efurture.mybatis;
387,964
//------------------------------------------------------------------------- public ZeroRateDiscountFactors withCurve(Curve curve) { return new ZeroRateDiscountFactors(currency, valuationDate, curve); }
ZeroRateDiscountFactors function(Curve curve) { return new ZeroRateDiscountFactors(currency, valuationDate, curve); }
/** * Returns a new instance with a different curve. * * @param curve the new curve * @return the new instance */
Returns a new instance with a different curve
withCurve
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/ZeroRateDiscountFactors.java", "license": "apache-2.0", "size": 16626 }
[ "com.opengamma.strata.market.curve.Curve" ]
import com.opengamma.strata.market.curve.Curve;
import com.opengamma.strata.market.curve.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
604,382
public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncServerStreamingCall( final ServerStreamingMethod<ReqT, RespT> method) { return asyncUnaryRequestCall(method); }
static <ReqT, RespT> ServerCallHandler<ReqT, RespT> function( final ServerStreamingMethod<ReqT, RespT> method) { return asyncUnaryRequestCall(method); }
/** * Creates a {@code ServerCallHandler} for a server streaming method of the service. * * @param method an adaptor to the actual method on the service implementation. */
Creates a ServerCallHandler for a server streaming method of the service
asyncServerStreamingCall
{ "repo_name": "rmichela/grpc-java", "path": "stub/src/main/java/io/grpc/stub/ServerCalls.java", "license": "apache-2.0", "size": 14518 }
[ "io.grpc.ServerCallHandler" ]
import io.grpc.ServerCallHandler;
import io.grpc.*;
[ "io.grpc" ]
io.grpc;
2,318,588
public GroupReduceOperator<T, T> first(int n) { if (n < 1) { throw new InvalidProgramException("Parameter n of first(n) must be at least 1."); } return reduceGroup(new FirstReducer<T>(n)); } // -------------------------------------------------------------------------------------------- // distinct //...
GroupReduceOperator<T, T> function(int n) { if (n < 1) { throw new InvalidProgramException(STR); } return reduceGroup(new FirstReducer<T>(n)); }
/** * Returns a new set containing the first n elements in this {@link DataSet}. * * @param n The desired number of elements. * @return A ReduceGroupOperator that represents the DataSet containing the elements. */
Returns a new set containing the first n elements in this <code>DataSet</code>
first
{ "repo_name": "hequn8128/flink", "path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java", "license": "apache-2.0", "size": 80321 }
[ "org.apache.flink.api.common.InvalidProgramException", "org.apache.flink.api.java.functions.FirstReducer", "org.apache.flink.api.java.operators.GroupReduceOperator" ]
import org.apache.flink.api.common.InvalidProgramException; import org.apache.flink.api.java.functions.FirstReducer; import org.apache.flink.api.java.operators.GroupReduceOperator;
import org.apache.flink.api.common.*; import org.apache.flink.api.java.functions.*; import org.apache.flink.api.java.operators.*;
[ "org.apache.flink" ]
org.apache.flink;
1,215,489
public void updateTenant( com.google.cloud.talent.v4beta1.UpdateTenantRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4beta1.Tenant> responseObserver) { asyncUnaryCall( getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), request, ...
void function( com.google.cloud.talent.v4beta1.UpdateTenantRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4beta1.Tenant> responseObserver) { asyncUnaryCall( getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), request, responseObserver); }
/** * * * <pre> * Updates specified tenant. * </pre> */
<code> Updates specified tenant. </code>
updateTenant
{ "repo_name": "vam-google/google-cloud-java", "path": "google-api-grpc/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java", "license": "apache-2.0", "size": 32189 }
[ "io.grpc.stub.ClientCalls", "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
288,627
void buildComponent() { // Retrieve the preferences. ViewerPreferences pref = ImViewerFactory.getPreferences(); if (pref != null) { //Action a = controller.getAction(ImViewerControl.RENDERER); //rndButton.removeActionListener(a); rndButton.setSelected(pref.isRenderer()); //rndBu...
void buildComponent() { ViewerPreferences pref = ImViewerFactory.getPreferences(); if (pref != null) { rndButton.setSelected(pref.isRenderer()); } int compression = ImViewerFactory.getCompressionLevel(); int value = (Integer) ImViewerAgent.getRegistry().lookup(LookupNames.CONNECTION_SPEED); int setUp = view.convertComp...
/** * This method should be called straight after the metadata and the * rendering settings are loaded. */
This method should be called straight after the metadata and the rendering settings are loaded
buildComponent
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ToolBar.java", "license": "gpl-2.0", "size": 17177 }
[ "org.openmicroscopy.shoola.agents.imviewer.ImViewerAgent", "org.openmicroscopy.shoola.env.LookupNames" ]
import org.openmicroscopy.shoola.agents.imviewer.ImViewerAgent; import org.openmicroscopy.shoola.env.LookupNames;
import org.openmicroscopy.shoola.agents.imviewer.*; import org.openmicroscopy.shoola.env.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
423,374
private void upDatasetBButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_upDatasetBButtonActionPerformed if (vennDiagramDialog.getVennDiagramPanel().getCurrentVennDiagramType() != VennDiagramPanel.VennDiagramType.FOUR_WAY) { XYDataPoint oldLocation = vennDiagramDialog.getV...
void function(java.awt.event.ActionEvent evt) { if (vennDiagramDialog.getVennDiagramPanel().getCurrentVennDiagramType() != VennDiagramPanel.VennDiagramType.FOUR_WAY) { XYDataPoint oldLocation = vennDiagramDialog.getVennDiagramPanel().getLegendDatasetBThreeWay(); vennDiagramDialog.getVennDiagramPanel().setLegendDatasetB...
/** * Move the Dataset B legend upwards. * * @param evt */
Move the Dataset B legend upwards
upDatasetBButtonActionPerformed
{ "repo_name": "compomics/compomics-utilities", "path": "src/main/java/com/compomics/util/gui/VennDiagramLegendLocationDialog.java", "license": "apache-2.0", "size": 38314 }
[ "no.uib.jsparklines.data.XYDataPoint" ]
import no.uib.jsparklines.data.XYDataPoint;
import no.uib.jsparklines.data.*;
[ "no.uib.jsparklines" ]
no.uib.jsparklines;
2,607,680
public void onNeighborBlockChange(World world, int x, int y, int z, Block face) { this.func_150090_e(world, x, y, z); }
void function(World world, int x, int y, int z, Block face) { this.func_150090_e(world, x, y, z); }
/** * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are * their own) Args: x, y, z, neighbor Block */
Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor Block
onNeighborBlockChange
{ "repo_name": "Aarronmc/WallpaperCraft", "path": "1.7.10/src/main/java/com/Aarron/WallpaperCraft/blocks/carpet/WoolCarpetYellow.java", "license": "mit", "size": 4406 }
[ "net.minecraft.block.Block", "net.minecraft.world.World" ]
import net.minecraft.block.Block; import net.minecraft.world.World;
import net.minecraft.block.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.world;
1,880,251
public static TestCase of(final String testVariantName, final String expectedReturn, final String... params) { return new TestCase( testVariantName, ValString.create(expectedReturn), ...
static TestCase function(final String testVariantName, final String expectedReturn, final String... params) { return new TestCase( testVariantName, ValString.create(expectedReturn), Arrays.stream(params) .map(ValString::create) .collect(Collectors.toList()), Collections.emptyList()); }
/** * Variant for where all args and return are ValString */
Variant for where all args and return are ValString
of
{ "repo_name": "gchq/stroom", "path": "stroom-query/stroom-expression/src/test/java/stroom/dashboard/expression/v1/AbstractFunctionTest.java", "license": "apache-2.0", "size": 9159 }
[ "java.util.Arrays", "java.util.Collections", "java.util.stream.Collectors" ]
import java.util.Arrays; import java.util.Collections; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
252,958
protected final List<String> getAndroidProjectJarListWithoutProguard(AndroidProject androidProject) { return getAndroidProjectJarList(androidProject, true); }
final List<String> function(AndroidProject androidProject) { return getAndroidProjectJarList(androidProject, true); }
/** * get android project jar list include libs jar without proguard * * @param androidProject * @return List<String> */
get android project jar list include libs jar without proguard
getAndroidProjectJarListWithoutProguard
{ "repo_name": "oneliang/builder-android", "path": "src/main/java/com/oneliang/tools/builder/android/handler/AbstractAndroidHandler.java", "license": "apache-2.0", "size": 7786 }
[ "com.oneliang.tools.builder.android.base.AndroidProject", "java.util.List" ]
import com.oneliang.tools.builder.android.base.AndroidProject; import java.util.List;
import com.oneliang.tools.builder.android.base.*; import java.util.*;
[ "com.oneliang.tools", "java.util" ]
com.oneliang.tools; java.util;
2,720,478
void addMediaItems(List<MediaItem> mediaItems);
void addMediaItems(List<MediaItem> mediaItems);
/** * Adds a list of media items to the end of the playlist. * * @param mediaItems The {@link MediaItem MediaItems} to add. */
Adds a list of media items to the end of the playlist
addMediaItems
{ "repo_name": "amzn/exoplayer-amazon-port", "path": "library/common/src/main/java/com/google/android/exoplayer2/Player.java", "license": "apache-2.0", "size": 62371 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,578,761