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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
void acceptInverseOffer(OfferID offerID, Filters filter); | void acceptInverseOffer(OfferID offerID, Filters filter); | /**
* Accepts an inverse offer.
*
* @param offerID ID of the inverse offer.
* @param filter offer filter to apply.
*/ | Accepts an inverse offer | acceptInverseOffer | {
"repo_name": "thinker0/aurora",
"path": "src/main/java/org/apache/aurora/scheduler/mesos/Driver.java",
"license": "apache-2.0",
"size": 2590
} | [
"org.apache.mesos.v1.Protos"
] | import org.apache.mesos.v1.Protos; | import org.apache.mesos.v1.*; | [
"org.apache.mesos"
] | org.apache.mesos; | 2,676,753 |
public void setInputFile(File file) {
setURI(file.toURI());
} | void function(File file) { setURI(file.toURI()); } | /**
* Sets the media file to play.
*
* @param file The {@link java.io.File} to play.
*/ | Sets the media file to play | setInputFile | {
"repo_name": "guiseco/gst1-java-core",
"path": "src/org/freedesktop/gstreamer/elements/PlayBin.java",
"license": "gpl-3.0",
"size": 15815
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,678,447 |
@Override
public Terrain creerTerrain(String terrainLigne) {
try {
String[] coordonnee = terrainLigne.split(" ");
int x = Integer.parseInt(coordonnee[0]);
int y = Integer.parseInt(coordonnee[1]);
return new Terrain(x, y);
} catch (Exception e) {
throw new MowServiceException("Failed to re... | Terrain function(String terrainLigne) { try { String[] coordonnee = terrainLigne.split(" "); int x = Integer.parseInt(coordonnee[0]); int y = Integer.parseInt(coordonnee[1]); return new Terrain(x, y); } catch (Exception e) { throw new MowServiceException(STR, e); } } | /**
* Creer un terrain a partir d'une dimension sous forme de String
*/ | Creer un terrain a partir d'une dimension sous forme de String | creerTerrain | {
"repo_name": "friquerette/main_repo",
"path": "mowitnow/src/main/java/com/friquerette/mowitnow/service/TerrainServiceImpl.java",
"license": "apache-2.0",
"size": 2860
} | [
"com.friquerette.mowitnow.entity.Terrain"
] | import com.friquerette.mowitnow.entity.Terrain; | import com.friquerette.mowitnow.entity.*; | [
"com.friquerette.mowitnow"
] | com.friquerette.mowitnow; | 2,407,605 |
protected void applyToMeterPlot(MeterPlot plot) {
plot.setDialBackgroundPaint(this.plotBackgroundPaint);
plot.setValueFont(this.largeFont);
plot.setValuePaint(this.axisLabelPaint);
plot.setDialOutlinePaint(this.plotOutlinePaint);
plot.setNeedlePaint(this.thermometerPaint... | void function(MeterPlot plot) { plot.setDialBackgroundPaint(this.plotBackgroundPaint); plot.setValueFont(this.largeFont); plot.setValuePaint(this.axisLabelPaint); plot.setDialOutlinePaint(this.plotOutlinePaint); plot.setNeedlePaint(this.thermometerPaint); plot.setTickLabelFont(this.regularFont); plot.setTickLabelPaint(... | /**
* Applies the attributes of this theme to a {@link MeterPlot}.
*
* @param plot the plot (<code>null</code> not permitted).
*/ | Applies the attributes of this theme to a <code>MeterPlot</code> | applyToMeterPlot | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/StandardChartTheme.java",
"license": "lgpl-2.1",
"size": 61509
} | [
"org.jfree.chart.plot.MeterPlot"
] | import org.jfree.chart.plot.MeterPlot; | import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,007,644 |
@Test
public void testSuccessfulEmailCountCounter() {
Assert.assertEquals(0L, this.stats.getSuccessfulEmailSentCount().get());
this.stats.incrSuccessfulEmailCount();
Assert.assertEquals(1L, this.stats.getSuccessfulEmailSentCount().get());
} | void function() { Assert.assertEquals(0L, this.stats.getSuccessfulEmailSentCount().get()); this.stats.incrSuccessfulEmailCount(); Assert.assertEquals(1L, this.stats.getSuccessfulEmailSentCount().get()); } | /**
* Test the counter for successful emails.
*/ | Test the counter for successful emails | testSuccessfulEmailCountCounter | {
"repo_name": "gorcz/genie",
"path": "genie-server/src/test/java/com/netflix/genie/server/metrics/impl/TestGenieNodeStatisticsImpl.java",
"license": "apache-2.0",
"size": 7770
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,337,323 |
public static void handleFacebookException( final FacebookException eexception )
throws AuthenticationException,
NotFoundException, IOException {
if ( eexception instanceof FacebookOAuthException ) {
FacebookOAuthException fae = (FacebookOAuthException) eexception;
// error codes:
// ht... | static void function( final FacebookException eexception ) throws AuthenticationException, NotFoundException, IOException { if ( eexception instanceof FacebookOAuthException ) { FacebookOAuthException fae = (FacebookOAuthException) eexception; switch ( fae.getErrorCode() ) { case 101: case 190: case 400: case 401: case... | /**
* Converts Facebook exceptions to SOCC exceptions an propagates them.
*
* @param eexception
* Exception to convert.
*
* @throws NotFoundException
* Thrown if no resource was found at the URI
* @throws AuthenticationException
* Thrown if there is a problem with ... | Converts Facebook exceptions to SOCC exceptions an propagates them | handleFacebookException | {
"repo_name": "m0ep/master-thesis",
"path": "source/socc/socc-core/src/main/java/de/m0ep/socc/core/connector/facebook/FacebookConnector.java",
"license": "mit",
"size": 6900
} | [
"com.google.common.base.Throwables",
"com.restfb.exception.FacebookException",
"com.restfb.exception.FacebookNetworkException",
"com.restfb.exception.FacebookOAuthException",
"de.m0ep.socc.core.exceptions.AuthenticationException",
"de.m0ep.socc.core.exceptions.NotFoundException",
"java.io.IOException"
] | import com.google.common.base.Throwables; import com.restfb.exception.FacebookException; import com.restfb.exception.FacebookNetworkException; import com.restfb.exception.FacebookOAuthException; import de.m0ep.socc.core.exceptions.AuthenticationException; import de.m0ep.socc.core.exceptions.NotFoundException; import ja... | import com.google.common.base.*; import com.restfb.exception.*; import de.m0ep.socc.core.exceptions.*; import java.io.*; | [
"com.google.common",
"com.restfb.exception",
"de.m0ep.socc",
"java.io"
] | com.google.common; com.restfb.exception; de.m0ep.socc; java.io; | 2,016,775 |
void getPaymentPreview(boolean isSystem, Parameters params, AsyncCallback<PaymentPreview> callback); | void getPaymentPreview(boolean isSystem, Parameters params, AsyncCallback<PaymentPreview> callback); | /**
* Gets the payment preview with all the related information (Amount, Fees, TransferType...)<br>
* If isSystem flag is true the service will return system payment preview otherwise it will return member payment preview
*/ | Gets the payment preview with all the related information (Amount, Fees, TransferType...) If isSystem flag is true the service will return system payment preview otherwise it will return member payment preview | getPaymentPreview | {
"repo_name": "deefactorial/omlets",
"path": "omlets/src/org/openmoney/omlets/mobile/client/services/PaymentService.java",
"license": "gpl-2.0",
"size": 2165
} | [
"com.google.gwt.user.client.rpc.AsyncCallback",
"org.openmoney.omlets.mobile.client.model.Parameters",
"org.openmoney.omlets.mobile.client.model.PaymentPreview"
] | import com.google.gwt.user.client.rpc.AsyncCallback; import org.openmoney.omlets.mobile.client.model.Parameters; import org.openmoney.omlets.mobile.client.model.PaymentPreview; | import com.google.gwt.user.client.rpc.*; import org.openmoney.omlets.mobile.client.model.*; | [
"com.google.gwt",
"org.openmoney.omlets"
] | com.google.gwt; org.openmoney.omlets; | 2,233,259 |
final FontMessage fe = FontMessage.make(Font.getDefault(), 10);
assertEquals(10, fe.getSize());
assertNotNull(fe.getFont().toString());
} | final FontMessage fe = FontMessage.make(Font.getDefault(), 10); assertEquals(10, fe.getSize()); assertNotNull(fe.getFont().toString()); } | /**
* Test of {@link FontMessage#make(int)}.
*/ | Test of <code>FontMessage#make(int)</code> | testMake | {
"repo_name": "toastkidjp/Yobidashi",
"path": "src/test/java/jp/toastkid/yobidashi/message/FontMessageTest.java",
"license": "epl-1.0",
"size": 1153
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,535,635 |
public static Time toTime(Long pMilliseconds){
return toTime(TimeUnit.MILLISECONDS.toHours(pMilliseconds),
TimeUnit.MILLISECONDS.toMinutes(pMilliseconds),
TimeUnit.MILLISECONDS.toSeconds(pMilliseconds));
}
| static Time function(Long pMilliseconds){ return toTime(TimeUnit.MILLISECONDS.toHours(pMilliseconds), TimeUnit.MILLISECONDS.toMinutes(pMilliseconds), TimeUnit.MILLISECONDS.toSeconds(pMilliseconds)); } | /**
* Retorna a hora a partir da quantidade de milisegundos.
* @param pMilliseconds
* @return hora
*/ | Retorna a hora a partir da quantidade de milisegundos | toTime | {
"repo_name": "dbsoftcombr/dbssdk",
"path": "src/main/java/br/com/dbsoft/util/DBSDate.java",
"license": "mit",
"size": 65869
} | [
"java.sql.Time",
"java.util.concurrent.TimeUnit"
] | import java.sql.Time; import java.util.concurrent.TimeUnit; | import java.sql.*; import java.util.concurrent.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,605,924 |
public int getRpcPort(HmChannel channel) {
return getRpcPort(channel.getDevice().getHmInterface());
} | int function(HmChannel channel) { return getRpcPort(channel.getDevice().getHmInterface()); } | /**
* Returns the Homematic gateway port of the channel.
*/ | Returns the Homematic gateway port of the channel | getRpcPort | {
"repo_name": "openhab/openhab2",
"path": "bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/common/HomematicConfig.java",
"license": "epl-1.0",
"size": 11487
} | [
"org.openhab.binding.homematic.internal.model.HmChannel"
] | import org.openhab.binding.homematic.internal.model.HmChannel; | import org.openhab.binding.homematic.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,396,638 |
final int end = value.length();
final List<String> res = new ArrayList<String>();
int start = 0;
for (int i = 0; i < end; i ++) {
if (value.charAt(i) == delim) {
if (start == i) {
res.add(EMPTY_STRING);
} else {
... | final int end = value.length(); final List<String> res = new ArrayList<String>(); int start = 0; for (int i = 0; i < end; i ++) { if (value.charAt(i) == delim) { if (start == i) { res.add(EMPTY_STRING); } else { res.add(value.substring(start, i)); } start = i + 1; } } if (start == 0) { res.add(value); } else { if (star... | /**
* Splits the specified {@link String} with the specified delimiter. This operation is a simplified and optimized
* version of {@link String#split(String)}.
*/ | Splits the specified <code>String</code> with the specified delimiter. This operation is a simplified and optimized version of <code>String#split(String)</code> | split | {
"repo_name": "daschl/netty",
"path": "common/src/main/java/io/netty/util/internal/StringUtil.java",
"license": "apache-2.0",
"size": 8304
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 909,749 |
protected void publishWanReplicationEventInternal(String mapName, ReplicationEventObject event) {
MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
WanReplicationPublisher wanReplicationPublisher = mapContainer.getWanReplicationPublisher();
wanReplicationPublisher.publi... | void function(String mapName, ReplicationEventObject event) { MapContainer mapContainer = mapServiceContext.getMapContainer(mapName); WanReplicationPublisher wanReplicationPublisher = mapContainer.getWanReplicationPublisher(); wanReplicationPublisher.publishReplicationEvent(SERVICE_NAME, event); } | /**
* Publishes the {@code event} to the {@link WanReplicationPublisher} configured for this map.
*
* @param mapName the map name
* @param event the event
*/ | Publishes the event to the <code>WanReplicationPublisher</code> configured for this map | publishWanReplicationEventInternal | {
"repo_name": "juanavelez/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/map/impl/event/MapEventPublisherImpl.java",
"license": "apache-2.0",
"size": 14915
} | [
"com.hazelcast.map.impl.MapContainer",
"com.hazelcast.wan.ReplicationEventObject",
"com.hazelcast.wan.WanReplicationPublisher"
] | import com.hazelcast.map.impl.MapContainer; import com.hazelcast.wan.ReplicationEventObject; import com.hazelcast.wan.WanReplicationPublisher; | import com.hazelcast.map.impl.*; import com.hazelcast.wan.*; | [
"com.hazelcast.map",
"com.hazelcast.wan"
] | com.hazelcast.map; com.hazelcast.wan; | 2,687,249 |
private final void dataProviderService(File file, HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.debug("dataprovider '{}' requested", file.getPath());
List<Object> beans = new ArrayList<Object>();
String resultString = null... | final void function(File file, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { logger.debug(STR, file.getPath()); List<Object> beans = new ArrayList<Object>(); String resultString = null; File resourceFolder = rootFolder; String rel = file.getPath().substring(rootFolder.... | /**
* replaces the dataproviders in
* <cometvisu-src>/editor/dataproviders/*.(php|json) +
*
* @param file
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/ | replaces the dataproviders in /editor/dataproviders/*.(php|json) + | dataProviderService | {
"repo_name": "johannrichard/openhab2-addons",
"path": "addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/servlet/CometVisuServlet.java",
"license": "epl-1.0",
"size": 51655
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.... | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigura... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.eclipse.smarthome.core.items.*; import org.openhab.ui.cometvisu.internal.config.*; import org.openhab.ui.cometvisu.internal.editor.dataprovider.beans.*; import org.... | [
"java.io",
"java.util",
"javax.servlet",
"javax.xml",
"org.eclipse.smarthome",
"org.openhab.ui",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.util; javax.servlet; javax.xml; org.eclipse.smarthome; org.openhab.ui; org.w3c.dom; org.xml.sax; | 2,061,046 |
public CacheErrorHandler getErrorHandler() {
return this.errorHandler;
}
/**
* Execute {@link Cache#get(Object)} on the specified {@link Cache} and
* invoke the error handler if an exception occurs. Return {@code null} | CacheErrorHandler function() { return this.errorHandler; } /** * Execute {@link Cache#get(Object)} on the specified {@link Cache} and * invoke the error handler if an exception occurs. Return {@code null} | /**
* Return the {@link CacheErrorHandler} to use.
*/ | Return the <code>CacheErrorHandler</code> to use | getErrorHandler | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/src/main/spring.context/org/springframework/cache/interceptor/AbstractCacheInvoker.java",
"license": "mit",
"size": 3301
} | [
"org.springframework.cache.Cache"
] | import org.springframework.cache.Cache; | import org.springframework.cache.*; | [
"org.springframework.cache"
] | org.springframework.cache; | 692,528 |
@Test
public void testGetShow()
{
assertNull(dialog.getShow());
dialog.setShow(new DialogAnimateOption(200));
assertEquals(dialog.getShow().getJavascriptOption().toString(), "200");
dialog.setShow(new DialogAnimateOption("fold"));
assertEquals(dialog.getShow().getJavascriptOption().toString(), "'fold'");... | void function() { assertNull(dialog.getShow()); dialog.setShow(new DialogAnimateOption(200)); assertEquals(dialog.getShow().getJavascriptOption().toString(), "200"); dialog.setShow(new DialogAnimateOption("fold")); assertEquals(dialog.getShow().getJavascriptOption().toString(), STR); dialog.setShow(new DialogAnimateOpt... | /**
* Test method for {@link org.odlabs.wiquery.ui.dialog.Dialog#getShowEffect()}.
*/ | Test method for <code>org.odlabs.wiquery.ui.dialog.Dialog#getShowEffect()</code> | testGetShow | {
"repo_name": "WiQuery/wiquery",
"path": "wiquery-jquery-ui/src/test/java/org/odlabs/wiquery/ui/dialog/DialogTestCase.java",
"license": "mit",
"size": 11362
} | [
"org.junit.Assert",
"org.odlabs.wiquery.ui.options.EffectOptionObject"
] | import org.junit.Assert; import org.odlabs.wiquery.ui.options.EffectOptionObject; | import org.junit.*; import org.odlabs.wiquery.ui.options.*; | [
"org.junit",
"org.odlabs.wiquery"
] | org.junit; org.odlabs.wiquery; | 1,822,065 |
private void createNewObjective(int index) {
// first get hold of the <objectives> node
Element objs = getElement(getDocument().getRootElement(), "cmi.objectives");
// and then add our <objective index=""> node
Element objective = new Element("objective");
objective.setAttribute("index", index + "");
obj... | void function(int index) { Element objs = getElement(getDocument().getRootElement(), STR); Element objective = new Element(STR); objective.setAttribute("index", index + STRidSTRscoreSTR_childrenSTRraw,max,minSTRrawSTRmaxSTRminSTRstatus"); objective.addContent(status); } | /**
* createNewObjective() - Creates a new <objective> element structure in the
* xml CMI datamodel for a particular sco.
*
* @param index - the index for the <objective> to be created
*/ | createNewObjective() - Creates a new element structure in the xml CMI datamodel for a particular sco | createNewObjective | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/modules/scorm/server/servermodels/ScoDocument.java",
"license": "apache-2.0",
"size": 35031
} | [
"org.jdom.Element"
] | import org.jdom.Element; | import org.jdom.*; | [
"org.jdom"
] | org.jdom; | 1,039,981 |
private void onNetworkAvailable() {
Log.d(LOG_TAG, "onNetWorkAvailable()");
if (mIsNetworkSuspended) {
mIsNetworkSuspended = false;
if (mPaused) {
Log.d(LOG_TAG, "the event thread is still suspended");
} else {
Log.d(LOG_TAG, "Resu... | void function() { Log.d(LOG_TAG, STR); if (mIsNetworkSuspended) { mIsNetworkSuspended = false; if (mPaused) { Log.d(LOG_TAG, STR); } else { Log.d(LOG_TAG, STR); mIsCatchingUp = false; synchronized (mSyncObject) { mSyncObject.notify(); } } } else { Log.d(LOG_TAG, STR); } } | /**
* A network connection has been retrieved.
*/ | A network connection has been retrieved | onNetworkAvailable | {
"repo_name": "matrix-org/matrix-android-sdk",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/sync/EventsThread.java",
"license": "apache-2.0",
"size": 27337
} | [
"org.matrix.androidsdk.core.Log"
] | import org.matrix.androidsdk.core.Log; | import org.matrix.androidsdk.core.*; | [
"org.matrix.androidsdk"
] | org.matrix.androidsdk; | 784,509 |
@Test
public void deleteEditorialTest() {
EditorialEntity entity = data.get(0);
editorialPersistence.delete(entity.getId());
EditorialEntity deleted = em.find(EditorialEntity.class, entity.getId());
Assert.assertNull(deleted);
}
| void function() { EditorialEntity entity = data.get(0); editorialPersistence.delete(entity.getId()); EditorialEntity deleted = em.find(EditorialEntity.class, entity.getId()); Assert.assertNull(deleted); } | /**
* Prueba para eliminar una Editorial.
*/ | Prueba para eliminar una Editorial | deleteEditorialTest | {
"repo_name": "Uniandes-isis2603/backstepbystep",
"path": "backstepbystep-back/src/test/java/co/edu/uniandes/csw/bookstore/test/persistence/EditorialPersistenceTest.java",
"license": "mit",
"size": 6956
} | [
"co.edu.uniandes.csw.bookstore.entities.EditorialEntity",
"org.junit.Assert"
] | import co.edu.uniandes.csw.bookstore.entities.EditorialEntity; import org.junit.Assert; | import co.edu.uniandes.csw.bookstore.entities.*; import org.junit.*; | [
"co.edu.uniandes",
"org.junit"
] | co.edu.uniandes; org.junit; | 1,310,632 |
public GetRequest versionType(VersionType versionType) {
this.versionType = versionType;
return this;
} | GetRequest function(VersionType versionType) { this.versionType = versionType; return this; } | /**
* Sets the versioning type. Defaults to {@link org.elasticsearch.index.VersionType#INTERNAL}.
*/ | Sets the versioning type. Defaults to <code>org.elasticsearch.index.VersionType#INTERNAL</code> | versionType | {
"repo_name": "rajanm/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/get/GetRequest.java",
"license": "apache-2.0",
"size": 8876
} | [
"org.elasticsearch.index.VersionType"
] | import org.elasticsearch.index.VersionType; | import org.elasticsearch.index.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,997,679 |
@Test
public void getBroadcast() {
WebTarget wt = target();
String response = wt.path("topology/broadcast/dev1:1").request().get(String.class);
JsonObject result = Json.parse(response).asObject();
assertThat(result, notNullValue());
assertThat(result.get("broadcast").asB... | void function() { WebTarget wt = target(); String response = wt.path(STR).request().get(String.class); JsonObject result = Json.parse(response).asObject(); assertThat(result, notNullValue()); assertThat(result.get(STR).asBoolean(), is(true)); } | /**
* Tests a broadcast query.
*/ | Tests a broadcast query | getBroadcast | {
"repo_name": "opennetworkinglab/onos",
"path": "web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java",
"license": "apache-2.0",
"size": 10300
} | [
"com.eclipsesource.json.Json",
"com.eclipsesource.json.JsonObject",
"javax.ws.rs.client.WebTarget",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import com.eclipsesource.json.Json; import com.eclipsesource.json.JsonObject; import javax.ws.rs.client.WebTarget; import org.hamcrest.Matchers; import org.junit.Assert; | import com.eclipsesource.json.*; import javax.ws.rs.client.*; import org.hamcrest.*; import org.junit.*; | [
"com.eclipsesource.json",
"javax.ws",
"org.hamcrest",
"org.junit"
] | com.eclipsesource.json; javax.ws; org.hamcrest; org.junit; | 1,705,278 |
@Test
public void test_WriteEmptyObjectClose() throws Exception {
JSONStringer jStringer = new JSONStringer();
jStringer.object();
jStringer.close();
String str = jStringer.toString();
// Verify it parses.
new JSONObject(str);
assertEquals("{}", str);
... | void function() throws Exception { JSONStringer jStringer = new JSONStringer(); jStringer.object(); jStringer.close(); String str = jStringer.toString(); new JSONObject(str); assertEquals("{}", str); } | /**
* Test the String empty object constructor.
*/ | Test the String empty object constructor | test_WriteEmptyObjectClose | {
"repo_name": "ElyxorCorp/wink-json4j",
"path": "src/test/java/org/apache/wink/json4j/tests/JSONStringerTest.java",
"license": "apache-2.0",
"size": 2939
} | [
"org.apache.wink.json4j.JSONObject",
"org.apache.wink.json4j.JSONStringer",
"org.junit.Assert"
] | import org.apache.wink.json4j.JSONObject; import org.apache.wink.json4j.JSONStringer; import org.junit.Assert; | import org.apache.wink.json4j.*; import org.junit.*; | [
"org.apache.wink",
"org.junit"
] | org.apache.wink; org.junit; | 2,359,708 |
public static void dispose() {
if (isBindService) {
if (iService != null) {
try {
iService.dispose();
} catch (RemoteException e) {
e.printStackTrace();
}
iService = null;
}
... | static void function() { if (isBindService) { if (iService != null) { try { iService.dispose(); } catch (RemoteException e) { e.printStackTrace(); } iService = null; } mContext.unbindService(conn); mContext = null; isBindService = false; } } private String id; private String parameter = null; private boolean isCancel =... | /**
* dispose unbindService stopService
*/ | dispose unbindService stopService | dispose | {
"repo_name": "scudc/Genius-Android",
"path": "library/src/main/java/net/qiujuer/genius/command/Command.java",
"license": "apache-2.0",
"size": 6355
} | [
"android.os.RemoteException",
"java.util.UUID"
] | import android.os.RemoteException; import java.util.UUID; | import android.os.*; import java.util.*; | [
"android.os",
"java.util"
] | android.os; java.util; | 2,110,761 |
@SuppressWarnings("unchecked")
public static synchronized @CheckForNull Map<String,String> getPersistedInstallStatus() {
File installingPluginsFile = getInstallingPluginsFile();
if(installingPluginsFile == null || !installingPluginsFile.exists()) {
return null;
}
return (Map<Strin... | @SuppressWarnings(STR) static synchronized @CheckForNull Map<String,String> function() { File installingPluginsFile = getInstallingPluginsFile(); if(installingPluginsFile == null !installingPluginsFile.exists()) { return null; } return (Map<String,String>)new XStream().fromXML(installingPluginsFile); } | /**
* Returns a list of any plugins that are persisted in the installing list
*/ | Returns a list of any plugins that are persisted in the installing list | getPersistedInstallStatus | {
"repo_name": "Ykus/jenkins",
"path": "core/src/main/java/jenkins/install/InstallUtil.java",
"license": "mit",
"size": 15229
} | [
"com.thoughtworks.xstream.XStream",
"java.io.File",
"java.util.Map",
"javax.annotation.CheckForNull"
] | import com.thoughtworks.xstream.XStream; import java.io.File; import java.util.Map; import javax.annotation.CheckForNull; | import com.thoughtworks.xstream.*; import java.io.*; import java.util.*; import javax.annotation.*; | [
"com.thoughtworks.xstream",
"java.io",
"java.util",
"javax.annotation"
] | com.thoughtworks.xstream; java.io; java.util; javax.annotation; | 721,767 |
private void growSpine() {
spine = new int[(spine.length << 1) + 1];
threshold = (int) (spine.length * loadFactor);
Arrays.fill(spine, -1);
for (int i = 0; i < size; i++) {
insert(objs[i], i);
}
} | void function() { spine = new int[(spine.length << 1) + 1]; threshold = (int) (spine.length * loadFactor); Arrays.fill(spine, -1); for (int i = 0; i < size; i++) { insert(objs[i], i); } } | /**
* Expands the hash "spine" -- equivalent to increasing the number of
* buckets in a conventional hash table.
*/ | Expands the hash "spine" -- equivalent to increasing the number of buckets in a conventional hash table | growSpine | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/java/io/ObjectOutputStream.java",
"license": "gpl-2.0",
"size": 93107
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 893,114 |
private static boolean createDirOnFileSystem(FileSystem fs, Configuration conf, Path dir)
throws IOException {
int i = 0;
IOException lastIOE = null;
int hdfsClientRetriesNumber = conf.getInt("hdfs.client.retries.number",
DEFAULT_HDFS_CLIENT_RETRIES_NUMBER);
int baseSleepBeforeRetries = co... | static boolean function(FileSystem fs, Configuration conf, Path dir) throws IOException { int i = 0; IOException lastIOE = null; int hdfsClientRetriesNumber = conf.getInt(STR, DEFAULT_HDFS_CLIENT_RETRIES_NUMBER); int baseSleepBeforeRetries = conf.getInt(STR, DEFAULT_BASE_SLEEP_BEFORE_RETRIES); do { try { return fs.mkdi... | /**
* Creates a directory for a filesystem and configuration object. Assumes the user has already
* checked for this directory existence.
* @param fs
* @param conf
* @param dir
* @return the result of fs.mkdirs(). In case underlying fs throws an IOException, it checks
* whether the director... | Creates a directory for a filesystem and configuration object. Assumes the user has already checked for this directory existence | createDirOnFileSystem | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java",
"license": "apache-2.0",
"size": 42258
} | [
"java.io.IOException",
"java.io.InterruptedIOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.io.InterruptedIOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,689,836 |
public static <T, W extends BoundedWindow> PCollectionView<List<T>> listView(
PCollection<KV<Void, T>> pCollection, WindowingStrategy<?, W> windowingStrategy) {
return new SimplePCollectionView<>(
pCollection,
new ListViewFn<T>(),
windowingStrategy.getWindowFn().getDefaultWindowMappi... | static <T, W extends BoundedWindow> PCollectionView<List<T>> function( PCollection<KV<Void, T>> pCollection, WindowingStrategy<?, W> windowingStrategy) { return new SimplePCollectionView<>( pCollection, new ListViewFn<T>(), windowingStrategy.getWindowFn().getDefaultWindowMappingFn(), windowingStrategy); } | /**
* Returns a {@code PCollectionView<List<T>>} capable of processing elements windowed using the
* provided {@link WindowingStrategy}.
*/ | Returns a PCollectionView> capable of processing elements windowed using the provided <code>WindowingStrategy</code> | listView | {
"repo_name": "mxm/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/values/PCollectionViews.java",
"license": "apache-2.0",
"size": 15999
} | [
"java.util.List",
"org.apache.beam.sdk.transforms.windowing.BoundedWindow"
] | import java.util.List; import org.apache.beam.sdk.transforms.windowing.BoundedWindow; | import java.util.*; import org.apache.beam.sdk.transforms.windowing.*; | [
"java.util",
"org.apache.beam"
] | java.util; org.apache.beam; | 693,138 |
public Collection<TimeSuggestion> getTimeSuggestions() {
return timeSuggestions;
}
| Collection<TimeSuggestion> function() { return timeSuggestions; } | /**
* Gets a collection of suggested times within the suggested day.
*
* @return the time suggestions
*/ | Gets a collection of suggested times within the suggested day | getTimeSuggestions | {
"repo_name": "daitangio/exchangews",
"path": "src/main/java/microsoft/exchange/webservices/data/Suggestion.java",
"license": "lgpl-3.0",
"size": 3066
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,510,458 |
public void setupConfigProperties() {
// Different config elements in a data service have different property
// elements under them.
// The image icon for each config element is set depending on the type
// of data source they belong to.
if (mainType.equals(DSActionConstants.RDBMS_TYPE)) {
listOfProper... | void function() { if (mainType.equals(DSActionConstants.RDBMS_TYPE)) { listOfProperties = new ArrayList<String>(); listOfProperties.add(DSActionConstants.USER_PROPERTY); listOfProperties.add(DSActionConstants.PASSWORD_PROPERTY); listOfProperties.add(DSActionConstants.PROTOCOL_PROPERTY); listOfProperties.add(DSActionCon... | /**
* Setup config properties.
*/ | Setup config properties | setupConfigProperties | {
"repo_name": "nwnpallewela/developer-studio",
"path": "data-services/plugins/org.wso2.developerstudio.eclipse.ds.editor/src/org/wso2/developerstudio/eclipse/ds/actions/DataSourceConfigurationAction.java",
"license": "apache-2.0",
"size": 11268
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 730,619 |
public final NavigableSet<String> getTableNames() {
final ImmutableSortedSet.Builder<String> builder =
new ImmutableSortedSet.Builder<>(NameSet.COMPARATOR);
// Add explicit tables, case-sensitive.
builder.addAll(tableMap.map().keySet());
// Add implicit tables, case-sensitive.
addImplicitT... | final NavigableSet<String> function() { final ImmutableSortedSet.Builder<String> builder = new ImmutableSortedSet.Builder<>(NameSet.COMPARATOR); builder.addAll(tableMap.map().keySet()); addImplicitTableToBuilder(builder); return builder.build(); } | /** Returns the set of all table names. Includes implicit and explicit tables
* and functions with zero parameters. */ | Returns the set of all table names. Includes implicit and explicit tables | getTableNames | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java",
"license": "apache-2.0",
"size": 31130
} | [
"com.google.common.collect.ImmutableSortedSet",
"java.util.NavigableSet",
"org.apache.calcite.util.NameSet"
] | import com.google.common.collect.ImmutableSortedSet; import java.util.NavigableSet; import org.apache.calcite.util.NameSet; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 2,834,392 |
private File makeFile(String[] folders,int offset,int length){
String path="";
for(int i=offset;i<length;i++){
path+=folders[i]+"/";
}
return new File(path);
} | File function(String[] folders,int offset,int length){ String path=STR/"; } return new File(path); } | /**
* Makes a file from an array of folders
*/ | Makes a file from an array of folders | makeFile | {
"repo_name": "mattlyons0/Java-Grader",
"path": "src/DropboxGrader/RunCompileJava/JavaRunner.java",
"license": "gpl-3.0",
"size": 29754
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 297,226 |
public Paragraph addNewParagraph(AuthenticationInfo authenticationInfo) {
return insertNewParagraph(paragraphs.size(), authenticationInfo);
} | Paragraph function(AuthenticationInfo authenticationInfo) { return insertNewParagraph(paragraphs.size(), authenticationInfo); } | /**
* Create a new paragraph and add it to the end of the note.
*/ | Create a new paragraph and add it to the end of the note | addNewParagraph | {
"repo_name": "anthonycorbacho/incubator-zeppelin",
"path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java",
"license": "apache-2.0",
"size": 29903
} | [
"org.apache.zeppelin.user.AuthenticationInfo"
] | import org.apache.zeppelin.user.AuthenticationInfo; | import org.apache.zeppelin.user.*; | [
"org.apache.zeppelin"
] | org.apache.zeppelin; | 156,344 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
} | void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "occiware/Multi-Cloud-Studio",
"path": "plugins/org.eclipse.cmf.occi.multicloud.vmware.edit/src-gen/org/eclipse/cmf/occi/multicloud/vmware/provider/StoragevmwareItemProvider.java",
"license": "epl-1.0",
"size": 6601
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,197,858 |
@ApiModelProperty(value = "The number of seats (users) included.")
public String getIncludedSeats() {
return includedSeats;
} | @ApiModelProperty(value = STR) String function() { return includedSeats; } | /**
* The number of seats (users) included..
* @return includedSeats
**/ | The number of seats (users) included. | getIncludedSeats | {
"repo_name": "docusign/docusign-java-client",
"path": "src/main/java/com/docusign/esign/model/BillingPlanInformation.java",
"license": "mit",
"size": 18707
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,824,030 |
public void setSkeleton(Long skeletonOMA, Skeleton skeleton) {
this.skeletons.put(skeletonOMA, skeleton);
}
| void function(Long skeletonOMA, Skeleton skeleton) { this.skeletons.put(skeletonOMA, skeleton); } | /**
* This method sets the skeleton for the specified OMA of its owner.
*
* @param skeletonOMA
* the skeleton's old memory address
* @param skeleton
* the skeleton specified by the given OMA
*/ | This method sets the skeleton for the specified OMA of its owner | setSkeleton | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "external/jmonkeyengine/engine/src/blender/com/jme3/scene/plugins/blender/BlenderContext.java",
"license": "gpl-2.0",
"size": 21154
} | [
"com.jme3.animation.Skeleton"
] | import com.jme3.animation.Skeleton; | import com.jme3.animation.*; | [
"com.jme3.animation"
] | com.jme3.animation; | 101,042 |
public void testHoldabilityOverCommit() throws SQLException{
testStatements(ResultSet.HOLD_CURSORS_OVER_COMMIT);
testStatements(ResultSet.CLOSE_CURSORS_AT_COMMIT);
} | void function() throws SQLException{ testStatements(ResultSet.HOLD_CURSORS_OVER_COMMIT); testStatements(ResultSet.CLOSE_CURSORS_AT_COMMIT); } | /**
* set connection holdability and test holdability of statements inside and outside procedures
* test that holdability of statements always overrides holdability of connection
* @throws SQLException
*/ | set connection holdability and test holdability of statements inside and outside procedures test that holdability of statements always overrides holdability of connection | testHoldabilityOverCommit | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/tools/src/testing/java/org/apache/derbyTesting/functionTests/tests/lang/HoldCursorTest.java",
"license": "apache-2.0",
"size": 15304
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 858,244 |
@Test(expected = ClassNotFoundException.class)
public void testLoadResourceErrorCNFE() throws Exception
{
Resource resource;
resource = new ClassPathResource(Q_NAME_FILE_ERROR_CNF);
registry.loadFromResource(resource);
} | @Test(expected = ClassNotFoundException.class) void function() throws Exception { Resource resource; resource = new ClassPathResource(Q_NAME_FILE_ERROR_CNF); registry.loadFromResource(resource); } | /**
* Test {@link SetRegistryDefaultImpl#loadFromResource(org.springframework.core.io.Resource)} with undefined class.
*/ | Test <code>SetRegistryDefaultImpl#loadFromResource(org.springframework.core.io.Resource)</code> with undefined class | testLoadResourceErrorCNFE | {
"repo_name": "albirar/framework",
"path": "core/src/test/java/cat/albirar/framework/sets/registry/impl/SetRegistryDefaultImplTest.java",
"license": "gpl-3.0",
"size": 19918
} | [
"org.junit.Test",
"org.springframework.core.io.ClassPathResource",
"org.springframework.core.io.Resource"
] | import org.junit.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; | import org.junit.*; import org.springframework.core.io.*; | [
"org.junit",
"org.springframework.core"
] | org.junit; org.springframework.core; | 1,738,584 |
public static boolean fileCanWrite(Context context, Uri uri) {
Cursor cursor = context.getContentResolver().query(uri, null, null,
null, null);
if (cursor == null)
return false;
try {
if (cursor.moveToFirst())
return fileCanWrite(curso... | static boolean function(Context context, Uri uri) { Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); if (cursor == null) return false; try { if (cursor.moveToFirst()) return fileCanWrite(cursor); return false; } finally { cursor.close(); } } | /**
* Checks if the file pointed by {@code uri} is writable or not.
*
* @param context
* {@link Context}.
* @param uri
* the URI you want to check.
* @return {@code true} or {@code false}.
*/ | Checks if the file pointed by uri is writable or not | fileCanWrite | {
"repo_name": "red13dotnet/keepass2android",
"path": "src/java/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/providers/BaseFileProviderUtils.java",
"license": "gpl-3.0",
"size": 21453
} | [
"android.content.Context",
"android.database.Cursor",
"android.net.Uri"
] | import android.content.Context; import android.database.Cursor; import android.net.Uri; | import android.content.*; import android.database.*; import android.net.*; | [
"android.content",
"android.database",
"android.net"
] | android.content; android.database; android.net; | 782,875 |
protected NamedStoredProcedureQueryMetadata processProcedureType(ProcedureType pType) {
NamedStoredProcedureQueryMetadata storedProc = new NamedStoredProcedureQueryMetadata();
storedProc.setName(getQueryNameForProcedureType(pType));
storedProc.setProcedureName(pType.getProcedureName());
... | NamedStoredProcedureQueryMetadata function(ProcedureType pType) { NamedStoredProcedureQueryMetadata storedProc = new NamedStoredProcedureQueryMetadata(); storedProc.setName(getQueryNameForProcedureType(pType)); storedProc.setProcedureName(pType.getProcedureName()); storedProc.setReturnsResultSet(false); if (pType.getAr... | /**
* Generate a stored procedure query based on the given ProcedureType.
*/ | Generate a stored procedure query based on the given ProcedureType | processProcedureType | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "utils/org.eclipse.persistence.dbws.builder/src/org/eclipse/persistence/tools/metadata/generation/JPAMetadataGenerator.java",
"license": "epl-1.0",
"size": 58999
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata",
"org.eclipse.persistence.internal.jpa.metadata.queries.StoredProcedureParameterMetadata",
"org.eclipse.persistence.tools.oracleddl.metadata.ArgumentType",
"org.eclipse.persis... | import java.util.ArrayList; import java.util.List; import org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata; import org.eclipse.persistence.internal.jpa.metadata.queries.StoredProcedureParameterMetadata; import org.eclipse.persistence.tools.oracleddl.metadata.ArgumentType; import o... | import java.util.*; import org.eclipse.persistence.internal.jpa.metadata.queries.*; import org.eclipse.persistence.tools.oracleddl.metadata.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 2,362,899 |
public boolean nextStep(int speed) throws InterruptedException{
if(speed>0) Thread.sleep(speed);
if(!front.isEmpty()){
int k;
k = front.size()-1; // DFS generation
MazeBox box = front.get(k);
front.remove(k);
if(!canVisit(box.x, box.y)){
... | boolean function(int speed) throws InterruptedException{ if(speed>0) Thread.sleep(speed); if(!front.isEmpty()){ int k; k = front.size()-1; MazeBox box = front.get(k); front.remove(k); if(!canVisit(box.x, box.y)){ return nextStep(0); } visit(box.x, box.y); ArrayList<Integer> directions = new ArrayList<>(); directions.ad... | /**
* Performs next generation step
* @param speed
* @return true if step performed
* @throws InterruptedException
*/ | Performs next generation step | nextStep | {
"repo_name": "greekdev/Laby",
"path": "NoGUI/src/MazeGenerator.java",
"license": "mit",
"size": 8126
} | [
"java.util.ArrayList",
"java.util.Collections"
] | import java.util.ArrayList; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,447,104 |
public void testRemoveAttributeNS() throws Throwable {
Document doc;
Element element;
boolean state;
Attr attribute;
doc = (Document) load("staff", builder);
element = doc.createElementNS("http://www.w3.org/DOM", "elem");
attribute = doc.createAttributeNS(
... | void function() throws Throwable { Document doc; Element element; boolean state; Attr attribute; doc = (Document) load("staff", builder); element = doc.createElementNS(STRhttp: element.setAttributeNodeNS(attribute); element.removeAttributeNS( STRhttp: assertFalse(STR, state); } | /**
* Runs the test case.
*
* @throws Throwable
* Any uncaught exception causes test to fail
*/ | Runs the test case | testRemoveAttributeNS | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "luni/src/test/java/tests/org/w3c/dom/ElementRemoveAttributeNS.java",
"license": "gpl-2.0",
"size": 2170
} | [
"org.w3c.dom.Attr",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 783,476 |
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
{
if (!this.canBlockStay(worldIn, pos))
{
worldIn.destroyBlock(pos, true);
}
}
| void function(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { if (!this.canBlockStay(worldIn, pos)) { worldIn.destroyBlock(pos, true); } } | /**
* Called when a neighboring block changes.
*/ | Called when a neighboring block changes | onNeighborBlockChange | {
"repo_name": "Virtuoel/Unreal-1.8",
"path": "src/main/java/com/virtuoel/unreal/block/BlockCactusTarydium.java",
"license": "gpl-2.0",
"size": 5316
} | [
"net.minecraft.block.Block",
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.*; import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.util; net.minecraft.world; | 1,613,514 |
@Override
public DynamicString createDynamicStringData(String value) {
return new DynamicStringImpl(value);
} | DynamicString function(String value) { return new DynamicStringImpl(value); } | /**
* Creates the dynamic string data.
*
* @param value the value
* @return the dynamic element string
*/ | Creates the dynamic string data | createDynamicStringData | {
"repo_name": "OSEHRA/ISAAC",
"path": "core/model/src/main/java/sh/isaac/model/semantic/DynamicUtilityImpl.java",
"license": "apache-2.0",
"size": 18889
} | [
"sh.isaac.api.component.semantic.version.dynamic.types.DynamicString",
"sh.isaac.model.semantic.types.DynamicStringImpl"
] | import sh.isaac.api.component.semantic.version.dynamic.types.DynamicString; import sh.isaac.model.semantic.types.DynamicStringImpl; | import sh.isaac.api.component.semantic.version.dynamic.types.*; import sh.isaac.model.semantic.types.*; | [
"sh.isaac.api",
"sh.isaac.model"
] | sh.isaac.api; sh.isaac.model; | 2,294,712 |
private String getToolTipAsHTML(Map<String, Node> nodeDataSet) {
String ret = "<table width=1000 cellpadding=1 cellspacing=0 border=0 bgcolor=#F4F4F4><tr>";
for (Map.Entry<String, Node> nodeSet : nodeDataSet.entrySet())
ret += "<td>" + getToolText(nodeSet.getValue()) + "</td>";
return ret + "<... | String function(Map<String, Node> nodeDataSet) { String ret = STR; for (Map.Entry<String, Node> nodeSet : nodeDataSet.entrySet()) ret += "<td>" + getToolText(nodeSet.getValue()) + "</td>"; return ret + STR; } | /**
* Render tooltip as HTML table
* @param nodeDataSet
* @return
*/ | Render tooltip as HTML table | getToolTipAsHTML | {
"repo_name": "chiastic-security/phoenix-for-cloudera",
"path": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/GoogleChartGenerator.java",
"license": "apache-2.0",
"size": 12201
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,447,761 |
public static void handleMobHealthbars(LivingEntity target, double damage, mcMMO plugin) {
if (mcMMO.isHealthBarPluginEnabled() || !mcMMO.p.getGeneralConfig().getMobHealthbarEnabled()) {
return;
}
if (isBoss(target)) {
return;
}
// Don't mangle inval... | static void function(LivingEntity target, double damage, mcMMO plugin) { if (mcMMO.isHealthBarPluginEnabled() !mcMMO.p.getGeneralConfig().getMobHealthbarEnabled()) { return; } if (isBoss(target)) { return; } if (!target.isValid()) { return; } String originalName = target.getName(); String oldName = target.getCustomName... | /**
* Handle the creation of mob healthbars.
* @param target the targetted entity
* @param damage damage done by the attack triggering this
*/ | Handle the creation of mob healthbars | handleMobHealthbars | {
"repo_name": "mcMMO-Dev/mcMMO",
"path": "src/main/java/com/gmail/nossr50/util/MobHealthbarUtils.java",
"license": "gpl-3.0",
"size": 6147
} | [
"com.gmail.nossr50.datatypes.meta.OldName",
"com.gmail.nossr50.runnables.MobHealthDisplayUpdaterTask",
"org.bukkit.entity.LivingEntity",
"org.bukkit.metadata.FixedMetadataValue"
] | import com.gmail.nossr50.datatypes.meta.OldName; import com.gmail.nossr50.runnables.MobHealthDisplayUpdaterTask; import org.bukkit.entity.LivingEntity; import org.bukkit.metadata.FixedMetadataValue; | import com.gmail.nossr50.datatypes.meta.*; import com.gmail.nossr50.runnables.*; import org.bukkit.entity.*; import org.bukkit.metadata.*; | [
"com.gmail.nossr50",
"org.bukkit.entity",
"org.bukkit.metadata"
] | com.gmail.nossr50; org.bukkit.entity; org.bukkit.metadata; | 2,142,827 |
public Element create(String prefix, Document doc) {
return new XBLOMXBLElement(prefix, (AbstractDocument)doc);
}
}
protected static class XBLDefinitionElementFactory
implements ElementFactory {
public XBLDefinitionElementFactory() {} | Element function(String prefix, Document doc) { return new XBLOMXBLElement(prefix, (AbstractDocument)doc); } } protected static class XBLDefinitionElementFactory implements ElementFactory { public XBLDefinitionElementFactory() {} | /**
* Creates an instance of the associated element type.
*/ | Creates an instance of the associated element type | create | {
"repo_name": "Uni-Sol/batik",
"path": "sources/org/apache/batik/dom/svg12/SVG12DOMImplementation.java",
"license": "apache-2.0",
"size": 18250
} | [
"org.apache.batik.dom.AbstractDocument",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.apache.batik.dom.AbstractDocument; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.apache.batik.dom.*; import org.w3c.dom.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,160,593 |
public void testUnionStar() throws NoConnectionsException, IOException, ProcCallException {
Client client = this.getClient();
VoltTable vt;
client.callProcedure("InsertA", 0, 1); //In the final result set
client.callProcedure("InsertA", 1, 1); //In the final result set
client... | void function() throws NoConnectionsException, IOException, ProcCallException { Client client = this.getClient(); VoltTable vt; client.callProcedure(STR, 0, 1); client.callProcedure(STR, 1, 1); client.callProcedure(STR, 1, 1); client.callProcedure(STR, 2, 1); vt = client.callProcedure(STR, STR).getResults()[0]; assertE... | /**
* Two table Union - A.* and B.*
* @throws NoConnectionsException
* @throws IOException
* @throws ProcCallException
*/ | Two table Union - A.* and B | testUnionStar | {
"repo_name": "migue/voltdb",
"path": "tests/frontend/org/voltdb/regressionsuites/TestUnionSuite.java",
"license": "agpl-3.0",
"size": 41909
} | [
"java.io.IOException",
"org.voltdb.VoltTable",
"org.voltdb.client.Client",
"org.voltdb.client.NoConnectionsException",
"org.voltdb.client.ProcCallException"
] | import java.io.IOException; import org.voltdb.VoltTable; import org.voltdb.client.Client; import org.voltdb.client.NoConnectionsException; import org.voltdb.client.ProcCallException; | import java.io.*; import org.voltdb.*; import org.voltdb.client.*; | [
"java.io",
"org.voltdb",
"org.voltdb.client"
] | java.io; org.voltdb; org.voltdb.client; | 434,836 |
@ServiceMethod(returns = ReturnType.SINGLE)
public ProfileInner create(String resourceGroupName, String profileName, ProfileInner profile, Context context) {
return createAsync(resourceGroupName, profileName, profile, context).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) ProfileInner function(String resourceGroupName, String profileName, ProfileInner profile, Context context) { return createAsync(resourceGroupName, profileName, profile, context).block(); } | /**
* Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the
* specified subscription and resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the Azure Front... | Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group | create | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java",
"license": "mit",
"size": 123532
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cdn.fluent.models.ProfileInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,913,769 |
public void readObject(DCEBuffer buf)
throws DCEBufferException {
// Read the status values
m_srvType = buf.getInt();
m_currentState = buf.getInt();
m_ctrlAccepted = buf.getInt();
m_win32ExitCode = buf.getInt();
m_srvExitCode = buf.getInt();
m_checkPoint = buf.getInt();
m_waitHint = buf.getInt();... | void function(DCEBuffer buf) throws DCEBufferException { m_srvType = buf.getInt(); m_currentState = buf.getInt(); m_ctrlAccepted = buf.getInt(); m_win32ExitCode = buf.getInt(); m_srvExitCode = buf.getInt(); m_checkPoint = buf.getInt(); m_waitHint = buf.getInt(); } | /**
* Read the service status information from the DCE buffer
*
* @param buf DCEBuffer
* @exception DCEBufferException
* @see DCESerializable#readObject(DCEBuffer)
*/ | Read the service status information from the DCE buffer | readObject | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/dcerpc/info/ServiceStatusInfo.java",
"license": "lgpl-3.0",
"size": 5354
} | [
"org.alfresco.jlan.smb.dcerpc.DCEBuffer",
"org.alfresco.jlan.smb.dcerpc.DCEBufferException"
] | import org.alfresco.jlan.smb.dcerpc.DCEBuffer; import org.alfresco.jlan.smb.dcerpc.DCEBufferException; | import org.alfresco.jlan.smb.dcerpc.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 2,577,591 |
public void errorOp(final Marker marker, final Object message) {
logger.logIfEnabled(FQCN, ERROR, marker, message, (Throwable) null);
} | void function(final Marker marker, final Object message) { logger.logIfEnabled(FQCN, ERROR, marker, message, (Throwable) null); } | /**
* Logs a message object with the {@code ERROR} level.
*
* @param marker the marker data specific to this log statement
* @param message the message object to log.
*/ | Logs a message object with the ERROR level | errorOp | {
"repo_name": "ppatierno/kaas",
"path": "operator-common/src/main/java/io/strimzi/operator/common/ReconciliationLogger.java",
"license": "apache-2.0",
"size": 352724
} | [
"org.apache.logging.log4j.Marker"
] | import org.apache.logging.log4j.Marker; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 399,404 |
@Test
public void getProcessDefinitionsTest() throws ApiException {
String processDefinitionId = null;
String processDefinitionIdIn = null;
String name = null;
String nameLike = null;
String deploymentId = null;
OffsetDateTime deployedAfter = null;
OffsetD... | void function() throws ApiException { String processDefinitionId = null; String processDefinitionIdIn = null; String name = null; String nameLike = null; String deploymentId = null; OffsetDateTime deployedAfter = null; OffsetDateTime deployedAt = null; String key = null; String keysIn = null; String keyLike = null; Str... | /**
* Get List
*
* Queries for process definitions that fulfill given parameters. Parameters may be the properties of process definitions, such as the name, key or version. The size of the result set can be retrieved by using the [Get Definition Count](https://docs.camunda.org/manual/7.13/reference/rest... | Get List Queries for process definitions that fulfill given parameters. Parameters may be the properties of process definitions, such as the name, key or version. The size of the result set can be retrieved by using the [Get Definition Count](HREF) method | getProcessDefinitionsTest | {
"repo_name": "camunda/camunda-consulting",
"path": "snippets/camunda-openapi-client/camunda-openapi-client/src/test/java/com/camunda/consulting/openapi/client/handler/ProcessDefinitionApiTest.java",
"license": "apache-2.0",
"size": 36593
} | [
"com.camunda.consulting.openapi.client.handler.ApiException",
"com.camunda.consulting.openapi.client.model.ProcessDefinitionDto",
"java.util.List",
"org.threeten.bp.OffsetDateTime"
] | import com.camunda.consulting.openapi.client.handler.ApiException; import com.camunda.consulting.openapi.client.model.ProcessDefinitionDto; import java.util.List; import org.threeten.bp.OffsetDateTime; | import com.camunda.consulting.openapi.client.handler.*; import com.camunda.consulting.openapi.client.model.*; import java.util.*; import org.threeten.bp.*; | [
"com.camunda.consulting",
"java.util",
"org.threeten.bp"
] | com.camunda.consulting; java.util; org.threeten.bp; | 1,765,413 |
List<Group> getAllowedGroups(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) throws InternalErrorException; | List<Group> getAllowedGroups(PerunSession perunSession, Facility facility, Vo specificVo, Service specificService) throws InternalErrorException; | /**
* Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility)
* specificVo and specificService can choose concrete groups
* if specificVo, specificService or both are null, they do not specific (all possible results are returned)
*
* @param perunSession
... | Get all Groups which can use this facility (Groups must be assigned to resource which belongs to this facility) specificVo and specificService can choose concrete groups if specificVo, specificService or both are null, they do not specific (all possible results are returned) | getAllowedGroups | {
"repo_name": "Simcsa/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/FacilitiesManagerBl.java",
"license": "bsd-2-clause",
"size": 39157
} | [
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.Group",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Service",
"cz.metacentrum.perun.core.api.Vo",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Service; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.Li... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 2,848,410 |
public void setCamelContext(CamelContext camelContext) {
if (this.camelContext == null) {
this.camelContext = camelContext;
try {
camelContext.addService(this);
} catch (Exception e) {
throw RuntimeCamelException.wrapRuntimeCamelException(e... | void function(CamelContext camelContext) { if (this.camelContext == null) { this.camelContext = camelContext; try { camelContext.addService(this); } catch (Exception e) { throw RuntimeCamelException.wrapRuntimeCamelException(e); } } } | /**
* Sets the {@link CamelContext} <b>and also</b> initializes this loader.
* <p/>
* The reason why {@link #init(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)} is also called
* is because making using Dozer in Spring XML files easier, as no need to use the init-method attribute... | Sets the <code>CamelContext</code> and also initializes this loader. The reason why <code>#init(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)</code> is also called is because making using Dozer in Spring XML files easier, as no need to use the init-method attribute | setCamelContext | {
"repo_name": "punkhorn/camel-upstream",
"path": "components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java",
"license": "apache-2.0",
"size": 11476
} | [
"org.apache.camel.CamelContext",
"org.apache.camel.RuntimeCamelException"
] | import org.apache.camel.CamelContext; import org.apache.camel.RuntimeCamelException; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,791,407 |
String getStringSubfield(final String pszField, final int iFieldIndex,
final String pszSubfield, final int iSubfieldIndex) {
DDFField poField;
poField = findField(pszField, iFieldIndex);
if (poField == null) {
retur... | String getStringSubfield(final String pszField, final int iFieldIndex, final String pszSubfield, final int iSubfieldIndex) { DDFField poField; poField = findField(pszField, iFieldIndex); if (poField == null) { return null; } final DDFSubfieldDefinition poSFDefn = poField.getFieldDefn() .findSubfieldDefn(pszSubfield); i... | /**
* Fetch value of a subfield as a string. This is a convenience
* function for fetching a subfield of a field within this record.
*
* @param pszField The name of the field containing the subfield.
* @param iFieldIndex The instance of this field within the
* record. Use zer... | Fetch value of a subfield as a string. This is a convenience function for fetching a subfield of a field within this record | getStringSubfield | {
"repo_name": "alastrina123/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/S57/DDFRecord.java",
"license": "epl-1.0",
"size": 22920
} | [
"com.bbn.openmap.layer.vpf.MutableInt"
] | import com.bbn.openmap.layer.vpf.MutableInt; | import com.bbn.openmap.layer.vpf.*; | [
"com.bbn.openmap"
] | com.bbn.openmap; | 2,027,267 |
public void setResourcePersistence(ResourcePersistence resourcePersistence) {
this.resourcePersistence = resourcePersistence;
} | void function(ResourcePersistence resourcePersistence) { this.resourcePersistence = resourcePersistence; } | /**
* Sets the resource persistence.
*
* @param resourcePersistence the resource persistence
*/ | Sets the resource persistence | setResourcePersistence | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/whp_site_danger_listServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 166320
} | [
"com.liferay.portal.service.persistence.ResourcePersistence"
] | import com.liferay.portal.service.persistence.ResourcePersistence; | import com.liferay.portal.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,421,090 |
public static List<KeyValue> extractDataFromResponse(HttpResponse response,
Map<String, Integer> keyPositionMap)
throws IOException {
//todo extracting sessionDataK... | static List<KeyValue> function(HttpResponse response, Map<String, Integer> keyPositionMap) throws IOException { List<KeyValue> keyValues = new ArrayList<KeyValue>(); BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity() .getContent())); String line; while ((line = rd.readLine()) != null) { f... | /**
* Extract data from http response with the given keywords
*
* @param response
* @param keyPositionMap
* @return values
* @throws java.io.IOException
*/ | Extract data from http response with the given keywords | extractDataFromResponse | {
"repo_name": "thariyarox/product-is",
"path": "modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/utils/DataExtractUtil.java",
"license": "apache-2.0",
"size": 8399
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.apache.http.HttpResponse"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.http.HttpResponse; | import java.io.*; import java.util.*; import org.apache.http.*; | [
"java.io",
"java.util",
"org.apache.http"
] | java.io; java.util; org.apache.http; | 2,676,780 |
private boolean iniMainInter() {
Bundle extras = getIntent().getExtras();
if(extras == null)
return false;
this.play = (Play) extras.getSerializable("Play");
this.images = new ImageHandler(this);
this.bluetooth = new BluetoothMethods(this);
if(this.bluetooth.initializeBlueToothSend()==false){
... | boolean function() { Bundle extras = getIntent().getExtras(); if(extras == null) return false; this.play = (Play) extras.getSerializable("Play"); this.images = new ImageHandler(this); this.bluetooth = new BluetoothMethods(this); if(this.bluetooth.initializeBlueToothSend()==false){ Toast.makeText(this, STR, Toast.LENGTH... | /**
* It is called by the method OnCreate. Read the bundle whit the information of the play, creates the imageHandler and the BluetoothMethods,
* set the name of the play in the modify play button, and calls the methods "setPlatActions" and "setPlayRobots"
*
* @return <p>true if everything is allright... | It is called by the method OnCreate. Read the bundle whit the information of the play, creates the imageHandler and the BluetoothMethods, set the name of the play in the modify play button, and calls the methods "setPlatActions" and "setPlayRobots" | iniMainInter | {
"repo_name": "ScifestJoensuu/theater-robot",
"path": "Arturo/RobotStories/src/com/interfaces/robotstories/main_interfaz.java",
"license": "mit",
"size": 28142
} | [
"android.os.Bundle",
"android.widget.Button",
"android.widget.Toast",
"com.auxiliar.robotstories.BluetoothMethods",
"com.auxiliar.robotstories.ImageHandler",
"com.types.robotstories.Play"
] | import android.os.Bundle; import android.widget.Button; import android.widget.Toast; import com.auxiliar.robotstories.BluetoothMethods; import com.auxiliar.robotstories.ImageHandler; import com.types.robotstories.Play; | import android.os.*; import android.widget.*; import com.auxiliar.robotstories.*; import com.types.robotstories.*; | [
"android.os",
"android.widget",
"com.auxiliar.robotstories",
"com.types.robotstories"
] | android.os; android.widget; com.auxiliar.robotstories; com.types.robotstories; | 1,107,490 |
public CompilationMessage errVariableTypeMismatch(String varName, QName expectedType,
QName actualType) {
return this.formatCompilationMessage("The variable \"{0}\" must be of type \"{1}\""
+ " to be used in this context; its actual type is \"{2}\".", varName, expectedType,
a... | CompilationMessage function(String varName, QName expectedType, QName actualType) { return this.formatCompilationMessage(STR{0}\STR{1}\STR to be used in this context; its actual type is \"{2}\".", varName, expectedType, actualType); } | /**
* The variable "{0}" must be of type "{1}" to be used in this context; its
* actual type is "{1}".
*/ | The variable "{0}" must be of type "{1}" to be used in this context; its actual type is "{1}" | errVariableTypeMismatch | {
"repo_name": "mproch/apache-ode",
"path": "bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/CommonCompilationMessages.java",
"license": "apache-2.0",
"size": 21929
} | [
"javax.xml.namespace.QName",
"org.apache.ode.bpel.compiler.api.CompilationMessage"
] | import javax.xml.namespace.QName; import org.apache.ode.bpel.compiler.api.CompilationMessage; | import javax.xml.namespace.*; import org.apache.ode.bpel.compiler.api.*; | [
"javax.xml",
"org.apache.ode"
] | javax.xml; org.apache.ode; | 43,151 |
@Around("isConfigEnabled() && (pointCut() || pointCutAll())")
public Object log(ProceedingJoinPoint point) throws Throwable {
long start = System.currentTimeMillis();
MethodSignature signature = (MethodSignature) point.getSignature();
Object result = point.proceed();
String[] arg... | @Around(STR) Object function(ProceedingJoinPoint point) throws Throwable { long start = System.currentTimeMillis(); MethodSignature signature = (MethodSignature) point.getSignature(); Object result = point.proceed(); String[] args = signature.getParameterNames(); String argString; StringBuilder stringBuilder = new Stri... | /**
* If the pointcuts results true, this method is invoked every time a method satisfies the
* criteria given in the pointcut.
*
* @param point The JoinPoint before method execution
* @return result of method execution
* @throws Throwable
*/ | If the pointcuts results true, this method is invoked every time a method satisfies the criteria given in the pointcut | log | {
"repo_name": "ruks/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.util/src/main/java/org/wso2/carbon/apimgt/rest/api/util/MethodTimeLogger.java",
"license": "apache-2.0",
"size": 5667
} | [
"org.aspectj.lang.ProceedingJoinPoint",
"org.aspectj.lang.annotation.Around",
"org.aspectj.lang.reflect.MethodSignature"
] | import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.reflect.MethodSignature; | import org.aspectj.lang.*; import org.aspectj.lang.annotation.*; import org.aspectj.lang.reflect.*; | [
"org.aspectj.lang"
] | org.aspectj.lang; | 1,073,715 |
public CharSequence getName(Context context) {
return getName(context.getResources());
} | CharSequence function(Context context) { return getName(context.getResources()); } | /**
* Return the properly localized/resource user-visible name of this route.
* <p>
* The route name identifies the destination represented by the route.
* It may be a user-supplied name, an alias, or device serial number.
* </p>
*
* @param context Context ... | Return the properly localized/resource user-visible name of this route. The route name identifies the destination represented by the route. It may be a user-supplied name, an alias, or device serial number. | getName | {
"repo_name": "xorware/android_frameworks_base",
"path": "media/java/android/media/MediaRouter.java",
"license": "apache-2.0",
"size": 113716
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 976,939 |
public static void verifyNoDatabaseContext() {
Database database = ContextInfo.getUserDatabase();
if ( database != null ) {
throw new WebApplicationException(createErrorResponse("Database context not allowed.", // $NLX-RestService.Databasecontextnotallowed-1$
... | static void function() { Database database = ContextInfo.getUserDatabase(); if ( database != null ) { throw new WebApplicationException(createErrorResponse(STR, Response.Status.NOT_FOUND)); } } | /**
* Verifies the current request has NO database context.
*/ | Verifies the current request has NO database context | verifyNoDatabaseContext | {
"repo_name": "iharkhukhrakou/XPagesExtensionLibrary",
"path": "extlib/lwp/product/runtime/eclipse/plugins/com.ibm.domino.das/src/com/ibm/domino/das/service/RestService.java",
"license": "apache-2.0",
"size": 9030
} | [
"com.ibm.domino.osgi.core.context.ContextInfo",
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.Response"
] | import com.ibm.domino.osgi.core.context.ContextInfo; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; | import com.ibm.domino.osgi.core.context.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.ibm.domino",
"javax.ws"
] | com.ibm.domino; javax.ws; | 2,175,171 |
@Override
protected String getContextName() {
return ContextHelpIDs.WIZARD_SELECT_RESOURCES;
} | String function() { return ContextHelpIDs.WIZARD_SELECT_RESOURCES; } | /**
* Return the context name for the help of this page
*/ | Return the context name for the help of this page | getContextName | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.server/src/com/jaspersoft/studio/server/publish/wizard/page/ResourcesPage.java",
"license": "lgpl-3.0",
"size": 12829
} | [
"com.jaspersoft.studio.wizards.ContextHelpIDs"
] | import com.jaspersoft.studio.wizards.ContextHelpIDs; | import com.jaspersoft.studio.wizards.*; | [
"com.jaspersoft.studio"
] | com.jaspersoft.studio; | 2,363,885 |
long getWriteBytes(OutputStream outputStream); | long getWriteBytes(OutputStream outputStream); | /**
* Given a manager-specific output stream, return the current write position.
* Used to report total write bytes.
*
* @param outputStream output stream created by the file manager
* @return
*/ | Given a manager-specific output stream, return the current write position. Used to report total write bytes | getWriteBytes | {
"repo_name": "bitblender/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/spill/SpillSet.java",
"license": "apache-2.0",
"size": 14806
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,227,267 |
protected void addRepresentsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(
// CHECKSTYLE:IGNORE AnonInnerLength: Okay here.
new ItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getRes... | void function(Object object) { itemPropertyDescriptors.add( new ItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RamPackage.Literals.LIFELINE__REPRESENTS, true, false, true, null, null, null) { | /**
* This adds a property descriptor for the Represents feature.
* <!-- begin-user-doc -->
* @param object the object to add a property descriptor for
* <!-- end-user-doc -->
* @generated NOT
*/ | This adds a property descriptor for the Represents feature. | addRepresentsPropertyDescriptor | {
"repo_name": "sacooper/ECSE-429-Project-Group1",
"path": "ca.mcgill.sel.ram.edit/src/ca/mcgill/sel/ram/provider/LifelineItemProvider.java",
"license": "gpl-2.0",
"size": 24611
} | [
"ca.mcgill.sel.ram.RamPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import ca.mcgill.sel.ram.RamPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import ca.mcgill.sel.ram.*; import org.eclipse.emf.edit.provider.*; | [
"ca.mcgill.sel",
"org.eclipse.emf"
] | ca.mcgill.sel; org.eclipse.emf; | 2,348,427 |
@Override
public boolean registerOutputName(String name) {
final String outputName = name.toLowerCase(Locale.ROOT);
return processedLowercaseClassNames.add(outputName);
}
| boolean function(String name) { final String outputName = name.toLowerCase(Locale.ROOT); return processedLowercaseClassNames.add(outputName); } | /**
* Attempts to register the given output name.
*
* @return boolean indicating whether the given name could be registered as unique. If not, calling code should choose a new name or Error.
*
*/ | Attempts to register the given output name | registerOutputName | {
"repo_name": "TehJumpingJawa/SSME",
"path": "SSME/src/main/java/org/tjj/starsector/ssme/sanitizer/Sanitizer.java",
"license": "gpl-3.0",
"size": 12986
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,668,389 |
EReference getAncillaryService_TransmissionProviders(); | EReference getAncillaryService_TransmissionProviders(); | /**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Informative.Reservation.AncillaryService#getTransmissionProviders <em>Transmission Providers</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Transmission Providers</em>'.
*... | Returns the meta object for the reference list '<code>CIM.IEC61970.Informative.Reservation.AncillaryService#getTransmissionProviders Transmission Providers</code>'. | getAncillaryService_TransmissionProviders | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/Reservation/ReservationPackage.java",
"license": "mit",
"size": 60021
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 573,458 |
public boolean isExternalRepo( ArtifactRepository originalRepository )
{
try
{
URL url = new URL( originalRepository.getUrl() );
return !( url.getHost().equals( "localhost" ) || url.getHost().equals( "127.0.0.1" ) || url.getProtocol().equals(
"file" ) );
... | boolean function( ArtifactRepository originalRepository ) { try { URL url = new URL( originalRepository.getUrl() ); return !( url.getHost().equals( STR ) url.getHost().equals( STR ) url.getProtocol().equals( "file" ) ); } catch ( MalformedURLException e ) { return false; } } | /**
* Checks the URL to see if this repository refers to an external repository
*
* @param originalRepository
* @return true if external.
*/ | Checks the URL to see if this repository refers to an external repository | isExternalRepo | {
"repo_name": "apache/continuum",
"path": "continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java",
"license": "apache-2.0",
"size": 43331
} | [
"java.net.MalformedURLException",
"org.apache.maven.artifact.repository.ArtifactRepository"
] | import java.net.MalformedURLException; import org.apache.maven.artifact.repository.ArtifactRepository; | import java.net.*; import org.apache.maven.artifact.repository.*; | [
"java.net",
"org.apache.maven"
] | java.net; org.apache.maven; | 1,818,935 |
int updateByPrimaryKeySelective(SaveSearchResult record); | int updateByPrimaryKeySelective(SaveSearchResult record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table s_save_search_result
*
* @mbg.generated Sat Feb 09 11:42:26 CST 2019
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table s_save_search_result | updateByPrimaryKeySelective | {
"repo_name": "aglne/mycollab",
"path": "mycollab-services/src/main/java/com/mycollab/common/dao/SaveSearchResultMapper.java",
"license": "agpl-3.0",
"size": 5125
} | [
"com.mycollab.common.domain.SaveSearchResult"
] | import com.mycollab.common.domain.SaveSearchResult; | import com.mycollab.common.domain.*; | [
"com.mycollab.common"
] | com.mycollab.common; | 1,331,453 |
public final BlockLocation getRelative(final BlockFace face) {
return new BlockLocation(world, x + face.getModX(), y + face.getModY(), z + face.getModZ());
} | final BlockLocation function(final BlockFace face) { return new BlockLocation(world, x + face.getModX(), y + face.getModY(), z + face.getModZ()); } | /**
* Gets the {@link BlockLocation} at the given face. This method is equal to
* getRelative(face, 1)
*
* @param face
* Face of this {@link BlockLocation} to return
* @return New location at the given face
*/ | Gets the <code>BlockLocation</code> at the given face. This method is equal to getRelative(face, 1) | getRelative | {
"repo_name": "zreed/StarQuestCode",
"path": "Bukkit/MachinaCore/src/main/java/me/lyneira/MachinaCore/BlockLocation.java",
"license": "mit",
"size": 8397
} | [
"org.bukkit.block.BlockFace"
] | import org.bukkit.block.BlockFace; | import org.bukkit.block.*; | [
"org.bukkit.block"
] | org.bukkit.block; | 2,261,125 |
@Override
public List<KijiRegion> getRegions() throws IOException {
final State state = mState.get();
Preconditions.checkState(state == State.OPEN,
"Cannot get the regions for a KijiTable in state %s.", state);
throw new UnsupportedOperationException("Cassandra-backed Kiji tables do not have reg... | List<KijiRegion> function() throws IOException { final State state = mState.get(); Preconditions.checkState(state == State.OPEN, STR, state); throw new UnsupportedOperationException(STR); } | /**
* Does not really make sense for a Cassandra implementation.
*
* @return An empty list.
* @throws java.io.IOException on I/O error.
*/ | Does not really make sense for a Cassandra implementation | getRegions | {
"repo_name": "rpinzon/kiji-schema",
"path": "kiji-schema-cassandra/src/main/java/org/kiji/schema/impl/cassandra/CassandraKijiTable.java",
"license": "apache-2.0",
"size": 12740
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.util.List",
"org.kiji.schema.KijiRegion"
] | import com.google.common.base.Preconditions; import java.io.IOException; import java.util.List; import org.kiji.schema.KijiRegion; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.kiji.schema.*; | [
"com.google.common",
"java.io",
"java.util",
"org.kiji.schema"
] | com.google.common; java.io; java.util; org.kiji.schema; | 2,524,463 |
public void setLlcpMainReportWriterService(DocumentNumberAwareReportWriterService llcpMainReportWriterService) {
this.llcpMainReportWriterService = llcpMainReportWriterService;
}
| void function(DocumentNumberAwareReportWriterService llcpMainReportWriterService) { this.llcpMainReportWriterService = llcpMainReportWriterService; } | /**
* Sets the llcpMainReportWriterService attribute value.
* @param llcpMainReportWriterService The llcpMainReportWriterService to set.
*/ | Sets the llcpMainReportWriterService attribute value | setLlcpMainReportWriterService | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/batch/service/impl/LaborScrubberServiceImpl.java",
"license": "agpl-3.0",
"size": 14002
} | [
"org.kuali.kfs.sys.service.DocumentNumberAwareReportWriterService"
] | import org.kuali.kfs.sys.service.DocumentNumberAwareReportWriterService; | import org.kuali.kfs.sys.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,093,000 |
private void updateParentGroup(DynamicCodeCodeEditViewModel viewModel) {
BrowserElement element = Activator.getDefault().getModel().getBrowserModel()
.getFirstElement();
if (element instanceof DynamicCodeCodeGroupEditViewBrowserElement) {
DynamicCodeCodeGroup parentGroup... | void function(DynamicCodeCodeEditViewModel viewModel) { BrowserElement element = Activator.getDefault().getModel().getBrowserModel() .getFirstElement(); if (element instanceof DynamicCodeCodeGroupEditViewBrowserElement) { DynamicCodeCodeGroup parentGroup = ((DynamicCodeCodeGroupEditViewBrowserElement) element) .getView... | /**
* Update the parent group.
*
* @param viewModel
* the view model
*/ | Update the parent group | updateParentGroup | {
"repo_name": "NABUCCO/org.nabucco.framework.common.dynamiccode",
"path": "org.nabucco.framework.common.dynamiccode.ui.rcp/src/main/man/org/nabucco/framework/common/dynamiccode/ui/rcp/command/code/create/CreateDynamicCodeCodeFromBrowserHandlerImpl.java",
"license": "epl-1.0",
"size": 2293
} | [
"org.nabucco.framework.common.dynamiccode.facade.datatype.DynamicCodeCodeGroup",
"org.nabucco.framework.common.dynamiccode.ui.rcp.browser.codegroup.DynamicCodeCodeGroupEditViewBrowserElement",
"org.nabucco.framework.common.dynamiccode.ui.rcp.edit.code.model.DynamicCodeCodeEditViewModel",
"org.nabucco.framewor... | import org.nabucco.framework.common.dynamiccode.facade.datatype.DynamicCodeCodeGroup; import org.nabucco.framework.common.dynamiccode.ui.rcp.browser.codegroup.DynamicCodeCodeGroupEditViewBrowserElement; import org.nabucco.framework.common.dynamiccode.ui.rcp.edit.code.model.DynamicCodeCodeEditViewModel; import org.nabuc... | import org.nabucco.framework.common.dynamiccode.facade.datatype.*; import org.nabucco.framework.common.dynamiccode.ui.rcp.browser.codegroup.*; import org.nabucco.framework.common.dynamiccode.ui.rcp.edit.code.model.*; import org.nabucco.framework.plugin.base.*; import org.nabucco.framework.plugin.base.model.browser.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,027,143 |
public static JSlider createSlider( final String settingKey, final int minValue, final int maxValue ) {
final JSlider slider = new JSlider( minValue, maxValue, Settings.getInt( settingKey ) );
| static JSlider function( final String settingKey, final int minValue, final int maxValue ) { final JSlider slider = new JSlider( minValue, maxValue, Settings.getInt( settingKey ) ); | /**
* Creates a slider whose value is bound to the specified settingKey.<br>
* The initial value of the slider will be taken from the {@link Settings},
* and a change listener will be added to the slider to register changes at the {@link Settings}.<br>
*
* @param settingKey key of the setting its value ... | Creates a slider whose value is bound to the specified settingKey. The initial value of the slider will be taken from the <code>Settings</code>, and a change listener will be added to the slider to register changes at the <code>Settings</code> | createSlider | {
"repo_name": "icza/sc2gears",
"path": "src/hu/belicza/andras/sc2gears/ui/GuiUtils.java",
"license": "apache-2.0",
"size": 63828
} | [
"hu.belicza.andras.sc2gears.settings.Settings",
"javax.swing.JSlider"
] | import hu.belicza.andras.sc2gears.settings.Settings; import javax.swing.JSlider; | import hu.belicza.andras.sc2gears.settings.*; import javax.swing.*; | [
"hu.belicza.andras",
"javax.swing"
] | hu.belicza.andras; javax.swing; | 353,986 |
private void showFeedInformation(final Feed feed, Map<String, String> alternateFeedUrls) {
setContentView(R.layout.listview_activity);
this.feed = feed;
this.selectedDownloadUrl = feed.getDownload_url();
EventDistributor.getInstance().register(listener);
ListView listView = ... | void function(final Feed feed, Map<String, String> alternateFeedUrls) { setContentView(R.layout.listview_activity); this.feed = feed; this.selectedDownloadUrl = feed.getDownload_url(); EventDistributor.getInstance().register(listener); ListView listView = (ListView) findViewById(R.id.listview); LayoutInflater inflater ... | /**
* Called when feed parsed successfully.
* This method is executed on the GUI thread.
*/ | Called when feed parsed successfully. This method is executed on the GUI thread | showFeedInformation | {
"repo_name": "TeodorKostadinov/PodcastApp",
"path": "app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java",
"license": "mit",
"size": 23299
} | [
"android.content.Context",
"android.view.LayoutInflater",
"android.view.View",
"android.widget.Button",
"android.widget.ImageView",
"android.widget.ListView",
"android.widget.Spinner",
"android.widget.TextView",
"com.bumptech.glide.Glide",
"de.danoeh.antennapod.adapter.FeedItemlistDescriptionAdapt... | import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; import com.bumptech.glide.Glide; import de.danoeh.antennapod.adapter... | import android.content.*; import android.view.*; import android.widget.*; import com.bumptech.glide.*; import de.danoeh.antennapod.adapter.*; import de.danoeh.antennapod.core.dialog.*; import de.danoeh.antennapod.core.feed.*; import de.danoeh.antennapod.core.glide.*; import de.danoeh.antennapod.core.storage.*; import j... | [
"android.content",
"android.view",
"android.widget",
"com.bumptech.glide",
"de.danoeh.antennapod",
"java.util",
"org.apache.commons"
] | android.content; android.view; android.widget; com.bumptech.glide; de.danoeh.antennapod; java.util; org.apache.commons; | 127,894 |
Request find(long requestID) throws SQLException;
| Request find(long requestID) throws SQLException; | /**
*
* gets a single Request from the database
*
* @param requestID The data of the request to be updated.
* @return The request object linked to the ID
* @throws java.sql.SQLException
* @see Request
*/ | gets a single Request from the database | find | {
"repo_name": "pveeckhout/TimeCloud",
"path": "src/timecloud/dao/request/RequestDAO.java",
"license": "mit",
"size": 3958
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,091,089 |
public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().last().body();
} | ExpressRouteCircuitInner function(String resourceGroupName, String circuitName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().last().body(); } | /**
* Updates an express route circuit tags.
*
* @param resourceGroupName The name of the resource group.
* @param circuitName The name of the circuit.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thr... | Updates an express route circuit tags | updateTags | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitsInner.java",
"license": "mit",
"size": 125598
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,009,948 |
public Builder expireAt(OffsetDateTime time) {
if (time == null) {
return this.unsetExpireAt();
} else {
return this.expireAt(UpdateValue.set(time));
}
} | Builder function(OffsetDateTime time) { if (time == null) { return this.unsetExpireAt(); } else { return this.expireAt(UpdateValue.set(time)); } } | /**
* Updates the batch expire time. If given a <code>null</code> reference
* then this is equivalent to calling {@link #unsetExpireAt()}.
*
* @param time
* the new expire time
* @return this builder for use in a chained invocation
*/ | Updates the batch expire time. If given a <code>null</code> reference then this is equivalent to calling <code>#unsetExpireAt()</code> | expireAt | {
"repo_name": "clxcommunications/sdk-xms-java",
"path": "src/main/java/com/clxcommunications/xms/api/MtBatchBinarySmsUpdate.java",
"license": "apache-2.0",
"size": 5154
} | [
"com.clxcommunications.xms.UpdateValue",
"org.threeten.bp.OffsetDateTime"
] | import com.clxcommunications.xms.UpdateValue; import org.threeten.bp.OffsetDateTime; | import com.clxcommunications.xms.*; import org.threeten.bp.*; | [
"com.clxcommunications.xms",
"org.threeten.bp"
] | com.clxcommunications.xms; org.threeten.bp; | 1,827,961 |
@Test
public void testRESTServerSSLDisabled() throws Exception {
Configuration serverConfig = createRestSslConfigWithKeyStore();
serverConfig.setBoolean(SecurityOptions.SSL_REST_ENABLED, false);
try {
SSLUtils.createRestServerSSLEngineFactory(serverConfig);
fail("exception expected");
} catch (Illega... | void function() throws Exception { Configuration serverConfig = createRestSslConfigWithKeyStore(); serverConfig.setBoolean(SecurityOptions.SSL_REST_ENABLED, false); try { SSLUtils.createRestServerSSLEngineFactory(serverConfig); fail(STR); } catch (IllegalConfigurationException ignored) {} } | /**
* Tests that REST Server SSL Engine is not created if SSL is disabled.
*/ | Tests that REST Server SSL Engine is not created if SSL is disabled | testRESTServerSSLDisabled | {
"repo_name": "zhangminglei/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java",
"license": "apache-2.0",
"size": 15548
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.IllegalConfigurationException",
"org.apache.flink.configuration.SecurityOptions",
"org.junit.Assert"
] | import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.IllegalConfigurationException; import org.apache.flink.configuration.SecurityOptions; import org.junit.Assert; | import org.apache.flink.configuration.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 2,365,322 |
@Override public void afterTest(final Method method) {
if (RuntimeEnvironment.application instanceof TestLifecycleApplication) {
((TestLifecycleApplication) RuntimeEnvironment.application).afterTest(method);
}
} | @Override void function(final Method method) { if (RuntimeEnvironment.application instanceof TestLifecycleApplication) { ((TestLifecycleApplication) RuntimeEnvironment.application).afterTest(method); } } | /**
* Called after each test method is run.
*
* @param method the test method that just ran.
*/ | Called after each test method is run | afterTest | {
"repo_name": "ChengCorp/robolectric",
"path": "robolectric/src/main/java/org/robolectric/DefaultTestLifecycle.java",
"license": "mit",
"size": 3965
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,604,276 |
static String toString(BareConnection instance, String fromModuleName, String toModuleName) {
@Nullable BareSimpleNameable fromPort = instance.getFromPort();
@Nullable BareSimpleNameable toPort = instance.getToPort();
String fromPortName = fromPort == null || fromPort.getSimp... | static String toString(BareConnection instance, String fromModuleName, String toModuleName) { @Nullable BareSimpleNameable fromPort = instance.getFromPort(); @Nullable BareSimpleNameable toPort = instance.getToPort(); String fromPortName = fromPort == null fromPort.getSimpleName() == null ? STR : fromPort.getSimpleName... | /**
* Default implementation for {@link BareConnection#toString()}.
*/ | Default implementation for <code>BareConnection#toString()</code> | toString | {
"repo_name": "priimak/cloudkeeper",
"path": "cloudkeeper-core/cloudkeeper-model/src/main/java/com/svbio/cloudkeeper/model/bare/element/module/BareConnection.java",
"license": "apache-2.0",
"size": 2690
} | [
"com.svbio.cloudkeeper.model.bare.element.BareSimpleNameable",
"javax.annotation.Nullable"
] | import com.svbio.cloudkeeper.model.bare.element.BareSimpleNameable; import javax.annotation.Nullable; | import com.svbio.cloudkeeper.model.bare.element.*; import javax.annotation.*; | [
"com.svbio.cloudkeeper",
"javax.annotation"
] | com.svbio.cloudkeeper; javax.annotation; | 143,971 |
public static List<SensorDTO> toDTOs(List<Sensor> entityList) {
List<SensorDTO> dto_list = new ArrayList<>();
for (Sensor entity : entityList) {
dto_list.add(SensorConverter.toDTO(entity));
}
return dto_list;
}
| static List<SensorDTO> function(List<Sensor> entityList) { List<SensorDTO> dto_list = new ArrayList<>(); for (Sensor entity : entityList) { dto_list.add(SensorConverter.toDTO(entity)); } return dto_list; } | /**
* Converts a list of {@code Sensor} entities to a list of DTOs.
* @param entityList list of entities to convert
* @return list of {@code SensorDTO}s equivalent to the entities
*/ | Converts a list of Sensor entities to a list of DTOs | toDTOs | {
"repo_name": "daergoth/hiots",
"path": "core/src/main/java/net/daergoth/core/sensor/SensorConverter.java",
"license": "mit",
"size": 2842
} | [
"java.util.ArrayList",
"java.util.List",
"net.daergoth.coreapi.sensor.SensorDTO"
] | import java.util.ArrayList; import java.util.List; import net.daergoth.coreapi.sensor.SensorDTO; | import java.util.*; import net.daergoth.coreapi.sensor.*; | [
"java.util",
"net.daergoth.coreapi"
] | java.util; net.daergoth.coreapi; | 1,615,397 |
String getExtendedName(String name, String format)
{
String extension = "."+format;
Pattern pattern = RegExFactory.createPattern(extension);
String n;
if (RegExFactory.find(pattern, name)) {
n = name;
} else {
pattern = RegExFactory.createCaseInsensitivePattern(extension);
... | String getExtendedName(String name, String format) { String extension = "."+format; Pattern pattern = RegExFactory.createPattern(extension); String n; if (RegExFactory.find(pattern, name)) { n = name; } else { pattern = RegExFactory.createCaseInsensitivePattern(extension); if (RegExFactory.find(pattern, name)) n = name... | /**
* Adds the extension to the passed name if necessary.
*
* @param name The name to handle.
* @param format The selected file format.
* @return See above.
*/ | Adds the extension to the passed name if necessary | getExtendedName | {
"repo_name": "bramalingam/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/util/saver/ImgSaver.java",
"license": "gpl-2.0",
"size": 21402
} | [
"java.util.regex.Pattern",
"org.openmicroscopy.shoola.util.ui.RegExFactory"
] | import java.util.regex.Pattern; import org.openmicroscopy.shoola.util.ui.RegExFactory; | import java.util.regex.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 47,829 |
@Nullable
private String getCredentials(String header) {
if (header == null) {
return null;
}
final int space = header.indexOf(' ');
if (space <= 0) {
return null;
}
final String method = header.substring(0, space);
if (!prefix.eq... | String function(String header) { if (header == null) { return null; } final int space = header.indexOf(' '); if (space <= 0) { return null; } final String method = header.substring(0, space); if (!prefix.equalsIgnoreCase(method)) { return null; } return header.substring(space + 1); } public static class Builder<P exten... | /**
* Parses a value of the `Authorization` header in the form of `Bearer a892bf3e284da9bb40648ab10`.
*
* @param header the value of the `Authorization` header
* @return a token
*/ | Parses a value of the `Authorization` header in the form of `Bearer a892bf3e284da9bb40648ab10` | getCredentials | {
"repo_name": "shawnsmith/dropwizard",
"path": "dropwizard-auth/src/main/java/io/dropwizard/auth/oauth/OAuthCredentialAuthFilter.java",
"license": "apache-2.0",
"size": 2722
} | [
"java.security.Principal"
] | import java.security.Principal; | import java.security.*; | [
"java.security"
] | java.security; | 2,063,465 |
public static void toXContent(XContentBuilder builder, Params params, Throwable ex) throws IOException {
ex = ExceptionsHelper.unwrapCause(ex);
if (ex instanceof ElasticsearchException) {
((ElasticsearchException) ex).toXContent(builder, params);
} else {
builder.fiel... | static void function(XContentBuilder builder, Params params, Throwable ex) throws IOException { ex = ExceptionsHelper.unwrapCause(ex); if (ex instanceof ElasticsearchException) { ((ElasticsearchException) ex).toXContent(builder, params); } else { builder.field("type", getExceptionName(ex)); builder.field(STR, ex.getMes... | /**
* Statis toXContent helper method that also renders non {@link org.elasticsearch.ElasticsearchException} instances as XContent.
*/ | Statis toXContent helper method that also renders non <code>org.elasticsearch.ElasticsearchException</code> instances as XContent | toXContent | {
"repo_name": "danielmitterdorfer/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/ElasticsearchException.java",
"license": "apache-2.0",
"size": 47298
} | [
"java.io.IOException",
"org.elasticsearch.common.xcontent.XContentBuilder"
] | import java.io.IOException; import org.elasticsearch.common.xcontent.XContentBuilder; | import java.io.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 2,903,771 |
public static void browse(String url) {
Preconditions.checkNotNull(url);
// Ask user to open in their browser using copy-paste
System.out.println("Please open the following address in your browser:");
System.out.println(" " + url);
// Attempt to open it in the browser
try {
if (Desktop.... | static void function(String url) { Preconditions.checkNotNull(url); System.out.println(STR); System.out.println(" " + url); try { if (Desktop.isDesktopSupported()) { Desktop desktop = Desktop.getDesktop(); if (desktop.isSupported(Action.BROWSE)) { System.out.println(STR); desktop.browse(URI.create(url)); } } } catch (I... | /**
* Open a browser at the given URL using {@link Desktop} if available, or alternatively output the
* URL to {@link System#out} for command-line applications.
*
* @param url URL to browse
*/ | Open a browser at the given URL using <code>Desktop</code> if available, or alternatively output the URL to <code>System#out</code> for command-line applications | browse | {
"repo_name": "googleapis/google-oauth-java-client",
"path": "google-oauth-client-java6/src/main/java/com/google/api/client/extensions/java6/auth/oauth2/AuthorizationCodeInstalledApp.java",
"license": "apache-2.0",
"size": 6464
} | [
"com.google.api.client.util.Preconditions",
"java.awt.Desktop",
"java.io.IOException",
"java.net.URI",
"java.util.logging.Level"
] | import com.google.api.client.util.Preconditions; import java.awt.Desktop; import java.io.IOException; import java.net.URI; import java.util.logging.Level; | import com.google.api.client.util.*; import java.awt.*; import java.io.*; import java.net.*; import java.util.logging.*; | [
"com.google.api",
"java.awt",
"java.io",
"java.net",
"java.util"
] | com.google.api; java.awt; java.io; java.net; java.util; | 505,019 |
public synchronized Vector<TaskInProgress> reportCleanupTIPs(
boolean shouldBeComplete) {
Vector<TaskInProgress> results = new Vector<TaskInProgress>();
for (int i = 0; i < cleanup.length; i++) {
if (cleanup[i].isComplete() == shouldBeComplete) {
... | synchronized Vector<TaskInProgress> function( boolean shouldBeComplete) { Vector<TaskInProgress> results = new Vector<TaskInProgress>(); for (int i = 0; i < cleanup.length; i++) { if (cleanup[i].isComplete() == shouldBeComplete) { results.add(cleanup[i]); } } return results; } | /**
* Return a vector of cleanup TaskInProgress objects
*/ | Return a vector of cleanup TaskInProgress objects | reportCleanupTIPs | {
"repo_name": "dhootha/hadoop-common",
"path": "src/mapred/org/apache/hadoop/mapred/JobInProgress.java",
"license": "apache-2.0",
"size": 92287
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 651,003 |
if (canHoldNewTuple(fieldEndOffsets.length, length)) {
for (int i = 0; i < fieldEndOffsets.length; ++i) {
IntSerDeUtils.putInt(array, tupleDataEndOffset + i * 4, fieldEndOffsets[i]);
}
System.arraycopy(bytes, offset, array, tupleDataEndOffset + fieldEndOffsets.length ... | if (canHoldNewTuple(fieldEndOffsets.length, length)) { for (int i = 0; i < fieldEndOffsets.length; ++i) { IntSerDeUtils.putInt(array, tupleDataEndOffset + i * 4, fieldEndOffsets[i]); } System.arraycopy(bytes, offset, array, tupleDataEndOffset + fieldEndOffsets.length * 4, length); tupleDataEndOffset += fieldEndOffsets.... | /**
* append fieldSlots and bytes to the current frame
*/ | append fieldSlots and bytes to the current frame | append | {
"repo_name": "waans11/incubator-asterixdb",
"path": "hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/comm/io/FrameTupleAppender.java",
"license": "apache-2.0",
"size": 14508
} | [
"org.apache.hyracks.api.comm.FrameHelper",
"org.apache.hyracks.util.IntSerDeUtils"
] | import org.apache.hyracks.api.comm.FrameHelper; import org.apache.hyracks.util.IntSerDeUtils; | import org.apache.hyracks.api.comm.*; import org.apache.hyracks.util.*; | [
"org.apache.hyracks"
] | org.apache.hyracks; | 772,725 |
public void dumpGrid() {
Formatter fmt = new Formatter(System.out);
fmt.format(" ");
for (int iCol = 0; iCol < 9; iCol++) {
fmt.format("Col: %d ", iCol);
}
System.out.println();
for (int iRow = 0; iRow < 9; iRow++) {
System.out.print(... | void function() { Formatter fmt = new Formatter(System.out); fmt.format(" "); for (int iCol = 0; iCol < 9; iCol++) { fmt.format(STR, iCol); } System.out.println(); for (int iRow = 0; iRow < 9; iRow++) { System.out.print(STR + iRow + STR); for (int iCol = 0; iCol < 9; iCol++) { if (cells[iRow][iCol].getValue() != null) ... | /**
* Nice printout of the grid.
*/ | Nice printout of the grid | dumpGrid | {
"repo_name": "amckee23/drools",
"path": "drools-examples/src/main/java/org/drools/examples/sudoku/Sudoku.java",
"license": "apache-2.0",
"size": 11858
} | [
"java.util.Formatter",
"java.util.Set"
] | import java.util.Formatter; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 589,393 |
@Override
public Adapter createProxyServiceFaultContainerAdapter() {
if (proxyServiceFaultContainerItemProvider == null) {
proxyServiceFaultContainerItemProvider = new ProxyServiceFaultContainerItemProvider(this);
}
return proxyServiceFaultContainerItemProvider;
}
... | Adapter function() { if (proxyServiceFaultContainerItemProvider == null) { proxyServiceFaultContainerItemProvider = new ProxyServiceFaultContainerItemProvider(this); } return proxyServiceFaultContainerItemProvider; } protected ProxyServiceContainerItemProvider proxyServiceContainerItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceFaultContainer}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceFaultContainer</code>. | createProxyServiceFaultContainerAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"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; | 2,300,254 |
public static <T> T mode(Collection<T> values) {
Set<T> modes = modes(values);
return modes.iterator().next();
} | static <T> T function(Collection<T> values) { Set<T> modes = modes(values); return modes.iterator().next(); } | /**
* Returns the mode in the Collection. If the Collection has multiple modes, this method picks one
* arbitrarily.
*/ | Returns the mode in the Collection. If the Collection has multiple modes, this method picks one arbitrarily | mode | {
"repo_name": "mayukuntian/stanford-ner",
"path": "src/edu/stanford/nlp/util/CollectionUtils.java",
"license": "gpl-2.0",
"size": 28525
} | [
"java.util.Collection",
"java.util.Set"
] | import java.util.Collection; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,628,922 |
public static void setNumReduceTasks(String table, JobConf job)
throws IOException {
job.setNumReduceTasks(MetaTableAccessor.getRegionCount(HBaseConfiguration.create(job),
TableName.valueOf(table)));
} | static void function(String table, JobConf job) throws IOException { job.setNumReduceTasks(MetaTableAccessor.getRegionCount(HBaseConfiguration.create(job), TableName.valueOf(table))); } | /**
* Sets the number of reduce tasks for the given job configuration to the
* number of regions the given table has.
*
* @param table The table to get the region count for.
* @param job The current job configuration to adjust.
* @throws IOException When retrieving the table details fails.
*/ | Sets the number of reduce tasks for the given job configuration to the number of regions the given table has | setNumReduceTasks | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 17516
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.MetaTableAccessor",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.mapred.JobConf"
] | import java.io.IOException; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.MetaTableAccessor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.mapred.JobConf; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.mapred.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 777,407 |
@Test
public void testQuote() throws XapiParserException {
String description = "Correct parsing of quote statements";
TestHelper.testStart(description);
Runner r = ArtificialDomain.runnerArtificialAutobiography();
XrefStatement statement =
(XrefStatement) r... | void function() throws XapiParserException { String description = STR; TestHelper.testStart(description); Runner r = ArtificialDomain.runnerArtificialAutobiography(); XrefStatement statement = (XrefStatement) r.agent.getXapiParser().parseLine( "A 'John' / says in scene r.print(statement); Assert.assertTrue(statement.ge... | /**
* Tests whether an quote statement is parsed correctly
* @throws XapiParserException
*
*/ | Tests whether an quote statement is parsed correctly | testQuote | {
"repo_name": "Xapagy/Xapagy",
"path": "src/test/java/org/xapagy/xapi/testXapiParser.java",
"license": "agpl-3.0",
"size": 8139
} | [
"org.junit.Assert",
"org.xapagy.ArtificialDomain",
"org.xapagy.TestHelper",
"org.xapagy.debug.Runner",
"org.xapagy.instances.ViStructureHelper",
"org.xapagy.xapi.reference.XrefStatement"
] | import org.junit.Assert; import org.xapagy.ArtificialDomain; import org.xapagy.TestHelper; import org.xapagy.debug.Runner; import org.xapagy.instances.ViStructureHelper; import org.xapagy.xapi.reference.XrefStatement; | import org.junit.*; import org.xapagy.*; import org.xapagy.debug.*; import org.xapagy.instances.*; import org.xapagy.xapi.reference.*; | [
"org.junit",
"org.xapagy",
"org.xapagy.debug",
"org.xapagy.instances",
"org.xapagy.xapi"
] | org.junit; org.xapagy; org.xapagy.debug; org.xapagy.instances; org.xapagy.xapi; | 915,254 |
private List populatePodcastArray(String siteId) {
List podEntries = null;
List entries = new ArrayList();
try {
enablePodfeedSecurityAdvisor();
if (podcastService.isPodcastFolderHidden(siteId)) {
return entries;
}
else {
// get the individual podcasts
podEntries = podcastService.g... | List function(String siteId) { List podEntries = null; List entries = new ArrayList(); try { enablePodfeedSecurityAdvisor(); if (podcastService.isPodcastFolderHidden(siteId)) { return entries; } else { podEntries = podcastService.getPodcasts(siteId); securityService.popAdvisor(); podEntries = podcastService.filterPodca... | /**
* This pulls the podcasts from Resourses and stuffs it in a list to be
* added to the feed
*
* @param siteId
* The site to pull the individual podcasts from
*
* @return List The list of podcast entries from ContentHosting
*/ | This pulls the podcasts from Resourses and stuffs it in a list to be added to the feed | populatePodcastArray | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "podcasts/podcasts-impl/impl/src/java/org/sakaiproject/component/app/podcasts/BasicPodfeedService.java",
"license": "apache-2.0",
"size": 29928
} | [
"java.util.ArrayList",
"java.util.Date",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.sakaiproject.api.app.podcasts.PodcastService",
"org.sakaiproject.api.app.podcasts.exception.PodcastException",
"org.sakaiproject.content.api.ContentResource",
"org.sakaiproje... | import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.sakaiproject.api.app.podcasts.PodcastService; import org.sakaiproject.api.app.podcasts.exception.PodcastException; import org.sakaiproject.content.api.ContentRe... | import java.util.*; import org.sakaiproject.api.app.podcasts.*; import org.sakaiproject.api.app.podcasts.exception.*; import org.sakaiproject.content.api.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.exception.*; | [
"java.util",
"org.sakaiproject.api",
"org.sakaiproject.content",
"org.sakaiproject.entity",
"org.sakaiproject.exception"
] | java.util; org.sakaiproject.api; org.sakaiproject.content; org.sakaiproject.entity; org.sakaiproject.exception; | 796,370 |
public Set<String> getActiveAccessTokensOfUser(String username) throws APIManagementException {
Connection conn = null;
ResultSet resultSet = null;
PreparedStatement ps = null;
Set<String> tokens = null;
String accessTokenStoreTable = APIConstants.ACCESS_TOKEN_STORE_TABLE;... | Set<String> function(String username) throws APIManagementException { Connection conn = null; ResultSet resultSet = null; PreparedStatement ps = null; Set<String> tokens = null; String accessTokenStoreTable = APIConstants.ACCESS_TOKEN_STORE_TABLE; if (APIUtil.checkAccessTokenPartitioningEnabled() && APIUtil.checkUserNa... | /**
* Find all active access tokens of a given user.
* @param username - Username of the user
* @return - The set of active access tokens of the user.
*/ | Find all active access tokens of a given user | getActiveAccessTokensOfUser | {
"repo_name": "rnavagamuwa/custom-carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 404796
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.HashSet",
"java.util.Set",
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.APIConstants",
"org.wso2.carbon.apimgt.... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashSet; import java.util.Set; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.APIConstants; i... | import java.sql.*; import java.util.*; import org.apache.commons.lang.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.core.util.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.user.core.util.*; import... | [
"java.sql",
"java.util",
"org.apache.commons",
"org.wso2.carbon"
] | java.sql; java.util; org.apache.commons; org.wso2.carbon; | 1,705,028 |
@Override
protected void configureTlsExtensions(
SSLSocket sslSocket, String hostname, List<Protocol> protocols) {
// Enable SNI and session tickets.
if (hostname != null) {
SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true);
SET_HOSTNAME.invokeOpt... | void function( SSLSocket sslSocket, String hostname, List<Protocol> protocols) { if (hostname != null) { SET_USE_SESSION_TICKETS.invokeOptionalWithoutCheckedException(sslSocket, true); SET_HOSTNAME.invokeOptionalWithoutCheckedException(sslSocket, hostname); } Object[] parameters = {Platform.concatLengthPrefixed(protoco... | /**
* Override {@link Platform}'s configureTlsExtensions for Android older than 5.0, since OkHttp
* (2.3+) only support such function for Android 5.0+.
*/ | Override <code>Platform</code>'s configureTlsExtensions for Android older than 5.0, since OkHttp (2.3+) only support such function for Android 5.0+ | configureTlsExtensions | {
"repo_name": "xzy256/grpc-java-mips64",
"path": "okhttp/src/main/java/io/grpc/okhttp/OkHttpProtocolNegotiator.java",
"license": "bsd-3-clause",
"size": 10314
} | [
"io.grpc.okhttp.internal.Platform",
"io.grpc.okhttp.internal.Protocol",
"java.util.List",
"javax.net.ssl.SSLSocket"
] | import io.grpc.okhttp.internal.Platform; import io.grpc.okhttp.internal.Protocol; import java.util.List; import javax.net.ssl.SSLSocket; | import io.grpc.okhttp.internal.*; import java.util.*; import javax.net.ssl.*; | [
"io.grpc.okhttp",
"java.util",
"javax.net"
] | io.grpc.okhttp; java.util; javax.net; | 2,096,307 |
Map<String, CmsValidationResult> validate(
String formValidatorClass,
Map<String, CmsValidationQuery> validationQueries,
Map<String, String> values,
String config) throws CmsRpcException; | Map<String, CmsValidationResult> validate( String formValidatorClass, Map<String, CmsValidationQuery> validationQueries, Map<String, String> values, String config) throws CmsRpcException; | /**
* Performs a batch of validations using a custom form validator class.<p>
*
* @param formValidatorClass the class name of the form validator
* @param validationQueries a map from field names to validation queries
* @param values the map of all field values
* @param config the form v... | Performs a batch of validations using a custom form validator class | validate | {
"repo_name": "serrapos/opencms-core",
"path": "src/org/opencms/gwt/shared/rpc/I_CmsCoreService.java",
"license": "lgpl-2.1",
"size": 9663
} | [
"java.util.Map",
"org.opencms.gwt.CmsRpcException",
"org.opencms.gwt.shared.CmsValidationQuery",
"org.opencms.gwt.shared.CmsValidationResult"
] | import java.util.Map; import org.opencms.gwt.CmsRpcException; import org.opencms.gwt.shared.CmsValidationQuery; import org.opencms.gwt.shared.CmsValidationResult; | import java.util.*; import org.opencms.gwt.*; import org.opencms.gwt.shared.*; | [
"java.util",
"org.opencms.gwt"
] | java.util; org.opencms.gwt; | 2,212,376 |
EDataType getLanguage(); | EDataType getLanguage(); | /**
* Returns the meta object for data type '{@link java.lang.String <em>Language</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for data type '<em>Language</em>'.
* @see java.lang.String
* @model instanceClass="java.lang.String"
* extendedMetaData="name=... | Returns the meta object for data type '<code>java.lang.String Language</code>'. | getLanguage | {
"repo_name": "LangleyStudios/eclipse-avro",
"path": "test/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/XMLTypePackage.java",
"license": "epl-1.0",
"size": 81687
} | [
"org.eclipse.emf.ecore.EDataType"
] | import org.eclipse.emf.ecore.EDataType; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 458,526 |
public void paintSliderBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) {
paintBorder(context, g, x, y, w, h, orientation);
} | void function(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) { paintBorder(context, g, x, y, w, h, orientation); } | /**
* Paints the border of a slider. This implementation invokes the method of
* the same name without the orientation.
*
* @param context SynthContext identifying the <code>JComponent</code>
* and <code>Region</code> to paint to
* @param g <code>Graphics</... | Paints the border of a slider. This implementation invokes the method of the same name without the orientation | paintSliderBorder | {
"repo_name": "anhtu1995ok/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java",
"license": "apache-2.0",
"size": 119406
} | [
"java.awt.Graphics",
"javax.swing.plaf.synth.SynthContext"
] | import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext; | import java.awt.*; import javax.swing.plaf.synth.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,401,410 |
public static void setVector(LargeVarCharVector vector, String... values) {
final int length = values.length;
vector.allocateNewSafe();
for (int i = 0; i < length; i++) {
if (values[i] != null) {
vector.setSafe(i, values[i].getBytes(StandardCharsets.UTF_8));
}
}
vector.setValue... | static void function(LargeVarCharVector vector, String... values) { final int length = values.length; vector.allocateNewSafe(); for (int i = 0; i < length; i++) { if (values[i] != null) { vector.setSafe(i, values[i].getBytes(StandardCharsets.UTF_8)); } } vector.setValueCount(length); } | /**
* Populate values for LargeVarCharVector.
*/ | Populate values for LargeVarCharVector | setVector | {
"repo_name": "wesm/arrow",
"path": "java/vector/src/test/java/org/apache/arrow/vector/testing/ValueVectorDataPopulator.java",
"license": "apache-2.0",
"size": 20903
} | [
"java.nio.charset.StandardCharsets",
"org.apache.arrow.vector.LargeVarCharVector"
] | import java.nio.charset.StandardCharsets; import org.apache.arrow.vector.LargeVarCharVector; | import java.nio.charset.*; import org.apache.arrow.vector.*; | [
"java.nio",
"org.apache.arrow"
] | java.nio; org.apache.arrow; | 335,794 |
@Override
public void close() throws IOException {
if (inf != null) {
inf.end();
inf = null;
}
if (this.in != System.in) {
this.in.close();
}
} | void function() throws IOException { if (inf != null) { inf.end(); inf = null; } if (this.in != System.in) { this.in.close(); } } | /**
* Closes the input stream (unless it is System.in).
*
* @since 1.2
*/ | Closes the input stream (unless it is System.in) | close | {
"repo_name": "sscdotopen/youreadog",
"path": "src/main/java/de/tuberlin/dima/youreadog/hadoop/io/GzipCompressorInputStream.java",
"license": "gpl-3.0",
"size": 12390
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 206,458 |
public World getWorld() {
return m_world;
} | World function() { return m_world; } | /**
* Gets the current world
*/ | Gets the current world | getWorld | {
"repo_name": "Roxside/jbox2d",
"path": "jbox2d-testbed/src/main/java/org/jbox2d/testbed/framework/TestbedTest.java",
"license": "bsd-2-clause",
"size": 23149
} | [
"org.jbox2d.dynamics.World"
] | import org.jbox2d.dynamics.World; | import org.jbox2d.dynamics.*; | [
"org.jbox2d.dynamics"
] | org.jbox2d.dynamics; | 1,573,147 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.